CN113536005A - Method and system for searching similar pictures or fonts - Google Patents

Method and system for searching similar pictures or fonts Download PDF

Info

Publication number
CN113536005A
CN113536005A CN202111090267.0A CN202111090267A CN113536005A CN 113536005 A CN113536005 A CN 113536005A CN 202111090267 A CN202111090267 A CN 202111090267A CN 113536005 A CN113536005 A CN 113536005A
Authority
CN
China
Prior art keywords
target
target object
similarity
key
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111090267.0A
Other languages
Chinese (zh)
Other versions
CN113536005B (en
Inventor
张莹
沈益彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Entertainment Interactive Technology Beijing Co ltd
Original Assignee
Entertainment Interactive Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Entertainment Interactive Technology Beijing Co ltd filed Critical Entertainment Interactive Technology Beijing Co ltd
Priority to CN202111090267.0A priority Critical patent/CN113536005B/en
Publication of CN113536005A publication Critical patent/CN113536005A/en
Application granted granted Critical
Publication of CN113536005B publication Critical patent/CN113536005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/535Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/55Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5846Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using extracted text

Abstract

The invention provides a method and a system for searching similar pictures or fonts. The method comprises the following steps: determining a target object input by a user, wherein the target object comprises a target picture and a target font; classifying the target object into a local object and an overall object; the local object is an object with a separation state among elements in the target character and an object with a background picture in the target picture which is not a target searched by a user, and the overall object is an object formed by connecting the elements in the target character into a whole, and the background picture in the target picture is also an object of the target searched by the user; and respectively carrying out similarity search in a copyright-free database according to different types of the target object to obtain pictures or fonts similar to the target object. The system comprises modules corresponding to the method steps.

Description

Method and system for searching similar pictures or fonts
Technical Field
The invention provides a method and a system for searching similar pictures or fonts, and belongs to the technical field of data searching.
Background
In the internet era, the application of image retrieval is more and more extensive, so that the inquiry of similar images is more and more emphasized by people, but the current similar image inquiry mode directly compares the similar images with the inquired images each time, so that the consumed computing resources are more, and the searching speed is slow.
The retrieval of similar pictures in large-scale picture sets or font sets is a very important research direction in the field of computer vision today. The main problem to be solved is that given a picture or a font, a picture or a font with a similar appearance or containing the same main object or area is searched online in a picture set or a font set. The research direction has some relevant applications in reality, but the prior art still has the following technical problems when relevant search is carried out: low real-time performance and accuracy rate, and the like.
Disclosure of Invention
The invention provides a method and a system for searching similar pictures or fonts, which are used for solving the problems of low real-time performance and accuracy rate of searching in the prior art:
a method for finding similar pictures or fonts, the method comprising:
determining a target object input by a user, wherein the target object comprises a target picture and a target font;
classifying the target object into a local object and an overall object; the local object refers to an object in which a separation state exists between elements in a target character and an object in which a background picture in a target picture does not allow a user to search for a target, for example, when the target character is pointed, if characters corresponding to the target character are in a left-right structure, a Chinese character in an upper-lower structure, or unconnected letters or numbers, the local object is obtained; when the target picture is searched, the local object can be understood as a background part which is common or not prominent in the whole picture, the local feature of the picture is the key point of the whole picture, and a user needs to search the picture which is similar to the local feature on the picture when searching for the similar picture; the integral object refers to an object in which elements in the target character are connected with each other to form a whole, and a background picture in a target picture is also an object for a user to search for a target, for example, when the target font is aimed at, if strokes in characters corresponding to the target font are connected integrally, the integral object is ended, such as wood, one, nine and day; when the overall object is used for the target picture, the overall object can be understood as that the background part in the whole picture is more prominent, and the background part is a key point for searching similar pictures required by a user;
and respectively carrying out similarity search in a copyright-free database according to different types of the target object to obtain pictures or fonts similar to the target object.
Further, according to different types of the target object, respectively performing similarity search in a copyright-free database to obtain an image or a font similar to the target object, including:
when the target object is a local object, determining key information of the target object, performing similarity search in a copyright-free database through the key information, and acquiring an image or a font similar to the target object in the copyright-free database;
when the target object is an integral object, determining the integral characteristic of the target object, and performing integral characteristic similarity search in the copyright-free database by using the integral characteristic to determine an image or a font similar to the target object.
Further, when the target object is a local object, determining key information of the target object, and performing similarity search in a copyright-free database through the key information, and acquiring an image or a font similar to the target object in the copyright-free database, includes:
when the target object is a local object, determining a plurality of pieces of key information of the target object, which are sequenced according to a preset mode;
taking the key information of the target object as similarity searching basis, sequentially carrying out first similarity searching in a copyright-free database according to the key information sequencing order to obtain a first similarity searching result, and forming a first similarity set by the similar objects searched by the first similarity searching result;
acquiring the overall characteristics of the target object, and performing a second similarity search in the first similarity set by using the overall characteristics of the target object to acquire a second similarity search result;
determining an image or a font similar to the target object according to the second similarity search result; the key information comprises key elements contained in the target object and relative position relations between the key elements and other elements on the target object; the data in the copyright-free database comprises copyright-free data and self-copyrighted data which can be freely used by a user under legal conditions.
Further, determining a plurality of pieces of key information of the target object, which are sorted according to a preset mode, includes:
determining each key element in the target object and the position relation between each key element and other elements according to the separation condition of each element of the target object and the area size occupied by the element; each key element and the position relation between the key element and other elements are used as key information; each target object contains one or more key information;
when the target object contains a plurality of pieces of key information, sequencing the key information in an order from high to low according to the importance degree of the key information;
wherein the determining process of the importance degree of the key information comprises the following steps:
extracting each element in the target object, sequencing each element from first to last according to the area of the target object occupied by each element, and obtaining an element set;
determining the number of key elements, and selecting the elements as the key elements in the order from first to last in the element set according to the determined number of the key elements;
extracting central position points of the key elements and the target object, if the key elements positioned on the central position points exist, taking the key elements positioned on the central position points as key elements with the highest importance degree, and detecting the position relation between other key elements and the key elements with the highest importance degree; determining the importance degrees of other key elements according to the length of the straight-line distance between the key element with the highest importance degree and the other key elements, wherein the shorter the straight-line distance is, the higher the importance degree of the corresponding other key elements is; wherein the linear distance is: the distance between a point of the key element with the highest degree of importance closest to each of the other key elements and a point of each of the other key elements closest to the key element with the highest degree of importance; if the straight line distances are the same, the importance degree of other key elements with larger areas is higher;
if the key elements positioned on the central position point do not exist, acquiring the linear distance between one point of each key element closest to the central position point and the central position point, and determining the importance degree of each key element according to the length of the linear distance; the shorter the straight line distance is, the higher the importance degree of the corresponding key element is; if the straight line distances are the same, the key elements with larger areas have higher importance degree;
acquiring the position relation between each key element and other elements, and integrating the key elements and the position relations between the key elements and other elements into key information, wherein the importance degree of the key information is consistent with that of the key elements.
Further, when the target object is an overall object, determining an overall feature of the target object, performing an overall feature similarity search in the copyright-free database by using the overall feature, and determining an image or a font similar to the target object, includes:
when the target object is an integral object, determining the integral characteristic of the target object;
performing initial search on the overall characteristic similarity in a copyright-free database by using the overall characteristic of the target object, and acquiring an initial search result of the overall characteristic similarity;
forming a second similarity set by the similar objects in the initial search result of the overall feature similarity; determining local features of the target object by using weight division of the target object and similar objects in the second similar set;
performing similarity secondary search in the second similarity set according to the local features; and determining an image or a font similar to the target object according to the similarity secondary searching result.
Further, when the target object is an overall object, determining the overall characteristics of the target object includes:
carrying out standardization processing on the target object to obtain a standardized target picture or a standardized target font;
performing five-angle rotation on the standardized target picture or the standardized target font, and storing the picture or the font in each rotation state, wherein the five angles include rotating the target picture or the font by 30 degrees, rotating the target picture or the font by 90 degrees, rotating the target picture or the font by 120 degrees, rotating the target picture or the target font by 180 degrees and rotating the target picture or the target font by 270 degrees;
and
carrying out five-size scaling treatment on the standardized target picture or the standardized target font, and storing the picture in each scaling state; wherein the scaling process of the five sizes includes a 50% size reduction process, an 80% size reduction process, a 120% size enlargement process, a 150% size enlargement process, and a 200% size enlargement process;
performing feature extraction on the color of each element, the shape of each element and the position relation among the elements on all target pictures or target fonts subjected to five-angle rotation or five-size scaling processing to obtain the color feature, the shape feature and the position feature of the target pictures or the target fonts;
and taking the color feature, the shape feature and the position feature of the target picture or the target font as the overall feature of the target object.
Further, the copyright-free repository comprises an offline state and an online state;
after the target object input by the user is determined, the method comprises the following steps:
when the copyright-free database is in an off-line state and reaches a preset time, one end storing the copyright-free database sends an updating request to the copyright-free database providing end server;
the server side carries out authority verification on the sending updating request side;
if the verification is passed, the server side sends update data to an update request side, and the update request side which stores the copyright-free database receives the update data and stores the update data locally;
and if the verification fails, the server side sends an authority prompting instruction to the updating request side, the updating request side applies for the authority with timeliness according to the authority prompting instruction, and sends the updating request side to the server side again for authority verification after acquiring the related authority until the verification passes.
A similar picture or font lookup system, the system comprising:
the target determining module is used for determining a target object input by a user, wherein the target object comprises a target picture and a target font;
the classification module is used for classifying the target object and classifying the target object into a local object and an overall object; the local object refers to an object in which a separation state exists between elements in a target character and an object in which a background picture in a target picture does not allow a user to search for a target, for example, when the target character is pointed, if characters corresponding to the target character are in a left-right structure, a Chinese character in an upper-lower structure, or unconnected letters or numbers, the local object is obtained; when the target picture is aimed at, if the image elements in the target picture are not connected, the target picture is a local object; the integral object refers to an object in which elements in the target character are connected with each other to form a whole, and a background picture in a target picture is also an object for a user to search for a target, for example, when the target font is aimed at, if strokes in characters corresponding to the target font are connected integrally, the integral object is ended, such as wood, one, nine and day; when aiming at the target picture, if all the influence elements in the target picture are integrally connected, the target picture is an integral object;
and the searching module is used for respectively carrying out similarity searching in a copyright-free database according to different types of the target object to acquire images or fonts similar to the target object.
Further, the search module includes:
the first searching module is used for determining key information of the target object when the target object is a local object, performing similarity searching in a copyright-free database according to the key information, and acquiring pictures or fonts similar to the target object in the copyright-free database;
and the second searching module is used for determining the overall characteristics of the target object when the target object is the overall object, searching the overall characteristic similarity in the copyright-free database by using the overall characteristics and determining the image or the font similar to the target object.
The first searching module comprises:
the information determining module is used for determining a plurality of pieces of key information which are sequenced according to a preset mode when the target object is a local object;
the first query module is used for taking the key information of the target object as similarity search basis, sequentially carrying out first similarity search in a copyright-free database according to the key information sequencing order to obtain a first similarity search result, and forming a first similarity set by the similar objects searched by the first similarity search result;
the second query module is used for acquiring the overall characteristics of the target object, and performing second similarity search in the first similarity set by using the overall characteristics of the target object to acquire a second similarity search result;
the result determining module is used for determining an image or a font similar to the target object according to the second similarity searching result; the key information comprises key elements contained in the target object and relative position relations between the key elements and other elements on the target object; the data in the copyright-free database comprises copyright-free data and self-owned copyright data which can be freely used by a user under legal conditions;
the second searching module comprises:
the characteristic determining module is used for determining the integral characteristic of the target object when the target object is an integral object;
the primary searching module is used for performing primary searching on the overall characteristic similarity in the copyright-free database by using the overall characteristic of the target object and acquiring a primary searching result of the overall characteristic similarity;
the secondary searching module is used for forming a second similarity set by the similar objects in the primary searching result of the overall feature similarity; determining local features of the target object by using weight division of the target object and similar objects in the second similar set;
a final result determining module, configured to perform similarity secondary search in the second similarity set according to the local feature; and determining an image or a font similar to the target object according to the similarity secondary searching result.
Wherein the information determination module comprises:
the element determining module is used for determining each key element in the target object and the position relation between each key element and other elements according to the separation condition of each element of the target object and the area size of the element; each key element and the position relation between the key element and other elements are used as key information; each target object contains one or more key information;
the sorting module is used for sorting the plurality of key information according to the order of the importance degrees of the key information from high to low when the target object contains the plurality of key information;
wherein the determining process of the importance degree of the key information comprises the following steps:
extracting each element in the target object, sequencing each element from first to last according to the area of the target object occupied by each element, and obtaining an element set;
determining the number of key elements, and selecting the elements as the key elements in the order from first to last in the element set according to the determined number of the key elements;
extracting central position points of the key elements and the target object, if the key elements positioned on the central position points exist, taking the key elements positioned on the central position points as key elements with the highest importance degree, and detecting the position relation between other key elements and the key elements with the highest importance degree; determining the importance degrees of other key elements according to the length of the straight-line distance between the key element with the highest importance degree and the other key elements, wherein the shorter the straight-line distance is, the higher the importance degree of the corresponding other key elements is; wherein the linear distance is: the distance between a point of the key element with the highest degree of importance closest to each of the other key elements and a point of each of the other key elements closest to the key element with the highest degree of importance; if the straight line distances are the same, the importance degree of other key elements with larger areas is higher;
if the key elements positioned on the central position point do not exist, acquiring the linear distance between one point of each key element closest to the central position point and the central position point, and determining the importance degree of each key element according to the length of the linear distance; the shorter the straight line distance is, the higher the importance degree of the corresponding key element is; if the straight line distances are the same, the key elements with larger areas have higher importance degree;
acquiring the position relation between each key element and other elements, and integrating the key elements and the position relations between the key elements and other elements into key information, wherein the importance degree of the key information is consistent with that of the key elements.
Further, when the feature determination module includes:
the standardization module is used for carrying out standardization processing on the target object to obtain a standardized target picture or a standardized target font;
a rotation processing module, configured to perform five-angle rotation on the normalized target picture or target font, and store the picture or font in each rotation state, where the five angles include rotating the target picture or font by 30 °, 90 °, 120 °, 180 °, and 270 °;
and
the zooming processing module is used for zooming the standardized target picture or the standardized target font into five sizes and storing the picture in each zooming state; wherein the scaling process of the five sizes includes a 50% size reduction process, an 80% size reduction process, a 120% size enlargement process, a 150% size enlargement process, and a 200% size enlargement process;
the characteristic extraction module is used for extracting the characteristics of the color of each element, the shape of each element and the position relation among the elements of all the target pictures or target fonts subjected to five-angle rotation or five-size scaling processing to obtain the color characteristics, the shape characteristics and the position characteristics of the target pictures or the target fonts;
and the overall characteristic integration module is used for taking the color characteristic, the shape characteristic and the position characteristic of the target picture or the target font as the overall characteristic of the target object.
Wherein the copyright-free database comprises an offline state and an online state;
after determining the target object input by the user, the system further comprises:
the storage module is used for sending an updating request to the server of the copyright-free database providing end by one end which stores the copyright-free database when the copyright-free database is in an off-line state and reaches a preset time;
the verification module is used for verifying the authority of the update request sending end by the server end;
the update data sending module is used for sending update data to the update request end by the server end if the verification is passed, receiving the update data by the update request end stored with the copyright-free database, and storing the update data locally;
and the reminding module is used for sending an authority reminding instruction to the updating request end by the server end if the verification fails, applying for the authority with timeliness by the updating request end according to the authority reminding instruction, and sending the updating request end to the server end again for authority verification after acquiring the related authority until the verification passes.
The invention has the beneficial effects that:
the method and the system for searching the similar pictures or the fonts can classify the target objects, classify the target objects into the local objects and the overall objects, and search the corresponding similarity in the copyright-free database according to whether the target objects are the local objects or the overall objects. According to the specific classification of the target objects, the target objects belonging to different classes are searched for similar objects according to corresponding classes, on one hand, the searching efficiency can be improved by pre-classifying and setting different searching modes according to different classes, and on the other hand, the searching method is set with pertinence according to the specific characteristics of different classes, so that the accuracy of the searching result is improved.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a flowchart illustrating a process of determining the importance of the key information according to the present invention;
fig. 3 is a system block diagram of the system of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
The embodiment of the invention provides a method for searching similar pictures or fonts, which comprises the following steps of:
s1, determining a target object input by a user, wherein the target object comprises a target picture and a target font;
s2, classifying the target object into a local object and an overall object; the local object refers to an object in which a separation state exists between elements in a target character and an object in which a background picture in a target picture does not allow a user to search for a target, for example, when the target character is pointed, if characters corresponding to the target character are in a left-right structure, a Chinese character in an upper-lower structure, or unconnected letters or numbers, the local object is obtained; when the target picture is aimed at, if the image elements in the target picture are not connected, the target picture is a local object; the integral object refers to an object in which elements in the target character are connected with each other to form a whole, and a background picture in a target picture is also an object for a user to search for a target, for example, when the target font is aimed at, if strokes in characters corresponding to the target font are connected integrally, the integral object is ended, such as wood, one, nine and day; when aiming at the target picture, if all the influence elements in the target picture are integrally connected, the target picture is an integral object;
s3, according to the different types of the target object, respectively carrying out similarity search in a copyright-free database to obtain the picture or font similar to the target object. The copyright-free database is specifically a copyright-free database, a self-owned copyright database, a network copyright database or other copyright databases.
According to different types of the target object, similarity search is respectively carried out in a copyright-free database to obtain pictures or fonts similar to the target object, and the method comprises the following steps:
s301, when the target object is a local object, determining key information of the target object, performing similarity search in a copyright-free database according to the key information, and acquiring a picture or a font similar to the target object in the copyright-free database;
s302, when the target object is an integral object, determining the integral characteristic of the target object, and performing integral characteristic similarity search in the copyright-free database by using the integral characteristic to determine an image or a font similar to the target object.
When the target object is a local object, determining key information of the target object, performing similarity search in a copyright-free database through the key information, and acquiring an image or a font similar to the target object in the copyright-free database, including:
s3011, when the target object is a local object, determining a plurality of pieces of key information of the target object which are sequenced according to a preset mode;
s3012, taking the key information of the target object as a similarity searching basis, sequentially performing first similarity searching in a copyright-free database according to a key information sequencing sequence to obtain a first similarity searching result, and forming a first similarity set by the similar objects searched by the first similarity searching result;
s3013, obtaining the overall characteristics of the target object, and performing second similarity search in the first similarity set by using the overall characteristics of the target object to obtain a second similarity search result;
s3014, determining an image or a font similar to the target object according to the second similarity search result; the key information comprises key elements contained in the target object and relative position relations between the key elements and other elements on the target object; the data in the copyright-free database comprises copyright-free data and self-copyrighted data which can be freely used by a user under legal conditions.
When the target object is an overall object, determining an overall feature of the target object, performing overall feature similarity search in the copyright-free database by using the overall feature, and determining an image or a font similar to the target object, including:
s3021, when the target object is an overall object, determining the overall characteristics of the target object;
s3022, performing initial search on the overall feature similarity in the copyright-free database by using the overall feature of the target object, and acquiring an initial search result of the overall feature similarity;
s3023, forming a second similarity set by the similar objects in the overall feature similarity primary search result; determining local features of the target object by using weight division of the target object and similar objects in the second similar set;
s3024, performing similarity secondary search in the second similar set according to the local features; and determining an image or a font similar to the target object according to the similarity secondary searching result.
The working principle of the technical scheme is as follows: the scheme adopted by this embodiment is to classify the target object, classify the target object into a local object and an overall object, and perform corresponding operations according to whether the target object is a local object or an overall object.
When the target object is a local object, the target object is taken as a target picture for introduction, the local object can be understood as a background part which is common or not outstanding in the whole picture, the local feature of the picture is the key point of the whole picture, and a user needs to find a picture similar to the local feature on the picture when searching for a similar picture, so that the target picture of the type is defined and classified as the local object, specific similarity searching is carried out according to the characteristics of the picture, the similar picture is found more quickly and accurately, and the searching purpose is achieved. Specifically, firstly, determining a plurality of pieces of sorting key information of the target objects according to a preset mode; taking the key information of the target object as a similarity searching basis, sequentially performing similarity primary searching in a copyright-free database according to a key information sequencing sequence, and forming a first similarity set by the searched similar objects; performing similarity secondary search in the first similarity set based on the overall characteristics of the target object; determining an object similar to the target object according to the similarity secondary searching result; the key information comprises key elements contained in the target object and relative position relations between the key elements and other elements on the target object.
In addition, when the target object is a global object, the target object is also taken as an example for description, the local object may be understood as a background portion in the whole photo, and the background portion is a key point for the user to search for a similar photo, so that such a photo is set as the global object, and a specific similar photo is searched according to the situation of the global object. Specifically, the overall characteristics of the target object are determined, the overall characteristic similarity is primarily searched in a copyright-free database based on the overall characteristics, and the searched similar objects form a second similar set; determining local features of the target object based on weight partitioning of the target object and similar objects in the second similar set; performing similarity secondary search in the second similarity set according to the local features; and determining an object similar to the target object according to the similarity secondary searching result.
It should be noted that the copyright-free approximate picture or font searching method in the subject name of the application is the generalized copyright-free, and includes the copyright-free picture and font with general properties, the copyright-free picture and font are free pictures and fonts which are open to the public, and the materials which can be reasonably, legally and freely used on the internet all belong to the type of copyright-free materials; in addition, the broad copyright protection can also include the condition that the user has own copyright of the corresponding material, the own copyright is protected by law, therefore, when having the own copyright, the user has the characteristic of not infringing the copyright as the general copyright protection, and in the condition, the material required by the user can be identified as the material used for free. Therefore, in this embodiment, the data in the copyright-free database includes the copyright-free data and the self-copyrighted data that can be freely used by the user in a legal situation, and neither of the two data relates to the problem of infringement.
The beneficial effects of the above technical scheme are: according to the scheme provided by the embodiment, the target object is classified into the local object and the overall object by classifying the target object, and corresponding operation is performed according to whether the target object is the local object or the overall object. According to the specific classification of the target objects, the target objects belonging to different classes are searched for similar objects according to corresponding classes, on one hand, the searching efficiency can be improved by pre-classifying and setting different searching modes according to different classes, and on the other hand, the searching method is set with pertinence according to the specific characteristics of different classes, so that the accuracy of the searching result is improved.
In an embodiment of the present invention, determining a plurality of pieces of key information of the target object, which are sorted according to a preset manner, includes:
determining each key element in the target object and the position relation between each key element and other elements according to the separation condition of each element of the target object and the area size occupied by the element; each key element and the position relation between the key element and other elements are used as key information; each target object contains one or more key information;
when the target object contains a plurality of pieces of key information, sequencing the key information in an order from high to low according to the importance degree of the key information;
as shown in fig. 2, the determining process of the importance of the key information includes:
step 1, extracting each element in the target object, sequencing each element from first to last according to the area of the target object occupied by each element, and obtaining an element set;
step 2, determining the number of key elements, and selecting the elements as the key elements in the order from first to last in the element set according to the determined number of the key elements; the number of the key elements is obtained through the following formula:
Figure DEST_PATH_IMAGE001
wherein M represents the total number of elements, and M
Figure 752287DEST_PATH_IMAGE002
10; when M is
Figure 321809DEST_PATH_IMAGE003
When 10, the number N of the key elements is a preset fixed number6; n represents the number of key elements; INT [ 2 ]]Represents a floor function; c represents the number of corresponding elements when the areas of the elements occupying the target object are arranged from large to small and the sum of the areas of the elements from front to back exceeds 60 percent of the total area of the target object; specifically, when the number M of elements in the target object is 15, if the sum of the areas of the elements exceeds 60% of the total area of the target object, the corresponding number C of elements is 10, which exceeds the total area of the target object
Figure 65774DEST_PATH_IMAGE004
Then, the number N of the key elements is 10 through calculation; if the sum of the element areas exceeds 60 percent of the total area of the target object, the corresponding element number C is 7, and the sum of the element areas does not exceed 60 percent of the total area of the target object
Figure 50523DEST_PATH_IMAGE004
Then the number N of key elements is 8 by calculation.
Step 3, extracting the key elements and the central position points of the target object, if the key elements positioned on the central position points exist, taking the key elements positioned on the central position points as the key elements with the highest importance degree, and detecting the position relationship between other key elements and the key elements with the highest importance degree; determining the importance degrees of other key elements according to the length of the straight-line distance between the key element with the highest importance degree and the other key elements, wherein the shorter the straight-line distance is, the higher the importance degree of the corresponding other key elements is; wherein the linear distance is: the distance between a point of the key element with the highest degree of importance closest to each of the other key elements and a point of each of the other key elements closest to the key element with the highest degree of importance; if the straight line distances are the same, the importance degree of other key elements with larger areas is higher;
if the key elements positioned on the central position point do not exist, acquiring the linear distance between one point of each key element closest to the central position point and the central position point, and determining the importance degree of each key element according to the length of the linear distance; the shorter the straight line distance is, the higher the importance degree of the corresponding key element is; if the straight line distances are the same, the key elements with larger areas have higher importance degree;
and 4, acquiring the position relationship between each key element and other elements, and integrating the key elements and the position relationships between the key elements and other elements into key information, wherein the importance degree of the key information is consistent with that of the key elements.
The working principle of the technical scheme is as follows: firstly, extracting each element in the target object, sequencing each element from first to last according to the area of the target object occupied by each element, and obtaining an element set; then, determining the number of key elements, and selecting the elements as the key elements in the order from first to last in the element set according to the determined number of the key elements; then, extracting the key elements and the central position points of the target object, if the key elements positioned on the central position points exist, taking the key elements positioned on the central position points as the key elements with the highest importance degree, and detecting the position relation between other key elements and the key elements with the highest importance degree; determining the importance degrees of other key elements according to the length of the straight-line distance between the key element with the highest importance degree and the other key elements, wherein the shorter the straight-line distance is, the higher the importance degree of the corresponding other key elements is; wherein the linear distance is: the distance between a point of the key element with the highest degree of importance closest to each of the other key elements and a point of each of the other key elements closest to the key element with the highest degree of importance; if the straight line distances are the same, the importance degree of other key elements with larger areas is higher; if the key elements positioned on the central position point do not exist, acquiring the linear distance between one point of each key element closest to the central position point and the central position point, and determining the importance degree of each key element according to the length of the linear distance; the shorter the straight line distance is, the higher the importance degree of the corresponding key element is; if the straight line distances are the same, the key elements with larger areas have higher importance degree; and finally, acquiring the position relation between each key element and other elements, and integrating the key elements and the position relations between the key elements and other elements into key information, wherein the importance degree of the key information is consistent with that of the key elements.
The effect of the above technical scheme is as follows: according to the method, the sorting rationality of the importance degrees of the key information can be effectively improved, meanwhile, the accuracy of selecting the key elements is improved, and then the searching accuracy of the similar objects is improved. Meanwhile, the number of the selected key elements obtained by the formula can be selected according to the number of the wanted key elements under the actual proportion of each element in the actual target object, so that the matching degree of the number of the key elements and the target object can be effectively improved, the key elements can be reasonably extracted according to the target objects under the conditions of complexity (more element content), special target objects (less element number, larger proportion of each element) and the like, and the accuracy and the searching speed of similarity searching are improved. The problem that the number of the fixed key elements cannot automatically adapt to the actual condition of the target object to cause inaccurate searching of the similar object or reduction of searching efficiency is effectively prevented.
In an embodiment of the present invention, when the target object is an overall object, determining an overall characteristic of the target object includes:
carrying out standardization processing on the target object to obtain a standardized target picture or a standardized target font;
performing five-angle rotation on the standardized target picture or the standardized target font, and storing the picture or the font in each rotation state, wherein the five angles include rotating the target picture or the font by 30 degrees, rotating the target picture or the font by 90 degrees, rotating the target picture or the font by 120 degrees, rotating the target picture or the target font by 180 degrees and rotating the target picture or the target font by 270 degrees;
and
carrying out five-size scaling treatment on the standardized target picture or the standardized target font, and storing the picture in each scaling state; wherein the scaling process of the five sizes includes a 50% size reduction process, an 80% size reduction process, a 120% size enlargement process, a 150% size enlargement process, and a 200% size enlargement process;
performing feature extraction on the color of each element, the shape of each element and the position relation among the elements on all target pictures or target fonts subjected to five-angle rotation or five-size scaling processing to obtain the color feature, the shape feature and the position feature of the target pictures or the target fonts;
and taking the color feature, the shape feature and the position feature of the target picture or the target font as the overall feature of the target object.
The working principle of the technical scheme is as follows: the scheme adopted by the embodiment is to perform standardization processing on the target object, so that the characteristics of the target object, such as size, hue and the like, are more consistent with the object in the copyright-free database, and the accuracy and efficiency of searching are improved. And then, performing multi-angle rotation and multi-size scaling processing on the standardized target picture, storing each state to form a multi-dimensional feature, and taking the multi-dimensional feature as an overall feature to search for similar pictures.
The effect of the above technical scheme is as follows: according to the scheme adopted by the embodiment, the target object is further processed, so that the target object is used as a search basis to provide more dimension characteristics for related search, and the search efficiency and accuracy are improved from the angle. Meanwhile, through the adjustment of the size and the angle, the matching response speed of the searched target object and the pictures or characters in the copyright-free database can be effectively improved after the specification-changed rotation and zooming adjustment is carried out, the pictures with the angles and the sizes similar to those of the corresponding target object can be quickly searched under the condition that the diversity of the pictures and the diversity of the characters in the copyright-free database are various through multi-angle rotation or multi-vinegar zooming, and the accuracy and the speed of the initial searching of the target in the copyright-free database are effectively avoided being reduced due to the fact that the sizes and the angles of the target object are different from those of the pictures in the copyright-free database.
In one embodiment of the present invention, the copyright-free repository includes an offline status and an online status;
after the target object input by the user is determined, the method comprises the following steps:
when the copyright-free database is in an off-line state and reaches a preset time, one end storing the copyright-free database sends an updating request to the copyright-free database providing end server;
the server side carries out authority verification on the sending updating request side;
if the verification is passed, the server side sends update data to an update request side, and the update request side which stores the copyright-free database receives the update data and stores the update data locally;
and if the verification fails, the server side sends an authority prompting instruction to the updating request side, the updating request side applies for the authority with timeliness according to the authority prompting instruction, and sends the updating request side to the server side again for authority verification after acquiring the related authority until the verification passes.
The working principle of the technical scheme is as follows: the scheme adopted by the embodiment is that the copyright-free database is divided into an offline state and an online state, the online state is a common state, and a user can search similar objects online through a network. The situation of the offline state is rare, and the specific operation in the offline state is provided, so that the situation that the loss is caused because the online search cannot be carried out under the special situation is prevented. The problem often occurring in the off-line state is that the updating of the data in the database can not be performed in time at the off-line end, thereby causing the problem of reducing the searching accuracy. The embodiment solves the technical problem through the following scheme.
The specific operation mode is as follows:
presetting a certain updating preset time, and when the preset time is reached, sending an updating request to a server of a copyright-free database providing end by one end in which a copyright-free database is stored, wherein the request is an active request, so that the cost of managing an offline end of the server is saved; and secondly, the server side carries out authority verification on the update request sending side, if the verification is passed, the server side sends update data to the update request sending side, the update request sending side which stores the copyright-free database receives the update data, and the update data are stored locally. And if the verification fails, the server side sends an authority prompting instruction to the updating request side, the updating request side applies for the authority with timeliness according to the authority prompting instruction, and sends the updating request side to the server side again for authority verification after acquiring the related authority until the verification passes. The authority issued by the server is time-efficient, and relevant data are prevented from being downloaded maliciously.
The beneficial effects of the above technical scheme are: the scheme provided by the embodiment is adopted to firstly provide specific operation in the offline state in order to prevent the problem of loss caused by the fact that online search cannot be carried out under special conditions, and solve the technical problem that the updating of data in a database cannot be carried out at the offline end in time, which is a problem frequently occurring in the offline state.
The embodiment of the invention provides a similar picture or font searching system, as shown in fig. 3, the system comprises:
the target determining module is used for determining a target object input by a user, wherein the target object comprises a target picture and a target font;
the classification module is used for classifying the target object and classifying the target object into a local object and an overall object; the local object refers to an object in which a separation state exists between elements in a target character and an object in which a background picture in a target picture does not allow a user to search for a target, for example, when the target character is pointed, if characters corresponding to the target character are in a left-right structure, a Chinese character in an upper-lower structure, or unconnected letters or numbers, the local object is obtained; when the target picture is aimed at, if the image elements in the target picture are not connected, the target picture is a local object; the integral object refers to an object in which elements in the target character are connected with each other to form a whole, and a background picture in a target picture is also an object for a user to search for a target, for example, when the target font is aimed at, if strokes in characters corresponding to the target font are connected integrally, the integral object is ended, such as wood, one, nine and day; when aiming at the target picture, if all the influence elements in the target picture are integrally connected, the target picture is an integral object;
and the searching module is used for respectively carrying out similarity searching in a copyright-free database according to different types of the target object to acquire images or fonts similar to the target object.
Wherein the search module comprises:
the first searching module is used for determining key information of the target object when the target object is a local object, performing similarity searching in a copyright-free database according to the key information, and acquiring pictures or fonts similar to the target object in the copyright-free database;
and the second searching module is used for determining the overall characteristics of the target object when the target object is the overall object, searching the overall characteristic similarity in the copyright-free database by using the overall characteristics and determining the image or the font similar to the target object.
The first searching module comprises:
the information determining module is used for determining a plurality of pieces of key information which are sequenced according to a preset mode when the target object is a local object;
the first query module is used for taking the key information of the target object as similarity search basis, sequentially carrying out first similarity search in a copyright-free database according to the key information sequencing order to obtain a first similarity search result, and forming a first similarity set by the similar objects searched by the first similarity search result;
the second query module is used for acquiring the overall characteristics of the target object, and performing second similarity search in the first similarity set by using the overall characteristics of the target object to acquire a second similarity search result;
the result determining module is used for determining an image or a font similar to the target object according to the second similarity searching result; the key information comprises key elements contained in the target object and relative position relations between the key elements and other elements on the target object; the data in the copyright-free database comprises copyright-free data and self-owned copyright data which can be freely used by a user under legal conditions;
the second searching module comprises:
the characteristic determining module is used for determining the integral characteristic of the target object when the target object is an integral object;
the primary searching module is used for performing primary searching on the overall characteristic similarity in the copyright-free database by using the overall characteristic of the target object and acquiring a primary searching result of the overall characteristic similarity;
the secondary searching module is used for forming a second similarity set by the similar objects in the primary searching result of the overall feature similarity; determining local features of the target object by using weight division of the target object and similar objects in the second similar set;
a final result determining module, configured to perform similarity secondary search in the second similarity set according to the local feature; and determining an image or a font similar to the target object according to the similarity secondary searching result.
The working principle of the technical scheme is as follows: the scheme adopted by this embodiment is to classify the target object, classify the target object into a local object and an overall object, and perform corresponding operations according to whether the target object is a local object or an overall object.
When the target object is a local object, the target object is taken as a target picture for introduction, the local object can be understood as a background part which is common or not outstanding in the whole picture, the local feature of the picture is the key point of the whole picture, and a user needs to find a picture similar to the local feature on the picture when searching for a similar picture, so that the target picture of the type is defined and classified as the local object, specific similarity searching is carried out according to the characteristics of the picture, the similar picture is found more quickly and accurately, and the searching purpose is achieved. Specifically, firstly, determining a plurality of pieces of sorting key information of the target objects according to a preset mode; taking the key information of the target object as a similarity searching basis, sequentially performing similarity primary searching in a copyright-free database according to a key information sequencing sequence, and forming a first similarity set by the searched similar objects; performing similarity secondary search in the first similarity set based on the overall characteristics of the target object; determining an object similar to the target object according to the similarity secondary searching result; the key information comprises key elements contained in the target object and relative position relations between the key elements and other elements on the target object.
In addition, when the target object is a global object, the target object is also taken as an example for description, the local object may be understood as a background portion in the whole photo, and the background portion is a key point for the user to search for a similar photo, so that such a photo is set as the global object, and a specific similar photo is searched according to the situation of the global object. Specifically, the overall characteristics of the target object are determined, the overall characteristic similarity is primarily searched in a copyright-free database based on the overall characteristics, and the searched similar objects form a second similar set; determining local features of the target object based on weight partitioning of the target object and similar objects in the second similar set; performing similarity secondary search in the second similarity set according to the local features; and determining an object similar to the target object according to the similarity secondary searching result.
It should be noted that the copyright-free approximate picture or font searching method in the subject name of the application is the generalized copyright-free, and includes the copyright-free picture and font with general properties, the copyright-free picture and font are free pictures and fonts which are open to the public, and the materials which can be reasonably, legally and freely used on the internet all belong to the type of copyright-free materials; in addition, the broad copyright protection can also include the condition that the user has own copyright of the corresponding material, the own copyright is protected by law, therefore, when having the own copyright, the user has the characteristic of not infringing the copyright as the general copyright protection, and in the condition, the material required by the user can be identified as the material used for free. Therefore, in this embodiment, the data in the copyright-free database includes the copyright-free data and the self-copyrighted data that can be freely used by the user in a legal situation, and neither of the two data relates to the problem of infringement.
The beneficial effects of the above technical scheme are: according to the scheme provided by the embodiment, the target object is classified into the local object and the overall object by classifying the target object, and corresponding operation is performed according to whether the target object is the local object or the overall object. According to the specific classification of the target objects, the target objects belonging to different classes are searched for similar objects according to corresponding classes, on one hand, the searching efficiency can be improved by pre-classifying and setting different searching modes according to different classes, and on the other hand, the searching method is set with pertinence according to the specific characteristics of different classes, so that the accuracy of the searching result is improved.
In one embodiment of the present invention, the information determining module includes:
the element determining module is used for determining each key element in the target object and the position relation between each key element and other elements according to the separation condition of each element of the target object and the area size of the element; each key element and the position relation between the key element and other elements are used as key information; each target object contains one or more key information;
the sorting module is used for sorting the plurality of key information according to the order of the importance degrees of the key information from high to low when the target object contains the plurality of key information;
wherein the determining process of the importance degree of the key information comprises the following steps:
step 1, extracting each element in the target object, sequencing each element from first to last according to the area of the target object occupied by each element, and obtaining an element set;
step 2, determining the number of key elements, and selecting the elements as the key elements in the order from first to last in the element set according to the determined number of the key elements; the number of the key elements is obtained through the following formula:
Figure 854531DEST_PATH_IMAGE005
wherein M represents the total number of elements, and M
Figure 176928DEST_PATH_IMAGE002
10; when M is
Figure 724584DEST_PATH_IMAGE003
When 10, the number N of the key elements is a preset fixed number 6; n represents the number of key elements; INT [ 2 ]]Represents a floor function; c represents the number of corresponding elements when the areas of the elements occupying the target object are arranged from large to small and the sum of the areas of the elements from front to back exceeds 60 percent of the total area of the target object; specifically, when the number M of elements in the target object is 15, if the sum of the areas of the elements exceeds 60% of the total area of the target object, the corresponding number C of elements is 10, which exceeds the total area of the target object
Figure 488141DEST_PATH_IMAGE004
Then, the number N of the key elements is 10 through calculation; if the sum of the element areas exceeds 60 percent of the total area of the target object, the corresponding element number C is 7, and the sum of the element areas does not exceed 60 percent of the total area of the target object
Figure 603995DEST_PATH_IMAGE004
Then the number N of key elements is 8 by calculation.
Step 3, extracting the key elements and the central position points of the target object, if the key elements positioned on the central position points exist, taking the key elements positioned on the central position points as the key elements with the highest importance degree, and detecting the position relationship between other key elements and the key elements with the highest importance degree; determining the importance degrees of other key elements according to the length of the straight-line distance between the key element with the highest importance degree and the other key elements, wherein the shorter the straight-line distance is, the higher the importance degree of the corresponding other key elements is; wherein the linear distance is: the distance between a point of the key element with the highest degree of importance closest to each of the other key elements and a point of each of the other key elements closest to the key element with the highest degree of importance; if the straight line distances are the same, the importance degree of other key elements with larger areas is higher;
if the key elements positioned on the central position point do not exist, acquiring the linear distance between one point of each key element closest to the central position point and the central position point, and determining the importance degree of each key element according to the length of the linear distance; the shorter the straight line distance is, the higher the importance degree of the corresponding key element is; if the straight line distances are the same, the key elements with larger areas have higher importance degree;
and 4, acquiring the position relationship between each key element and other elements, and integrating the key elements and the position relationships between the key elements and other elements into key information, wherein the importance degree of the key information is consistent with that of the key elements.
The working principle of the technical scheme is as follows: firstly, extracting each element in the target object, sequencing each element from first to last according to the area of the target object occupied by each element, and obtaining an element set; then, determining the number of key elements, and selecting the elements as the key elements in the order from first to last in the element set according to the determined number of the key elements; then, extracting the key elements and the central position points of the target object, if the key elements positioned on the central position points exist, taking the key elements positioned on the central position points as the key elements with the highest importance degree, and detecting the position relation between other key elements and the key elements with the highest importance degree; determining the importance degrees of other key elements according to the length of the straight-line distance between the key element with the highest importance degree and the other key elements, wherein the shorter the straight-line distance is, the higher the importance degree of the corresponding other key elements is; wherein the linear distance is: the distance between a point of the key element with the highest degree of importance closest to each of the other key elements and a point of each of the other key elements closest to the key element with the highest degree of importance; if the straight line distances are the same, the importance degree of other key elements with larger areas is higher; if the key elements positioned on the central position point do not exist, acquiring the linear distance between one point of each key element closest to the central position point and the central position point, and determining the importance degree of each key element according to the length of the linear distance; the shorter the straight line distance is, the higher the importance degree of the corresponding key element is; if the straight line distances are the same, the key elements with larger areas have higher importance degree; and finally, acquiring the position relation between each key element and other elements, and integrating the key elements and the position relations between the key elements and other elements into key information, wherein the importance degree of the key information is consistent with that of the key elements.
The effect of the above technical scheme is as follows: according to the method, the sorting rationality of the importance degrees of the key information can be effectively improved, meanwhile, the accuracy of selecting the key elements is improved, and then the searching accuracy of the similar objects is improved. Meanwhile, the number of the selected key elements obtained by the formula can be selected according to the number of the wanted key elements under the actual proportion of each element in the actual target object, so that the matching degree of the number of the key elements and the target object can be effectively improved, the key elements can be reasonably extracted according to the target objects under the conditions of complexity (more element content), special target objects (less element number, larger proportion of each element) and the like, and the accuracy and the searching speed of similarity searching are improved. The problem that the number of the fixed key elements cannot automatically adapt to the actual condition of the target object to cause inaccurate searching of the similar object or reduction of searching efficiency is effectively prevented.
In one embodiment of the present invention, when the feature determination module includes:
the standardization module is used for carrying out standardization processing on the target object to obtain a standardized target picture or a standardized target font;
a rotation processing module, configured to perform five-angle rotation on the normalized target picture or target font, and store the picture or font in each rotation state, where the five angles include rotating the target picture or font by 30 °, 90 °, 120 °, 180 °, and 270 °;
and
the zooming processing module is used for zooming the standardized target picture or the standardized target font into five sizes and storing the picture in each zooming state; wherein the scaling process of the five sizes includes a 50% size reduction process, an 80% size reduction process, a 120% size enlargement process, a 150% size enlargement process, and a 200% size enlargement process;
the characteristic extraction module is used for extracting the characteristics of the color of each element, the shape of each element and the position relation among the elements of all the target pictures or target fonts subjected to five-angle rotation or five-size scaling processing to obtain the color characteristics, the shape characteristics and the position characteristics of the target pictures or the target fonts;
and the overall characteristic integration module is used for taking the color characteristic, the shape characteristic and the position characteristic of the target picture or the target font as the overall characteristic of the target object.
The working principle of the technical scheme is as follows: the scheme adopted by the embodiment is to perform standardization processing on the target object, so that the characteristics of the target object, such as size, hue and the like, are more consistent with the object in the copyright-free database, and the accuracy and efficiency of searching are improved. And then, performing multi-angle rotation and multi-size scaling processing on the standardized target picture, storing each state to form a multi-dimensional feature, and taking the multi-dimensional feature as an overall feature to search for similar pictures.
The effect of the above technical scheme is as follows: according to the scheme adopted by the embodiment, the target object is further processed, so that the target object is used as a search basis to provide more dimension characteristics for related search, and the search efficiency and accuracy are improved from the angle. Meanwhile, through the adjustment of the size and the angle, the matching response speed of the searched target object and the pictures or characters in the copyright-free database can be effectively improved after the specification-changed rotation and zooming adjustment is carried out, the pictures with the angles and the sizes similar to those of the corresponding target object can be quickly searched under the condition that the diversity of the pictures and the diversity of the characters in the copyright-free database are various through multi-angle rotation or multi-vinegar zooming, and the accuracy and the speed of the initial searching of the target in the copyright-free database are effectively avoided being reduced due to the fact that the sizes and the angles of the target object are different from those of the pictures in the copyright-free database.
In one embodiment of the present invention, the copyright-free repository includes an offline status and an online status;
after determining the target object input by the user, the system further comprises:
the storage module is used for sending an updating request to the server of the copyright-free database providing end by one end which stores the copyright-free database when the copyright-free database is in an off-line state and reaches a preset time;
the verification module is used for verifying the authority of the update request sending end by the server end;
the update data sending module is used for sending update data to the update request end by the server end if the verification is passed, receiving the update data by the update request end stored with the copyright-free database, and storing the update data locally;
and the reminding module is used for sending an authority reminding instruction to the updating request end by the server end if the verification fails, applying for the authority with timeliness by the updating request end according to the authority reminding instruction, and sending the updating request end to the server end again for authority verification after acquiring the related authority until the verification passes.
The working principle of the technical scheme is as follows: the scheme adopted by the embodiment is that the copyright-free database is divided into an offline state and an online state, the online state is a common state, and a user can search similar objects online through a network. The situation of the offline state is rare, and the specific operation in the offline state is provided, so that the situation that the loss is caused because the online search cannot be carried out under the special situation is prevented. The problem often occurring in the off-line state is that the updating of the data in the database can not be performed in time at the off-line end, thereby causing the problem of reducing the searching accuracy. The embodiment solves the technical problem through the following scheme.
The specific operation mode is as follows:
presetting a certain updating preset time, and when the preset time is reached, sending an updating request to a server of a copyright-free database providing end by one end in which a copyright-free database is stored, wherein the request is an active request, so that the cost of managing an offline end of the server is saved; and secondly, the server side carries out authority verification on the update request sending side, if the verification is passed, the server side sends update data to the update request sending side, the update request sending side which stores the copyright-free database receives the update data, and the update data are stored locally. And if the verification fails, the server side sends an authority prompting instruction to the updating request side, the updating request side applies for the authority with timeliness according to the authority prompting instruction, and sends the updating request side to the server side again for authority verification after acquiring the related authority until the verification passes. The authority issued by the server is time-efficient, and relevant data are prevented from being downloaded maliciously.
The beneficial effects of the above technical scheme are: the scheme provided by the embodiment is adopted to firstly provide specific operation in the offline state in order to prevent the problem of loss caused by the fact that online search cannot be carried out under special conditions, and solve the technical problem that the updating of data in a database cannot be carried out at the offline end in time, which is a problem frequently occurring in the offline state.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for searching similar pictures or fonts, which is characterized in that the method comprises the following steps:
determining a target object input by a user, wherein the target object comprises a target picture and a target font;
classifying the target object into a local object and an overall object; the local object refers to an object with a separation state among elements in the target character and an object of a background picture non-user search target in the target picture; the integral object refers to an object formed by connecting all elements in the target characters into a whole and a background picture in a target picture is also an object for a user to search a target;
and respectively carrying out similarity search in a copyright-free database according to different types of the target object to obtain pictures or fonts similar to the target object.
2. The method of claim 1, wherein the performing similarity search in a copyright-free database according to different categories of the target object to obtain a picture or font similar to the target object comprises:
when the target object is a local object, determining key information of the target object, performing similarity search in a copyright-free database through the key information, and acquiring an image or a font similar to the target object in the copyright-free database;
when the target object is an integral object, determining the integral characteristic of the target object, and performing integral characteristic similarity search in the copyright-free database by using the integral characteristic to determine an image or a font similar to the target object.
3. The method of claim 2, wherein when the target object is a local object, determining key information of the target object, and performing a similarity search in a copyright-free repository through the key information, wherein obtaining a picture or a font similar to the target object in the copyright-free repository includes:
when the target object is a local object, determining a plurality of pieces of key information of the target object, which are sequenced according to a preset mode;
taking the key information of the target object as similarity searching basis, sequentially carrying out first similarity searching in a copyright-free database according to the key information sequencing order to obtain a first similarity searching result, and forming a first similarity set by the similar objects searched by the first similarity searching result;
acquiring the overall characteristics of the target object, and performing a second similarity search in the first similarity set by using the overall characteristics of the target object to acquire a second similarity search result;
determining an image or a font similar to the target object according to the second similarity search result; the key information comprises key elements contained in the target object and relative position relations between the key elements and other elements on the target object; the data in the copyright-free database comprises copyright-free data and self-copyrighted data which can be freely used by a user under legal conditions.
4. The method of claim 3, wherein determining key information for ordering a plurality of the target objects according to a preset manner comprises:
determining each key element in the target object and the position relation between each key element and other elements according to the separation condition of each element of the target object and the area size occupied by the element; each key element and the position relation between the key element and other elements are used as key information; each target object contains one or more key information;
when the target object contains a plurality of pieces of key information, sequencing the key information in an order from high to low according to the importance degree of the key information;
wherein the determining process of the importance degree of the key information comprises the following steps:
extracting each element in the target object, sequencing each element from first to last according to the area of the target object occupied by each element, and obtaining an element set;
determining the number of key elements, and selecting the elements as the key elements in the order from first to last in the element set according to the determined number of the key elements;
extracting central position points of the key elements and the target object, if the key elements positioned on the central position points exist, taking the key elements positioned on the central position points as key elements with the highest importance degree, and detecting the position relation between other key elements and the key elements with the highest importance degree; determining the importance degrees of other key elements according to the length of the straight-line distance between the key element with the highest importance degree and the other key elements, wherein the shorter the straight-line distance is, the higher the importance degree of the corresponding other key elements is; wherein the linear distance is: the distance between a point of the key element with the highest degree of importance closest to each of the other key elements and a point of each of the other key elements closest to the key element with the highest degree of importance; if the straight line distances are the same, the importance degree of other key elements with larger areas is higher;
if the key elements positioned on the central position point do not exist, acquiring the linear distance between one point of each key element closest to the central position point and the central position point, and determining the importance degree of each key element according to the length of the linear distance; the shorter the straight line distance is, the higher the importance degree of the corresponding key element is; if the straight line distances are the same, the key elements with larger areas have higher importance degree;
acquiring the position relation between each key element and other elements, and integrating the key elements and the position relations between the key elements and other elements into key information, wherein the importance degree of the key information is consistent with that of the key elements.
5. The method of claim 2, wherein when the target object is an overall object, determining an overall feature of the target object, performing an overall feature similarity search in the copyright-free repository using the overall feature, and determining a picture or a font similar to the target object comprises:
when the target object is an integral object, determining the integral characteristic of the target object;
performing initial search on the overall characteristic similarity in a copyright-free database by using the overall characteristic of the target object, and acquiring an initial search result of the overall characteristic similarity;
forming a second similarity set by the similar objects in the initial search result of the overall feature similarity; determining local features of the target object by using weight division of the target object and similar objects in the second similar set;
performing similarity secondary search in the second similarity set according to the local features; and determining an image or a font similar to the target object according to the similarity secondary searching result.
6. The method of claim 5, wherein when the target object is a whole object, determining the whole feature of the target object comprises:
carrying out standardization processing on the target object to obtain a standardized target picture or a standardized target font;
performing five-angle rotation on the standardized target picture or the standardized target font, and storing the picture or the font in each rotation state;
carrying out five-size scaling processing on the standardized target picture or the standardized target font, and storing the picture in each scaling state;
performing feature extraction on the color of each element, the shape of each element and the position relation among the elements on all target pictures or target fonts subjected to five-angle rotation or five-size scaling processing to obtain the color feature, the shape feature and the position feature of the target pictures or the target fonts;
and taking the color feature, the shape feature and the position feature of the target picture or the target font as the overall feature of the target object.
7. The method of claim 1, wherein the copyright-free repository includes an offline status and an online status;
after the target object input by the user is determined, the method comprises the following steps:
when the copyright-free database is in an off-line state and reaches a preset time, one end storing the copyright-free database sends an updating request to the copyright-free database providing end server;
the server side carries out authority verification on the sending updating request side;
if the verification is passed, the server side sends update data to an update request side, and the update request side which stores the copyright-free database receives the update data and stores the update data locally;
and if the verification fails, the server side sends an authority prompting instruction to the updating request side, the updating request side applies for the authority with timeliness according to the authority prompting instruction, and sends the updating request side to the server side again for authority verification after acquiring the related authority until the verification passes.
8. A similar picture or font lookup system, the system comprising:
the target determining module is used for determining a target object input by a user, wherein the target object comprises a target picture and a target font;
the classification module is used for classifying the target object and classifying the target object into a local object and an overall object; the local object is an object with a separation state among elements in the target character and an object with a background picture in the target picture which is not a target searched by a user, and the overall object is an object formed by connecting the elements in the target character into a whole, and the background picture in the target picture is also an object of the target searched by the user;
and the searching module is used for respectively carrying out similarity searching in a copyright-free database according to different types of the target object to acquire images or fonts similar to the target object.
9. The system of claim 8, wherein the search module comprises:
the first searching module is used for determining key information of the target object when the target object is a local object, performing similarity searching in a copyright-free database according to the key information, and acquiring pictures or fonts similar to the target object in the copyright-free database;
the second searching module is used for determining the overall characteristics of the target object when the target object is an overall object, searching the overall characteristic similarity in the copyright-free database by using the overall characteristics and determining an image or a font similar to the target object;
the first searching module comprises:
the information determining module is used for determining a plurality of pieces of key information which are sequenced according to a preset mode when the target object is a local object;
the first query module is used for taking the key information of the target object as similarity search basis, sequentially carrying out first similarity search in a copyright-free database according to the key information sequencing order to obtain a first similarity search result, and forming a first similarity set by the similar objects searched by the first similarity search result;
the second query module is used for acquiring the overall characteristics of the target object, and performing second similarity search in the first similarity set by using the overall characteristics of the target object to acquire a second similarity search result;
the result determining module is used for determining an image or a font similar to the target object according to the second similarity searching result; the key information comprises key elements contained in the target object and relative position relations between the key elements and other elements on the target object; the data in the copyright-free database comprises copyright-free data and self-owned copyright data which can be freely used by a user under legal conditions;
the second searching module comprises:
the characteristic determining module is used for determining the integral characteristic of the target object when the target object is an integral object;
the primary searching module is used for performing primary searching on the overall characteristic similarity in the copyright-free database by using the overall characteristic of the target object and acquiring a primary searching result of the overall characteristic similarity;
the secondary searching module is used for forming a second similarity set by the similar objects in the primary searching result of the overall feature similarity; determining local features of the target object by using weight division of the target object and similar objects in the second similar set;
a final result determining module, configured to perform similarity secondary search in the second similarity set according to the local feature; and determining an image or a font similar to the target object according to the similarity secondary searching result.
10. The system of claim 9, wherein the feature determination module comprises:
the standardization module is used for carrying out standardization processing on the target object to obtain a standardized target picture or a standardized target font;
the rotation processing module is used for rotating the standardized target picture or the standardized target font by five angles and storing the picture or the font in each rotation state;
the scaling processing module is used for carrying out five-size scaling processing on the standardized target picture or the standardized target font and storing the picture in each scaling state;
the characteristic extraction module is used for extracting the characteristics of the color of each element, the shape of each element and the position relation among the elements of all the target pictures or target fonts subjected to five-angle rotation or five-size scaling processing to obtain the color characteristics, the shape characteristics and the position characteristics of the target pictures or the target fonts;
and the overall characteristic integration module is used for taking the color characteristic, the shape characteristic and the position characteristic of the target picture or the target font as the overall characteristic of the target object.
CN202111090267.0A 2021-09-17 2021-09-17 Method and system for searching similar pictures or fonts Active CN113536005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111090267.0A CN113536005B (en) 2021-09-17 2021-09-17 Method and system for searching similar pictures or fonts

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111090267.0A CN113536005B (en) 2021-09-17 2021-09-17 Method and system for searching similar pictures or fonts

