Video downloading method, device, medium and equipment
By premarking key time points in the video and generating target video segments, the problem of being unable to selectively download live broadcast replay content in the prior art is solved, efficient storage and network resource use are achieved, user experience is improved, and flexible video usage and classification methods are provided.
Patent Information
- Application Number
- CN202110226006.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-01
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-03-01
AI Technical Summary
There is a lack of live broadcasting function in existing live broadcast platforms, and in software that supports live broadcasting, users cannot selectively download live broadcasting content, resulting in insufficient storage space, high network bandwidth, poor user experience, and the inability to flexibly use and classify live broadcasting content.
By premarking key time points in the video and using these key time points to generate target video segments, users can selectively download the required video segments, reducing the use of storage space and network bandwidth.
It realizes efficient download of video clips selected by users, reduces the demand for storage space and network bandwidth, improves the user's download experience, and increases the video precipitation form to facilitate users to edit, promote, share and classify.
Smart Images

Figure CN115002506B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video technology, and in particular to a video downloading method, device, medium and equipment. Background Art
[0002] Only a few of the existing live broadcast platforms support the live broadcast playback function. In the software that supports the live broadcast playback function, the playback is to save the host's video stream file in segments in the cloud service. When watching the live broadcast playback, all the saved video stream files need to be sent down and decoded for playback.
[0003] For live broadcast content that is worth preserving, there are many problems when preserving it: first, users are not sure whether they can download the live broadcast replay content, nor are they sure about the size of the cloud storage space for the live broadcast replay. The live broadcast replay content may be intercepted or deleted due to insufficient cloud storage space; second, the live broadcast replay content cannot be flexibly used and deposited, such as editing and sharing the live broadcast replay content; third, each time the complete live broadcast replay content is played, it is necessary to ensure that the network has sufficient bandwidth, which will affect the user experience of the live broadcast replay in an abnormal network environment; fourth, the complete live broadcast replay content is not convenient for users to accurately classify the live broadcast replay content. For example, educational live broadcasts need to be accurately classified according to the course content, but each live broadcast may have parts that are not related to the course content, or different course content may be involved in a live broadcast.
[0004] For general video playback applications, when downloading videos, the complete video content is also sent down, which also takes up a large storage space, consumes network bandwidth, and is not convenient for users to perform operations such as editing and classification. Summary of the invention
[0005] In order to solve the problem of selectively downloading video content, the present application provides a video downloading method, device, medium and equipment. The technical solution is as follows:
[0006] In a first aspect, the present application provides a video downloading method, applied to a client, the method comprising:
[0007] In response to a user initiating an operation for downloading a video, sending a verification request to a server so that the server verifies the user and the video respectively;
[0008] Receiving verification information from the server and generating a download setting interface;
[0009] In response to a save operation, obtaining download content information set by the user in the download setting interface;
[0010] Based on the download content information, a download instruction is sent to the server so that the server stores the target video segment in the video based on the download instruction, wherein the download instruction carries one or more key time points, and the key time points are determined when the video is marked in advance.
[0011] In a second aspect, the present application provides a video downloading method, applied to a server, the method comprising:
[0012] Receiving a verification request, and obtaining a user ID of a user and a video ID of a video from the verification request;
[0013] Verifying the user and the video based on the user identifier and the video identifier respectively, obtaining a verification result, and sending the verification result to the client;
[0014] Receive a download instruction, the download instruction carrying one or more key time points, the key time points being determined in advance when marking the video;
[0015] Determining a target video segment of the video according to the one or more key time points;
[0016] The target video segment is stored.
[0017] In a third aspect, the present application provides a video downloading device, applied to a client, the device comprising:
[0018] A response request module, configured to send a verification request to a server in response to a user initiating an operation for downloading a video, so that the server verifies the user and the video respectively;
[0019] A receiving and generating module, used for receiving verification passing information from the server and generating a download setting interface;
[0020] A response acquisition module, used for acquiring the download content information set by the user in the download setting interface in response to a save operation;
[0021] A download instruction sending module is used to send a download instruction to the server based on the download content information, so that the server stores the target video segment in the video based on the download instruction, and the download instruction carries one or more key time points, which are determined when the video is marked in advance.
[0022] In a fourth aspect, the present application provides a video downloading device, applied to a server, the device comprising:
[0023] A first receiving module is used to receive a verification request, and obtain a user identifier of a user and a video identifier of a video from the verification request;
[0024] A verification module, used to verify the user and the video based on the user identifier and the video identifier respectively, obtain a verification result, and send the verification result to the client;
[0025] A second receiving module is used to receive a download instruction, wherein the download instruction carries one or more key time points, and the key time points are determined when the video is marked in advance;
[0026] A video segment determination module, configured to determine a target video segment of the video according to the one or more key time points;
[0027] The storage module is used to store the target video segment.
[0028] In a fifth aspect, the present application provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement a video downloading method as described in the first aspect or the second aspect.
[0029] In a sixth aspect, the present application provides a computer device, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement a video downloading method as described in the first aspect or the second aspect.
[0030] In a seventh aspect, the present invention provides a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes to implement a video downloading method as described in the first aspect or the second aspect.
[0031] The present application provides a video downloading method, device, medium and equipment, which have the following technical effects:
[0032] The solution provided by the present application marks key time points in the video in advance and uses the key time points to download the target video segment selected by the user. Compared with downloading the video content in its entirety, the solution provided by the present application can effectively reduce the storage space occupied, while reducing the requirements for network bandwidth, and improving the user experience during the download process. The target video segment obtained is the video clip required by the user, which increases the precipitation form of the video, facilitates the user to effectively save the essence of the video, and is also convenient for the user to edit, promote, share and classify it.
[0033] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0035] Figure 1 It is a schematic diagram of an implementation environment of a video downloading method provided in an embodiment of the present application;
[0036] Figure 2 It is a flowchart of a video downloading method applied to a client provided in an embodiment of the present application;
[0037] Figure 3 This is a schematic diagram of interaction between start setting and marking key time points in a video downloading method provided in an embodiment of the present application;
[0038] Figure 4 It is a schematic diagram of the interaction between the verification process and the downloading process in a video downloading method provided in an embodiment of the present application;
[0039] Figure 5 is a schematic diagram of a download configuration interface provided in an embodiment of the present application;
[0040] Figure 6 It is a schematic diagram of the interaction between the download configuration process and the download data transmission process in a video download method provided in an embodiment of the present application;
[0041] Figure 7 It is a flow chart of a video downloading method applied to a server provided in an embodiment of the present application;
[0042] Figure 8is a schematic diagram of a video downloading device applied to a client provided in an embodiment of the present application;
[0043] Fig. 9 is a schematic diagram of a video downloading device applied to a server provided in an embodiment of the present application;
[0044] Fig.10 It is a schematic diagram of the hardware structure of a device for implementing a video downloading method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of this application. Examples of the embodiments are shown in the drawings, where the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions.
[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0047] See also Figure 1 , which is a schematic diagram of an implementation environment of a video downloading method provided in an embodiment of the present application, such as Figure 1 As shown, the implementation environment may include at least a client 01 and a server 02 .
[0048] Specifically, the client 01 may include devices such as smart phones, desktop computers, tablet computers, laptop computers, digital assistants, smart wearable devices, monitoring devices, and voice interaction devices, and may also include software running in the device, such as web pages provided to users by some service providers, or applications provided to users by these service providers. Specifically, the client 01 may be used to respond to a user's initiation of a video download operation to send a verification request to a server, receive a verification pass message from the server to generate a download setting interface, obtain the download content information set by the user in the download setting interface in response to a save operation, and send a download instruction to the server based on the download content information.
[0049] Specifically, the server 02 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server 02 may include a network communication unit, a processor, and a memory, etc. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this. Specifically, the server 02 can be used to receive a verification request, obtain a user ID of the user and a video ID of the video from the verification request, verify the user and the video based on the user ID and the video ID, respectively, obtain a verification result, send the verification result to the client, receive a download instruction, and determine the target video segment of the video according to one or more key time points in the download instruction, and store the target video segment.
[0050] The embodiment of the present application can also be implemented in combination with cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software and network in a wide area network or a local area network to realize the calculation, storage, processing and sharing of data. It can also be understood as a general term for network technology, information technology, integration technology, management platform technology and application technology based on the cloud computing business model application, which can form a resource pool and be used on demand, flexible and convenient. Cloud technology needs to be supported by cloud computing. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, each item may have its own identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data require strong system backing support, which can only be achieved through cloud computing. Cloud computing is a computing mode that distributes computing tasks on a resource pool composed of a large number of computers, so that various application systems can obtain computing power, storage space and information services as needed. The network that provides resources is called "cloud". Specifically, the server 02 is located in the cloud, and the server 02 can be a physical machine or a virtualized machine.
[0051] The following introduces a video downloading method provided by this application. Figure 2 This is a flowchart of a video downloading method applied to a client provided in an embodiment of this specification. This specification provides method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, in a parallel processor or multi-threaded processing environment). Please refer to Figure 2 A video downloading method provided in an embodiment of this specification may include the following steps:
[0052] S100: In response to a user initiating an operation for downloading a video, a verification request is sent to a server, so that the server verifies the user and the video respectively.
[0053] In an embodiment of the present specification, in response to a download initiation operation for a video triggered by a user on a client, the client generates a verification request and sends it to a server, wherein the verification request includes at least a user identifier of the user and a video identifier of the video, and the verification request can be used to verify whether the user can download the video.
[0054] In the embodiments of this specification, whether a user can download a video depends mainly on two aspects: one is whether the user has download authority, and the other is whether the video supports downloading. Only when the user has download authority and the video supports downloading can the user download the video. It is feasible to verify whether the user has download authority based on the user ID of the user, and to verify whether the video supports downloading based on the video ID of the video.
[0055] In one embodiment of the present specification, the verification request also includes a verification request for whether the video content of the video exists. For example, when applied to the downloading scenario of live playback video, before the broadcast, the user as the anchor has the authority to control whether the subsequent live broadcast process will be saved and generate the live playback video, that is, the playback video will exist only when the live playback function is turned on for the user of the anchor, otherwise there may be only a live broadcast record containing a video identifier in the server without specific video content. Further, in this application scenario, the user as the anchor can also limit whether the live playback video supports downloading, such as turning on the live playback function but not allowing the download of the live playback video, and only playing the live playback video online. Further, in this application scenario, the user as the anchor can also limit the user group with download permission, such as the download permission can be open only to the user as the anchor, or the download permission can be open to users who have watched a certain live broadcast time as an audience.
[0056] Therefore, in an embodiment of the present specification, in a downloading scenario of a live playback video, the method is applied to a client of a user who is a host, and before step S100, the method may include:
[0057] S101: In response to a broadcast setting operation of a user who is a host, broadcast setting information is sent to a server.
[0058] S102: Receive a setting response message sent by the server.
[0059] It is understandable that the broadcast setting information includes but is not limited to the on and off information of the live broadcast playback function, the download support information of the live broadcast playback video, and the download permission ownership information of the live broadcast playback video, so that the server can configure the corresponding functions and attributes of the user's subsequent live broadcast process according to the broadcast setting information.
[0060] In the embodiments of this specification, specifically, the method may further include the following steps before step S100:
[0061] S103: According to the marking operation of the user on the video, the key time point marked by the marking operation is obtained.
[0062] It is understandable that in order to achieve selective downloading of video content, it is necessary to set the start time point and the end time point for the selected video segment. When applied to the downloading scenario of live playback video, the user can mark the live video while watching the live broadcast, and initiate the download operation after the live broadcast ends. The user at this time can be a user who is an anchor or a user who is a viewer.
[0063] S104: Send the key time point to the server, so that the server generates a target video segment corresponding to the key time point.
[0064] Specifically, during the live broadcast process, the key point is sent to the server so that the server generates the corresponding target video segment according to the key time point according to the preset generation rules. The generation method can be found in the embodiment of a video download method applied to the server provided in this specification, which will not be repeated here. Furthermore, there will be multiple users performing the marking operation, so the user identification of the user and the key time point can also be sent to the server. Furthermore, it can also carry the video identification of the video, or the attribute information of the key time point, such as the attribute information can characterize whether the key time point is the start time point or the end time point.
[0065] For example, Figure 3 As shown, for steps S101-104, taking the user as an anchor as an example, before the broadcast, the live video is set to support downloading, and the client sends a request to create a live broadcast setting to support downloading and sends it to the server. The server configures the function according to the request and returns a response message to the client. Then, during the live broadcast process, the client sends the live broadcast key point marks a, b, etc. set by the user to the server, and receives a response message from the server. After the live broadcast ends, the server generates the corresponding playback content, wherein the playback content includes the target video segment generated according to the key point mark (i.e., the key time point).
[0066] In a feasible implementation, in a downloading scenario of live playback video, when the live playback function is turned on by the anchor user, in response to the download initiation operation of the anchor user or the audience user, the generated verification request includes: 1. Verification of whether the live playback content exists; 2. Verification of whether the user can download the live playback content. Specifically, the client sends a statement containing a user ID (UserID) and a live broadcast ID (LivingID) to the server to query whether the live playback content exists and whether the live playback content can be downloaded. Or the query can be performed in two steps, such as using a statement that describes the status of the live broadcast process (such as Figure 4GetlivingDetailRsq) in the live broadcast, which can be used to describe the number of live viewers, the number of comments, and other information. At the same time, this statement will be in the loading process and cannot be called during the live broadcast. It can be called only after the live broadcast ends. That is, whether the live broadcast playback content has been generated can be judged by whether the statement can be called and sent, and its existence can be verified; Figure 4 As shown in , a message of requesting download (1) including a user ID (UserID) and a live ID (LivingID) is generated and sent to the server, requesting the server to verify whether the user can download the live playback content according to the user ID and the live ID (i.e., the video ID). In the embodiments of this specification, the live playback video is also called the live playback content, and the two are the same concept and are not distinguished.
[0067] S300: receiving verification pass information from the server and generating a download setting interface.
[0068] It is understandable that after the server completes the verification, it sends the verification result to the client, and the verification result indicates that the verification is passed or failed. When the verification result indicates that the verification is passed, that is, only the user can download the video, the client will generate a download setting interface. If the verification result indicates that the verification failed, that is, the verification failure information is received, the client can generate an error prompt interface. For example, Figure 4 As shown in , if the live playback video exists, the verification information may include the recording address, which represents the storage address of the video in the server; further, after verification, the user can download the live playback video, and the verification information may include a message confirming the download request as a response to the download request message containing the user ID (UserID) and the live ID (LivingID), and trigger the client to generate a download configuration interface. It should be noted that Figure 4 The verification process and the data transmission process when the data is stored locally on the client are shown in FIG. 1 . The download configuration process in the middle is not shown. For detailed download configuration process, please refer to Figure 6 The content in.
[0069] In the embodiment of the present specification, the download setting interface at least includes setting the video download time range, and the download setting interface may also include but is not limited to setting the download destination, the format of the downloaded content, the download file name, the download directory path, etc. Exemplarily, the destination can be selected to download locally on the client or on a network disk. When the download destination is the local space of the client, the local space can be tested to verify whether the local storage space meets the download requirements; the format of the downloaded content can be selected as one of a variety of video formats such as MPEG (Motion Picture Experts Group), AVI (Audio Video Interleaved), etc., and can also be an audio format.
[0070] In one embodiment of the present specification, when applied to a downloading scenario of a live playback video, Figure 5 A download configuration interface is shown, in which you can choose to download the live playback video in its entirety or download key content, that is, to set the video download time range. It is understandable that the key content is a target video segment generated based on a key time point. Figure 5 Only a simple and direct selection mode is shown, where the server generates key content for selection based on key time points. There may be multiple key contents corresponding to different combinations of key time points. In some other feasible implementations, a second-level setting interface may be designed for the download setting interface, where the key time points marked by the user are displayed in the second-level setting interface, and a combination of preset key time points is provided for the user to select, so as to finally determine the start and end time points of the target video segment; or, a text box may be set in the second-level setting interface for the user to fill in the start and end time points of the key content by himself, and even when the user does not mark the video before the download is initiated, the start and end time points of the key content may be directly set in the download configuration interface, and the start and end time points may be used as the key time points in the download instruction, which is not limited in the embodiments of this specification.
[0071] In the method provided in the embodiments of this specification, Figure 6 As shown, based on the pre-adopted communication protocol, after receiving the verification message from the server, the client can first send a download request (2) message to the server, and then generate a download setting interface after receiving the download request response message from the server. This communication process can be used as a preparation process before the download process starts. That is, Figure 6 Request and request response in Figure 4 The request and request confirmation can be different processes.
[0072] S500: In response to a save operation, obtaining download content information set by the user in the download setting interface.
[0073] In an embodiment of the present specification, after the user performs a save operation, the user's setting for the video download time range can be obtained based on the content in the download setting interface. The setting for the video download time range includes information on one or more key time points so that the server can determine the target video segment corresponding to the key time point based on the key time point. According to the content of the download setting interface, information including but not limited to the download destination, content format, file name, download directory path, etc. can also be obtained, and the above information is used as download content information.
[0074] S700: Based on the download content information, a download instruction is sent to the server, so that the server stores the target video segment in the video based on the download instruction, wherein the download instruction carries one or more key time points, and the key time points are determined when the video is marked in advance.
[0075] It is understandable that the download instruction includes one or more key time points so that the server can determine the target video segment corresponding to the key time point according to the key time point. The download instruction may also include but is not limited to the download destination, content format, file name, download directory path and other configuration information. The configuration information may also include a video identifier. Furthermore, the download instruction also includes a message to confirm the download to the server, which is used to inform the server that the local client is ready to receive the download data. For example, Figure 6 As shown in , the download instruction may include a download configuration message and a download confirmation message, and response messages to the two messages will be received from the server respectively.
[0076] It is understandable that, compared to storing complete videos, the method provided in the embodiments of this specification realizes storing the target video segments required by users, which can effectively reduce the storage space occupied, reduce the requirements for network bandwidth, and improve the user experience during the download process. Furthermore, the target video segments are the video clips required by users, which increases the precipitation form of videos, facilitates users to effectively save the essence of videos, and facilitates users to edit, promote, share and classify them.
[0077] For example, when the download destination is the local client, after receiving the download instruction and determining the target video segment according to the download instruction, the server transmits the data of the target video segment to the client in segments, which can be referred to as Figure 4The content shown in . After the client obtains the fragmented data through multi-threaded parallel download, it performs data integrity verification and decodes the video for user playback. The HTTP protocol (HyperText TransferProtocol) is adopted to realize multi-threaded parallel download and breakpoint resume. Multi-threaded parallel download improves the download efficiency and shortens the required time; during the data transmission process, it is likely to encounter various special situations, such as user operation, abnormal shutdown, network interruption, etc. Therefore, in a complete download process, it is necessary to be able to continue downloading from the progress of the last interruption, so breakpoint resume can support but not limited to the following situations: 1) Support manual pause during download, and continue downloading from the paused node when restarting the download; 2) After the application exits abnormally, the download can be continued from the abnormal exit node after restarting the program; 3) When exiting normally, it prompts whether to stop downloading and retain the download node for subsequent downloads; 4) Recover after network abnormality and continue downloading from the node before interruption.
[0078] Exemplarily, when the download destination is a network disk or other storage space, after receiving the download instruction and determining the target video segment based on one or more key time points in the download instruction, the server can also detect the size of the storage space, and obtain information such as the network address of the storage space, the format of the downloaded content, etc. from the download instruction, and store the data of the target video segment in the designated storage space based on the preset communication protocol and data transmission protocol.
[0079] Figure 7 This is a flowchart of a video downloading method applied to a server provided in an embodiment of this specification. This specification provides method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, in a parallel processor or multi-threaded processing environment). Please refer to Figure 7 A video downloading method provided in an embodiment of this specification may include the following steps:
[0080] S200: receiving a verification request, and obtaining a user identifier of a user and a video identifier of a video from the verification request.
[0081] In an embodiment of the present specification, a server receives a verification request sent by a client in response to a user initiating an operation to download a video, wherein the verification request includes at least a user ID of the user and a video ID of the video, and the verification request can be used to verify whether the user can download the video.
[0082] In the embodiments of this specification, whether a user can download a video depends mainly on two aspects: one is whether the user has download authority, and the other is whether the video supports downloading. Only when the user has download authority and the video supports downloading can the user download the video. It is feasible to verify whether the user has download authority based on the user ID of the user, and to verify whether the video supports downloading based on the video ID of the video.
[0083] In one embodiment of the present specification, the verification request also includes a verification request for whether the video content of the video exists. For example, when applied to the downloading scenario of live playback video, before the broadcast, the user as the anchor has the authority to control whether the subsequent live broadcast process will be saved and generate the live playback video, that is, the playback video will exist only when the live playback function is turned on for the user of the anchor, otherwise there may be only a live broadcast record containing a video identifier in the server without specific video content. Further, in this application scenario, the user as the anchor can also limit whether the live playback video supports downloading, such as turning on the live playback function but not allowing the download of the live playback video, and only playing the live playback video online. Further, in this application scenario, the user as the anchor can also limit the user group with download permission, such as the download permission can be open only to the user as the anchor, or the download permission can be open to users who have watched a certain live broadcast time as an audience.
[0084] Therefore, in one embodiment of the present specification, in a downloading scenario of a live playback video, the method may include, before step S200:
[0085] S201: Receive broadcast setting information.
[0086] It is understandable that the broadcast setting information comes from the client of the user who is the anchor, and the broadcast setting information includes but is not limited to the on / off information of the live broadcast playback function, the download support information of the live broadcast playback video, and the download authority ownership information of the live broadcast playback video. The server configures the corresponding functions and attributes of the subsequent live broadcast process of the user according to the broadcast setting information.
[0087] S202: Send a setup response message to the client.
[0088] In an embodiment of the present specification, specifically, the method may further include the following steps before step S200:
[0089] S203: Receive a key time point.
[0090] It is understandable that in order to achieve selective downloading of video content, it is necessary to set the start time point and the end time point for the selected video segment. When applied to the downloading scenario of live playback video, the user can mark the live video while watching the live broadcast, and initiate the download operation after the live broadcast ends. The user at this time can be a user who is an anchor or a user who is a viewer.
[0091] Furthermore, in addition to the key time point, the server may also receive a user identifier, a video identifier or attribute information of the key time point sent from the client, and the attribute information may indicate whether the key time point is a start time point or an end time point.
[0092] S204: Generate a target video segment corresponding to the key time point according to the key time point.
[0093] Exemplarily, when a key time point is received during a live broadcast or the playback of an existing video, and the key time point has attribute information, and the attribute information represents whether the key time point is a start time point or an end time point, the video segments within the corresponding time range can be saved according to the received key time point sequence and the attribute information of the key time point to generate playback content.
[0094] For example, Figure 3 As shown, for steps S201-204, taking the user as an anchor as an example, before the broadcast, the live video is set to support downloading, and the client sends a request to create a live broadcast setting to support downloading and sends it to the server. The server configures the function according to the request and returns a response message to the client. Then, during the live broadcast process, the client sends the live broadcast key point marks a, b, etc. set by the user to the server, and receives a response message from the server. After the live broadcast ends, the server generates the corresponding playback content, wherein the playback content includes the target video segment generated according to the key point mark (i.e., the key time point).
[0095] Exemplarily, when a key time point is received during a live broadcast or video playback process, and the key time point only represents the absolute moment information or the relative moment information in the video, the corresponding target video segment can be generated according to the preset time point combination rule. For example, the key time points are sorted to obtain a time point sequence of A, B, C, and D, and then target video segments AB, BC, and CD can be generated, or target video segments AC and BD can be generated. The specific combination of key time points can be designed according to the size of the storage space, application requirements, and business logic, etc., and the embodiments of this specification are not limited to this. Preferably, the method of generating the target video segment according to the key time point can be consistent with the method of determining the target video segment for selective download according to the key time point.
[0096] In a feasible implementation, the server uses the start time point and the end time point of the video as the two default key time points. When the user only marks one key time point during video playback or live broadcast, the time point marked by the user and the two default key time points can be combined to generate one or more groups of video segments.
[0097] It is understandable that when choosing to save live playback content by key time points, you can save only the target video segment instead of the complete live playback content, which can effectively alleviate the occupancy of storage space and avoid the inability to save live playback content due to insufficient storage space.
[0098] S400: Verify the user and the video based on the user identifier and the video identifier respectively, obtain a verification result, and send the verification result to the client.
[0099] In one embodiment of the present specification, specifically, the verifying the user and the video based on the user identifier and the video identifier respectively to obtain the verification result may include the following steps:
[0100] S401: Verify whether the user meets the download authority condition based on the user identification, and obtain a first verification result.
[0101] In the download application scenario of live playback video, the user as the anchor can limit the user group with download permissions. In other types of video playback websites, download permissions can be opened only to users who have purchased membership. Therefore, it is necessary to verify whether the user meets the download permission conditions.
[0102] S403: Verify whether the video satisfies the download permission condition based on the video identifier to obtain a second verification result.
[0103] In the application scenario of downloading live playback videos, the anchor user can limit whether the live playback video supports downloading, and restrict the download of videos on other types of video playback websites to prevent piracy and infringement. Therefore, it is also necessary to verify whether the video meets the download permission conditions.
[0104] It is understandable that the first verification result and the second verification result are used as the verification result, and the verification result indicates that the verification is passed or failed, and is sent to the client. Exemplarily, if the live playback video exists and meets the download authority condition and the download permission condition, the verification result may include the storage address of the video in the server and a message confirming the download request.
[0105] In another embodiment of the present specification, such as in the application scenario of downloading live playback video, the user as the anchor has the authority to turn on / off the live playback function, so it is also necessary to first verify whether the live playback video exists.
[0106] Exemplarily, in the download scenario of live playback video, when the live playback function is turned on by the anchor user, in response to the download initiation operation of the anchor user or the audience user, the verification request received by the server includes: 1. Verification of whether the live playback content exists; 2. Verification of whether the user can download the live playback content. Specifically, the server receives a statement containing a user ID (UserID) and a live broadcast ID (LivingID) and responds to the statement, informing the client whether the live playback content exists and whether the live playback content can be downloaded. Or respond in two steps, such as for a statement describing the status of the live broadcast process (such as Figure 4 GetlivingDetailRsq in the live broadcast is used for verification. This statement can be used to describe the number of viewers and the number of comments of the live broadcast. At the same time, this statement will be in the loading process and cannot be called during the live broadcast. It can only be called after the live broadcast ends. That is, when the server receives this statement, it can return the recording address of the live broadcast playback content as part of the verification result. Figure 4 As shown in the figure, the server receives a message requesting download (1) including a user ID (UserID) and a live ID (LivingID). The server verifies whether the user can download the live playback content based on the user ID and the live ID (i.e., the video ID). If both are possible, the server returns a message confirming the download request as part of the verification result.
[0107] S600: Receive a download instruction, where the download instruction carries one or more key time points, where the key time points are determined in advance when marking the video.
[0108] In an embodiment of the present specification, a download instruction is generated to the client based on the download content information in the download configuration interface and sent to the server. The download instruction includes one or more key time points so that the server can determine the target video segment corresponding to the key time point based on the key time point. The download instruction may also include but is not limited to configuration information such as the download destination, content format, file name, and download directory path. The configuration information also includes video identification data. Furthermore, the download instruction also includes a message confirming the download to the server, which is used to inform the server that the local client is ready to receive the downloaded data. For example, if Figure 6 As shown in , the download instruction may include a download configuration message and a download confirmation message. Further, the server sends a response message to the client after receiving the download instruction.
[0109] S800: Determine a target video segment of the video according to the one or more key time points.
[0110] In one embodiment of the present specification, the server receives information about key time points during the playback or live broadcast of an existing video, and generates corresponding target video segments according to the key time points and preset time point combination rules. For the specific process, see the corresponding content of step S204. When determining the corresponding target video segment according to the key time points in the download instruction, the target video segment corresponding to the key time points in the download instruction can be determined according to the corresponding relationship between the key time points and the target video segments formed during the generation process.
[0111] In another embodiment of the present specification, determining the target video segment of the video according to the one or more key time points may include the following steps:
[0112] S801: Obtain one or more groups of key time point pairs according to the one or more key time points.
[0113] In a feasible implementation, if the key time point combination rules in the target video segment generation process are inconsistent with the key time point combination rules in the download process, or if more or fewer combination permissions are provided to the user during the download configuration, the target video segment to be downloaded can be specifically determined based on the key time points and the preset key time point combination rules in the download process.
[0114] Specifically, step S801 may include the following steps:
[0115] S8011: Sort the sequence of the one or more key time points to obtain a key time point sequence.
[0116] In a feasible implementation, the server uses the start time point and the end time point of the video as the two default key time points. When the download instruction only includes one key time point, the two default key time points and the one key time point in the download instruction can be combined to obtain a time point sequence according to the time sequence.
[0117] For example, if there are multiple key time points, the key time points are sorted to obtain a time point sequence of A, B, C, and D. Furthermore, the time point at the beginning and the time point at the end of the video can also be added to the time point sequence as two default key time points.
[0118] S8013: Based on a preset step size, the key time points in the key time point sequence are traversed and combined to obtain one or more groups of key time point pairs.
[0119] Exemplarily, if the preset step length is 1, the key time point pairs may be determined to be AB, BC, and CD; if the preset step length is 2, the key time point pairs may be determined to be AC and BD.
[0120] It should be noted that the embodiments of this specification do not impose a unique limitation on the combination method of key time point pairs. The above is only an example and can be specifically designed according to application requirements and business logic, such as introducing attribute information of key time points and dynamic adjustment of step size in the combination rules.
[0121] S803: Determine one target video segment based on the two key time points in each group of the key time point pairs.
[0122] For example, when the key time point pairs are AB, BC and CD, the target video segments are determined to be video segments AB, BC and CD; when the key time point pairs are AC and BD, the target video segments are determined to be video segments AC and BD. It should be noted that two key time points are used as a group here, and in other feasible implementations, more than two key time points may be used as a group to determine the target video segment.
[0123] S1000: storing the target video segment.
[0124] It is understandable that, compared to storing complete videos, the method provided in the embodiments of this specification realizes storing the target video segments required by users, which can effectively reduce the storage space occupied, reduce the requirements for network bandwidth, and improve the user experience during the download process. Furthermore, the target video segments are the video clips required by users, which increases the precipitation form of videos, facilitates users to effectively save the essence of videos, and facilitates users to edit, promote, share and classify them.
[0125] For example, when the download destination is the local client, after receiving the download instruction and determining the target video segment according to the download instruction, the server transmits the data of the target video segment to the client in segments, which can be referred to as Figure 4The content shown in. After the client obtains the fragmented data through multi-threaded parallel download, it performs data integrity verification and decodes the video for user playback. The HTTP protocol (HyperText TransferProtocol) is adopted to realize multi-threaded parallel download and breakpoint resume. Multi-threaded parallel download improves the download efficiency and shortens the required time; during the data transmission process, it is likely to encounter various special situations, such as user operation, abnormal shutdown, network interruption, etc. Therefore, in a complete download process, it is necessary to be able to continue downloading from the progress of the last interruption, so breakpoint resume can support but not limited to the following situations: 1) Support manual pause during download, and continue downloading from the paused node when restarting the download; 2) After the application exits abnormally, the download can be continued from the abnormal exit node after restarting the program; 3) When exiting normally, it prompts whether to stop downloading and retain the download node for subsequent downloads; 4) Recover after network abnormality and continue downloading from the node before interruption.
[0126] Exemplarily, when the download destination is a network disk or other storage space, after receiving the download instruction and determining the target video segment based on one or more key time points in the download instruction, the server can also detect the size of the storage space, and obtain information such as the network address of the storage space, the format of the downloaded content, etc. from the download instruction, and store the data of the target video segment in the designated storage space based on the preset communication protocol and data transmission protocol.
[0127] It should be noted that the contents of the embodiments of the method for downloading a video provided in this specification can be supplemented correspondingly on both the client and the server to form a complete interactive process between the client and the server.
[0128] The embodiment of the present application also provides a video downloading device 800, which is applied to a client, such as Figure 8 As shown, the device may include:
[0129] The response request module 810 is used to send a verification request to the server in response to the user initiating an operation for downloading a video, so that the server can verify the user and the video respectively.
[0130] The receiving and generating module 820 is used to receive the verification passing information from the server and generate a download setting interface.
[0131] The response acquisition module 830 is used to acquire the download content information set by the user in the download setting interface in response to the save operation.
[0132] The download instruction sending module 840 is used to send a download instruction to the server based on the download content information, so that the server stores the target video segment in the video based on the download instruction, and the download instruction carries one or more key time points, which are determined when the video is marked in advance.
[0133] In one embodiment of the present specification, the video downloading device 800 may include:
[0134] The acquisition module 850 is used to acquire the key time point marked by the marking operation performed by the user on the video.
[0135] The key time point sending module 860 is used to send the key time point to the server so that the server generates a target video segment corresponding to the key time point.
[0136] The embodiment of the present application also provides a video downloading device 900, which is applied to a server, such as Fig. 9 As shown, the device may include:
[0137] The first receiving module 910 is configured to receive a verification request, and obtain a user identifier of a user and a video identifier of a video from the verification request.
[0138] The verification module 920 is used to verify the user and the video based on the user identifier and the video identifier respectively, obtain a verification result, and send the verification result to the client.
[0139] The second receiving module 930 is used to receive a download instruction, where the download instruction carries one or more key time points, where the key time points are determined in advance when marking the video.
[0140] The video segment determination module 940 is configured to determine a target video segment of the video according to the one or more key time points.
[0141] The storage module 950 is used to store the target video segment.
[0142] In one embodiment of the present specification, the verification module 920 may include:
[0143] The first verification unit 921 is used to verify whether the user meets the download permission condition based on the user identifier, and obtain a first verification result.
[0144] The second verification unit 922 is used to verify whether the video meets the download permission condition based on the video identifier to obtain a second verification result.
[0145] In one embodiment of the present specification, the video segment determination module 940 may include:
[0146] The first determining unit 941 is configured to obtain one or more groups of key time point pairs according to the one or more key time points.
[0147] The second determining unit 942 is configured to determine one target video segment according to the two key time points in each group of the key time point pairs.
[0148] In a feasible implementation manner, the first determining unit 941 may include:
[0149] The sorting subunit 9411 is used to sort the sequence of the one or more key time points to obtain a key time point sequence.
[0150] The combining subunit 9412 is used to traverse and combine the key time points in the key time point sequence based on a preset step size to obtain one or more groups of key time point pairs.
[0151] It should be noted that the device provided in the above embodiment, when implementing its functions, only uses the division of the above functional modules as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0152] An embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a video downloading method provided in the above method embodiment.
[0153] Fig.10 A schematic diagram of the hardware structure of a device for implementing a video downloading method provided in an embodiment of the present application is shown, and the device may participate in or include the apparatus or system provided in an embodiment of the present application. Fig.10As shown, the device 10 may include one or more (1002a, 1002b, ..., 1002n are used to illustrate) processors 1002 (the processor 1002 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Fig.10 The structure shown is for illustration only and does not limit the structure of the electronic device. Fig.10 More or fewer components as shown, or with Fig.10 Different configurations shown.
[0154] It should be noted that the one or more processors 1002 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the device 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0155] The memory 1004 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the methods in the embodiments of the present application. The processor 1002 executes various functional applications and data processing by running the software programs and modules stored in the memory 1004, that is, to implement the above-mentioned video download method. The memory 1004 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1004 may further include a memory remotely arranged relative to the processor 1002, and these remote memories may be connected to the device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0156] The transmission device 1006 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the device 10. In one example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 1006 can be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.
[0157] The display may be, for example, a touch screen liquid crystal display (LCD) that may enable a user to interact with a user interface of device 10 (or mobile device).
[0158] An embodiment of the present application also provides a computer-readable storage medium, which can be set in a server to store at least one instruction or at least one program related to a video downloading method in a method embodiment, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a video downloading method provided by the above method embodiment.
[0159] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0160] The embodiment of the present invention further provides a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes a video downloading method provided in the above various optional implementations.
[0161] It can be seen from the above embodiments of a video downloading method, device, medium and equipment provided by the present application that:
[0162] The solution provided by the present application pre-marks key time points of the video and uses the key time points to download the target video segment selected by the user. Compared with downloading the video content in its entirety, the solution provided by the present application can effectively reduce the storage space occupied, while reducing the requirements for network bandwidth, and improving the user experience during the download process. The target video segment obtained is the video clip required by the user, which increases the precipitation form of the video, facilitates the user to effectively save the essence of the video, and is also convenient for the user to edit, promote, share and classify it.
[0163] It should be noted that the above sequence of the embodiments of this specification is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0164] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0165] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0166] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A video downloading method, characterized in that: Applied to a client, the method comprises: When playing a video, according to a marking operation performed by a user on the video, obtaining one or more key time points marked by the marking operation; the video is a live video of the anchor; The one or more key time points are sent to a server, so that when the anchor turns on a live playback function for the video, the server generates a live playback video corresponding to the video after the video is played and determines a target video segment corresponding to the one or more key time points from the live playback video; the target video segment is a segment in the live playback video; After the video is played, in response to the user initiating an operation for downloading the video, sending a verification request to the server so that the server verifies the user and the video respectively; Receiving a verification result from the server, and generating a download setting interface when the verification result indicates that the live playback video corresponding to the video meets the download permission condition set by the anchor and the identity and playback behavior of the user meet the download permission condition set by the anchor; In response to a save operation, obtaining download content information set by the user in the download setting interface; Based on the download content information, a download instruction is sent to the server, so that the server determines the target video segment based on the download instruction and sends the target video segment to the client for storage, wherein the download instruction carries the one or more key time points.
2. A video downloading method, characterized in that: Applied to a server, the method comprises: Acquire one or more key time points marked by a user when playing a video on a client; the video is a live video of the anchor; and when the anchor turns on a live playback function for the video, generate a live playback video corresponding to the video after the video is played and determine a target video segment corresponding to the one or more key time points from the live playback video; the target video segment is a segment in the live playback video; After the video is played, receiving a verification request, and obtaining a user ID of the user and a video ID of the video from the verification request; Verifying the user and the video based on the user identifier and the video identifier respectively, obtaining a verification result, and sending the verification result to the client; When the verification result indicates that the live playback video corresponding to the video meets the download permission condition set by the anchor and the identity and playback behavior of the user meet the download permission condition set by the anchor, receiving a download instruction, the download instruction carrying the one or more key time points; Determining the target video segment according to the one or more key time points; The target video segment is sent to the client for storage.
3. The method according to claim 2, characterized in that Determining the target video segment according to the one or more key time points includes: Obtain one or more groups of key time point pairs according to the one or more key time points; One target video segment is determined by two key time points in each group of key time point pairs.
4. The method according to claim 3, characterized in that: The obtaining one or more groups of key time point pairs according to the one or more key time points comprises: Sorting the one or more key time points in order to obtain a key time point sequence; Based on a preset step length, the key time points in the key time point sequence are traversed and combined to obtain one or more groups of key time point pairs.
5. A video downloading device, characterized in that: Applied to a client, the device comprises: An acquisition module, used for acquiring one or more key time points marked by a marking operation performed by a user on the video when playing the video; the video is a live video of the anchor; A key time point sending module is used to send the one or more key time points to a server, so that when the anchor turns on the live playback function for the video, the server generates a live playback video corresponding to the video after the video is played and determines a target video segment corresponding to the one or more key time points from the live playback video; the target video segment is a segment in the live playback video; A response request module, configured to send a verification request to the server in response to the user initiating an operation for downloading the video after the video is played, so that the server can verify the user and the video respectively; A receiving and generating module, configured to receive a verification result from the server, and generate a download setting interface when the live playback video corresponding to the video in the verification result meets the download permission condition set by the anchor and the identity and playback behavior of the user meet the download permission condition set by the anchor; A response acquisition module, used for acquiring the download content information set by the user in the download setting interface in response to a save operation; A download instruction sending module is used to send a download instruction to the server based on the download content information, so that the server determines the target video segment based on the download instruction and sends the target video segment to the client for storage, and the download instruction carries the one or more key time points.
6. A video downloading device, characterized in that: Applied to a server, the device comprises: The key time point acquisition module is used to acquire one or more key time points marked by the user when playing a video on the client; the video is a live video of the anchor; when the anchor turns on the live playback function for the video, after the video is played, a live playback video corresponding to the video is generated and a target video segment corresponding to the one or more key time points is determined from the live playback video; the target video segment is a clip in the live playback video; A first receiving module is used to receive a verification request after the video is played, and obtain a user identifier of the user and a video identifier of the video from the verification request; A verification module, used to verify the user and the video based on the user identifier and the video identifier respectively, obtain a verification result, and send the verification result to the client; A second receiving module is configured to receive a download instruction if the verification result indicates that the live playback video corresponding to the video meets the download permission condition set by the anchor and the identity and playback behavior of the user meet the download permission condition set by the anchor, and the download instruction carries the one or more key time points; A video segment determination module, configured to determine the target video segment according to the one or more key time points; the target video segment is generated by the server according to the one or more key time points; The storage module is used to send the target video segment to the client for storage.
7. The device according to claim 6, characterized in that The video segment determination module includes: A first determining unit, configured to obtain one or more groups of key time point pairs according to the one or more key time points; The second determining unit is configured to determine one target video segment according to the two key time points in each group of the key time point pairs.
8. The device according to claim 7, characterized in that The first determining unit includes: A sorting subunit, used to sort the one or more key time points in order to obtain a key time point sequence; The combining subunit is used to traverse and combine the key time points in the key time point sequence based on a preset step length to obtain one or more groups of key time point pairs.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by a processor to implement a video downloading method as described in any one of claims 1 to 4.
10. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement a video downloading method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Video resource management method, device and system and computer readable storage medium
CN109657429A
Online video playing method and video playing server
US20140215545A1