Image recognition method and device, electronic equipment and computer readable storage medium

By using image matching and text matching technologies, duplicate and non-compliant images in community events are identified and removed, solving the problem of inaccurate recording caused by grid workers' laziness and improving the accuracy of community event recording.

CN115563330BActive Publication Date: 2026-03-27SHANXI TOPCHANCE INFORMATION TECH IND
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-20
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Grid workers may be lazy and upload previously uploaded photos, leading to inaccurate records of community events. How can we improve the accuracy of recording community events?

Method used

By acquiring current and historical community event information, and based on image and text matching, duplicate or non-compliant images are identified and deleted. An image classifier is used to identify feature targets, and accuracy is controlled through account information management permissions.

Benefits of technology

It improved the accuracy of community event recording, reduced the occurrence of duplicate and inconsistent images, and enhanced the reliability of event recording.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115563330B_ABST
    Figure CN115563330B_ABST
Patent Text Reader

Abstract

The application relates to an image recognition method and device, electronic equipment and computer readable storage medium, and relates to the field of image processing. The method comprises the following steps: acquiring current community event information and historical community event information, wherein the current community event information comprises a current community event image, the historical community event information comprises a historical community event image, a current repeated image is determined from the current community event image based on the current community event image and the historical community event image, and the current repeated image is deleted. The image recognition method, device, electronic equipment and computer readable storage medium provided by the application can reduce the current repeated image, so that the accuracy of recording the community event is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and in particular to a method, apparatus, electronic device, and computer-readable storage medium for image recognition. Background Technology

[0002] Grid workers are a group that digitizes resident information and serves community residents. Grid workers report community events based on what happens in the community. They record community events with text and photos, upload the text and photos, and send them to the maintenance department. The maintenance department then processes the community events based on the text and photos. With the development of science and technology, the role of recording community events in society is becoming increasingly important.

[0003] During their research, the inventors discovered that some grid workers might be lazy and upload previously uploaded photos, causing confusion and leading to inaccurate records of community events. Therefore, improving the accuracy of community event recording is becoming increasingly important. Summary of the Invention

[0004] The purpose of this application is to provide an image recognition method, apparatus, electronic device, and computer-readable storage medium to solve at least one of the above problems.

[0005] The above-mentioned inventive objective of this application is achieved through the following technical solutions:

[0006] Firstly, an image recognition method is provided, the method comprising:

[0007] Acquire current community event information and historical community event information, wherein the current community event information includes: current community event images, and the historical community event information includes: historical community event images;

[0008] Based on the current community event image and the historical community event images, determine the current repeating image from the current community event image;

[0009] Delete the currently duplicate image.

[0010] In one possible implementation, determining the current repeating image from the current community event image based on the current community event image and the historical community event images includes:

[0011] The current community event image is scaled to obtain a current scaled image, and the historical community event image is scaled to obtain a historical scaled image;

[0012] The current zoomed image is converted to grayscale to obtain the current grayscale value corresponding to the current community event image, and the historical zoomed image is converted to grayscale to obtain the historical grayscale value corresponding to the historical community event image.

[0013] The image matching value is calculated based on the current grayscale value and the historical grayscale value, and the current duplicate image is determined from the current community event image based on the image matching value and the preset image matching value.

[0014] In another possible implementation, the current community event information further includes: current community event text; the method further includes:

[0015] Establish a first correspondence between the current community event image and the current community event text;

[0016] Based on the first correspondence, the current community event image and the current community event text are matched to determine the current non-matching image.

[0017] In another possible implementation, the step of matching the current community event image and the current community event text based on the first correspondence to determine the current non-compliant image includes:

[0018] Extract the current feature target from the current community event image;

[0019] The current feature target is identified using an image classifier to obtain the classification label corresponding to the current community event image. The image classifier is trained based on image data.

[0020] Based on the first correspondence, the category label and the text of the current community event are matched to obtain the text matching value;

[0021] The text matching value is compared with the preset text matching value to determine the current image that does not match.

[0022] In another possible implementation, the deletion of the currently duplicate image includes:

[0023] Delete the currently duplicate image and the currently non-compliant image.

[0024] In another possible implementation, the method further includes:

[0025] Get login account information;

[0026] Establish a second correspondence between the login account information and the current community event image, and establish a third correspondence between the login account information and the historical community event image;

[0027] In another possible implementation, the historical community event image includes: historical repeating images and historical non-conforming images;