Publications (2)

Publication Number Publication Date
CN113536005A true CN113536005A (en) 2021-10-22
CN113536005B CN113536005B (en) 2021-12-24

Family

ID=78093379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111090267.0A Active CN113536005B (en) 2021-09-17 2021-09-17 Method and system for searching similar pictures or fonts

Country Status (1)

Country Link
CN (1) CN113536005B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102016837A (en) * 2007-11-26 2011-04-13 沃伦·丹尼尔·蔡尔德 System and method for classification and retrieval of Chinese-type characters and character components
US20150205765A1 (en) * 2014-01-20 2015-07-23 Arphic Technology Co., Ltd. Font process method and font process system
CN104992179A (en) * 2015-06-23 2015-10-21 浙江大学 Fine-grained convolutional neural network-based clothes recommendation method
CN105488471A (en) * 2015-11-30 2016-04-13 北大方正集团有限公司 Character pattern recognition method and device
CN106203206A (en) * 2015-09-22 2016-12-07 上海行邑信息科技有限公司 A kind of complex background barcode scanning identification control method and device
WO2017012277A1 (en) * 2015-07-22 2017-01-26 杭州海康威视数字技术股份有限公司 Method and device for searching a target in an image
CN106844481A (en) * 2016-12-23 2017-06-13 北京信息科技大学 Font similarity and font replacement method
CN106933816A (en) * 2015-12-29 2017-07-07 北京大唐高鸿数据网络技术有限公司 Across camera lens object retrieval system and method based on global characteristics and local feature
CN107944022A (en) * 2017-12-11 2018-04-20 努比亚技术有限公司 Picture classification method, mobile terminal and computer-readable recording medium
CN111797260A (en) * 2020-07-10 2020-10-20 宁夏中科启创知识产权咨询有限公司 Trademark retrieval method and system based on image recognition
CN113157956A (en) * 2021-04-23 2021-07-23 雅马哈发动机(厦门)信息系统有限公司 Picture searching method, system, mobile terminal and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102016837A (en) * 2007-11-26 2011-04-13 沃伦·丹尼尔·蔡尔德 System and method for classification and retrieval of Chinese-type characters and character components
US20150205765A1 (en) * 2014-01-20 2015-07-23 Arphic Technology Co., Ltd. Font process method and font process system
CN104992179A (en) * 2015-06-23 2015-10-21 浙江大学 Fine-grained convolutional neural network-based clothes recommendation method
WO2017012277A1 (en) * 2015-07-22 2017-01-26 杭州海康威视数字技术股份有限公司 Method and device for searching a target in an image
CN106203206A (en) * 2015-09-22 2016-12-07 上海行邑信息科技有限公司 A kind of complex background barcode scanning identification control method and device
CN105488471A (en) * 2015-11-30 2016-04-13 北大方正集团有限公司 Character pattern recognition method and device
CN106933816A (en) * 2015-12-29 2017-07-07 北京大唐高鸿数据网络技术有限公司 Across camera lens object retrieval system and method based on global characteristics and local feature
CN106844481A (en) * 2016-12-23 2017-06-13 北京信息科技大学 Font similarity and font replacement method
CN107944022A (en) * 2017-12-11 2018-04-20 努比亚技术有限公司 Picture classification method, mobile terminal and computer-readable recording medium
CN111797260A (en) * 2020-07-10 2020-10-20 宁夏中科启创知识产权咨询有限公司 Trademark retrieval method and system based on image recognition
CN113157956A (en) * 2021-04-23 2021-07-23 雅马哈发动机(厦门)信息系统有限公司 Picture searching method, system, mobile terminal and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MARTIN LETTNER等: "《Higher order MRF for foreground-background separation in multi-spectral images of historical manuscripts》", 《ACM》 *
朱远清: "基于前景和背景划分的区域图像检索的研究与实现", 《万方学位论文》 *

