Repeated image detection method and device, computer equipment and storage medium

By obtaining the user ID and image ID of the image file during elevator maintenance, determining the upload method and extracting image features for database matching, the problem of difficult identification of duplicate images in elevator maintenance is solved, and efficient duplicate image detection and review is achieved.

CN120723927APending Publication Date: 2025-09-30HITACHI ELEVATOR CHINA +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410369399.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

During the elevator maintenance process, due to the huge number of maintenance images, it is difficult for humans to identify duplicate images, resulting in repeated audits and affecting audit efficiency.

Method used

By obtaining the user ID and image ID in the image file, the image upload method is determined. If it is uploaded offline, the image features are extracted and the database is queried. The user ID and image features are matched to identify duplicate images, and detection is performed by combining texture and global features.

Benefits of technology

The accuracy and efficiency of duplicate image detection are improved, which avoids wasting time on images that do not need to be reviewed repeatedly and improves review efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723927A_ABST
    Figure CN120723927A_ABST
Patent Text Reader

Abstract

The invention relates to a repeated image detection method and device, computer equipment and a storage medium. The method comprises the steps of obtaining an image file of a to-be-detected image sent by a user; the image file comprises a user identifier of the user and an image identifier of the to-be-detected image, and the image identifier is used for representing an uploading mode of the to-be-detected image; if the image identifier of the to-be-detected image is uploaded offline, extracting image features of the to-be-detected image; and according to the user identifier and the image feature, querying a preset database, and when a target image matched with both the user identifier and the image feature is queried from the database, determining that the to-be-detected image is a repeated image. By adopting the method, the repeated detection of the maintenance image of the elevator can be realized, so that the auditing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of elevator technology, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for detecting repeated images. Background Art

[0002] During the maintenance process of elevators, it is generally necessary to upload maintenance images, and the maintenance process can be supervised by reviewing the maintenance images.

[0003] Currently, maintenance images are reviewed manually. During the upload process, duplicate images are prone to appearing. However, due to the sheer volume of maintenance images (around 60,000 per day on weekdays), manual identification is often difficult, leading to duplicate reviews and impacting review efficiency. Summary of the Invention

[0004] Based on this, it is necessary to provide a duplicate image detection method, device, computer equipment, computer-readable storage medium and computer program product to address the technical problem that the huge number of elevator maintenance images makes it difficult to identify them manually, which affects the audit efficiency.

[0005] In a first aspect, the present application provides a method for detecting duplicate images. The method comprises:

[0006] Acquire an image file of an image to be detected sent by a user; the image file includes a user ID of the user and an image ID of the image to be detected, the image ID being used to characterize an upload method of the image to be detected;

[0007] If the image identifier of the image to be detected is offline upload, extracting image features of the image to be detected;

[0008] A preset database is queried according to the user identification and the image features. When a target image matching both the user identification and the image features is found in the database, the image to be detected is determined to be a duplicate image.

[0009] In one embodiment, the image file further includes coding information of the image to be detected;

[0010] The extracting the image features of the image to be detected includes:

[0011] Decoding the encoded information of the image to be detected to obtain an original image corresponding to the image to be detected;

[0012] The image features of the original image are extracted as the image features of the image to be detected.

[0013] In one embodiment, extracting the image features of the original image includes:

[0014] Extracting texture features of the original image through a gray level co-occurrence matrix, and extracting global features of the original image;

[0015] The texture features and the global features are determined as image features of the original image.

[0016] In one embodiment, the method further comprises:

[0017] When the image identification of the image to be detected is uploaded online, or a target image matching both the user identification and the image features is not found in the database, anomaly detection is performed on the image to be detected based on the image features.

[0018] In one embodiment, performing abnormality detection on the image to be detected based on the image features includes:

[0019] The image features of the image to be detected are input into a trained detection model to obtain an abnormality detection result of the image to be detected.

[0020] In one embodiment, the historical uploaded images have a timestamp;

[0021] The method further comprises:

[0022] The images in the database are updated regularly according to the timestamps of the images stored in the database.

[0023] In one embodiment, the image features include texture features and global features; and querying a preset database based on the user identifier and the image features includes:

[0024] Determining, according to the user identifier, historical images uploaded by the user in the database;

[0025] The texture features and global features of the historical image and the image to be detected are compared respectively, and the historical image whose similarity with the texture features and global features of the image to be detected reaches a threshold is determined as the target image that matches both the user identification and the image features.

[0026] In a second aspect, the present application further provides a repeated image detection device. The device comprises:

[0027] An image acquisition module is used to acquire an image file of an image to be detected sent by a user; the image file includes a user ID of the user and an image ID of the image to be detected, and the image ID is used to indicate the upload method of the image to be detected;

[0028] A feature extraction module, configured to extract image features of the image to be detected if the image identifier of the image to be detected is offline upload;

[0029] The repeatability detection module is used to query a preset database based on the user identification and the image features, and when a target image that matches both the user identification and the image features is found in the database, the image to be detected is determined to be a repeating image.

[0030] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:

[0031] Acquire an image file of an image to be detected sent by a user; the image file includes a user ID of the user and an image ID of the image to be detected, the image ID being used to characterize an upload method of the image to be detected;

[0032] If the image identifier of the image to be detected is offline upload, extracting image features of the image to be detected;

[0033] A preset database is queried according to the user identification and the image features. When a target image matching both the user identification and the image features is found in the database, the image to be detected is determined to be a duplicate image.

[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0035] Acquire an image file of an image to be detected sent by a user; the image file includes a user ID of the user and an image ID of the image to be detected, the image ID being used to characterize an upload method of the image to be detected;

[0036] If the image identifier of the image to be detected is offline upload, extracting image features of the image to be detected;

[0037] A preset database is queried according to the user identification and the image features. When a target image matching both the user identification and the image features is found in the database, the image to be detected is determined to be a duplicate image.

[0038] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:

[0039] Acquire an image file of an image to be detected sent by a user; the image file includes a user ID of the user and an image ID of the image to be detected, the image ID being used to characterize an upload method of the image to be detected;

[0040] If the image identifier of the image to be detected is offline upload, extracting image features of the image to be detected;

[0041] A preset database is queried according to the user identification and the image features. When a target image matching both the user identification and the image features is found in the database, the image to be detected is determined to be a duplicate image.

[0042] The above-mentioned duplicate image detection method, device, computer equipment, storage medium and computer program product, after the server receives the image file of the image to be detected sent by the user, first determines the upload method of the image to be detected based on the image identifier included in the image file of the image to be detected, thereby determining whether it is necessary to perform duplicate detection on the image to be detected, so as to perform duplicate detection in a targeted manner and avoid wasting time caused by performing duplicate detection on images that do not require duplicate detection. If the image identifier is an image uploaded offline, it indicates that duplicate detection is required, so that the image features of the image to be detected can be further extracted, and the database can be queried based on the features of the two dimensions of user identification and image features to improve the reliability and accuracy of the query results. When a target image that matches both the user identification and the image features is queried from the database, it is determined that the image to be detected is a duplicate image, thereby realizing the detection of duplicate images in the elevator maintenance scene, so that when a duplicate image is detected, the duplicate image can be discarded without the need for re-audit, thereby improving the audit efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A diagram illustrating an application environment of a repeated image detection method according to an embodiment;

[0044] Figure 2 1 is a flow chart of a repeated image detection method according to an embodiment;

[0045] Figure 3 Schematic diagram of the process of image feature extraction in one embodiment;

[0046] Figure 4 is a flowchart of an image processing method in another embodiment;

[0047] Figure 5 is a structural block diagram of a repeated image detection device in one embodiment;

[0048] Figure 6 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0050] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0051] It's understandable that when uploading maintenance images during elevator maintenance, it's generally possible to directly upload photos using the camera of a maintenance terminal (such as a mobile phone). In this case, duplicate images generally won't be uploaded. However, this upload method requires the maintenance site to have an internet connection. Therefore, for maintenance sites without an internet connection, this real-time online upload method isn't feasible. Instead, maintenance personnel must capture images on-site and then perform a delayed image upload in an area with an internet connection. Since uploading images in this case involves accessing the camera's photo album, some duplicate images are likely to appear. Therefore, this application proposes a duplicate image detection method to address this situation.

[0052] The duplicate image detection method provided in the embodiment of the present application can be applied to Figure 1 The application environment shown includes a client 102, a server 104 and a database 106. The client 102 communicates with the server 104 via a network, and the server 104 communicates with the database 106 via a network. In the application scenario of the present application, a user collects an image to be detected, generates an image file of the image to be detected, and sends the image file of the image to be detected to the server 104 via the client 102. After the server 104 receives the image file of the image to be detected, it performs different processing according to the image identifier included in the image file of the image to be detected. Specifically, if the image identifier of the image to be detected is an image uploaded offline, the image features of the image to be detected are extracted, and the database 106 is queried based on the user identifier and the image features. When a target image that matches both the user identifier and the image features is queried from the database 106, it is determined that the image to be detected is a duplicate image, so that the image to be detected can be discarded without having to be reviewed again to improve the review efficiency.

[0053] The client 102 may be, but is not limited to, a client installed in various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0054] In one embodiment, Figure 2 As shown, a repeated image detection method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:

[0055] Step S210 , obtaining an image file of the image to be detected sent by the user; the image file includes the user ID of the user and the image ID of the image to be detected, and the image ID is used to represent the upload method of the image to be detected.

[0056] The image to be detected is an image of elevator maintenance, which may be an image of an elevator maintenance component or an image of a maintenance personnel signing a card.

[0057] The user identifier is a unique identifier representing the user who uploaded the image to be detected. For example, the user identifier may be the user's work ID.

[0058] The image identifier is used to distinguish the upload method for the image to be tested. These methods include offline and online upload. Offline upload refers to storing the image locally when there's no internet connection and uploading it when a network connection is established; online upload refers to directly uploading the image when there's an internet connection. The image identifier used to distinguish between the two upload methods can be represented by a number, for example, 0 for offline upload and 1 for online upload.

[0059] Among them, both offline uploading and online uploading methods of the image to be detected use the designated client image uploading interface to upload the image.

[0060] In a specific implementation, the user uploads the image file of the image to be detected to the server 104 through the designated image upload interface of the client 102. After receiving the image file of the image to be detected, the server 104 executes a predetermined detection process according to the image information in the image file of the image to be detected.

[0061] Step S220 : If the image identifier of the image to be detected is offline upload, extract image features of the image to be detected.

[0062] The image features extracted in this step are features that can be used for both repeatability detection of the image to be detected and anomaly detection after the image is detected as a non-repeating image.

[0063] The image features may include texture images and global features of the image to be detected.

[0064] In a specific implementation, after receiving the image file of the image to be tested, the server 104 first determines the upload method of the image to be tested based on the image identifier in the image file. If it is determined that the image to be tested was uploaded offline, it indicates that repeatability testing is required, and further image features of the image to be tested can be extracted. This facilitates subsequent repeatability testing based on the image features and user identifier.

[0065] For example, it is pre-set that the image identifier "0" indicates offline upload and the image identifier "1" indicates online upload. When the image identifier extracted from the image file of the image to be detected is "0", it can be determined that the image to be detected is an offline uploaded image and a repeatability test is required.

[0066] Step S230 , querying a preset database based on the user identification and the image features, and when a target image matching both the user identification and the image features is found in the database, determining that the image to be detected is a duplicate image.

[0067] The database stores a mapping relationship between historically detected images, image features of the historically detected images, and a user identifier who uploaded the historically detected images.

[0068] In a specific implementation, each time the server 104 receives an image and performs an anomaly detection, the image, the image features of the image, and the user ID of the user who uploaded the image are stored in a database. Subsequently, upon receiving a new image to be detected, the image to be detected can be matched with the image in the database to achieve repeatability detection. Matching the image to be detected with the image in the database can be performed from two dimensions: the image features of the image to be detected and the user ID. When a target image that matches both the user ID and the image features is found in the database, the image to be detected is determined to be a duplicate image, and a prompt message can be returned to the front end. Conversely, if either or both of the user ID and the image features do not match, the image to be detected is determined to be a non-duplicate image.

[0069] More specifically, image features include texture features and global features. In one embodiment, when querying a preset database based on a user ID and image features, the user ID is first used to identify historical images uploaded by the user corresponding to the user ID in the database. The texture features and global features of the historical images are then compared with the image to be detected. Historical images whose similarity with the texture features and global features of the image to be detected reaches a threshold are identified as target images that match both the user ID and image features. By first identifying historical images uploaded by the corresponding user based on the user ID and then performing a match against these historical images, this layer-by-layer search and matching approach can improve query efficiency.

[0070] In the above-mentioned duplicate image detection method, after the server receives the image file of the image to be detected sent by the user, it first determines the upload method of the image to be detected based on the image identifier included in the image file of the image to be detected, thereby determining whether it is necessary to perform duplicate detection on the image to be detected, so as to perform duplicate detection in a targeted manner and avoid wasting time caused by repeated detection of images that do not need to be detected. If the image identifier is an offline uploaded image, it indicates that duplicate detection is required, so that the image features of the image to be detected can be further extracted, and the database can be queried based on the features of the two dimensions of user identification and image features to improve the reliability and accuracy of the query results. When a target image that matches both the user identification and the image features is queried from the database, it is determined that the image to be detected is a duplicate image, thereby realizing the detection of duplicate images of elevator maintenance scenes, so that when a duplicate image is detected, the duplicate image can be discarded without the need for re-audit, thereby improving the audit efficiency.

[0071] In an exemplary embodiment, the image file of the image to be detected also includes encoding information of the image to be detected; in the above-mentioned step S220, extracting the image features of the image to be detected includes: decoding the encoding information of the image to be detected to obtain the original image corresponding to the image to be detected; extracting the image features of the original image as the image features of the image to be detected.

[0072] The coding information of the image to be detected is obtained by encoding the image to be detected.

[0073] As shown in Table 1 below, the contents of the image file uploaded through the specified client interface include: image type, attached BASE64 encoding (i.e., encoding information of the image to be detected), submitting user, ladder type, image identifier, etc.

[0074] Table 1 Contents of image files

[0075]

[0076] As you can understand, when users upload images to the client, to ensure reliable transmission, they are encoded, for example, using Base64 encoding. Base64 encoding converts binary data into text, preventing loss or corruption during transmission and enabling reliable transmission between various systems.

[0077] Furthermore, after the server receives the image file of the image to be detected, it needs to first decode the encoded information of the image to be detected, restore it to a pixel matrix, obtain the original image corresponding to the image to be detected, and further extract the image features of the original image as the image features of the image to be detected.

[0078] In an exemplary embodiment, the step of extracting image features of the original image includes: extracting texture features of the original image through a gray level co-occurrence matrix, and extracting global features of the original image; and determining the texture features and the global features as image features of the original image.

[0079] In a specific implementation, the image features of the original image are extracted, including extracting the global features and texture features of the original image.

[0080] Global features are features extracted from the entire image, typically based on pixel information across the entire image rather than local regions. They provide information about the overall image content and structure. For example, global features extracted from the original image might include pixel mean and pixel standard deviation.

[0081] Texture features can be extracted using the gray-level co-occurrence matrix (GLCM). The GLCM describes the spatial relationship between pixels of different grayscale levels in an image. Statistical analysis of the gray-level co-occurrence matrix (GLCM) yields various texture features, such as contrast, energy, and entropy. These texture features describe the texture information of an image. Specifically, to extract texture features from an original image using the GLCM, the original image is first converted to a grayscale image. A GLCM is defined to record the spatial relationship between different pixel grayscale levels. Based on a specified distance and angle, the grayscale level of each pair of pixels in the original image is calculated, and the corresponding values ​​in the GLCM are updated. Based on the resulting GLCM, various texture features, such as contrast, energy, and entropy, are calculated as the texture features of the image to be detected.

[0082] It is understood that since the original image can have multiple global features and texture features, in practical applications, one texture feature and one global feature can be selected from various texture features and one global feature, respectively, to obtain a texture feature and a global feature as the image feature of the original image. Alternatively, multiple texture features and multiple global features can be selected as the image feature of the original image based on actual needs.

[0083] It should be noted that under normal circumstances, calculating hash values ​​for duplicate image detection is more efficient than calculating eigenvalues. However, since the images to be detected in this application are elevator maintenance images, there is a need to detect anomalies in the images to be detected. In any case, it is necessary to calculate the eigenvalues ​​corresponding to the gray-level co-occurrence matrix as image description values. Therefore, reusing the eigenvalues ​​of the gray-level co-occurrence matrix for duplicate detection on this basis will be more efficient than calculating hash values ​​and then performing duplicate detection.

[0084] In one embodiment, Figure 3 As shown, the image features of the image to be detected are extracted, including:

[0085] Step S310: decoding the coded information of the image to be detected to obtain the original image corresponding to the image to be detected;

[0086] Step S320, extracting texture features of the original image through the gray level co-occurrence matrix, and extracting global features of the original image;

[0087] Step S330: Determine the texture features and the global features as image features of the image to be detected.

[0088] In this embodiment, considering the need to use the gray level co-occurrence matrix method for anomaly detection, the value calculated by the gray level co-occurrence matrix is ​​also used as the "fingerprint" of the image for repeatability detection, thereby improving the efficiency of repeated image detection.

[0089] In an exemplary embodiment, the method further includes: when the image identification of the image to be detected is uploaded online, or no image matching both the user identification and the image features is found in the database, performing anomaly detection on the image to be detected based on the image features.

[0090] In a specific implementation, after receiving the image file of the image to be detected, the server 104 first determines the upload method of the image to be detected based on the image identifier in the image file. If it is determined that the image to be detected was uploaded online, then no duplicate detection is required, and the image features of the image to be detected can be directly reused to perform anomaly detection. If no image matching both the user identifier and the image features is found in the database, that is, the image in the database does not match the image to be detected in at least one of the two dimensions of user identifier and image features, then the image to be detected is determined to be a non-duplicate image, and the image features of the image to be detected can be reused to perform anomaly detection.

[0091] In this embodiment, since the image features used for repeatability detection are extracted based on the features required for anomaly detection, when the image identification of the image to be detected is uploaded online, or no image matching both the user identification and the image features is found from the database, and it is determined that the image to be detected is a non-repeated image, the image features of the image to be detected can be directly used to perform anomaly detection on it, thereby improving the image efficiency of the image to be detected and avoiding the waste of time caused by the extracted image features for repeatability detection being unusable for anomaly detection and the need to re-extract features.

[0092] In an exemplary embodiment, performing abnormality detection on the image to be detected based on the image features specifically includes: inputting the image features of the image to be detected into a trained detection model to obtain an abnormality detection result of the image to be detected.

[0093] In a specific implementation, the detection model can be a support vector machine (SVM) model, and a radial basis function (RBF) can be used as a kernel function. Through this kernel function, the data can be mapped to a higher-dimensional space, making it easier for the originally nonlinear and inseparable image data to be linearly segmented in the new space. In addition, the parameters of the radial basis function kernel (such as the width of the Gaussian kernel) can be adjusted to make the support vector machine model better adaptable to different types of image data.

[0094] A binary classification support vector machine model can be pre-trained using a training dataset. The training dataset includes sample images, which may include positive and negative sample images. Each sample image has a corresponding label, such as qualified or unqualified, represented by 0 or 1, and the image features of each sample image are extracted. During each training process, the image features of a sample image are used as input variables, and the label of the sample image is used as supervisory information for training. Specifically, after the input variables are input into the support vector machine model for processing, a predicted category is output. A loss value is calculated based on the predicted category and the label of the corresponding sample image. The model parameters are adjusted based on the loss value until the training end condition is met or the loss value converges, resulting in a trained support vector machine model. The decision boundary is determined based on the trained support vector machine model. This boundary classifies new input data into different categories, such as abnormal and normal, thereby achieving anomaly detection for the image to be detected.

[0095] After the support vector machine model is trained, the image features of the image to be tested can be input into the trained support vector machine model. If the output result is a qualified image, the detection result of the image to be tested is determined to be normal. Conversely, if the output result is an unqualified image, the detection result of the image to be tested is determined to be abnormal.

[0096] In this embodiment, anomaly detection is performed on the image to be detected using a support vector machine. The support vector machine's characteristic of determining the decision boundary by maximizing the classification interval can resist the interference of noisy data and improve the accuracy and stability of anomaly detection. In addition, the support vector machine constructs a hyperplane in a high-dimensional space and can effectively process the feature representation of high-dimensional data such as images. Therefore, using the support vector machine in the image anomaly detection task can handle complex feature spaces and better distinguish normal and abnormal samples. Using the support vector machine as a detection model for image anomaly detection can fully utilize its advantages in high-dimensional data processing, generalization ability, noise resistance, and interpretability, thereby achieving better anomaly detection results.