[0028] The method further includes:

[0029] Based on the third correspondence, the login account information, and the historical community event images, the number of historical errors corresponding to each login account information is determined. The number of historical errors includes the number of historical duplicate images and the number of historical non-compliant images.

[0030] Based on the second correspondence, the login account information, and the current community event image, the current error count corresponding to each login account information is determined. The current error count includes: the current number of duplicate images and the current number of non-compliant images.

[0031] Based on the historical number of repeated images, the historical number of non-compliant images, the current number of repeated images, the current number of non-compliant images, and preset weights, the error scores corresponding to each login account information are calculated. The preset weights include: preset repetition count weights and preset non-compliant count weights.

[0032] Based on the error score and the preset error score threshold, the current abnormal account information is determined from each current account information, and the management permissions of the current abnormal account information are closed.

[0033] Secondly, an image recognition apparatus is provided, the apparatus comprising:

[0034] The first acquisition module is used to acquire current community event information and historical community event information. The current community event information includes: current community event images, and the historical community event information includes: historical community event images.

[0035] The first determining module is used to determine the current repeating image from the current community event image based on the current community event image and the historical community event images;

[0036] The deletion module is used to delete the currently duplicate image.

[0037] In one possible implementation, when the first determining module determines the current repeating image from the current community event image based on the current community event image and the historical community event images, it is specifically used for:

[0038] The current community event image is scaled to obtain a current scaled image, and the historical community event image is scaled to obtain a historical scaled image;

[0039] The current zoomed image is converted to grayscale to obtain the current grayscale value corresponding to the current community event image, and the historical zoomed image is converted to grayscale to obtain the historical grayscale value corresponding to the historical community event image.

[0040] The image matching value is calculated based on the current grayscale value and the historical grayscale value, and the current duplicate image is determined from the current community event image based on the image matching value and the preset image matching value.

[0041] In another possible implementation, the current community event information further includes: the text of the current community event;

[0042] The device further includes: a first establishing module and a matching module, wherein...

[0043] The first establishment module is used to establish a first correspondence between the current community event image and the current community event text;

[0044] The matching module is used to match the current community event image and the current community event text based on the first correspondence relationship to determine the current non-matching image.

[0045] In another possible implementation, when the matching module matches the current community event image and the current community event text based on the first correspondence and determines that the current image does not match, it is specifically used for:

[0046] Extract the current feature target from the current community event image;

[0047] The current feature target is identified using an image classifier to obtain the classification label corresponding to the current community event image. The image classifier is trained based on image data.

[0048] Based on the first correspondence, the category label and the text of the current community event are matched to obtain the text matching value;

[0049] The text matching value is compared with the preset text matching value to determine the current image that does not match.

[0050] In another possible implementation, the deletion module, when deleting the currently duplicate image, is specifically used for:

[0051] Delete the currently duplicate image and the currently non-compliant image.

[0052] In another possible implementation, the apparatus further includes: a second acquisition module and a second establishment module, wherein,

[0053] The second acquisition module is used to acquire login account information;

[0054] The second establishment module is used to establish a second correspondence between the login account information and the current community event image, and to establish a third correspondence between the login account information and the historical community event image.

[0055] In another possible implementation, the historical community event image includes: historical repeating images and historical non-conforming images;

[0056] The device further includes: a second determining module, a third determining module, a calculation module, and a fourth determining module, wherein,

[0057] The second determining module is used to determine the number of historical errors corresponding to each login account based on the third correspondence, the login account information, and the historical community event images. The number of historical errors includes the number of historical duplicate images and the number of historical non-compliant images.

[0058] The third determining module is used to determine the current error count corresponding to each login account information based on the second correspondence, the login account information, and the current community event image. The current error count includes: the current number of duplicate images and the current number of non-compliant images.

[0059] The calculation module is used to calculate the error score corresponding to each login account information based on the number of historical duplicate images, the number of historical non-compliant images, the number of current duplicate images, the number of current non-compliant images, and a preset weight. The preset weight includes a preset duplicate count weight and a preset non-compliant count weight.

[0060] The fourth determining module is used to determine the current abnormal account information from each current account information based on the error score and the preset error score threshold, and to close the management permissions of the current abnormal account information.

[0061] Thirdly, an electronic device is provided, the electronic device comprising:

[0062] One or more processors;

[0063] Memory;

[0064] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to perform operations corresponding to the image recognition method as shown in any possible implementation of the first aspect.

[0065] Fourthly, a computer-readable storage medium is provided, the storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement an image recognition method as shown in any possible implementation of the first aspect.

[0066] In summary, this application includes at least one of the following beneficial technical effects:

[0067] This application provides an image recognition method, apparatus, electronic device, and computer-readable storage medium. Compared with related technologies, in this application, current community event information and historical community event information are obtained. The current community event information includes current community event images, and the historical community event information includes historical community event images. After obtaining the current community event images and historical community event images, current duplicate images are determined based on the current community event images and historical community event images, so as to delete the current duplicate images, thereby reducing the number of current duplicate images and improving the accuracy of recording community events. Attached Figure Description

[0068] Figure 1 This is a schematic flowchart of an image recognition method provided in an embodiment of this application.

[0069] Figure 2 This is a schematic diagram of the structure of an image recognition device provided in an embodiment of this application.

[0070] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0071] The present application will be further described in detail below with reference to the accompanying drawings.

[0072] This specific embodiment is merely an explanation of this application and is not intended to limit it. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they fall within the scope of the claims of this application.

[0073] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0074] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.

[0075] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.

[0076] This application provides an image recognition method executed by an electronic device, which can be a server or a terminal device. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smartphone, tablet, laptop, desktop computer, etc., but is not limited to these. The terminal device and the server can be directly or indirectly connected via wired or wireless communication. This application does not impose any limitations on this connection. Figure 1 As shown, the method may include:

[0077] Step S101: Obtain current community event information and historical community event information.

[0078] The current community event information includes images of the current community event, and the historical community event information includes images of the historical community events.

[0079] In this embodiment of the application, the current community event image is an image of the current community event. For example, if a circuit failure occurs in Block E of Building 6, the current community event image is a photo of the circuit failure at that location. In this embodiment of the application, before the electronic device obtains the current community event information, the information collection device collects the current community event information. When the user's trigger command is detected, the information collection device collects the current community event information.

[0080] Furthermore, in order to analyze the current repeating image, the electronic device can obtain the current community event information from the information collection device. The electronic device can obtain the current community event information from the information collection device when it detects a current repeating image detection command triggered by the user.

[0081] In this embodiment of the application, after the electronic device obtains the current community event information, the cloud storage device can store the current community event. Furthermore, in this embodiment, the current community event information can also be stored locally, or it can be sent to other devices for storage, such as a USB flash drive.

[0082] It should be noted that the information collection device can be a device independent of the aforementioned electronic devices, such as a mobile terminal, or it can be an information collection module that is part of the aforementioned electronic devices.

[0083] To determine the current repeating image, historical community event information is also needed. This information can be obtained from local storage or from other devices, such as the cloud.

[0084] The historical community event information can be the ten minutes or the month before the current moment corresponding to the current community event information. The specific time range is not limited in this application embodiment.

[0085] Step S102: Based on the current community event image and historical community event images, determine the current repeating image from the current community event image.

[0086] In the embodiments of this application, the current duplicate image is the same as the historical community event image. After obtaining the current community event image and the historical community event image, the current duplicate image is determined from the current community event image by comparing the current community event image and the historical community event image. For example, the current community event image 2 is determined to be the current duplicate image from the current community event image 1, the current community event image 2 and the current community event image 3.

[0087] Step S103: Delete the current duplicate images.

[0088] In this application embodiment, after obtaining the current community event image and determining the current duplicate image in the above application embodiment, the current duplicate image is deleted to remove the current duplicate image and reduce the duplication rate between the current community event image and the historical community event image.

[0089] This application provides an image recognition method. Compared with related technologies, in this application, by acquiring current community event information and historical community event information, wherein the current community event information includes current community event images and the historical community event information includes historical community event images, after obtaining the current community event images and historical community event images, based on the current community event images and historical community event images, current duplicate images are identified so that the current duplicate images can be deleted to reduce the number of current duplicate images, thereby improving the accuracy of recording community events.

[0090] One possible implementation of this application embodiment is that step S102, based on the current community event image and historical community event images, determines the current repeating image from the current community event image. Specifically, this may include steps S1021 (not shown in the figure), S1022 (not shown in the figure), and S1023 (not shown in the figure), wherein...

[0091] Step S1021: Scale the current community event image to obtain the current scaled image, and scale the historical community event image to obtain the historical scaled image.