Also Published As

Publication number Publication date
CN113536005B (en) 2021-12-24

Similar Documents

Publication Publication Date Title
US11048966B2 (en) Method and device for comparing similarities of high dimensional features of images
US5465353A (en) Image matching and retrieval by multi-access redundant hashing
CN108932294B (en) Resume data processing method, device, equipment and storage medium based on index
US8775401B2 (en) Shape based picture search
US8577882B2 (en) Method and system for searching multilingual documents
US8385660B2 (en) Mixed media reality indexing and retrieval for repeated content
US9037600B1 (en) Any-image labeling engine
US20090076996A1 (en) Multi-Classifier Selection and Monitoring for MMR-based Image Recognition
WO2019080411A1 (en) Electrical apparatus, facial image clustering search method, and computer readable storage medium
CN102411582B (en) Image searching method, device and client
CN110929125A (en) Search recall method, apparatus, device and storage medium thereof
CN110765760B (en) Legal case distribution method and device, storage medium and server
CN107870915B (en) Indication of search results
CN109299307B (en) Trademark retrieval early warning method and device based on structural analysis
CN105787028A (en) Business card proofreading method and system
CN111858977B (en) Bill information acquisition method, device, computer equipment and storage medium
CN111143555A (en) Big data-based customer portrait generation method, device, equipment and storage medium
CN115249007A (en) Method and device for detecting enclosing and bidding behavior based on electronic bidding document comparison
EP3301603A1 (en) Improved search for data loss prevention
CN111400448A (en) Method and device for analyzing incidence relation of objects
CN112417195A (en) Trademark inquiry system and method based on mobile terminal and storage medium
WO2022134580A1 (en) Method and apparatus for acquiring certificate information, and storage medium and computer device
CN113536005B (en) Method and system for searching similar pictures or fonts
CN109918661B (en) Synonym acquisition method and device
CN115185939B (en) Data processing method of multi-source data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant