Trademark font similarity detection method, device and equipment

文档序号:1185112 发布日期:2020-09-22 浏览:9次 中文

阅读说明:本技术 一种商标字形相似度检测方法、装置及设备 (Trademark font similarity detection method, device and equipment ) 是由 贺惠新 林欣郁 孙椿雨 于 2020-06-24 设计创作,主要内容包括:本发明实施例提供了一种商标字形相似度检测方法、装置及设备,方法包括以下步骤:获取待检测的第一商标文本的第一点阵矩阵;根据所述第一点阵矩阵获取与所述第一商标文本对应的多个局部矩阵;其中,所述局部矩阵为所述第一点阵矩阵的一部分;根据所述局部矩阵获取对应的统计有特征笔画数量的特征向量;其中,所述特征向量为不同商标文本之间相似度的计算依据;根据所述第一商标文本的特征向量与参考商标文本的特征向量计算二者的相似度。本发明利用统计有特征笔画的特征向量计算商标文本的相似度,提高了相似度检测效率和准确性。(The embodiment of the invention provides a trademark font similarity detection method, a device and equipment, wherein the method comprises the following steps: acquiring a first dot matrix of a first trademark text to be detected; acquiring a plurality of local matrixes corresponding to the first trademark text according to the first dot matrix; wherein the local matrix is a part of the first dot matrix; acquiring corresponding feature vectors with the number of feature strokes counted according to the local matrix; the feature vector is a calculation basis of similarity between texts of different trademarks; and calculating the similarity of the feature vector of the first trademark text and the feature vector of the reference trademark text according to the feature vectors of the first trademark text and the reference trademark text. The method and the device utilize the characteristic vectors of the characteristic strokes to calculate the similarity of the trademark text, and improve the similarity detection efficiency and accuracy.)

1. A trademark font similarity detection method is characterized by comprising the following steps:

acquiring a first dot matrix of a first trademark text to be detected;

acquiring a plurality of local matrixes corresponding to the first trademark text according to the first dot matrix; wherein the local matrix is a part of the first dot matrix;

acquiring corresponding feature vectors with the number of feature strokes counted according to the local matrix; the feature vector is a calculation basis of similarity between texts of different trademarks;

and calculating the similarity of the feature vector of the first trademark text and the feature vector of the reference trademark text according to the feature vectors of the first trademark text and the reference trademark text.

2. The trademark glyph similarity detection method of claim 1 wherein the characteristic strokes are represented by a characteristic stroke matrix comprising four characteristic stroke matrices of horizontal, vertical, left-falling and dot.

3. The trademark font similarity detection method according to claim 1, wherein the obtaining of the first dot matrix of the first trademark text to be detected specifically includes:

acquiring Chinese characters contained in a first trademark text to be detected;

and acquiring dot matrix information corresponding to each Chinese character in a word stock, and splicing the dot matrix information in sequence to obtain a first dot matrix corresponding to the first trademark text.

4. The trademark font similarity detection method according to claim 2, wherein the obtaining of the corresponding feature vectors with the statistical number of the feature strokes according to the local matrix specifically includes:

acquiring a plurality of small matrixes according to the local matrix; wherein the small matrix is a part of the local matrix, and the dimension of the small matrix is the same as the characteristic stroke matrix;

performing correlation calculation on each small matrix and the four characteristic stroke matrixes respectively to obtain characteristic stroke vectors of each small matrix according to the calculation result;

and adding the characteristic stroke vectors of each small matrix to obtain the characteristic vector corresponding to the local matrix.

5. The trademark font similarity detection method according to claim 4, wherein a plurality of small matrices are obtained according to the local matrix, and specifically:

filling four adjacent directions of the corresponding local matrix according to adjacent lattice points of the first lattice matrix to obtain a filling matrix;

and moving the filling matrix by adopting a window matrix with the same dimension as the characteristic stroke matrix so as to obtain a plurality of small matrices in the moving process.

6. The trademark font similarity detection method according to claim 4, wherein the correlation calculation is performed on each of the small matrices and the four characteristic stroke matrices, so as to obtain the characteristic stroke vectors of the small matrices according to the calculation result, specifically:

performing correlation calculation on each small matrix and four characteristic stroke matrixes respectively to obtain 4 result matrixes;

acquiring stroke fitting degrees according to the result matrix, and combining the four stroke fitting degrees to obtain a characteristic stroke vector corresponding to each small matrix; wherein the stroke fitness is obtained by:

where x is the sum of the array point values in the result matrix, and f (x) is stroke fitness.

7. The trademark font similarity detection method according to claim 1, wherein calculating the similarity between the feature vector of the first trademark text and the feature vector of the reference trademark text specifically comprises:

calculating the similarity of the local matrix corresponding to the first trademark text and the reference trademark text based on the feature vector, specifically as follows:

wherein A is1And A2A pair of partial matrices of the first brand text corresponding to the reference brand text,is A1Is determined by the feature vector of (a),

Figure FDA0002556118860000024

obtaining the font similarity of the first trademark text and the reference trademark text according to the similarity of each pair of the local matrixes, which specifically comprises the following steps:

sim (first trademark text, second trademark text) ═ avg (Sim (a)1,A2))。

8. The trademark font similarity detection method according to claim 1, further comprising:

and performing lattice expansion on the first trademark text and the reference trademark text with less characters, so that the dimensionalities of lattice matrixes of the first trademark text and the reference trademark text are the same.

9. A trademark font similarity detection device is characterized by comprising:

the dot matrix acquisition unit is used for acquiring a first dot matrix of a first trademark text to be detected;

a local matrix obtaining unit, configured to obtain, according to the first dot matrix, a plurality of local matrices corresponding to the first trademark text; wherein the local matrix is a part of the first dot matrix;

the characteristic vector acquisition unit is used for acquiring corresponding characteristic vectors with characteristic stroke quantity statistics according to the local matrix; the feature vector is a calculation basis of similarity between texts of different trademarks;

and the similarity calculation unit is used for calculating the similarity of the feature vector of the first trademark text and the feature vector of the reference trademark text.

10. A trademark font similarity detection apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the trademark font similarity detection method according to any one of claims 1 to 8 when executing the program.

Technical Field

The invention relates to the technical field of computers, in particular to a trademark font similarity detection method, device and equipment.

Background

The trademark is an important mark of the commodity, and along with the rapid development of economy, the trademark is generated more and more quickly. Similar trademarks can be confusing to consumers and can affect the benefits of the business of the fame trade mark. The approximation of the trademark should be compared with the font, pronunciation, meaning and the whole, wherein the character of font is most confusing to the consumers. When a consumer purchases a commodity, visual observation is the first thing, and the characteristics of human fast reading habits and the fact that Chinese characters have multiple shapes and characters are similar to each other, so that the consumer can make wrong judgments on trademarks. And is therefore necessary for brand font similarity detection.

There are several methods for brand font similarity detection. Firstly, the detection is carried out by a manual method, and the judgment is carried out by visual subjective feeling, but the efficiency of the method is very low, and secondly, the efficient detection is carried out by using an algorithm of a machine. Generally, in the prior art, Chinese character components are described by adopting Chinese character structures and strokes, and then an algorithm for calculating the font similarity of the Chinese characters through algorithms such as edit distance and the like or an algorithm for calculating the font similarity by using font coding and an improved Jaro-Winkler distance algorithm is adopted. However, the font coding method complicates the structural characteristics of the word on one hand, some complex stroke combinations are difficult to distinguish visually, but the differences between the similarity and the subjective judgment are large through coding expression, and the font coding cannot well show the integral structure of the word, so that the misjudgment condition exists.

Disclosure of Invention

In view of this, embodiments of the present invention provide a method, an apparatus, and a device for detecting similarity of trademark fonts, which have higher detection efficiency and accuracy.

The embodiment of the invention provides a trademark font similarity detection method, which comprises the following steps:

acquiring a first dot matrix of a first trademark text to be detected;

acquiring a plurality of local matrixes corresponding to the first trademark text according to the first dot matrix; wherein the local matrix is a part of the first dot matrix;

acquiring corresponding feature vectors with the number of feature strokes counted according to the local matrix; the feature vector is a calculation basis of similarity between texts of different trademarks;

and calculating the similarity of the feature vector of the first trademark text and the feature vector of the reference trademark text according to the feature vectors of the first trademark text and the reference trademark text.

Preferably, the characteristic strokes are represented by characteristic stroke matrixes, including four characteristic stroke matrixes of horizontal, vertical, left-falling and dot.

Preferably, the acquiring a first dot matrix of a first trademark text to be detected specifically includes:

acquiring Chinese characters contained in a first trademark text to be detected;

and acquiring dot matrix information corresponding to each Chinese character in a word stock, and splicing the dot matrix information in sequence to obtain a first dot matrix corresponding to the first trademark text.

Preferably, obtaining the corresponding feature vector with the statistical number of the feature strokes according to the local matrix specifically includes:

acquiring a plurality of small matrixes according to the local matrix; wherein the small matrix is a part of the local matrix, and the dimension of the small matrix is the same as the characteristic stroke matrix;

