Live streaming screenshot method and system
By determining image group information in live stream screenshots and using screenshot identifiers for flexible frequency and bitrate management, the problems of waste of live edge computing resources and high costs are solved, and the stability and efficiency of the system are improved.
Patent Information
- Application Number
- CN202411823191.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-11
AI Technical Summary
The existing live broadcast edge computing system has problems of resource waste and high cost in screenshot services, especially due to the need for screenshots of different frequencies, which requires additional deployment of edge computing resources, affecting system stability and resource shortages.
By determining the image group information of the live stream for key frame detection and combining it with screenshot identifiers and parameters, secondary image processing is performed to achieve flexible screenshot frequency and bit rate management. By utilizing the pre-built screenshot data source secondary processing platform, the screenshot frequency and bit rate are uniformly controlled to reduce resource deployment and storage consumption.
It achieves the goal of reducing the deployment and storage costs of edge computing resources while meeting business needs, improving system stability and efficiency, and reducing overall edge computing costs.
Smart Images

Figure CN119676479B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of Internet, in particular to a live streaming screenshot method and system. BACKGROUND
[0002] Currently, the main live streaming architecture is that the host uses a broadcasting tool to obtain a streaming address from a scheduling system, pushes the live streaming to an edge computing uplink streaming service, and the edge computing uplink streaming service pushes the live streaming to an edge computing screenshot service for content recording.
[0003] Among them, the edge computing screenshot service meets the content recording of all live streaming by deploying a large number of nodes, but as the number of business end access increases, the types and frequencies of pictures needed are increasingly diversified, and the production of screenshots of different frequencies will cause waste of resources. While ensuring the production of screenshots of the most basic frequency, the production of screenshots of other frequencies is additionally increased, which requires additional deployment of edge computing resources, and the uploading and storage of screenshots will cause additional costs, forming additional consumption of edge computing resources, which increases the cost of edge computing, and the deployment of too many edge computing resources will cause a shortage of resources for other services, which will greatly affect the stability of the overall edge computing system. SUMMARY
[0004] In view of the above problems, the present application is proposed to provide a live streaming screenshot method, system, computing device, computer storage medium and computer program product which can overcome the above problems or at least partially solve the above problems.
[0005] According to an aspect of an embodiment of the present application, a live streaming screenshot method is provided, comprising:
[0006] A screenshot processing step of determining image group information corresponding to the received live streaming to be processed;
[0007] Performing key frame detection and screenshot according to the image group information;
[0008] An image secondary processing step of receiving a live streaming screenshot acquisition request, wherein the live streaming screenshot acquisition request carries a screenshot identifier;
[0009] Determining the screenshot parameter corresponding to the screenshot identifier;
[0010] Obtaining a target key frame screenshot, performing image secondary processing according to the screenshot parameter and the target key frame screenshot, and returning the processed live streaming screenshot resource.
[0011] Further, the screenshot parameter includes a screenshot frequency and a code rate.
[0012] The image secondary processing according to the screenshot parameter and the target key frame screenshot further includes:
[0013] According to the target key frame screenshot and the screenshot frequency, image resampling processing is performed;
[0014] According to the code rate, the processed image is subjected to image secondary compression processing.
[0015] Further, the method further comprises recording the first timestamp corresponding to the key frame image;
[0016] According to the target key frame screenshot and the screenshot frequency, image resampling processing further comprises:
[0017] Determine the second timestamp when the screenshot is taken according to the screenshot frequency;
[0018] Match the second timestamp with the first timestamp corresponding to the target key frame screenshot, and determine the second timestamp that does not match;
[0019] Determine the closest first timestamp to the unmatched second timestamp, and take the target key frame screenshot corresponding to the closest first timestamp as the reference frame image;
[0020] According to the reference frame image, a live stream screenshot corresponding to the unmatched second timestamp is generated.
[0021] Further, the method further comprises pre-configuring the association relationship between the screenshot parameter and the screenshot identifier;
[0022] Wherein, the screenshot identifier is obtained by hashing the screenshot parameter, or the screenshot frequency and the code rate are spliced.
[0023] Further, determining the screenshot parameter corresponding to the screenshot identifier further comprises:
[0024] Obtain the screenshot parameter associated with the screenshot identifier.
[0025] Further, the screenshot processing step is performed by an edge computing screenshot node, and the image secondary processing step is performed by a pre-built screenshot data source secondary processing platform.
[0026] According to another aspect of the embodiment of the present application, a live stream screenshot system is provided, comprising:
[0027] The screenshot processing module is adapted to determine the image group information corresponding to the received live stream to be processed; and perform key frame detection and screenshot according to the image group information;
[0028] The image secondary processing module is adapted to receive a live stream screenshot acquisition request, wherein the live stream screenshot acquisition request carries a screenshot identifier; determine screenshot parameters corresponding to the screenshot identifier; acquire a target key frame screenshot, perform image secondary processing according to the screenshot parameters and the target key frame screenshot, and return a processed live stream screenshot resource.
[0029] According to another aspect of the embodiment of the present application, a computing device is provided, comprising a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete communication with each other through the communication bus.
[0030] The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the operation corresponding to the live stream screenshot method.
[0031] According to another aspect of the embodiment of the present application, a computer storage medium is provided, and the computer storage medium stores at least one executable instruction, and the executable instruction causes the processor to perform the operation corresponding to the live stream screenshot method.
[0032] According to another aspect of the embodiment of the present application, a computer program product is provided, comprising at least one executable instruction, and the executable instruction causes the processor to perform the operation corresponding to the live stream screenshot method.
[0033] According to the live stream screenshot method and system provided by the embodiment of the present application, the screenshot is performed according to the image group information, then the screenshot parameters are determined based on the acquired screenshot identifier, and the image secondary processing is performed based on the screenshot parameters and the acquired target key frame screenshot, which can not only meet the demand of the business end of the upstream, but also reduce the deployment of the edge computing resource, the consumption of the upload bandwidth and the cost of storage, greatly reduce the cost consumption of the edge computing while continuously improving the efficiency, and ensure the stability of the overall edge computing system.
[0034] The above description is only a summary of the technical solutions of the embodiments of the present application, in order to more clearly understand the technical means of the embodiments of the present application, the embodiments of the present application can be implemented according to the content of the specification, and in order to make the above and other purposes, characteristics and advantages of the embodiments of the present application more obvious and easy to understand, the following specific embodiments of the embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0035] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of illustrating the preferred embodiments and are not considered as limiting the embodiments of the present application. Moreover, the same reference numerals are used to represent the same components throughout the drawings. In the drawings:
[0036] Figure 1 It is a schematic diagram of the existing live streaming architecture.
[0037] Figure 2 A flowchart illustrating a live stream screenshot method according to one embodiment of the present application is shown;
[0038] Figure 3 A flowchart illustrating a live stream screenshot method according to another embodiment of the present application is shown;
[0039] Figure 4 A structural block diagram of a live stream screenshot system according to one embodiment of the present application is shown;
[0040] Figure 5 A structural diagram of a computing device according to one embodiment of the present application is shown. DETAILED DESCRIPTION
[0041] Exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be accurately conveyed to those skilled in the art.
[0042] First, the nomenclature related to one or more embodiments of the present application is explained.
[0043] Live stream: a data stream that transmits audio and video content in real time, with real-time and interactivity, and the process of live streaming is a long link. Unless the host actively disconnects, the live stream is continuous.
[0044] Live edge computing: a technology that pushes live stream processing and distribution to the edge of the network. It combines edge computing and live streaming to improve real-time live streaming experience and reduce the impact of latency and network congestion.
[0045] Edge computing node: an important component of the edge computing architecture, located at the edge of the network, used to perform computing tasks, process data and provide services.
[0046] Live data frame: refers to the basic unit of video and audio data transmitted during live streaming. The type, encoding method and transmission mechanism of live data frame directly affect the quality and latency of live streaming. It contains video frames (I frames, P frames and B frames) and audio frames.
[0047] Key frame: contains complete image data, while non-key frame (such as P frame or B frame) only contains difference data relative to the previous frame or the next frame. It is an independent complete image that can be decoded independently without reference to other frames.
[0048] GOP: represents a group of consecutive frames, including a key frame (I frame) and several non-key frames (P frame and / or B frame), selecting a suitable GOP length and structure can optimize video quality, compression efficiency and playback performance.
[0049] The current live streaming architecture is as shown in Figure 1 The host uses the live streaming tool to obtain the push address from the scheduling system, and pushes the live stream to the edge computing uplink stream service. The edge computing uplink stream service will push the live stream to the edge computing recording and edge computing screenshot services for content recording. The edge computing recording service and the edge computing screenshot service record and save the live content in real time, which is used for live streaming review, live content secondary creation, and live room cover. The real-time and accuracy of live screenshots directly affect the review of live content production safety, effectively preventing the broadcast and spread of live content such as pornography and violence, and have a very important significance for the overall live content safety.
[0050] As can be seen from the above background, the edge computing screenshot service provides the most basic data for live streaming review, live content secondary creation, and live room cover, and is the data source of upstream business and a crucial link in live content production and content safety. However, there are still some problems in the current edge computing screenshot service, which affect the deployment and management cost of live edge computing resources and the production of live streaming.
[0051] To improve the quality of the host's stream, the current live edge computing system is deployed in various parts of the country according to the principle of proximity. After receiving the host's stream, the edge computing uplink stream service will push the live stream to the edge computing screenshot service. The edge computing screenshot service will record the live screenshots in real time and upload them to the storage device for storage, so that various business ends can pull data to ensure the real-time recording of live content. The edge computing screenshot service has deployed a large number of nodes to meet the content recording of all live streams. However, as the number of business ends increases, the types and frequencies of pictures needed become more and more diverse, from initially outputting one picture every 5 seconds to one picture every 2 seconds, and then to non-compressed pictures, etc. This has led to an increase in the number of edge computing screenshot service nodes, making it difficult for manual management and easily affecting the safe production of live content online due to inconsistent versions, which can have a negative impact on the overall live streaming ecosystem. On the other hand, different frequencies of screenshot production can cause resource waste. The production of screenshots at the most basic frequency, while additionally increasing the production of screenshots at other frequencies, requires additional deployment of edge computing resources, and the uploading of screenshots and the storage of storage devices will cause additional costs, resulting in additional consumption of edge computing resources and increasing the cost of edge computing. Additionally, the deployment of too many resources can lead to a shortage of resources for other services, which can have a significant impact on the stability of the overall edge computing system.
[0052] To solve the above problems, the inventors of the present application put forward a live stream screenshot scheme through creative labor, which will be described below in conjunction with specific examples:
[0053] Figure 2 The flowchart of the live stream screenshot method according to one embodiment of the present application is shown, as shown in the figure, Figure 2 The method comprises the following steps:
[0054] Step S201, determine the image group information corresponding to the received live stream to be screenshot processed.
[0055] Specifically, the anchor can use the live streaming tool to perform live streaming, and the live stream pushed by the anchor needs to be screenshot processed, which is referred to as the live stream to be screenshot processed, and the image group information corresponding to the live stream needs to be determined, wherein the image group is a group of continuous video frames, and the image group usually starts with a key frame followed by several non-key frames, that is, the image group contains a key frame and several non-key frames, and thus the image group information is also referred to as GOP information, for example, including GOP length, and of course, it can also contain other information, such as frame type (I frame, P frame, B frame), etc.
[0056] Step S202, key frame detection and screenshot according to image group information.
[0057] Specifically, the image group information defines the image group length, and the image group usually starts with a key frame, so the image group information can reflect the occurrence frequency of the key frame, that is, a key frame occurs once every several frames, so the image group information can be used to detect whether a key frame occurs in real time, and when a key frame is detected according to the image group information, the key frame will be screenshot (or can be understood as copying), since the key frame screenshot contains complete data and can be converted into an image independently, thereby ensuring that the live screenshot data will not be missed. Then, the key frame screenshot is uploaded to the storage device in real time for storage, for example, it can be uploaded to the database or central computer room, etc., so that the upstream business end can pull the screenshot data for live content security audit, secondary creation, etc.
[0058] When performing screenshot, there can be many key frame screenshots, so they can be packed and compressed according to the specified code rate to generate data packets, and the data packets are uploaded to the storage device for storage.
[0059] The application uniformly takes screenshots according to image group information. On the one hand, the original data of the live stream is completely saved, and the problem of missing key frame data in live screenshot caused by changes in live quality, compression efficiency and the like is solved. In addition, the data content carried by the live stream can be restored according to the key frame screenshot, greatly improving the security and review accuracy of live content production. On the other hand, the problem of extra deployment of edge computing resources due to different screenshot frequencies of business terminals is solved, avoiding the production of repeated live screenshots for the same live stream due to different frequencies, reducing the consumption of edge computing screenshot upload bandwidth, and avoiding the deployment of resources for multiple screenshot frequencies, greatly reducing the waste of edge computing resources, reducing the overall cost of edge computing, improving the stability of the edge computing system, and reducing the storage cost.
[0060] In step S203, a live stream screenshot acquisition request is received, wherein the live stream screenshot acquisition request carries a screenshot identifier.
[0061] The screenshot identifier is used to uniquely identify a business terminal, and each business terminal corresponds to a unique screenshot identifier. When a business terminal has a use demand for a live stream screenshot, the business terminal can send a live stream screenshot acquisition request carrying the screenshot identifier, so that the live stream screenshot acquisition request carrying the screenshot identifier sent by the business terminal can be received.
[0062] In step S204, the screenshot parameter corresponding to the screenshot identifier is determined.
[0063] After obtaining the live stream screenshot acquisition request, the live stream screenshot acquisition request is parsed, and the screenshot identifier is extracted from the request. Then, the screenshot parameter corresponding to the screenshot identifier is determined. The screenshot parameter reflects the screenshot demand of the business terminal. By determining the screenshot parameter corresponding to the business terminal, image secondary processing can be performed according to the screenshot parameter subsequently, so as to meet the demand of the business terminal for obtaining screenshots according to the specified screenshot frequency and code rate.
[0064] In step S205, the target key frame screenshot is obtained, and image secondary processing is performed according to the screenshot parameter and the target key frame screenshot, and the processed live stream screenshot resource is returned.
[0065] The key frame screenshot is stored in the storage device, so that when image secondary processing is needed, the target key frame screenshot can be pulled from the storage device, where the target key frame screenshot is the object referred to by the image secondary processing. The actual needs of the business end may be different, and the target key image pulled may be different. After the target key frame screenshot is pulled, image secondary processing can be performed according to the screenshot parameters and the target key frame. The live stream screenshot obtained after image secondary processing meets the needs of the business end for screenshots. Finally, the processed live stream screenshot resource is returned to the business end. The live stream screenshot can be a live stream screenshot acquisition address or a corresponding live stream screenshot.
[0066] According to the live stream screenshot method provided by the embodiment of the application, the screenshot is taken according to the image group information, then the screenshot parameters are determined based on the obtained screenshot identifier, and the image secondary processing is performed based on the screenshot parameters and the obtained target key frame screenshot. This can not only meet the needs of the business end upstream, but also reduce the deployment of edge computing resources, the consumption of upload bandwidth and the cost of storage. In this way, the efficiency is continuously improved, the cost consumption of edge computing is greatly reduced, and the stability of the overall edge computing system is ensured.
[0067] Figure 3 A flowchart of a live stream screenshot method according to an embodiment of the application is shown, as shown in Figure 3 The method includes the following steps:
[0068] Step S301, determine the image group information corresponding to the received live stream to be screenshot processed.
[0069] Specifically, for a host with a live streaming demand, the host can use a broadcasting tool to obtain a push stream address from a scheduling system, push the live stream to an edge computing uplink stream node, and the edge computing uplink stream node pushes the live stream to an edge computing screenshot node for screenshot processing. Here, the live stream received by the edge computing screenshot node is referred to as the live stream to be screenshot processed. For this live stream, the image group information corresponding to the live stream needs to be determined. For example, a video processing tool can be used to analyze the live stream and extract the image group information corresponding to the live stream. Of course, the image group information corresponding to the live stream to be screenshot processed can also be determined in other ways.
[0070] The image group is a set of continuous video frames, and the image group usually starts with a key frame (I frame) and is followed by a plurality of non-key frames (P frames and / or B frames), that is, the image group includes a key frame and a plurality of non-key frames, and thus the image group information, also referred to as GOP information, for example, includes the image group length (GOP length), such as an image group length of 10, so that it can be determined that the image group includes one I frame, nine P frames and / or B frames, so that the occurrence frequency of the I frame can be obtained, and the image group information can also include other information, such as frame types (I frame, P frame, B frame) and the like.
[0071] In step S302, key frame detection and screenshot are performed according to the image group information.
[0072] Specifically, the image group information defines the image group length, and the image group usually starts with a key frame, so that the image group information can reflect the occurrence frequency of the key frame, that is, a key frame occurs once every several frames, so that the occurrence frequency of the key frame can be detected in real time according to the image group information, that is, whether a video frame in the live streaming is a key frame or a non-key frame is detected according to the occurrence frequency of the key frame, and after it is detected that a video frame is a key frame, the key frame is screenshot (or can be understood as copying). Since the key frame screenshot contains complete data and can be independently converted into an image, it is ensured that the live screenshot data will not be missed. Then, the key frame screenshot is uploaded to the storage device in real time for storage, so that the upstream business end can pull the screenshot data for live content security audit, secondary creation and the like.
[0073] When the screenshot is performed, there can be many key frame screenshots, and thus the data packets can be packaged and compressed according to the specified code rate, and the data packets are uploaded to the storage device for storage.
[0074] The application uniformly performs screenshot according to the image group information. On the one hand, the original data of the live streaming is completely saved, and the problem of missing live screenshot key frame data caused by changes in live quality, compression efficiency and the like is solved, and on the other hand, the data content carried by the live streaming can be truly restored according to the key frame screenshot, greatly improving the safety and review accuracy of live content production. In addition, the problem of additional deployment of edge computing resources due to different screenshot frequencies of the business end is solved, and the same live streaming is not repeatedly produced due to different frequencies, which reduces the consumption of edge computing screenshot upload bandwidth, and multiple screenshot frequency resources are not deployed, greatly reducing the waste of edge computing resources, reducing the overall cost of edge computing, improving the stability of the edge computing system, and reducing the storage cost.
[0075] The steps S301-S302 are performed by the edge computing screenshot node.
[0076] The above steps achieve the screenshot according to the GOP information, that is, how many key frames the live stream contains, that is, how many key frame screenshots are output. However, since the screenshot is according to the GOP, it may not be able to meet the demand of the upstream service end to obtain the screenshot according to the specified frequency and code rate. When the service end calls the screenshot, it may find that there is no screenshot, but the real situation is that the key frame is not updated. In order to meet the demand of the upstream service end to obtain the screenshot according to the specified frequency and code rate, the image secondary processing needs to be performed when the upstream service end has the demand of obtaining the screenshot, so as to flexibly provide data. Specifically, a screenshot data source secondary processing platform can be built in advance, and the screenshot data source secondary processing platform can be used to implement the following method steps:
[0077] In step S303, an association relationship between the screenshot parameter and the screenshot identifier is pre-configured.
[0078] Specifically, the screenshot data source secondary processing platform supports the service end to independently configure the required screenshot parameter. For example, a screenshot parameter configuration interface can be provided to the service end, and the service end can independently configure the required screenshot parameter in the screenshot parameter configuration interface. The screenshot parameter can include the screenshot frequency and the code rate. Thus, the screenshot data source secondary processing platform can automatically generate a unique key bound to the service end, that is, the screenshot identifier. The screenshot identifier is obtained by hashing the screenshot parameter or the screenshot parameter and the service end information, or is a random number, or is obtained by splicing the screenshot frequency and the code rate, or is obtained by splicing the screenshot frequency, the code rate, and the service end information. The association relationship between the screenshot parameter and the screenshot identifier can be stored in a screenshot identifier table for subsequent query. In addition, the service end information can also be stored in the screenshot identifier table.
[0079] In step S304, a live stream screenshot obtaining request is received, and the live stream screenshot obtaining request carries the screenshot identifier.
[0080] The screenshot identifier is used to uniquely identify a service end, and each service end corresponds to a unique screenshot identifier. When the service end has a demand for using the live stream screenshot, the service end can send a live stream screenshot obtaining request carrying the screenshot identifier, so that the live stream screenshot obtaining request carrying the screenshot identifier sent by the service end can be received.
[0081] In step S305, the screenshot parameter associated with the screenshot identifier is obtained.
[0082] After obtaining the live stream screenshot acquisition request, the live stream screenshot acquisition request is parsed, the screenshot identifier is extracted from the request, and then the screenshot parameter associated with the screenshot identifier is obtained, for example, the screenshot identifier table is queried to determine the screenshot parameter associated with the screenshot identifier. The screenshot parameter obtained by querying is the screenshot parameter corresponding to the business end. The screenshot parameter reflects the screenshot requirement of the business end. By determining the screenshot parameter corresponding to the business end, image secondary processing can be performed according to the screenshot parameter in the subsequent process to meet the requirement of the business end to obtain screenshots according to the specified screenshot frequency and code rate.
[0083] In step S306, the target key frame screenshot is obtained, image resampling processing is performed according to the target key frame screenshot and the screenshot frequency, image secondary compression processing is performed on the processed image according to the code rate, and the processed live stream screenshot resource is returned.
[0084] The key frame screenshot is stored in the storage device, so when image secondary processing is needed, the target key frame screenshot can be pulled from the storage device. The target key frame screenshot is the object referred to by image secondary processing. The actual requirement of the business end may be different, and the target key image pulled may be different. For example, the business end needs to perform live content production safety review or real-time live room cover, and at this time, only the latest key frame screenshot stored in the storage device may need to be pulled. For the business end to perform live content secondary creation, all key frame screenshots stored in the storage device may need to be pulled, or the latest key frame screenshot stored in the storage device may need to be pulled.
[0085] After the target key frame screenshot is pulled, image resampling processing can be performed according to the target key frame screenshot and the screenshot frequency. The image resampling processing is to regenerate image frames at different time points to meet the new screenshot time interval requirement. Then, image secondary compression processing is performed on the processed image according to the code rate. Finally, the processed live stream screenshot resource is returned to the business end, ensuring the normal use of the upstream business end and making up for the problem that the GOP screenshot is not produced according to the fixed frequency. In addition, the secondary processing of the picture is not controlled by the data source production side, but is separated from the screenshot data source secondary processing platform, which is more flexible, has stronger expandability, improves the flexibility of live content production record and audit, and greatly improves the efficiency of subsequent iterative development.
[0086] In an optional embodiment, the first timestamp corresponding to the key frame image can also be recorded; thus, the second timestamp when the screenshot is taken according to the screenshot frequency can be determined; the second timestamp that does not match the first timestamp corresponding to the target key frame screenshot is determined by matching the second timestamp with the first timestamp corresponding to the target key frame screenshot; the closest first timestamp to the unmatched second timestamp is determined, and the target key frame screenshot corresponding to the closest first timestamp is taken as the reference frame image; finally, the live stream screenshot corresponding to the unmatched second timestamp is generated according to the reference frame image.
[0087] Specifically, the screenshot frequency reflects the screenshot requirement required by the service end, for example, taking a screenshot every 2 seconds, while the screenshot frequency according to the GOP can be different from the requirement of the service end, for example, the GOP screenshot frequency is taking a screenshot every 3 seconds, thus, the second timestamp when the screenshot is taken according to the screenshot frequency needs to be determined, for example, the second timestamp is 2 seconds, 4 seconds, 6 seconds, and 8 seconds, while the first timestamp corresponding to the target key frame screenshot is 0 seconds, 3 seconds, 6 seconds, and 9 seconds; the second timestamp is matched with the first timestamp corresponding to the target key frame screenshot, and the second timestamp that does not match is determined, for example, 2 seconds, 4 seconds, and 8 seconds do not match, and no production is made for these screenshots, thus, the closest key frame image is processed to determine that the reference frame image corresponding to 2 seconds is the target key frame screenshot with the first timestamp of 0 seconds, the reference frame image corresponding to 4 seconds is the target key frame screenshot with the first timestamp of 3 seconds, and the reference frame image corresponding to 8 seconds is the target key frame screenshot with the first timestamp of 6 seconds; the live stream screenshot corresponding to the above unmatched second timestamp is generated according to the reference frame image using the interpolation method; thus, the requirement of taking a screenshot every 2 seconds is met.
[0088] According to the live stream screenshot method provided in the embodiments of the present application, the key frame screenshot is taken according to the GOP by the edge computing screenshot node, in order to meet the requirement of the screenshot of the service in multiple frequencies and code rates, the screenshot data source secondary processing platform is pre-built, the image secondary processing is performed on the key frame screenshot, and then the processed live stream screenshot resource is returned to the upstream service end; the data source secondary processing mechanism can uniformly control the screenshot frequency, code rate, and the like of the live stream, avoids the repeated deployment of resources of the edge computing screenshot service due to the different screenshot frequencies, and reduces the additional bandwidth and storage consumption caused by the repeated screenshot, thereby reducing the edge computing cost.
[0089] Figure 4 The structure block diagram of the live stream screenshot system according to one embodiment of the present application is shown in FIG. 1, as shown in the figure, the system includes: Figure 4
[0090] The screenshot processing module 401 is adapted to determine the image group information corresponding to the received live stream to be processed; and perform key frame detection and screenshot according to the image group information.
[0091] The image secondary processing module 402 is adapted to receive a live stream screenshot acquisition request, wherein the live stream screenshot acquisition request carries a screenshot identifier; determine screenshot parameters corresponding to the screenshot identifier; acquire a target key frame screenshot, perform image secondary processing on the target key frame screenshot according to the screenshot parameters, and return a processed live stream screenshot resource.
[0092] Optionally, the screenshot parameters include a screenshot frequency and a code rate.
[0093] The image secondary processing module is further adapted to perform image resampling processing according to the target key frame screenshot and the screenshot frequency.
[0094] The processed image is subjected to image secondary compression processing according to the code rate.
[0095] Optionally, the system further includes a recording module adapted to record a first time stamp corresponding to the key frame image.
[0096] The image secondary processing module is further adapted to determine a second time stamp when the screenshot is taken according to the screenshot frequency.
[0097] The second time stamp is matched with the first time stamp corresponding to the target key frame screenshot to determine a second time stamp that is not matched.
[0098] The closest first time stamp to the second time stamp that is not matched is determined, and the target key frame screenshot corresponding to the closest first time stamp is taken as a reference frame image.
[0099] The live stream screenshot corresponding to the second time stamp that is not matched is generated according to the reference frame image.
[0100] Optionally, the system further includes a configuration module adapted to pre-configure an association relationship between the screenshot parameters and the screenshot identifier.
[0101] The screenshot identifier is obtained by hashing the screenshot parameters, or the screenshot frequency and the code rate are spliced.
[0102] Optionally, the image secondary processing module is further adapted to acquire the screenshot parameters associated with the screenshot identifier.
[0103] Optionally, the screenshot processing module is specifically an edge computing screenshot node, and the image secondary processing module is specifically a pre-built screenshot data source secondary processing platform.
[0104] The descriptions of the above modules refer to the corresponding descriptions in the method embodiments, which will not be repeated here.
[0105] According to the live stream screenshot system provided in the embodiment of the present application, the edge computing screenshot node performs key frame screenshots according to GOP. In order to meet the business needs of screenshots with multiple frequencies and bit rates, a screenshot data source secondary processing platform is pre-built to perform image secondary processing on the key frame screenshots, and then return the processed live stream screenshot resources to the upstream business end. The data source secondary processing mechanism can uniformly control the live stream screenshot frequency, bit rate, etc., avoiding the repeated deployment of resources of the edge computing screenshot service due to different screenshot frequencies, and the additional bandwidth and storage consumption caused by repeated screenshots, thereby reducing edge computing cost expenditure.
[0106] An embodiment of the present application provides a non-volatile computer storage medium, which stores at least one executable instruction or computer program, which can enable a processor to perform operations corresponding to the live stream screenshot method in any of the above method embodiments.
[0107] An embodiment of the present application provides a computer program product, which includes at least one executable instruction or computer program, and the executable instruction or computer program can enable a processor to perform operations corresponding to the live stream screenshot method in any of the above method embodiments.
[0108] Figure 5 A schematic structural diagram of an embodiment of a computing device of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computing device.
[0109] like Figure 5 As shown, the computing device may include: a processor (processor) 502 , a communications interface (Communications Interface) 504 , a memory (memory) 506 , and a communication bus 508 .
[0110] Processor 502, communication interface 504, and memory 506 communicate with each other via communication bus 508. Communication interface 504 is used to communicate with other devices, such as clients or other server network elements. Processor 502 is used to execute program 510, which may specifically perform the steps described in the embodiment of the live stream screenshot method for a computing device.
[0111] Specifically, the program 510 may include program codes, which include computer operation instructions.
[0112] The processor 502 can be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to perform the operations of the embodiments of the application. The computing device can include one or more processors of the same type or different types, such as one or more CPUs and one or more ASICs.
[0113] The memory 506 is configured to store the program 510. The memory 506 can include a high-speed RAM memory, and can also include a non-volatile memory, such as at least one disk memory.
[0114] The program 510 can be specifically configured to enable the processor 502 to perform the live stream screenshot method in any of the above method embodiments. The specific implementation of each step in the program 510 can refer to the corresponding description in the corresponding steps and units in the above live stream screenshot embodiments, and will not be described here. It can be clearly understood by those skilled in the art that, for the convenience and brevity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above method embodiments, and will not be described here.
[0115] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems can be used with these teachings, based on the description as set forth above. In terms of structure, those required to construct such systems are apparent from the above description. In addition, the embodiments of the present application are not directed to any particular programming language. It will be appreciated that a variety of programming languages can be used to implement the teachings of the present application described herein, and that the above description is provided for the best mode for carrying out the embodiments of the present application.
[0116] In the specification provided herein, a large number of specific details are described. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some examples, well-known methods, structures and techniques are not shown in detail in order not to obscure the understanding of the specification.
[0117] Similarly, it is to be understood that the embodiments of the application can sometimes alternately be termed as a system, a method, a device, a process or a procedure, depending on the particular context in which they are used. Accordingly, the terms "device", "method", "process", "procedure", "system", and the like, are not to be taken literally, but are employed in certain instances herein for the convenience of the reader. Hence, the terms "device", "method", "process", "procedure", "system", and the like, are to be interpreted in accordance with their broadest reasonable interpretation, as understood by those skilled in the art. Additionally, it is to be understood that the embodiments of the application can be one of several preferred aspects of the applications, and that each of the aspects can represent a single application or several applications that were reduced to practice. Accordingly, "the application" used in the claims and this detailed description means one, some or all embodiments of the application.
[0118] Those skilled in the art will appreciate that the modules in the apparatuses in the embodiments can be adapted and placed in one or more apparatuses other than the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and further can be divided into more sub-modules or sub-units or sub-components. Any combination of all the features disclosed in the specification (including the accompanying claims, abstract and drawings), and any method or of the apparatuses so disclosed, can be made unless specifically stated otherwise. Each feature disclosed in the specification (including the accompanying claims, abstract and drawings) can be replaced by alternative features serving the same, equivalent or similar purpose unless specifically stated otherwise.
[0119] Further, those skilled in the art will appreciate that a combination of features of different embodiments can mean that such combination is within the scope of the embodiments of the application and forms a different embodiment. For example, in the following claims, any of the claimed embodiments can be used in any combination. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0120] The various component embodiments of the present application can be implemented in hardware, or as software modules running in one or more processors, or in combinations thereof. Skilled persons should appreciate that a microprocessor or a digital signal processor (DSP) can be used to implement some or all of the functions of some or all of the components according to some or all of the embodiments of the present application in practice. The embodiments of the present application can also be implemented as a device or apparatus program (for example, a computer program and a computer program product) for performing part or all of the methods described herein. The program implementing the embodiments of the present application can be stored in a computer readable medium or can have the form of one or more signals. Such signals can be downloaded from an Internet website, or provided on a carrier signal, or in any other form.
[0121] It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that one skilled in the art will be able to design many alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word 'comprising' does not exclude the presence of elements or steps other than those listed in a claim. The word 'a' or 'an' preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of both hardware and software, and any combination thereof. In a unit claim, several devices can be listed with a conjunction like 'or', but it is to be understood that each of these devices can be implemented by its own hardware item. The use of the word 'at least' followed by a list of one or more members does not preclude the presence of additional such members, nor does it preclude further members. The word 'first' or'second' does not have any order connotations. The terms 'comprise', 'comprising', 'comprises' and 'comprised of' do not exclude the presence of elements or steps other than those listed in a claim.
Claims
1. A method for capturing a live stream, comprising: Screenshot processing step: determining image group information corresponding to the received live stream to be screenshot processed; Perform key frame detection and screenshot based on the image group information; The image secondary processing step includes receiving a live stream screenshot acquisition request, wherein the live stream screenshot acquisition request carries a screenshot identifier; Determining screenshot parameters corresponding to the screenshot identifier; Obtain a target keyframe screenshot, perform secondary image processing based on the screenshot parameters and the target keyframe screenshot, and return the processed live stream screenshot resource; The screenshot parameters include: screenshot frequency and bit rate; The performing secondary image processing according to the screenshot parameters and the target key frame screenshot further includes: Performing image resampling processing according to the target key frame screenshot and the screenshot frequency; The processed image is subjected to secondary image compression processing according to the code rate.
2. The method according to claim 1, wherein The method further includes: recording a first timestamp corresponding to the key frame image; The image resampling process according to the target key frame screenshot and the screenshot frequency further includes: Determine a second timestamp when taking a screenshot according to the screenshot frequency; Matching the second timestamp with the first timestamp corresponding to the target keyframe screenshot, and determining unmatched second timestamps; Determine a first timestamp closest to the unmatched second timestamp, and use a target key frame screenshot corresponding to the closest first timestamp as a reference frame image; A live stream screenshot corresponding to the unmatched second timestamp is generated according to the reference frame image.
3. The method according to claim 1, wherein The method further includes: pre-configuring an association between the screenshot parameters and the screenshot identifier; The screenshot identifier is obtained by performing hash processing on the screenshot parameters, or by concatenating the screenshot frequency and the bit rate.
4. The method according to claim 3, wherein: Determining the screenshot parameter corresponding to the screenshot identifier further includes: Obtaining screenshot parameters associated with the screenshot identifier.
5. The method according to any one of claims 1 to 4, wherein The screenshot processing step is performed by the edge computing screenshot node, and the image secondary processing step is performed by a pre-built screenshot data source secondary processing platform.
6. A live stream screenshot system, comprising: A screenshot processing module, adapted to determine image group information corresponding to a received live stream to be processed by screenshot; and, performing key frame detection and taking screenshots based on the image group information; The image secondary processing module is adapted to receive a live stream screenshot acquisition request, wherein the live stream screenshot acquisition request carries a screenshot identifier; determine screenshot parameters corresponding to the screenshot identifier; obtain a target keyframe screenshot, perform image secondary processing based on the screenshot parameters and the target keyframe screenshot, and return a processed live stream screenshot resource; Among them, screenshot parameters include: screenshot frequency and bit rate; The image secondary processing module is further adapted to: perform image resampling processing according to target key frame screenshots and screenshot frequency; The processed image is subjected to secondary compression processing according to the bit rate.
7. A computing device comprising: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the live stream screenshot method according to any one of claims 1 to 5.
8. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to perform operations corresponding to the live stream screenshot method according to any one of claims 1 to 5.
9. A computer program product, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the live stream screenshot method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Integrated broadcast control platform video content screen capturing method and integrated broadcast control platform video content screen capturing device
CN106713972A
Information processing method and device, electronic device and computer readable storage medium
CN111629261A