[0092] In the embodiments of this application, scaling the current community event image and the historical community event image is a process of adjusting the size of the current community event image and the historical community event image. In order to preserve the structure of the current community event image and the historical community event image and remove details, the current community event image and the historical community event image are scaled to obtain the current scaled image and the historical scaled image, respectively. For example, the current community image 1 is scaled to a size of 8*8 to obtain the current scaled image 1.

[0093] Furthermore, the step of scaling the current community event image to obtain the current scaled image can be performed after the step of scaling the historical community event image to obtain the historical scaled image, or before the step of scaling the historical community event image to obtain the historical scaled image, or it can be performed simultaneously with the step of scaling the historical community event image to obtain the historical scaled image.

[0094] Step S1022: Convert the current zoomed image to grayscale to obtain the current grayscale value corresponding to the current community event image, and convert the historical zoomed image to grayscale to obtain the historical grayscale value corresponding to the historical community event image.

[0095] In the embodiments of this application, converting the current zoomed image and the historical zoomed image to grayscale is the process of converting the current zoomed image and the historical zoomed image into grayscale images. Grayscale conversion is the process of making the red, green and blue light components of the current zoomed image and the historical zoomed image equal. The current grayscale value of each pixel can be obtained by averaging the brightness of the three light components corresponding to each pixel in the current zoomed image, and the historical grayscale value of each pixel can be obtained by averaging the brightness of the three light components corresponding to each pixel in the historical zoomed image.

[0096] Step S1023: Calculate the image matching value based on the current grayscale value and the historical grayscale value, and determine the current duplicate image from the current community event image based on the image matching value and the preset image matching value.

[0097] After obtaining the current grayscale value and the historical grayscale value in the above embodiment, the current grayscale value is compared with the grayscale value of each row of adjacent pixels corresponding to the current scaled image after grayscale conversion. If the grayscale value of the next pixel in each row is greater than the grayscale value of the previous pixel, it is recorded as 1, and if the grayscale value of the next pixel in each row is less than the grayscale value of the previous pixel, it is recorded as 0. Thus, the hash value corresponding to each current community event image is obtained. And by comparing the grayscale values ​​of each row of adjacent pixels corresponding to the historical scaled image after grayscale conversion, the hash value corresponding to each historical community event image is obtained.

[0098] Furthermore, after obtaining the hash values ​​corresponding to each current community event image and each historical community event image, the number of different bits in the hash values ​​corresponding to each current community event image and each historical community event image is compared. The number of different bits is the image matching value corresponding to the current community event image. If the number of different bits between the current community event image a and the historical community event image is smaller, the probability that the current community event image is a current duplicate image is higher. The image matching value is further compared with the preset image matching value. If the image matching value is less than the preset image matching value, the current community event image corresponding to the image matching value is the current duplicate image. For example, if the image matching value corresponding to the current community image a is 5 and the preset image matching value is 8, then the current community image a is the current duplicate image.

[0099] In this embodiment of the application, by scaling and grayscale the current community event, the current grayscale value and the historical grayscale value are obtained, which reduces the amount of processing required to determine the current repeated image and thus improves the efficiency of determining the current repeated image.

[0100] Furthermore, to make the current community event information more accurate, the current community event information also includes: the text of the current community event;

[0101] The method may further include: step Sa1 (not shown in the figure) and step Sa2 (not shown in the figure), wherein,

[0102] Step Sa1: Establish the first correspondence between the current community event image and the current community event text.

[0103] In this embodiment of the application, in order to make the obtained current community event information more accurate, a first correspondence between the current community event image and the current community event text is established, and the first correspondence is stored in the database. For example, the current community event image a is a photo of a circuit fault, and the current community event text corresponding to the current community event image a is "Circuit fault occurred in Building 6, Block A".

[0104] Step Sa2: Based on the first correspondence, match the current community event image and the current community event text to determine the current non-matching image.

[0105] In this embodiment of the application, in order to further improve the accuracy of community event information, when recording community events, there may be situations where the current community event text and the current community event image do not correspond. The current community event text and the current community event image are matched to determine the current mismatched image. For example, the current community event text is "Circuit fault occurred in Building 6a" and the corresponding current community image is a picture of a blocked sewer. To avoid this situation, it is necessary to match the current community text and the current community event image. By matching the current community event image and the current community event text, the current mismatched image is determined, thereby further ensuring the accuracy of recording community events.

[0106] Specifically, in step Sa2, based on the first correspondence, the current community event image and the current community event text are matched to determine the current non-matching image. This may further include:

[0107] Step Sa201: Extract the current feature target from the current community event image.

[0108] In this embodiment of the application, each current community event image is composed of countless pixels, and each pixel is determined by the grayscale values ​​of three colors: red, green, and blue. Pixels whose grayscale values ​​of the three colors are within a preset threshold are defined as the outline of the same color region. The same color region may include: the image region of the same object. The position of the same color region in the current community event image is determined. The same color region is located at the center of the current community event image. The same color region may include: the region of the current feature target. Based on the position and outline of the same color region, the current feature target is determined. For example, if the current community event is "circuit damage", then the current feature target of the current community event image is the power supply line.

[0109] Step Sa202: Use an image classifier to identify the current feature target and obtain the classification label corresponding to the current community event image.

[0110] The image classifier is trained based on image data.

[0111] In this embodiment of the application, the image data may include: historical community event images. The role of the image classifier is to assign the current feature target to one of multiple categories. Before using the image classifier to identify the current feature target, multiple images are input into the original classifier for training. The input contains a set of multiple images, and the label of each image is one of multiple classification labels, resulting in a trained image classifier. Based on the texture features of the current feature target, the image classifier is used for identification to obtain the classification label corresponding to the current community event image. For example, the classification label corresponding to the current community event image b is "circuit".

[0112] Step Sa203: Based on the first correspondence, match the category tags with the text of the current community event to obtain the text matching value.

[0113] In this embodiment of the application, after obtaining the classification label corresponding to the current community time image, the current community event text corresponding to the current community event image is determined based on the first correspondence. The classification label and the current community event text are matched using regular expressions, and the text matching value is calculated based on the matching result. For example, if the current community event text corresponding to the current community event image b is "Circuit fault occurred in Building 6, Block A", and the classification label corresponding to the current community event image is "Circuit", then the text matching value is 1.

[0114] Step Sa204: Compare the text matching value with the preset text matching value to determine the current image that does not match.

[0115] In this embodiment of the application, the preset text matching value can be preset by the engineer or by the system. By comparing the text matching value with the preset text matching value, the current community event image that is smaller than the preset text matching value is the current non-compliant image. In this embodiment of the application, by extracting the current feature target of the previous community event image, using an image classifier to obtain the classification label of the current feature target, and matching the classification label with the current community event text, the current non-compliant image is determined, thereby improving the accuracy of determining the current non-compliant image.

[0116] In another possible implementation of this application embodiment, step S104, which involves deleting the currently duplicate image, may specifically include deleting both the currently duplicate image and the currently non-compliant image. In this application embodiment, after determining the currently duplicate image and the currently non-compliant image, to improve the accuracy of the current community event information, the currently duplicate image and the currently non-compliant image are deleted. After deleting the currently duplicate image and the currently non-compliant image, a warning message is sent to the terminal device to warn the grid worker. The terminal device may include a mobile terminal. In this application embodiment, by deleting the currently duplicate image and the currently non-compliant image, the accuracy of recording community events is further improved.

[0117] Another possible implementation of this application embodiment includes: obtaining login account information, which may include: a login account, a login password, and permissions associated with the login account; establishing a second correspondence between the login account information and the current community event image, and establishing a third correspondence between the login account information and historical community event images. In this application embodiment, to determine the relationship between the login account information and the current and historical community event images, a second correspondence between the login account information and the current community event image, and a third correspondence between the login account information and the historical community event image, are established, and these second and third correspondences are stored in a database. For example, the login account information corresponding to the current community event image a is login account information 1, and the login account information corresponding to the current community event image b is login account information 1.

[0118] Furthermore, in this embodiment, the step of establishing a second correspondence between login account information and current community event images can be performed before the step of establishing a third correspondence between login account information and historical community event images, or after the step of establishing a third correspondence between login account information and historical community event images, or simultaneously with the step of establishing a third correspondence between login account information and historical community event images. This is not limited in this embodiment.

[0119] In this embodiment of the application, by obtaining login account information and establishing a second correspondence between login account information and current community event images, as well as a third correspondence between login account information and historical community event images, the current community event images and historical community event images corresponding to the login account information are accurately determined.

[0120] Furthermore, to avoid acquiring currently duplicate or inconsistent images, historical community event images include:

[0121] Historical duplicate images and historical non-conforming images;

