A method, device and storage medium for processing catalog of private collections
By sharpening private collection pictures, adding gradient watermarks and reducing precision processing, combining graphic and text recognizers and multi-dimensional semantic algorithms, a private collection picture catalog is constructed, which solves the problems of private collection picture gallery management and anti-counterfeiting in the existing technology, and realizes efficient directory management and online transactions.
Patent Information
- Application Number
- CN202111292136.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-11-03
AI Technical Summary
The existing technology is difficult to effectively manage and protect private collection galleries, lacks catalog functions and anti-counterfeiting measures, and it is difficult to realize online communication and transactions between users.
Through machine vision models, sharpen private collection pictures, add gradient watermarks and reduce precision processing, combine picture and text recognizers and multi-dimensional semantic algorithms to build a private collection picture catalog to realize intelligent matching and classified preservation of catalogs.
It improves the anti-counterfeiting performance of collection pictures, realizes full-text search and quick browsing of catalogs, supports sharing of electronic collection pictures among users, and solves the problems of data collection and online transactions of private collections.
Smart Images

Figure CN114003873B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cultural collection databases, and more specifically, to a method, device and storage medium for processing a catalog of a private collection. Background Art
[0002] The pictures of collections are important comparison materials in the collection process. There are countless varieties of collections. Even a collection library with hundreds of thousands of pictures has a large number of missing pictures. Building a collection library requires a lot of manual photo editing, and the source of the collection is a difficult problem to solve. Even if the collector's collection is photographed and scanned and entered into the collection library on site, there is a risk of loss or damage of the collection, making it difficult to collect a large number of collections. At this stage, collection libraries can be summarized into the following three types: the first type is a library dominated by massive image retrieval. This library does not have a catalog function and lacks professionalism; the second type is a data library of a professional collection institution. This library can only view pictures and cannot realize interaction between users. The library lacks scalability; the third type is a collector's custom library. Although this library realizes the user's collection record, it lacks professional systematic and diversified management, and cannot realize the user's online communication and interaction, as well as online transactions. Summary of the invention
[0003] In view of this, the embodiment of the present application provides a method for processing a private collection album catalog, which can free private collections from heavy paper catalogs, realize the digitized collection of a large number of precious private collections, and add gradient watermarks and downgrade processing to private collection pictures, which can effectively improve the anti-counterfeiting performance of collection pictures. At the same time, establishing a collection album catalog of private collection pictures is conducive to full-text retrieval of the catalog, and has the advantages of fast web page reading and browsing speed, will not affect network speed, etc., and can avoid being copied, facilitating the sharing of electronic collection pictures between users.
[0004] In a first aspect, an embodiment of the present application provides a method for processing a private collection atlas catalog, comprising:
[0005] The binary grayscale image of the private collection is sharpened by a machine vision model to obtain a high-definition grayscale image.
[0006] Adopting an equal value accumulation method, a gradient watermark is added to the high-definition grayscale image to obtain an anti-counterfeiting high-definition image after adding the gradient watermark, and the anti-counterfeiting high-definition image after adding the gradient watermark is subjected to a precision reduction process to obtain a front-end call image;
[0007] Recognize text information from the pre-called picture by using a picture-text recognizer;
[0008] Intelligently matching the text information collection category in the pre-called picture with the preset dictionary and regular expression, and saving the matching result in the picture collection database of the text information collection category;
[0009] Calculate the first cosine similarity between the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text categories of the title unit in the preset directory, and calculate the second cosine similarity between the semantic vector of the text information collection category in the pre-called picture and the semantic vector of the text category of the sub-directory unit in the preset directory;
[0010] The collection atlas catalog of a private user is determined based on the correlation between the first cosine similarity between the collection atlas category and all text categories of the title unit in the preset catalog and the second cosine similarity between the text information collection category in the pre-called picture and the text category of the sub-catalog unit in the preset catalog.
[0011] In combination with the first aspect, the embodiment of the present application provides a first possible implementation of the first aspect, wherein the binary grayscale image of the private collection picture is sharpened by a machine vision model to obtain a high-definition grayscale image, including:
[0012] Detecting the peak value of the binary grayscale image through the Laplace energy function, energy gradient function or variance function of the machine vision model, and determining a first definition image according to the peak value;
[0013] Sharpening the first definition image according to a preset grayscale threshold to obtain a second definition image;
[0014] The first definition image and the second definition image are merged to obtain a high-definition grayscale image.
[0015] In combination with the first possible implementation of the first aspect, the embodiment of the present application provides a second possible implementation of the first aspect, wherein, an equal value accumulation method is adopted to add a gradient watermark to the high-definition grayscale image to obtain an anti-counterfeiting high-definition image after adding the gradient watermark, and the anti-counterfeiting high-definition image after adding the gradient watermark is subjected to a precision reduction process to obtain a front-end call image, including:
[0016] The equal value accumulation method is used to calculate each pixel point of the high-definition grayscale image to obtain the inverse code value and the true value corresponding to each pixel point;
[0017] For the inverse code value and the true value of each pixel point, the RGB trichromatic color value corresponding to the preset text gradient watermark is replaced line by line according to the random offset to obtain the anti-counterfeiting high-definition picture with the gradient watermark added;
[0018] According to the inverse code value and the true value of each digital pixel point of the anti-counterfeiting high-definition picture, the first loss value and the second loss value of the anti-counterfeiting high-definition picture are calculated respectively, and the calculated first loss value and the second loss value are fused to obtain the fused anti-counterfeiting high-definition picture as the front-end calling picture.
[0019] In combination with the first possible implementation manner or the second possible implementation manner of the first aspect, the embodiment of the present application provides a third possible implementation manner of the first aspect, wherein the first loss value is calculated according to the inverse code value and the true value of each digital pixel point of the anti-counterfeiting high-definition picture, including:
[0020] The first loss value is calculated according to the following formula:
[0021]
[0022] Where: q mn represents the inverse value of the nth digital pixel in the mth anti-counterfeiting high-definition image data set; p mn represents the true value of the nth digital pixel in the mth anti-counterfeiting high-definition image data set; loss(q mn ,p mn ) represents the first loss value between the inverse value and the true value of the nth digital pixel in the mth anti-counterfeiting high-definition picture data set, c represents the total number of digital pixels in the mth anti-counterfeiting high-definition picture data set; t represents the total number of pixel categories.
[0023] In combination with the first possible implementation manner or the second possible implementation manner of the first aspect, the embodiment of the present application provides a fourth possible implementation manner of the first aspect, wherein the second loss value is calculated according to the inverse code value and the true value of each digital pixel point of the anti-counterfeiting high-definition picture, including:
[0024] The second loss value is calculated according to the following formula:
[0025]
[0026] Among them, q uv represents the inverse value of the vth digital pixel in the uth anti-counterfeiting high-definition image data set; p uv represents the true value of the vth digital pixel in the uth anti-counterfeiting high-definition image data set; loss(q uV ,p uv ) represents the second loss value between the inverse value and the true value of the vth digital pixel point in the uth anti-counterfeiting high-definition picture data set; h represents the total number of digital pixels in the uth anti-counterfeiting high-definition picture data set; g represents the total number of digital pixels.
[0027] In combination with the first possible implementation or the second possible implementation of the first aspect, the embodiment of the present application provides a fifth possible implementation of the first aspect, wherein the text information collection category in the front-end called picture is intelligently matched with a preset dictionary and a regular expression, and the matching result is stored in an atlas database of the text information collection category, including:
[0028] For each identified text information classification of the front-end calling picture, a multi-dimensional semantic algorithm is used to determine a text vector corresponding to the text information of each front-end calling picture according to the semantics of the text information;
[0029] Through the image-text recognizer, the text vector of each of the pre-called images is intelligently matched with a preset dictionary and regular expression to obtain the collection atlas category;
[0030] According to the collection atlas category, each of the pre-called pictures is saved in the corresponding atlas database.
[0031] In combination with the first possible implementation manner or the second possible implementation manner of the first aspect, the embodiment of the present application provides a sixth possible implementation manner of the first aspect, which determines the collection atlas directory of a private user according to the association relationship between the first cosine similarity of the collection atlas category and all text categories of the title unit in the preset directory and the second cosine similarity of the text information collection category in the front-called picture and the text category of the sub-directory unit in the preset directory, including:
[0032] Calculate the first cosine similarity based on the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text categories of the title unit in the preset directory, wherein the collection atlas category includes: coin atlas, ticket atlas, stamp atlas, commemorative medal atlas, and other miscellaneous atlas; there are multiple preset directories;
[0033] For the calculated first cosine similarity, establishing an association relationship between the collection atlas category and the title unit in the preset catalog;
[0034] Calculate the second cosine similarity based on the semantic vector of the text information classification category in the pre-called picture and the semantic vector of the sub-directory unit text classification in the preset directory, wherein the text information classification category of the pre-called picture includes: picture name information, picture province information, picture address information, picture provider information, picture release year information, and picture release unit information;
[0035] For the calculated second cosine similarity, establishing an association relationship between the text information collection category in the pre-called picture and the sub-directory unit in the preset directory;
[0036] According to the correlation relationship between the first cosine similarity and the second cosine similarity, a collection catalog of the private user is determined.
[0037] In combination with the first possible implementation manner or the second possible implementation manner of the first aspect, the embodiment of the present application provides a seventh possible implementation manner of the first aspect, further including:
[0038] In response to a call request initiated by a private user, the collection atlas directory is read from the atlas database according to the API data interface, and the pre-called pictures in the collection atlas directory are displayed;
[0039] In response to a call request initiated by a private user, the pre-called image stored in the atlas database is displayed to a third-party user according to the directory rules of the atlas database;
[0040] In response to a call request initiated by a private user, an online transaction is performed through the WeChat interface and the Alipay online interface according to the pre-called pictures in the collection album directory.
[0041] In a second aspect, an embodiment of the present application further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for processing the catalog of private collections when executing the computer program.
[0042] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of a method for processing a catalog of a private collection of artworks are executed.
[0043] A method for processing a private collection atlas catalog provided in an embodiment of the present application adopts a private user's collection atlas catalog. Compared with the existing collection gallery which lacks a catalog function and cannot record and store private collections in a personalized manner, the collection catalog can be constructed based on different databases to form a collector's private electronic catalog, as well as online viewing, catalog sharing, and private collection data statistics for private users. The method converts the physical collection of a private collector into a digital image, which is imported into a data warehouse in the form of a binary data stream, and grayscale processing is performed on the collection images in the data warehouse to obtain a binary grayscale image after processing. The visual model of the device extracts the peak of the binary grayscale image, determines the first clarity image and the second clarity image according to the peak, and merges the clarity images to obtain a high-definition grayscale image; by uploading the collection images to the data warehouse, private collections can be freed from heavy paper catalogs, and a large number of precious private collections can be collected digitally, which is helpful to complete the big data statistical analysis of massive collections; the equal value accumulation method is adopted to add a gradient watermark to the high-definition grayscale image, and the anti-counterfeiting high-definition image with the watermark is processed with reduced precision to obtain the front-end call image of the web page front end, which can effectively improve the anti-counterfeiting performance of the collection image At the same time, the watermark is random, so it is impossible to completely remove the watermark from the picture. The collection pictures are professionally managed to avoid the risk of the collection pictures being stolen; all the text information in the pre-called pictures are identified by the image and text recognizer, and the collection categories of the text information in the pre-called pictures are intelligently matched with the preset dictionary and regular expressions, realizing the online professionalization of private collectors, systematic database construction, and completing the classification and preservation of the atlas database by recording the collection categories of private collection pictures; the association relationship between the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text classifications of the title unit in the preset directory and the semantic vector of the text information collection category in the pre-called picture and the semantic vector of the text classification of the sub-directory unit in the preset directory is determined to determine the collection atlas directory of the private user; the association relationship between the atlas database and the pre-called pictures and the preset directory is established, and the establishment of the association directory can realize the configuration of shared files, the mapping method is flexible, and the directory can be accessed through the browsing path, which can improve the access speed. The collection atlas directory of the private user is conducive to the full-text retrieval of the directory, and the web page reading and browsing speed is fast, which will not affect the network speed, and can avoid being copied, which is convenient for sharing electronic collection pictures between users.
[0044] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A flow chart of a method for processing a private collection atlas catalog provided in an embodiment of the present application is shown.
[0047] Figure 2 A schematic diagram of a process for obtaining a high-definition grayscale image in a method for processing a private collection atlas directory provided in an embodiment of the present application is shown.
[0048] Figure 3 A schematic diagram of a process of adding a gradient watermark and reducing precision in a method for processing a private collection atlas catalog provided in an embodiment of the present application is shown.
[0049] Figure 4 A schematic diagram of the process of intelligently matching text information collection types with preset dictionaries in a method for processing a private collection atlas catalog provided in an embodiment of the present application is shown.
[0050] Figure 5 A schematic diagram of the process of determining a private user's collection atlas catalog in a method for processing a private collection atlas catalog provided in an embodiment of the present application is shown.
[0051] Figure 6 A schematic flow chart of a call request initiated by a user in a method for processing a private collection album catalog provided in an embodiment of the present application is shown.
[0052] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0053] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0054] It liberates collectors from the heavy paper catalogs, uses big data and electronic archive classification technology to summarize and organize a large number of collection pictures, and forms collectors' private electronic catalogs through different filing methods. In addition, collection data can be quickly and conveniently accessed and compared through mobile terminals, and private collections can be managed online. The status and characteristic data of private collections can be recorded, and information such as the number of collections, collection categories, number of collections issued, and collection sharing data can be counted.
[0055] Considering that the current private collection gallery lacks directory functions, cannot personalize record storage, and cannot achieve gallery scalability; based on this, an embodiment of the present application provides a method for processing a private collection gallery directory, which is described below through an embodiment.
[0056] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0057] Figure 1 FIG. 1 is a flow chart showing a method for processing a private collection atlas directory provided in an embodiment of the present application; Figure 1 As shown, the specific steps include:
[0058] Step S10, sharpening the binary grayscale image of the private collection image through a machine vision model to obtain a high-definition grayscale image.
[0059] During the specific implementation of step S10, before obtaining the high-definition grayscale image, the above processing method also needs to perform grayscale processing on the private collection images in the data warehouse to obtain a binary grayscale image; through the five clarity algorithm functions of the machine vision model, the peak value of the binary grayscale image is detected, and the first clarity image is determined according to the above peak value, and the first clarity image is sharpened to obtain the second clarity image, and the high-definition grayscale image is obtained according to the data fusion of the first clarity image and the second clarity image. The above steps can convert the physical private collection into a digital collection image, and the collected digital collection images are data-fused through the machine vision model to obtain a high-definition collection image. By uploading the collection images to the data warehouse, private collections can be freed from heavy paper catalogs, and the digitized collection of a large number of precious private collections can be realized, which is helpful to complete the big data statistical analysis of massive collections.
[0060] Step S20, using equal value accumulation method, adding a gradient watermark to the high-definition grayscale image to obtain an anti-counterfeiting high-definition image with the gradient watermark added, and reducing the precision of the anti-counterfeiting high-definition image with the gradient watermark added to obtain a front-end call image.
[0061] When step S20 is implemented specifically, a non-zero double transform inverse code value and a true value are generated according to the grayscale value of each pixel of the high-definition grayscale image, and an equal value accumulation method is used for the inverse code value and the true value, and the RGB color value of the preset text watermark is replaced row by row from the random offset according to three groups of numerical forms of red, green and blue to obtain an anti-counterfeiting high-definition picture with a gradient watermark added; according to the inverse code value and the true value of each digital pixel in the anti-counterfeiting high-definition picture after adding the gradient watermark, a first loss value and a second loss value of each digital pixel in the anti-counterfeiting high-definition picture are calculated, and the calculated first loss value and second loss value are fused to obtain a fused high-definition picture as a front-end call picture; the above steps add a gradient watermark and reduce the precision of the private collection picture, which can effectively improve the anti-counterfeiting performance of the collection picture. At the same time, the watermark is random, so that the watermark cannot be completely removed from the picture, and the collection picture is professionally managed to avoid the risk of the collection picture being stolen.
[0062] Step S30, recognizing text information from the pre-called picture by using a picture-text recognizer.
[0063] During the specific implementation of step S30, a text-image recognizer trained by a deep learning ResNeXt network is used to respectively identify all text information in the pre-called picture, and the text information collection category of each pre-called picture is identified according to the semantics of all text information in the pre-called picture; the above steps can accurately identify the text collection category according to the semantics of the text information based on deep learning.
[0064] Step S40, intelligently matching the text information collection category in the pre-called picture with the preset dictionary and regular expression, and saving the matching result in the picture collection database of the text information collection category.
[0065] During the specific implementation of step S40, a multi-dimensional semantic algorithm is used to obtain the text vector of the text information collection category of each pre-called picture according to the semantics of the text information collection category in each pre-called picture, and the obtained text vector of the text information collection category is semantically matched with the preset dictionary and regular expression in the image and text recognizer, and the matching result is saved in the atlas database corresponding to the text information collection category; the above steps can use a multi-dimensional semantic algorithm to perform semantic matching on the pre-called pictures of the collection, and save the collection pictures in the corresponding atlas database according to the semantic matching solution, thereby realizing the online specialization of private collectors, systematic database construction, and completing the classification and preservation of the atlas database by recording the collection categories of private collection pictures.
[0066] Step S50, calculating the first cosine similarity between the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text categories of the title unit in the preset directory, and calculating the second cosine similarity between the semantic vector of the text information collection category in the pre-called picture and the semantic vector of the text category of the sub-directory unit in the preset directory.
[0067] During the specific implementation of step S50, a multidimensional semantic algorithm or a space vector algorithm is used to calculate a first cosine similarity based on the semantic vectors of the collection atlas category in each atlas database and the semantic vectors of all text categories of the title unit in the preset directory. A second cosine similarity is calculated based on the semantic vectors of the text information collection category in each pre-called image and the semantic vectors of the text category of the sub-directory unit in the preset directory. The above steps establish an association relationship between the atlas database and the pre-called image and the preset directory. Establishing an associated directory can realize the configuration of shared files, flexible mapping methods, and access to the directory through a browsing path, which can improve the access speed.
[0068] Step S60, determining the collection catalog of the private user according to the correlation between the first cosine similarity between the collection catalog category and all text categories of the title unit in the preset catalog and the second cosine similarity between the collection category of the text information in the pre-called picture and the text category of the sub-catalog unit in the preset catalog.
[0069] In the specific implementation of step S60, based on the first cosine similarity calculated between the collection atlas category and all text classifications of the title unit in the preset directory, an association relationship is established between the collection atlas category and the title unit in the preset directory; based on the second cosine similarity between the text information collection category in the pre-called image and the text classification of the sub-directory unit in the preset directory, an association relationship is established between the text information collection category in the pre-called image and the sub-directory unit in the preset directory, and the title unit in the preset directory corresponds to the collection atlas category, and the text information collection category in the pre-called image corresponds to the text classification of the sub-directory unit in the preset directory; based on the association relationship between the first cosine similarity and the second cosine similarity, the collection atlas directory of the private user is determined; the above steps determine the collection atlas directory of the private user, store the pictures in the form of a directory, which is conducive to full-text retrieval of the directory, and has the advantages of fast web page reading and browsing speed, no impact on network speed, and can avoid being copied, facilitating electronic collection picture sharing between users.
[0070] In one possible implementation, Figure 2 The flowchart of obtaining a high-definition grayscale image in a method for processing a private collection atlas directory provided in an embodiment of the present application is shown; in the above step S10, the binary grayscale image of the private collection image is sharpened by a machine vision model to obtain a high-definition grayscale image, including:
[0071] Step S101, detecting the peak value of the binary grayscale image through the Laplace energy function or energy gradient function or variance function of the machine vision model, and determining the first definition image according to the peak value.
[0072] Step S102: sharpening the first definition image according to a preset grayscale threshold to obtain a second definition image.
[0073] Step S103: merge the first definition image and the second definition image to obtain a high-definition grayscale image.
[0074] In the specific implementation of steps S101, S102, and S103, the peak of the binary grayscale image is detected by the Laplace energy function or energy gradient function or variance function or Brenner function or Tenegrad function of the machine vision model, and according to the binary grayscale image corresponding to the peak, the peak analysis result of the clarity is displayed by using a histogram, and the first clarity image is determined according to the peak analysis result, and the grayscale average value of each adjacent pixel of the first clarity image is calculated by a multi-image averaging method or a median filtering method or a maximum uniform method or an adaptive filtering method, and the preset grayscale threshold is replaced according to the calculated grayscale average value to obtain a second clarity image, and the grayscale value of the first clarity image is averaged or weighted averaged with the grayscale value of the second clarity image to fuse the pixel grayscale values, and a high-definition grayscale image is obtained after fusion.
[0075] In one possible implementation, Figure 3 The schematic diagram of the process of adding a gradient watermark and reducing the precision in a method for processing a private collection atlas directory provided by an embodiment of the present application is shown; in the above step S20, an equal value accumulation method is adopted to add a gradient watermark to a high-definition grayscale image to obtain an anti-counterfeiting high-definition image after adding a gradient watermark, and the anti-counterfeiting high-definition image after adding a gradient watermark is reduced in precision to obtain a front-end call image, including:
[0076] Step S201, calculating each pixel of the high-definition grayscale image by using an equal value accumulation method to obtain the inverse code value and the true value corresponding to each pixel.
[0077] Step S202, for the inverse code value and the true value of each pixel point, the RGB trichromatic color value corresponding to the preset text gradient watermark is replaced line by line according to the random offset to obtain an anti-counterfeiting high-definition picture with the gradient watermark added.
[0078] Step S203, according to the inverse code value and the true value of each digital pixel point of the anti-counterfeiting high-definition picture, respectively calculate the first loss value and the second loss value of the anti-counterfeiting high-definition picture, and merge the calculated first loss value and the second loss value to obtain the merged anti-counterfeiting high-definition picture as the front-end call picture.
[0079] In the specific implementation of steps S201, S202, and S203, an equal value accumulation method is adopted for each pixel of the high-definition grayscale image, and the inverse code value and the true value of each pixel of the corresponding high-definition grayscale image are generated in a non-zero one-based manner. For the inverse code value and the true value of each pixel of the high-definition grayscale image, an equal value accumulation method is adopted again to replace the color of the RGB three-color values corresponding to the preset text gradient watermark in the form of three groups of values of red, green, and blue from the random offset row by row, which is equivalent to selecting the three-color spectrum values of the text gradient watermark to replace each pixel of the high-definition grayscale image, so as to obtain the anti-counterfeiting high-definition picture after adding the gradient watermark, and according to the inverse code value and the true value of each digital pixel of the anti-counterfeiting high-definition picture, the first loss value and the second loss value of the anti-counterfeiting high-definition picture are respectively calculated, and the calculated first loss value and the second loss value are fused to obtain the fused anti-counterfeiting high-definition picture as the front-end call picture;
[0080] The first loss value is calculated according to the inverse code value and the true value of each digital pixel of the anti-counterfeiting high-definition image according to the following formula:
[0081]
[0082] Where: q mn represents the inverse value of the nth digital pixel in the mth anti-counterfeiting high-definition image data set; p mn represents the true value of the nth digital pixel in the mth anti-counterfeiting high-definition image data set; loss(q mn ,p mn ) represents the first loss value between the inverse value and the true value of the nth digital pixel point in the mth anti-counterfeiting high-definition picture data set, c represents the total number of digital pixels in the mth anti-counterfeiting high-definition picture data set; t represents the total number of pixel categories;
[0083] The second loss value is calculated according to the inverse code value and the true value of each digital pixel of the anti-counterfeiting high-definition image according to the following formula:
[0084]
[0085] Among them, q uv represents the inverse value of the vth digital pixel in the uth anti-counterfeiting high-definition image data set; p uv represents the true value of the vth digital pixel in the uth anti-counterfeiting high-definition image data set; loss(q uV ,p uV ) represents the second loss value between the inverse value and the true value of the vth digital pixel point in the uth anti-counterfeiting high-definition picture data set; h represents the total number of digital pixels in the uth anti-counterfeiting high-definition picture data set; g represents the total number of digital pixels.
[0086] In one possible implementation, Figure 4 A schematic diagram of a process for intelligently matching text information collection types with preset dictionaries in a method for processing a private collection atlas catalog provided by an embodiment of the present application is shown; in the above step S40, the text information collection category in the pre-called picture is intelligently matched with the preset dictionary and regular expression, and the matching result is stored in the atlas database of the text information collection category, including:
[0087] Step S401, for each identified front-call picture, the text information is classified into categories, and a multi-dimensional semantic algorithm is used to determine the text vector corresponding to each front-call picture text information according to the semantics of the text information.
[0088] Step S402: Through the image-text recognizer, the text vector of each pre-called image is intelligently matched with a preset dictionary and regular expression to obtain the collection atlas category.
[0089] Step S403, according to the collection atlas category, each pre-called picture is saved in the corresponding atlas database.
[0090] In the specific implementation of steps S401, S402, and S403, after the text information collection category of each pre-called picture is identified by the image-text recognizer, a multi-dimensional semantic algorithm is used to determine the text vector of each pre-called picture text information according to the semantics of the text information collection category, wherein the text information collection category includes: picture name information, picture province information, picture address information, picture provider information, picture release year information, and picture release unit information; the image-text recognizer is used to perform vector feature intelligent matching with the regular expression of the preset dictionary in the image-text recognizer for the text vector of each pre-called picture, and the collection atlas category is obtained after intelligent matching, and each pre-called picture is saved in the corresponding atlas database according to the collection atlas category; the above-mentioned collection atlas categories include: coin atlas, ticket atlas, stamp atlas, commemorative medal atlas, and other miscellaneous atlases;
[0091] For example: use a graphic recognition device to determine the text vector of the pre-called image according to the semantics of the image name information in the text information, perform vector feature matching based on the determined text vector and the regular expression of the preset dictionary in the graphic recognition device, and obtain the collection atlas category corresponding to the text information. If the collection category of the text information in the pre-called image corresponds to the coin atlas, the pre-called image is saved in the corresponding coin atlas database; if the collection category of the text information in the pre-called image corresponds to the ticket atlas, the pre-called image is saved in the corresponding ticket atlas database.
[0092] In a feasible implementation scheme, in the above step 50, the first cosine similarity of the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text categories of the title unit in the preset directory is calculated, and the second cosine similarity of the semantic vector of the text information collection category in the pre-called image and the semantic vector of the text category of the sub-directory unit in the preset directory is calculated.
[0093] During the specific implementation of step 50, a multidimensional semantic algorithm or a space vector algorithm is used to calculate the first cosine similarity based on the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text categories of the title unit in the preset directory, and the second cosine similarity is calculated based on the semantic vector of the text information collection category in each front-called image and the semantic vector of the text category of the sub-directory unit in the preset directory.
[0094] In one possible implementation, Figure 5 The flowchart of determining the collection catalog of a private user in a method for processing a private collection catalog provided by an embodiment of the present application is shown; in the above step S60, according to the association relationship between the collection catalog category and the first cosine similarity of all text categories of the title unit in the preset catalog and the second cosine similarity between the collection category of the text information in the pre-called picture and the text category of the sub-catalog unit in the preset catalog, the collection catalog of the private user is determined, including:
[0095] Step S601, calculate the first cosine similarity based on the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text categories of the title unit in the preset directory, wherein the collection atlas category includes: coin atlas, ticket atlas, stamp atlas, commemorative medal atlas, and other miscellaneous atlases; there are multiple preset directories.
[0096] Step S602: establishing an association relationship between the collection atlas category and the title unit in the preset catalogue according to the calculated first cosine similarity.
[0097] Step S603, calculates the second cosine similarity based on the semantic vector of the text information collection category in the pre-called image and the semantic vector of the sub-directory unit text classification in the preset directory, wherein the text information collection category of the pre-called image includes: image name information, image province information, image address information, image provider information, image release year information, and image release unit information.
[0098] Step S604: establishing an association relationship between the text information collection category in the pre-called picture and the sub-directory unit in the preset directory according to the calculated second cosine similarity.
[0099] Step S605: determining the collection catalog of the private user according to the correlation relationship between the first cosine similarity and the second cosine similarity.
[0100] In the specific implementation of steps S601, S602, S603, S604, and S605, according to the semantic vectors of the coin atlas, ticket atlas, stamp atlas, commemorative medal atlas, or other miscellaneous atlas and the semantic vectors of the text classification in the preset directory, the first cosine similarity between the individual semantic vectors is calculated according to the cosine function formula in the two-dimensional space. The cosine similarity value is close to 1, and the angle tends to 0, indicating that the two semantic vectors are more similar. The cosine similarity value is close to 0, and the angle tends to 90 degrees, indicating that the two semantic vectors are less similar. According to the calculated first cosine similarity, the association relationship between the collection atlas category and the title unit in the preset directory is established; then, according to the picture name information, picture province information, picture location information, etc. in the pre-called picture, the association relationship between the collection atlas category and the title unit in the preset directory is established. The second cosine similarity is calculated by combining the address information, the picture provider information, the picture release year information, the picture release unit information and the semantic vector of the text classification of the sub-directory unit in the preset directory, wherein the sub-directory unit in the preset directory contains multiple task nodes (such as the first node, the second node, the third node...the Nth node), and for the calculated second cosine similarity, establishing an association relationship between the text information collection category in the front-called picture and the sub-directory unit in the preset directory; according to the association relationship between the collection atlas category corresponding to the first cosine similarity and the title unit in the preset directory and the association relationship between the text information collection category in the front-called picture corresponding to the second cosine similarity and the sub-directory unit in the preset directory, determining the collection atlas directory of the private user;
[0101] For example: according to the semantic vector of the coin atlas and the semantic vector of the title unit text classification in the preset directory, according to the triangular cosine function formula in two-dimensional space, the lengths of the semantic vector coordinates of the coin atlas in the rectangular coordinate system and the lengths of the semantic vector coordinates of the title unit text classification in the preset directory are substituted into the triangular cosine function formula to obtain the cosine value of the angle between the two semantic vectors in the vector space as a measure of the difference between the two individual semantic vectors. When the cosine similarity value is close to 1, the angle tends to 0, indicating that the two semantic vectors are more similar. When the cosine similarity value is close to 0, the angle tends to 90 degrees, indicating that the two semantic vectors are less similar.
[0102] In one possible implementation, Figure 6 A schematic diagram of a call request process initiated by a user in a method for processing a private collection atlas directory provided in an embodiment of the present application is shown; and further comprising:
[0103] Step S701, responding to the call request initiated by the private user, reading the collection atlas directory from the atlas database according to the API data interface, and displaying the pre-called pictures in the collection atlas directory;
[0104] Step S702, responding to the call request initiated by the private user, and displaying the pre-called image stored in the atlas database to the third-party user according to the directory rules of the atlas database;
[0105] Step S703, responding to the call request initiated by the private user, and conducting online transactions through the WeChat interface and the Alipay online interface according to the pre-called pictures in the collection album directory.
[0106] During the specific implementation of steps S701, S702, and S703, in response to the call request initiated by the private user, according to the API data interface, the collection atlas directory established by the private user is read from the coin atlas, ticket atlas, stamp atlas, commemorative medal atlas or other miscellaneous atlases, and the pre-called pictures in the collection atlas directory are displayed to the web page front end, which can improve the access speed of the web page front end.
[0107] In response to the call request initiated by private users, the pre-called images stored in the coin atlas, ticket atlas, stamp atlas, commemorative medal atlas or other miscellaneous atlases will be displayed to third-party users through the API data interface in accordance with the directory rules of each atlas database, which can solve the online interaction and sharing viewing of private users.
[0108] In response to the call request initiated by the private user, the collection atlas directory established by the private user is read from the coin atlas, ticket atlas, stamp atlas, commemorative medal atlas or other miscellaneous atlases according to the API data interface, and the pre-called pictures in the collection atlas directory are traded online through the WeChat interface and the Alipay online interface transaction function, which can solve the problem of limited remote transactions between private users.
[0109] Corresponds to Figure 1 The present application also provides a computer device 80 for processing a private collection atlas directory in the present application. Figure 7 ,like Figure 7 As shown, the device includes a memory 801, a processor 802, and a computer program stored in the memory 801 and executable on the processor 802, wherein the processor 802 implements the method when executing the computer program.
[0110] The binary grayscale image of the private collection is sharpened by a machine vision model to obtain a high-definition grayscale image.
[0111] Adopting the equal value accumulation method, a gradient watermark is added to the high-definition grayscale image to obtain the anti-counterfeiting high-definition image after adding the gradient watermark, and the anti-counterfeiting high-definition image after adding the gradient watermark is processed with reduced precision to obtain the front-end call image;
[0112] Recognize text information from the pre-called picture through the image and text recognizer;
[0113] Intelligently match the text information collection category in the pre-called picture with the preset dictionary and regular expression, and save the matching result in the picture collection database of the text information collection category;
[0114] Calculate the first cosine similarity between the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text categories of the title unit in the preset directory, and calculate the second cosine similarity between the semantic vector of the text information collection category in the front-called image and the semantic vector of the text category of the sub-directory unit in the preset directory;
[0115] The collection atlas catalog of a private user is determined based on the correlation between the first cosine similarity between the collection atlas category and all text categories of the title unit in the preset catalog and the second cosine similarity between the collection category of the text information in the pre-called image and the text category of the sub-catalog unit in the preset catalog.
[0116] Corresponds to Figure 1 The present application also provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to perform the following steps:
[0117] The binary grayscale image of the private collection is sharpened by a machine vision model to obtain a high-definition grayscale image.
[0118] Adopting the equal value accumulation method, a gradient watermark is added to the high-definition grayscale image to obtain the anti-counterfeiting high-definition image after adding the gradient watermark, and the anti-counterfeiting high-definition image after adding the gradient watermark is processed with reduced precision to obtain the front-end call image;
[0119] Recognize text information from the pre-called picture through the image and text recognizer;
[0120] Intelligently match the text information collection category in the pre-called picture with the preset dictionary and regular expression, and save the matching result in the picture collection database of the text information collection category;
[0121] Calculate the first cosine similarity between the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text categories of the title unit in the preset directory, and calculate the second cosine similarity between the semantic vector of the text information collection category in the front-called image and the semantic vector of the text category of the sub-directory unit in the preset directory;
[0122] The collection atlas catalog of a private user is determined based on the correlation between the first cosine similarity between the collection atlas category and all text categories of the title unit in the preset catalog and the second cosine similarity between the collection category of the text information in the pre-called image and the text category of the sub-catalog unit in the preset catalog.
[0123] Based on the above analysis, it can be seen that compared with the collection gallery of related technologies, the collection album catalog of private users provided in the embodiment of the present application uses big data and electronic archive classification technology to summarize and organize a large number of collection pictures, and constructs collection catalog archives through different databases to form a collector's private electronic catalog, thereby realizing online management of user collections and data statistics of private collections.
[0124] In the embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0126] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0127] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0128] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0129] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for processing a catalog of a private collection of artworks, characterized in that: include: The binary grayscale image of the private collection is sharpened by a machine vision model to obtain a high-definition grayscale image. Adopting the equal value accumulation method, a gradient watermark is added to the high-definition grayscale image to obtain the anti-counterfeiting high-definition image after adding the gradient watermark, and the anti-counterfeiting high-definition image after adding the gradient watermark is subjected to precision reduction processing to obtain the front-end call image, which includes: adopting the equal value accumulation method to calculate for each pixel point of the high-definition grayscale image to obtain the inverse code value and the true value corresponding to each pixel point; for the inverse code value and the true value of each pixel point, the RGB trichromatic color value corresponding to the preset text gradient watermark is replaced row by row according to the random offset to obtain the anti-counterfeiting high-definition image after adding the gradient watermark; according to the inverse code value and the true value of each digital pixel point of the anti-counterfeiting high-definition image, the first loss value and the second loss value of the anti-counterfeiting high-definition image are respectively calculated, and the calculated first loss value and the second loss value are merged to obtain the merged anti-counterfeiting high-definition image as the front-end call image; Recognize text information from the pre-called picture by using a picture-text recognizer; Intelligently matching the text information collection category in the pre-called picture with the preset dictionary and regular expression, and saving the matching result in the picture collection database of the text information collection category; Calculate the first cosine similarity between the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text categories of the title unit in the preset directory, and calculate the second cosine similarity between the semantic vector of the text information collection category in the pre-called picture and the semantic vector of the text category of the sub-directory unit in the preset directory; The collection atlas catalog of a private user is determined based on the correlation between the first cosine similarity between the collection atlas category and all text categories of the title unit in the preset catalog and the second cosine similarity between the text information collection category in the pre-called picture and the text category of the sub-catalog unit in the preset catalog.
2. The method for processing a private collection atlas catalogue according to claim 1, characterized in that: The binary grayscale image of the private collection is sharpened by the machine vision model to obtain a high-definition grayscale image, including: Detecting the peak value of the binary grayscale image through the Laplace energy function, energy gradient function or variance function of the machine vision model, and determining a first definition image according to the peak value; Sharpening the first definition image according to a preset grayscale threshold to obtain a second definition image; The first definition image and the second definition image are merged to obtain a high-definition grayscale image.
3. The method for processing a private collection catalogue according to claim 1, characterized in that: Calculating a first loss value according to the inverse code value and the true value of each digital pixel point of the anti-counterfeiting high-definition picture includes: The first loss value is calculated according to the following formula: Where: q mn represents the inverse value of the nth digital pixel in the mth anti-counterfeiting high-definition image data set; p mn represents the true value of the nth digital pixel in the mth anti-counterfeiting high-definition image data set; loss(q mn ,p mn ) represents the first loss value between the inverse value and the true value of the nth digital pixel point in the mth anti-counterfeiting high-definition picture data set, c represents the total number of digital pixels in the mth anti-counterfeiting high-definition picture data set; t represents the total number of pixel categories.
4. The method for processing a private collection atlas catalogue according to claim 1, characterized in that: Calculating a second loss value according to the inverse code value and the true value of each digital pixel of the anti-counterfeiting high-definition picture includes: The second loss value is calculated according to the following formula: Among them, q uV represents the inverse value of the vth digital pixel in the uth anti-counterfeiting high-definition image data set; p uV represents the true value of the vth digital pixel in the uth anti-counterfeiting high-definition image data set; loss(q uv ,p uV ) represents the second loss value between the inverse value and the true value of the vth digital pixel in the uth anti-counterfeiting high-definition picture data set; h represents the total number of digital pixels in the uth anti-counterfeiting high-definition picture data set; g represents the total number of digital pixels.
5. The method for processing a private collection catalogue according to claim 1, characterized in that: Intelligently matching the text information collection category in the pre-called picture with the preset dictionary and regular expression, and saving the matching result in the picture collection database of the text information collection category, including: For each identified text information classification of the front-end calling picture, a multi-dimensional semantic algorithm is used to determine a text vector corresponding to the text information of each front-end calling picture according to the semantics of the text information; Through the image-text recognizer, the text vector of each of the pre-called images is intelligently matched with a preset dictionary and regular expression to obtain the collection atlas category; According to the collection atlas category, each of the pre-called pictures is saved in the corresponding atlas database.
6. The method for processing a private collection catalogue according to claim 1, characterized in that: According to the correlation between the first cosine similarity of the collection atlas category and all text categories of the title unit in the preset directory and the second cosine similarity of the text information collection category in the front-called picture and the text category of the sub-directory unit in the preset directory, the collection atlas directory of the private user is determined, including: Calculate the first cosine similarity based on the semantic vector of the collection atlas category in each atlas database and the semantic vector of all text categories of the title unit in the preset directory, wherein the collection atlas category includes: coin atlas, ticket atlas, stamp atlas, commemorative medal atlas, and other miscellaneous atlas; there are multiple preset directories; For the calculated first cosine similarity, establishing an association relationship between the collection atlas category and the title unit in the preset catalog; Calculate the second cosine similarity based on the semantic vector of the text information classification category in the pre-called picture and the semantic vector of the sub-directory unit text classification in the preset directory, wherein the text information classification category of the pre-called picture includes: picture name information, picture province information, picture address information, picture provider information, picture release year information, and picture release unit information; For the calculated second cosine similarity, establishing an association relationship between the text information collection category in the pre-called picture and the sub-directory unit in the preset directory; According to the correlation relationship between the first cosine similarity and the second cosine similarity, a collection catalog of the private user is determined.
7. The method for processing a private collection catalogue according to claim 1, characterized in that: Also includes: In response to a call request initiated by a private user, the collection atlas directory is read from the atlas database according to the API data interface, and the pre-called pictures in the collection atlas directory are displayed; In response to a call request initiated by a private user, the pre-called image stored in the atlas database is displayed to a third-party user according to the directory rules of the atlas database; In response to a call request initiated by a private user, an online transaction is performed through the WeChat interface and the Alipay online interface according to the pre-called pictures in the collection album directory.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Watermark display method and device
CN112884651A
Classification cataloguing method, device and equipment based on electronic file files
CN112990177A