A method for constructing a similar trademark detection model and a similar trademark detection method
By constructing a similar trademark detection model, which judges trademark similarity based on the difference in pixel values, the model solves the problems of cumbersome detection process and weighting in existing technologies, and achieves efficient and accurate trademark similarity detection.
Patent Information
- Application Number
- CN202310594155.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2043-05-24
AI Technical Summary
Existing technologies for detecting similar trademarks are cumbersome, make it difficult to efficiently process large-scale trademark samples, and the weighting settings affect the accuracy of the detection.
By constructing a similar trademark detection model, the similarity of trademarks is judged based on the difference in the pixel values of the trademarks. The training set and test set are constructed using machine learning algorithms, which simplifies the calculation process and avoids the need for weight setting.
It improves the accuracy and efficiency of trademark similarity detection, simplifies the computation, and is suitable for rapid similarity detection of large-scale trademark samples.
Smart Images

Figure CN116595207B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of trademark information retrieval, in particular to a similar trademark detection model construction method and a similar trademark detection method. BACKGROUND
[0002] As the "identity mark" of goods, the trademark is very important. To prevent the registration of similar trademarks, the traditional method is to determine the similarity of trademarks by manual retrieval, which is limited in processing speed and low in efficiency.
[0003] A Chinese patent with application number 202010769071.3 discloses a similar trademark detection method, which initializes Chinese characters into phonetic code sequences, and then compares the to-be-applied trademark with the registered trademark database, calculates the number of common Chinese characters and the overlap parameter, determines the similarity by the D-L distance matrix method, and determines whether the two trademarks are similar trademark applications. This method needs to calculate the number of common Chinese characters and the overlap parameter of the to-be-tested trademark and the registered trademark one by one, and also needs to manually set the weights of the literal similarity and the meaning similarity, which is complicated and not conducive to the similar detection of large-scale trademark samples. SUMMARY
[0004] The present application aims to solve the technical problem that the process of similar trademark detection in the prior art is complicated and not conducive to the similar detection of large-scale trademark samples. The present application provides a similar trademark detection model construction method and a similar trademark detection method. By constructing a similar trademark detection model, similar trademarks related to keywords can be screened based on the model. In the detection process, the number of common Chinese characters and the overlap parameter between trademarks do not need to be calculated, the process is relatively simple, and the present application does not need to set weights, thereby avoiding the influence of weight setting on the accuracy of similar trademark detection and improving the accuracy of detection to some extent.
[0005] Based on this, the embodiment of the present application discloses a similar trademark detection model construction method, comprising the following steps:
[0006] Step S1: obtaining a first character group corresponding to a target trademark and converting it into a picture in a preset format, constructing a target data group based on the pixel values of each pixel point in the picture, and obtaining the total number of data with a set value in the target data group as a target number;
[0007] Step S2: constructing a modeling sample trademark set, the modeling sample trademark set comprising a plurality of modeling sample trademarks;
[0008] Step S3: Obtain the first character group corresponding to the trademark of the modeling sample and convert it into an image in a preset format. Construct a test data group based on the pixel values of each pixel in the image, and obtain the number of data in the test data group whose values are set as the test quantity.
[0009] Step S4: Obtain the absolute difference between the target quantity and the quantity to be tested;
[0010] Step S5: Based on the absolute difference being less than the target value, obtain the similarity distance between the target data group and the test data group, and use it as the feature data of the modeling sample trademark. Based on the feature data, determine whether the modeling sample trademark is similar to the target trademark. If they are similar, set the label value of the modeling sample trademark to 1; otherwise, set the label value of the modeling sample trademark to 0.
[0011] Step S6: Based on the absolute difference being greater than or equal to the target value, set the label value of the trademark of the modeling sample to 0;
[0012] Step S7: Repeat steps S3 to S6 until the feature data and label values of all modeling sample trademarks in the modeling sample trademark set are obtained;
[0013] Step S8: Randomly divide the modeling sample trademarks in the modeling sample trademark set into a training set and a test set, and set the label value of each modeling sample trademark in the test set to unknown. Construct a similar trademark detection model based on the training set and the test set.
[0014] According to another specific embodiment of the present invention, obtaining the similarity distance between the target data group and the data group to be tested includes:
[0015] Determine the L2 norm between each data point in the target data set and each data point in the test data set;
[0016] Construct a path length function based on each L2 norm, and solve the path length function using constraints to obtain the optimal path length;
[0017] The similarity distance is determined based on the optimal path length.
[0018] According to another specific embodiment of the present invention, the expression for the path length function is:
[0019]
[0020] in,
[0021] L S Let S represent the path length function, and let S represent the set of planned paths, expressed as S = {s1, s2, ..., s}. p}, m≤p≤n, where m is the maximum of the total number of data in the target data group and the total number of data in the test data group, and n is equal to the sum of the total number of data in the target data group and the total number of data in the test data group minus 1;
[0022] s k = (i,j), 1≤k≤p, 1≤i≤a, 1≤j≤b, where a is the total number of data in the target data group and b is the total number of data in the test data group;
[0023] l sk It is equal to the L2 norm between the i-th data in the target data set and the j-th data in the test data set.
[0024] According to another specific embodiment of the present invention, the similarity distance is equal to the optimal path length; the constraints include:
[0025] (1) s1=(1,1), s p = (a, b);
[0026] (2) For any point s in the planned path set q Assume s q =(d1,d2), s q+1 = (d3, d4), which must satisfy 0 ≤ d3 - d1 ≤ 1, 0 ≤ d4 - d2 ≤ 1;
[0027] (3) The optimal path length is The minimum value.
[0028] According to another specific embodiment of the present invention, a path length function is constructed based on each L2 norm, and the path length function is solved using constraints to obtain the optimal path length, including:
[0029] Construct a characteristic matrix T based on each L2 norm, where the element t in the i-th row and j-th column of the characteristic matrix T is... ij The L2 norm represents the relationship between the i-th data in the target data set and the j-th data in the test data set;
[0030] Construct the planned path set S = {s ij}, 1≤i≤a, 1≤j≤b, where a is the total number of data in the target data group and b is the total number of data in the test data group;
[0031] Construct the planned path concentration point s ij Path length function
[0032] Using constraints Solve the path length function for each point in the planned path set to obtain the optimal path length for each point;
[0033] Wherein, the similarity distance is the convergence point s of the planned path. ab The optimal path length.
[0034] According to another specific embodiment of the present invention, constructing a target data group based on the pixel values of each pixel in an image includes:
[0035] Binarize the image;
[0036] Obtain the pixel value of each pixel in the binarized image;
[0037] For each pixel, sort them from left to right and from top to bottom, and summarize the pixel values of each pixel to construct the target data group.
[0038] According to another specific embodiment of the present invention, the first character group is a Chinese character group; in step S5, based on feature data, it is determined that the modeling sample trademark is not similar to the target trademark, and the tag value of the modeling sample trademark is set to 0, including:
[0039] Obtain the second character group corresponding to the target trademark and the modeling sample trademark respectively. The second character group is an English character group.
[0040] Based on the fact that the second character group corresponding to the modeling sample trademark is contained within the second character group corresponding to the target trademark, the tag value of the modeling sample trademark is set to 1;
[0041] Based on the partial overlap between the second character group of the modeling sample trademark and the second character group of the target trademark, the modeling sample trademark is identified as a sample to be manually verified.
[0042] Since the second character group corresponding to the modeling sample trademark is completely different from the second character group corresponding to the target trademark, the tag value of the modeling sample trademark is set to 0.
[0043] According to another specific embodiment of the present invention, the method further includes: after obtaining the modeling sample trademark, preprocessing the modeling sample trademark to remove characters other than Chinese characters and English characters, and further converting the Chinese characters in the preprocessed modeling sample trademark into English characters.
[0044] According to another specific embodiment of the present invention, the image in the preset format is a Microsoft YaHei font image of a preset size.
[0045] Accordingly, embodiments of the present invention also disclose a method for detecting similar trademarks, including:
[0046] Based on steps S3 to S5 of the method for constructing a similar trademark detection model according to any of the above specific embodiments, the feature data of each trademark to be tested are obtained.
[0047] The similar trademark detection model constructed based on the construction method of any of the above specific implementation methods analyzes the feature data of each trademark to be tested and outputs the trademarks to be tested that are similar to the target trademark.
[0048] Compared with the prior art, the present invention has the following technical advantages:
[0049] In this application, when determining whether trademarks are similar, the target trademark and the trademark to be tested are converted into images respectively. The differences between the images are determined based on the pixel values of each pixel in the different images, thus judging whether the trademarks are similar. This method does not require additional weighting, has high accuracy, and simplifies the calculation process by eliminating the need to convert trademark text and pinyin letters into phonetic-graphic code sequences for comparison. Furthermore, after determining the similarity of trademarks based on the images, this application sets different label values for similar and dissimilar trademarks to construct training and testing sets for the machine learning algorithm. Then, using the training and testing sets, a similar trademark detection model is constructed, which is then used to detect the similarity of a large number of trademarks. Attached Figure Description
[0050] Figure 1 A flowchart illustrating the method for constructing a similar trademark detection model provided in an embodiment of the present invention is shown;
[0051] Figure 2 This diagram illustrates a flowchart of obtaining the similarity distance between a target data group and a test data group, provided by an embodiment of the present invention.
[0052] Figure 3 A flowchart illustrating the calculation process of the optimal path length provided by an embodiment of the present invention is shown. Detailed Implementation
[0053] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Although the description of the present invention is presented in conjunction with preferred embodiments, this does not mean that the features of the invention are limited to these embodiments. On the contrary, the purpose of describing the invention in conjunction with embodiments is to cover other options or modifications that may be derived based on the claims of the present invention. To provide a deep understanding of the invention, many specific details will be included in the following description. The invention may also be implemented without using these details. Furthermore, to avoid confusion or obscuring the focus of the invention, some specific details will be omitted in the description. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0054] It should be noted that in this specification, similar reference numerals and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0055] In the description of this embodiment, it should be noted that the terms "first", "second", "third", "fourth", "fifth", etc. are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0056] In the description of this embodiment, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set" and "connection" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this embodiment based on the specific circumstances.
[0057] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0058] Trademarks, as crucial identifiers of goods, are of paramount importance. For example, if two goods share identical Chinese characters in their identifiers, differing only in font, design, pronunciation, or arrangement, it can easily mislead the public regarding the source of the goods or services, thus affecting product identification. Using a mark identical or similar to another's registered trademark on the same or similar goods as goods or product packaging, thereby misleading the public, constitutes an infringement of the exclusive right to use a registered trademark as stipulated by trademark law. Therefore, applicants must conduct a search to determine whether the trademark they wish to register has already been registered or is similar to another's trademark before registration. Furthermore, the State Intellectual Property Office also needs to assess the similarity of the applied-for trademark against already registered trademarks to prevent the successful registration of similar trademarks.
[0059] With the increasing availability of trademark data from the State Intellectual Property Office Trademark Office and the growing number of trademark applications, the assessment of similarity between pending trademark applications and cited trademarks has become particularly important. Furthermore, there is sometimes a possibility that trademarks similar to already registered trademarks may be successfully registered.
[0060] Taking tobacco trademarks as an example, with e-cigarettes now subject to monopoly regulation, their trademark registration category currently falls under Class 34 (Tobacco Products) in the Nice Classification. Clearly, applications for Class 34 trademark registration are likely to increase in the future. Due to the limited resources of commonly used Chinese characters for trademarks, and the malicious registration of Class 34 trademarks by some enterprises or individuals without proper business qualifications, this will create obstacles for traditional cigarette trademark registration. In practice, effective trademark planning and timely submission of trademark registration applications before the planned usage are key aspects of trademark management in the tobacco industry. Conducting prior similarity searches before application and adjusting trademark design accordingly is an effective way to improve the success rate of trademark registration. Simultaneously, making reasonable use of the preliminary examination announcements published weekly by the Trademark Office of the State Intellectual Property Office to promptly search for trademarks similar to previously registered Class 34 tobacco product trademarks and file reasonable objections is also an effective way to avoid being "brand-name cloned." Whether it's pre-registration similarity searches or screening of similar trademarks in the preliminary examination announcement data, designing an efficient and accurate method for determining trademark similarity is crucial to solving the problem.
[0061] Based on this, one embodiment of the present invention provides a method for constructing a similar trademark detection model, which can be used to construct such a model. Furthermore, the constructed similar trademark detection model can be used to detect trademarks similar to the target trademark.
[0062] Specifically, the method for constructing a similar trademark detection model may include the following steps:
[0063] Step S1: Obtain the first character group corresponding to the target trademark and convert it into an image in a preset format. Construct a target data group based on the pixel values of each pixel in the image. Obtain the total number of data in the target data group whose values are set as the target quantity.
[0064] Specifically, the first character group is the Chinese character group (for ease of description, the Chinese character group will be used to refer to the first character group below). In step S1, keywords are first set according to the target trademark, and then the Chinese character group corresponding to the keywords is used as the Chinese character group of the target trademark. Specifically, the keywords referred to here can be set according to the actual situation, and the number of keywords can be one or more. For example, if after building a similar trademark detection model, the similar trademark detection model is used to screen trademarks that are similar to the brand names of two cigarette brands, "Guiyan" and "Kuayue", then the keywords can be set as "Guiyan" and "Kuayue".
[0065] Specifically, the similarity of Chinese characters mainly addresses issues related to similarity in character structure, position, and shape. A company's main product brand names are all in Chinese, and some other companies or individuals may register trademarks with identical or similar characters. This paper designs a Chinese character similarity system that comprehensively considers character features. To avoid discrepancies caused by different fonts, all text trademarks are converted to the commonly used Founder Microsoft YaHei font. The text is initialized as a fixed-size Microsoft YaHei font image, and pixel values are identified using OCR. This facilitates subsequent comparison of pixel similarity using algorithms such as distance calculation.
[0066] Specifically, a target data set is constructed based on the pixel values of each pixel in the image, including:
[0067] The image is binarized, at which point the pixel value of each pixel in the image is either 0 or 1.
[0068] Obtain the pixel value of each pixel in the binarized image;
[0069] For each pixel, sort them from left to right and from top to bottom, and then summarize the pixel values of each pixel to construct the target data group.
[0070] Step S2: Construct a modeling sample trademark set, which includes multiple modeling sample trademarks.
[0071] The modeling sample trademarks can be obtained from relevant databases or materials as needed. For example, if, after constructing a similar trademark detection model, this model is used to detect similar trademarks in Class 34 tobacco product trademarks published by the Trademark Office of the State Intellectual Property Office, then it is preferable to use the Class 34 tobacco product trademarks published by the Trademark Office of the State Intellectual Property Office as the source of training trademarks. For instance, the data from the Trademark Preliminary Examination Announcements No. 1779-1792 published by the Trademark Office of the State Intellectual Property Office can be used as the research sample to obtain the modeling sample trademarks.
[0072] Specifically, the modeled sample trademarks may contain special characters other than Chinese characters and English characters. To improve the efficiency of trademark detection, the characters in each modeled sample trademark can be processed to remove unrecognized characters other than Chinese characters and English characters, including special symbols, spaces, and other languages. This is only a rough approach based on static settings to remove and filter symbols from the data. Specifically, this can be achieved through software programming, that is, by specifying static filtering rules to replace special characters other than Chinese characters and English letters with "null bytes".
[0073] Step S3: Obtain the Chinese character group corresponding to the modeling sample trademark and convert it into an image in a preset format. Construct a test data group based on the pixel values of each pixel in the image of the Chinese character group corresponding to the modeling sample trademark. Obtain the number of data in the test data group whose values are set as the test quantity.
[0074] Similarly, the construction method for the test data group and the target data group is the same as that for constructing the pixel values of each pixel in the image corresponding to the modeling sample trademark, and will not be elaborated here.
[0075] It is worth noting that the set value in steps S2 and S3 can be 1, which means summarizing the number of pixels with a value of 1 in the images of the target trademark and the modeled sample trademark.
[0076] Step S4: Obtain the absolute difference between the target quantity and the quantity to be tested.
[0077] Step S5: Based on the absolute difference being less than the target value, obtain the similarity distance between the target data group and the test data group, and use it as the feature data of the modeling sample trademark. Based on the feature data, determine whether the modeling sample trademark is similar to the target trademark. If they are similar, set the label value of the modeling sample trademark to 1; otherwise, set the label value of the modeling sample trademark to 0.
[0078] Furthermore, the similarity distance between the target data set and the test data set can be calculated using methods such as Euclidean distance and Manhattan distance.
[0079] However, considering that the above distance calculations all require the two data sets to have the same length and the bits of each element in the two data sets to be aligned, the test data set and the target data set in this application are obtained by accumulating pixels row by row. Although normalization can be performed, it is still difficult to guarantee alignment between the two data sets after processing. Therefore, the accuracy of the calculation may be affected by the above method.
[0080] To perform similarity detection more accurately, such as Figure 2 As shown, in some embodiments of this application, the similarity distance between the target data group and the data group to be tested is calculated using the following method, which specifically includes:
[0081] Step S501: Determine the L2 norm between each data point in the target data set and each data point in the test data set;
[0082] Step S502: Construct a path length function based on each L2 norm, and solve the path length function using constraints to obtain the optimal path length;
[0083] Step S503: Determine the similarity distance based on the optimal path length.
[0084] Specifically, determining whether the modeled sample trademark is similar to the target trademark based on the feature data includes:
[0085] If the numerical value of the comparison result of the pixel value similarity distance is 0, it indicates that the two data groups are exactly the same, that is, the trademark to be tested is the same as the target trademark. If the numerical value of the similarity distance is larger, it indicates that they are less similar. Therefore, a threshold needs to be set as the critical value for judging approximation. The applicant compares multiple groups of data, such as the similarity between "贵 (guì)" and "贡 (gòng)", "烟 (yān)" and "炯 (jiǒng)", and defines the threshold value in the similarity distance pair to be around 300. This value can be gradually adjusted as the database sample size increases. The Chinese similarity comparison result outputs the similarity numerical value and the most similar single character in the keywords similar to this trademark. If it exceeds the threshold, it is output; if there are no similar characters, and for other English symbols, "Non-Chinese" is output.
[0086] Furthermore, since the above comparison process of the similarity distance is to compare individual characters and calculate the approximate result numerical value, it is necessary to consider how to integrate phrases and consider unified output of the fused similarity numerical value. Through continuous experimental research, taking the keyword "贵烟 (Guìyān)" as an example, the characters "贵 (guì)" and "烟 (yān)" are respectively compared with the trademark names "雨 (yǔ)", "花 (huā)", "石 (shí)", and 6 similarity distance numerical values can be calculated. The Chinese similarity judgment logic is as follows:
[0087] First, monitor the trademarks that completely contain the keyword name, that is, when the similarity distance of both "贵 (guì)" and "烟 (yān)" is 0, output 0 and all the keywords included.
[0088] Second, monitor the approximate trademarks of the product brand name keywords, that is, when the similarity distance numerical values of both "贵 (guì)" and "烟 (yān)" are less than 300, output the characters determined to be approximate in the trademark name.
[0089] Third, monitor the overall approximation situation, that is, take the average value of the 6 similarity distances of "贵 (guì)" and "烟 (yān)". If it is less than 300, output the approximate result; if it is greater than 300, output not approximate.
[0090] Finally, if there is an approximate or identical situation, the label value is set to 1; if not similar, it is 0. Logically, the first is prioritized, the second is next, and the third is again to prevent extreme situations.
[0091] Furthermore, the above path function and the determination of the optimal path length can be determined through the following two methods. <000022{2}>
[0092] [Method 1]
[0093] The expression of the path length function L S is:
[0094] Where:
[0095] S represents the set of planned paths, and its expression is S={s1,s2,…s} p}, m≤p≤n, where m is the maximum of the total number of data in the target data group and the total number of data in the test data group, and n is equal to the sum of the total number of data in the target data group and the total number of data in the test data group minus 1;
[0096] s k = (i,j), 1≤k≤p, 1≤i≤a, 1≤j≤b, where a is the total number of data in the target data group and b is the total number of data in the test data group;
[0097] It is equal to the L2 norm between the i-th data in the target data set and the j-th data in the test data set.
[0098] In this method, the similarity distance is equal to the optimal path length. Specifically, the constraints for calculating the optimal path length include:
[0099] (1) s1=(1,1), s p = (a, b);
[0100] (2) For any point s in the planned path set q Assume s q =(d1,d2), s q+1 = (d3, d4), which must satisfy 0 ≤ d3 - d1 ≤ 1, 0 ≤ d4 - d2 ≤ 1;
[0101] (3) The optimal path length is The minimum value.
[0102] Method Two
[0103] like Figure 3 As shown, in this method, a path length function is constructed based on each L2 norm, and the optimal path length is obtained by solving the path length function using constraints. Specifically, the steps include:
[0104] Step S601: Construct the characteristic matrix T based on each L2 norm, where the element t in the i-th row and j-th column of the characteristic matrix T is... ij The L2 norm represents the relationship between the i-th data in the target data set and the j-th data in the test data set;
[0105] Step S602: Construct the planned path set S = {s} ij}, 1≤i≤a, 1≤j≤b, where a is the total number of data in the target data group and b is the total number of data in the test data group;
[0106] Step S603: Construct the set of points s in the planned path ij Path length function
[0107]
[0108] Step S604: Utilize constraints Solve the path length function for each point in the planned path set to obtain the optimal path length for each point.
[0109] Specifically, in this second method, the similarity distance is the planned path convergence point s. ab The optimal path length.
[0110] Step S6: Based on the absolute difference being greater than or equal to the target value, set the label value of the trademark of the modeling sample to 0.
[0111] This involves summarizing and comparing the number of pixels with a value of 1 in the images of the target trademark and the modeled sample trademark. If the difference between the two is significant (i.e., the absolute difference is greater than or equal to the target value), they are clearly different. This further reduces computational load and simplifies the detection process. Specifically, the target value can be set according to the actual situation, such as 20.
[0112] Furthermore, in some embodiments of this application, the model construction method may also include the comparison of English characters. The English characters primarily address the issue of "riding the coattails of trending topics and brand names," where some companies or individuals may register trademarks that differ in wording from the product name but have the same pronunciation, or convert Chinese characters into English or Pinyin for registration. This paper designs the English characters while omitting tones and capitalization.
[0113] In step S5, based on feature data, it is determined that the modeling sample trademark is not similar to the target trademark, and the tag value of the modeling sample trademark is set to 0, including:
[0114] Obtain the second character group corresponding to the target trademark and the modeling sample trademark respectively. The second character group is an English character group.
[0115] Based on the fact that the second character group corresponding to the modeling sample trademark is contained within the second character group corresponding to the target trademark, the tag value of the modeling sample trademark is set to 1;
[0116] Based on the partial overlap between the second character group of the modeling sample trademark and the second character group of the target trademark, the modeling sample trademark is identified as a sample to be manually verified.
[0117] Since the second character group corresponding to the modeling sample trademark is completely different from the second character group corresponding to the target trademark, the tag value of the modeling sample trademark is set to 0.
[0118] Taking the keyword of the "Guiyan" brand as an example, trademarks whose pinyin contains the string "GUIYAN" can be completely detected. At the same time, considering the representativeness of the character "Gui" and its special meaning to our company, trademarks containing "GUI" are also listed as similar. Finally, approximate trademark keywords are output. Among them, for the single character "Gui", it is output as 'Gui' cigarettes. In addition, for the convenience of input as machine learning features, the monitoring results are labeled, with similarity as 1 and dissimilarity as 0. During the application of pinyin similarity monitoring, it is found that in the data of the 1800th preliminary examination announcement on July 20, 2022, a lighter manufacturing company registered the "Guiyan Lighter". In fact, this lighter brand is very likely to make consumers associate with the "Guiyan" brand. If there are quality problems with its lighters, it may have a negative impact on the "Guiyan" brand.
[0119] Further, after obtaining the modeling sample trademarks, preprocess the modeling sample trademarks to remove characters other than Chinese characters and English characters, and further convert the Chinese characters in the preprocessed modeling sample trademarks into English characters.
[0120] That is, this application uses Chinese character strings as the main and English character strings as the auxiliary for feature recognition, and identifies all trademarks, including Chinese characters (including a total of 20,902 basic Chinese characters, the number of characters in the Unicode encoding range 4E00 - 9FA5) and English characters (including 10 digits from 0 - 9; Unicode encoding 30 - 39; 26 lowercase English letters, Unicode encoding 61 - 7a; 26 uppercase English letters, Unicode encoding 41 - 5a).
[0121] After the first filtering (removing all English characters) and the second filtering (removing all Chinese characters), all trademarks first remove all the above content, and the remaining symbols, spaces, etc. are marked as elements to be filtered out. As new trademarks are input, new special symbols will continue to appear and will be supplemented into the above symbol set at any time and filtered.
[0122] Step S7: Repeat steps S3 to S6 until the feature data and label values of all modeling sample trademarks in the modeling sample trademark set are obtained.
[0123] Step S8: Randomly divide each modeling sample trademark in the modeling sample trademark set into a training set and a test set, and set the label values of each modeling sample trademark in the test set to unknown, and build a similar trademark detection model based on the training set and the test set.
[0124] Specifically, the machine learning algorithm can be the XGBoost algorithm, which fuses the preprocessed features above and integrates them into a unified feature set, so as to quickly predict the result of similarity through the machine learning algorithm. The XGBoost method can effectively solve the classification problem of calculating labels based on such features and give reasonable result verification. A machine learning model is established based on the known labels and feature columns, and the automatic labeling classification function of the remaining labels is completed through a small number of labels. For the future updated trademark and keyword data, similar labels can be quickly and accurately identified without long-term identification calculation to generate labels. The self-training semi-supervised algorithm for automatically labeling text similarity with XGBoost as the base classifier is as follows:
[0125] Take the trademark monitoring results after fusing Chinese and English similarity as the sample library. Initially, all data is labeled. Randomly select a certain proportion of the data and discard the labels as unlabeled data.
[0126] After feature fusion of multiple features, they are fused into two columns of features, namely Chinese similarity (0 / 1) and pinyin similarity (0 / 1). The meaning of the label is whether it is similar (0 / 1). Among Chinese similarity or pinyin similarity, as long as one kind is similar, it is defined as a label of similar 1, otherwise it is 0. The similarity value of 1 means the same or contains the pinyin characters of the keyword, including the case of only containing the single character "Gui", otherwise it is 0.
[0127] To obtain the optimal solution and make the predicted value closer to the true value, it is necessary to decompose and optimize the objective function of XGBoost to make it more suitable for processing the actual data requirements of current trademark monitoring. Currently, in the input data, the test set is given 10% of the true data, and the remaining data is predicted to obtain the "predicted value", and it is compared with this part of the "true value". It is known that the objective function consists of the sum of two terms, the loss function term and the regularization term, which is defined as:
[0128]
[0129] The loss function term loss is represented by the true value L i and the predicted value . Since XGboost is essentially a sum-accumulation model, therefore, loss is the sum of the accumulated scores of each tree. The regularization term is to obtain the optimal objective value. Now that the objective function of XGBoost is known, what needs to be done is to sum the objective functions of each leaf node j, where T j is the number of leaf nodes j, ω k is the weight on the optimal value of the kth leaf node, and γ, λ represent hyperparameters. The formula is as follows:
[0130]
[0131] In XGBoost, the objective formulas for each leaf node are independent; that is, if the formula for each leaf node reaches its maximum value, then the entire objective function also reaches its maximum value. Therefore, the weights of each leaf node... The formula for achieving the optimal target value at this point is as follows:
[0132]
[0133] In summary, the tree structure is best when the objective value is minimized, which represents the optimal solution for the objective function. The actual settings of the important parameters are shown in Table 1 below:
[0134] Table 1 Actual Settings of Important XGBoost Parameters
[0135]
[0136] Accordingly, this application also provides a method for detecting similar trademarks, based on a model constructed using the aforementioned method for constructing similar trademark detection models. Specifically, the method includes:
[0137] Obtain the feature data of each trademark to be tested; specifically, the feature data of the trademark to be tested can be obtained based on the above steps S3 to S5.
[0138] Based on the similar trademark detection model, the feature data of each trademark to be tested are analyzed, and the trademarks to be tested that are similar to the target trademark are output.
[0139] EXAMPLES
[0140] (I) Raw Data Collection
[0141] Taking a company's cigarette brands and specifications in production in 2022 as an example, based on the principle of "prioritizing key brands and core products", the proposed keywords for the cigarette brands in production are as follows: "Guiyan", "Kuayue", "Huangguoshu", "Zunyi", "Hongzhongzhi", "Guojiuxiang", "Shanshui", "Zhongzhi", "Jiapin", "Changzheng", "Lanjiapin", "Hongxingzhaoyao", "Jiazun", "Jinbaihe", "Xingui", "Yinghuangjingpin", "Xigui", "Guiyanxi", "Guiyancui", "Yuye No. 1", "Yinggaozun", "Lanse de Ai", "Xingzhe", "Ruangaozun", "Guizhongzhi", "Moli", "Guiyanfu", "Fuzhongzhi", "Shengshi", and "Shengxiao".
[0142] The trademark database to be compared consists of 18,610 word trademarks in Class 34 from the preliminary examination announcements of trademarks from issues 1779 to 1826. The basic information includes serial number, application / registration number, application date, trademark name, and applicant name.
[0143] (II) Data Preprocessing
[0144] After collecting the raw data, data preprocessing begins. First, since a keyword for a currently produced cigarette brand can yield a series of data, this keyword is considered the primary key feature for each batch of data and is included in the data processing. Before preprocessing, it's necessary to remove unrecognized characters other than Chinese and English, including special symbols, spaces, and other languages. This step is only a rough removal and filtering of symbols based on static settings. Additionally, after secondary feature filtering, any unqualified data also needs to have unrecognized characters other than Chinese and English removed. Data preprocessing consists of two main parts: Chinese character similarity preprocessing and English character similarity preprocessing. The specific process is described below.
[0145] (III) Chinese Character Analysis
[0146] Chinese character similarity primarily addresses similarities in character structure, position, and shape. A company's main product brand names are all in Chinese, and other companies or individuals may register trademarks with identical or similar characters. This paper designs a Chinese character similarity system that comprehensively considers character features. To avoid discrepancies caused by different fonts, all text trademarks are converted to the commonly used Founder Microsoft YaHei font. The text is initialized as a fixed-size Microsoft YaHei font image, and pixel values are identified using OCR to facilitate subsequent similarity distance calculations. The similarity distance is then used to compare the similarity of pixel values one by one.
[0147] (iv) English character analysis
[0148] English similarity primarily addresses the issue of "riding the coattails of trending topics and brand names," which may involve some companies or individuals registering trademarks with different characters but the same pronunciation as the product name, or converting Chinese characters into English or Pinyin for registration. This paper fuzzes tone and capitalization when designing the English similarity test to more comprehensively detect similar trademarks.
[0149] (V) Similarity Result Analysis
[0150] The preprocessed features are fused together to form a unified feature set, which is then input into the constructed similar trademark detection model to output similar trademarks.
[0151] This paper selects 30 keywords for cigarette brands currently in production, including "Guiyan," "Hongzhongzhi," "Guojiuxiang," and "Kuayue." The experimental results can output whether there are similar trademarks for each keyword. As before, the data for screening similar trademarks in the preliminary examination announcement is broader than that used during trademark registration, as shown in Table 2 below.
[0152] Table 2: Excerpts of similar trademarks from trademark preliminary examination announcements, issues 1779-1824
[0153]
[0154] Taking the 18,610 word trademark data from periods 1779 to 1826 as an example, firstly, regarding the workload of manual comparison, since similar data were output separately according to different keywords, this paper required 53 manual reviews, which is only 0.01% of the workload of 558,300 manual comparisons. At the same time, it can also save the workload of more than 500,000 manual comparisons of 18,610 data points with 30 keywords during data initialization. From the perspective of the workload of manual review and the principle of strict screening, the results of this paper are acceptable.
[0155] Furthermore, taking the 18,610 word trademark data points from periods 1779-1826 as an example, 53 similar trademarks were comprehensively output. Using the Chinese and English similarity features as input for XGBoost machine learning, the accuracy was 99.7% after removing 10% of the labels; and 97.7% after removing 90%, meeting the expectation of over 80% accuracy. Since historical data can be used as training sets for future validation after weekly updates, and the data from periods 1779-1826 contains 18,610 word trademarks, with approximately 500 new data points updated weekly, the automatic labeling rate of the machine learning algorithm is about 2.5%. In principle, a 10% labeling rate can achieve an accuracy of 99.7%, currently meeting the expectation of over 80% accuracy. Moreover, as the amount of training data increases in the future, the accuracy of the prediction results will become even more accurate.
[0156] While the present invention has been illustrated and described with reference to certain preferred embodiments, those skilled in the art should understand that the above description is a further detailed explanation of the invention in conjunction with specific embodiments, and should not be construed as limiting the specific implementation of the invention to these descriptions. Various changes in form and detail can be made by those skilled in the art, including several simple deductions or substitutions, without departing from the spirit and scope of the invention.
Claims
1. A method for constructing a similar trademark detection model, characterized in that, include: Step S1: Obtain the first character group corresponding to the target trademark and convert it into an image in a preset format. Construct a target data group based on the pixel values of each pixel in the image. Obtain the total number of data in the target data group whose values are set as the target quantity. Step S2: Construct a modeling sample trademark set, which includes multiple modeling sample trademarks; Step S3: Obtain the first character group corresponding to the modeling sample trademark and convert it into an image of the preset format. Construct a test data group based on the pixel values of each pixel in the image, and obtain the number of data in the test data group whose values are the set values as the test quantity. Step S4: Obtain the absolute difference between the target quantity and the quantity to be measured; Step S5: Based on the absolute difference being less than the target value, obtain the similarity distance between the target data group and the test data group, and use it as the feature data of the modeling sample trademark. Based on the feature data, determine whether the modeling sample trademark is similar to the target trademark. If they are similar, set the label value of the modeling sample trademark to 1; otherwise, set the label value of the modeling sample trademark to 0. Step S6: Based on the absolute difference being greater than or equal to the target value, set the label value of the modeling sample trademark to 0; Step S7: Repeat steps S3 to S6 until the feature data and tag values of all modeling sample trademarks in the modeling sample trademark set are obtained; Step S8: Randomly divide the modeling sample trademarks in the modeling sample trademark set into a training set and a test set, and set the label value of each modeling sample trademark in the test set to unknown, and construct the similar trademark detection model based on the training set and the test set.
2. The method for constructing a similar trademark detection model as described in claim 1, characterized in that, Obtaining the similarity distance between the target data group and the test data group includes: Determine the L2 norm between each data point in the target data set and each data point in the test data set; Construct a path length function based on the L2 norms, and solve the path length function using constraints to obtain the optimal path length; The similarity distance is determined based on the optimal path length.
3. The method for constructing a similar trademark detection model as described in claim 2, characterized in that, The expression for the path length function is: in, L S Let S represent the path length function, and let S represent the set of planned paths, expressed as S = {s1, s2, ..., s}. p }, m≤p≤n, where m is the maximum of the total number of data in the target data group and the total number of data in the test data group, and n is equal to the sum of the total number of data in the target data group and the total number of data in the test data group minus 1; s k = (i,j), 1≤k≤p, 1≤i≤a, 1≤j≤b, where a is the total number of data in the target data group and b is the total number of data in the test data group; l sk It is equal to the L2 norm between the i-th data in the target data set and the j-th data in the test data set.
4. The method for constructing a similar trademark detection model as described in claim 3, characterized in that, The similarity distance is equal to the optimal path length; the constraints include: (1)s1=(1,1),s p =(a,b); (2) For any point s in the planned path set q Assume s q =(d1,d2), s q+1 = (d3, d4), which must satisfy 0 ≤ d3 - d1 ≤ 1, 0 ≤ d4 - d2 ≤ 1; (3) The optimal path length is The minimum value.
5. The method for constructing a similar trademark detection model as described in claim 2, characterized in that, Construct a path length function based on the aforementioned L2 norms, and solve the path length function using constraints to obtain the optimal path length, including: Construct a feature matrix T based on the aforementioned L2 norms, where the element t in the i-th row and j-th column of the feature matrix T is... ij The L2 norm characterizes the relationship between the i-th data in the target data set and the j-th data in the test data set; Construct the planned path set S = {s ij }, 1≤i≤a, 1≤j≤b, where a is the total number of data in the target data group and b is the total number of data in the data group to be tested; Construct the planned path concentration point s ij Path length function Using constraints Solve the path length function for each point in the planned path set to obtain the optimal path length for each point; Wherein, the similarity distance is the convergence point s of the planned path. ab The optimal path length.
6. The method for constructing a similar trademark detection model as described in claim 1, characterized in that, A target data group is constructed based on the pixel values of each pixel in the image, including: The image is binarized. Obtain the pixel value of each pixel in the image after binarization; For each pixel, the pixel values of each pixel are summarized according to the sorting method from left to right and from top to bottom to construct the target data group.
7. The method for constructing a similar trademark detection model as described in claim 1, characterized in that, The first character group is a Chinese character group; in step S5, based on the feature data, it is determined that the modeling sample trademark is not similar to the target trademark, and the tag value of the modeling sample trademark is set to 0, including: Obtain the second character group corresponding to the target trademark and the modeling sample trademark, respectively; the second character group is an English character group. Based on the fact that the second character group corresponding to the modeling sample trademark is contained within the second character group corresponding to the target trademark, the tag value of the modeling sample trademark is set to 1; Based on the fact that the second character group corresponding to the modeling sample trademark partially overlaps with the second character group corresponding to the target trademark, the modeling sample trademark is identified as a sample to be manually verified. Since the second character group corresponding to the modeling sample trademark is completely different from the second character group corresponding to the target trademark, the tag value of the modeling sample trademark is set to 0.
8. The method for constructing a similar trademark detection model as described in claim 7, characterized in that, Also includes; After obtaining the modeling sample trademark, the modeling sample trademark is preprocessed to remove characters other than Chinese and English characters. The Chinese characters in the preprocessed modeling sample trademark are then further converted into English characters.
9. The method for constructing a similar trademark detection model as described in claim 1, characterized in that, The image in the preset format is a Microsoft YaHei font image of a preset size.
10. A method for detecting similar trademarks, characterized in that, include: Based on steps S3 to S5 in the method for constructing a similar trademark detection model as described in claim 1, the feature data of each trademark to be tested are obtained. The similar trademark detection model constructed based on the construction method of the similar trademark detection model as described in claim 1 analyzes the feature data of each of the trademarks to be tested and outputs the trademarks to be tested that are similar to the target trademark.
Citation Information
Patent Citations
A Method for Detecting Similarity of Chinese Trademarks Based on Multi-Factor Examination Standards
CN111882462B
Manifold learning and gradient lifting model-based picture multi-label classification method
CN111259938A
Training method of trademark retrieval model and trademark retrieval method and device
CN114610925A