[0122] The method may also include: steps Sb1 (not shown in the figure), Sb2 (not shown in the figure), Sb3 (not shown in the figure), and Sb4 (not shown in the figure), wherein step Sb1 may be executed before step Sb2, step Sb1 may be executed after step Sb2, or step Sb1 may be executed simultaneously with step Sb2.

[0123] Step Sb1: Based on the third correspondence, login account information, and historical community event images, determine the number of historical errors corresponding to each login account.

[0124] The number of historical errors includes: the number of historical duplicate images and the number of historical non-compliant images.

[0125] In this embodiment of the application, after determining the third correspondence between login account information and historical community event images, based on the third correspondence, the historical duplicate images and historical non-compliant images corresponding to each login account information are determined. The number of historical duplicate images is the number of historical duplicate images, the number of historical non-compliant images is the number of historical non-compliant images, and the number of historical errors corresponding to the login account information is the number of historical duplicate images and the number of historical non-compliant images corresponding to the login account information.

[0126] Step Sb2: Based on the second correspondence, login account information, and current community event image, determine the current number of errors corresponding to each login account.

[0127] The current error count includes: the current number of duplicate images and the current number of non-compliant images.

[0128] In this embodiment of the application, after determining the second correspondence between login account information and current community event images, based on the third correspondence, the current duplicate images and current non-compliant images corresponding to each login account information are determined to determine the current error count. The number of current duplicate images is the current duplicate image count, and the number of current non-compliant images is the current non-compliant image count. For example, if the current duplicate image corresponding to login account information 1 is current duplicate image a, and login account information 1 has no current non-compliant images, the current duplicate image count corresponding to login account information 1 is 1, and the current non-compliant image count corresponding to login account information 1 is 0, then the current error count corresponding to login account information 1 is 1.

[0129] Step Sb3: Based on the number of historical duplicate images, the number of historical non-compliant images, the number of current duplicate images, the number of current non-compliant images, and preset weights, calculate the error score corresponding to each login account information.

[0130] The preset weights include: preset repetition count weight and preset non-compliance count weight.

[0131] In this embodiment of the application, after obtaining the number of historical duplicate images and the number of historical non-compliant images, the error score of the login account information is calculated based on the number of historical duplicate images, the number of historical non-compliant images, the current number of duplicate images, the current number of non-compliant images, and a preset weight. The preset weight can be preset by the engineer or by the system. For example, the number of historical duplicate images corresponding to login account information 1 is 8, the number of historical non-compliant images is 5, the number of current duplicate images is 0, the number of historical non-compliant images is 1, and the error score corresponding to login account information 1 is 7.2.

[0132] Specifically, based on ω=(ρ0+ρ1)*P+(μ0+μ1)*(1-P), the error score corresponding to the login account information is calculated.

[0133] Where ω represents the error score corresponding to the login account information, ρ0 represents the number of historical duplicate images, ρ1 represents the number of current duplicate images, P represents the preset weight of the number of duplicate images, μ0 represents the number of historical non-compliant images, μ1 represents the number of current non-compliant images, and 1-P represents the preset weight of the number of non-compliant images.

[0134] Step Sb4: Based on the error score and the preset error score threshold, identify the abnormal login account information from each login account information and close the management permissions of the abnormal login account information.

[0135] In this embodiment of the application, after determining the error score, the error score is compared with a preset error score threshold. If the error score is greater than the preset error score threshold, the login account information corresponding to the error score is the current abnormal account information. In this embodiment of the application, the preset error score threshold can be preset by the engineer or by the system. For example, if the error score corresponding to login account information 2 is 25.3 and the preset error score threshold is 20, then login account information 2 is the current abnormal account information.

[0136] Furthermore, after identifying the current abnormal account information, the management permissions for the current abnormal account information are closed. By calculating the error score of the login account information, the current abnormal account information is identified and the management permissions for the current abnormal account information are closed, so as to reduce the occurrence of obtaining the current duplicate image and the current inconsistent image, and further improve the accuracy of recording community events.

[0137] Another possible implementation of this application embodiment involves disabling some permissions of the currently abnormal account information, and may further include: obtaining the future error count corresponding to the abnormal login account information after a preset time interval; if the future error count is less than a preset threshold, then restoring some permissions of the abnormal login account information. In this application embodiment, in order to improve the monitoring efficiency of community event records, after determining the abnormal login account information, the abnormal login account information is further monitored. The preset time interval can be the future error count ten minutes or one hour after the current moment corresponding to the current community event image. The future error count includes: the number of future duplicate images and the number of future non-compliant images. When the future error count corresponding to the abnormal login account information is less than the preset threshold, then the partial permissions of the abnormal login account information are restored.

