CN110163835B - Method, device, equipment and computer readable storage medium for detecting screenshot - Google Patents

Method, device, equipment and computer readable storage medium for detecting screenshot Download PDF

Info

Publication number
CN110163835B
CN110163835B CN201810717204.5A CN201810717204A CN110163835B CN 110163835 B CN110163835 B CN 110163835B CN 201810717204 A CN201810717204 A CN 201810717204A CN 110163835 B CN110163835 B CN 110163835B
Authority
CN
China
Prior art keywords
screenshot
information
information entropy
sample
live broadcast
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810717204.5A
Other languages
Chinese (zh)
Other versions
CN110163835A (en
Inventor
谢金运
王超
伍倡辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810717204.5A priority Critical patent/CN110163835B/en
Publication of CN110163835A publication Critical patent/CN110163835A/en
Application granted granted Critical
Publication of CN110163835B publication Critical patent/CN110163835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

The embodiment of the invention discloses a method, a device, equipment and a computer-readable storage medium for detecting screenshot. The method comprises the following steps: obtaining a screenshot to be detected; acquiring pixel values of all pixel points in a target channel of the screenshot; acquiring the information quantity of the screenshot according to the pixel values of the pixel points; and detecting whether the screenshot is damaged or not based on the information quantity of the screenshot, and obtaining a detection result. The information quantity of the screenshot can reflect the quantity of colors, so that whether the screenshot is damaged or not is detected through the information quantity of the screenshot after the screenshot to be detected is obtained, the robustness is good, and the accuracy of a detection result can be improved.

Description

Method, device, equipment and computer readable storage medium for detecting screenshot
Technical Field
The embodiment of the invention relates to the technical field of Internet, in particular to a method, a device, equipment and a computer readable storage medium for detecting screenshot.
Background
With the development of internet technology, the variety of application programs based on the internet is increasing, and live broadcast application is one of the popular types. In live applications, screen shots in live video are often used as covers of a live room in order to enable users to have a preliminary knowledge of the live content. If the screenshot is damaged, the content of the live broadcast room cannot be expressed, so how to detect whether the screenshot is damaged becomes a key for affecting the live broadcast experience.
When the related technology detects the screenshot, the screenshot with less colors is directly determined as the damaged screenshot in consideration of the fact that the screenshot is monotonous in general color when damaged, for example, the damaged screenshot is a pure green picture.
However, in the above detection method, the number of colors is still relatively large, so that the number of colors cannot be used as a standard for judging the damage of the screenshot, for example, when the screen is damaged, a black picture is used as a background, and the accuracy of the detection method provided by the related art is not high.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a computer readable storage medium for detecting screenshot, which can be used for solving the problems in the related technology. The technical scheme is as follows:
in one aspect, an embodiment of the present invention provides a method for detecting a screenshot, where the method includes:
obtaining a screenshot to be detected;
acquiring pixel values of all pixel points in a target channel of the screenshot;
acquiring the information quantity of the screenshot according to the pixel values of the pixel points;
and detecting whether the screenshot is damaged or not based on the information quantity of the screenshot, and obtaining a detection result.
In one aspect, an apparatus for detecting a screenshot is provided, including:
the first acquisition module is used for acquiring a screenshot to be detected;
the second acquisition module is used for acquiring pixel values of all pixel points in the target channel of the screenshot;
the third acquisition module is used for acquiring the information quantity of the screenshot according to the pixel values of the pixel points;
and the detection module is used for detecting whether the screenshot is damaged based on the information quantity of the screenshot, and obtaining a detection result.
In one aspect, a computer device is provided, the computer device comprising a processor and a memory, the memory storing at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions, when executed by the processor, implement the method of detecting a screenshot as described above.
In one aspect, a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions that when executed implement the method of detecting a screenshot described above is provided.
The technical scheme provided by the embodiment of the invention can bring the following beneficial effects:
the information quantity of the screenshot can reflect the quantity of colors, so that after the screenshot to be detected is obtained, whether the screenshot is damaged or not is detected based on the information quantity of the screenshot by obtaining the information quantity of the screenshot, the method has good robustness, and the accuracy of a detection result can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of an implementation environment provided by an embodiment of the present invention;
FIG. 2 is a schematic diagram of a damaged screenshot provided by an embodiment of the invention;
FIG. 3 is a flowchart of a method for detecting a screenshot according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a learning process of an information entropy classifier according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a learning principle of a classifier according to an embodiment of the present invention;
fig. 6 is a schematic diagram of applying an information entropy classifier to a live scene according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a screenshot provided by an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a device for detecting a screenshot according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of a device for detecting a screenshot according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
With the development of internet technology, the variety of application programs depending on the internet is increasing, and live broadcast application is one of them. In live applications, screen shots in live video are often used as covers of a live room in order to enable users to have a preliminary knowledge of the live content. However, when the screenshot is damaged, the content of the live room cannot be expressed, and therefore, the embodiment of the invention provides a method for detecting the screenshot. Before describing in detail the method provided by the embodiment of the present invention, an implementation environment of the method will be described first. Referring to fig. 1, a schematic diagram of an implementation environment provided by an embodiment of the present invention is shown. The implementation environment may include: a terminal 11 and a server 12.
The terminal 11 is installed with an application client, for example, a live application client or the like. When the application client is started, various resources and data of live broadcast can be obtained from the server 12 through the terminal 11, wherein the resources include but are not limited to material resources required by the live broadcast process, such as ornament data of a live broadcast room and the like. In addition, the terminal 11 may also acquire the peer data from the server 12. Whether the material is required in the live broadcast process or the opposite-end data, after the terminal 11 acquires the material, a live broadcast interface can be displayed accordingly, and live broadcast information can be displayed through the live broadcast interface.
The server 12 is configured to store material resources required for the live broadcast procedure, and transmit the material resources to the terminal 11 when the terminal 11 requests acquisition of the material resources.
The terminal 11 may be an electronic device such as a mobile phone, a tablet computer, a personal computer, or the like.
The server 12 may be a server, a server cluster comprising a plurality of servers, or a cloud computing service center.
The terminal 11 establishes a communication connection with the server 12 through a wired or wireless network.
To detect a corrupted screenshot, the related art generally employs one of two approaches. In the first mode, when the screenshot is damaged, the color is generally monotonous, for example, the damaged screenshot is a pure green picture, as shown in fig. 2. Traversing all pixels of the screenshot, and directly determining the screenshot with a small number of colors as a damaged screenshot. However, in the first mode, the screenshot condition of the black damage type cannot be covered, the black picture mainly takes the black picture as the background, and the color is displayed due to disorder in a small part of the area. Therefore, the accuracy of the detection method of the first embodiment is not high.
And in the second mode, when the live stream is decoded, a hook technology is used for detecting whether picture decoding fails or not by using the decoder API, and when the picture decoding failure is detected, screenshot damage is directly determined. However, in the second method, the damaged screenshot formed by the non-decoding failure cannot be filtered, such as the screenshot of the type "acquisition damage" in fig. 2, the screenshot generated by the damaged data stream is directly pushed by the acquisition end, and the problem of acquisition by the push end does not cause the cloud decoding failure, so that the API of the hook cannot sense the generation of the screenshot.
Through the analysis, it is easy to see that the first mode and the second mode have high probability that damaged screenshot cannot be filtered, and if the damaged screenshot is used as the cover of the live broadcast room, the experience of browsing rooms by users is affected, and loss is brought to live broadcast products. Therefore, the embodiment of the invention provides a method for detecting the screenshot, which is used for determining whether the screenshot is damaged by calculating the information quantity of the screenshot, and the information quantity of the screenshot can reflect the quantity of colors, so that after the screenshot to be detected is acquired, whether the screenshot is damaged is detected based on the information quantity of the screenshot, thereby not only having good robustness, but also being capable of improving the accuracy of a detection result.
Referring to fig. 3, a flowchart of a method for detecting a screenshot according to an embodiment of the present invention is shown, and the method may be applied to the terminal 11 in the implementation environment shown in fig. 1. As shown in fig. 3, the method provided by the embodiment of the present invention may include the following steps:
in step 301, a screenshot to be detected is obtained.
The method provided by the embodiment of the invention is applied to live broadcast application, so that the screenshot to be detected can be obtained from the live broadcast after the live broadcast stream is obtained. In an alternative embodiment, obtaining a screenshot to be detected includes: and acquiring the live stream, and capturing the acquired live stream to obtain a to-be-detected screenshot. When the obtained live stream is captured, the capturing may be performed at equal time intervals, for example, capturing a picture from the live stream every 10 seconds. In addition, after the live stream is obtained, the live stream may be decoded, for example, a decoding manner corresponding to the live stream encoding may be used for decoding, which is not limited in the embodiment of the present invention.
In step 302, pixel values of each pixel point in the target channel of the screenshot are obtained.
For this step, after decoding the live stream, a YUV screenshot may be obtained. Wherein "Y" represents brightness (Luminance or Luma), that is, a gray scale value; "U" and "V" denote Chroma (Chroma) to describe the image color and saturation for the color of the given pixel. The "brightness" is established through the RGB input signals by superimposing specific parts of the RGB signals together. "chroma" defines two aspects of color-hue and saturation, denoted by Cr and Cb, respectively. Wherein Cr reflects the difference between the red portion of the RGB input signal and the RGB signal luminance value. And Cb reflects the difference between the blue portion of the RGB input signal and the luminance value of the RGB signal. The importance of using the YUV color space is that its luminance signal Y and chrominance signal U, V are separate. If there is only a Y signal component and no U, V component, the image thus represented is a black and white gray image.
In the embodiment of the invention, any one of Y, U and V is taken as a target channel, and the information quantity of the screenshot is determined according to the target channel.
For example, taking the Y-channel rectangles in the cover shots shown in Table 1 below as examples, each small rectangle represents a pixel, and the number in the rectangle is the Y value of that pixel.
TABLE 1
25 14 22 11
135 223 76 58
39 55 97 42
44 11 8 245
The above is only exemplified by YUV, but may be implemented by RGB, and the principle is consistent, which is not limited to the embodiment of the present invention.
In step 303, the information amount of the screenshot is obtained according to the pixel value of each pixel point.
After the pixel values of each pixel point of the target channel are obtained in step 302, obtaining the information of the screenshot according to the pixel values of each pixel point, including but not limited to counting the occurrence times of each pixel value according to the pixel values of each pixel point; determining the occurrence probability of each pixel value according to the occurrence times of each pixel value; and calculating the information entropy of the screenshot based on the occurrence probability of each pixel value, and taking the calculated result as the information quantity of the screenshot.
For example, taking table 1 as an example, traversing the Y-channel pixel points, counting the number of occurrences of each pixel value, and as shown in table 1, the pixel with a pixel value of 11 occurs 2 times; the probability of each pixel value being present is calculated by dividing the number of times the pixel value is present by the total number of pixels. As shown in table 1, the probability of a pixel value of 11 is 2/16. Substituting the calculated probability of occurrence of each pixel value into a calculation formula of the following information entropy to obtain the information entropy of the screenshot, namely the information quantity H (x).
Figure BDA0001717836990000061
As can be seen from the above formula, the definition of the information entropy is: if the variable x has N possible values, the occurrence probability of the ith is p (i), then the entropy of x is a weighted average (or expectation) of the entropy of each possible information. As can be seen from the formula, the more uniform the probability of N values of x, the larger the entropy of x and the larger the information quantity. The more uniformly the colors appear, the more colorful the photo, the more content can be presented, i.e., the greater the amount of information, from analogy to screenshot pixel values.
In step 304, whether the screenshot is damaged is detected based on the information amount of the screenshot, and a detection result is obtained.
After the information quantity of the screenshot is obtained, detecting whether the screenshot is damaged or not based on the information quantity of the screenshot to obtain a detection result, including but not limited to calling a trained information entropy filter to filter the information quantity of the screenshot, wherein the information entropy filter is used for filtering the information quantity of the screenshot according to a learned information entropy threshold value; and when the screenshot is filtered by the information entropy filter, obtaining a detection result that the screenshot is not damaged.
Further, in order to obtain the trained information entropy filter, the method provided by the embodiment of the invention further includes: obtaining a damaged screenshot sample and a normal screenshot sample; and calling an information entropy engine to respectively perform information entropy calculation on the damaged screenshot sample and the normal screenshot sample, and inputting the calculated information entropy into a classifier to perform information entropy threshold learning to obtain an information entropy filter.
The learning process of the information entropy filter may be as shown in fig. 4, where a series of labeled information entropy values may be obtained by continuously inputting a labeled damaged screenshot sample and a labeled normal screenshot sample to the information entropy engine. And inputting the information entropy values into a classifier learning module for learning to obtain an optimal information entropy filtering threshold value, thereby obtaining an information entropy filter for filtering the screenshot information according to the learned information entropy threshold value.
For easy understanding, taking a learning schematic diagram of the classifier as shown in fig. 5 as an example, the filtering principle of the information entropy filter provided by the embodiment of the invention is described. As shown in fig. 5, where the coordinate axes represent information entropy, X represents a damaged sample, and O represents a normal sample. A threshold line (dashed line in the figure) is set, the main function of which is to find a threshold on the entropy axis to separate the samples of the corrupted screenshot from the normal screenshot. Here, assuming that the penalty factor of the error of one X of the threshold line is a, the penalty factor of the error of m is totally divided, the penalty factor of the error of one O is b, and the penalty factor of the error of n is totally divided, the penalty factor of the error of the threshold line is y=a×m+b×n. The learning process of the classifier is to continuously adjust the threshold line so that the smaller y is, the better. In this process, a can be increased and b can be decreased, so that the threshold line is more inclined to the right, the possibility of error X is reduced as much as possible, and the possibility of picture damage caused by leakage is reduced, and vice versa.
Through the learning process, the information entropy engine and the filtering threshold are combined to form the information entropy filter. When the information entropy filter is applied to a live broadcast scene, the terminal pulls real-time live broadcast stream data from the live broadcast server, then the cut picture data is input into the information entropy filter for filtering, and the screenshot which can pass through is used as a cover of a live broadcast room and displayed by the terminal.
It should be noted that, as an alternative implementation manner, the above screenshot detection method may be implemented by a server in addition to the terminal. When the screenshot is detected by the server, the server can send the detected screenshot to the terminal for display after the screenshot is detected. As shown in fig. 6. The screenshot server pulls real-time live stream data from the live broadcast server, then the captured picture data is input into the information entropy filter for filtering, and the screenshots which can pass through the screenshot server can be used as covers of live broadcast rooms to be sent to the terminal for displaying.
The method provided by the embodiment of the invention can be applied to a conventional live broadcast scene and is mainly used as a cover of a live broadcast room. In addition, on the basis of the screenshot, information such as a main broadcasting name, a room title, popularity and the like can be matched for display. As shown in FIG. 7, by adding the information such as the name of the anchor, the title of the room, the popularity, etc. to the screenshot, the live interface is more visual, the content is better and richer, and the user experience is further improved. For example, when the terminal detects the screenshot, if the screenshot passes the detection, the terminal displays the screenshot together with information such as the name of the anchor, the title of the room, the popularity of the person and the like. For example, when the server detects the screenshot, the screenshot is sent to the terminal, and the terminal displays the screenshot together with information such as the name of the anchor, the title of the room, the popularity of the person, and the like.
According to the method provided by the embodiment of the invention, the information quantity of the screenshot can reflect the quantity of the color, so that after the screenshot to be detected is obtained, whether the screenshot is damaged or not is detected based on the information quantity of the screenshot by obtaining the information quantity of the screenshot, the robustness is good, and the accuracy of a detection result can be improved.
Based on the same concept as the method, referring to fig. 8, an embodiment of the present invention provides a device for detecting a screenshot, which is used for executing the method for detecting a screenshot. The device comprises:
a first obtaining module 801, configured to obtain a screenshot to be detected;
a second obtaining module 802, configured to obtain pixel values of each pixel point in the target channel of the screenshot;
a third obtaining module 803, configured to obtain the information amount of the screenshot according to the pixel values of the respective pixel points;
and the detection module 804 is configured to detect whether the screenshot is damaged based on the information amount of the screenshot, and obtain a detection result.
In an alternative embodiment, the third obtaining module 803 is configured to count the number of occurrences of each pixel value according to the pixel value of each pixel point; determining the occurrence probability of each pixel value according to the occurrence times of each pixel value; and calculating the information entropy of the screenshot based on the occurrence probability of each pixel value, and taking the calculated result as the information quantity of the screenshot.
In an alternative embodiment, the detection module 804 is configured to invoke a trained information entropy filter to filter the information content of the screenshot, where the information entropy filter is configured to filter the information content of the screenshot according to the learned information entropy threshold; and when the screenshot is filtered by the information entropy filter, obtaining a detection result that the screenshot is not damaged.
Referring to fig. 9, the apparatus further includes:
a fourth obtaining module 805, configured to obtain a damaged screenshot sample and a normal screenshot sample; and calling an information entropy engine to respectively perform information entropy calculation on the damaged screenshot sample and the normal screenshot sample, and inputting the calculated information entropy into a classifier to perform information entropy threshold learning to obtain an information entropy filter.
In an alternative embodiment, the first obtaining module 801 is configured to obtain a live stream, and decode the obtained live stream to obtain a screenshot to be detected.
The information quantity of the screenshot can reflect the quantity of colors, so that after the screenshot to be detected is obtained, whether the screenshot is damaged or not is detected based on the information quantity of the screenshot by obtaining the information quantity of the screenshot, the method has good robustness, and the accuracy of a detection result can be improved.
It should be noted that, when the apparatus provided in the foregoing embodiment performs the functions thereof, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to perform all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the apparatus and the method embodiments are detailed in the method embodiments and are not repeated herein.
Fig. 10 shows a block diagram of a terminal 1000 according to an exemplary embodiment of the present invention. The terminal 1000 can be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Terminal 1000 can also be referred to by other names of user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, terminal 1000 can include: a processor 1001 and a memory 1002.
The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 1001 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 1001 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1001 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 1001 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. Memory 1002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1002 is used to store at least one instruction for execution by processor 1001 to implement the method of detecting a screenshot provided by a method embodiment in the present application.
In some embodiments, terminal 1000 can optionally further include: a peripheral interface 1003, and at least one peripheral. The processor 1001, the memory 1002, and the peripheral interface 1003 may be connected by a bus or signal line. The various peripheral devices may be connected to the peripheral device interface 1003 via a bus, signal wire, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1004, touch display 1005, camera 1006, audio circuitry 1007, positioning component 1008, and power supply 1009.
Peripheral interface 1003 may be used to connect I/O (Input/Output) related at least one peripheral to processor 1001 and memory 1002. In some embodiments, processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 1001, memory 1002, and peripheral interface 1003 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
Radio Frequency circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. Radio frequency circuitry 1004 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 1004 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. Radio frequency circuitry 1004 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 1004 may also include NFC (Near Field Communication ) related circuitry, which is not limited in this application.
The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 1005 is a touch screen, the display 1005 also has the ability to capture touch signals at or above the surface of the display 1005. The touch signal may be input to the processor 1001 as a control signal for processing. At this time, the display 1005 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, display 1005 may be one, providing a front panel of terminal 1000; in other embodiments, display 1005 may be provided in at least two, separately provided on different surfaces of terminal 1000 or in a folded configuration; in still other embodiments, display 1005 may be a flexible display disposed on a curved surface or a folded surface of terminal 1000. Even more, the display 1005 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display 1005 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 1006 is used to capture images or video. Optionally, camera assembly 1006 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 1006 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 1007 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 1001 for processing, or inputting the electric signals to the radio frequency circuit 1004 for voice communication. For purposes of stereo acquisition or noise reduction, the microphone may be multiple, each located at a different portion of terminal 1000. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, audio circuit 1007 may also include a headphone jack.
The location component 1008 is used to locate the current geographic location of terminal 1000 to enable navigation or LBS (Location Based Service, location-based services). The positioning component 1008 may be a positioning component based on the united states GPS (Global Positioning System ), the beidou system of china, the grainer system of russia, or the galileo system of the european union.
Power supply 1009 is used to power the various components in terminal 1000. The power source 1009 may be alternating current, direct current, disposable battery or rechargeable battery. When the power source 1009 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1000 can further include one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: acceleration sensor 1011, gyroscope sensor 1012, pressure sensor 1013, fingerprint sensor 1014, optical sensor 1015, and proximity sensor 1016.
Acceleration sensor 1010 can detect the magnitude of acceleration in three coordinate axes of a coordinate system established with terminal 1000. For example, the acceleration sensor 1011 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 1001 may control the touch display 1005 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal acquired by the acceleration sensor 1011. The acceleration sensor 1011 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 1012 may detect the body direction and the rotation angle of the terminal 1000, and the gyro sensor 1012 may collect the 3D motion of the user to the terminal 1000 in cooperation with the acceleration sensor 1011. The processor 1001 may implement the following functions according to the data collected by the gyro sensor 1012: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
Pressure sensor 1013 may be disposed on a side frame of terminal 1000 and/or on an underlying layer of touch display 1005. When the pressure sensor 1013 is provided at a side frame of the terminal 1000, a grip signal of the terminal 1000 by a user can be detected, and the processor 1001 performs right-and-left hand recognition or quick operation according to the grip signal collected by the pressure sensor 1013. When the pressure sensor 1013 is provided at the lower layer of the touch display 1005, the processor 1001 controls the operability control on the UI interface according to the pressure operation of the user on the touch display 1005. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 1014 is used to collect a fingerprint of the user, and the processor 1001 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 1014, or the fingerprint sensor 1014 identifies the identity of the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 1001 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. Fingerprint sensor 1014 may be provided on the front, back or side of terminal 1000. When a physical key or vendor Logo is provided on terminal 1000, fingerprint sensor 1014 may be integrated with the physical key or vendor Logo.
The optical sensor 1015 is used to collect ambient light intensity. In one embodiment, the processor 1001 may control the display brightness of the touch display 1005 based on the ambient light intensity collected by the optical sensor 1015. Specifically, when the intensity of the ambient light is high, the display brightness of the touch display screen 1005 is turned up; when the ambient light intensity is low, the display brightness of the touch display screen 1005 is turned down. In another embodiment, the processor 1001 may dynamically adjust the shooting parameters of the camera module 1006 according to the ambient light intensity collected by the optical sensor 1015.
Proximity sensor 1016, also referred to as a distance sensor, is typically located on the front panel of terminal 1000. Proximity sensor 1016 is used to collect the distance between the user and the front of terminal 1000. In one embodiment, when proximity sensor 1016 detects a gradual decrease in the distance between the user and the front face of terminal 1000, processor 1001 controls touch display 1005 to switch from the bright screen state to the off screen state; when proximity sensor 1016 detects a gradual increase in the distance between the user and the front face of terminal 1000, processor 1001 controls touch display 1005 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 10 is not limiting and that terminal 1000 can include more or fewer components than shown, or certain components can be combined, or a different arrangement of components can be employed.
Fig. 11 is a schematic structural diagram of a device for detecting a screenshot, where the device may be a server, and the server may be a separate server or a cluster server. Specifically, the present invention relates to a method for manufacturing a semiconductor device.
The server includes a Central Processing Unit (CPU) 1101, a system memory 1104 of a Random Access Memory (RAM) 1102 and a Read Only Memory (ROM) 1103, and a system bus 1105 connecting the system memory 1104 and the central processing unit 1101. The server also includes a basic input/output system (I/O system) 1106, which helps to transfer information between various devices within the computer, and a mass storage device 1107 for storing an operating system 1113, application programs 1114, and other program modules 1115.
The basic input/output system 1106 includes a display 1108 for displaying information and an input device 1109, such as a mouse, keyboard, or the like, for user input of information. Wherein both the display 1108 and the input device 1109 are coupled to the central processing unit 1101 through an input-output controller 1110 coupled to the system bus 1105. The basic input/output system 1106 may also include an input/output controller 1110 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input output controller 1110 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 1107 is connected to the central processing unit 1101 through a mass storage controller (not shown) connected to the system bus 1105. Mass storage device 1107 and its associated computer-readable media provide non-volatile storage for the server. That is, mass storage device 1107 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
Computer readable media may include computer storage media and communication media without loss of generality. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will recognize that computer storage media are not limited to the ones described above. The system memory 1104 and mass storage device 1107 described above may be collectively referred to as memory.
According to various embodiments of the invention, the server may also operate by being connected to a remote computer on a network, such as the Internet. I.e., the server may connect to the network 1112 through a network interface unit 1111 connected to the system bus 1105, or other types of networks or remote computer systems (not shown) may be connected to using the network interface unit 1111.
The memory also includes one or more programs, one or more programs stored in the memory and configured to be executed by the CPU. The one or more programs include instructions for performing the methods of detecting screenshots provided by embodiments of the invention.
In an example embodiment, there is also provided a computer device including a processor and a memory having at least one instruction, at least one program, set of codes, or set of instructions stored therein. The at least one instruction, at least one program, set of codes, or set of instructions are configured to be executed by one or more processors to implement the method of detecting a screenshot described above.
In an exemplary embodiment, a computer readable storage medium is also provided, in which at least one instruction, at least one program, a set of codes or a set of instructions is stored, which, when executed by a processor of a computer device, implements the above-described method of detecting a screenshot.
Alternatively, the above-described computer-readable storage medium may be a ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, or the like.
It should be understood that references herein to "a plurality" are to two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The foregoing description of the exemplary embodiments of the invention is not intended to limit the invention to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

Claims (6)

1. A method of detecting a screenshot, the method being applied to a live scene, the method comprising:
acquiring a live stream, decoding the live stream, and capturing a screenshot of the decoded live stream according to a fixed time interval to obtain a screenshot to be detected;
acquiring pixel values of all pixel points in a target channel of the screenshot;
acquiring the information quantity of the screenshot according to the pixel values of the pixel points;
obtaining a damaged screenshot sample and a normal screenshot sample with labels; calling an information entropy engine to respectively perform information entropy calculation on the marked damaged screenshot sample and the normal screenshot sample, and inputting the calculated marked information entropy into a classifier to perform information entropy threshold learning to obtain an information entropy filter; the information entropy threshold learned by the classifier is used for separating the damaged screenshot sample from the normal screenshot sample, the information entropy threshold is a threshold with a punishment score meeting requirements, the punishment score is obtained by the sum of a first score and a second score, the first score is the product of the punishment factor and the quantity of the damaged screenshot sample, and the second score is the product of the punishment factor and the quantity of the normal screenshot sample;
invoking the information entropy filter to filter the information quantity of the screenshot, wherein the information entropy filter is used for filtering the information quantity of the screenshot according to the learned information entropy threshold value;
when the screenshot is filtered by the information entropy filter, live broadcast information is added in the screenshot, the screenshot added with the live broadcast information is used as a cover picture of the live broadcast, and the live broadcast information comprises at least one of main broadcast information, a name of a live broadcast room and heat of the live broadcast room.
2. The method according to claim 1, wherein the obtaining the information amount of the screenshot according to the pixel values of the respective pixels includes:
counting the occurrence times of each pixel value according to the pixel value of each pixel point;
determining the occurrence probability of each pixel value according to the occurrence times of each pixel value;
and calculating the information entropy of the screenshot based on the occurrence probability of each pixel value, and taking the calculated result as the information quantity of the screenshot.
3. An apparatus for detecting a screenshot, the apparatus being applied to a live scene, the apparatus comprising:
the first acquisition module is used for acquiring a live broadcast stream, decoding the live broadcast stream, and capturing a screenshot of the decoded live broadcast stream according to a fixed time interval to obtain a screenshot to be detected;
the second acquisition module is used for acquiring pixel values of all pixel points in the target channel of the screenshot;
the third acquisition module is used for acquiring the information quantity of the screenshot according to the pixel values of the pixel points;
the fourth acquisition module is used for acquiring a damaged screenshot sample and a normal screenshot sample with labels; calling an information entropy engine to respectively perform information entropy calculation on the marked damaged screenshot sample and the normal screenshot sample, and inputting the calculated marked information entropy into a classifier to perform information entropy threshold learning to obtain an information entropy filter; the information entropy threshold learned by the classifier is used for separating the damaged screenshot sample from the normal screenshot sample, the information entropy threshold is a threshold with a punishment score meeting requirements, the punishment score is obtained by the sum of a first score and a second score, the first score is the product of the punishment factor and the quantity of the damaged screenshot sample, and the second score is the product of the punishment factor and the quantity of the normal screenshot sample;
the detection module is used for calling the information entropy filter to filter the information quantity of the screenshot, and the information entropy filter is used for filtering the information quantity of the screenshot according to the learned information entropy threshold value;
and the adding module is used for adding live broadcast information into the screenshot when the screenshot passes through the filtering of the information entropy filter, taking the screenshot added with the live broadcast information as a cover picture of the live broadcast, wherein the live broadcast information comprises at least one of main broadcasting information, a name of a live broadcasting room and heat of the live broadcasting room.
4. The apparatus of claim 3, wherein the third obtaining module is configured to count a number of occurrences of each pixel value according to the pixel value of each pixel point; determining the occurrence probability of each pixel value according to the occurrence times of each pixel value; and calculating the information entropy of the screenshot based on the occurrence probability of each pixel value, and taking the calculated result as the information quantity of the screenshot.
5. A computer device comprising a processor and a memory having stored therein at least one instruction, at least one program, code set, or instruction set that when executed by the processor implements a method of detecting a screenshot as claimed in any one of claims 1 or 2.
6. A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or instruction set that when executed implement the method of detecting a screenshot according to any one of claims 1 or 2.
CN201810717204.5A 2018-07-03 2018-07-03 Method, device, equipment and computer readable storage medium for detecting screenshot Active CN110163835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810717204.5A CN110163835B (en) 2018-07-03 2018-07-03 Method, device, equipment and computer readable storage medium for detecting screenshot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810717204.5A CN110163835B (en) 2018-07-03 2018-07-03 Method, device, equipment and computer readable storage medium for detecting screenshot

Publications (2)

Publication Number Publication Date
CN110163835A CN110163835A (en) 2019-08-23
CN110163835B true CN110163835B (en) 2023-06-16

Family

ID=67644999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810717204.5A Active CN110163835B (en) 2018-07-03 2018-07-03 Method, device, equipment and computer readable storage medium for detecting screenshot

Country Status (1)

Country Link
CN (1) CN110163835B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111311697B (en) * 2020-03-19 2023-11-17 北京搜狐新媒体信息技术有限公司 Picture color richness detection method and related device
CN113449783B (en) * 2021-06-17 2022-11-08 广州大学 Countermeasure sample generation method, system, computer device and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9336381B1 (en) * 2013-04-08 2016-05-10 Amazon Technologies, Inc. Entropy-based detection of sensitive information in code

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169585A (en) * 2011-03-31 2011-08-31 汉王科技股份有限公司 Method and device for detecting image color cast
CN102938069A (en) * 2012-06-13 2013-02-20 北京师范大学 Pure and mixed pixel automatic classification method based on information entropy
KR102247052B1 (en) * 2014-07-21 2021-04-30 삼성전자주식회사 Method and device to detect abnormal state of battery
CN106373125B (en) * 2016-09-30 2018-10-19 杭州电子科技大学 A kind of snow noise detection method based on comentropy
CN108171060A (en) * 2017-12-29 2018-06-15 哈尔滨安天科技股份有限公司 Method, system and the storage medium of encryption deformation script are identified based on comentropy

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9336381B1 (en) * 2013-04-08 2016-05-10 Amazon Technologies, Inc. Entropy-based detection of sensitive information in code

Also Published As

Publication number Publication date
CN110163835A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
CN110502954B (en) Video analysis method and device
CN108174275B (en) Image display method and device and computer readable storage medium
CN110493626B (en) Video data processing method and device
CN109117635B (en) Virus detection method and device for application program, computer equipment and storage medium
CN110839128B (en) Photographing behavior detection method and device and storage medium
CN111753784A (en) Video special effect processing method and device, terminal and storage medium
US11386586B2 (en) Method and electronic device for adding virtual item
CN110290426B (en) Method, device and equipment for displaying resources and storage medium
CN110933334B (en) Video noise reduction method, device, terminal and storage medium
CN111754386B (en) Image area shielding method, device, equipment and storage medium
CN112084811A (en) Identity information determining method and device and storage medium
CN111083513B (en) Live broadcast picture processing method and device, terminal and computer readable storage medium
CN112565806A (en) Virtual gift presenting method, device, computer equipment and medium
CN110163835B (en) Method, device, equipment and computer readable storage medium for detecting screenshot
CN111586444A (en) Video processing method and device, electronic equipment and storage medium
CN111586279B (en) Method, device and equipment for determining shooting state and storage medium
WO2022033272A1 (en) Image processing method and electronic device
CN111860064B (en) Video-based target detection method, device, equipment and storage medium
CN112235650A (en) Video processing method, device, terminal and storage medium
CN111901679A (en) Method and device for determining cover image, computer equipment and readable storage medium
CN111369434B (en) Method, device, equipment and storage medium for generating spliced video covers
CN109040753B (en) Prediction mode selection method, device and storage medium
CN112950535A (en) Video processing method and device, electronic equipment and storage medium
CN111464829A (en) Method, device and equipment for switching media data and storage medium
CN113763486B (en) Dominant hue extraction method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant