A method and system for detecting fake WeChat mini-programs.

By generating highly similar counterfeit mini-program names and combining automated tools and CNN algorithms to detect icon similarity, the problem of low efficiency in detecting counterfeit WeChat mini-programs in existing technologies has been solved, achieving fast and accurate identification of counterfeit mini-programs.

CN116894196BActive Publication Date: 2025-10-28BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310939401.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2025-10-28
Estimated Expiration
2043-07-28

AI Technical Summary

Technical Problem

Existing technologies are insufficient for efficiently detecting counterfeit WeChat mini-programs. Image recognition is difficult, and code obfuscation and encryption result in low detection efficiency and accuracy. Manual testing is time-consuming and costly, making it difficult to promote widely.

Method used

The method generates counterfeit mini-program names by replacing similar-looking characters, swapping their order, replacing pinyin, adding keywords at the end, or splitting them left and right. Combined with automatic web crawling tools for searching and data cleaning, the CNN algorithm is used to detect the similarity of mini-program icons, achieving detection without relying on the code.

Benefits of technology

It simplifies the detection process, improves detection efficiency and accuracy, and can quickly identify a large number of counterfeit mini-programs on the market. It is suitable for various software and hardware environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116894196B_ABST
    Figure CN116894196B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for detecting counterfeit WeChat mini-programs, comprising the following steps: generating counterfeit mini-program names using methods such as similar-looking character replacement, sequential swapping, pinyin replacement, adding keywords at the end, or left-right splitting; using an automatic web crawler to search for the generated counterfeit mini-program names, automatically obtaining and saving the text results and corresponding mini-program icon information of the corresponding mini-program names; using a CNN algorithm to calculate the similarity between the mini-program icon and the icon of the target genuine mini-program, and determining that the mini-program is a counterfeit WeChat mini-program if the similarity is greater than or equal to a set threshold. This invention is simple to operate, has a clear process, and is rapid in detection. It is not limited to any specific software or hardware, and will greatly accelerate the detection efficiency of counterfeit mini-programs, contributing to the development of WeChat mini-program ecosystem technology and providing a reference for other mini-program platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and system for detecting counterfeit WeChat mini-programs. Background Technology

[0002] In recent years, with the rapid development of China's mobile internet industry, "mini-programs" have been widely used by major domestic manufacturers. According to data from the authoritative third-party statistics platform Aladdin Research Institute, the total number of mini-programs across the internet exceeded 7 million in 2021, with over 3 million WeChat mini-program developers. Daily active users (DAU) of mini-programs exceeded 450 million, with daily usage increasing by 32% year-on-year and active mini-programs increasing by 41%. It can be said that mini-programs have fully unleashed their ecosystem capabilities. Whether it's cultivating the vertical e-commerce sector or continuing to promote enterprise digital transformation and private domain construction through interconnection with official accounts, video accounts, and WeChat Work, the huge market potential of mini-programs is evident. Mini-programs have now become a standard feature for enterprise brand digital transformation. Previous data predicted that mini-program DAU would exceed 500 million in 2022, and in fact, this target was achieved in the first half of 2022.

[0003] With the popularity of mini-programs, counterfeit and fake mini-programs have gradually emerged in the WeChat mini-program market, posing a potential threat to users' property security and personal privacy.

[0004] Secondly, creators of counterfeit WeChat mini-programs often exploit users' trust in mini-programs and their lack of awareness of vulnerabilities to carry out attacks.

[0005] Finally, the development difficulty and cost of counterfeit WeChat mini-programs are low. With the continuous development of technology, the difficulty of creating counterfeit mini-programs is constantly decreasing, while the quality and realism of counterfeit mini-programs are also constantly improving.

[0006] Currently, the main technologies for detecting counterfeit WeChat mini-programs include image recognition, cluster analysis, and functional testing. Among these, image recognition is the most challenging. For most counterfeit mini-programs, their user interfaces are often highly similar to the original application. Therefore, determining the differences through image recognition is not easy, especially when the counterfeit mini-program uses similar icons, colors, or other elements as the original application, making image recognition even more difficult.

[0007] Because the code for counterfeit WeChat mini-programs is difficult to obtain, and counterfeiters often obfuscate and encrypt it, some creators obfuscate and encrypt their code to avoid detection. This makes it difficult for detection programs to identify and analyze the program's functions and behaviors. Therefore, code detection techniques that require source code, such as cluster analysis, are difficult to apply to detecting counterfeit mini-programs.

[0008] Furthermore, with over 4 million WeChat mini-programs alone, manual functional testing is too time-consuming and costly, hindering widespread promotion and limiting its practicality.

[0009] In summary, due to the difficulty of image recognition, code obfuscation and encryption, and low detection efficiency and accuracy in the current detection of counterfeit WeChat mini-programs, it is necessary to develop new security detection solutions for counterfeit WeChat mini-programs. Summary of the Invention

[0010] This invention addresses the issues of the large number of counterfeit WeChat mini-programs, the difficulty in obtaining their code, and their high similarity to the original mini-programs. It proposes a detection method and system for counterfeit WeChat mini-programs.

[0011] To achieve the above objectives, the present invention provides the following technical solution:

[0012] On the one hand, the present invention provides a method for detecting counterfeit WeChat mini-programs, comprising the following steps:

[0013] S1. Generating counterfeit mini-program names: Using methods such as replacing similar-looking characters, swapping order, replacing pinyin, adding keywords at the end, or splitting left and right to generate counterfeit mini-program names;

[0014] S2. Counterfeit Mini Program Search: Use an automatic web crawler to search for generated counterfeit mini program names, automatically obtain the text results of the corresponding mini program names and the corresponding mini program icon information, and save them;

[0015] S3. Data cleaning: Use an automated script to perform preliminary screening and cleaning of the search results obtained in step S2, and match the corresponding rules to obtain a list of mini-programs whose names are similar to the counterfeited mini-programs and whose categories are the same; the corresponding rules include: (1) using the Edit Distance string similarity calculation algorithm to calculate the similarity between the mini-program name in the search results and the counterfeited mini-program name, and retaining the results whose similarity reaches the threshold or above; (2) using a crawler tool to automatically obtain the categories of the mini-programs in the search results, and retaining the results whose categories are the same as the counterfeited mini-programs.

[0016] S4. Mini Program Icon Similarity Detection: Use the CNN algorithm to calculate the similarity between the mini program icons in the target mini program list obtained in step S2 and the target genuine mini program icons. If the similarity is greater than or equal to the set threshold, the mini program is determined to be a WeChat counterfeit mini program.

[0017] Furthermore, in step S1, the similar-looking character replacement method uses a similarity calculation method that combines stroke order and pinyin to generate similar-looking characters that are similar to the target.

[0018] Furthermore, the specific process of the similar-looking character replacement method includes: using the Unicode Chinese character library, the Unicode encoding assigns stroke order numbers to each Chinese character according to the stroke order, and represents them using a string of numbers; using the Edit Distance string similarity calculation algorithm to calculate the similarity of all Chinese characters; after calculating the similarity between the stroke order number and the pinyin, the two are weighted to obtain the final Chinese character similarity; if the similarity between two Chinese characters exceeds a set threshold, they are considered similar-looking characters.

[0019] Furthermore, the formula for the Edit Distance algorithm is as follows:

[0020]

[0021] The max_len() function selects the longer of two strings, and the edit_distance() function calculates the minimum number of operations required to convert one string to another, including insertion, deletion, and replacement.

[0022] Furthermore, the similarity threshold between the two Chinese characters is set at 80%.

[0023] Furthermore, in step S1, the specific process of the left-right splitting method includes: firstly, using an OCR image recognition algorithm, splitting the left-right structured Chinese characters into left and right parts, and simultaneously searching the character library for matching Chinese characters to generate a split character library; then, based on the split character library, replacing the Chinese characters in the original mini-program name with the two split Chinese characters.

[0024] Furthermore, in step S4, the similarity threshold of the CNN algorithm is set to 0.9.

[0025] On the other hand, the present invention also provides a detection system for counterfeit WeChat mini-programs, comprising the following modules to implement the detection method for counterfeit WeChat mini-programs described in any of the above claims:

[0026] The counterfeit mini-program name generation module employs several methods: similar-looking character replacement, sequence swapping, pinyin replacement, keyword addition at the end, and left-right splitting. Specifically, the similar-looking character matching module uses a combination of stroke order and pinyin similarity calculation to generate similar-looking characters to the target mini-program; the sequence swapping module rearranges the Chinese characters in the original name to create a new counterfeit name; the pinyin replacement module replaces the original Chinese characters with their pinyin; the keyword addition at the end adds a series of high-frequency words to the original name to create a new name; and the left-right splitting module first uses an OCR image recognition algorithm to split left-right structured Chinese characters into two parts, while simultaneously searching the character set for matching characters to generate a split character set. Then, based on this split character set, the original mini-program name is replaced with the two split characters.

[0027] Counterfeit Mini Program Search Module: Uses an automatic web crawler to search for generated counterfeit mini program names, automatically obtains the text results and corresponding mini program icon information of the corresponding names and saves them;

[0028] Mini Program Icon Similarity Detection Module: Uses a CNN algorithm to calculate the similarity between the mini program icons in the list of mini programs obtained in step S3 and the target genuine mini program icon. If the similarity is greater than or equal to a set threshold, the mini program is determined to be a WeChat counterfeit mini program.

[0029] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0030] The detection method and system for counterfeit WeChat mini-programs proposed in this invention are simple to operate, have a clear process, and can detect quickly. They are not limited to any specific software or hardware and have the ability to detect without relying on the mini-program code. This will greatly accelerate the detection efficiency of counterfeit mini-programs, contribute to the development of WeChat mini-program ecosystem technology, and provide a reference for other mini-program platforms. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0032] Figure 1 This is a flowchart of a method for detecting fake WeChat mini-programs provided in an embodiment of the present invention.

[0033] Figure 2 This invention provides an algorithm for generating fake mini-program names. Detailed Implementation

[0034] To better understand this technical solution, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described examples are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of the present invention.

[0035] The present invention proposes a method for detecting counterfeit WeChat mini-programs, such as... Figure 1 As shown, the steps include generating counterfeit mini-program names, searching for counterfeit mini-programs, cleaning search results, and detecting mini-program icon similarity.

[0036] S1. Generating fake mini-program names

[0037] like Figure 2 As shown, the core module used in this invention mainly employs five algorithms for generating counterfeit mini-program names: replacement of similar-looking characters, scrambling the original mini-program name order, pinyin replacement, adding keywords at the end, and splitting left and right.

[0038] 1) Methods for replacing similar-looking characters

[0039] This invention uses a similarity calculation method combining stroke order and pinyin to generate similar-looking characters to the target. The specific process of the similar-looking character replacement method includes:

[0040] Using the Unicode Chinese character library, Unicode encoding assigns stroke order numbers to each Chinese character based on the stroke order, represented by a string of numbers. The Edit Distance string similarity calculation algorithm is used to calculate the similarity of all Chinese characters. After calculating the similarity between the stroke order number and the pinyin, the two are weighted to obtain the final Chinese character similarity. If the similarity between two Chinese characters exceeds a set threshold (in this embodiment, the similarity threshold between two Chinese characters is set to 80%), then they are considered similar in appearance.

[0041] The formula for the Edit Distance algorithm is as follows:

[0042]

[0043] The `max_len()` function selects the longer of two strings, while the `edit_distance()` function calculates the minimum number of operations required to convert one string to another, including insertion, deletion, and replacement. Therefore, the more similar the two strings are, the larger the `skt` value.

[0044] 2) Pinyin replacement

[0045] Replace the original Chinese characters with their pinyin. For example... Figure 2 As shown.

[0046] 3) Sequential swapping

[0047] This generation algorithm mainly forms a new counterfeit mini-program name by scrambling the Chinese characters order of the original mini-program name. As Figure 2 shown.

[0048] 4) Adding keywords

[0049] This invention forms a new mini-program name by adding a series of high-frequency words after the original mini-program name, such as: takeout, selection, online, etc. As Figure 2 shown.

[0050] 5) Left - right splitting

