CN113674246B - Method, device, electronic equipment and storage medium for auditing picture files - Google Patents

Method, device, electronic equipment and storage medium for auditing picture files Download PDF

Info

Publication number
CN113674246B
CN113674246B CN202110965015.1A CN202110965015A CN113674246B CN 113674246 B CN113674246 B CN 113674246B CN 202110965015 A CN202110965015 A CN 202110965015A CN 113674246 B CN113674246 B CN 113674246B
Authority
CN
China
Prior art keywords
picture file
checked
determining
file
image
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
CN202110965015.1A
Other languages
Chinese (zh)
Other versions
CN113674246A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110965015.1A priority Critical patent/CN113674246B/en
Publication of CN113674246A publication Critical patent/CN113674246A/en
Application granted granted Critical
Publication of CN113674246B publication Critical patent/CN113674246B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • 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/10016Video; Image sequence
    • 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/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Tourism & Hospitality (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Educational Administration (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a method, a device, electronic equipment and a storage medium for auditing a picture file, relates to the technical field of computers, in particular to the technical field of artificial intelligence, and can be applied to scenes such as multimedia information identification, multimedia information auditing and the like. The specific implementation scheme of the method for auditing the picture file is as follows: determining logic screen information of the picture file to be checked under the condition that the picture file to be checked is a dynamic picture file; the logic screen information comprises the height of a logic screen and the width of the logic screen; and determining whether the picture file to be checked is abnormal or not based on the logic screen information.

Description

Method, device, electronic equipment and storage medium for auditing picture files
Technical Field
The disclosure relates to the technical field of computers, in particular to the technical field of artificial intelligence, and can be applied to scenes such as multimedia information identification and multimedia information auditing.
Background
With the development of computer technology, the multimedia data is increasingly diversified in its form of embodiment. To facilitate the dissemination of information, consumer handheld terminals are often more compatible with multimedia data than desktop terminal devices. Whereas auditing of multimedia data is typically performed at a desktop terminal device. If the feature of the consumer handheld terminal that the compatibility to the multimedia data is stronger is used illegally by some specific users (for example, the specific users may modify the multimedia information by adopting features that cannot be audited but can be displayed on the consumer handheld terminal to add the abnormal data in the multimedia information), the abnormal data may be widely spread, and the social air is negatively affected.
Disclosure of Invention
Based on the above, the disclosure provides a method, a device, an electronic device and a storage medium for auditing picture files, which can improve auditing coverage and auditing accuracy.
According to one aspect of the present disclosure, there is provided a method of auditing a picture file, including: determining logic screen information of the picture file to be checked under the condition that the picture file to be checked is a dynamic picture file; the logic screen information comprises the height of a logic screen and the width of the logic screen; and determining whether the picture file to be checked is abnormal or not based on the logic screen information.
According to another aspect of the present disclosure, there is provided an apparatus for auditing a picture file, including: the logic screen information determining module is used for determining logic screen information of the picture file to be checked under the condition that the picture file to be checked is a dynamic picture file; the logic screen information comprises the height of a logic screen and the width of the logic screen; and the abnormality determining module is used for determining whether the picture file to be checked is abnormal or not based on the logic screen information.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of auditing a picture file provided by the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of auditing a picture file provided by the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of auditing a picture file provided by the present disclosure.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is an application scenario schematic diagram of a method and apparatus for auditing a picture file according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method of auditing a picture file according to an embodiment of the present disclosure;
FIG. 3 is a schematic illustration of a method of auditing a picture file according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of a method of auditing a picture file according to another embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an apparatus for auditing a picture file according to an embodiment of the present disclosure; and
fig. 6 is a block diagram of an electronic device for implementing a method of auditing picture files in accordance with an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The present disclosure provides a method of auditing a picture file, the method including a logical screen information determination stage and an anomaly determination stage. In the logic screen information determining stage, determining logic screen information of the picture file to be checked under the condition that the picture file to be checked is a dynamic picture file. In the abnormality determination stage, whether the picture file to be checked is abnormal or not is determined based on the logical screen information.
An application scenario of the method and apparatus provided by the present disclosure will be described below with reference to fig. 1.
Fig. 1 is an application scenario schematic diagram of a method and apparatus for auditing a picture file according to an embodiment of the present disclosure.
As shown in fig. 1, the scenario 100 of this embodiment includes a terminal device 110. The terminal device 110 may be, for example, various electronic devices with processing capabilities including, but not limited to, smart phones, tablet computers, laptop computers, desktop computers, and the like.
The terminal device 110 may have various client applications installed therein, such as a shopping class application, a web browser application, a search class application, a picture review class application, and the like. As shown in fig. 1, the picture file 120 to be checked may be transmitted to the terminal device 110, and the terminal device 110 performs checking processing on the picture file 120 to be checked to determine whether the picture file to be checked is abnormal. In an embodiment, the terminal device 110 may also audit any other type of multimedia file besides a picture file, for example.
In one embodiment, as shown in fig. 1, the application scenario 100 may further comprise a server 130. Terminal device 110 may communicate with server 130 over a network, which may include wired or wireless communication links.
In this embodiment, the terminal device 110 may also send the incoming picture file 120 to be audited to the server 130, and the server performs audit processing on the picture file to be audited, and feeds back the audit result 140 to the terminal device 110, for example. The terminal device 110 may determine whether the picture file to be checked is abnormal according to the checking result.
By way of example, server 130 may be a server providing various services, such as a background management server (by way of example only) that provides support for various client applications running on terminal device 110. The server 130 may also be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
For example, when the terminal device 110 determines that the to-be-checked picture file 120 is abnormal, for example, a prompt message may be displayed through a display screen to prompt the user who enters the to-be-checked picture file 120 to delete the to-be-checked picture file 120 in time, so as to avoid the situation that negative influence is caused to the society due to the propagation of the abnormal message, and thus, the construction of a good network environment is facilitated.
It should be noted that, the method for auditing the picture file provided in the present disclosure may be performed by the terminal device 110 or may be performed by the server 130. Accordingly, the device for auditing the picture file provided by the present disclosure may be set in the terminal device 110 or may be set in the server 130.
It should be understood that the number and types of terminal devices, picture files to be reviewed and servers in fig. 1 are merely illustrative. There may be any number and type of terminal devices, picture files to be checked and servers, as desired for implementation.
The method for auditing the picture file provided in the present disclosure will be described in detail with reference to fig. 1 through fig. 2 to 4.
Fig. 2 is a flow chart of a method of auditing a picture file according to an embodiment of the present disclosure.
As shown in fig. 2, the method 200 of auditing the picture file of this embodiment may include operations S210 to S220.
In operation S210, in the case where the picture file to be checked is a moving picture file, logical screen information of the picture file to be checked is determined.
For example, the file to be checked provided by the user may include a plurality of types of multimedia files, and the operation S210 may select a picture file from among the multimedia files as the picture file to be checked. In one embodiment, the picture file to be reviewed may be sent to the server for review by the server, for example, by the user through a user generated content (User Generated Content, UGC) platform.
For example, whether the image file to be checked includes a plurality of images may be determined, and if the image file to be checked includes a plurality of images, the image file to be checked may be determined to be a dynamic image file. The number of images included in the picture file to be checked may be determined, for example, by parsing the picture file to be checked. The analysis method adopted can be set according to actual requirements, and the present disclosure is not limited to this.
The format of the picture file to be checked may be detected by a predefined detection program, for example. If the format of the picture file to be checked is a bitmap format such as "GIF" (Graphics Interchange Format ), the picture file to be checked may be determined to be a dynamic picture file. The predefined detection program may be written in programming languages such as c++, java, etc., and the bitmap format may be any format other than "GIF", which is not limited in this disclosure.
Illustratively, the logic screen information of the to-be-checked picture file can be obtained by analyzing the to-be-checked picture format of the dynamic picture file. The parsing of the moving picture file may be implemented, for example, by referring to the code in the Glide open source library that parses the GIF portion. Or a GIF editing tool such as Gifsicle may be used to parse the moving picture file. It is to be understood that the above analysis method is only described by taking a file in which a moving picture file is in a "GIF" format as an example. According to the specific format of the dynamic picture file, the analysis of the dynamic picture file can be realized by adopting a corresponding analysis method in the related technology.
For example, taking a moving picture file in the "GIF" format as an example, the structure of the moving picture file may include a GIF file Header (Header), a logical screen description block (Logical Screen Descripter), a global color table (Global Color Table), a graphic description block (Image Descriptor), and the like. The embodiment can obtain the logical screen information by analyzing the logical screen description block in the dynamic picture file. The logical screen information may include, for example, information of a width of the logical screen and a height of the logical screen.
In operation S220, it is determined whether the picture file to be checked is abnormal based on the logical screen information.
After obtaining the logical screen information, the embodiment may compare information such as the height of the logical screen, the width of the logical screen, etc. in the logical screen information with empirically set upper limits corresponding to the respective information. If any information of the information such as the height of the logic screen and the width of the logic screen exceeds the corresponding upper limit, the abnormality of the picture file to be checked can be determined. For example, if the logical screen has a height of 65534 pixels and a width of 57343 pixels, the logical screen has a height that is close to the maximum height 65535 pixels that a file in the "GIF" format can withstand, the picture file to be reviewed may be considered abnormal.
Alternatively, the embodiment may compare the height of the logical screen and the width of the logical screen in the logical screen information with the height and the width of the display screen of the general desktop terminal device, respectively. If the height of the logic screen is far greater than the height of the display screen or the width of the logic screen is far greater than the width of the display screen, the abnormity of the picture file to be checked can be determined.
According to the embodiment of the disclosure, when the method is adopted to determine that the picture file to be checked is normal, for example, a method for checking the content of the picture file in the related technology can be adopted to further check the picture to be checked.
Since the auditing work is usually performed by using a desktop terminal device, some specific users can not load the dynamic picture file uploaded by the specific users and cannot audit the dynamic picture file by modifying the size of the logical screen in order to avoid auditing. The reason why the desktop terminal device cannot load the moving picture file uploaded by the specific user is that the desktop terminal device needs to analyze the moving picture file first and then load the analyzed file when loading the moving picture file. When the size of the logical screen of the dynamic picture file is too large, the desktop terminal device cannot complete the analysis of the dynamic picture file, so that the dynamic picture file cannot be loaded. The handheld terminal has strong compatibility, and can directly read the images in the dynamic picture file generally without being limited by the size of a logic screen. Therefore, if the moving picture file uploaded by the specific user carries illegal information, the illegal information is propagated on the handheld terminal. By determining whether the picture file to be checked is abnormal or not according to the logic screen information, the embodiment of the invention can realize effective checking of the picture file cheated by modifying the logic screen of the dynamic picture file, improves checking precision of user generated content and is beneficial to constructing a healthy and good network environment.
Fig. 3 is a schematic diagram of a method of auditing a picture file according to an embodiment of the present disclosure.
In an embodiment, it may also be determined whether the picture to be checked is abnormal by comparing the size of the logical screen with the size of the image in the moving picture file. This is because the size of the logical screen of the moving picture file is generally equal to the size of the image in the moving picture file. If the difference exists between the size of the logic screen and the size of the image or the difference is larger, the logic screen information of the picture file to be checked can be determined to be modified manually. And thus the abnormality of the picture file to be checked can be determined.
Illustratively, in auditing the pending picture file, this embodiment 300 requires determining the height of the image and the width of the image included in the pending picture file 310, i.e., determining the image size 330, in addition to the logical screen information 320 of the pending picture file 310. Then, whether or not the picture to be checked is abnormal is determined based on the difference between the logical screen height 321 in the logical screen information 320 and the image height 331 in the image size 330, and the difference between the logical screen width 322 in the logical screen information 320 and the image width 332 in the image size 330.
For example, if the logical screen height 321 is not equal to the image height 331 and the logical screen width 322 is not equal to the image width 332, it may be determined that the picture to be checked is abnormal. Otherwise, the picture to be audited can be determined to be normal, or the picture to be audited is further audited by adopting a method for auditing the content of the picture file in the related technology.
For example, the difference between the logical screen height 321 and the image height 331 may be determined first, resulting in a first difference 341. At the same time, a difference between the logical screen width 322 and the image width 332 is determined, resulting in a second difference 342. The first difference 341 is then compared to a first difference threshold and the second difference 342 is compared to a second difference threshold. If the first difference 341 is greater than or equal to the first difference threshold and/or the second difference 342 is greater than or equal to the second difference threshold, determining that the to-be-checked picture file is abnormal. The first difference threshold and the second difference threshold may be set according to actual requirements, and may be equal or unequal, which is not limited in this disclosure. In an embodiment, the first and second difference thresholds may be, for example, any value less than 100 pixels. For example, if the logic screen has a height of 65534 pixels and a width of 57343 pixels. The height of the image is 570 pixels, the width of the image is 400 pixels, the height of the logic screen is far greater than the height of the image, the width of the logic screen is far greater than the width of the image, and the abnormality of the image file to be checked can be determined.
Illustratively, a method similar to the above method for parsing the to-be-inspected picture file to obtain the logical screen information may be used to obtain the size of each Image included in the to-be-inspected picture file by parsing the Image description block (Image Descriptor) in the to-be-inspected picture file.
For example, if the sizes of the plurality of images included in the moving picture file are not equal, the embodiment may select the maximum height and the maximum width from the sizes of the plurality of images. And determining whether the picture to be checked is abnormal or not according to the difference between the logic screen height and the maximum height and the difference between the logic screen width and the maximum width.
In one embodiment, the logical screen height and logical screen width may be compared to the height and width of the display screen of the universal desktop terminal device, respectively, prior to determining the image size 330, for example. And the comparison result is displayed to the auditor, so that the auditor can conveniently know the cheating principle of uploading the file by the specific user. The aforementioned operation of determining the image size 330 and the operation of determining whether the picture to be checked is abnormal based on the image size and the logical screen information are performed regardless of the comparison result.
In summary, the embodiment of the disclosure can effectively audit the picture file by comparing the logic screen height with the image height, and comparing the logic screen width with the image width. Furthermore, by setting the first difference value threshold and the second difference value threshold for the first difference value and the second difference value respectively, the auditing precision can be further improved, and the error condition is avoided.
Fig. 4 is a flow chart of a method of auditing a picture file according to another embodiment of the present disclosure.
According to the embodiment of the disclosure, in the case that the to-be-checked picture file is determined to be the dynamic picture file, for example, a predetermined image processing library may be also called to load the to-be-checked picture file. If the preset image processing library has preset errors in the process of loading the picture file to be checked, the abnormality of the picture to be checked can be determined.
According to the embodiment of the disclosure, under the condition that the image processing library is successfully loaded with the image file to be checked, for example, the image file to be checked can be analyzed by adopting the method described above, the logic screen information of the image file to be checked is determined, and whether the image file to be checked is abnormal or not is judged again according to the logic screen information.
The predetermined image processing library may be any processing library capable of setting a pixel threshold for the image pixel size of the picture file to be audited, for example, may be the third party image processing library PIL (Python Image Library) of Python. The predetermined error is a pixel threshold value indicating that the pixel size of the picture file to be checked exceeds a predetermined image processing library. For example, for invoking the basic core class image module of the PIL to load the pending picture file, the predetermined error may be: PIL.image. DecompressionBombrer: image size (xxxxxxx pixels) exceeds limit of XXXXXXX pixels, could be decompression bomb DOS attack. The pixel threshold may be set by an auditor according to experience, or may be a default pixel threshold of the predetermined image processing library, which is not limited in this disclosure.
For example, as shown in fig. 4, the method 400 of auditing a picture file of this embodiment may include operations S410-S480.
In operation S410, in response to receiving the picture file 401 to be checked, it is determined whether the picture file to be checked is a dynamic picture file. If yes, operation S420 is performed, otherwise operation S480 is performed.
In this embodiment, the picture file to be checked may be converted into a binary file first. Then it is determined whether the byte information of the predetermined location in the binary file is predetermined information. And if the file is the preset information, determining the file of the picture to be checked as the dynamic picture file.
For example, base64 may be employed to effect conversion between picture files and binary files. The predetermined location may be the first 5 bytes of the binary file. If the first 5 bytes of data is the predetermined information "GIF89a" or "GIF87a", it may be determined that the picture file to be checked is a moving picture file. It is to be appreciated that the above-described conversion method, predetermined location, and predetermined information are merely examples to facilitate understanding of the present disclosure, and that the present disclosure may maintain a predetermined information list for respectively representing formats of various moving picture files, for example.
In operation S420, a predetermined image processing library is called to load the to-be-checked picture file 401.
In operation S430, it is determined whether a predetermined error occurs in the process of loading the picture file 401 to be checked. If a predetermined error occurs, operation S470 is performed, otherwise operation S440 is performed.
In operation S440, logical screen information of the picture file 401 to be checked is determined. This operation S440 is similar to the operation S210 described above, and will not be described again. After the execution of operation S440, it may be determined whether the picture file 401 to be checked is abnormal based on the logical screen information.
In an embodiment, after performing operation S440, operation S450 may be performed, or operation S450 may be performed simultaneously with operation S440.
In operation S450, the height of the image and the width of the image included in the picture file to be checked are determined.
In operation S460, it is determined whether a first difference between the height of the logic screen and the height of the image is greater than or equal to a first difference threshold, and whether a second difference between the width of the logic screen and the width of the image is greater than or equal to a second difference threshold. If the first difference is greater than or equal to the first difference threshold and/or the second difference is greater than or equal to the second difference threshold, then operation S470 is performed, otherwise operation S480 is performed.
In operation S470, it is determined that the picture file to be checked is abnormal.
In operation S480, other audit flows are entered. Operation S480 may be implemented, for example, by a method of auditing contents of a picture file in the related art.
In one embodiment, the picture file to be audited may also be prescreened prior to performing operation S410. For example, a plurality of to-be-checked picture files uploaded by a plurality of users can be acquired at one time. And filtering out files which cannot be downloaded, are not displayed fully and have abnormal length-width ratio and cause error reporting of the auditing interface from the plurality of picture files to be audited. And executing the operation S410 on the filtered picture file to be checked.
According to the embodiment of the disclosure, whether the to-be-checked picture file is abnormal or not is determined by loading the to-be-checked picture file, so that the checking efficiency can be improved to a certain extent. Furthermore, by adopting the method for loading the picture file to be checked to judge whether the picture file to be checked is abnormal or not and the method for judging whether the picture file to be checked is abnormal or not based on logic information, double guarantee can be provided for the accuracy of the checking result. And thus the auditing accuracy and validity of the auditing can be improved.
Based on the method for auditing the picture file provided by the disclosure, the disclosure also provides a device for auditing the picture file. The device will be described in detail below in connection with fig. 5.
Fig. 5 is a block diagram of an apparatus for auditing a picture file according to an embodiment of the present disclosure.
As shown in fig. 5, the apparatus 500 for auditing a picture file of this embodiment may include a logical screen information determination module 510 and an anomaly determination module 520.
The logic screen information determining module 510 is configured to determine logic screen information of the picture file to be checked if the picture file to be checked is a dynamic picture file. Wherein the logical screen information includes a height of the logical screen and a width of the logical screen. In an embodiment, the editing screen information determining module 510 may be configured to perform the operation S210 described above, which is not described herein.
The anomaly determination module 520 is configured to determine whether the picture file to be checked is anomalous based on the logical screen information. In an embodiment, the anomaly determination module 520 may be configured to perform the operation S220 described above, which is not described herein.
According to an embodiment of the present disclosure, the apparatus 500 for auditing a picture file may further include an image information determining module, configured to determine a height of an image and a width of the image included in the picture file to be audited. The anomaly determination module 520 may be specifically configured to determine whether the picture to be checked is abnormal based on a difference between the height of the logical screen and the height of the image and a difference between the width of the logical screen and the width of the image.
According to an embodiment of the present disclosure, the anomaly determination module 520 may include a first difference determination sub-module, a second difference determination sub-module, and an anomaly determination sub-module. The first difference determining submodule is used for determining a first difference between the height of the logic screen and the height of the image. The second difference determining sub-module is used for determining a second difference between the width of the logic screen and the width of the predetermined image. The abnormality determination submodule is used for determining that the picture file to be audited is abnormal under the condition that the first difference value is greater than or equal to a first difference value threshold value and/or the second difference value is greater than or equal to a second difference value threshold value.
According to an embodiment of the present disclosure, the apparatus 500 for auditing a picture file may further include a file loading module, configured to invoke, before the logic screen information determining module 510 determines the logic screen information of the picture file to be audited, a predetermined image processing library to load the picture file to be audited if the picture file to be audited is a dynamic picture file. The abnormality determination module 520 may be specifically configured to determine that the picture file to be audited is abnormal when a predetermined error occurs in the process of calling the predetermined image processing library to load the picture file to be audited by the file loading module. Wherein the predetermined error indicates that the pixel size of the picture file to be audited exceeds a pixel threshold set by the predetermined image processing library. The logic screen information determining module 510 is configured to determine logic screen information of the to-be-checked picture file when the to-be-checked picture file is successfully loaded by calling the predetermined image processing library.
According to an embodiment of the present disclosure, the apparatus 500 for auditing a picture file may further include a picture type determining module, configured to determine whether the picture file to be audited is a dynamic picture file. The picture type determination module may include a file conversion sub-module and a type determination sub-module. The file conversion sub-module is used for converting the picture file to be checked into a binary file. The type determination submodule is used for determining that the picture file to be audited is a dynamic picture file under the condition that byte information at a preset position in the binary file is determined to be preset information.
It should be noted that, in the technical solution of the present disclosure, the related processes of obtaining, collecting, storing, using, processing, transmitting, providing, disclosing, etc. of the personal information of the user all conform to the rules of the related laws and regulations, and do not violate the public order colloquial.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement a method of auditing a picture file in accordance with an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the respective methods and processes described above, for example, a method of auditing a picture file. For example, in some embodiments, the method of auditing a picture file may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the method of auditing picture files described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the method of auditing the picture file in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS"). The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (8)

1. A method of auditing a picture file, comprising:
determining logic screen information of the picture file to be checked under the condition that the picture file to be checked is a dynamic picture file; the logic screen information comprises the height of a logic screen and the width of the logic screen; and
determining whether the picture file to be checked is abnormal or not based on the logic screen information;
wherein the method further comprises: determining the height of an image included in the picture file to be checked and the width of the image;
wherein, based on the logic screen information, determining whether the to-be-checked picture file is abnormal includes: determining whether the picture to be checked is abnormal based on the difference between the height of the logic screen and the height of the image and the difference between the width of the logic screen and the width of the image;
wherein the determining whether the picture to be checked is abnormal based on the difference between the height of the logical screen and the height of the image and the difference between the width of the logical screen and the width of the image comprises:
determining a first difference between the height of the logical screen and the height of the image;
determining a second difference between the width of the logical screen and the width of the image; and
and determining that the to-be-checked picture file is abnormal under the condition that the first difference value is greater than or equal to a first difference value threshold value and/or the second difference value is greater than or equal to a second difference value threshold value.
2. The method of claim 1, further comprising:
under the condition that the picture file to be checked is a dynamic picture file, calling a preset image processing library to load the picture file to be checked; and
under the condition that a preset error occurs in the process of calling the preset image processing library to load the picture file to be checked, determining that the picture file to be checked is abnormal,
wherein the predetermined error indicates that the image pixel size of the picture file to be checked exceeds a pixel threshold set by the predetermined image processing library;
and determining logic screen information of the picture file to be checked under the condition that the picture file to be checked is successfully loaded by calling the preset image processing library.
3. The method of claim 1, further comprising determining the pending picture file to be the moving picture file by:
converting the picture file to be checked into a binary file; and
and under the condition that byte information at a preset position in the binary file is preset information, determining the picture file to be checked as the dynamic picture file.
4. An apparatus for auditing a picture file, comprising:
the logic screen information determining module is used for determining logic screen information of the picture file to be checked under the condition that the picture file to be checked is a dynamic picture file; the logic screen information comprises the height of a logic screen and the width of the logic screen; and
the abnormality determining module is used for determining whether the picture file to be checked is abnormal or not based on the logic screen information;
wherein the apparatus further comprises: the image information determining module is used for determining the height of an image included in the image file to be checked and the width of the image;
wherein the anomaly determination module is configured to: determining whether the picture to be checked is abnormal based on the difference between the height of the logic screen and the height of the image and the difference between the width of the logic screen and the width of the image;
wherein the anomaly determination module comprises:
a first difference determining sub-module for determining a first difference between the height of the logical screen and the height of the image;
a second difference determining sub-module for determining a second difference between the width of the logical screen and the width of the image; and
and the abnormality determination submodule is used for determining that the picture file to be checked is abnormal under the condition that the first difference value is greater than or equal to a first difference value threshold value and/or the second difference value is greater than or equal to a second difference value threshold value.
5. The apparatus of claim 4, further comprising:
the file loading module is used for calling a preset image processing library to load the picture file to be checked under the condition that the picture file to be checked is a dynamic picture file; and
the anomaly determination module is further configured to: under the condition that a preset error occurs in the process of calling the preset image processing library to load the picture file to be checked by the file loading module, determining that the picture file to be checked is abnormal,
wherein the predetermined error indicates that the pixel size of the picture file to be checked exceeds a pixel threshold set by the predetermined image processing library;
the logic screen information determining module is used for determining logic screen information of the picture file to be checked under the condition that the picture file to be checked is successfully loaded by calling the preset image processing library.
6. The apparatus of claim 4, further comprising a picture type determination module to determine whether the picture file to be reviewed is a dynamic picture file; the picture type determining module includes:
the file conversion sub-module is used for converting the picture file to be checked into a binary file; and
and the type determining submodule is used for determining the picture file to be checked as the dynamic picture file under the condition that byte information at a preset position in the binary file is determined to be preset information.
7. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3.
8. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-3.
CN202110965015.1A 2021-08-20 2021-08-20 Method, device, electronic equipment and storage medium for auditing picture files Active CN113674246B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110965015.1A CN113674246B (en) 2021-08-20 2021-08-20 Method, device, electronic equipment and storage medium for auditing picture files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110965015.1A CN113674246B (en) 2021-08-20 2021-08-20 Method, device, electronic equipment and storage medium for auditing picture files

Publications (2)

Publication Number Publication Date
CN113674246A CN113674246A (en) 2021-11-19
CN113674246B true CN113674246B (en) 2023-09-01

Family

ID=78544779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110965015.1A Active CN113674246B (en) 2021-08-20 2021-08-20 Method, device, electronic equipment and storage medium for auditing picture files

Country Status (1)

Country Link
CN (1) CN113674246B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220541A (en) * 2012-01-23 2013-07-24 索尼公司 Image processing apparatus, image processing method, and program
CN106383880A (en) * 2016-09-13 2017-02-08 广州视睿电子科技有限公司 GIF file playing method and system
KR20180117433A (en) * 2017-04-19 2018-10-29 주식회사 넥슨코리아 Method and system for testing stereo-scopic image
CN110223221A (en) * 2018-02-28 2019-09-10 腾讯科技(深圳)有限公司 A kind of method and terminal device of dynamic image broadcasting
CN111832449A (en) * 2020-06-30 2020-10-27 万翼科技有限公司 Engineering drawing display method and related device
CN113111200A (en) * 2021-04-09 2021-07-13 百度在线网络技术(北京)有限公司 Method and device for auditing picture file, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10803988B2 (en) * 2017-03-20 2020-10-13 SK Commercial Construction, Inc. Color analysis and control using a transparent display screen on a mobile device with non-transparent, bendable display screen or multiple display screen with 3D sensor for telemedicine diagnosis and treatment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220541A (en) * 2012-01-23 2013-07-24 索尼公司 Image processing apparatus, image processing method, and program
CN106383880A (en) * 2016-09-13 2017-02-08 广州视睿电子科技有限公司 GIF file playing method and system
KR20180117433A (en) * 2017-04-19 2018-10-29 주식회사 넥슨코리아 Method and system for testing stereo-scopic image
CN110223221A (en) * 2018-02-28 2019-09-10 腾讯科技(深圳)有限公司 A kind of method and terminal device of dynamic image broadcasting
CN111832449A (en) * 2020-06-30 2020-10-27 万翼科技有限公司 Engineering drawing display method and related device
CN113111200A (en) * 2021-04-09 2021-07-13 百度在线网络技术(北京)有限公司 Method and device for auditing picture file, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于深度学习的视频行为识别研究与实现;李玉鹏;《中国优秀硕士学位论文全文数据库信息科技辑》(第1期);第I138-1432页 *

Also Published As

Publication number Publication date
CN113674246A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
CN113923474B (en) Video frame processing method, device, electronic equipment and storage medium
CN113657518B (en) Training method, target image detection method, device, electronic device, and medium
CN110888791A (en) Log processing method, device, equipment and storage medium
CN109656791B (en) gPC performance test method and device based on Jmeter
CN111046393B (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN113674246B (en) Method, device, electronic equipment and storage medium for auditing picture files
CN113111200B (en) Method, device, electronic equipment and storage medium for auditing picture files
CN113807410B (en) Image recognition method and device and electronic equipment
CN113627526B (en) Vehicle identification recognition method and device, electronic equipment and medium
CN112379967B (en) Simulator detection method, device, equipment and medium
CN113112472A (en) Image processing method and device
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN114021642A (en) Data processing method and device, electronic equipment and storage medium
CN114329149A (en) Detection method and device for automatically capturing page information, electronic equipment and readable storage medium
CN114791996B (en) Information processing method, device, system, electronic equipment and storage medium
CN115296917B (en) Asset exposure surface information acquisition method, device, equipment and storage medium
CN110879733A (en) Detection method and device of electronic red packet, terminal and computer readable storage medium
CN114281981B (en) News brief report generation method and device and electronic equipment
CN115378746B (en) Network intrusion detection rule generation method, device, equipment and storage medium
CN117520195A (en) Method, apparatus, device, storage medium and program product for testing interface
CN114511535A (en) White screen detection method and device, electronic equipment, medium and product
CN113360382A (en) Test method, device, equipment and storage medium
CN117075920A (en) Optimization method and device for application program installation package
CN117407044A (en) Configuration method, device, equipment and medium of cross-terminal assembly
CN114115854A (en) SDK file generation method, device, 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