WO2021143273A1 - 直播流采样方法、装置及电子设备 - Google Patents

直播流采样方法、装置及电子设备 Download PDF

Info

Publication number
WO2021143273A1
WO2021143273A1 PCT/CN2020/124817 CN2020124817W WO2021143273A1 WO 2021143273 A1 WO2021143273 A1 WO 2021143273A1 CN 2020124817 W CN2020124817 W CN 2020124817W WO 2021143273 A1 WO2021143273 A1 WO 2021143273A1
Authority
WO
WIPO (PCT)
Prior art keywords
sampled
images
hash code
image
sampled image
Prior art date
Application number
PCT/CN2020/124817
Other languages
English (en)
French (fr)
Inventor
宗显子
何轶
陈扬羽
王鑫宇
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Priority to US17/624,217 priority Critical patent/US12020482B2/en
Publication of WO2021143273A1 publication Critical patent/WO2021143273A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/7715Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/48Matching video sequences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular, to a method, device and electronic equipment for sampling a live stream.
  • the video content of the live broadcast needs to be reviewed and checked for violations.
  • the live stream must be sampled.
  • the live stream is characterized by a very large amount of data and a very high requirement for efficiency.
  • Conventional uniform sampling based on the number of frames per second (Frames Per Second, referred to as FPS).
  • FPS Frames Per Second
  • the existing live stream sampling scheme has technical problems such as excessive data volume or excessive leakage.
  • the embodiments of the present disclosure provide a live stream sampling, which at least partially solves the problems existing in the prior art.
  • embodiments of the present disclosure provide a live stream sampling method, including:
  • Filter forward similar images from all the sampled images, where the forward similar image is a sampled image similar to the sampled image of the previous adjacent frame;
  • the remaining sampled images from all the sampled images excluding the forward similar images are used as the sampled images of the live stream.
  • the step of filtering forward similar images from all the sampled images includes:
  • the sampled image of each frame According to the hash code of the sampled image of each frame and the sampled image of the previous adjacent frame, it is determined whether the sampled image is a forward similar image.
  • the step of judging whether the sampled image is a forward similar image based on the hash code of the sampled image of each frame and the sampled image of the previous adjacent frame includes:
  • the Hamming distance is greater than or equal to the preset threshold, it is determined that the sampled image is not a forward similar image
  • the sampled image is a forward similar image.
  • the step of calculating the hash code of each frame of sampled image includes:
  • the step of calculating a preset type of parameter difference between each center point and all of its neighboring points as the hash code segment of the center point includes:
  • the pixel value comparison values of the center point and all the neighboring points are sequentially arranged to obtain the hash code segment of the center point.
  • the step of calculating the pixel value comparison between the center point and each neighboring point includes:
  • the pixel value comparison value of the center point and the area point is recorded as 0.
  • the step of determining the neighborhood point of each center point includes:
  • the step of calculating the hash code of each frame of sampled image includes:
  • the step of calculating the hash code of each frame of sampled image includes:
  • the step of calculating the hash code of the fixed-size sampled image includes:
  • all the hash code segments of the sampled images of the preset scale are sequentially arranged to obtain the hash code of the sampled image.
  • a live stream sampling device including:
  • Extraction module used to extract multiple frames of sampled images from the live stream
  • a filtering module configured to filter forward similar images from all the sampled images, where the forward similar images are sampled images similar to the sampled images of the previous adjacent frame;
  • the processing module is configured to use the remaining sampled images from all the sampled images with the forward similar images removed as the sampled images of the live stream.
  • embodiments of the present disclosure also provide an electronic device, which includes:
  • At least one processor and,
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the live broadcast in the foregoing first aspect or any implementation manner of the first aspect Stream sampling method.
  • the embodiments of the present disclosure also provide a non-transitory computer-readable storage medium that stores computer instructions, and the computer instructions are used to make the computer execute the first aspect or the first aspect described above.
  • a live stream sampling method in any implementation manner of one aspect.
  • the embodiments of the present disclosure also provide a computer program product.
  • the computer program product includes a computing program stored on a non-transitory computer-readable storage medium.
  • the computer program includes program instructions. When executing, the computer is caused to execute the live stream sampling method in the foregoing first aspect or any implementation manner of the first aspect.
  • the live stream sampling scheme in the embodiment of the present disclosure includes: extracting multiple frames of sampled images from the live stream; filtering forward similar images from all the sampled images, where the forward similar images are adjacent to the previous one A sampled image that is similar to the frame sampled image; and the remaining sampled images from all the sampled images except the forward similar images are used as the sampled images of the live stream.
  • FIG. 1 is a schematic flowchart of a method for sampling a live stream according to an embodiment of the disclosure
  • FIG. 2 is a schematic partial flowchart of another live stream sampling method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic partial flowchart of another live stream sampling method provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic diagram of neighborhood point selection involved in a live stream sampling method provided by an embodiment of the disclosure
  • FIG. 5 is a schematic structural diagram of a live stream sampling device provided by an embodiment of the disclosure.
  • FIG. 6 is a schematic diagram of an electronic device provided by an embodiment of the disclosure.
  • the embodiment of the present disclosure provides a method for sampling a live stream.
  • the live stream sampling method provided in this embodiment can be executed by a computing device, which can be implemented as software, or as a combination of software and hardware, and the computing device can be integrated in a server, terminal equipment, and the like.
  • a live stream sampling method provided by an embodiment of the present disclosure includes:
  • the live stream sampling method provided in this embodiment is used to extract frames of images in the live stream and audit the live video content to detect whether the video content is in violation of regulations.
  • the data volume of the live stream is very large.
  • a fixed FPS can be used for uniform sampling, and multiple frames of sampled images can be extracted from the live stream.
  • the data volume of the sampled image extracted at this time is also large.
  • samples are uniformly sampled to multiple frames of sampled images based on FPS.
  • the electronic device can first filter the extracted multi-frame sampled images to find out which sampled images are similar to other images.
  • a sampled image similar to the sampled image of the previous adjacent frame is defined as a forward similar image, and the electronic device filters out existing forward similar images from all the sampled images.
  • the similarity here can mean that the content is completely the same, or the content is relatively close but not completely the same.
  • the forward adjacent frame can also be an image with similar content in all adjacent frames in the previous sequence, or also The similar images can be reduced by filtering backward similar images, which is not limited.
  • the filtered forward similar images can be removed from all the sampled images, and the remaining sampled images are used as the live broadcast
  • the content of the live stream is reviewed based on the remaining sampled images of this part.
  • step S102 filtering forward similar images from all the sampled images may include:
  • the degree of similarity between images is determined based on the hash code of each frame of sampled image.
  • calculating the hash code of an image refers to the use of a hash algorithm to allow each sampled image in the same group of images to have a different hash code according to its own different characteristics, but it does not mean that the different object hash codes are completely different. different.
  • S203 Determine whether the sampled image is a forward similar image according to the hash code of the sampled image of each frame and the sampled image of the previous adjacent frame.
  • the hash code of each frame of sampled image from the second frame of sampled image can be compared with the previous adjacent frame of sampled image to determine this The similarity of the two images is used to determine whether the sampled image of the current frame is a forward similar image.
  • step S203 judging whether the sampled image is a forward similar image based on the hash code of each frame of sampled image and the previous adjacent frame of sampled image may include:
  • the Hamming distance is greater than or equal to the preset threshold, it is determined that the sampled image is not a forward similar image
  • the sampled image is a forward similar image.
  • the Hamming distance between the two image hash codes is calculated, and it is determined in turn whether the sampled image of the current frame is a forward similar image.
  • the Hamming distance refers to the number of different characters in the corresponding positions between two strings of equal length, that is, the number of characters that need to be replaced to transform one string into another string.
  • the set preset threshold is highly correlated with filtering requirements, the number of sampled images, or the number of selected points, and there is no specific numerical limitation.
  • step S201 calculating the hash code of each frame of sampled image may include:
  • the basis for calculating the hash code is the difference of the display parameters between the reference point and the surrounding pixels. After the center point is selected on the sampled image, the neighborhood point of each center point is determined.
  • the step of determining the neighborhood point of each center point may include:
  • the center point is located on the edge row and column of the sampled image, its neighboring point is the adjacent pixel point in the process of extending the center point to the inside of the sampled image.
  • the center point on the edge row and column usually has 5 neighboring points (as shown in Figure 4). As shown in A and a), or 3 neighborhood points (as shown in B and b in Figure 4).
  • the center point is located on a non-edge row and column on the sampled image, its neighboring point is the adjacent pixel point in the process of extending the center point to the surrounding.
  • the center point on the non-edge row and column usually has 8 domain points (as shown in Figure 4). C and c) etc. as shown.
  • S303 Calculate a preset type of parameter difference between each central point and all its neighboring points, and use it as a hash code segment of the central point;
  • the step of calculating a preset type of parameter difference between each central point and all its neighboring points as the hash code segment of the central point may include:
  • the pixel value comparison values of the center point and all the neighboring points are sequentially arranged to obtain the hash code segment of the center point.
  • step of calculating the pixel value comparison between the center point and each neighboring point includes:
  • the pixel value comparison value of the center point and the area point is recorded as 0.
  • S304 Combine all the hash code segments of the center point to obtain the hash code of the sample image.
  • the hash code corresponding to the sampled image can be obtained by combining.
  • the comparison effect when calculating the hash code, pre-appoint the selection parameters of the center point, the arrangement order of the pixel value comparison value of each neighboring point of the center point, and the arrangement order of the hash code segments corresponding to all the center points. In the case of consistent operation, the comparison effect is more accurate.
  • the step of calculating the hash code of each frame of the sampled image includes:
  • the hash code is calculated, which reduces the amount of redundant calculation caused by RGB parameters and simplifies the hash code calculation process.
  • step of calculating the hash code of each frame of sampled image may include:
  • step of calculating the hash code of the sampled image of the fixed size includes:
  • all the hash code segments of the sampled images of the preset scale are sequentially arranged to obtain the hash code of the sampled image.
  • the initial scale of each sampled image is transformed into a fixed size, and then the same scale transformation is added on the basis of the fixed size. In this way, the obtained hash code value is richer and more accurate, and the reference of the hash code comparison is higher. .
  • the hash code is calculated for a given sample image, and the calculation method is as follows:
  • the live stream sampling scheme in the embodiment of the present disclosure includes: extracting multiple frames of sampled images from the live stream; filtering forward similar images from all the sampled images, where the forward similar images are adjacent to the previous one A sampled image that is similar to the frame sampled image; and the remaining sampled images from all the sampled images except the forward similar images are used as the sampled images of the live stream.
  • an embodiment of the present disclosure also provides a live stream sampling device 50, including:
  • the extraction module 501 is used to extract multiple frames of sampled images from the live stream
  • the filtering module 502 is configured to filter forward similar images from all the sampled images, where the forward similar images are sampled images similar to the sampled images of the previous adjacent frame;
  • the processing module 503 is configured to use the remaining sampled images from all the sampled images with the forward similar images removed as the sampled images of the live stream.
  • the device shown in FIG. 5 can correspondingly execute the content in the foregoing method embodiment.
  • an electronic device 60 which includes:
  • At least one processor and,
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the live stream sampling method in the foregoing method embodiment.
  • the embodiments of the present disclosure also provide a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute the live stream sampling method in the foregoing method embodiment .
  • the embodiments of the present disclosure also provide a computer program product, the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, when the program instructions are executed by a computer, The computer executes the live stream sampling method in the foregoing method embodiment.
  • FIG. 6 shows a schematic structural diagram of an electronic device 60 suitable for implementing embodiments of the present disclosure.
  • the electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g. Mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG. 6 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 60 may include a processing device (such as a central processing unit, a graphics processor, etc.) 601, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 602 or from a storage device 608.
  • the program in the memory (RAM) 603 executes various appropriate actions and processing.
  • various programs and data required for the operation of the electronic device 60 are also stored.
  • the processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to the bus 604.
  • the following devices can be connected to the I/O interface 605: including input devices 606 such as touch screens, touch pads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; including, for example, liquid crystal displays (LCD), speakers, An output device 607 such as a vibrator; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609.
  • the communication device 609 may allow the electronic device 60 to perform wireless or wired communication with other devices to exchange data.
  • the figure shows the electronic device 60 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may be implemented alternatively or provided with more or fewer devices.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602.
  • the processing device 601 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the aforementioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
  • the foregoing computer-readable medium carries one or more programs, and when the foregoing one or more programs are executed by the electronic device, the electronic device can implement the solutions provided by the foregoing method embodiments.
  • the aforementioned computer-readable medium carries one or more programs, and when the aforementioned one or more programs are executed by the electronic device, the electronic device can implement the solutions provided by the aforementioned method embodiments.
  • the computer program code used to perform the operations of the present disclosure may be written in one or more programming languages or a combination thereof.
  • the above-mentioned programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logic function.
  • Executable instructions can also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure can be implemented in software or hardware. Wherein, the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
  • the first obtaining unit can also be described as "a unit for obtaining at least two Internet Protocol addresses.”

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

一种直播流采样方法、装置及电子设备,属于图像处理技术领域。该方法包括:从直播流中抽取多帧采样图像(S101);从全部所述采样图像中筛选出前向类似图像,其中,所述前向类似图像为与前一相邻帧采样图像类似的采样图像(S102);将全部采样图像中除去所述前向类似图像的剩余采样图像作为所述直播流的采样图像(S103)。该方法实现了在采用基于FPS的采样操作中有效剔除前向类似图像的方案,避免了漏放情况,且减少了采样审核的总工作量,提高了直播流采样的效率。

Description

直播流采样方法、装置及电子设备
相关申请的交叉引用
本申请基于申请号为202010060220.9、申请日为2020年01月19日,名称为“直播流采样方法、装置及电子设备”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及图像处理技术领域,尤其涉及一种直播流采样方法、装置及电子设备。
背景技术
在直播过程中,需要对直播的视频内容进行审核,检测是否违规。在审核过程中,要对直播流进行采样,直播流的特点一是数据量非常大,二是对效率要求非常高。常规的基于每秒传输帧数每秒传输帧数(Frames Per Second,简称FPS)的均匀采样,FPS过高时,会导致数据量过大,给审核增加压力,而FPS过低时,漏放的情况会比较多。
可见,现有的直播流采样方案存在数据量过大或者漏放情况较多的技术问题。
发明内容
有鉴于此,本公开实施例提供一种直播流采样,至少部分解决现有技术中存在的问题。
第一方面,本公开实施例提供了一种直播流采样方法,包括:
从直播流中抽取多帧采样图像;
从全部所述采样图像中筛选出前向类似图像,其中,所述前向类似图像 为与前一相邻帧采样图像类似的采样图像;
将全部采样图像中除去所述前向类似图像的剩余采样图像作为所述直播流的采样图像。
根据本公开实施例的一种具体实现方式,所述从全部所述采样图像中筛选出前向类似图像的步骤,包括:
计算每帧采样图像的哈希码;
获取每帧采样图像与前一相邻帧采样图像的哈希码;
依据每帧采样图像与前一相邻帧采样图像的哈希码,判断所述采样图像是否为前向类似图像。
根据本公开实施例的一种具体实现方式,所述依据每帧采样图像与前一相邻帧采样图像的哈希码,判断所述采样图像是否为前向类似图像的步骤,包括:
计算所述采样图像的哈希码与前一相邻帧采样图像的哈希码之间的汉明距离;
判断所述汉明距离是否大于或者等于预设阈值;
若所述汉明距离大于或者等于所述预设阈值,则判定所述采样图像不是前向类似图像;
若所述汉明距离小于所述预设阈值,则判定所述采样图像是前向类似图像。
根据本公开实施例的一种具体实现方式,所述计算每帧采样图像的哈希码的步骤,包括:
从所述采样图像中选择预设数量的中心点;
确定每个中心点的邻域点;
计算每个中心点与其全部邻域点之间的预设类型的参数差值,作为所述中心点的哈希码段;
将全部所述中心点的哈希码段组合得到所述采样图像的哈希码。
根据本公开实施例的一种具体实现方式,所述计算每个中心点与其全部 邻域点之间的预设类型的参数差值,作为所述中心点的哈希码段的步骤,包括:
计算所述中心点与每一邻域点的像素值对比值;
按照预设的排列顺序,依次排列所述中心点与全部所述邻域点的像素值对比值,得到所述中心点的哈希码段。
根据本公开实施例的一种具体实现方式,所述计算所述中心点与每一邻域点的像素值对比值的步骤,包括:
采集所述中心点与所述邻域点的像素值;
若所述中心点的像素值大于所述领域点的像素值,则将所述中心点与所述领域点的像素值对比值记录为1;
若所述中心点的像素值小于或者等于所述领域点的像素值,则将所述中心点与所述领域点的像素值对比值记录为0。
根据本公开实施例的一种具体实现方式,所述确定每个中心点的邻域点的步骤,包括:
确定在所述采样图像上与所述中心点邻接的全部像素点。
根据本公开实施例的一种具体实现方式,所述计算每帧采样图像的哈希码的步骤,包括:
对所述采样图像进行灰度处理;
计算经过灰度处理后的所述采样图像的哈希码。
根据本公开实施例的一种具体实现方式,所述计算每帧采样图像的哈希码的步骤,包括:
将所述采样图像进行尺度变换,获得固定尺寸的采样图像;
计算所述固定尺寸的采样图像的哈希码。
根据本公开实施例的一种具体实现方式,所述计算所述固定尺寸的采样图像的哈希码的步骤,包括:
将所述固定尺寸的采样图像进行尺度变换,获得至少两个不同预设尺度的采样图像;
获取每个预设尺度的采样图像的哈希码段;
按照预设的排列顺序,依次排列全部预设尺度的采样图像的哈希码段,得到所述采样图像的哈希码。
第二方面,本公开实施例提供了一种直播流采样装置,包括:
抽取模块,用于从直播流中抽取多帧采样图像;
筛选模块,用于从全部所述采样图像中筛选出前向类似图像,其中,所述前向类似图像为与前一相邻帧采样图像类似的采样图像;
处理模块,用于将全部采样图像中除去所述前向类似图像的剩余采样图像作为所述直播流的采样图像。
第三方面,本公开实施例还提供了一种电子设备,该电子设备包括:
至少一个处理器;以及,
与该至少一个处理器通信连接的存储器;其中,
该存储器存储有可被该至少一个处理器执行的指令,该指令被该至少一个处理器执行,以使该至少一个处理器能够执行前述第一方面或第一方面的任一实现方式中的直播流采样方法。
第四方面,本公开实施例还提供了一种非暂态计算机可读存储介质,该非暂态计算机可读存储介质存储计算机指令,该计算机指令用于使该计算机执行前述第一方面或第一方面的任一实现方式中的直播流采样方法。
第五方面,本公开实施例还提供了一种计算机程序产品,该计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,该计算机程序包括程序指令,当该程序指令被计算机执行时,使该计算机执行前述第一方面或第一方面的任一实现方式中的直播流采样方法。
本公开实施例中的直播流采样方案,包括:从直播流中抽取多帧采样图像;从全部所述采样图像中筛选出前向类似图像,其中,所述前向类似图像为与前一相邻帧采样图像类似的采样图像;将全部采样图像中除去所述前向类似图像的剩余采样图像作为所述直播流的采样图像。通过本公开的方案,实现了在采用高FPS的采样操作中有效剔除前向类似图像的方案,避免了漏放情况,且减少了采样审核的总工作量,提高了直播流采样的效率。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本公开实施例提供的一种直播流采样方法的流程示意图;
图2为本公开实施例提供的另一种直播流采样方法的部分流程示意图;
图3为本公开实施例提供的另一种直播流采样方法的部分流程示意图;
图4为本公开实施例提供的直播流采样方法所涉及的邻域点选取示意图;
图5为本公开实施例提供的一种直播流采样装置的结构示意图;
图6为本公开实施例提供的电子设备的示意图。
具体实施方式
下面结合附图对本公开实施例进行详细描述。
以下通过特定的具体实例说明本公开的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本公开的其他优点与功效。显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。本公开还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本公开的精神下进行各种修饰或改变。需说明的是,在不冲突的情况下,以下实施例及实施例中的特征可以相互组合。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
需要说明的是,下文描述在所附权利要求书的范围内的实施例的各种方面。应显而易见,本文中所描述的方面可体现于广泛多种形式中,且本文中所描述的任何特定结构及/或功能仅为说明性的。基于本公开,所属领域的技术人员应了解,本文中所描述的一个方面可与任何其它方面独立地实施,且可以各种方式组合这些方面中的两者或两者以上。举例来说,可使用本文中 所阐述的任何数目个方面来实施设备及/或实践方法。另外,可使用除了本文中所阐述的方面中的一或多者之外的其它结构及/或功能性实施此设备及/或实践此方法。
还需要说明的是,以下实施例中所提供的图示仅以示意方式说明本公开的基本构想,图式中仅显示与本公开中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。
另外,在以下描述中,提供具体细节是为了便于透彻理解实例。然而,所属领域的技术人员将理解,可在没有这些特定细节的情况下实践所述方面。
本公开实施例提供一种直播流采样方法。本实施例提供的直播流采样方法可以由一计算装置来执行,该计算装置可以实现为软件,或者实现为软件和硬件的组合,该计算装置可以集成设置在服务器、终端设备等中。
参见图1,本公开实施例提供的一种直播流采样方法,包括:
S101,从直播流中抽取多帧采样图像;
本实施例提供的直播流采样方法,用于在直播流中抽帧图像,对直播的视频内容进行审核,以检测视频内容是否存在违规情况。直播流的数据量非常大,为保证较高的抽样效率,可以采用固定的FPS进行均匀采样,从直播流中抽取多帧采样图像。在FPS较高的情况下,此时抽取的采样图像的数据量也是较大的。
S102,从全部所述采样图像中筛选出前向类似图像,其中,所述前向类似图像为与前一相邻帧采样图像类似的采样图像;
在上述步骤中,基于FPS均匀采样到多帧采样图像。考虑到相邻的几帧图像的内容可能比较相似,若对全部采样图像均进行审核,就可能造成审核的工作量巨大,且存在重复审核的情况。电子设备可以先将所抽取的多帧采样图像进行筛选,找出来哪些采样图像与其他图像类似。将与前一相邻帧采样图像类似的采样图像定义为前向类似图像,电子设备从全部采样图像中筛选出存在的前向类似图像。需要说明的是,这里的类似可以为内容完全相同,也可以为内容比较接近但不完全相同的情况,前向邻接帧也可以为与前序全部邻接帧中存在内容类似的图像,或者,也可以通过筛选后向类似图像的方式来减少类似图像,不作限定。
S103,将全部采样图像中除去所述前向类似图像的剩余采样图像作为所述直播流的采样图像。
依据上述步骤从全部采样图像中筛选出与前一邻接帧图像类似的前向类似图像后,即可从全部采样图像中除去所筛选出的前向类似图像,将剩余的采样图像作为所述直播流的采样图像,依据该部分剩余的采样图像对直播流进行内容审核。
在一种具体实现方式,如图2所示,步骤S102所述的,从全部所述采样图像中筛选出前向类似图像,可以包括:
S201,计算每帧采样图像的哈希码;
本实施方式中,依据每帧采样图像的哈希码来判断图像之间的类似程度。其中,计算图像的哈希码是指利用哈希算法,让同一组图像中的每个采样图像按照自己不同的特征尽量的有不同的哈希码,但不表示不同的对象哈希码完全不同。
S202,获取每帧采样图像与前一相邻帧采样图像的哈希码;
S203,依据每帧采样图像与前一相邻帧采样图像的哈希码,判断所述采样图像是否为前向类似图像。
计算出全部采样图像中的每帧图像的哈希码之后,就可以将从第二帧采样图像起的每一帧采样图像与其前一相邻帧采样图像进行哈希码比对,以判断这两个图像的类似程度,进而判断当前帧的采样图像是否为前向类似图像。
具体实施时,步骤S203所述的,依据每帧采样图像与前一相邻帧采样图像的哈希码,判断所述采样图像是否为前向类似图像,可以包括:
计算所述采样图像的哈希码与前一相邻帧采样图像的哈希码之间的汉明距离;
判断所述汉明距离是否大于或者等于预设阈值;
若所述汉明距离大于或者等于所述预设阈值,则判定所述采样图像不是前向类似图像;
若所述汉明距离小于所述预设阈值,则判定所述采样图像是前向类似图像。
本实施方式中,在进行采样图像之间的哈希码比对时,计算两个图像哈希码之间的汉明距离,依次来判断当前帧的采样图像是否为前向类似图像。 其中,汉明距离是指两个等长字符串之间对应位置上的不同字符的个数,即是将一个字符串变换成另外一个字符串所需要替换的字符个数。通过计算两个采样图像的哈希码之间的汉明距离,就可以推算采样图像之间的类似程度。若汉明距离大于或者等于预设阈值,则表示二者之间的哈希码差别较大,当前帧的采样图像不是前向类似图像。若汉明距离小于预设阈值,则表示二者之间的哈希码差值较小,当前帧的采样图像是前向类似图像。需要说明的是,所设定的预设阈值与过滤需求、采样图像的数量或者选择点数的关联性较大,不作具体数值的限定。
上述实施方式中,如图3所示,步骤S201所述的,计算每帧采样图像的哈希码,可以包括:
S301,从所述采样图像中选择预设数量的中心点;
在具体计算每帧采样图像的哈希码时,先从采样图像中选择预设数量的中心点,作为计算采样图像的哈希码的参考点。
S302,确定每个中心点的邻域点;
本实施方式中计算哈希码的依据是参考点与周围像素点之间的显示参数的差值,在采样图像上选择中心点后,再确定每个中心点的邻域点。
可选的,所述确定每个中心点的邻域点的步骤,可以包括:
确定在所述采样图像上与所述中心点邻接的全部像素点。
若中心点位于采样图像的边缘行列上,则其邻域点为中心点向采样图像内侧延伸过程中邻接的像素点,边缘行列上的中心点通常有5个邻域点(如图4中所示的A及a),或者3个邻域点(如图4中所示的B及b)。若中心点位于采样图像上的非边缘行列上,则其邻域点为中心点向周围延伸过程中邻接的像素点,非边缘行列上的中心点通常有8个领域点(如图4中所示的C及c)等。
S303,计算每个中心点与其全部邻域点之间的预设类型的参数差值,作为所述中心点的哈希码段;
在采样图像上选择多个中心点,先计算出每个中心点对应的哈希码段,主要是计算每个中心点与其全部邻域点之间的参数差值。
可选的,所述计算每个中心点与其全部邻域点之间的预设类型的参数差值,作为所述中心点的哈希码段的步骤,可以包括:
计算所述中心点与每一邻域点的像素值对比值;
按照预设的排列顺序,依次排列所述中心点与全部所述邻域点的像素值对比值,得到所述中心点的哈希码段。
进一步的,所述计算所述中心点与每一邻域点的像素值对比值的步骤,包括:
采集所述中心点与所述邻域点的像素值;
若所述中心点的像素值大于所述领域点的像素值,则将所述中心点与所述领域点的像素值对比值记录为1;
若所述中心点的像素值小于或者等于所述领域点的像素值,则将所述中心点与所述领域点的像素值对比值记录为0。
S304,将全部所述中心点的哈希码段组合得到所述采样图像的哈希码。
依据上述步骤获得每个中心点对应的哈希码段之后,组合即可得到该采样图像对应的哈希码。
为保证对比效果,在计算哈希码时,预先约定中心点的选择参数、中心点各邻域点的像素值对比值得排列顺序以及全部中心点对应的哈希码段的排列顺序,这样,在一致性操作的情况下,对比效果更准确。
此外,根据本公开实施例的另一种具体实现方式,所述计算每帧采样图像的哈希码的步骤,包括:
对所述采样图像进行灰度处理;
计算经过灰度处理后的所述采样图像的哈希码。
将采样图像经过灰度处理后再计算哈希码,减少RGB参数导致的多余的计算量,简化了哈希码计算过程。
另外,所述计算每帧采样图像的哈希码的步骤,可以包括:
将所述采样图像进行尺度变换,获得固定尺寸的采样图像;
计算所述固定尺寸的采样图像的哈希码。
进一步的,所述计算所述固定尺寸的采样图像的哈希码的步骤,包括:
将所述固定尺寸的采样图像进行尺度变换,获得至少两个不同预设尺度的采样图像;
获取每个预设尺度的采样图像的哈希码段;
按照预设的排列顺序,依次排列全部预设尺度的采样图像的哈希码段, 得到所述采样图像的哈希码。
将每个采样图像的初始尺度均变换为固定尺寸,再固定尺寸的基础上再增加同类的尺度变换,这样,得到的哈希码值更丰富和准确,哈希码对比的参考性就更高。
再具体使用时,针对给定的采样图片计算哈希码,计算方法如下:
首先,将给定的RGB图像转换为灰度图,再对给定的原始图片进行尺度变换,Resize到固定大小,可选择多个尺度A1、A2、A3等。尺度越多,计算出的哈希码越精确。
接着,分别针对上述步骤中得到的不同尺度的图片,选取适当的中心点Center_Point,一般为N*N个,例如4、9、16个等等,同时,选取适合大小的和数量的邻域点Neighbour_Points。
针对其每个中心点Center_Point,分别对比其邻域点与中心点像素值的大小,Center_Point>Neighbour_Points取1,Center_Point<=Neighbour_Points取0。
对于不同尺度的A1、A2、A3等重复这一过程,可以一串哈希码来代表给定的图片,得到一个代表该图像的向量值,例如v=【0001000】;
通过计算不同哈希吗的距离,来判断图片之间的相似度。
如图4所示,将原始图片Resize到8*8,选取(2,2)、(2,5)、(5,2)、(5,5)这四个中心点Center_Point,围绕每个Center_Point,选取其周围1pix的8个Neighbour_Points来分别计算hashcode,最终可以得到4*8=32的哈希码。
本公开实施例中的直播流采样方案,包括:从直播流中抽取多帧采样图像;从全部所述采样图像中筛选出前向类似图像,其中,所述前向类似图像为与前一相邻帧采样图像类似的采样图像;将全部采样图像中除去所述前向类似图像的剩余采样图像作为所述直播流的采样图像。通过本公开的方案,实现了在采用高FPS的采样操作中有效剔除前向类似图像的方案,避免了漏放情况,且减少了采样审核的总工作量,提高了直播流采样的效率。
与上面的方法实施例相对应,参见图5,本公开实施例还提供了一种直播流采样装置50,包括:
抽取模块501,用于从直播流中抽取多帧采样图像;
筛选模块502,用于从全部所述采样图像中筛选出前向类似图像,其中,所述前向类似图像为与前一相邻帧采样图像类似的采样图像;
处理模块503,用于将全部采样图像中除去所述前向类似图像的剩余采样图像作为所述直播流的采样图像。
图5所示装置可以对应的执行上述方法实施例中的内容,本实施例未详细描述的部分,参照上述方法实施例中记载的内容,在此不再赘述。
参见图6,本公开实施例还提供了一种电子设备60,该电子设备包括:
至少一个处理器;以及,
与该至少一个处理器通信连接的存储器;其中,
该存储器存储有可被该至少一个处理器执行的指令,该指令被该至少一个处理器执行,以使该至少一个处理器能够执行前述方法实施例中的直播流采样方法。
本公开实施例还提供了一种非暂态计算机可读存储介质,该非暂态计算机可读存储介质存储计算机指令,该计算机指令用于使该计算机执行前述方法实施例中的直播流采样方法。
本公开实施例还提供了一种计算机程序产品,该计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,该计算机程序包括程序指令,当该程序指令被计算机执行时,使该计算机执行前述方法实施例中的直播流采样方法。
下面参考图6,其示出了适于用来实现本公开实施例的电子设备60的结构示意图。本公开实施例中的电子设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图6示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图6所示,电子设备60可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备60操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入 /输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、图像传感器、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备60与其他设备进行无线或有线通信以交换数据。虽然图中示出了具有各种装置的电子设备60,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行***、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者 与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备能够实现上述方法实施例提供的方案。
或者,上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备能够实现上述方法实施例提供的方案。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
应当理解,本公开的各部分可以用硬件、软件、固件或它们的组合来实现。
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。