performing correlation calculation on each small matrix and the four characteristic stroke matrixes respectively to obtain characteristic stroke vectors of each small matrix according to the calculation result;

and adding the characteristic stroke vectors of each small matrix to obtain the characteristic vector corresponding to the local matrix.

Preferably, a plurality of small matrices are obtained according to the local matrix, specifically:

filling four adjacent directions of the corresponding local matrix according to adjacent lattice points of the first lattice matrix to obtain a filling matrix;

and moving the filling matrix by adopting a window matrix with the same dimension as the characteristic stroke matrix so as to obtain a plurality of small matrices in the moving process.

Preferably, the performing a correlation calculation on each small matrix and the four characteristic stroke matrices to obtain the characteristic stroke vector of the small matrix according to the calculation result specifically includes:

performing correlation calculation on each small matrix and four characteristic stroke matrixes respectively to obtain 4 result matrixes;

acquiring stroke fitting degrees according to the result matrix, and combining the four stroke fitting degrees to obtain a characteristic stroke vector corresponding to each small matrix; wherein the stroke fitness is obtained by:

where x is the sum of the array point values in the result matrix, and f (x) is stroke fitness.

Preferably, calculating the similarity between the feature vector of the first trademark text and the feature vector of the reference trademark text includes:

calculating the similarity of the local matrix corresponding to the first trademark text and the reference trademark text based on the feature vector, specifically as follows:

wherein A is1And A2A pair of partial matrices of the first brand text corresponding to the reference brand text,is A1Is determined by the feature vector of (a),

Figure BDA0002556118870000034

is A2The feature vector of (2);

obtaining the font similarity of the first trademark text and the reference trademark text according to the similarity of each pair of the local matrixes, which specifically comprises the following steps:

sim (first trademark text, second trademark text) ═ avg (Sim (a)1,A2))。

Preferably, the method further comprises the following steps:

and performing lattice expansion on the first trademark text and the reference trademark text with less characters, so that the dimensionalities of lattice matrixes of the first trademark text and the reference trademark text are the same.

The embodiment of the invention also provides a trademark font similarity detection device, which comprises:

the dot matrix acquisition unit is used for acquiring a first dot matrix of a first trademark text to be detected;

a local matrix obtaining unit, configured to obtain, according to the first dot matrix, a plurality of local matrices corresponding to the first trademark text; wherein the local matrix is a part of the first dot matrix;

the characteristic vector acquisition unit is used for acquiring corresponding characteristic vectors with characteristic stroke quantity statistics according to the local matrix; the feature vector is a calculation basis of similarity between texts of different trademarks;

and the similarity calculation unit is used for calculating the similarity of the feature vector of the first trademark text and the feature vector of the reference trademark text.

The embodiment of the invention also provides trademark font similarity detection equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor executes the program to realize the trademark font similarity detection method.

In the above embodiment, the feature vector in which the number of feature strokes is counted is obtained by calculation, and the similarity between the feature vectors of the first trademark text and the feature vectors of the reference trademark text is calculated. The characteristic vector can better show the integral structure of the trademark font through characteristic stroke statistics, better simulates subjective feeling of people, and has higher similarity detection efficiency and accuracy.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.

Fig. 1 is a flowchart illustrating a method for detecting similarity of trademark font according to a first embodiment of the present invention.

Fig. 2 is a schematic view of the font code of the unlined body (bold) in the first embodiment of the present invention.

Fig. 3 is a schematic view of font codes of serif fonts (song dynasty) according to the first embodiment of the present invention.

Fig. 4 is a schematic diagram of the lattice information of the unified Master kang in the first embodiment of the present invention.

Fig. 5 is a schematic diagram of a first dot matrix formed by splicing unified Master and Master in the first embodiment of the present invention.

FIG. 6 is a diagram illustrating a process of dividing a single character into local matrices according to a first embodiment of the present invention.

FIG. 7 is a schematic diagram of a feature stroke matrix according to a first embodiment of the present invention.

FIG. 8 is a diagram illustrating a calculation process of a feature stroke vector of a small matrix according to a first embodiment of the present invention.

Fig. 9 is a schematic diagram of a calculation process of the similarity between the first trademark text and the second trademark text in the first embodiment of the present invention.

Fig. 10 is a schematic diagram of an acquisition process of a padding matrix according to a first embodiment of the present invention.

Fig. 11 is a schematic structural diagram of a trademark font similarity detection apparatus according to a second embodiment of the present invention.

Icon: 201-a lattice matrix acquisition unit; 202-a local matrix acquisition unit; 203-a feature vector obtaining unit; 204-similarity calculation unit.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.

It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.

The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种文本相关性识别模型的训练方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!