Mini-program registration method and device
By automatically operating the mini program registration webpage, filling in and submitting registration information, it solves the problems of complicated WeChat mini program registration process and low manual operation efficiency, realizes a fast and accurate registration process, and meets the needs of large-volume registration.
Patent Information
- Application Number
- CN202111183156.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-11
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2041-10-11
AI Technical Summary
The WeChat applet registration process is complex and manual operations are inefficient, resulting in frequent information filling errors, audit failures, and authentication failures, which increase registration time.
By receiving the mini program registration information of the target application, using the preset registration template to determine relevant parameters, automatically opening and operating the registration webpage, filling in parameters, and submitting information, automatic registration is achieved, reducing operator requirements and ensuring the accuracy of information filling. .
It realizes the automation of mini program registration, shortens registration time, improves registration efficiency, reduces information filling errors, and meets the needs of large-volume registration.
Smart Images

Figure CN113918181B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a method and device for registering a mini-program. Background Art
[0002] With the rapid development of Internet technology, mini programs, as an application method that can be used without downloading and installing, have been promoted in many applications due to their advantages such as low cost, convenience, and excellent user experience. WeChat mini programs are one of the most widely used mini programs.
[0003] When an enterprise or individual registers a WeChat mini program, they need to register on multiple corresponding mini program registration webpages according to the business type involved in the mini program, which involves repeated filling of relevant information such as multiple business processes and business categories, making the registration steps of WeChat mini programs complicated and cumbersome, resulting in a long registration time for WeChat mini programs. Furthermore, enterprises that usually register WeChat mini programs do not understand the registration information filling mechanism of WeChat mini programs, and often make mistakes in filling in information, resulting in failure of registration information review and authentication.
[0004] Therefore, the current WeChat mini program registration has higher requirements for the operator who performs the mini program registration. Since the registration information is still filled in manually, the accuracy of the registration information cannot be guaranteed, which results in a longer WeChat mini program registration time. Summary of the invention
[0005] The present invention provides a mini-program registration method and device, which are used to solve the defects of low efficiency and high requirements for operators in manual operation of WeChat mini-programs. The requirements for operators of mini-program registration can be reduced, the registration information can be filled in correctly, the time for mini-program registration can be shortened, and the efficiency of mini-program registration can be improved.
[0006] In a first aspect, the present invention provides a method for registering a mini-program, the method comprising:
[0007] Receive mini-program registration information of a target application; wherein the mini-program registration information is determined according to a preset mini-program registration template of the target application, and the mini-program registration template includes parameters in various web pages related to the mini-program registration;
[0008] Opening a target webpage related to the mini-program registration of the target application, searching the target webpage, and operating the target webpage according to the search result to obtain the mini-program registration information corresponding to the target webpage, until the mini-program registration information corresponding to each webpage is obtained; wherein the operating the target webpage includes: filling the parameters in the mini-program registration information that match the target webpage into the target webpage;
[0009] Submit the obtained mini-program registration information corresponding to each of the web pages to the mini-program registration platform of the target application.
[0010] According to a mini-program registration method provided by the present invention, searching the target webpage and filling the target webpage with parameters matching the target webpage in the mini-program registration information according to the search result include:
[0011] Reading parameters in the mini program registration information that match the target web page;
[0012] Searching the target web page to determine the parameter filling position in the target web page;
[0013] Fill the read parameters that match the target webpage into the corresponding parameter filling positions in the target webpage.
[0014] According to a mini-program registration method provided by the present invention, the target webpage is searched, and the target webpage is operated according to the search result, and further includes:
[0015] Retrieving the target webpage to determine a button position or an activation link position in the target webpage;
[0016] According to the button position or activation link position, the corresponding button or activation link in the target webpage is clicked.
[0017] According to a mini-program registration method provided by the present invention, the target webpage is searched, and the target webpage is operated according to the search result, and further includes:
[0018] Reading parameters in the mini program registration information that match the target web page;
[0019] Searching the target web page to determine the location of the parameter type option in the target web page;
[0020] According to the read parameters matching the target webpage, the corresponding parameter type option position in the target webpage is selected.
[0021] According to a mini-program registration method provided by the present invention, the opening of a target webpage related to the mini-program registration of the target application further includes:
[0022] Reviewing the received mini program registration information of the target application;
[0023] Determine whether there are any missing or incorrect parameters in the Mini Program registration information based on the review results;
[0024] If there are no missing or erroneous parameters in the mini-program registration data, executing the step of opening the target webpage related to the mini-program registration of the target application;
[0025] If there are missing or incorrect parameters in the mini-program registration information, the missing or incorrect parameters will be displayed until there are no missing or incorrect parameters in the modified mini-program registration information.
[0026] According to a mini program registration method provided by the present invention, the mini program registration information includes text information and picture information;
[0027] The reviewing of the received mini-program registration information of the target application includes:
[0028] Verifying the number of digits of the digital parameter in the text data to obtain a verification digital parameter;
[0029] Based on the recognition of the picture data, the text parameters and / or the digital parameters recognized in the picture data are matched with the corresponding text parameters and / or the verification digital parameters in the text data.
[0030] According to a mini program registration method provided by the present invention, after obtaining the mini program registration information corresponding to each web page, the method further includes:
[0031] Screenshots are taken and saved for each of the web pages obtained after the operation is completed.
[0032] In a second aspect, the present invention further provides a mini-program registration device, the device comprising:
[0033] A receiving module, configured to receive mini-program registration information of a target application; wherein the mini-program registration information is determined according to a preset mini-program registration template of the target application, and the mini-program registration template includes parameters in various web pages related to the mini-program registration;
[0034] An execution module is used to open a target webpage related to the mini-program registration of the target application, search the target webpage, and operate the target webpage according to the search result to obtain the mini-program registration information corresponding to the target webpage, until the mini-program registration information corresponding to each webpage is obtained; wherein the operation on the target webpage includes: filling the parameters in the mini-program registration information that match the target webpage into the target webpage;
[0035] The sending module is used to submit the obtained mini-program registration information corresponding to each of the web pages to the mini-program registration platform of the target application.
[0036] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the mini-program registration methods described above are implemented.
[0037] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the mini-program registration methods described above.
[0038] The mini program registration method and device provided by the present invention receive the mini program registration information of the target application; wherein the mini program registration information is determined according to a pre-set mini program registration template of the target application, and the mini program registration template includes parameters in each web page related to the mini program registration; open the target web page related to the mini program registration of the target application, search the target web page, operate the target web page according to the search result, and obtain the mini program registration information corresponding to the target web page, until the mini program registration information corresponding to each web page is obtained; wherein the operation on the target web page includes: filling the parameters in the mini program registration information that match the target web page into the target web page; submitting the obtained mini program registration information corresponding to each web page to the mini program registration platform of the target application. By using the pre-set mini-program registration template of the target application and preparing the mini-program registration information, the mini-program registration information can be made to meet the requirements of each web page related to the mini-program registration of the target application. By opening each web page related to the mini-program registration of the target application and searching, the parameters in the mini-program registration information that match each web page are filled into the corresponding web page to obtain the mini-program registration information. This can automate the mini-program registration, reduce the requirements for the operator of the mini-program registration, ensure that the registration information is filled in correctly, shorten the time for mini-program registration, improve the efficiency of mini-program registration, and meet the needs of large-scale registration of mini-programs. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 It is a flowchart of a method for registering a mini program provided by the present invention;
[0041] Figure 2 It is a flowchart of another applet registration method provided by the present invention;
[0042] Figure 3 It is a schematic diagram of an application scenario of registering a WeChat mini program according to the mini program registration method provided by the present invention;
[0043] Figure 4 It is a schematic diagram of the composition structure of a mini-program registration device provided by the present invention;
[0044] Figure 5 It is a schematic diagram of the composition structure of another mini-program registration device provided by the present invention;
[0045] Figure 6 It is a schematic diagram of the composition structure of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] The following will be combined Figure 1-Figure 3 The applet registration method of the present invention is described.
[0048] See also Figure 1 , Figure 1 This is a flowchart of a method for registering a small program provided by the present invention. The method for registering a small program can be applied to a small program registration device. The small program registration device can be installed on a server. The server can be a physical server including an independent host, or a virtual server carried by a host cluster, or a cloud server, etc. The embodiment of the present invention does not limit the type of server. Figure 1 As shown, the applet registration method may at least include:
[0049] 101. Receive mini-program registration information of a target application; wherein the mini-program registration information is determined according to a preset mini-program registration template of the target application, and the mini-program registration template includes parameters in various web pages related to mini-program registration.
[0050] In an embodiment of the present invention, the mini program to be registered may be an existing mini program of a target application (Application, App for short) that supports mini programs. For example, the target application may be a social application, a life service application, a financial application, etc. The embodiment of the present invention does not limit the type of the existing target application that supports mini programs. The mini program registration information may be determined based on various web pages related to the mini program registration of the target application, wherein the various web pages related to the mini program registration of the target application may include the mini program registration web page of the target application, and may also include a web page for activating the mini program of the target application, such as a web page of the mailbox used by the user when registering the mini program. The mini program registration template of the target application may be pre-set based on various web pages related to the mini program registration of the target application, so that the mini program registration template of the target application includes the parameters in various web pages related to the mini program registration. The embodiment of the present invention does not limit the type of mini program registration information. For example, the mini program registration information may include text information and picture information, wherein the text information is used to record the basic information of the user, and the picture information is used to authenticate the user.
[0051] Optionally, the mini-program registration information of the target application uploaded by the user can be received through the application software for mini-program registration installed on the user's smart phone; or the mini-program registration information of the target application uploaded by the user can be received by opening a webpage of the World Wide Web (Web) for mini-program registration on the user's computer; or the mini-program registration information can be generated by automatically extracting the registration information selected by the user from the webpage based on the user's selection of the target application based on the registration information previously filled in by the user on the webpage. The embodiment of the present invention does not limit the implementation method of receiving the mini-program registration information of the target application uploaded by the user.
[0052] 102. Open the target web page related to the mini-program registration of the target application, search the target web page, operate the target web page according to the search result, and obtain the mini-program registration information corresponding to the target web page, until the mini-program registration information corresponding to each web page is obtained; wherein, operating the target web page includes: filling the parameters in the mini-program registration information that match the target web page into the target web page.
[0053] In the embodiment of the present invention, an automated operation tool can be used to write a script for registering a small program of a target application, execute the script for registering a small program, simulate the user's operation on the browser, open various web pages related to the registration of the small program of the target application, register the small program, and realize the registration of the small program of the target application. The embodiment of the present invention does not limit the type of automated operation tool and the type of browser. For example, the automated operation tool can be Python+Selenium, etc., and the browser can be Google (Chrome) browser, IE browser, Firefox browser, etc.
[0054] In the process of registering the mini-program, the mini-program registration script can be executed to search for each web page related to the mini-program registration of the target application, and each web page related to the mini-program registration of the target application can be operated according to the search results to obtain the mini-program registration information corresponding to each web page. The operation on the web page includes: filling the parameters in the mini-program registration information into the corresponding web page, so that the browser generates the corresponding mini-program registration information according to the web page with the parameters in the mini-program registration information filled in.
[0055] 103. Submit the obtained mini-program registration information corresponding to each web page to the mini-program registration platform of the target application.
[0056] In an embodiment of the present invention, after obtaining the mini-program registration information corresponding to each web page, the browser will send the mini-program registration information corresponding to each web page to the server of the mini-program registration platform of the target application, so that after receiving the mini-program registration information corresponding to each web page, the server of the mini-program registration platform of the target application will review the received mini-program registration information and feedback the review results, thereby completing the registration of the mini-program.
[0057] Optionally, the server of the mini program registration platform can feedback the review results to the global wide area network web page opened on the user's computer for mini program registration, but the embodiment of the present invention does not limit the way in which the user obtains the mini program registration review results fed back by the server of the mini program registration platform.
[0058] The mini program registration method provided by the embodiment of the present invention receives the mini program registration information of the target application; wherein the mini program registration information is determined according to a pre-set mini program registration template of the target application, and the mini program registration template includes parameters in each web page related to the mini program registration; opens the target web page related to the mini program registration of the target application, searches the target web page, and operates the target web page according to the search result to obtain the mini program registration information corresponding to the target web page, until the mini program registration information corresponding to each web page is obtained; wherein the operation on the target web page includes: filling the parameters in the mini program registration information that match the target web page into the target web page; and submitting the obtained mini program registration information corresponding to each web page to the mini program registration platform of the target application. By using the pre-set mini-program registration template of the target application and preparing the mini-program registration information, the mini-program registration information can be made to meet the requirements of each web page related to the mini-program registration of the target application. By opening each web page related to the mini-program registration of the target application and searching, the parameters in the mini-program registration information that match each web page are filled into the corresponding web page to obtain the mini-program registration information. This can automate the mini-program registration, reduce the requirements for the operator of the mini-program registration, ensure that the registration information is filled in correctly, shorten the time for mini-program registration, improve the efficiency of mini-program registration, and meet the needs of large-scale registration of mini-programs.
[0059] See also Figure 2 , Figure 2 is a flowchart of another applet registration method provided by the present invention, such as Figure 2 As shown, the applet registration method may at least include:
[0060] 201. Receive mini-program registration information of a target application; wherein the mini-program registration information is determined according to a preset mini-program registration template of the target application, and the mini-program registration template includes parameters in various web pages related to mini-program registration.
[0061] Optionally, the mini-program registration template of the target application may be in the form of a spreadsheet. For example, the spreadsheet may be an Excel table, which may include text information and image information. The embodiment of the present invention does not limit the type of spreadsheet used for the mini-program registration template. When a user registers a mini-program of a target application, a spreadsheet in a predetermined format may be provided to the user. The user prepares the information required for the mini-program registration according to the spreadsheet in the predetermined format, and obtains the mini-program registration information of the target application by filling the information required for registration into the spreadsheet. The user uploads the mini-program registration information of the target application to trigger the automated operation tool to register the mini-program of the target application.
[0062] 202. Review the received mini program registration information of the target application.
[0063] Optionally, after the automated operation tool receives the mini program registration information of the target application uploaded by the user, before registering the mini program of the target application, the mini program registration information of the target application uploaded by the user may be reviewed. Optionally, the mini program registration information of the target application may be reviewed based on the type of the mini program registration information of the target application. In some optional embodiments, when the mini program registration information includes text information and picture information, the number of digits of the digital parameters in the text information may be verified to obtain verification digital parameters. For example, for mobile phone numbers, ID card numbers, account numbers of public accounts, etc., the text parameters and / or digital parameters identified in the picture information may be matched with the corresponding text parameters and / or verification digital parameters in the text information based on the recognition of the picture information, such as the company name, business license registration number, etc.
[0064] 203. Based on the audit results, determine whether there are any missing or incorrect parameters in the Mini Program registration information.
[0065] If there are no missing or incorrect parameters in the mini-program registration information, execute 204; otherwise, if there are missing or incorrect parameters in the mini-program registration information, display the missing or incorrect parameters until there are no missing or incorrect parameters in the modified mini-program registration information.
[0066] 204 , executing a step of opening a target webpage related to the applet registration of the target application.
[0067] Optionally, after the automated operation tool reviews the mini program registration information of the target application uploaded by the user and determines whether there are missing or incorrect parameters in the mini program registration information based on the review results, when it is determined that there are no missing or incorrect parameters in the mini program registration information, the target web page related to the mini program registration of the target application is opened through the browser to perform mini program registration; when it is determined that there are missing or incorrect parameters in the mini program registration information, the missing or incorrect parameters are displayed so that the user can supplement or correct the mini program registration information based on the displayed missing or incorrect parameters, and re-upload the supplemented or corrected mini program registration information until there are no missing or incorrect parameters in the modified mini program registration information.
[0068] Among them, if the mini-program registration information of the target application uploaded by the user is received through the application software for mini-program registration installed on the user's smart phone, missing or incorrect parameters can be displayed on the user's smart phone; if the mini-program registration information of the target application uploaded by the user is received through a web page of the global wide area network for mini-program registration opened on the user's computer, missing or incorrect parameters can be displayed on the user's computer. The embodiment of the present invention does not limit the implementation method of displaying missing or incorrect parameters after reviewing the mini-program registration information of the target application.
[0069] In some optional examples, when opening various web pages related to the mini-program registration of the target application through a browser to register the mini-program, the automated operation tool can search the target web page and fill in the parameters matching the target web page in the mini-program registration information according to the search results into the target web page. Optionally, the target web page can be searched by reading the parameters matching the target web page in the mini-program registration information, determining the parameter filling position in the target web page, and filling the read parameters matching the target web page into the corresponding parameter filling position in the target web page.
[0070] In other optional examples, when opening various web pages related to the mini-program registration of the target application through a browser to register the mini-program, the automated operation tool can also search the target web page and click on a button or activation link in the target web page according to the search result. Optionally, the target web page can be searched to determine the button position or activation link position in the target web page, and the corresponding button or activation link in the target web page can be clicked according to the button position or activation link position.
[0071] In some other optional examples, when opening various web pages related to the mini-program registration of the target application through a browser to register the mini-program, the automated operation tool can also search the target web page, and select the parameter type option in the target web page based on the search result and the parameters in the mini-program registration information that match the target web page. Optionally, the target web page can be searched by reading the parameters in the mini-program registration information that match the target web page, determining the position of the parameter type option in the target web page, and clicking the corresponding parameter type option position in the target web page based on the read parameters that match the target web page.
[0072] In specific implementation, depending on the different layouts of the target webpage related to the mini-program registration of the target application, the above three operations may exist in the same target webpage, namely, the operation of filling in the parameters in the mini-program registration information, the operation of clicking a button or activating a link, and the operation of selecting a parameter type option. However, the types of automated operations performed on the target webpage related to the mini-program registration of the target application in the embodiment of the present invention are not limited to the above three operations. Optionally, for some parameters that need to be filled in the target webpage related to the mini-program registration of the target application, such as SMS verification codes, the user is required to manually enter the parameters after obtaining them through a smartphone.
[0073] Optionally, before the automated operation tool opens the target web page related to the mini-program registration of the target application service through the browser and performs the mini-program registration, the automated operation tool may also start the browser. For example, when the mini-program registration information of the target application uploaded by the user is received through the application software for mini-program registration installed on the user's smartphone, the user may not have started the browser on the computer. In this case, the automated operation tool needs to start the browser first, and then open the target web page related to the mini-program registration of the target application service through the browser to perform the mini-program registration.
[0074] Optionally, after the browser obtains the mini-program registration information corresponding to each web page, it can also take screenshots of each web page obtained after the operation is completed through an automated operation tool for later viewing. For example, take screenshots of each web page with the parameters in the mini-program registration information filled in. After taking screenshots of each web page obtained after the operation is completed, the browser can send the mini-program registration information corresponding to each web page to the server of the mini-program registration platform of the target application, so that after receiving the mini-program registration information corresponding to each web page, the server of the mini-program registration platform of the target application will review the received mini-program registration information and feedback the review results to the user. For example, the review results are fed back to the web page of the global wide area network for mini-program registration opened on the user's computer.
[0075] This embodiment reviews the mini-program registration information of the target application after receiving it, so that problems in the mini-program registration information can be discovered in time before registering the mini-program of the target application, and timely supplemented and corrected. This can avoid repeated operations such as multiple modifications and supplements of the registration information when registering the mini-program of the target application, thereby improving the accuracy of information entry and shortening the mini-program registration cycle.
[0076] Figure 3 is a schematic diagram of an application scenario of registering a WeChat mini program according to the mini program registration method provided by the present invention, such as Figure 3 As shown, the figure includes a user, an automated operation tool Python+Selenium, a Google Chrome browser, and a WeChat public platform. Among them, the user uploads the registration information of the mini program and triggers the automated operation tool to start working. For example, the user can upload the registration information of the mini program through a smart phone, and the registration information of the mini program is in the form of an Excel spreadsheet; the automated operation tool reviews the registration information of the mini program uploaded by the user, and notifies the user to resubmit it when the information is found to be wrong or missing; after the mini program registration information uploaded by the user passes the review, the automated operation tool starts the Google Chrome browser, opens the web page related to the registration of the mini program of the WeChat public platform, performs the operation of the mini program registration, and fills in the relevant parameters in the web page according to the registration information of the mini program; in the process of filling in the relevant parameters according to the registration information of the mini program, some parameters need to interact directly with the user, such as SMS verification codes, etc.; after completing the filling of the relevant parameters, the browser generates the mini program registration information, and submits the mini program registration information to the WeChat public platform, waiting for the result of the WeChat public platform's review of the mini program registration information; the WeChat public platform can simultaneously feedback the result of the review of the mini program registration information to the user and Google Chrome.
[0077] Among them, the automation tool Python+Selenium is the core of realizing web page automation. Selenium is a tool for web application testing, which runs directly in the browser, just like a real user, and can simulate various browser operations, such as opening, closing, scrolling, clicking, inputting, submitting, extracting data, etc. When using the automation tool Python+Selenium to realize web page automation, you need to configure the operating environment first. You can open Python's official website, find "Download", select your computer's operating system in its drop-down menu, such as Windows, Mac, etc., and add Python's installation directory, such as C:\Python36, etc., to the environment variable PATH. Generally, Linux platforms already have Python, so there is no need to install it. You can open the "Terminal" and enter the "python" command to verify; install selenium, and enter: C:\Users\name>pip in the Windows command prompt (cmd) / Linux terminal to ensure that the pip command is available. Next, install Selenium through the pip command: C:\Users\name>pip install selenium; install the browser kernel driver webdriver, Chrome's driver chromedriver.exe, pay attention to the browser corresponding driver version, and put the exe program in the python script directory.
[0078] Then, write a Python script to execute the Python script through the automation tool for automated operations to realize the registration of the WeChat applet.
[0079] (1) The following are some functions or commands for the WeChat Mini Program registration script to automatically start Chrome, open web pages, fill in parameters, and submit information.
[0080] from selenium import webdriver
[0081] driver = webdriver.Chrome()
[0082] ##Open the webpage
[0083] driver.get(" https: / / mp.weixin.qq.com / wxopen / waregister?action= step1 ")
[0084] ##Enter the form data at the specified location
[0085] driver.find_element_by_id(" js_email ").send_keys("xxxxxx@163.com")
[0086] driver.find_element_by_id(" pw1 ").send_keys("xxxxxx")
[0087] driver.find_element_by_id(" pw2 ").send_keys("xxxxxx")
[0088] ##Click the button at the specified position
[0089] driver.find_element_by_id(" js_agree ").click()
[0090] ##Submit data
[0091] driver.submit()
[0092] (2) The following are some functions or commands for the WeChat Mini Program registration script to automatically review registration information.
[0093] Reading Excel
[0094] check Mobile phone number
[0095] check ID number, etc.
[0096] Install xlrd library
[0097] pip install xlrd
[0098] Read content
[0099] #coding=utf-8
[0100] import xlrd
[0101] #Open the file
[0102] data=xlrd.open_workbook('file / 2055845434.xlsx')
[0103] #View the worksheet
[0104] data.sheet_names()
[0105] print("sheets:"+str(data.sheet_names()))
[0106] #Get the worksheet through the file name and get basic information
[0107] table = data.sheet_by_name ('Basic Information')
[0108] #Print data.sheet_names() to find that the returned value is a list, and basic information can be obtained by indexing the list.
[0109] #table=data.sheet_by_index(0)
[0110] #Get the number of rows and columns
[0111] #Number of rows: table.nrows
[0112] #Number of columns: table.ncols
[0113] print("Total number of rows: "+str(table.nrows))
[0114] print("Total number of columns: "+str(table.ncols))
[0115] #Get the value of a cell, for example, get the phone number (B3 cell value)
[0116] phone=table.cell(3,2).value
[0117] #Use regular expressions to check the correctness of phone numbers, etc.
[0118] ret=re.match(r"^1
[35678] \d{9}$"
[0119] if!ret
[0120] print("Incorrect mobile number format")
[0121] else:
[0122] print("Mobile phone number: "+telphone)
[0123] Different data requires different regularization validation.
[0124] For example, ID number:
[0125] 18-bit regular expression: / ^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$ /
[0126] 15-bit regular expression: / ^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$ /
[0127] (3) The following are some functions or commands for the WeChat Mini Program registration script to automatically read data during the parameter filling process.
[0128] Same as using the Excel chart data to get the information on the picture at the same time.
[0129] Use pytesseract, dlib, opencv3 and other libraries to extract information from ID card images.
[0130] Need to load library
[0131] %matplotlib inline
[0132] %config InlineBackend.figure_format='retina'
[0133] import pytesseract
[0134] import cv2
[0135] import matplotlib.pyplot as plt
[0136] import dlib
[0137] import matplotlib.patches as mpatches
[0138] from skimage import io,draw,transform,color
[0139] import numpy as np
[0140] import pandas as pd
[0141] import re
[0142] Recognize faces using dlib.get_frontal_face_detector
[0143] detector=dlib.get_frontal_face_detector()
[0144] image=io.imread("ID card.jpeg")
[0145] dets = detector (image, 2) # Use detector for face detection dets is the returned result
[0146] Visualize the recognized images
[0147] plt.figure()
[0148] ax=plt.sub and other operations
[0149] (4) The following are some functions or commands for the WeChat Mini Program registration script to automatically search for web pages during the parameter filling process.
[0150] Read HTML web pages, click submit, select, fill in and other functions,
[0151] Different functions need to be used for positioning according to the layout of the web page.
[0152] id plural location find_elements_by_id()
[0153] name pluralization find_elements_by_name()
[0154] class plural location find_elements_by_class_name()
[0155] Tag plural positioning find_elements_by_tag_name()
[0156] link plural positioning find_elements_by_link_text()
[0157] partial_link plural positioning find_elements_by_partial_link_text()
[0158] xpath plural positioning find_elements_by_xpath()
[0159] Code example:
[0160] from selenium import webdriver
[0161] driver = webdriver.Chrome()
[0162] driver.get("https: / / mp.weixin.qq.com / wxopen / waregister?action=step1")
[0163] driver.find_element_by_id("js_email").send_keys("xxxxxx") / / Text writing
[0164] driver.find_element_by_name("agree").click() / / Click the button to select
[0165] driver.submit() / / Submit the form
[0166] (5) The following are some functions or commands for automatically saving screenshots in the WeChat mini-program registration script.
[0167] #-*-coding:utf-8-*-
[0168] from selenium import webdriver
[0169] import unittest
[0170] import os,sys,time
[0171] from pathlib import Path
[0172] driver = webdriver.Chrome()
[0173] driver.get("https: / / www.processon.com / view / link / 5a815fafe4b064e9ddc3e018")
[0174] pic_path = 'success.png'
[0175] #Capture the image of the current url webpage and save the captured image in the specified path (pic_path)
[0176] driver.save_screenshot(pic_path)
[0177] The mini program registration device provided by the present invention is described below. The mini program registration device described below and the mini program registration method described above can be referenced to each other.
[0178] See also Figure 4 , Figure 4 is a schematic diagram of the composition structure of a mini-program registration device provided by the present invention. Figure 4 The mini-program registration device shown can be installed on a server and can be used to execute Figure 1 , Figure 2 The applet registration method of the server may be a physical server including an independent host, or a virtual server hosted by a host cluster, or a cloud server, etc. Figure 4 As shown, the mini-program registration device 400 at least includes:
[0179] The receiving module 410 is used to receive the mini-program registration information of the target application; wherein the mini-program registration information is determined according to a pre-set mini-program registration template of the target application, and the mini-program registration template includes parameters in various web pages related to the mini-program registration.
[0180] Execution module 420 is used to open the target web page related to the mini-program registration of the target application, search the target web page, operate the target web page according to the search result, and obtain the mini-program registration information corresponding to the target web page, until the mini-program registration information corresponding to each web page is obtained; wherein, operating the target web page includes: filling the parameters in the mini-program registration information that match the target web page into the target web page.
[0181] The sending module 430 is used to submit the obtained mini-program registration information corresponding to each web page to the mini-program registration platform of the target application.
[0182] Optionally, the execution module 420 includes:
[0183] The reading unit is used to read the parameters in the mini program registration information that match the target web page.
[0184] The retrieval unit is used to retrieve the target web page and determine the parameter filling position in the target web page.
[0185] The execution unit is used to fill the read parameters matching the target webpage into the corresponding parameter filling positions in the target webpage.
[0186] Optionally, the retrieval unit is further configured to retrieve the target web page to determine a button position or an activated link position in the target web page.
[0187] The execution unit is further used to click the corresponding button or activation link in the target web page according to the button or activation link position.
[0188] Optionally, the retrieval unit is further configured to retrieve the target web page to determine the location of the parameter type option in the target web page.
[0189] The execution unit is further used to select the corresponding parameter type option position in the target web page according to the read parameters matching the target web page.
[0190] like Figure 5 As shown, the mini-program registration device 400 also includes:
[0191] The review module 440 is used to review the received mini-program registration information of the target application.
[0192] Optionally, the execution module 420 further includes:
[0193] The judgment unit is used to judge whether there are missing and incorrect parameters in the mini program registration information based on the audit results.
[0194] The execution unit is also used to execute the step of opening the target web page related to the mini program registration of the target application according to the judgment result of the judgment unit if there are no missing or incorrect parameters in the mini program registration information.
[0195] The display unit is used to display the missing or incorrect parameters according to the judgment result of the judgment unit if there are missing or incorrect parameters in the mini-program registration information until the missing or incorrect parameters no longer exist in the modified mini-program registration information.
[0196] Optionally, the Mini Program registration information includes text information and picture information;
[0197] Audit module 440, including:
[0198] The verification unit is used to verify the number of digits of the digital parameter in the text data to obtain the verification digital parameter.
[0199] The matching unit is used to match the text parameters and / or digital parameters identified in the picture data with the corresponding text parameters and / or verification digital parameters in the text data based on the identification of the picture data.
[0200] Optionally, the execution module 420 is further configured to take screenshots of each web page obtained after the operation is completed and save them.
[0201] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the applet registration method provided by the above methods, and the method includes:
[0202] Receive mini-program registration information of a target application; wherein the mini-program registration information is determined according to a preset mini-program registration template of the target application, and the mini-program registration template includes parameters in various web pages related to the mini-program registration;
[0203] Opening a target webpage related to the mini-program registration of the target application, searching the target webpage, and operating the target webpage according to the search result to obtain the mini-program registration information corresponding to the target webpage, until the mini-program registration information corresponding to each webpage is obtained; wherein the operating the target webpage includes: filling the parameters in the mini-program registration information that match the target webpage into the target webpage;
[0204] Submit the obtained mini-program registration information corresponding to each of the web pages to the mini-program registration platform of the target application.
[0205] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0206] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer can execute the applet registration method provided by the above methods, the method comprising:
[0207] Receive mini-program registration information of a target application; wherein the mini-program registration information is determined according to a preset mini-program registration template of the target application, and the mini-program registration template includes parameters in various web pages related to the mini-program registration;
[0208] Opening a target webpage related to the mini-program registration of the target application, searching the target webpage, and operating the target webpage according to the search result to obtain the mini-program registration information corresponding to the target webpage, until the mini-program registration information corresponding to each webpage is obtained; wherein the operating the target webpage includes: filling the parameters in the mini-program registration information that match the target webpage into the target webpage;
[0209] Submit the obtained mini-program registration information corresponding to each of the web pages to the mini-program registration platform of the target application.
[0210] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the applet registration method provided by the above methods is implemented, and the method comprises:
[0211] Receive mini-program registration information of a target application; wherein the mini-program registration information is determined according to a preset mini-program registration template of the target application, and the mini-program registration template includes parameters in various web pages related to the mini-program registration;
[0212] Opening a target webpage related to the mini-program registration of the target application, searching the target webpage, and operating the target webpage according to the search result to obtain the mini-program registration information corresponding to the target webpage, until the mini-program registration information corresponding to each webpage is obtained; wherein the operating the target webpage includes: filling the parameters in the mini-program registration information that match the target webpage into the target webpage;
[0213] Submit the obtained mini-program registration information corresponding to each of the web pages to the mini-program registration platform of the target application.
[0214] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0215] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0216] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for registering a mini program. It is characterized in that include: Receive mini-program registration information of a target application; wherein the mini-program registration information is determined according to a preset mini-program registration template of the target application, and the mini-program registration template includes parameters in various web pages related to the mini-program registration; Opening a target webpage related to the mini-program registration of the target application, searching the target webpage, and operating the target webpage according to the search result to obtain the mini-program registration information corresponding to the target webpage, until the mini-program registration information corresponding to each webpage is obtained; wherein the operating the target webpage includes: filling the parameters in the mini-program registration information that match the target webpage into the target webpage; Submitting the obtained mini-program registration information corresponding to each of the web pages to the mini-program registration platform of the target application; The receiving of the mini program registration information of the target application program includes: Based on the registration information previously filled in by the user on the web page, and based on the user's selection of the target application, the registration information selected by the user is automatically extracted from the web page to generate the mini program registration information.
2. The mini program registration method according to claim 1, It is characterized in that The step of searching the target webpage and filling the target webpage with parameters in the mini-program registration information that match the target webpage according to the search result includes: Reading parameters in the mini program registration information that match the target web page; Searching the target web page to determine the parameter filling position in the target web page; Fill the read parameters that match the target webpage into the corresponding parameter filling positions in the target webpage.
3. The mini program registration method according to claim 2, It is characterized in that The searching the target webpage and operating the target webpage according to the search result also includes: Retrieving the target webpage to determine a button position or an activation link position in the target webpage; According to the button position or activation link position, the corresponding button or activation link in the target webpage is clicked.
4. The mini program registration method according to claim 2, It is characterized in that The searching the target webpage and operating the target webpage according to the search result also includes: Reading parameters in the mini program registration information that match the target web page; Searching the target web page to determine the location of the parameter type option in the target web page; According to the read parameters matching the target webpage, the corresponding parameter type option position in the target webpage is selected.
5. The mini program registration method according to any one of claims 1 to 4, It is characterized in that The step of opening a target webpage related to the mini-program registration of the target application further includes: Reviewing the received mini program registration information of the target application; Determine whether there are any missing or incorrect parameters in the Mini Program registration information based on the review results; If there are no missing or erroneous parameters in the mini-program registration data, executing the step of opening the target webpage related to the mini-program registration of the target application; If there are missing or incorrect parameters in the mini-program registration information, the missing or incorrect parameters will be displayed until there are no missing or incorrect parameters in the modified mini-program registration information.
6. The mini program registration method according to claim 5, It is characterized in that The Mini Program registration information includes text information and picture information; The reviewing of the received mini-program registration information of the target application includes: Verifying the number of digits of the digital parameter in the text data to obtain a verification digital parameter; Based on the recognition of the picture data, the text parameters and / or the digital parameters recognized in the picture data are matched with the corresponding text parameters and / or the verification digital parameters in the text data.
7. The mini program registration method according to claim 1, It is characterized in that After obtaining the mini-program registration information corresponding to each webpage, the method further includes: Screenshots are taken and saved for each of the web pages obtained after the operation is completed.
8. A mini program registration device, It is characterized in that include: A receiving module, configured to receive mini-program registration information of a target application; wherein the mini-program registration information is determined according to a preset mini-program registration template of the target application, and the mini-program registration template includes parameters in various web pages related to the mini-program registration; An execution module is used to open a target webpage related to the mini-program registration of the target application, search the target webpage, and operate the target webpage according to the search result to obtain the mini-program registration information corresponding to the target webpage, until the mini-program registration information corresponding to each webpage is obtained; wherein the operation on the target webpage includes: filling the parameters in the mini-program registration information that match the target webpage into the target webpage; A sending module, used to submit the obtained mini-program registration information corresponding to each of the web pages to the mini-program registration platform of the target application; The receiving module is specifically used for: Based on the registration information previously filled in by the user on the web page, and based on the user's selection of the target application, the registration information selected by the user is automatically extracted from the web page to generate the mini program registration information.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the mini-program registration method as described in any one of claims 1 to 7 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the applet registration method as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and system for automatically generating and filling login information
CN101272237A
Java program management method and device, computer apparatus, and storage medium
CN109189499A
Webpage automatic generation method and device, electronic equipment and storage medium
CN109582909A
Cross-border e-commerce platform account registration method and device, terminal and storage medium
CN111475788A