Claims (13)

  1. 一种直播流采样方法,其特征在于,包括:
    从直播流中抽取多帧采样图像;
    从全部所述采样图像中筛选出前向类似图像,其中,所述前向类似图像为与前一相邻帧采样图像类似的采样图像;
    将全部采样图像中除去所述前向类似图像的剩余采样图像作为所述直播流的采样图像。
  2. 根据权利要求1所述的方法,其特征在于,所述从全部所述采样图像中筛选出前向类似图像的步骤,包括:
    计算每帧采样图像的哈希码;
    获取每帧采样图像与前一相邻帧采样图像的哈希码;
    依据每帧采样图像与前一相邻帧采样图像的哈希码,判断所述采样图像是否为前向类似图像。
  3. 根据权利要求2所述的方法,其特征在于,所述依据每帧采样图像与前一相邻帧采样图像的哈希码,判断所述采样图像是否为前向类似图像的步骤,包括:
    计算所述采样图像的哈希码与前一相邻帧采样图像的哈希码之间的汉明距离;
    判断所述汉明距离是否大于或者等于预设阈值;
    若所述汉明距离大于或者等于所述预设阈值,则判定所述采样图像不是前向类似图像;
    若所述汉明距离小于所述预设阈值,则判定所述采样图像是前向类似图像。
  4. 根据权利要求3所述的方法,其特征在于,所述计算每帧采样图像的哈希码的步骤,包括:
    从所述采样图像中选择预设数量的中心点;
    确定每个中心点的邻域点;
    计算每个中心点与其全部邻域点之间的预设类型的参数差值,作为所述中心点的哈希码段;
    将全部所述中心点的哈希码段组合得到所述采样图像的哈希码。
  5. 根据权利要求4所述的方法,其特征在于,所述计算每个中心点与其全部邻域点之间的预设类型的参数差值,作为所述中心点的哈希码段的步骤,包括:
    计算所述中心点与每一邻域点的像素值对比值;
    按照预设的排列顺序,依次排列所述中心点与全部所述邻域点的像素值对比值,得到所述中心点的哈希码段。
  6. 根据权利要求5所述的方法,其特征在于,所述计算所述中心点与每一邻域点的像素值对比值的步骤,包括:
    采集所述中心点与所述邻域点的像素值;
    若所述中心点的像素值大于所述领域点的像素值,则将所述中心点与所述领域点的像素值对比值记录为1;
    若所述中心点的像素值小于或者等于所述领域点的像素值,则将所述中心点与所述领域点的像素值对比值记录为0。
  7. 根据权利要求4所述的方法,其特征在于,所述确定每个中心点的邻域点的步骤,包括:
    确定在所述采样图像上与所述中心点邻接的全部像素点。
  8. 根据权利要求2至7中任一项所所述的方法,其特征在于,所述计算每帧采样图像的哈希码的步骤,包括:
    对所述采样图像进行灰度处理;
    计算经过灰度处理后的所述采样图像的哈希码。
  9. 根据权利要求8所述的方法,其特征在于,所述计算每帧采样图像的哈希码的步骤,包括:
    将所述采样图像进行尺度变换,获得固定尺寸的采样图像;
    计算所述固定尺寸的采样图像的哈希码。
  10. 根据权利要求9所述的方法,其特征在于,所述计算所述固定尺寸的采样图像的哈希码的步骤,包括:
    将所述固定尺寸的采样图像进行尺度变换,获得至少两个不同预设尺度的采样图像;
    获取每个预设尺度的采样图像的哈希码段;
    按照预设的排列顺序,依次排列全部预设尺度的采样图像的哈希码段,得到所述采样图像的哈希码。
  11. 一种直播流采样装置,其特征在于,包括:
    抽取模块,用于从直播流中抽取多帧采样图像;
    筛选模块,用于从全部所述采样图像中筛选出前向类似图像,其中,所述前向类似图像为与前一相邻帧采样图像类似的采样图像;
    处理模块,用于将全部采样图像中除去所述前向类似图像的剩余采样图像作为所述直播流的采样图像。
  12. 一种电子设备,其特征在于,所述电子设备包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述权利要求1-10中任一项所述的直播流采样方法。
  13. 一种非暂态计算机可读存储介质,该非暂态计算机可读存储介质存储计算机指令,该计算机指令用于使该计算机执行前述权利要求1-10中任一项所述的直播流采样方法。