[0097] In an exemplary embodiment, the historically uploaded images have a timestamp; the method further comprises: regularly updating the images in the database according to the timestamps of the images stored in the database.

[0098] In specific implementations, after detecting anomalies in an image, the server stores the image's texture features, global features, and user ID in the database, along with the corresponding timestamp. This means the data is written to the database in the form: [user ID, image features (global features, texture features), timestamp]. The user ID and image features can be uniquely constrained using the SQL "unique" function: UNIQUE(worker_id, glcm1, glcm2), where worker_id represents the user ID, and glcm1 and glcm2 represent the global features and texture features, respectively.

[0099] Considering that the amount of data stored in a database will increase over time, images in the database can be updated regularly based on their timestamps. Specifically, a data volume threshold can be set. When the amount of data stored in the database exceeds this threshold, older data can be purged to meet the database's storage needs. Alternatively, data older than a predetermined time can be periodically deleted, for example, by using a timestamp to delete data entries older than 30 days.

[0100] In this embodiment, by regularly updating the database and deleting data, the database storage space can be freed up, and the efficiency and performance of the database can be improved. Deleting data that has been stored for too long can reduce data redundancy and speed up query speed, making the database respond more quickly.

[0101] In one embodiment, in order to facilitate those skilled in the art to understand the embodiments of the present application, the following will be described with reference to specific examples in conjunction with the accompanying drawings. Figure 4 , shows a flow chart of an image processing method, including the following steps:

[0102] (1) Obtaining an image file of an image to be detected sent by a user; the image file includes a user ID of the user and an image ID of the image to be detected, wherein the image ID is used to represent an upload method of the image to be detected.

[0103] (2) Determine the image identifier of the image to be detected.

[0104] 2.1 If the image is identified as being uploaded offline, the global features and texture features of the image to be detected are extracted as image features; the database is queried based on the global features, texture features and user identification.

[0105] 2.1.1 If an image matching the global features, texture features, and user identification is found, the image to be detected is determined to be a duplicate image.

[0106] 2.1.2 If no image matching the global features, texture features, and user identification is found, the image to be detected is determined to be a non-duplicate image and anomaly detection is performed on it.

[0107] 2.2 If the image is marked as uploaded online, anomaly detection is performed based on the image features.

[0108] (3) After the anomaly detection is completed, the timestamp is recorded, and the timestamp, user ID, texture features and global features are bound and stored in the database.

[0109] In this embodiment, after obtaining the image file of the image to be inspected, the upload method of the image to be inspected is first determined based on the image identifier included in the image file to determine whether the image to be inspected needs to be checked for repeatability. This allows for targeted repeatability testing, avoiding the time wasted by performing repeatability testing on images that do not require repeatability testing. If the image identifier indicates an image uploaded online, repeatability testing is not required, and anomaly detection can be performed directly. If the image identifier indicates an image uploaded offline, repeatability testing is required, and image features of the image to be inspected are further extracted. A database is then queried based on features from two dimensions, namely, user identifier and image features, to improve the reliability and accuracy of the query results. If a target image matching both the user identifier and image features is found in the database, the image to be inspected is determined to be a duplicate image; otherwise, it is a non-duplicate image and anomaly detection is performed. This enables the detection of duplicate images in elevator maintenance scenarios, allowing duplicate images to be discarded when detected, eliminating the need for further review, thereby improving review efficiency. At the same time, since the image features used for repeatability detection are extracted based on the features required for anomaly detection, when the image identification of the image to be detected is uploaded online, or no image matching both the user identification and the image features is found in the database, and it is determined that the image to be detected is a non-repeated image, the image features of the image to be detected can be directly used to perform anomaly detection on it, thereby improving the image efficiency of the image to be detected and avoiding the waste of time caused by the extracted image features for repeatability detection being unusable for anomaly detection and the need to re-extract features.

[0110] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0111] Based on the same inventive concept, the present application also provides a duplicate image detection device for implementing the duplicate image detection method described above. The solution provided by this device is similar to the solution described in the method described above. Therefore, the specific limitations of one or more duplicate image detection device embodiments provided below can be found in the limitations of the duplicate image detection method described above and will not be repeated here.

[0112] In one embodiment, Figure 5 As shown, a repeated image detection device is provided, comprising: an image acquisition module 510, a feature extraction module 520 and a repeatability detection module 530, wherein:

