Data management method and device, storage medium and electronic equipment

By text description and segmentation of the target image data and calculating similarity with the encoded data, the problem of too many similar images in the image database is solved, the accuracy of image recognition and selection is improved, and the operation effect of the instant delivery service platform is optimized.

CN120523978APending Publication Date: 2025-08-22RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510622551.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

There is improper image data management in the image database of the existing instant delivery service platform, resulting in too much identical or similar image data, affecting the transaction party's selection efficiency and operational effect.

Method used

By text description of the target image data, segmenting it into foreground and background images, and combining the encoded data to calculate the similarity, using the similarity comparison of text descriptions, the similarity data in the image database is deleted, and the accuracy of image recognition and similarity calculation is improved.

Benefits of technology

Effectively reduce the repetition rate of similar images in the image database, improve the accuracy and operational efficiency of image selection, and ensure that transaction parties select different and low-similar image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120523978A_ABST
    Figure CN120523978A_ABST
Patent Text Reader

Abstract

The invention discloses a data management method and device, a storage medium and electronic equipment, and the method comprises the steps: obtaining first text data corresponding to target image data, obtaining a first foreground image and a first background image in the target image data, obtaining first similar data in an image database based on the target image data, the first foreground image and the first background image, obtaining target similar data corresponding to the target image data in the first similar data based on the first text data, deleting the target similar data in the image database, and obtaining the target similar data corresponding to the target image data in the image database. By adopting the method, the repetition rate of similar images in the image database is reduced according to the improved accuracy of image recognition and similarity calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a data management method, device, storage medium, and electronic device. Background Art

[0002] Nowadays, with the rapid development of the economy and the popularization of the Internet, instant delivery services have become an indispensable part of people's daily lives. In order to facilitate the parties to select images for display on the instant delivery service platform, the instant delivery service platform is equipped with an image database. However, as the amount of image data continues to increase, the management of image data in the image database has become an issue that cannot be ignored. Summary of the Invention

[0003] The embodiments of this specification provide a data management method, device, storage medium, and electronic device. Similar image data can be obtained by performing similarity calculation based on image data before and after image segmentation, and combining similarity comparison with text descriptions, and the target image data can be deleted from the image database. In addition, the repetition rate of similar images in the image database can be reduced based on the improved accuracy of image recognition and similarity calculation.

[0004] In a first aspect, an embodiment of this specification provides a data management method, the method comprising:

[0005] Acquire first text data corresponding to target image data, where the first text data is used to describe the target image data;

[0006] Acquire a first foreground image and a first background image in the target image data;

[0007] Acquire first similar data in an image database based on the target image data, the first foreground image, and the first background image;

[0008] Based on the first text data, obtaining target similarity data corresponding to the target image data from the first similarity data;

[0009] The target similar data is deleted from the image database.

[0010] Through the above technical solution, first similarity data with similarity meeting the requirements can be obtained in the image database based on the target image data and the segmented image, and then combined with the text data of the text description of the image data, target similarity data similar to the target image data can be obtained in the first similarity data, so that based on the target image data and the segmented image data, combined with the similarity comparison of the text description, target similarity data similar to the target image data can be obtained, and the target similarity data can be deleted from the image database, thereby reducing the repetition rate of similar images in the image database based on the improved accuracy of image recognition and similarity calculation.

[0011] In combination with the first aspect and the above implementation manner, in some possible implementation manners, obtaining the first foreground image and the first background image in the target image data includes:

[0012] Performing region detection on the target image data based on regional features to obtain a foreground region and a background region corresponding to the target image data;

[0013] Acquire a first foreground image corresponding to the foreground area in the target image data;

[0014] A first background image corresponding to the background area in the target image data is obtained.

[0015] Through the above technical solution, the target image data is segmented to obtain the first foreground image and the first background image corresponding to the target image data, so that the target image data can be specifically identified according to the target image data to improve the recognition accuracy of the image data.

[0016] In combination with the first aspect and the foregoing implementation manner, in some possible implementation manners, obtaining first similarity data in an image database based on the target image data, the first foreground image, and the first background image includes:

[0017] Acquire first coded data corresponding to the first foreground image, second coded data corresponding to the first background image, and third coded data corresponding to the target image data;

[0018] obtaining other image data in an image database, and performing similarity calculations on the other image data based on the first coded data, the second coded data, and the third coded data, respectively, to obtain a first similarity corresponding to the first coded data, a second similarity corresponding to the second coded data, and a third similarity corresponding to the third coded data, wherein the other image data is the remaining image data in the image database except the target image data;

[0019] First similarity data corresponding to the target image data is obtained based on the first similarity, the second similarity, and the third similarity.

[0020] Through the above technical solution, the encoding data corresponding to the image data is obtained, and the similarity between the image data is calculated based on the encoding data, so as to achieve accurate calculation of the image data and improve the accuracy of the determined first similar data similar to the target image data.

[0021] In combination with the first aspect and the foregoing implementations, in certain possible implementations, obtaining other image data from the image database and performing similarity calculations with the other image data based on the first coded data, the second coded data, and the third coded data to obtain a first similarity corresponding to the first coded data, a second similarity corresponding to the second coded data, and a third similarity corresponding to the third coded data includes:

[0022] Acquire other image data in an image database, and a second foreground image and a second background image corresponding to the other image data;

[0023] Acquire fourth coded data corresponding to the second foreground image, fifth coded data corresponding to the second background image, and sixth coded data corresponding to the other image data;

[0024] A first similarity between the first encoded data and the fourth encoded data, a second similarity between the second encoded data and the fifth encoded data, and a third similarity between the third encoded data and the sixth encoded data are calculated and obtained.

[0025] In combination with the first aspect and the foregoing implementations, in some possible implementations, calculating to obtain a first similarity between the first encoded data and the fourth encoded data, a second similarity between the second encoded data and the fifth encoded data, and a third similarity between the third encoded data and the sixth encoded data includes:

[0026] performing dimensionality reduction processing on the first coded data, the second coded data, the third coded data, the fourth coded data, the fifth coded data, and the sixth coded data;

[0027] Obtaining a first similarity between the first encoded data after dimensionality reduction and the fourth encoded data after dimensionality reduction;

[0028] Obtaining a second similarity between the second encoded data after dimensionality reduction and the fifth encoded data after dimensionality reduction;

[0029] A third similarity between the third encoded data after dimensionality reduction and the sixth encoded data after dimensionality reduction is obtained.

[0030] Through the above technical solution, similarity calculation is performed based on the encoded data after dimensionality reduction, so as to reduce the computing resources and computing time required for similarity calculation and improve the processing efficiency of similarity calculation.

[0031] In combination with the first aspect and the foregoing implementation manner, in some possible implementation manners, determining first similarity data corresponding to the target image data based on the first similarity, the second similarity, and the third similarity includes:

[0032] determining a first weight of the first similarity, a second weight of the second similarity, and a third weight of the third similarity;

[0033] performing mean processing on a first product result of the first weight and the first similarity, a second product result of the second weight and the second similarity, and a third product result of the third weight and the third similarity to obtain a fourth similarity corresponding to the other image data;

[0034] If the fourth similarity is greater than or equal to the first preset similarity, the other image data corresponding to the fourth similarity is determined as the first similar data corresponding to the target image data.

[0035] Through the above technical solution, the first similarity, the second similarity and the third similarity are averaged according to the weights corresponding to the similarities, so that the first similar data can be determined according to the importance of the similarities, thereby improving the accuracy of the determined first similar data.

[0036] In combination with the first aspect and the above implementation manner, in some possible implementation manners, obtaining the first text data corresponding to the target image data includes:

[0037] Acquire initial text data corresponding to the target image data;

[0038] The initial text data is expanded based on preset text attributes to generate first text data corresponding to the initial text data.

[0039] Through the above technical solution, the initial text data corresponding to the target image data is expanded according to the text attributes to obtain first text data including more image details, thereby improving the accuracy of the generated first text data used to describe the target image data.

[0040] In combination with the first aspect and the above implementation manner, in some possible implementation manners, obtaining target similarity data corresponding to the target image data from the first similarity data based on the first text data includes:

[0041] Acquire second text data corresponding to the first similar data;

[0042] determining a first text similarity between the first text data and the second text data;

[0043] Based on the first text similarity and the first target similarity of the first similarity data, target similarity data corresponding to the target image data is obtained from the first similarity data.

[0044] In combination with the first aspect and the above implementation manner, in some possible implementation manners, obtaining target similarity data corresponding to the target image data from the first similarity data based on the first text similarity and the first target similarity of the first similarity data includes:

[0045] Determining first similar data corresponding to the first text similarity greater than a second preset similarity as second similar data;

[0046] Obtaining a second text similarity corresponding to the second similar data and a fifth weight corresponding to the second text similarity, as well as a second target similarity corresponding to the second similar data and a sixth weight corresponding to the second target similarity;

[0047] Performing mean processing on a fourth product result of the second text similarity and the fifth weight, and a fifth product result of the second target similarity and the sixth weight, to obtain a third target similarity corresponding to the second similar data;

[0048] The second similarity data corresponding to the third target similarity greater than the third preset similarity is determined as target similarity data.

[0049] Through the above technical solution, the similarity calculation is performed on the target image data and other image data in combination with text similarity and image similarity to obtain target similar data that is similar or identical to the target image data, thereby improving the accuracy of the determined target similar data.

[0050] In a second aspect, an embodiment of this specification provides a data management device, the device comprising:

[0051] a text acquiring unit, configured to acquire first text data corresponding to target image data, wherein the first text data is used to describe the target image data;

[0052] an image segmentation unit, configured to obtain a first foreground image and a first background image from the target image data;

[0053] A data acquisition unit, configured to acquire first similar data from an image database based on the target image data, the first foreground image, and the first background image;

[0054] The data acquisition unit is further configured to acquire target similarity data corresponding to the target image data from the first similarity data based on the first text data;

[0055] A deleting unit is used to delete the target similar data in the image database.

[0056] In a third aspect, an embodiment of this specification provides a computer program product, wherein the computer program product stores at least one instruction, and the at least one instruction is suitable for being loaded by a processor and executing the above-mentioned method steps.

[0057] In a fourth aspect, an embodiment of this specification provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the above method.

[0058] In a fifth aspect, an embodiment of this specification provides an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the above method. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0060] Figure 1 A system architecture diagram of a data management method provided in an embodiment of this specification;

[0061] Figure 2 A flowchart of a data management method provided in an embodiment of this specification;

[0062] Figure 3 A flowchart of a data management method provided in an embodiment of this specification;

[0063] Figure 4 This is a schematic diagram of an example of initial text data provided in the embodiments of this specification;

[0064] Figure 5 This is a schematic diagram of an example of image segmentation provided in an embodiment of this specification;

[0065] Figure 6 A schematic diagram of the structure of a data management device provided in an embodiment of this specification;

[0066] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0067] To make the features and advantages of this specification more obvious and easy to understand, the technical solutions in this specification are clearly and completely described below in conjunction with the drawings in this specification. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without making any creative efforts are within the scope of protection of this specification.

[0068] See Figure 1 , which is a system architecture diagram of a data management method provided in the embodiment of this specification. Figure 1 As shown, the data management method provided in the embodiment of this specification can be applied to electronic devices to implement the data management process. The system structure provided in the embodiment of this specification mainly includes an electronic device 10, a database server 20 and target image data 30. Among them, the electronic device 10 can be a device with data processing functions, for example, it can be a personal microcomputer, such as a personal computer, a laptop computer, etc.; the database server 20 can be a server that stores an image database with at least one image data, specifically a large-scale integrated server used by an enterprise, or a microcomputer, such as a personal computer, etc., or a storage space divided in the electronic device 10 for storing image data, and can be set according to actual conditions; the target image data 30 can be data used to deduplicate image data in the image database, specifically any image data in the image database of the database server 20, or image data manually input into the electronic device 10.

[0069] In related technologies, when a transaction party selects or uploads image data on an instant delivery service platform, the transaction party may not be able to quickly select the required image data because the same or similar image data may exist in the image database, or the selected image data may be the same as or displayed by other transaction parties, which is inconvenient for the transaction party to promote the transaction. Therefore, how to manage the image data in the image database has become an urgent problem to be solved.

[0070] In an embodiment of the present specification, the electronic device 10 obtains first text data that textually describes the target image data 30, obtains a first foreground image and a first background image in the target image data 30, and the electronic device 10 obtains first similarity data in the image database of the database server 20 based on the target image data 30, the first foreground image, and the first background image, and obtains target similarity data corresponding to the target image data 30 in the first similarity data based on the first text data. The database server 20 deletes the target similarity data in the image database, thereby obtaining target similarity data similar to the target image data based on the target image data and the segmented image data in combination with the similarity comparison of the text description, and deletes the target similarity data from the image database, thereby reducing the repetition rate of similar images in the image database based on the improved accuracy of image recognition and similarity calculation.

[0071] based on Figure 1 The system architecture shown below will be combined with Figure 2 , a detailed introduction to the data management method provided in the embodiments of this specification is given.

[0072] See Figure 2 , which is a flow chart of a data management method provided in the embodiment of this specification. Figure 2 As shown, the method may include the following steps S101 to S105.

[0073] S101, obtaining first text data corresponding to target image data;

[0074] In one embodiment, target image data used for data management of an image database is obtained, and a text description of the target image data is performed to obtain first text data corresponding to the target image data. The image database may be a database within a delivery service platform that stores image data of items displayed on the delivery service platform. The target image data may be image data input by a user, or any image data within the image database. The first text data may be text data generated by performing a content description of the target image data based on a pre-trained text model, to describe the content included in the target image data, including the method of capturing the content. The content type included in the first text data may be set based on actual circumstances.

[0075] S102, acquiring a first foreground image and a first background image in target image data;

[0076] In one embodiment, the target image data is identified, the foreground area and the background area in the target image data are determined, and the target image data is segmented according to the foreground area and the background area to obtain a first foreground image corresponding to the foreground area in the target image data and a first background image corresponding to the background area. The foreground area can be the area to which the main body of an object in the target image data belongs, and the main body can be the photographed object in the target image data, such as dishes and plates. The background area can be the area to which the background part in the target image data belongs, such as a table. It is understandable that the background area can be the remaining area in the target image data except the foreground area. The first foreground image can be an image generated by segmenting the foreground area in the target image data, specifically, it can be an image generated by extracting the foreground area in the target image data and setting the other areas in the target image data except the foreground area to blank. The first background image can be an image generated by segmenting the background area in the target image data.

[0077] S103, acquiring first similar data in an image database based on the target image data, the first foreground image, and the first background image;

[0078] In one embodiment, other image data and a second foreground image and a second background image corresponding to the other image data are obtained from an image database. Similarities between the target image data and the other image data, the first foreground image and the second foreground image corresponding to the other image data, and the first background image and the second background image corresponding to the other image data are obtained. The similarities are averaged to obtain first similarity data corresponding to the target image data in the other image data. The first similarity data may be image data indicating that the similarity between the target image data and the other image data is greater than a first preset similarity value. The greater the similarity value, the greater the degree of similarity between the target image data and the first similarity data.

[0079] The other image data may be the remaining image data in the image database except the target image data. The second foreground image may be an image generated based on the main portion of the other image data. The second background image may be an image generated based on the background portion of the other image data. The second foreground image and second background image corresponding to the other image data may be images pre-generated and stored in the image database.

[0080] Specifically, the first similarity data may be obtained based on similarity by comparing the similarity corresponding to the other image data after mean processing with a first preset similarity. If the similarity is greater than or equal to the first preset similarity, the other image data is considered to be the first similarity data corresponding to the target image data. The first preset similarity may be a pre-set similarity used to determine whether the degree of similarity between the target image data and the other image data meets a requirement. The specific value of the first preset similarity may be set based on actual circumstances, for example, 95%.

[0081] S104, based on the first text data, obtaining target similar data corresponding to the target image data from the first similar data;

[0082] In one embodiment, second text data corresponding to the first similar data is obtained, and based on a first text similarity between the second text data and the first text data, target similar data corresponding to the target image data in the first similar data is obtained. The second text data may be text data pre-stored in an image database and used to describe the first similar data. The first text similarity may be a degree of text similarity between the target image data and the first similar data. The target similar data may be image data determined in the first similar data based on the first text similarity.

[0083] Specifically, the method of obtaining target similar data from the first similar data according to the first character similarity may be: comparing the first character similarity with a second preset similarity, and determining the first similar data having a first character similarity greater than or equal to the second preset similarity as the target similar data.

[0084] S105, deleting target similar data in the image database;

[0085] In one embodiment, the determined target similar data is deleted in the image database to deduplicate the image data in the image database and reduce the image data in the image database that is similar to the target image data, so that when the transaction party selects image data in the image database, it can select image data that is different from the target image data and has a lower similarity to display the items being sold, thereby improving the transaction operation effect of the transaction party.

[0086] In an embodiment of the present specification, first similarity data with a similarity that meets the requirements is obtained in an image database based on the target image data and the segmented image, and then combined with text data of the textual description of the image data, target similarity data similar to the target image data is obtained in the first similarity data, so that target similarity data similar to the target image data is obtained based on the target image data and the segmented image data, combined with the similarity comparison of the textual description, and the target similarity data is deleted from the image database, thereby reducing the repetition rate of similar images in the image database based on the improved accuracy of image recognition and similarity calculation.

[0087] See Figure 3 , which is a flow chart of a data management method provided in the embodiment of this specification. Figure 3 As shown, the method may include the following steps S201-S212.

[0088] S201, obtaining initial text data corresponding to target image data;

[0089] In one embodiment, target image data for data management in an image database is obtained, and initial text data corresponding to the target image data is obtained. The image database may be a database within a delivery service platform that stores image data of items displayed on the delivery service platform. The target image data may be image data input by a transaction party or R&D personnel, or any image data in the image database. The initial text data may be text data generated by providing a textual description of the target image data based on a pre-trained language model.

[0090] For example, Figure 4 As shown, Figure 4 The target image data in includes “tofu” and “plate”, and the generated initial text data may be “tofu placed on a plate”.

[0091] Furthermore, the language model can include both a visual component and a language component. The visual component can be used to extract image features from sample data, for example, using a ViT (Vision Transformer) model as a visual encoder. The language component can be used to convert image features into text data, for example, using a model based on the Transformer architecture. The language model can be trained by pre-training on sample image data, extracting image features using a visual encoder, and then using the language component model to generate text data based on the image features. It is understood that pre-training the language model can enable the language model to understand the relationship between image data and text data. After obtaining the pre-trained language model, the language model is adjusted based on labeled sample data through downstream tasks such as visual question answering, document visual question answering, and fine-grained visual localization. This allows the language model to improve its understanding of specific image data after training on labeled sample data, reducing the computational cost of the language model while maintaining its generalization ability. Furthermore, the adjusted language model can be fine-tuned for specific instructions to improve the coherence and accuracy of the language model in multi-round conversations, resulting in a fully trained language model.

[0092] It should be noted that a feasible way to train the language model is to train the language model separately based on sample data, labeled sample data and specific instructions at the same time, so as to reduce the time required to train the language model and improve the training efficiency of the language model training.

[0093] S202, expanding the initial text data based on preset text attributes to generate first text data corresponding to the initial text data;

[0094] In one embodiment, preset text attributes are obtained, and a pre-trained language expansion model is used to expand the initial text data based on the text attributes in combination with the target image data, and the image description of the initial text data is enriched to generate first text data corresponding to the initial text data. The text attributes can be content labels for expanding the initial text data, such as perspective, style, raw and cooked food, etc. The text attributes can be manually input by the transaction party, or can be pre-set in the language expansion model, and can be set specifically according to actual conditions. The language expansion model can be a language model for expanding the initial text data, and at least one text attribute can be pre-set in the language expansion model, and the set text attributes can be set according to actual conditions.

[0095] Specifically, the first text data can be data generated by extracting attribute features of the target image data based on text attributes by a language expansion model, and expanding the initial text data according to the attribute features. The attribute features can be image features corresponding to the text attributes in the target image data. Compared with the initial text data, the first text data includes richer details, thereby more comprehensively describing the target image data. For example, if the initial text data is "tofu placed on a plate", and the text attributes are perspective, style, and raw or cooked food, then the generated first text data can be "This is a dish shot from a frontal perspective, with a realistic style, the dish is cooked, and it is tofu placed on a plate." It should be noted that in addition to describing the main part of the target image data, the generated first text data can also include a description of the background of the target image data, such as "the plate is placed on a table with wooden stripes", etc., and the specific setting can be based on actual conditions.

[0096] S203, acquiring a first foreground image and a first background image in the target image data;

[0097] In one embodiment, a pre-trained segmentation model is used to perform region detection on target image data based on regional features to determine foreground and background regions within the target image data. The target image data is then segmented using the segmentation model based on the first and second regions, obtaining a first foreground image corresponding to the foreground region and a first background image corresponding to the background region within the target image data. Regional features may be features used to characterize the content of each region within the target image data. The foreground region may be the region containing the main body of an object within the target image data. The main body may be a photographed object within the target image data, such as a dish or plate. The background region may be the region containing the background portion within the target image data, such as a table. It is understood that the background region may be the remaining region within the target image data excluding the foreground region. The first foreground image may be an image generated by segmenting the foreground region from the target image data. Specifically, it may be an image generated by extracting the foreground region from the target image data and setting the remaining regions within the target image data excluding the foreground region to blank. The first background image may be an image generated by segmenting the background region from the target image data.

[0098] Specifically, the target image data may be segmented to obtain the first foreground data and the first background data by performing region detection on the target image data based on regional features to obtain a foreground region and a background region corresponding to the target image data, obtaining a first foreground image corresponding to the foreground region in the target image data, and obtaining a first background image corresponding to the background region in the target image data. The region detection method for the target image data may also be performed by detecting the target image data based on a region detection model in a pre-trained segmentation model to determine the foreground and background portions in the target image data, determining the foreground portion as the foreground region of the target image data, and determining the background portion as the background region corresponding to the target image data.

[0099] For example, Figure 5 As shown, Figure 5 The target image data includes "tofu placed on a plate, and the plate is placed on a table with wooden stripes". After segmenting the target image data, a first foreground image and a first background image are obtained. The first foreground image is an image generated by extracting the foreground area "tofu placed on a plate" in the target image data, and the first background image is an image generated by extracting the background area "the plate is placed on a table with wooden stripes" in the target image.

[0100] Furthermore, the segmentation model can be an image processing model for segmenting target image data, and the segmentation model includes a region detection model, which is used to perform region detection on the target image data. Furthermore, the training method of the segmentation model can be: obtaining artificially labeled sample labeling data, training the initial segmentation model based on the sample labeling data, and completing the first stage of model training. Based on the data training of the first stage, a region detection model is obtained, and the segmentation model is trained in the second stage based on the unlabeled sample data in combination with the region detection model, and the R&D personnel correct the results output by the segmentation model until the second stage of segmentation model training is completed. The segmentation model that has completed the second stage of training is used to segment the sample data until the segmentation model can achieve the expected accuracy rate for the segmentation of the sample data without the need for R&D personnel to make corrections, and the training of the segmentation model is completed.

[0101] S204, obtaining first coded data corresponding to the first foreground image, second coded data corresponding to the first background image, and third coded data corresponding to the target image data;

[0102] In one embodiment, a visual encoder is used to encode the acquired first foreground image, first background image, and target image data, respectively, to obtain first encoded data corresponding to the first foreground image, second encoded data corresponding to the first background image, and third encoded data corresponding to the target image data. The visual encoder can be used to convert image data into encoded data so that similarity can be subsequently calculated on the image data based on the encoded data. The encoded data can be data representing the image data in matrix form. It is understood that the use of encoded data can facilitate computational processing of the image data.

[0103] S205, acquiring other image data in an image database, and a second foreground image and a second background image corresponding to the other image data;

[0104] In one embodiment, other image data is obtained from an image database, as well as a second foreground image and a second background image corresponding to the other image data stored in the image database. It is understood that when the other image data is stored in the image database, the second foreground image and the second background image corresponding to the other image data are obtained, and the other image data and the second foreground image and the second background image corresponding to the other data are stored together in the image database. It is understood that the obtained other image data may include at least one image data.

[0105] The other image data may be the remaining image data in the image database except the target image data. The second foreground image may be an image corresponding to a foreground area in the other image data. The second background image may be an image corresponding to a background area in the other image data.

[0106] S206, obtaining fourth coded data corresponding to the second foreground image, fifth coded data corresponding to the second background image, and sixth coded data corresponding to other image data;

[0107] In one embodiment, a visual encoder is used to encode each second foreground image, second background image and other image data respectively to obtain fourth encoded data corresponding to each second foreground image, fifth encoded data corresponding to each second background image, and sixth encoded data corresponding to each other image data.

[0108] S207, calculating and obtaining a first similarity between the first coded data and the fourth coded data, a second similarity between the second coded data and the fifth coded data, and a third similarity between the third coded data and the sixth coded data;

[0109] In one embodiment, a first similarity is calculated between the first coded data and the fourth coded data. The first similarity may represent the image similarity between the first foreground image and the second foreground image. A second similarity is calculated between the second coded data and the fifth coded data. The second similarity may represent the image similarity between the first background image and the second background image. A third similarity is calculated between the third coded data and the sixth coded data. The third similarity may represent the image similarity between the target image data and the other image data.

[0110] Furthermore, to improve data processing efficiency, one feasible approach is to perform dimensionality reduction on the first, second, third, fourth, fifth, and sixth encoded data; obtain a first similarity between the first and fourth encoded data after dimensionality reduction; obtain a second similarity between the second and fifth encoded data after dimensionality reduction; and obtain a third similarity between the third and sixth encoded data after dimensionality reduction. The dimensionality reduction process can include reducing each encoded data to a preset dimension. The preset dimension can be a dimensionality threshold determined in advance through testing to ensure the accuracy of similarity calculation. The specific value of the preset dimension can be set based on actual conditions, for example, 128 dimensions. It is understood that because the dimensionality of the encoded data obtained by encoding the image data is relatively high, the amount of computation required for similarity calculation using the unreduced encoded data is far greater than that required for calculation based on the reduced dimensionality encoded data. Therefore, using the reduced dimensionality encoded data to calculate similarity not only reduces computing resource consumption but also improves the efficiency of each similarity calculation.

[0111] For example, the dimension of the encoded data obtained by encoding the image data is 512-dimensional, that is, a matrix with 512 rows and columns. After the dimensionality reduction processing is performed on the encoded data, the dimension of the encoded data is 128-dimensional, that is, a matrix with 128 rows and columns. The specific method of performing the dimensionality reduction processing on the encoded data can be set according to the actual situation.

[0112] S208, obtaining first similarity data corresponding to the target image data based on the first similarity, the second similarity, and the third similarity;

[0113] In one embodiment, a first weight corresponding to the first similarity, a second weight corresponding to the second similarity, and a third weight corresponding to the third similarity are determined. A first product of the first weight and the first similarity, a second product of the second weight and the second similarity, and a third product of the third weight and the third similarity are averaged to obtain a fourth similarity corresponding to the other image data. If the fourth similarity is greater than or equal to the first preset similarity, the other image data corresponding to the fourth similarity is determined as the first similarity data. The first product can be the product of the first weight and the first similarity, the second product can be the product of the second weight and the second similarity, and the third product can be the product of the third weight and the third similarity. The first preset similarity can be used to determine whether the degree of similarity between the target image data and the other image data meets an expected similarity threshold. The specific value of the first preset similarity can be set according to actual conditions.

[0114] The first weight may be a weight representing the influence of the similarity between the first foreground image and the second foreground image on the determination of the first similar data; the second weight may be a weight representing the influence of the similarity between the first background image and the second background image on the determination of the first similar data; the third weight may be a weight representing the influence of the similarity between the target image data and the other image data on the determination of the first similar data; the specific values ​​of the first weight, the second weight and the third weight may be set according to actual conditions.

[0115] For example, if the first similarity is 0.96, the first weight is 0.3, the second similarity is 0.95, the second weight is 0.2, the third similarity is 0.97, and the third weight is 0.5, then the fourth similarity between the target image data and the other image data is 0.96*0.3+0.95*0.2+0.97*0.5=0.965.

[0116] It should be noted that in addition to determining the first similar data by averaging the similarities, it is also possible to classify each similarity according to a preset level threshold, and determine whether the other data is the first similar data based on the level. Specifically, if the first similarity is greater than the level threshold, a value of "2" is assigned; if the second similarity is greater than the level threshold, a value of "1" is assigned; and if the third similarity is greater than the level threshold, a value of "3" is assigned. If the sum of these three similarities is greater than the similarity threshold of "3", the other image data is considered to be the first similar data.

[0117] For example, if the level threshold is 0.9, similarities less than 0.9 are considered dissimilar. If the first similarity is 0.96, the second similarity is 0.95, and the third similarity is 0.97, then since the first similarity, the second similarity, and the third similarity are all greater than the level threshold, the level of the first foreground image is 2, the level of the first background image is 1, and the level of the other image data is 3. The sum of the three is 6, which is greater than the similarity threshold of 3, that is, the foreground area, background area, and overall between the target image data and the other image data are similar, and the other image data is the first similar data; if the first similarity is 0.83, the second similarity is 0.95, and the third similarity is 0.87, then the level of the first foreground image is 0, the level of the first background image is 1, the level of the other image data is 0, and the total score is 1, which is less than the similarity threshold of 3, and the other image data is not the first similar data.

[0118] Furthermore, only the first similarity and the second similarity may be calculated, and judgment may be made based on the first similarity and the second similarity to obtain the first similarity data, so as to reduce the amount of calculation and calculation time required to determine the first similarity data, thereby improving calculation efficiency. The specific setting may be made according to actual conditions.

[0119] Furthermore, in addition to screening other image data according to the threshold, the ten image data with the greatest similarity among the other image data can also be selected as the first similarity data. Specifically, the fourth similarities are sorted from large to small, and the ten other image data corresponding to the fourth similarities with the greatest similarity are selected according to the sorting result to be determined as the first similarity data. If there are other image data with the same fourth similarity, similarity calculation can be performed based on the fourth encoded data, fifth encoded data, and sixth encoded data before dimensionality reduction corresponding to the other feature data with the same fourth similarity, and the first encoded data, second encoded data, and third encoded data before dimensionality reduction, and sorted according to the calculation results. It can be understood that the higher the dimension, the higher the accuracy of the calculation. Therefore, using the encoded data before dimensionality reduction for similarity calculation can obtain more accurate calculation results, and then determine the size relationship between the fourth similarities.

[0120] S209, obtaining second text data corresponding to the first similar data;

[0121] In one embodiment, after determining first similar data similar to the target image data, second text data corresponding to the first similar data is obtained. The second text data may be text data generated by providing a textual description of the first similar data. It is understood that since the first similar data is pre-stored in an image database, the second text data may be pre-stored in the image database. The second text data corresponding to the first similar data may be directly obtained from the image database to reduce the time required to generate the second text data.

[0122] S210, determining a first text similarity between first text data and second text data;

[0123] S211, based on the first text similarity and the first target similarity of the first similar data, obtaining target similarity data corresponding to the target image data in the first similar data;

[0124] In one embodiment, a first text similarity between first text data and second text data is determined. The first text similarity may represent a degree of similarity between the first text data and the second text data. A first target similarity corresponding to the first similarity data is obtained from the fourth similarity. Based on the first text similarity, second similarity data is obtained from the first similarity data. A second target similarity corresponding to the second similarity data is obtained from the first target similarity. Based on the second target similarity, target similarity data corresponding to target image data is obtained from the second similarity data.

[0125] Among them, the first target similarity can be used to characterize the degree of similarity between the first similarity data and the target image data. It can be understood that the first similarity data is data determined by screening other image data. Therefore, the first target similarity corresponding to the first similarity data can be obtained based on the fourth similarity corresponding to the other image data; similarly, the second target similarity corresponding to the second similar data is determined, and the second target similarity characterizes the degree of similarity between the second similarity data and the target image data.

[0126] Specifically, the target similarity data may be determined by determining the first similarity data corresponding to the first text similarity greater than the second preset similarity as the second similarity data, obtaining the second text similarity corresponding to the second similarity data and the fifth weight corresponding to the second text similarity, as well as the second target similarity corresponding to the second similarity data and the sixth weight corresponding to the second target similarity, performing an averaging operation on the fourth product of the second text similarity and the fifth weight, and the fifth product of the second target similarity and the sixth weight, to obtain the third target similarity corresponding to each second similarity data, and determining the second similarity data corresponding to the third target similarity greater than the third preset similarity as the target similarity data. The fourth product is the product of the second text similarity and the fifth weight, and the fifth product is the product of the second target similarity and the sixth weight.

[0127] Among them, the second preset similarity can be a similarity used to determine whether the similarity between the first text data and the second text data meets the requirements. The second text similarity can be a text similarity between the second similar data and the target image data. The fifth weight can be a weight representing the impact of the second text similarity in determining the third target similarity. The sixth weight can be a weight representing the impact of the third target similarity determined based on the second target similarity. The third target similarity can be a similarity between the second similar data and the target image data. The calculation method of the third target similarity can refer to the process of calculating the fourth similarity in step S208, which will not be repeated here.

[0128] It can be understood that by obtaining the second similar data from the first similar data based on the first text similarity and the second text similarity, and then screening the second similar data in combination with the second target similarity, the target image data and other image data are similarly calculated by combining the text similarity and the image similarity, and target similar data that is similar or identical to the target image data is obtained, thereby improving the accuracy of the determined target similar data.

[0129] S212, deleting target similar data in the image database;

[0130] In one embodiment, the determined target similar data is deleted in the image database to deduplicate the image data in the image database and reduce the image data in the image database that is similar to the target image data, so that when the transaction party selects image data in the image database, it can select image data that is different from the target image data and has a lower similarity to display the items being sold, thereby improving the transaction operation effect of the transaction party.

[0131] Furthermore, in addition to deduplicating image data in the image database based on the target image data, the embodiments of this specification can also be applied to the process of determining the target image data based on the image data in the image database when the transaction party uploads the target image data to the instant delivery service platform. If target similar data corresponding to the target image data is found in the image database, it is considered that the image database includes image data that is similar or identical to the target image data. Therefore, in order to enable the transaction party to select novel or unique image data to promote the items being sold on the instant delivery platform, a prompt message can be generated to prompt the transaction party to replace the image data uploaded to the instant delivery platform, or to select image data in the image database as the data displayed for the item on the instant delivery platform, thereby improving the transaction party's user experience.

[0132] In an embodiment of the present specification, first similarity data that meets the required similarity is obtained from an image database based on the target image data and the segmented image. Then, target similarity data similar to the target image data is obtained from the first similarity data in combination with text data describing the image data. Thus, target similarity data similar to the target image data is obtained based on the target image data and the segmented image data in combination with the text description. The target similarity data is then deleted from the image database, thereby reducing the repetition rate of similar images in the image database based on the improved accuracy of image recognition and similarity calculation. Furthermore, similarity calculation is performed based on the dimensionality-reduced encoded data to reduce the computing resources and computation time required for similarity calculation, thereby improving the processing efficiency of similarity calculation. Furthermore, the initial text data corresponding to the target image data is expanded based on text attributes to obtain first text data that includes more image details, thereby improving the accuracy of the generated first text data used to describe the target image data. Furthermore, similarity calculation is performed on the target image data and other image data in combination with text similarity to obtain target similarity data that is similar or identical to the target image data, thereby improving the accuracy of the determined target similarity data.

[0133] based on Figure 1 The system architecture shown below will be combined with Figure 6 , the data management device provided in the embodiment of this specification is introduced in detail. It should be noted that, Figure 6 The data management device in the embodiment of this specification is used to execute Figures 2 to 5 For the convenience of explanation, only the part related to the embodiment of this specification is shown. For the specific technical details not disclosed, please refer to the embodiment of this specification. Figures 2 to 5 The embodiment shown.

[0134] See Figure 6 , is a structural diagram of a data management device provided in the embodiment of this specification. Figure 6 As shown, the data management device 1 of the embodiment of this specification may include: a text acquisition unit 11 , an image segmentation unit 12 , a data acquisition unit 13 and a deletion unit 14 .

[0135] A text acquisition unit 11 is configured to acquire first text data corresponding to target image data, where the first text data is used to describe the target image data;

[0136] An image segmentation unit 12 is configured to obtain a first foreground image and a first background image from the target image data;

[0137] A data acquisition unit 13 is configured to acquire first similar data in an image database based on the target image data, the first foreground image, and the first background image;

[0138] The data acquisition unit 13 is further configured to acquire target similarity data corresponding to the target image data from the first similarity data based on the first text data;

[0139] The deleting unit 14 is configured to delete the target similar data in the image database.

[0140] Optionally, the image segmentation unit 12 is further configured to:

[0141] Performing region detection on the target image data based on regional features to obtain a foreground region and a background region corresponding to the target image data;

[0142] Acquire a first foreground image corresponding to the foreground area in the target image data;

[0143] A first background image corresponding to the background area in the target image data is obtained.

[0144] Optionally, the data acquisition unit 13 is further configured to:

[0145] Acquire first coded data corresponding to the first foreground image, second coded data corresponding to the first background image, and third coded data corresponding to the target image data;

[0146] obtaining other image data in an image database, and performing similarity calculations on the other image data based on the first coded data, the second coded data, and the third coded data, respectively, to obtain a first similarity corresponding to the first coded data, a second similarity corresponding to the second coded data, and a third similarity corresponding to the third coded data, wherein the other image data is the remaining image data in the image database except the target image data;

[0147] First similarity data corresponding to the target image data is obtained based on the first similarity, the second similarity, and the third similarity.

[0148] Optionally, the data acquisition unit 13 is further configured to:

[0149] Acquire other image data in an image database, and a second foreground image and a second background image corresponding to the other image data;

[0150] Acquire fourth coded data corresponding to the second foreground image, fifth coded data corresponding to the second background image, and sixth coded data corresponding to the other image data;

[0151] A first similarity between the first encoded data and the fourth encoded data, a second similarity between the second encoded data and the fifth encoded data, and a third similarity between the third encoded data and the sixth encoded data are calculated and obtained.

[0152] Optionally, the data acquisition unit 13 is further configured to:

[0153] performing dimensionality reduction processing on the first coded data, the second coded data, the third coded data, the fourth coded data, the fifth coded data, and the sixth coded data;

[0154] Obtaining a first similarity between the first encoded data after dimensionality reduction and the fourth encoded data after dimensionality reduction;

[0155] Obtaining a second similarity between the second encoded data after dimensionality reduction and the fifth encoded data after dimensionality reduction;

[0156] A third similarity between the third encoded data after dimensionality reduction and the sixth encoded data after dimensionality reduction is obtained.

[0157] Optionally, the data acquisition unit 13 is further configured to:

[0158] determining a first weight of the first similarity, a second weight of the second similarity, and a third weight of the third similarity;

[0159] performing mean processing on a first product result of the first weight and the first similarity, a second product result of the second weight and the second similarity, and a third product result of the third weight and the third similarity to obtain a fourth similarity corresponding to the other image data;

[0160] If the fourth similarity is greater than or equal to the first preset similarity, the other image data corresponding to the fourth similarity is determined as the first similar data corresponding to the target image data.

[0161] Optionally, the text acquisition unit 11 is further configured to:

[0162] Acquire initial text data corresponding to the target image data;

[0163] The initial text data is expanded based on preset text attributes to generate first text data corresponding to the initial text data.

[0164] Optionally, the data acquisition unit 13 is further configured to:

[0165] Acquire second text data corresponding to the first similar data;

[0166] determining a first text similarity between the first text data and the second text data;

[0167] Based on the first text similarity and the first target similarity of the first similarity data, target similarity data corresponding to the target image data is obtained from the first similarity data.

[0168] Optionally, the data acquisition unit 13 is further configured to:

[0169] Determining first similar data corresponding to the first text similarity greater than a second preset similarity as second similar data;

[0170] Obtaining a second text similarity corresponding to the second similar data and a fifth weight corresponding to the second text similarity, as well as a second target similarity corresponding to the second similar data and a sixth weight corresponding to the second target similarity;

[0171] Performing mean processing on a fourth product result of the second text similarity and the fifth weight, and a fifth product result of the second target similarity and the sixth weight, to obtain a third target similarity corresponding to the second similar data;

[0172] The second similarity data corresponding to the third target similarity greater than the third preset similarity is determined as target similarity data.

[0173] In an embodiment of the present specification, first similarity data that meets the required similarity is obtained from an image database based on the target image data and the segmented image. Then, target similarity data similar to the target image data is obtained from the first similarity data in combination with text data describing the image data. Thus, target similarity data similar to the target image data is obtained based on the target image data and the segmented image data in combination with the text description. The target similarity data is then deleted from the image database, thereby reducing the repetition rate of similar images in the image database based on the improved accuracy of image recognition and similarity calculation. Furthermore, similarity calculation is performed based on the dimensionality-reduced encoded data to reduce the computing resources and computation time required for similarity calculation, thereby improving the processing efficiency of similarity calculation. Furthermore, the initial text data corresponding to the target image data is expanded based on text attributes to obtain first text data that includes more image details, thereby improving the accuracy of the generated first text data used to describe the target image data. Furthermore, similarity calculation is performed on the target image data and other image data in combination with text similarity to obtain target similarity data that is similar or identical to the target image data, thereby improving the accuracy of the determined target similarity data.

[0174] The embodiment of this specification also provides a computer storage medium, which can store multiple program instructions, and the program instructions are suitable for being loaded and executed by a processor as described above. Figure 1-Figure 5 The method steps of the embodiment shown, the specific execution process can be found in Figure 1-Figure 5 The detailed description of the illustrated embodiment will not be repeated here.

[0175] The embodiment of this specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1-Figure 5 The data management method of the embodiment shown, the specific execution process can be found in Figure 1-Figure 5 The detailed description of the illustrated embodiment will not be repeated here.

[0176] See Figure 7 , is a schematic diagram of the structure of an electronic device provided in the embodiment of this specification. Figure 7 As shown, the electronic device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, an input / output interface 1003, a memory 1005, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 7 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, an input and output interface module, and a data management application.

[0177] exist Figure 7 In the electronic device 1000 shown, the input / output interface 1003 is mainly used to provide an input interface for the user and obtain data input by the user.

[0178] In one embodiment, the processor 1001 may be configured to call a data management application stored in the memory 1005 and specifically perform the following operations:

[0179] Acquire first text data corresponding to target image data, where the first text data is used to describe the target image data;

[0180] Acquire a first foreground image and a first background image in the target image data;

[0181] Acquire first similar data in an image database based on the target image data, the first foreground image, and the first background image;

[0182] Based on the first text data, obtaining target similarity data corresponding to the target image data from the first similarity data;

[0183] The target similar data is deleted from the image database.

[0184] Optionally, when acquiring the first foreground image and the first background image in the target image data, the processor 1001 specifically performs the following operations:

[0185] Performing region detection on the target image data based on regional features to obtain a foreground region and a background region corresponding to the target image data;

[0186] Acquire a first foreground image corresponding to the foreground area in the target image data;

[0187] A first background image corresponding to the background area in the target image data is obtained.

[0188] Optionally, when the processor 1001 acquires first similar data in an image database based on the target image data, the first foreground image, and the first background image, the processor 1001 specifically performs the following operations:

[0189] Acquire first coded data corresponding to the first foreground image, second coded data corresponding to the first background image, and third coded data corresponding to the target image data;

[0190] obtaining other image data in an image database, and performing similarity calculations on the other image data based on the first coded data, the second coded data, and the third coded data, respectively, to obtain a first similarity corresponding to the first coded data, a second similarity corresponding to the second coded data, and a third similarity corresponding to the third coded data, wherein the other image data is the remaining image data in the image database except the target image data;

[0191] First similarity data corresponding to the target image data is obtained based on the first similarity, the second similarity, and the third similarity.

[0192] Optionally, when executing the step of acquiring other image data from an image database and performing similarity calculations with the other image data based on the first coded data, the second coded data, and the third coded data, to obtain a first similarity corresponding to the first coded data, a second similarity corresponding to the second coded data, and a third similarity corresponding to the third coded data, the processor 1001 specifically performs the following operations:

[0193] Acquire other image data in an image database, and a second foreground image and a second background image corresponding to the other image data;

[0194] Acquire fourth coded data corresponding to the second foreground image, fifth coded data corresponding to the second background image, and sixth coded data corresponding to the other image data;

[0195] A first similarity between the first encoded data and the fourth encoded data, a second similarity between the second encoded data and the fifth encoded data, and a third similarity between the third encoded data and the sixth encoded data are calculated and obtained.

[0196] Optionally, when performing calculation to obtain a first similarity between the first encoded data and the fourth encoded data, a second similarity between the second encoded data and the fifth encoded data, and a third similarity between the third encoded data and the sixth encoded data, the processor 1001 specifically performs the following operations:

[0197] performing dimensionality reduction processing on the first coded data, the second coded data, the third coded data, the fourth coded data, the fifth coded data, and the sixth coded data;

[0198] Obtaining a first similarity between the first encoded data after dimensionality reduction and the fourth encoded data after dimensionality reduction;

[0199] Obtaining a second similarity between the second encoded data after dimensionality reduction and the fifth encoded data after dimensionality reduction;

[0200] A third similarity between the third encoded data after dimensionality reduction and the sixth encoded data after dimensionality reduction is obtained.

[0201] Optionally, when obtaining first similarity data corresponding to the target image data based on the first similarity, the second similarity, and the third similarity, the processor 1001 specifically performs the following operations:

[0202] determining a first weight of the first similarity, a second weight of the second similarity, and a third weight of the third similarity;

[0203] performing mean processing on a first product result of the first weight and the first similarity, a second product result of the second weight and the second similarity, and a third product result of the third weight and the third similarity to obtain a fourth similarity corresponding to the other image data;

[0204] If the fourth similarity is greater than or equal to the first preset similarity, the other image data corresponding to the fourth similarity is determined as the first similar data corresponding to the target image data.

[0205] Optionally, when executing the process of acquiring the first text data corresponding to the target image data, the processor 1001 specifically performs the following operations:

[0206] Acquire initial text data corresponding to the target image data;

[0207] The initial text data is expanded based on preset text attributes to generate first text data corresponding to the initial text data.

[0208] Optionally, when the processor 1001 obtains target similarity data corresponding to the target image data from the first similarity data based on the first text data, it specifically performs the following operations:

[0209] Acquire second text data corresponding to the first similar data;

[0210] determining a first text similarity between the first text data and the second text data;

[0211] Based on the first text similarity and the first target similarity of the first similarity data, target similarity data corresponding to the target image data is obtained from the first similarity data.

[0212] Optionally, when the processor 1001 performs the first target similarity based on the first text similarity and the first similarity data to obtain target similarity data corresponding to the target image data from the first similarity data, the processor 1001 specifically performs the following operations:

[0213] Determining first similar data corresponding to the first text similarity greater than a second preset similarity as second similar data;

[0214] Obtaining a second text similarity corresponding to the second similar data and a fifth weight corresponding to the second text similarity, as well as a second target similarity corresponding to the second similar data and a sixth weight corresponding to the second target similarity;

[0215] Performing mean processing on a fourth product result of the second text similarity and the fifth weight, and a fifth product result of the second target similarity and the sixth weight, to obtain a third target similarity corresponding to the second similar data;

[0216] The second similarity data corresponding to the third target similarity greater than the third preset similarity is determined as target similarity data.

[0217] In an embodiment of the present specification, first similarity data that meets the required similarity is obtained from an image database based on the target image data and the segmented image. Then, target similarity data similar to the target image data is obtained from the first similarity data in combination with text data describing the image data. Thus, target similarity data similar to the target image data is obtained based on the target image data and the segmented image data in combination with the text description. The target similarity data is then deleted from the image database, thereby reducing the repetition rate of similar images in the image database based on the improved accuracy of image recognition and similarity calculation. Furthermore, similarity calculation is performed based on the dimensionality-reduced encoded data to reduce the computing resources and computation time required for similarity calculation, thereby improving the processing efficiency of similarity calculation. Furthermore, the initial text data corresponding to the target image data is expanded based on text attributes to obtain first text data that includes more image details, thereby improving the accuracy of the generated first text data used to describe the target image data. Furthermore, similarity calculation is performed on the target image data and other image data in combination with text similarity to obtain target similarity data that is similar or identical to the target image data, thereby improving the accuracy of the determined target similarity data.

[0218] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0219] The above disclosure is only a preferred embodiment of this specification, and certainly cannot be used to limit the scope of rights of this specification. Therefore, equivalent changes made according to the claims of this specification are still within the scope covered by this specification.

Claims

1. A data management method, characterized in that: The method comprises: Acquire first text data corresponding to target image data, where the first text data is used to describe the target image data; Acquire a first foreground image and a first background image in the target image data; Acquire first similar data in an image database based on the target image data, the first foreground image, and the first background image; Based on the first text data, obtaining target similarity data corresponding to the target image data from the first similarity data; The target similar data is deleted from the image database.

2. The method according to claim 1, characterized in that The acquiring of the first foreground image and the first background image in the target image data includes: Performing region detection on the target image data based on regional features to obtain a foreground region and a background region corresponding to the target image data; Acquire a first foreground image corresponding to the foreground area in the target image data; A first background image corresponding to the background area in the target image data is obtained.

3. The method according to claim 1, characterized in that The acquiring, based on the target image data, the first foreground image, and the first background image, first similar data in an image database includes: Acquire first coded data corresponding to the first foreground image, second coded data corresponding to the first background image, and third coded data corresponding to the target image data; obtaining other image data in an image database, and performing similarity calculations on the other image data based on the first coded data, the second coded data, and the third coded data, respectively, to obtain a first similarity corresponding to the first coded data, a second similarity corresponding to the second coded data, and a third similarity corresponding to the third coded data, wherein the other image data is the remaining image data in the image database except the target image data; First similarity data corresponding to the target image data is obtained based on the first similarity, the second similarity, and the third similarity.

4. The method according to claim 3, characterized in that The acquiring of other image data in the image database and performing similarity calculations with the other image data based on the first coded data, the second coded data, and the third coded data to obtain a first similarity corresponding to the first coded data, a second similarity corresponding to the second coded data, and a third similarity corresponding to the third coded data include: Acquire other image data in an image database, and a second foreground image and a second background image corresponding to the other image data; Acquire fourth coded data corresponding to the second foreground image, fifth coded data corresponding to the second background image, and sixth coded data corresponding to the other image data; A first similarity between the first encoded data and the fourth encoded data, a second similarity between the second encoded data and the fifth encoded data, and a third similarity between the third encoded data and the sixth encoded data are calculated and obtained.

5. The method according to claim 3, characterized in that The obtaining, based on the first similarity, the second similarity, and the third similarity, first similarity data corresponding to the target image data includes: determining a first weight of the first similarity, a second weight of the second similarity, and a third weight of the third similarity; performing mean processing on a first product result of the first weight and the first similarity, a second product result of the second weight and the second similarity, and a third product result of the third weight and the third similarity to obtain a fourth similarity corresponding to the other image data; If the fourth similarity is greater than or equal to the first preset similarity, the other image data corresponding to the fourth similarity is determined as the first similar data corresponding to the target image data.

6. The method according to claim 1, characterized in that The acquiring, based on the first text data, target similarity data corresponding to the target image data from the first similarity data includes: Acquire second text data corresponding to the first similar data; determining a first text similarity between the first text data and the second text data; Based on the first text similarity and the first target similarity of the first similarity data, target similarity data corresponding to the target image data is obtained from the first similarity data.

7. The method according to claim 6, characterized in that The acquiring target similarity data corresponding to the target image data from the first similarity data based on the first text similarity and the first target similarity of the first similarity data includes: Determining first similar data corresponding to the first text similarity greater than a second preset similarity as second similar data; Obtaining a second text similarity corresponding to the second similar data and a fifth weight corresponding to the second text similarity, as well as a second target similarity corresponding to the second similar data and a sixth weight corresponding to the second target similarity; Performing mean processing on a fourth product result of the second text similarity and the fifth weight, and a fifth product result of the second target similarity and the sixth weight, to obtain a third target similarity corresponding to the second similar data; The second similarity data corresponding to the third target similarity greater than the third preset similarity is determined as target similarity data.

8. A data management device, characterized in that: The device comprises: a text acquiring unit, configured to acquire first text data corresponding to target image data, wherein the first text data is used to describe the target image data; an image segmentation unit, configured to obtain a first foreground image and a first background image from the target image data; A data acquisition unit, configured to acquire first similar data from an image database based on the target image data, the first foreground image, and the first background image; The data acquisition unit is further configured to acquire target similarity data corresponding to the target image data from the first similarity data based on the first text data; A deleting unit is used to delete the target similar data in the image database.

9. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 7.

10. An electronic device comprising: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method according to any one of claims 1 to 7.