PCT/CN2020/124817 2020-01-19 2020-10-29 直播流采样方法、装置及电子设备 WO2021143273A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/624,217 US12020482B2 (en) 2020-01-19 2020-10-29 Live streaming sampling method and apparatus, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010060220.9 2020-01-19
CN202010060220.9A CN111325096B (zh) 2020-01-19 2020-01-19 直播流采样方法、装置及电子设备

Publications (1)

Publication Number Publication Date
WO2021143273A1 true WO2021143273A1 (zh) 2021-07-22

Family

ID=71167023

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124817 WO2021143273A1 (zh) 2020-01-19 2020-10-29 直播流采样方法、装置及电子设备

Country Status (2)

Country Link
CN (1) CN111325096B (zh)
WO (1) WO2021143273A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205632A (zh) * 2021-12-17 2022-03-18 深圳Tcl新技术有限公司 视频预览方法、装置、电子设备及计算机可读存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325096B (zh) * 2020-01-19 2021-04-20 北京字节跳动网络技术有限公司 直播流采样方法、装置及电子设备
CN112085097A (zh) * 2020-09-09 2020-12-15 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
CN114419018A (zh) * 2022-01-25 2022-04-29 重庆紫光华山智安科技有限公司 图像采样方法、***、设备及介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020181780A1 (en) * 2001-06-05 2002-12-05 Matrox Electronic Systems Ltd. Geometic hashing method for model-based recognition of an object
US20090080778A1 (en) * 2007-09-21 2009-03-26 Electronics & Telecommunications Research Institute Pattern recognition method and apparatus for data protection
CN101887457A (zh) * 2010-07-02 2010-11-17 杭州电子科技大学 基于内容的复制图像检测方法
CN105025392A (zh) * 2015-06-25 2015-11-04 西北工业大学 基于摘要空间特征学习的视频摘要关键帧提取方法
CN107145487A (zh) * 2016-03-01 2017-09-08 深圳中兴力维技术有限公司 图像搜索方法和装置
CN110472484A (zh) * 2019-07-02 2019-11-19 山东师范大学 基于多视图特征的视频关键帧提取方法、***及设备
CN110505495A (zh) * 2019-08-23 2019-11-26 北京达佳互联信息技术有限公司 多媒体资源抽帧方法、装置、服务器及存储介质
CN111325096A (zh) * 2020-01-19 2020-06-23 北京字节跳动网络技术有限公司 直播流采样方法、装置及电子设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107358141B (zh) * 2016-05-10 2020-10-23 阿里巴巴集团控股有限公司 数据识别的方法及装置
CN109670071B (zh) * 2018-10-22 2021-10-08 北京大学 一种序列化多特征指导的跨媒体哈希检索方法和***
CN110188223B (zh) * 2019-06-06 2022-10-04 腾讯科技(深圳)有限公司 图像处理方法、装置及计算机设备

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020181780A1 (en) * 2001-06-05 2002-12-05 Matrox Electronic Systems Ltd. Geometic hashing method for model-based recognition of an object
US20090080778A1 (en) * 2007-09-21 2009-03-26 Electronics & Telecommunications Research Institute Pattern recognition method and apparatus for data protection
CN101887457A (zh) * 2010-07-02 2010-11-17 杭州电子科技大学 基于内容的复制图像检测方法
CN105025392A (zh) * 2015-06-25 2015-11-04 西北工业大学 基于摘要空间特征学习的视频摘要关键帧提取方法
CN107145487A (zh) * 2016-03-01 2017-09-08 深圳中兴力维技术有限公司 图像搜索方法和装置
CN110472484A (zh) * 2019-07-02 2019-11-19 山东师范大学 基于多视图特征的视频关键帧提取方法、***及设备
CN110505495A (zh) * 2019-08-23 2019-11-26 北京达佳互联信息技术有限公司 多媒体资源抽帧方法、装置、服务器及存储介质
CN111325096A (zh) * 2020-01-19 2020-06-23 北京字节跳动网络技术有限公司 直播流采样方法、装置及电子设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205632A (zh) * 2021-12-17 2022-03-18 深圳Tcl新技术有限公司 视频预览方法、装置、电子设备及计算机可读存储介质
WO2023109284A1 (zh) * 2021-12-17 2023-06-22 深圳Tcl新技术有限公司 视频预览方法、装置、电子设备以及计算机可读存储介质

Also Published As

Publication number Publication date
US20220383637A1 (en) 2022-12-01
CN111325096A (zh) 2020-06-23
CN111325096B (zh) 2021-04-20

Similar Documents

Publication Publication Date Title
WO2021143273A1 (zh) 直播流采样方法、装置及电子设备
CN109168026B (zh) 即时视频显示方法、装置、终端设备及存储介质
CN111445902B (zh) 数据收集方法、装置、存储介质及电子设备
WO2022105779A1 (zh) 图像处理方法、模型训练方法、装置、介质及设备
WO2021114979A1 (zh) 视频页面显示方法、装置、电子设备和计算机可读介质
WO2020244553A1 (zh) 字幕越界的处理方法、装置和电子设备
WO2020200173A1 (zh) 文档输入内容的处理方法、装置、电子设备和存储介质
WO2021197161A1 (zh) 图标更新方法、装置和电子设备
WO2023284437A1 (zh) 媒体文件处理方法、装置、设备、可读存储介质及产品
US20220394333A1 (en) Video processing method and apparatus, storage medium, and electronic device
CN110727566B (zh) 一种获取进程崩溃信息的方法、装置、介质和电子设备
CN112037223B (zh) 图像缺陷检测方法、装置及电子设备
WO2021135864A1 (zh) 图像处理方法及装置
CN111626921A (zh) 图片处理方法、装置及电子设备
CN112291121B (zh) 一种数据处理方法及相关设备
WO2021114981A1 (zh) 视频播放页面显示方法、装置、电子设备和介质
WO2020192246A1 (zh) 终端界面的显示控制方法、装置、存储介质及电子设备
CN111783632A (zh) 针对视频流的人脸检测方法、装置、电子设备及存储介质
US12020482B2 (en) Live streaming sampling method and apparatus, and electronic device
WO2021027597A1 (zh) 图像特效处理方法、装置、电子设备和计算机可读存储介质
CN111258582B (zh) 一种窗口渲染方法、装置、计算机设备及存储介质
CN113225488B (zh) 一种视频处理方法、装置、电子设备及存储介质
WO2021018176A1 (zh) 文字特效处理方法及装置
WO2021004171A1 (zh) 水波纹图像实现方法及装置
WO2021018179A1 (zh) 文字特效处理方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20914364

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20914364

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13.02.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20914364

Country of ref document: EP

Kind code of ref document: A1