[0138] In this embodiment of the application, by further monitoring of abnormal login accounts, if the number of future errors corresponding to the abnormal login account is less than a preset threshold (i.e., if the accuracy of the abnormal login account information is improved), the management permissions previously closed for the abnormal login account information are restored, so as to improve the accuracy of recording community events and the management of login account information.

[0139] The above embodiments describe an image recognition method from the perspective of process flow. The following embodiments describe an image recognition device from the perspective of virtual module or virtual unit. For details, please refer to the following embodiments.

[0140] This application provides an image recognition device, such as... Figure 2 As shown, the image recognition device 20 may specifically include: a first acquisition module 21, a first determination module 22, and a deletion module 23, wherein,

[0141] The first acquisition module 21 is used to acquire current community event information and historical community event information. The current community event information includes: current community event images, and the historical community event information includes: historical community event images.

[0142] The first determining module 22 is used to determine the current repeating image from the current community event image based on the current community event image and historical community event images;

[0143] The deletion module 23 is used to delete the currently duplicate images.

[0144] In one possible implementation of this application embodiment, when the first determining module 21 determines the current repeating image from the current community event image based on the current community event image and historical community event images, it is specifically used for:

[0145] The current community event image is scaled to obtain the current scaled image, and the historical community event images are scaled to obtain the historical scaled images;

[0146] Convert the current zoomed image to grayscale to obtain the current grayscale value corresponding to the current community event image, and convert the historical zoomed images to grayscale to obtain the historical grayscale values ​​corresponding to the historical community event images.

[0147] The image matching value is calculated based on the current grayscale value and the historical grayscale value. Based on the image matching value and the preset image matching value, the current duplicate image is determined from the current community event image.

[0148] In another possible implementation of this application embodiment, the current community event information further includes: current community event text;

[0149] Device 20 further includes: a first establishment module and a matching module, wherein,

[0150] The first module is used to establish the first correspondence between the current community event image and the current community event text.

[0151] The matching module is used to match the current community event image and the current community event text based on the first correspondence relationship to determine the current non-matching image.

[0152] In another possible implementation of this application embodiment, when the matching module matches the current community event image and the current community event text based on the first correspondence relationship and determines that the current image does not match, it is specifically used for:

[0153] Extract the current feature target from the current community event image;

[0154] An image classifier is used to identify the current feature target and obtain the classification label corresponding to the current community event image. The image classifier is trained based on image data.

[0155] Based on the first correspondence, the category tags are matched with the text of the current community event to obtain the text matching value;

[0156] The text matching value is compared with the preset text matching value to determine the current image that does not match.

[0157] In another possible implementation of this application embodiment, when deleting the current duplicate image, the deletion module 23 is specifically used for:

[0158] Delete the current duplicate images and the current non-compliant images.

[0159] In another possible implementation, the apparatus further includes: a second acquisition module and a second establishment module, wherein,

[0160] The second acquisition module is used to acquire login account information;

[0161] The second module is used to establish a second correspondence between login account information and current community event images, and to establish a third correspondence between login account information and historical community event images.

[0162] Another possible implementation of this application embodiment includes historical community event images, which include: historical duplicate images and historical non-conforming images;

[0163] Device 20 further includes: a second determining module, a third determining module, a calculation module, and a fourth determining module, wherein,

[0164] The second determining module is used to determine the number of historical errors corresponding to each login account based on the third correspondence, login account information and historical community event images. The number of historical errors includes: the number of historical duplicate images and the number of historical non-compliant images.

[0165] The third determining module is used to determine the current number of errors corresponding to each login account information based on the second correspondence, login account information and current community event image. The current number of errors includes: the current number of duplicate images and the current number of non-compliant images.

[0166] The calculation module is used to calculate the error score corresponding to each login account information based on the number of historical duplicate images, the number of historical non-compliant images, the number of current duplicate images, the number of current non-compliant images, and preset weights. The preset weights include: preset duplicate count weight and preset non-compliant count weight.

[0167] The fourth determination module is used to determine the current abnormal account information from each current account information based on the error score and the preset error score threshold, and to close the management permissions of the current abnormal account information.

[0168] This application provides an image recognition device. Compared with related technologies, in this application, by acquiring current community event information and historical community event information, wherein the current community event information includes current community event images and the historical community event information includes historical community event images, after obtaining the current community event images and historical community event images, based on the current community event images and historical community event images, current duplicate images are determined so that the current duplicate images are deleted, thereby reducing the number of current duplicate images and improving the accuracy of recording community events.

[0169] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the image recognition device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0170] This application provides an electronic device, such as... Figure 3 As shown, Figure 3 The illustrated electronic device 30 includes a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, via a bus 302. Optionally, the electronic device 30 may also include a transceiver 304. It should be noted that in practical applications, the transceiver 304 is not limited to one type, and the structure of this electronic device 30 does not constitute a limitation on the embodiments of this application.

[0171] Processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0172] Bus 302 may include a pathway for transmitting information between the aforementioned components. Bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 302 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The symbol is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0173] The memory 303 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0174] The memory 303 is used to store application code that executes the solution of this application, and its execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the content shown in the foregoing method embodiments.

[0175] Electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Tablet PCs), PMPs (Portable Multimedia Players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Servers can also be included. Figure 3 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0176] This application provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments. Compared with related technologies, in this application embodiment, by acquiring current community event information and historical community event information, wherein the current community event information includes: a current community event image, and the historical community event information includes: a historical community event image, after obtaining the current community event image and the historical community event image, based on the current community event image and the historical community event image, a current duplicate image is determined, so that the current duplicate image is deleted, thereby reducing the number of current duplicate images and improving the accuracy of recording community events.

[0177] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0178] The above are only some embodiments of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method of image recognition, characterized by, The method comprises the following steps: obtaining current community event information and historical community event information, wherein the current community event information comprises current community event images and current community event texts, and the historical community event information comprises historical community event images; determining current repeated images from the current community event images based on the current community event images and the historical community event images; establishing a first correspondence between the current community event images and the current community event texts; extracting current feature targets of the current community event images; identifying the current feature targets by using an image classifier to obtain classification labels corresponding to the current community event images, wherein the image classifier is trained based on picture data; matching the classification labels and the current community event texts based on the first correspondence to obtain a text matching value; comparing the text matching value with a preset text matching value to determine a current non-compliance image; deleting the current repeated images and the current non-compliance image; The method further comprises the following steps: obtaining login account information; establishing a second correspondence between the login account information and the current community event images, and establishing a third correspondence between the login account information and the historical community event images, wherein the historical community event images comprise historical repeated images and historical non-compliance images; determining historical error times corresponding to each login account information based on the third correspondence, the login account information and the historical community event images, wherein the historical error times comprise historical repeated image times and historical non-compliance image times; determining current error times corresponding to each login account information based on the second correspondence, the login account information and the current community event images, wherein the current error times comprise current repeated image times and current non-compliance image times; calculating error scores corresponding to each login account information based on the historical repeated image times, the historical non-compliance image times, the current repeated image times, the current non-compliance image times and preset weights, wherein the preset weights comprise preset repeated times weights and preset non-compliance times weights; determining a current abnormal account information from each current account information based on the error scores and a preset error score threshold, and closing the management authority of the current abnormal account information.

2. The method of claim 1, wherein, The method of determining current repeated images from the current community event images based on the current community event images and the historical community event images comprises the following steps: scaling the current community event images to obtain current scaled images, and scaling the historical community event images to obtain historical scaled images; graying the current scaled images to obtain current gray values corresponding to the current community event images, and graying the historical scaled images to obtain historical gray values corresponding to the historical community event images; calculate an image matching value based on the current gray value and the historical gray value, and determine a current repeated image from the current community event image based on the image matching value and a preset image matching value.

3. An apparatus for image recognition, characterized by, An apparatus for performing the image recognition of any one of claims 1-2, comprising: a first obtaining module configured to obtain current community event information and historical community event information, the current community event information including a current community event image, and the historical community event information including historical community event images; a first determining module configured to determine a current repeated image from the current community event image based on the current community event image and the historical community event images; a deleting module configured to delete the current repeated image.

4. An electronic device, comprising: comprising: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to perform the image recognition method of any one of claims 1-2.

5. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the image recognition method of any one of claims 1-2. The program is executed by the processor to implement the image recognition method of any one of claims 1-2.

Citation Information

Patent Citations

  • Method and system for automatically evaluating grid member report event

    CN114186810A