Applet category detection method and device, and computer readable storage medium
By extracting and processing the dynamic and static features of mini-programs, and combining image and text features to identify service categories, the problem of mismatched mini-program categories was solved, automated detection was achieved, detection efficiency and accuracy were improved, and the risk of violations was reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD
- Filing Date
- 2022-09-28
- Publication Date
- 2026-07-31
AI Technical Summary
The issue of mismatched service categories in mini-programs leads to frequent violations. Existing technologies are insufficient to effectively detect the compliance of mini-programs with service categories, posing a risk of providing false services or products without proper qualifications.
By extracting the dynamic and static features of mini-programs, including basic information, application programming interface function calls, and dynamic link information, feature processing and pre-classification are performed. Service category identification is then performed by combining image and text features. Finally, the category compliance of mini-programs is compared, and an automated detection method and device are designed.
It has achieved automated detection of mini-program category compliance, improved detection efficiency, reduced manual intervention, effectively identified violations, curbed the phenomenon of mini-program operators evading review, and protected the legitimate rights and interests of users.
Smart Images

Figure CN115495742B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of network technology and security, and in particular to a method and apparatus for detecting the category of a mini-program, and a computer-readable storage medium. Background Technology
[0002] Due to their low development costs, short development cycles, cross-platform compatibility, and lack of download requirements, the number of mini-programs has increased dramatically. However, as the number of mini-programs has grown, violations have also surfaced. One such violation is category discrepancy, where the service category registered for a mini-program does not match the actual services offered. This allows the mini-program platform to evade the verification of service category qualifications, posing a risk of providing false services or unqualified products. Summary of the Invention
[0003] In view of at least one of the above technical problems, this disclosure provides a method and apparatus for detecting the category of a mini-program, as well as a computer-readable storage medium, which can realize the automated detection of the category compliance of mini-programs.
[0004] According to one aspect of this disclosure, a method for detecting categories in mini-programs is provided, comprising:
[0005] Extract the dynamic and static features of the mini program, perform feature processing on the dynamic and static features, and complete the pre-classification of the mini program;
[0006] The service categories of the pre-classified mini-programs are specifically identified to detect the service categories of the mini-programs.
[0007] The current service category of the mini program is compared with the detected service category to complete the test of the mini program's category compliance.
[0008] In some embodiments of this disclosure, the dynamic and static features of the mini-program include at least one of basic information, application programming interface function call information, and dynamic linking information.
[0009] In some embodiments of this disclosure, the extraction of dynamic and static features of the mini-program includes:
[0010] The system searches for and locates the mini-program to be tested, runs the test mini-program to take screenshots of the relevant pages, identifies the text in the page screenshots, and obtains basic information from the identified text. The basic information includes at least one of the following: mini-program name, mini-program description, and account entity.
[0011] In some embodiments of this disclosure, the extraction of dynamic and static features of the mini-program includes:
[0012] Obtain the compiled package of the mini-program, obtain the source code of the mini-program, and traverse the source code of the mini-program to query the application interface function call status.
[0013] In some embodiments of this disclosure, the extraction of dynamic and static features of the mini-program includes:
[0014] The dynamic link information is obtained by using regular expression matching, where the dynamic link information includes at least one of dynamic links and domain names.
[0015] In some embodiments of this disclosure, when the dynamic and static features of a mini-program include basic information, application programming interface function call information, and dynamic linking information, the feature processing of the dynamic and static features to complete the pre-classification of the mini-program includes:
[0016] By performing feature processing and pre-classification on the basic information, the first classification result of the mini-program is obtained;
[0017] Feature processing and pre-classification of application interface function calls are performed to obtain the second classification result of the mini-program;
[0018] By performing feature processing and pre-classification on dynamic link information, a third classification result for the mini-program is obtained;
[0019] Based on the first classification result, the second classification result, and the third classification result, the pre-classification result of the mini program is determined.
[0020] In some embodiments of this disclosure, determining the pre-classification result of the mini-program based on the first classification result, the second classification result, and the third classification result includes:
[0021] Find the intersection of the first classification result and the second classification result to obtain the first intersection;
[0022] Find the intersection of the second classification result and the third classification result to obtain the second intersection;
[0023] Find the intersection of the first classification result and the third classification result to obtain the third intersection;
[0024] The union of the first intersection, the second intersection, and the third intersection is used as the pre-classification result of the mini-program.
[0025] In some embodiments of this disclosure, the feature processing and pre-classification of basic information includes: performing data preprocessing and word segmentation on the mini-program introduction, performing data processing on the account subject, and performing classification on the basic information.
[0026] In some embodiments of this disclosure, the feature processing and pre-classification of dynamic link information includes: extracting link feature information from dynamic links, and matching the link feature information with link thesauruses of each category, wherein the feature information includes at least one of suffix, domain name, characters and letters.
[0027] In some embodiments of this disclosure, the specific identification of service categories for the pre-classified mini-programs, and the detection of the service categories of the mini-programs, include:
[0028] Extract image and text features from the mini-program, where image features include images loaded on the page, and text features include at least one of privacy text and page text;
[0029] The text features are segmented into words, classified according to the text features, and the classification results of the text features are determined.
[0030] An image classification model is used to classify images loaded on the page and determine the classification results based on image features;
[0031] Based on the classification results of text features and image features, the service category of the mini-program is determined.
[0032] In some embodiments of this disclosure, comparing the current service category of the mini-program with the detected service category to complete the mini-program category compliance detection includes:
[0033] Compare the current service categories of the mini-program with the detected service categories;
[0034] If the current service category of the mini program does not include the detected service category, it is determined that there is a violation of category mismatch.
[0035] In some embodiments of this disclosure, the mini-program category detection method further includes:
[0036] Based on the service category of the mini-program and the current frequency of non-compliance and violations of mini-programs exceeding a predetermined value, the service category detection items of the mini-program are determined. The service category detection items of the mini-program are service category detection items for special identification of the service category of the pre-classified mini-program.
[0037] In some embodiments of this disclosure, the mini-program category detection method further includes:
[0038] The analysis examines the non-compliance and violations of mini-programs that occur more frequently than a predetermined value. These violations include at least one of the following: operating services exceeding the current service category, operating content exceeding the current service category, and operating products exceeding the current service category.
[0039] According to another aspect of this disclosure, a mini-program category detection device is provided, comprising:
[0040] The pre-classification module is configured to extract the dynamic and static features of the mini-program, perform feature processing on the dynamic and static features, and complete the pre-classification of the mini-program.
[0041] The category recognition module is configured to perform specific service category recognition on the pre-classified mini-programs and detect the service categories of the mini-programs.
[0042] The category compliance detection module is configured to compare the current service category of the mini-program with the detected service category to complete the category compliance detection of the mini-program.
[0043] In some embodiments of this disclosure, the dynamic and static features of the mini-program include at least one of basic information, application programming interface function call information, and dynamic linking information;
[0044] The pre-classification module, after extracting the dynamic and static features of the mini-program, is configured to search for and locate the mini-program to be detected, run the test mini-program to take screenshots of relevant pages, identify the text in the page screenshots, and obtain basic information from the identified text. This basic information includes at least one of the following: mini-program name, mini-program description, and account entity. And / or, it obtains the mini-program's compiled package, obtains the mini-program's source code, and iterates through the mini-program's source code to query application interface function calls. And / or, it uses regular expression matching to obtain dynamic link information, where dynamic link information includes at least one of dynamic links and domain names.
[0045] In some embodiments of this disclosure, when the dynamic and static characteristics of the mini-program include basic information, application programming interface function call information, and dynamic linking information,
[0046] The pre-classification module, after performing feature processing on dynamic and static features to complete the pre-classification of the mini-program, is configured to perform feature processing and pre-classification on basic information to obtain the first classification result of the mini-program; perform feature processing and pre-classification on application interface function calls to obtain the second classification result of the mini-program; perform feature processing and pre-classification on dynamic link information to obtain the third classification result of the mini-program; and determine the pre-classification result of the mini-program based on the first, second, and third classification results.
[0047] In some embodiments of this disclosure, the pre-classification module, after determining the pre-classification result of the mini-program based on the first classification result, the second classification result, and the third classification result, is configured to: find the intersection of the first classification result and the second classification result to obtain a first intersection; find the intersection of the second classification result and the third classification result to obtain a second intersection; find the intersection of the first classification result and the third classification result to obtain a third intersection; and take the union of the first intersection, the second intersection, and the third intersection as the pre-classification result of the mini-program.
[0048] In some embodiments of this disclosure, the pre-classification module is configured to perform data preprocessing and word segmentation on the mini-program introduction, data processing on the account subject, and classification on the basic information, while performing feature processing and pre-classification on the basic information.
[0049] In some embodiments of this disclosure, the pre-classification module, when performing feature processing and pre-classification on dynamic link information, is configured to extract link feature information from the dynamic links and match the link feature information with the link thesaurus of each category, wherein the feature information includes at least one of suffix, domain name, text and letters.
[0050] In some embodiments of this disclosure, the category recognition module, after performing service category-specific recognition on the pre-classified mini-program and detecting the service category of the mini-program, is configured to extract image features and text features of the mini-program. The image features include page loading images, and the text features include at least one of private text and page text. The text features are then segmented into words, classified according to the text features, and the classification result of the text features is determined. An image classification model is used to classify the page loading images to determine the classification result of the image features. Finally, based on the classification results of the text features and the image features, the service category of the mini-program is determined.
[0051] In some embodiments of this disclosure, the category compliance detection module is configured to compare the current service category of the mini-program with the detected service category to complete the category compliance detection of the mini-program; if the current service category of the mini-program does not include the detected service category, it is determined that there is a violation of category mismatch.
[0052] In some embodiments of this disclosure, the mini-program category detection device further includes:
[0053] The detection item determination module is configured to determine the mini-program service category detection items based on the mini-program service category and the mini-program's non-compliance behavior that occurs more frequently than a predetermined value. The mini-program service category detection items are service category detection items that are specifically identified for the pre-classified mini-programs.
[0054] In some embodiments of this disclosure, the mini-program category detection device further includes:
[0055] The violation analysis module is configured to analyze non-compliant behaviors of mini programs that occur more frequently than a predetermined value. The non-compliant behaviors of mini programs include at least one of the following: operating services exceeding the current service category, operating content exceeding the current service category, and operating products exceeding the current service category.
[0056] According to another aspect of this disclosure, a mini-program category detection device is provided, comprising:
[0057] The memory is configured to store instructions;
[0058] The processor is configured to execute the instructions, causing the mini-program category detection device to perform operations implementing the mini-program category detection method as described in any of the above embodiments.
[0059] According to another aspect of this disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions that, when executed by a processor, implement the mini-program category detection method as described in any of the above embodiments.
[0060] This disclosure enables automated detection of mini-program category compliance, effectively improving detection efficiency and reducing manual intervention. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 These are schematic diagrams illustrating some embodiments of the mini-program category detection method disclosed herein.
[0063] Figure 2 These are schematic diagrams illustrating other embodiments of the mini-program category detection method disclosed herein.
[0064] Figure 3 This is a schematic diagram illustrating the service categories opened by the mini-program in some embodiments of this disclosure.
[0065] Figure 4 This is a schematic diagram of category detection items in some embodiments of this disclosure.
[0066] Figure 5 This is a schematic diagram of the service categories of the mini-program in some embodiments of this disclosure.
[0067] Figure 6 This is a schematic diagram of the API in some embodiments of this disclosure.
[0068] Figure 7 This is a schematic diagram of a third-party SDK in some embodiments of this disclosure.
[0069] Figure 8 These are schematic diagrams of some embodiments of the mini-program category detection device disclosed herein.
[0070] Figure 9 The diagram shows the structure of some other embodiments of the mini-program category detection device disclosed herein. Detailed Implementation
[0071] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0072] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this disclosure.
[0073] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0074] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0075] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0076] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0077] The inventors discovered through research that in edge computing scenarios, there may be a UPF closer to the user, so the UE's original PDU session may undergo PSA UPF handover.
[0078] Figure 1 This is a schematic diagram of some embodiments of the mini-program category detection method disclosed herein. Preferably, this embodiment can be executed by the device of the mini-program category detection method disclosed herein. The method includes at least one step from steps 11-13, wherein:
[0079] Step 11: Extract the dynamic and static features of the mini program, perform feature processing on the dynamic and static features, and complete the pre-classification of the mini program.
[0080] In some embodiments of this disclosure, the dynamic and static features of the mini-program include at least one of the following features: basic information, application programming interface function call information, and dynamic link information.
[0081] Step 12: Perform service category identification on the pre-classified mini-programs to detect their service categories.
[0082] Step 13: Compare the current service category of the mini program with the detected service category to complete the mini program category compliance test.
[0083] To address the issue of mismatched categories in related technologies for mini-programs, the above embodiments of this disclosure propose an automated method for mini-program category compliance detection, which can effectively improve detection efficiency and reduce manual intervention.
[0084] Figure 2 This is a schematic diagram illustrating some other embodiments of the mini-program category detection method disclosed herein. Preferably, this embodiment can be executed by the apparatus of the mini-program category detection method disclosed herein. The method includes at least one step from steps 10-13, wherein:
[0085] Step 10: Based on the service category of the mini-program and the current frequency of non-compliance violations by mini-programs exceeding a predetermined value, determine the service category detection items for the mini-program. The service category detection items are service category detection items specifically identified for the pre-classified mini-programs.
[0086] In some embodiments of this disclosure, step 10 may include: mini-program service category detection items. That is, based on the mini-program service category and high-frequency category non-compliance and violation behaviors, this patent designs mini-program service category detection items to perform key category item detection on the categorized mini-programs; wherein, the mini-program involves many category detection items, and category detection can be performed on high-frequency non-compliance and violation items.
[0087] In some embodiments of this disclosure, step 10 may include: based on the service category of the mini-program and the high-frequency category non-compliance violations, this patent designs a mini-program service category detection item to perform key category item detection on the categorized mini-programs.
[0088] In some embodiments of this disclosure, the service category of the mini-program can be selected according to the requirements of the mini-program platform. At least one service category should be selected when registering the mini-program. Service categories are generally divided into two levels, and each level must be filled in. According to the official documentation of the mini-program platform, there are 35 first-level service categories and over 300 second-level service categories. The service categories displayed in the basic information of a mini-program are generally second-level service categories. The above embodiments of this disclosure mainly analyze the compliance of second-level service categories. Figure 3 This is a schematic diagram illustrating the service categories opened by the mini-program in some embodiments of this disclosure.
[0089] In some embodiments of this disclosure, considering the large number of official secondary service category classifications on the mini-program platform, directly analyzing the service category of mini-programs based on these classifications would result in a large amount of data. Therefore, the embodiments of this disclosure first pre-classify the mini-programs. Simultaneously, based on currently frequent category mismatch violations, the embodiments of this disclosure have designed key category detection items for different categories (some category detection items are attached). Figure 4 ), and conduct special category testing on the pre-categorized mini-programs. Figure 4 This is a schematic diagram of category detection items in some embodiments of this disclosure.
[0090] In some embodiments of this disclosure, step 10 may further include: analyzing the non-compliance and violation behaviors of the mini-program that occur more frequently than a predetermined value, wherein the non-compliance and violation behaviors of the mini-program include at least one of operating services exceeding the current service category, operating content exceeding the current service category, and operating goods exceeding the current service category.
[0091] In some embodiments of this disclosure, this patent analyzes the current high-frequency category mismatch situations as follows:
[0092] First, the services offered exceed the current service category: The mini-program involves providing services related to categories with high entry barriers but has not obtained the corresponding qualification. For example, if a financial mini-program involves services such as insurance product recommendations and appointments, the service category should be added as "[Finance Industry - Insurance]".
[0093] Second, the content of the operation exceeds the current service category: For example, if the content of the mini program involves articles / pictures / videos / audio reports / evaluations / opinions related to facts of national political life, then the service category should be added as "[Political Information - Current Affairs Information]".
[0094] Third, the products sold exceed the current service category: The mini-program sells products in high-qualification categories online, but has not applied for and been approved for the corresponding qualification category. For example, the e-commerce mini-program involves the sale of medical devices such as fever-reducing patches and thermometers, but has not applied for and been approved for the corresponding "medical devices" category.
[0095] Step 11: Extract the dynamic and static features of the mini program, perform feature processing on the dynamic and static features, and complete the pre-classification of the mini program.
[0096] In some embodiments of this disclosure, step 11 may include: mini-program pre-classification. That is, obtaining basic features such as the mini-program name, description, and account entity; simultaneously, decompiling the mini-program package to obtain source code analysis of API calls; and running the mini-program to obtain dynamic link data. Feature processing is then performed on the extracted data to complete the pre-classification of the mini-program.
[0097] In some embodiments of this disclosure, step 11 may include: analyzing the service categories of the mini-programs and combining the correlation of characteristics of different service categories to divide the mini-programs into ten categories (see appendix). Figure 5 ). Figure 5 This is a schematic diagram of the service categories of the mini-program in some embodiments of this disclosure.
[0098] In some embodiments of this disclosure, a mini-program may belong to multiple categories due to the diversity of its functions.
[0099] In some embodiments of this disclosure, step 11 may include at least one of steps 111-113, wherein:
[0100] Step 111: Extract the dynamic and static features of the mini-program.
[0101] In some embodiments of this disclosure, the dynamic and static features of the mini-program may include at least one of the following features: basic information, application programming interface function call information, and dynamic linking information.
[0102] In some embodiments of this disclosure, step 111 may include at least one of steps 1111-1113, wherein:
[0103] Step 1111: Search for and locate the mini-program to be tested, run the test mini-program to take screenshots of the relevant pages, recognize the text in the page screenshots, and obtain basic information from the recognized text.
[0104] In some embodiments of this disclosure, such as Figure 2 As shown, the basic information includes at least one of the following: mini-program name, mini-program description, and account entity.
[0105] In some embodiments of this disclosure, step 1111 may include: using the mini-program platform, searching and locating the mini-program to be tested using the mini-program name, running the test mini-program using Appium and an emulator, taking screenshots of the relevant pages using the save_screenshot() function, recognizing the text in the page screenshots using OCR technology, and obtaining information such as the mini-program name, description, and account entity according to corresponding rules.
[0106] Step 1112: Obtain the compiled package of the mini program, obtain the source code of the mini program, and traverse the source code of the mini program to query the API (Application Programming Interface) function call status.
[0107] In some embodiments of this disclosure, step 1112 may include: when simulating the running of the mini-program, the mini-program compilation package is automatically downloaded to the local machine; the compilation package is located using the mini-program APPID; and the mini-program source code is obtained using a decompilation tool. The source code is then traversed to query API function call information. The above embodiments of this disclosure refer to and analyze the official API documentation of the mini-program platform, removing common APIs such as wx.base64ToArrayBuffer (which converts a Base64 string to an ArrayBuffr object), and selecting 50 APIs for analysis (some APIs are listed in the appendix). Figure 6 ). Figure 6 This is a schematic diagram of the API in some embodiments of this disclosure.
[0108] Step 1113: Use regular expression matching to obtain dynamic link information, wherein the dynamic link information includes at least one of dynamic links and domain names.
[0109] In some embodiments of this disclosure, step 1113 may include: using a packet capture tool to obtain information such as dynamic links and domain names through regular expression matching.
[0110] Step 112: Perform feature processing on the dynamic and static features to complete the pre-classification of the mini-program.
[0111] In some embodiments of this disclosure, step 112 may include at least one of steps 1121-1123, wherein:
[0112] Step 1121: Perform feature processing and pre-classification on the basic information to obtain the first classification result of the mini-program.
[0113] In some embodiments of this disclosure, step 1121 may include: performing data preprocessing and word segmentation on the mini-program introduction, performing data processing on the account subject, and classifying basic information.
[0114] In some embodiments of this disclosure, step 1121 may include: performing data preprocessing on the mini-program introduction, which may involve word segmentation using jieba. Simultaneously, matching rules are used to remove words such as "limited company," "joint-stock company," and "Shanghai" from the account subject to complete the data processing of the account subject. A BERT classification model may be used.
[0115] Step 1122: Perform feature processing and pre-classification on the application interface function call situation to obtain the second classification result of the mini program.
[0116] In some embodiments of this disclosure, step 1122 may include: using one-hot encoding, where 50 bits represent 50 APIs; if the API is called, the bit is marked as 1, otherwise it is 0. AdaBoost can be used for multi-classification.
[0117] Step 1123: Perform feature processing and pre-classification on the dynamic link information to obtain the third classification result of the mini program.
[0118] In some embodiments of this disclosure, step 1123 includes: extracting link feature information from dynamic links, and matching the link feature information with a pre-collected and accumulated link thesaurus of various categories, wherein the feature information includes at least one of suffix, domain name, characters and letters.
[0119] Step 113: Determine the pre-classification result of the mini-program based on the first classification result, the second classification result, and the third classification result.
[0120] In some embodiments of this disclosure, step 113 includes: taking the union of any pairwise intersections of the first classification result, the second classification result, and the third classification result as the final pre-classification result of the mini-program.
[0121] In some embodiments of this disclosure, step 113 includes: finding the intersection of the first classification result and the second classification result to obtain a first intersection; finding the intersection of the second classification result and the third classification result to obtain a second intersection; finding the intersection of the first classification result and the third classification result to obtain a third intersection; and taking the union of the first intersection, the second intersection, and the third intersection as the pre-classification result of the mini-program.
[0122] Step 12: Perform service category identification on the pre-classified mini-programs to detect their service categories.
[0123] In some embodiments of this disclosure, step 12 may include a specific category detection for the mini-program. That is, based on the mini-program's identified category, and combined with common category misconduct violations within that category, a specific service category identification analysis is performed on the mini-program. Features such as page loading images, privacy text, SDK references, and page text are extracted from the mini-program, and the service category of the mini-program is identified through text classification and image classification results.
[0124] In some embodiments of this disclosure, step 12 may include at least one of steps 121-124, wherein:
[0125] Step 121: Extract the image features and text features of the mini program. The image features include images loaded on the page, and the text features include at least one of privacy text and page text.
[0126] In some embodiments of this disclosure, step 121 may include at least one of steps 1211-1213, wherein:
[0127] Step 1211: Extract image features.
[0128] In some embodiments of this disclosure, step 1211 may include: loading the image on the page, which can be obtained from the local Applet / Mini Program AppID / store / images file path on the test device and by using the XPath element location method.
[0129] Step 1212: Extract the private text.
[0130] In some embodiments of this disclosure, step 1212 may include: running the mini-program using an emulator and testing tools, clicking on the mini-program's personal privacy protection guidelines for obtaining service privacy and data prompts, recognizing the guidelines text using OCR technology, and using keyword matching and corresponding rules to obtain the service content provided by the mini-program itself (information processed by the developer) and the names of the referenced third-party SDKs (Software Development Kits) and SDKs (see appendix). Figure 7 ). Figure 7 This is a schematic diagram of a third-party SDK in some embodiments of this disclosure.
[0131] Step 1213: Extract the text from the page.
[0132] In some embodiments of this disclosure, step 1213 may include: running the applet using a simulator and testing tools, clicking to trigger the navigation bar button and other related pages and taking screenshots, and using OCR to recognize the text in the image.
[0133] Step 122: Segment the text features into words, classify them according to the text features, and determine the classification results of the text features.
[0134] In some embodiments of this disclosure, step 122 may include: using jieba to segment the text identified on the page, the service content identified in the privacy text, and the SDK name, and then using bert to perform multi-classification to identify the service category of the mini-program.
[0135] Step 123: Use an image classification model to classify the images loaded on the page and determine the classification results of the image features.
[0136] In some embodiments of this disclosure, step 123 may include: resizing the images loaded on the page; using a trained image classification model (which may be built using VIT and employ focal loss to construct a loss function); and labeling each image with its corresponding service category after passing through the recognition model, with each image labeled with only one service category. When the number of images labeled with a certain service category in the mini-program reaches a preset percentage of the total number of detected images, it is determined that the mini-program provides that service category.
[0137] Step 124: Determine the service category of the mini-program based on the classification results of text features and image features.
[0138] In some embodiments of this disclosure, step 124 may include: taking the union of the classification results of the above-mentioned text and image features as the final service category of the mini-program.
[0139] Step 13: Compare the current service category of the mini program with the detected service category to complete the mini program category compliance test.
[0140] In some embodiments of this disclosure, step 13 may include: comparing the current service category of the mini-program with the detected service category; if the current service category of the mini-program does not include the detected service category, it is determined that there is a violation of category mismatch.
[0141] In some embodiments of this disclosure, step 13 may include: service category comparison, that is, comparing the identified service category with the currently registered service category; if the current service category does not include the detected service category, then the mini-program is identified as having a category mismatch violation.
[0142] The automated mini-program category compliance detection method provided in the above embodiments of this disclosure is applicable to the identification of non-compliant mini-programs. As the number of mini-programs gradually increases, their violations are also becoming more apparent. The method proposed in the above embodiments of this disclosure can effectively identify violations such as non-compliance in mini-program category, effectively curbing the phenomenon of mini-program operators evading the platform's material qualification review for service categories, reducing the risk of mini-programs providing false services or unqualified products, and protecting the legitimate rights and interests of users.
[0143] Figure 8 These are schematic diagrams illustrating some embodiments of the mini-program category detection device disclosed herein. For example... Figure 8 As shown, the mini-program category detection device disclosed herein may include a pre-classification module 81, a category identification module 82, and a category compliance detection module 83, wherein:
[0144] The pre-classification module 81 is configured to extract the dynamic and static features of the mini-program, perform feature processing on the dynamic and static features, and complete the pre-classification of the mini-program.
[0145] In some embodiments of this disclosure, the dynamic and static features of the mini-program include at least one of basic information, application programming interface function call information, and dynamic linking information.
[0146] In some embodiments of this disclosure, the pre-classification module 81, when extracting the dynamic and static features of the mini-program, can be configured to search for and locate the mini-program to be detected, run the test mini-program to take screenshots of relevant pages, identify the text in the page screenshots, and obtain basic information from the identified text, wherein the basic information includes at least one of the mini-program name, mini-program description, and account entity; and / or, obtain the mini-program's compilation package, obtain the mini-program's source code, and traverse the mini-program's source code to query the application interface function call status; and / or, use regular expression matching to obtain dynamic link information, wherein the dynamic link information includes at least one of dynamic links and domain names.
[0147] In some embodiments of this disclosure, when the dynamic and static features of the mini-program include basic information, application programming interface (API) function call information, and dynamic link information, the pre-classification module 81, after performing feature processing on the dynamic and static features to complete the pre-classification of the mini-program, can be configured to perform feature processing and pre-classification on the basic information to obtain a first classification result of the mini-program; perform feature processing and pre-classification on the API function call information to obtain a second classification result of the mini-program; perform feature processing and pre-classification on the dynamic link information to obtain a third classification result of the mini-program; and determine the pre-classification result of the mini-program based on the first classification result, the second classification result, and the third classification result.
[0148] In some embodiments of this disclosure, the pre-classification module 81, when determining the pre-classification result of the mini-program based on the first classification result, the second classification result, and the third classification result, can be configured to: find the intersection of the first classification result and the second classification result to obtain a first intersection; find the intersection of the second classification result and the third classification result to obtain a second intersection; find the intersection of the first classification result and the third classification result to obtain a third intersection; and take the union of the first intersection, the second intersection, and the third intersection as the pre-classification result of the mini-program.
[0149] In some embodiments of this disclosure, the pre-classification module 81, when performing feature processing and pre-classification on basic information, can be configured to perform data preprocessing and word segmentation on the mini-program introduction, data processing on the account subject, and classification on the basic information.
[0150] In some embodiments of this disclosure, the pre-classification module 81, when performing feature processing and pre-classification on dynamic link information, can be configured to extract link feature information from the dynamic links and match the link feature information with the link thesaurus of each category, wherein the feature information includes at least one of suffix, domain name, text and letters.
[0151] The category identification module 82 is configured to perform service category identification on the pre-classified mini-programs and detect the service categories of the mini-programs.
[0152] In some embodiments of this disclosure, the category recognition module 82, after performing service category-specific recognition on the pre-classified mini-program and detecting the service category of the mini-program, can be configured to extract image features and text features of the mini-program. The image features include page loading images, and the text features include at least one of private text and page text. The text features are then segmented into words, classified according to the text features, and the classification result of the text features is determined. An image classification model is used to classify the page loading images to determine the classification result of the image features. Finally, based on the classification results of the text features and the image features, the service category of the mini-program is determined.
[0153] The category compliance detection module 83 is configured to compare the current service category of the mini program with the detected service category to complete the category compliance detection of the mini program.
[0154] In some embodiments of this disclosure, the category compliance detection module 83, after comparing the current mini-program service category with the detected service category to complete the mini-program category compliance detection, can be configured to compare the current mini-program service category with the detected service category; if the current mini-program service category does not include the detected service category, it is determined that there is a category mismatch violation.
[0155] In some embodiments of this disclosure, such as Figure 8 As shown, the mini-program category detection device may further include a detection item determination module 80, wherein:
[0156] The detection item determination module 80 can be configured to determine the mini-program service category detection items based on the mini-program service category and the mini-program's non-compliance behavior that occurs more frequently than a predetermined value. The mini-program service category detection items are service category detection items that are specifically identified for the pre-classified mini-programs.
[0157] In some embodiments of this disclosure, such as Figure 8 As shown, the mini-program category detection device may further include a violation analysis module 84, wherein:
[0158] The violation analysis module 84 is configured to analyze non-compliant behaviors of the mini-program that occur more frequently than a predetermined value. The non-compliant behaviors of the mini-program include at least one of the following: operating services exceeding the current service category, operating content exceeding the current service category, and operating products exceeding the current service category.
[0159] The above embodiments of this disclosure address the frequent issue of category mismatch and violation in mini-programs by proposing an automated category compliance detection device and designing a mini-program service category detection strategy and key detection items.
[0160] Secondly, in addition to extracting basic features such as the mini-program name, description, and account entity, the embodiments disclosed above also acquire and decompile the source code to analyze API calls and capture dynamic links. By classifying the static and dynamic features into text, feature matching, and classification, pre-classification of the mini-program is completed.
[0161] Finally, the above-described embodiments of this disclosure further extracted features such as images loaded on the mini-program page, privacy text, SDK references, and page text, and performed comprehensive processing. Through text classification and image classification, the service category of the pre-classified mini-program was specifically detected.
[0162] Figure 9 These are schematic diagrams illustrating the structure of other embodiments of the mini-program category detection device disclosed herein. For example... Figure 9 As shown, the mini-program category detection device disclosed herein may include a memory 91 and a processor 92.
[0163] Memory 91 is used to store instructions, and processor 92 is coupled to memory 91. Processor 92 is configured to execute instructions stored in memory as described in any of the above embodiments (e.g., Figure 1 or Figure 2 The method for detecting categories in mini-programs as described in the example)
[0164] like Figure 9 As shown, the session management function network element also includes a communication interface 93 for information exchange with other devices. Simultaneously, the session management function network element also includes a bus 94, through which the processor 92, communication interface 93, and memory 91 communicate with each other.
[0165] The memory 91 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk drive. The memory 91 may also be a memory array. The memory 91 may also be divided into blocks, and these blocks may be combined into virtual volumes according to certain rules.
[0166] Furthermore, processor 92 may be a central processing unit (CPU), or a general-purpose integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present disclosure.
[0167] The above embodiments of this disclosure propose a detection device for violations related to non-compliance of mini-program categories, and design a mini-program service category detection strategy and key detection items.
[0168] The embodiments disclosed above extract dynamic and static features, including the mini-program name, description, API calls, and dynamic links, and perform data processing to complete the pre-classification of the mini-program.
[0169] The embodiments disclosed above extract features such as page loading images, privacy text, and SDK references, and process them to complete the service category-specific detection of the pre-classified mini-program.
[0170] According to another aspect of this disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions that, when executed by a processor, implement any of the embodiments described above (e.g., Figure 1 or Figure 2 The method for detecting categories in mini-programs as described in the example)
[0171] In some embodiments of this disclosure, the computer-readable storage medium may be a non-transitory computer-readable storage medium.
[0172] First, in response to the frequent violations of category mismatch in mini-programs, the above-mentioned embodiments of this disclosure have designed a mini-program service category detection strategy and key detection items.
[0173] Secondly, the above embodiments of this disclosure extract and process the dynamic and static features of the mini-program to complete the pre-classification of the mini-program, and then perform service category identification on the pre-classified mini-program, and compare the category identification results with the current service category of the mini-program to complete the detection of the mini-program's category conformity.
[0174] Finally, the above-described embodiments of this disclosure further extracted features such as images loaded on the mini-program page, privacy text, SDK references, and page text, and performed comprehensive processing. Through text classification and image classification, the service category of the pre-classified mini-program was specifically detected.
[0175] The above embodiments of this disclosure propose a method for detecting the category compliance of a mini-program. Based on the common problem of category mismatch, a service category detection item is designed. By extracting information such as the mini-program name, API function calls, and privacy text for matching analysis, the method completes the pre-classification and service category identification of the mini-program and compares it with the registered service category to complete the category compliance detection of the mini-program.
[0176] The above embodiments of this disclosure address the frequent issue of category mismatch and violation in mini-programs by proposing an automated category compliance detection method and designing a mini-program service category detection strategy and key detection items.
[0177] In addition to extracting basic features such as the mini-program name, description, and account entity, the embodiments of this disclosure also acquire and decompile the source code to analyze API calls and capture dynamic links. These embodiments of the disclosure perform text classification based on static and dynamic features, and complete the pre-classification of the mini-program through feature matching and classification.
[0178] The above embodiments of this disclosure, combined with the designed service category detection items, extract features such as loading images, privacy text, SDK references, and page text of the mini-program page, and perform comprehensive processing to complete the service category-specific detection of the pre-classified mini-program through text classification and image classification.
[0179] To address the common problem of mismatched categories in mini-programs, the above embodiments of this disclosure propose an automated method for detecting mini-program category compliance, which greatly reduces the workload of manual identification and has better applicability.
[0180] For both regulatory authorities and users of mini-programs, the method proposed in the above embodiments of this disclosure can effectively identify violations such as mismatch between mini-program categories. It can effectively curb the phenomenon of mini-program operators evading the material qualification review of the mini-program platform for service categories, reduce the risk of mini-programs providing false services or unqualified products, and safeguard the legitimate rights and interests of users.
[0181] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, apparatus, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0182] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0183] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0184] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0185] The mini-program category detection device, pre-classification module, category identification module, category compliance detection module, detection item determination module, and violation analysis module described above can be implemented as a general-purpose processor, programmable logic controller (PLC), digital signal processor (DSP), general-purpose integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or any suitable combination thereof for performing the functions described in this application.
[0186] This concludes the detailed description of the present disclosure. To avoid obscuring the concept of the disclosure, some details known in the art have not been described. Those skilled in the art will fully understand how to implement the technical solutions disclosed herein based on the above description.
[0187] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing the relevant hardware to implement them. The program can be stored in a non-transitory computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0188] The description in this disclosure is provided for illustrative and descriptive purposes only and is not intended to be exhaustive or to limit the disclosure to its forms. Many modifications and variations will be apparent to those skilled in the art. The embodiments were chosen and described in order to better illustrate the principles and practical application of this disclosure and to enable those skilled in the art to understand this disclosure and to design various embodiments with various modifications suitable for a particular purpose.
Claims
1. A method for detecting categories in a mini-program, comprising: Extract dynamic and static features of the mini program, perform feature processing on the dynamic and static features, and complete the pre-classification of the mini program. The dynamic and static features of the mini program include at least one of application interface function call information, basic information and dynamic link information. The service category of the pre-classified mini-program is specifically identified. This identification process includes: extracting image and text features from the mini-program; segmenting the text features into words; classifying the text features to determine the classification results; classifying the images loaded on the page using an image classification model to determine the classification results; and determining the service category of the mini-program based on the classification results of the text and image features. The current service category of the mini program is compared with the detected service category to complete the function check of the mini program category. The current service category of the mini program is the currently registered service category of the mini program. In cases where the dynamic and static features of a mini-program include basic information, application programming interface function call information, and dynamic linking information, the feature processing of these dynamic and static features to complete the pre-classification of the mini-program includes: By performing feature processing and pre-classification on the basic information, the first classification result of the mini-program is obtained; Feature processing and pre-classification of application interface function calls are performed to obtain the second classification result of the mini-program; By performing feature processing and pre-classification on dynamic link information, a third classification result for the mini-program is obtained; Based on the first classification result, the second classification result, and the third classification result, the pre-classification result of the mini program is determined.
2. The method for detecting categories in mini-programs according to claim 1, wherein, The extraction of dynamic and static features of the mini-program includes: The search engine locates the mini-program to be tested, runs the test mini-program to take screenshots of the relevant pages, identifies the text in the page screenshots, and obtains basic information from the identified text. The basic information includes at least one of the following: mini-program name, mini-program description, and account entity. And / or, Obtain the compiled package of the mini program, obtain the source code of the mini program, and traverse the source code of the mini program to query the application interface function call status; And / or, The dynamic link information is obtained by using regular expression matching, where the dynamic link information includes at least one of dynamic links and domain names.
3. The applet category detection method of claim 1, wherein, The process of determining the pre-classification result of the mini-program based on the first classification result, the second classification result, and the third classification result includes: Find the intersection of the first classification result and the second classification result to obtain the first intersection; Find the intersection of the second classification result and the third classification result to obtain the second intersection; Find the intersection of the first classification result and the third classification result to obtain the third intersection; The union of the first intersection, the second intersection, and the third intersection is used as the pre-classification result of the mini-program.
4. The method for detecting categories in mini-programs according to claim 1, wherein: The feature processing and pre-classification of basic information includes: pre-processing and word segmentation of the mini-program introduction, data processing of the account subject, and classification of basic information; And / or, The feature processing and pre-classification of dynamic link information includes: extracting link feature information from dynamic links, and matching the link feature information with link thesauruses of each category, wherein the feature information includes at least one of suffix, domain name, characters and letters.
5. The applet category detection method according to any one of claims 1 to 4, in, Image features include images loaded on the page, and text features include at least one of privacy text and page text.
6. The method for detecting the category of a mini-program according to any one of claims 1-4, wherein comparing the current service category of the mini-program with the detected service category to complete the detection of the mini-program's category conformity includes: Compare the current service categories of the mini-program with the detected service categories; If the current service category of the mini program does not include the detected service category, it is determined that there is a violation of category mismatch.
7. The method for detecting mini-program categories according to any one of claims 1-4, further comprising: Based on the service category of the mini-program and the current frequency of non-compliance and violations of mini-programs exceeding a predetermined value, the service category detection items of the mini-program are determined. The service category detection items of the mini-program are service category detection items for specific identification of the service category of the pre-classified mini-program.
8. The method for detecting mini-program categories according to any one of claims 1-4, further comprising: The analysis examines the non-compliance and violations of mini-programs that occur more frequently than a predetermined value. These violations include at least one of the following: operating services exceeding the current service category, operating content exceeding the current service category, and operating products exceeding the current service category.
9. A mini-program category detection device, comprising: The pre-classification module is configured to extract dynamic and static features of the mini-program, perform feature processing on the dynamic and static features, and complete the pre-classification of the mini-program. The dynamic and static features of the mini-program include at least one of application interface function call information, basic information, and dynamic link information. The category recognition module is configured to perform specific service category recognition on the pre-classified mini-programs and detect the service categories of the mini-programs. The category compliance detection module is configured to compare the current service category of the mini program with the detected service category to complete the category compliance detection of the mini program, wherein the current service category of the mini program is the currently registered service category of the mini program; The category recognition module, after performing service category-specific identification on the pre-classified mini-program and detecting the service category of the mini-program, is configured to extract image and text features of the mini-program; perform word segmentation on the text features, classify them according to the text features, and determine the classification result of the text features; use an image classification model to classify the images loaded on the page and determine the classification result of the image features; and determine the service category of the mini-program based on the classification results of the text features and the classification results of the image features. In this context, when the dynamic and static features of a mini-program include basic information, application programming interface (API) function calls, and dynamic linking information, the pre-classification module, after performing feature processing on the dynamic and static features to complete the pre-classification of the mini-program, is configured to perform feature processing and pre-classification on the basic information to obtain the first classification result; perform feature processing and pre-classification on the API function calls to obtain the second classification result; perform feature processing and pre-classification on the dynamic linking information to obtain the third classification result; and determine the pre-classification result of the mini-program based on the first, second, and third classification results.
10. The applet category detection apparatus according to claim 9, wherein The pre-classification module, after extracting the dynamic and static features of the mini-program, is configured to search for and locate the mini-program to be detected, run the test mini-program to take screenshots of relevant pages, identify the text in the page screenshots, and obtain basic information from the identified text. This basic information includes at least one of the following: mini-program name, mini-program description, and account entity. And / or, it obtains the mini-program's compiled package, obtains the mini-program's source code, and iterates through the mini-program's source code to query application interface function calls. And / or, it uses regular expression matching to obtain dynamic link information, where dynamic link information includes at least one of dynamic links and domain names.
11. The mini-program category detection device according to claim 9, wherein: The pre-classification module, after determining the pre-classification result of the mini-program based on the first classification result, the second classification result, and the third classification result, is configured to find the intersection of the first classification result and the second classification result to obtain the first intersection. Find the intersection of the second classification result and the third classification result to obtain the second intersection; Find the intersection of the first and third classification results to obtain the third intersection; take the union of the first, second, and third intersections as the pre-classification result of the mini-program.
12. The mini-program category detection device according to claim 9, wherein: The pre-classification module, after performing feature processing and pre-classification on the basic information, is configured to perform data preprocessing and word segmentation on the mini-program introduction, data processing on the account subject, and classification on the basic information. And / or, The pre-classification module, after performing feature processing and pre-classification on dynamic link information, is configured to extract link feature information from dynamic links and match the link feature information with the link thesaurus of each category. The feature information includes at least one of suffix, domain name, characters and letters.
13. The applet category detection apparatus according to any one of claims 9 to 12, wherein Image features include images loaded on the page, and text features include at least one of privacy text and page text.
14. The mini-program category detection device according to any one of claims 9-12, wherein: The category compliance detection module is configured to compare the current service category of the mini-program with the detected service category to complete the category compliance detection of the mini-program. If the current service category of the mini program does not include the detected service category, it is determined that there is a violation of category mismatch.
15. The mini-program category detection device according to any one of claims 9-12, further comprising: The detection item determination module is configured to determine the mini-program service category detection items based on the mini-program service category and the mini-program's non-compliance behavior that occurs more frequently than a predetermined value. The mini-program service category detection items are service category detection items that are specifically identified for the pre-classified mini-programs.
16. The mini-program category detection device according to any one of claims 9-12, further comprising: The violation analysis module is configured to analyze non-compliant behaviors of mini programs that occur more frequently than a predetermined value. The non-compliant behaviors of mini programs include at least one of the following: operating services exceeding the current service category, operating content exceeding the current service category, and operating products exceeding the current service category.
17. A mini-program category detection device, comprising: The memory is configured to store instructions; The processor is configured to execute the instructions such that the mini-program category detection device implements the mini-program category detection method as described in any one of claims 1-8.
18. A computer readable storage medium, wherein, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the mini-program category detection method as described in any one of claims 1-8.