[0051] In Chinese, many Chinese characters are of left - right structure. At the same time, if we look at the left part or the right part of a Chinese character alone, this single part can also be a Chinese character by itself. For example, "卧" can be split into two Chinese characters "臣" and "卜". The specific process of the left - right splitting method of this invention includes: First, use the OCR image recognition algorithm to split the Chinese characters of left - right structure into left and right parts, and at the same time search the character library for matching Chinese characters to generate a split character library; then, according to the split character library, replace the Chinese characters in the original mini-program name with the two split Chinese characters.

[0052] S2. Search for counterfeit mini-programs

[0053] This invention uses an automatic crawler tool to search for the generated counterfeit mini-program names, automatically obtain the text results of the mini-programs with the corresponding names and the corresponding mini-program icon information and save them.

[0054] S3. Data cleaning

[0055] This invention conducts data screening and cleaning on the data obtained from the previous step of mini-program search. It mainly relies on matching corresponding rules for automatic screening. The rules include: (1) Adopt the Edit Distance string similarity calculation algorithm to calculate the similarity between the mini-program name in the search results and the counterfeited mini-program name, and retain the results with a similarity of 80% or more; (2) Use the crawler tool to automatically obtain the classification of the mini-programs in the search results, and retain the results with the same classification as the counterfeited mini-program.

[0056] The automation of data cleaning is mainly realized by Python scripts, which can perform a large amount of data cleaning in a short time. S4. Detection of mini-program icon similarity

[0057] This invention uses the CNN algorithm to calculate the similarity between the mini-program icons obtained in step S2 and the target genuine mini-program icon. If the similarity is greater than or equal to the set threshold (in this actual example, the similarity threshold of the CNN algorithm is set to 0.9), then the mini-program is determined to be a WeChat counterfeit mini-program.

[0058] Using the method of this invention to detect counterfeit WeChat mini-programs targeting KFC, a large number of fake mini-programs targeting popular mini-program applications can be quickly found on the market.

[0059] On the other hand, the present invention also provides a detection system for counterfeit WeChat mini-programs, comprising the following modules to implement the detection method for counterfeit WeChat mini-programs described in any of the above claims:

[0060] The counterfeit mini-program name generation module employs several methods: similar-looking character replacement, sequence swapping, pinyin replacement, keyword addition at the end, and left-right splitting. Specifically, the similar-looking character matching module uses a combination of stroke order and pinyin similarity calculation to generate similar-looking characters to the target mini-program; the sequence swapping module rearranges the Chinese characters in the original name to create a new counterfeit name; the pinyin replacement module replaces the original Chinese characters with their pinyin; the keyword addition at the end adds a series of high-frequency words to the original name to create a new name; and the left-right splitting module first uses an OCR image recognition algorithm to split left-right structured Chinese characters into two parts, while simultaneously searching the character set for matching characters to generate a split character set. Then, based on this split character set, the original mini-program name is replaced with the two split characters.

[0061] Counterfeit Mini Program Search Module: Uses an automatic web crawler to search for generated counterfeit mini program names, automatically obtains the text results and corresponding mini program icon information of the corresponding names and saves them;

[0062] Mini Program Icon Similarity Detection Module: Uses a CNN algorithm to calculate the similarity between the mini program icon obtained in step S2 and the target genuine mini program icon. If the similarity is greater than or equal to a set threshold, the mini program is determined to be a WeChat counterfeit mini program.

[0063] The method and system of this invention add a similar-looking character matching module to the existing image-based detection solution for detecting counterfeit mini-programs. Based on the generated similar-looking character library, a large number of highly similar counterfeit mini-program names can be generated. These generated counterfeit names can then be used to quickly identify a large number of counterfeit mini-programs targeting popular mini-program applications on the market.

[0064] The above description is merely a detailed explanation of preferred embodiments and principles of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention, based on the ideas provided by the present invention, should be considered within the scope of protection of the present invention.

Claims