[0113] The image acquisition module 510 is used to acquire an image file of an image to be detected sent by a user; the image file includes a user ID of the user and an image ID of the image to be detected, and the image ID is used to indicate the upload method of the image to be detected;

[0114] A feature extraction module 520 is configured to extract image features of the image to be detected if the image identifier of the image to be detected is offline upload;

[0115] The duplication detection module 530 is used to query a preset database based on the user identification and image features. When a target image matching both the user identification and the image features is found in the database, the image to be detected is determined to be a duplicate image.

[0116] In one embodiment, the image file also includes coding information of the image to be detected; the feature extraction module 520 is further used to decode the coding information of the image to be detected to obtain the original image corresponding to the image to be detected; and extract image features of the original image as image features of the image to be detected.

[0117] In one embodiment, the feature extraction module 520 is further configured to extract texture features of the original image and global features of the original image through a gray level co-occurrence matrix; and determine the texture features and global features as image features of the original image.

[0118] In one embodiment, the device further includes an anomaly detection module for performing anomaly detection on the image to be detected based on the image features when the image identifier of the image to be detected is uploaded online, or when no target image matching both the user identifier and the image features is found in the database.

[0119] In one embodiment, the anomaly detection module is further configured to input the image features of the image to be detected into a trained detection model to obtain an anomaly detection result of the image to be detected.

[0120] In one embodiment, the historically uploaded images have a timestamp; the apparatus further comprises a database updating module for regularly updating the images in the database according to the timestamps of the images stored in the database.

[0121] In one embodiment, the image features include texture features and global features; the repeatability detection module 530 is further used to determine historical images uploaded by the user in the database based on the user identification; compare the texture features and global features of the historical images and the image to be detected respectively, and determine the historical image whose similarity with the texture features and global features of the image to be detected reaches a threshold as the target image that matches both the user identification and the image features.

[0122] Each module in the above-mentioned duplicate image detection device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0123] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data in the duplicate image detection process. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a duplicate image detection method is implemented.

[0124] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0125] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0126] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0127] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0128] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0129] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.

[0130] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0131] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A repeated image detection method, characterized in that: The method comprises: Acquire an image file of an image to be detected sent by a user; the image file includes a user ID of the user and an image ID of the image to be detected, the image ID being used to characterize an upload method of the image to be detected; If the image identifier of the image to be detected is offline upload, extracting image features of the image to be detected; A preset database is queried according to the user identification and the image features. When a target image matching both the user identification and the image features is found in the database, the image to be detected is determined to be a duplicate image.

2. The method according to claim 1, characterized in that The image file also includes coding information of the image to be detected; The extracting the image features of the image to be detected includes: Decoding the encoded information of the image to be detected to obtain an original image corresponding to the image to be detected; The image features of the original image are extracted as the image features of the image to be detected.

3. The method according to claim 2, characterized in that The extracting the image features of the original image includes: Extracting texture features of the original image through a gray level co-occurrence matrix, and extracting global features of the original image; The texture features and the global features are determined as image features of the original image.

4. The method according to claim 1, wherein The method further comprises: When the image identification of the image to be detected is uploaded online, or a target image matching both the user identification and the image features is not found in the database, anomaly detection is performed on the image to be detected based on the image features.

5. The method according to claim 4, characterized in that The performing abnormality detection on the image to be detected according to the image features includes: The image features of the image to be detected are input into a trained detection model to obtain an abnormality detection result of the image to be detected.

6. The method according to claim 1, wherein The historical uploaded images have a timestamp; The method further comprises: The images in the database are updated regularly according to the timestamps of the images stored in the database.

7. A repeated image detection device, characterized in that: The device comprises: An image acquisition module is used to acquire an image file of an image to be detected sent by a user; the image file includes a user ID of the user and an image ID of the image to be detected, and the image ID is used to indicate the upload method of the image to be detected; A feature extraction module, configured to extract image features of the image to be detected if the image identifier of the image to be detected is offline upload; The repeatability detection module is used to query a preset database based on the user identification and the image features, and when a target image that matches both the user identification and the image features is found in the database, the image to be detected is determined to be a repeating image.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the repeated image detection method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the repeated image detection method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the repeated image detection method according to any one of claims 1 to 6 are implemented.