1. A method for detecting counterfeit WeChat mini-programs, characterized in that, Includes the following steps: S1. Generating counterfeit mini-program names: Using methods such as replacing similar-looking characters, swapping order, replacing pinyin, adding keywords at the end, or splitting left and right to generate counterfeit mini-program names; S2. Counterfeit Mini Program Search: Use an automatic web crawler to search for generated counterfeit mini program names, automatically obtain the text results of the corresponding mini program names and the corresponding mini program icon information, and save them; S3. Data cleaning: Use an automated script to perform preliminary screening and cleaning of the search results obtained in step S2, and match the corresponding rules to obtain a list of mini-programs whose names are similar to the counterfeited mini-programs and whose categories are the same; the corresponding rules include: (1) using the Edit Distance string similarity calculation algorithm to calculate the similarity between the mini-program name in the search results and the counterfeited mini-program name, and retaining the results whose similarity reaches the threshold or above; (2) using a crawler tool to automatically obtain the categories of the mini-programs in the search results, and retaining the results whose categories are the same as the counterfeited mini-programs. S4. Mini Program Icon Similarity Detection: Use the CNN algorithm to calculate the similarity between the mini program icons in the list of mini programs obtained in step S3 and the target genuine mini program icon. If the similarity is greater than or equal to the set threshold, the mini program is determined to be a WeChat counterfeit mini program.

2. The method for detecting counterfeit WeChat mini-programs according to claim 1, characterized in that, In step S1, the similar-looking character replacement method uses a similarity calculation method that combines stroke order and pinyin to generate similar-looking characters that are similar to the target.

3. The method for detecting counterfeit WeChat mini-programs according to claim 2, characterized in that, The specific process of the method for replacing similar-looking characters includes: using the Unicode Chinese character library, the Unicode encoding assigns stroke order numbers to each Chinese character according to the stroke order, and represents them with a string of numbers; using the Edit Distance string similarity calculation algorithm to calculate the similarity of all Chinese characters; after calculating the similarity between the stroke order number and the pinyin, the two are weighted to obtain the final similarity of the Chinese characters; if the similarity between two Chinese characters exceeds a set threshold, they are considered similar-looking characters.

4. The detection method for counterfeit WeChat mini-programs according to claim 1 or 3, characterized in that, The formula for calculating the string similarity of EditDistance is as follows: The max_len() function selects the longer of two strings, and the edit_distance() function calculates the minimum number of operations required to convert one string to another, including insertion, deletion, and replacement.

5. The method for detecting counterfeit WeChat mini-programs according to claim 3, characterized in that, The similarity threshold between the two Chinese characters is set to 80%.

6. The method for detecting counterfeit WeChat mini-programs according to claim 1, characterized in that, In step S1, the specific process of the left-right splitting method includes: first, using an OCR image recognition algorithm to split the Chinese characters with left-right structures into two parts, and at the same time, searching the character library for matching Chinese characters to generate a split character library; then, based on the split character library, replacing the Chinese characters in the original mini-program name with the two split Chinese characters.

7. The method for detecting counterfeit WeChat mini-programs according to claim 1, characterized in that, In step S4, the similarity threshold of the CNN algorithm is set to 0.

9.

8. A detection system for counterfeit WeChat mini-programs, characterized in that, The method for detecting counterfeit WeChat mini-programs as described in any one of claims 1-7 includes the following modules: The counterfeit mini-program name generation module employs several methods: similar-looking character replacement, sequence swapping, pinyin replacement, keyword addition at the end, and left-right splitting. Specifically, the similar-looking character matching module uses a combination of stroke order and pinyin similarity calculation to generate similar-looking characters to the target mini-program; the sequence swapping module rearranges the Chinese characters in the original name to create a new counterfeit name; the pinyin replacement module replaces the original Chinese characters with their pinyin; the keyword addition at the end adds a series of high-frequency words to the original name to create a new name; and the left-right splitting module first uses an OCR image recognition algorithm to split left-right structured Chinese characters into two parts, while simultaneously searching the character set for matching characters to generate a split character set. Then, based on this split character set, the original mini-program name is replaced with the two split characters. Counterfeit Mini Program Search Module: Uses an automatic web crawler to search for generated counterfeit mini program names, automatically obtains and saves the text results and corresponding mini program icon information of the corresponding names; Mini Program Icon Similarity Detection Module: Uses a CNN algorithm to calculate the similarity between the mini program icon obtained in step S2 and the target genuine mini program icon. If the similarity is greater than or equal to a set threshold, the mini program is determined to be a WeChat counterfeit mini program.