Mini-program security debugging method, device, mobile terminal and storage medium
By generating URLs when running errors in applets, the configuration parameters of low debugging efficiency and insufficient security in the existing technology are solved, and fast and secure applet debugging and operation efficiency are improved.
Patent Information
- Application Number
- CN202011509998.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-18
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2040-12-18
AI Technical Summary
When a mini program runs an error, it is difficult to debug quickly and securely in the existing technology, and manually modifying the SDK configuration is cumbersome, which affects the operation efficiency.
By detecting errors in running applets, determine the host application, obtain parameter passwords and configuration parameter prefixes, generate URLs to hot update configuration parameters, and refresh the applet page.
It realizes rapid debugging when a mini program runs errors, improves debugging efficiency, ensures the security of mini program runs, and avoids the tedious process of manually modifying code.
Smart Images

Figure CN112527668B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile terminal technology, and in particular to a method, device, mobile terminal and storage medium for secure debugging of a small program. Background Art
[0002] Mini Program is an application that can be used without downloading and installing. It realizes the dream of "applications at your fingertips" and also embodies the concept of "use it and go".
[0003] Some mini programs will run on a dozen or even dozens of apps. Since each app has different functions and code styles, mini programs often have various compatibility issues. App developers have many business needs and sometimes it is inconvenient to help troubleshoot the problem. At this time, SDK development and testing need to modify some SDK configurations, such as the log switch, gesture switch, domain name verification switch, SDK environment, request timeout threshold, host ID, etc., to try to find the cause of the problem.
[0004] In the process of implementing the present invention, the inventors found that after manually modifying the SDK configuration, the host developer is also required to modify the code and repackage it, which is time-consuming and labor-intensive, resulting in reduced operating efficiency of the mini program; and adding functions within the SDK and making direct modifications will cause security issues for the mini program.
[0005] Therefore, how to provide a safe and universal SDK configuration modification solution has become an urgent problem that needs to be solved. Summary of the invention
[0006] In view of the above, it is necessary to propose a method, device, mobile terminal and storage medium for mini-program security debugging, which can quickly debug the mini-program when an error occurs during the mini-program operation and ensure the safe operation of the mini-program.
[0007] A first aspect of the present invention provides a method for secure debugging of an applet, the method comprising:
[0008] When an error is detected in the running of the mini program, determining a host application that carries the running of the mini program;
[0009] Obtaining the prefix of the host application name and obtaining a preset parameter password;
[0010] In response to a first configuration parameter modification instruction input by a user, generating a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction;
[0011] The host application transmits the first URL to the SDK, and the SDK performs a hot update on the first configuration parameter according to the first URL to obtain a first target configuration parameter pair;
[0012] Refresh the page of the mini program according to the first target configuration parameter pair.
[0013] In an optional embodiment, generating the first URL according to the prefix, the parameter password and the first configuration parameter modification instruction includes:
[0014] Parsing the first configuration parameter modification instruction to obtain a parameter value of the first configuration parameter;
[0015] Obtaining log parameters, and defining parameter values of the log parameters as preset values;
[0016] Connecting the log parameter, the parameter value of the log parameter, the first configuration parameter and the parameter value of the first configuration parameter according to a preset operator to obtain a parameter description;
[0017] A first URL is generated based on the prefix, the parameter password and the parameter description in a preset format.
[0018] In an optional embodiment, the hot updating the first configuration parameter according to the first URL by the SDK to obtain the first target configuration parameter pair includes:
[0019] Parsing the first URL through the SDK to obtain a host name and parameter description;
[0020] Determine whether the host name is consistent with the parameter password;
[0021] When it is determined that the host name is consistent with the parameter password, performing a first segmentation on the parameter description according to a preset first operator to obtain a plurality of sub-parameter descriptions;
[0022] Performing a second segmentation on the multiple sub-parameter descriptions according to a preset second operator to obtain multiple configuration parameters and a parameter value of each configuration parameter;
[0023] Obtaining a parameter modification value of a first configuration parameter in the first configuration parameter modification instruction;
[0024] The parameter modification value is used to hot-update the parameter value of the corresponding configuration parameter to obtain a first target configuration parameter pair.
[0025] In an optional embodiment, the method further includes:
[0026] Get multiple historical system logs when other mini-programs run into errors;
[0027] Locating multiple problem points in the multiple historical system logs;
[0028] Extracting multiple key fields from the multiple problem points;
[0029] Configure multiple configuration parameters according to the multiple key fields;
[0030] In response to an instruction to open the mini-program security debugging interface, the multiple configuration parameters are displayed on the mini-program security debugging interface.
[0031] In an optional embodiment, the method further includes:
[0032] When refreshing the page of the mini-program according to the first target configuration parameter fails, receiving a second configuration parameter modification instruction input by a user;
[0033] Generate a second URL according to the prefix, the parameter password and the second configuration parameter modification instruction;
[0034] The host application transmits the second URL to the SDK, and the SDK performs a hot update on the second configuration parameter according to the second URL to obtain a second target configuration parameter pair;
[0035] Refresh the page of the mini program according to the second target configuration parameter pair.
[0036] In an optional embodiment, the method further includes:
[0037] Obtaining a refresh result of refreshing the page of the mini program;
[0038] storing the refresh result and the corresponding target configuration parameter in association;
[0039] Calculating the number of target configuration parameters corresponding to the refresh result being the first refresh result;
[0040] Common problem points are determined according to the number of the target configuration parameters.
[0041] In an optional embodiment, the method further includes:
[0042] In response to a start instruction of the mini-program, obtaining an update time of the mini-program;
[0043] Determining whether the mini program needs to be updated according to the update time;
[0044] When it is determined according to the update time that the mini program needs to be updated, an update package of the mini program is downloaded, and the mini program is updated according to the update package when the mini program is started next time.
[0045] A second aspect of the present invention provides a small program security debugging device, the device comprising:
[0046] A carrier module, used to determine a host application that carries the mini-program when an error is detected in the mini-program operation;
[0047] An acquisition module, used to acquire the prefix of the name of the host application and acquire a preset parameter password;
[0048] A generating module, configured to generate a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction in response to a first configuration parameter modification instruction input by a user;
[0049] An update module, configured to transmit the first URL to the SDK through the host application, and to perform a hot update on the first configuration parameter according to the first URL through the SDK to obtain a first target configuration parameter pair;
[0050] A refresh module is used to refresh the page of the mini program according to the first target configuration parameter.
[0051] A third aspect of the present invention provides a mobile terminal, the mobile terminal comprising a processor, the processor being configured to implement the applet security debugging method when executing a computer program stored in a memory.
[0052] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the applet security debugging method when executed by a processor.
[0053] In summary, the mini-program security debugging method, device, mobile terminal and storage medium described in the present invention, when an error occurs during the operation of the mini-program, determines the prefix of the name of the host application that carries the mini-program, and generates a first URL according to the prefix, a preset parameter password and the first configuration parameter modification instruction in response to a first configuration parameter modification instruction input by the user, and then passes the first URL to the SDK through the host application, so that the SDK performs a hot update on the first configuration parameter according to the first URL to obtain a first target configuration parameter pair, thereby allowing the mobile terminal to refresh the page of the mini-program according to the first target configuration parameter pair. When an error occurs during the operation of the mini-program, the present invention dynamically modifies the configuration parameters of the mini-program through parameter passwords, has high debugging efficiency for the mini-program, does not require code modification through the host application, and improves the security of the mini-program. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flowchart of the small program security debugging method provided in Example 1 of the present invention.
[0055] Figure 2 It is a structural diagram of the small program security debugging device provided in Example 2 of the present invention.
[0056] Figure 3 It is a structural diagram of a mobile terminal provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0057] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0059] The mini-program security debugging method provided in the embodiment of the present invention is executed by a mobile terminal, and accordingly, the mini-program security debugging device runs in the mobile terminal.
[0060] Figure 1 This is a flowchart of a small program security debugging method provided in Embodiment 1 of the present invention. The small program security debugging method specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0061] S11, when an error is detected in the running of the mini program, determining a host application that carries the running of the mini program.
[0062] Among them, the host application refers to the application that provides the operating environment for the mini program, so that the mini program can run on the mobile terminal relying on the host application. The host application is, for example, Baidu Mobile. Multiple mini programs can run in a host application, for example, mini program Y1 and mini program Y2 run in host application XX1. A mini program can run in multiple host applications, for example, mini program Y3 can run in host application XX2 and host application XX3.
[0063] A mini program is an application that can be used without downloading and installing, and can run in different application environments (i.e. hosts), such as web browser applications, instant messaging applications, etc.
[0064] The mobile terminal can detect whether an error occurs during the running of the mini program through the throws Exception method. When an error occurs during the running of the mini program, the mobile terminal determines the host application that provides the running environment for the mini program.
[0065] S12, obtaining the prefix of the name of the host application and obtaining a preset parameter password.
[0066] A parameter password is pre-stored in the mobile terminal, and is used to modify the configuration parameters according to the parameter password.
[0067] The parameter password may be refreshConfig.
[0068] In other embodiments, a parameter password table may also be pre-stored in the mobile terminal, in which the prefix of the name of the host application and the corresponding parameter password table are recorded. The parameter password table is matched with the parameter password table corresponding to the prefix of the name of the host application. Different parameter password tables are set for different host applications, so that when the mini program runs in multiple host applications at the same time and errors occur, the parameter configurations of different host applications can be modified according to different parameter password tables. For example, the WeChat mini program runs in host application XX1 and host application XX2 at the same time. If the WeChat mini program fails in these two host applications at the same time, the mobile terminal can obtain the parameter password P1 corresponding to the prefix of the name of the host application XX1 and the parameter password P2 corresponding to the prefix of the name of the host application XX2, and the configuration parameters of the host application XX1 can be modified through the parameter password P1, and the configuration parameters of the host application XX2 can be modified through the parameter password P2.
[0069] S13, in response to a first configuration parameter modification instruction input by a user, generating a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction.
[0070] The host application can be invoked by a prefix (scheme). Different schemes can invoke different hosts. The scheme can be followed by parameters to form a URL.
[0071] The user can click or touch the mini-program security debugging function icon on the mobile terminal to trigger the mini-program security debugging function, thereby displaying the mini-program security debugging interface on the mobile terminal.
[0072] The user may input a first configuration parameter modification instruction in the mini-program security debugging interface, so that the mobile terminal generates a first URL according to the first configuration parameter modification instruction.
[0073] In an optional embodiment, generating the first URL according to the prefix, the parameter password and the first configuration parameter modification instruction includes:
[0074] Parsing the first configuration parameter modification instruction to obtain a parameter value of the first configuration parameter;
[0075] Obtaining log parameters, and defining parameter values of the log parameters as preset values;
[0076] Connecting the log parameter, the parameter value of the log parameter, the first configuration parameter and the parameter value of the first configuration parameter according to a preset operator to obtain a parameter description;
[0077] A first URL is generated based on the prefix, the parameter password and the parameter description in a preset format.
[0078] Among them, the preset operators are "=" and "&", the operator "=" is an assignment symbol, and the operator "&" is a connection symbol.
[0079] Exemplarily, assuming that the first configuration parameter obtained by the mobile terminal parsing the first configuration parameter modification instruction is enableCheckDomain and the parameter value of the first configuration parameter is 0, the log parameter defined by the mobile terminal is enableLog and the parameter value of the log parameter is 1, the parameter password is refreshConfig, and the prefix of the host application name is Yiqianbao, then the parameter description obtained by connecting the log parameter, the parameter value of the log parameter, the first configuration parameter and the parameter value of the first configuration parameter according to the preset operator is enableLog=1&enableCheckDomain=0. Then, the first URL generated by the mobile terminal based on the prefix, the parameter password and the parameter description in a preset format is: Yiqianbao: / / refreshConfig?enableLog=1&enableCheckDomain=0.
[0080] In other embodiments, it is also possible that the parameter value of the log parameter does not need to be defined in advance as a preset value. That is, the mobile terminal may not need to include the log parameter in the first URL generated according to the prefix, the parameter password and the first configuration parameter modification instruction.
[0081] In this optional embodiment, by specifying the parameter value of the log parameter as a preset value (for example, 1), and including the log parameter and the parameter value of the log parameter in the generated first URL, when the mobile terminal executes the operation of opening the system log according to the first URL, the system log is printed out and displayed to the user, so that the user can quickly locate the problem point of the mini-program running error according to the system log, and avoid the user from manually entering the log parameter and the parameter value of the log parameter when the mini-program runs wrong and performs security debugging of the mini-program. Therefore, the generation efficiency of the first URL is improved, and the efficiency of security debugging of the mini-program is further improved.
[0082] S14, delivering the first URL to the SDK through the host application, and hot updating the first configuration parameter according to the first URL through the SDK to obtain a first target configuration parameter pair.
[0083] Due to some business needs, after the host is invoked through the scheme, the host will pass the URL to the SDK for processing, such as launching a specified mini-program.
[0084] In an optional embodiment, the hot updating the first configuration parameter according to the first URL by the SDK to obtain the first target configuration parameter pair includes:
[0085] Parsing the first URL through the SDK to obtain a host name and parameter description;
[0086] Determine whether the host name is consistent with the parameter password;
[0087] When it is determined that the host name is consistent with the parameter password, performing a first segmentation on the parameter description according to a preset first operator to obtain a plurality of sub-parameter descriptions;
[0088] Performing a second segmentation on the multiple sub-parameter descriptions according to a preset second operator to obtain multiple configuration parameters and a parameter value of each configuration parameter;
[0089] Obtaining a parameter modification value of a first configuration parameter in the first configuration parameter modification instruction;
[0090] The parameter modification value is used to hot-update the parameter value of the corresponding configuration parameter to obtain a first target configuration parameter pair.
[0091] For example, the Yiqianbao mentioned above is the scheme of Yiqianbao. Yiqianbao can be used to call Yiqianbao, and then Yiqianbao will pass the first URL to the SDK, and the SDK will parse the first URL to obtain the host name and parameter description. Among them, the host name is refreshConfig, which matches the previously defined password, and the SDK will perform a hot update configuration parameter operation.
[0092] For example, assuming that the first URL is Yiqianbao: / / refreshConfig?enableLog=1&weChatId=AA, the mobile terminal obtains the parameter description in the first URL as enableLog=1&weChatId=AA, and then uses the preset first operator "&" to perform the first segmentation, obtaining the first sub-parameter description enableLog=1 and the second sub-parameter description weChatId=AA, and then uses the preset second operator "=" to perform the second segmentation, obtaining the configuration parameter enableLog parameter value 1 and the configuration parameter weChatId parameter value AA. Assuming that the parameter modification value of the first configuration parameter weChatId in the first configuration parameter modification instruction input by the user is BB, the first target configuration parameter pair obtained is (weChatId, BB).
[0093] When the mobile terminal determines that the host name is inconsistent with the parameter password, it indicates that the first URL received by the SDK is not obtained according to the first parameter configuration instruction input by the user, and no operation may be performed.
[0094] S15: Refresh the page of the mini program according to the first target configuration parameter.
[0095] The mobile terminal may pre-set a time period, and automatically refresh the page of the mini program according to the first target configuration parameter pair within the preset time period after detecting that the SDK performs a hot update on the first configuration parameter according to the first URL to obtain the first target configuration parameter pair. The mobile terminal may also, upon receiving a refresh instruction for the page of the mini program, respond to the refresh instruction and refresh the page of the mini program according to the first target configuration parameter pair.
[0096] For example, suppose that the mini program encounters an error when displaying a certain picture, and the name of the picture displayed in error is the first name. In response to the name configuration parameter modification instruction of the picture input by the user, the mobile terminal generates a first URL, and the host application passes the first URL to the SDK. The SDK hot updates the name configuration parameters of the picture according to the first URL to obtain the name target configuration parameters of the picture. The name of the picture corresponding to the name target configuration parameters of the picture is the second name. When the refresh instruction of the page of the mini program is received, the picture corresponding to the second name is displayed according to the name target configuration parameters of the picture.
[0097] In an optional embodiment, the method further includes:
[0098] When refreshing the page of the mini-program according to the first target configuration parameter fails, receiving a second configuration parameter modification instruction input by a user;
[0099] Generate a second URL according to the prefix, the parameter password and the second configuration parameter modification instruction;
[0100] The host application transmits the second URL to the SDK, and the SDK performs a hot update on the second configuration parameter according to the second URL to obtain a second target configuration parameter pair;
[0101] Refresh the page of the mini program according to the second target configuration parameter pair.
[0102] When the page refresh of the mini-program fails according to the first target configuration parameter, it indicates that the configuration parameters corresponding to the first configuration parameter modification instruction input by the user cannot achieve hot update of the configuration parameters of the mini-program and cannot solve the problem of mini-program running errors. The mobile terminal may need to use a trial and error method to try to modify the configuration parameters one by one.
[0103] After receiving the second configuration parameter modification instruction input by the user, the second target configuration parameter pair is obtained according to the process corresponding to the first configuration parameter modification instruction, and the page of the mini-program is refreshed according to the second target configuration parameter pair. Afterwards, the refresh result of refreshing the page of the mini-program according to the second target configuration parameter pair is obtained. If the refresh fails, it indicates that the configuration parameters corresponding to the second configuration parameter modification instruction input by the user cannot achieve hot update of the configuration parameters of the mini-program, and cannot solve the problem of errors in the operation of the mini-program. The user can enter a third configuration parameter modification instruction to modify the configuration parameters of the mini-program. If the refresh is successful, it indicates that the configuration parameters corresponding to the second configuration parameter modification instruction input by the user can achieve hot update of the configuration parameters of the mini-program, can solve the problem of errors in the operation of the mini-program, and make the mini-program run normally.
[0104] In an optional embodiment, before S11, the method further includes:
[0105] Get multiple historical system logs when other mini-programs run into errors;
[0106] Locating multiple problem points in the multiple historical system logs;
[0107] Extracting multiple key fields from the multiple problem points;
[0108] Configure multiple configuration parameters according to the multiple key fields;
[0109] In response to an instruction to open the mini-program security debugging interface, the multiple configuration parameters are displayed on the mini-program security debugging interface.
[0110] The mobile terminal may obtain multiple historical system logs when other mini-programs or the mini-programs run in error, and may also receive multiple historical system logs when mini-programs run in error sent by other mobile terminals.
[0111] The system log records the occurrence time, access source, etc. of all events. When an event goes wrong, it will be identified by a specific identifier. The specific identifier can be used to quickly locate the problem point in the system log, and the configuration parameters can be configured by extracting the key fields in the problem point.
[0112] The configuration parameters may include a log switch, a gesture switch, a domain name verification switch, an SDK environment, a request timeout threshold, a host ID, etc.
[0113] In this optional embodiment, all possible error points during the operation of the mini-program can be determined through historical system logs, and configuration parameters can be configured based on the problem points, making the configuration parameters more comprehensive and accurate, which can improve the configuration efficiency of the configuration parameters; displaying multiple configuration parameters on the mini-program security debugging interface can serve as a prompt for the user, making it easier for the user to quickly configure the host application based on multiple configuration parameters.
[0114] In an optional embodiment, the method further includes:
[0115] Obtaining a refresh result of refreshing the page of the mini program;
[0116] storing the refresh result and the corresponding target configuration parameter in association;
[0117] Calculating the number of target configuration parameters corresponding to the refresh result being the first refresh result;
[0118] Common problem points are determined according to the number of the target configuration parameters.
[0119] Among them, the refresh result includes a first result and a second result. The first result is used to indicate that the page refresh of the mini program is successful, that is, the mobile terminal can run the mini program normally, and the second result is used to indicate that the page refresh of the mini program fails, that is, the mobile terminal still cannot run the mini program normally.
[0120] The first target configuration parameter pair and the corresponding refresh result, and the second target configuration parameter pair and the corresponding refresh result are associated and stored in a local database of the mobile terminal.
[0121] When the amount of data in the local database of the mobile terminal exceeds the preset data amount threshold, the target configuration parameters corresponding to the first refresh result in the local database are obtained, and the number of the obtained target configuration parameters is calculated. The more the number of target configuration parameters, the more likely it is that most of the mini-program errors are due to configuration errors corresponding to the target configuration parameters, which is a common problem point; the fewer the number of target mini-program parameters, the less likely it is that the mini-program errors are due to configuration errors corresponding to the target configuration parameters, which is an occasional problem point.
[0122] In this optional embodiment, the number of target configuration parameters corresponding to the refresh result being the first refresh result is calculated, and the common problem points are determined according to the number of target configuration parameters, that is, the common problem points are determined by statistical means, and the determination of the common problem points is more objective and has a higher accuracy rate. The common problem points are determined so that they can serve as a warning when the user configures the configuration parameters of the mini-program, avoiding errors in the configuration parameters of the mini-program, which causes the mini-program to fail to operate normally, thereby improving the operating efficiency of the mini-program.
[0123] In an optional embodiment, the method further includes:
[0124] In response to a start instruction of the mini-program, obtaining an update time of the mini-program;
[0125] Determining whether the mini program needs to be updated according to the update time;
[0126] When it is determined according to the update time that the mini program needs to be updated, an update package of the mini program is downloaded, and the mini program is updated according to the update package when the mini program is started next time.
[0127] The mobile terminal calculates the time difference between the update time and the current time, and determines whether the time difference is greater than a preset difference threshold. When the time difference is greater than the preset difference threshold, indicating that the mini program has not been updated for a long time, the update package of the mini program is downloaded. When the time difference is less than or equal to the preset difference threshold, indicating that the update time of the mini program is not long, there is no need to download the update package of the mini program.
[0128] In this optional embodiment, when it is determined that the mini program needs to be updated, the update package of the mini program is downloaded so that the mini program can be updated according to the update package when the mini program is started next time. This can not affect the use of the mini program by the user of the mobile terminal and can update the mini program to the latest status.
[0129] The method provided by the present invention determines the prefix of the name of the host application that carries the mini-program when an error occurs during the operation of the mini-program, generates a first URL according to the prefix, a preset parameter password and the first configuration parameter modification instruction in response to a first configuration parameter modification instruction input by the user, and then passes the first URL to the SDK through the host application, so that the SDK performs a hot update on the first configuration parameter according to the first URL to obtain a first target configuration parameter pair, thereby allowing the mobile terminal to refresh the page of the mini-program according to the first target configuration parameter pair. When an error occurs during the operation of the mini-program, the present invention dynamically modifies the configuration parameters of the mini-program through parameter passwords, has high debugging efficiency for the mini-program, does not require code modification through the host application, and improves the security of the mini-program.
[0130] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned multiple configuration parameters, the above-mentioned multiple configuration parameters can be stored in the nodes of the blockchain.
[0131] Figure 2 It is a structural diagram of the small program security debugging device provided in Example 2 of the present invention.
[0132] In some embodiments, the applet security debugging device 20 may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the applet security debugging device 20 may be stored in the memory of the mobile terminal and executed by at least one processor to execute (see Figure 1 Description) Mini-program security debugging function.
[0133] In this embodiment, the applet security debugging device 20 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a carrier module 201, an acquisition module 202, a generation module 203, an update module 204, a refresh module 205, a display module 206, a calculation module 207 and a download module 208. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0134] The carrying module 201 is used to determine the host application that carries the applet when an error is detected in the applet operation.
[0135] Among them, the host application refers to the application that provides the operating environment for the mini program, so that the mini program can run on the mobile terminal relying on the host application. The host application is, for example, Baidu Mobile. Multiple mini programs can run in a host application, for example, mini program Y1 and mini program Y2 run in host application XX1. A mini program can run in multiple host applications, for example, mini program Y3 can run in host application XX2 and host application XX3.
[0136] A mini program is an application that can be used without downloading and installing, and can run in different application environments (i.e. hosts), such as web browser applications, instant messaging applications, etc.
[0137] The mobile terminal can detect whether an error occurs during the running of the mini program through the throws Exception method. When an error occurs during the running of the mini program, the mobile terminal determines the host application that provides the running environment for the mini program.
[0138] The acquisition module 202 is used to acquire the prefix of the name of the host application and acquire a preset parameter password.
[0139] A parameter password is pre-stored in the mobile terminal, and is used to modify the configuration parameters according to the parameter password.
[0140] The parameter password may be refreshConfig.
[0141] In other embodiments, a parameter password table may also be pre-stored in the mobile terminal, in which the prefix of the name of the host application and the corresponding parameter password table are recorded. The parameter password table is matched with the parameter password table corresponding to the prefix of the name of the host application. Different parameter password tables are set for different host applications, so that when the mini program runs in multiple host applications at the same time and errors occur, the parameter configurations of different host applications can be modified according to different parameter password tables. For example, the WeChat mini program runs in host application XX1 and host application XX2 at the same time. If the WeChat mini program fails in these two host applications at the same time, the mobile terminal can obtain the parameter password P1 corresponding to the prefix of the name of the host application XX1 and the parameter password P2 corresponding to the prefix of the name of the host application XX2, and the configuration parameters of the host application XX1 can be modified through the parameter password P1, and the configuration parameters of the host application XX2 can be modified through the parameter password P2.
[0142] The generating module 203 is used to generate a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction in response to a first configuration parameter modification instruction input by a user.
[0143] The host application can be invoked by a prefix (scheme). Different schemes can invoke different hosts. The scheme can be followed by parameters to form a URL.
[0144] The user can click or touch the mini-program security debugging function icon on the mobile terminal to trigger the mini-program security debugging function, thereby displaying the mini-program security debugging interface on the mobile terminal.
[0145] The user may input a first configuration parameter modification instruction in the mini-program security debugging interface, so that the mobile terminal generates a first URL according to the first configuration parameter modification instruction.
[0146] In an optional embodiment, the generating module 203 generates the first URL according to the prefix, the parameter password and the first configuration parameter modification instruction, including:
[0147] Parsing the first configuration parameter modification instruction to obtain a parameter value of the first configuration parameter;
[0148] Obtaining log parameters, and defining parameter values of the log parameters as preset values;
[0149] Connecting the log parameter, the parameter value of the log parameter, the first configuration parameter and the parameter value of the first configuration parameter according to a preset operator to obtain a parameter description;
[0150] A first URL is generated based on the prefix, the parameter password and the parameter description in a preset format.
[0151] Among them, the preset operators are "=" and "&", the operator "=" is an assignment symbol, and the operator "&" is a connection symbol.
[0152] Exemplarily, assuming that the first configuration parameter obtained by the mobile terminal parsing the first configuration parameter modification instruction is enableCheckDomain and the parameter value of the first configuration parameter is 0, the log parameter defined by the mobile terminal is enableLog and the parameter value of the log parameter is 1, the parameter password is refreshConfig, and the prefix of the host application name is Yiqianbao, then the parameter description obtained by connecting the log parameter, the parameter value of the log parameter, the first configuration parameter and the parameter value of the first configuration parameter according to the preset operator is enableLog=1&enableCheckDomain=0. Then, the first URL generated by the mobile terminal based on the prefix, the parameter password and the parameter description in a preset format is: Yiqianbao: / / refreshConfig?enableLog=1&enableCheckDomain=0.
[0153] In other embodiments, it is also possible that the parameter value of the log parameter does not need to be defined in advance as a preset value. That is, the mobile terminal may not need to include the log parameter in the first URL generated according to the prefix, the parameter password and the first configuration parameter modification instruction.
[0154] In this optional embodiment, by specifying the parameter value of the log parameter as a preset value (for example, 1), and including the log parameter and the parameter value of the log parameter in the generated first URL, when the mobile terminal executes the operation of opening the system log according to the first URL, the system log is printed out and displayed to the user, so that the user can quickly locate the problem point of the mini-program running error according to the system log, and avoid the user from manually entering the log parameter and the parameter value of the log parameter when the mini-program runs wrong and performs security debugging of the mini-program. Therefore, the generation efficiency of the first URL is improved, and the efficiency of security debugging of the mini-program is further improved.
[0155] The updating module 204 is used to transmit the first URL to the SDK through the host application, and to perform a hot update on the first configuration parameter according to the first URL through the SDK to obtain a first target configuration parameter pair.
[0156] Due to some business needs, after the host is invoked through the scheme, the host will pass the URL to the SDK for processing, such as launching a specified mini-program.
[0157] In an optional embodiment, the updating module 204 performs hot updating on the first configuration parameter according to the first URL through the SDK to obtain the first target configuration parameter pair, including:
[0158] Parsing the first URL through the SDK to obtain a host name and parameter description;
[0159] Determine whether the host name is consistent with the parameter password;
[0160] When it is determined that the host name is consistent with the parameter password, performing a first segmentation on the parameter description according to a preset first operator to obtain a plurality of sub-parameter descriptions;
[0161] Performing a second segmentation on the multiple sub-parameter descriptions according to a preset second operator to obtain multiple configuration parameters and a parameter value of each configuration parameter;
[0162] Obtaining a parameter modification value of a first configuration parameter in the first configuration parameter modification instruction;
[0163] The parameter modification value is used to hot-update the parameter value of the corresponding configuration parameter to obtain a first target configuration parameter pair.
[0164] For example, the Yiqianbao mentioned above is the scheme of Yiqianbao. Yiqianbao can be used to call Yiqianbao, and then Yiqianbao will pass the first URL to the SDK, and the SDK will parse the first URL to obtain the host name and parameter description. Among them, the host name is refreshConfig, which matches the previously defined password, and the SDK will perform a hot update configuration parameter operation.
[0165] For example, assuming that the first URL is Yiqianbao: / / refreshConfig?enableLog=1&weChatId=AA, the mobile terminal obtains the parameter description in the first URL as enableLog=1&weChatId=AA, and then uses the preset first operator "&" to perform the first segmentation, obtaining the first sub-parameter description enableLog=1 and the second sub-parameter description weChatId=AA, and then uses the preset second operator "=" to perform the second segmentation, obtaining the configuration parameter enableLog parameter value 1 and the configuration parameter weChatId parameter value AA. Assuming that the parameter modification value of the first configuration parameter weChatId in the first configuration parameter modification instruction input by the user is BB, the first target configuration parameter pair obtained is (weChatId, BB).
[0166] When the mobile terminal determines that the host name is inconsistent with the parameter password, it indicates that the first URL received by the SDK is not obtained according to the first parameter configuration instruction input by the user, and no operation may be performed.
[0167] The refresh module 205 is used to refresh the page of the mini program according to the first target configuration parameter.
[0168] The mobile terminal may pre-set a time period, and automatically refresh the page of the mini program according to the first target configuration parameter pair within the preset time period after detecting that the SDK performs a hot update on the first configuration parameter according to the first URL to obtain the first target configuration parameter pair. The mobile terminal may also, upon receiving a refresh instruction for the page of the mini program, respond to the refresh instruction and refresh the page of the mini program according to the first target configuration parameter pair.
[0169] For example, suppose that the mini program encounters an error when displaying a certain picture, and the name of the picture displayed in error is the first name. In response to the name configuration parameter modification instruction of the picture input by the user, the mobile terminal generates a first URL, and the host application passes the first URL to the SDK. The SDK hot updates the name configuration parameters of the picture according to the first URL to obtain the name target configuration parameters of the picture. The name of the picture corresponding to the name target configuration parameters of the picture is the second name. When the refresh instruction of the page of the mini program is received, the picture corresponding to the second name is displayed according to the name target configuration parameters of the picture.
[0170] In an optional embodiment, the generation module 203 is also used to receive a second configuration parameter modification instruction input by the user when refreshing the page of the mini program according to the first target configuration parameter fails; and generate a second URL according to the prefix, the parameter password and the second configuration parameter modification instruction.
[0171] The updating module 204 is further configured to transmit the second URL to the SDK through the host application, and to perform a hot update on the second configuration parameter according to the second URL through the SDK to obtain a second target configuration parameter pair.
[0172] The refresh module 205 is further configured to refresh the page of the mini program according to the second target configuration parameter.
[0173] When the page refresh of the mini-program fails according to the first target configuration parameter, it indicates that the configuration parameters corresponding to the first configuration parameter modification instruction input by the user cannot achieve hot update of the configuration parameters of the mini-program and cannot solve the problem of mini-program running errors. The mobile terminal may need to use a trial and error method to try to modify the configuration parameters one by one.
[0174] After receiving the second configuration parameter modification instruction input by the user, the second target configuration parameter pair is obtained according to the process corresponding to the first configuration parameter modification instruction, and the page of the mini-program is refreshed according to the second target configuration parameter pair. Afterwards, the refresh result of refreshing the page of the mini-program according to the second target configuration parameter pair is obtained. If the refresh fails, it indicates that the configuration parameters corresponding to the second configuration parameter modification instruction input by the user cannot achieve hot update of the configuration parameters of the mini-program, and cannot solve the problem of errors in the operation of the mini-program. The user can enter a third configuration parameter modification instruction to modify the configuration parameters of the mini-program. If the refresh is successful, it indicates that the configuration parameters corresponding to the second configuration parameter modification instruction input by the user can achieve hot update of the configuration parameters of the mini-program, can solve the problem of errors in the operation of the mini-program, and make the mini-program run normally.
[0175] The display module 206 is used to obtain multiple historical system logs when other mini-programs run into errors;
[0176] Locate multiple problem points in the multiple historical system logs; extract multiple key fields in the multiple problem points; configure multiple configuration parameters according to the multiple key fields; and display the multiple configuration parameters on the mini-program security debugging interface in response to an instruction to open the mini-program security debugging interface.
[0177] The mobile terminal may obtain multiple historical system logs when other mini-programs or the mini-programs run in error, and may also receive multiple historical system logs when mini-programs run in error sent by other mobile terminals.
[0178] The system log records the occurrence time, access source, etc. of all events. When an event goes wrong, it will be identified by a specific identifier. The specific identifier can be used to quickly locate the problem point in the system log, and the configuration parameters can be configured by extracting the key fields in the problem point.
[0179] The configuration parameters may include a log switch, a gesture switch, a domain name verification switch, an SDK environment, a request timeout threshold, a host ID, etc.
[0180] In this optional embodiment, all possible error points during the operation of the mini-program can be determined through historical system logs, and configuration parameters can be configured based on the problem points, making the configuration parameters more comprehensive and accurate, which can improve the configuration efficiency of the configuration parameters; displaying multiple configuration parameters on the mini-program security debugging interface can serve as a prompt for the user, making it easier for the user to quickly configure the host application based on multiple configuration parameters.
[0181] The calculation module 207 is also used to obtain the refresh result of refreshing the page of the mini program; associate and store the refresh result and the corresponding target configuration parameters; calculate the number of target configuration parameters corresponding to the refresh result as the first refresh result; and determine common problem points based on the number of target configuration parameters.
[0182] Among them, the refresh result includes a first result and a second result. The first result is used to indicate that the page refresh of the mini program is successful, that is, the mobile terminal can run the mini program normally, and the second result is used to indicate that the page refresh of the mini program fails, that is, the mobile terminal still cannot run the mini program normally.
[0183] The first target configuration parameter pair and the corresponding refresh result, and the second target configuration parameter pair and the corresponding refresh result are associated and stored in a local database of the mobile terminal.
[0184] When the amount of data in the local database of the mobile terminal exceeds the preset data amount threshold, the target configuration parameters corresponding to the first refresh result in the local database are obtained, and the number of the obtained target configuration parameters is calculated. The more the number of target configuration parameters, the more likely it is that most of the mini-program errors are due to configuration errors corresponding to the target configuration parameters, which is a common problem point; the fewer the number of target mini-program parameters, the less likely it is that the mini-program errors are due to configuration errors corresponding to the target configuration parameters, which is an occasional problem point.
[0185] In this optional embodiment, the number of target configuration parameters corresponding to the refresh result being the first refresh result is calculated, and the common problem points are determined according to the number of target configuration parameters, that is, the common problem points are determined by statistical means, and the determination of the common problem points is more objective and has a higher accuracy rate. The common problem points are determined so that they can serve as a warning when the user configures the configuration parameters of the mini-program, avoiding errors in the configuration parameters of the mini-program, which causes the mini-program to fail to operate normally, thereby improving the operating efficiency of the mini-program.
[0186] The download module 208 is used to obtain the update time of the mini program in response to the startup instruction of the mini program; determine whether the mini program needs to be updated based on the update time; when it is determined that the mini program needs to be updated based on the update time, download the update package of the mini program, and update the mini program according to the update package when the mini program is started next time.
[0187] The mobile terminal calculates the time difference between the update time and the current time, and determines whether the time difference is greater than a preset difference threshold. When the time difference is greater than the preset difference threshold, indicating that the mini program has not been updated for a long time, the update package of the mini program is downloaded. When the time difference is less than or equal to the preset difference threshold, indicating that the update time of the mini program is not long, there is no need to download the update package of the mini program.
[0188] In this optional embodiment, when it is determined that the mini program needs to be updated, the update package of the mini program is downloaded so that the mini program can be updated according to the update package when the mini program is started next time. This can not affect the use of the mini program by the user of the mobile terminal and can update the mini program to the latest status.
[0189] The device provided by the present invention determines the prefix of the name of the host application that carries the mini-program when an error occurs during the operation of the mini-program, generates a first URL according to the prefix, a preset parameter password and the first configuration parameter modification instruction in response to a first configuration parameter modification instruction input by the user, and then passes the first URL to the SDK through the host application, so that the SDK performs a hot update on the first configuration parameter according to the first URL to obtain a first target configuration parameter pair, thereby allowing the mobile terminal to refresh the page of the mini-program according to the first target configuration parameter pair. When an error occurs during the operation of the mini-program, the present invention dynamically modifies the configuration parameters of the mini-program through parameter passwords, has high debugging efficiency for the mini-program, does not require code modification through the host application, and improves the security of the mini-program.
[0190] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned multiple configuration parameters, the above-mentioned multiple configuration parameters can be stored in the nodes of the blockchain.
[0191] See also Figure 3 FIG. 2 is a schematic diagram of the structure of a mobile terminal provided in Embodiment 3 of the present invention. In a preferred embodiment of the present invention, the mobile terminal 3 includes a memory 31 , at least one processor 32 , at least one communication bus 33 and a transceiver 34 .
[0192] Those skilled in the art should understand that Figure 3 The structure of the mobile terminal shown does not constitute a limitation of the embodiments of the present invention, and may be a bus structure or a star structure. The mobile terminal 3 may also include more or less other hardware or software than shown in the figure, or a different component arrangement.
[0193] In some embodiments, the mobile terminal 3 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The mobile terminal 3 may also include computer devices and client devices, and the client devices include but are not limited to any electronic product that can interact with the client through a keyboard, mouse, remote control, touchpad, or voice control device, such as a personal computer, tablet computer, smart phone, digital camera, etc.
[0194] It should be noted that the mobile terminal 3 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.
[0195] In some embodiments, the memory 31 stores a computer program, and when the computer program is executed by the at least one processor 32, all or part of the steps in the small program security debugging method as described above are implemented. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0196] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0197] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0198] In some embodiments, the at least one processor 32 is the control core (ControlUnit) of the mobile terminal 3, and uses various interfaces and lines to connect various components of the entire mobile terminal 3, and executes various functions and processes data of the mobile terminal 3 by running or executing programs or modules stored in the memory 31, and calling data stored in the memory 31. For example, when the at least one processor 32 executes the computer program stored in the memory, it implements all or part of the steps of the applet security debugging method described in the embodiment of the present invention; or implements all or part of the functions of the applet security debugging device. The at least one processor 32 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips.
[0199] In some embodiments, the at least one communication bus 33 is configured to implement connection and communication between the memory 31 and the at least one processor 32, etc.
[0200] Although not shown, the mobile terminal 3 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The mobile terminal 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0201] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a mobile terminal (which can be a personal computer, a mobile terminal, or a network device, etc.) or a processor to execute a part of the method described in each embodiment of the present invention.
[0202] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0203] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0204] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0205] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the specification may also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0206] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A small program security debugging method, characterized in that: The method comprises: When an error is detected in the running of the mini program, determining a host application that carries the running of the mini program; Obtaining the prefix of the host application name and obtaining a preset parameter password; In response to a first configuration parameter modification instruction input by a user, generating a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction; The host application transmits the first URL to the SDK, and the SDK performs a hot update on the first configuration parameter according to the first URL to obtain a first target configuration parameter pair; Refreshing a page of the mini program according to the first target configuration parameter pair; Generating the first URL according to the prefix, the parameter password and the first configuration parameter modification instruction includes: Parsing the first configuration parameter modification instruction to obtain a parameter value of the first configuration parameter; Obtaining log parameters, and defining parameter values of the log parameters as preset values; Connecting the log parameter, the parameter value of the log parameter, the first configuration parameter and the parameter value of the first configuration parameter according to a preset operator to obtain a parameter description; Generate a first URL based on the prefix, the parameter password and the parameter description according to a preset format; The hot updating of the first configuration parameter according to the first URL by the SDK to obtain the first target configuration parameter pair includes: Parsing the first URL through the SDK to obtain a host name and parameter description; Determine whether the host name is consistent with the parameter password; When it is determined that the host name is consistent with the parameter password, performing a first segmentation on the parameter description according to a preset first operator to obtain a plurality of sub-parameter descriptions; Performing a second segmentation on the multiple sub-parameter descriptions according to a preset second operator to obtain multiple configuration parameters and a parameter value of each configuration parameter; Obtaining a parameter modification value of a first configuration parameter in the first configuration parameter modification instruction; The parameter modification value is used to hot-update the parameter value of the corresponding configuration parameter to obtain a first target configuration parameter pair.
2. The applet security debugging method according to claim 1, characterized in that: The method further comprises: Get multiple historical system logs when other mini-programs run into errors; Locating multiple problem points in the multiple historical system logs; Extracting multiple key fields from the multiple problem points; Configure multiple configuration parameters according to the multiple key fields; In response to an instruction to open the mini-program security debugging interface, the multiple configuration parameters are displayed on the mini-program security debugging interface.
3. The applet security debugging method according to claim 1, characterized in that: The method further comprises: When refreshing the page of the mini-program according to the first target configuration parameter fails, receiving a second configuration parameter modification instruction input by a user; Generate a second URL according to the prefix, the parameter password and the second configuration parameter modification instruction; The host application transmits the second URL to the SDK, and the SDK performs a hot update on the second configuration parameter according to the second URL to obtain a second target configuration parameter pair; Refresh the page of the mini program according to the second target configuration parameter pair.
4. The applet security debugging method according to claim 1, characterized in that: The method further comprises: Obtaining a refresh result of refreshing the page of the mini program; storing the refresh result and the corresponding target configuration parameter in association; Calculating the number of target configuration parameters corresponding to the refresh result being the first refresh result; Common problem points are determined according to the number of the target configuration parameters.
5. The applet security debugging method according to claim 1, characterized in that: The method further comprises: In response to a start instruction of the mini-program, obtaining an update time of the mini-program; Determining whether the mini program needs to be updated according to the update time; When it is determined according to the update time that the mini program needs to be updated, an update package of the mini program is downloaded, and the mini program is updated according to the update package when the mini program is started next time.
6. A small program security debugging device, characterized in that: The device comprises: A carrier module, used to determine a host application that carries the mini-program when an error is detected in the mini-program operation; An acquisition module, used to acquire the prefix of the name of the host application and acquire a preset parameter password; A generating module, configured to generate a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction in response to a first configuration parameter modification instruction input by a user; An update module, configured to transmit the first URL to the SDK through the host application, and to perform a hot update on the first configuration parameter according to the first URL through the SDK to obtain a first target configuration parameter pair; A refresh module, used to refresh the page of the mini program according to the first target configuration parameter; The generating module is further used to: parse the first configuration parameter modification instruction to obtain a parameter value of the first configuration parameter; Obtaining log parameters, and defining parameter values of the log parameters as preset values; Connecting the log parameter, the parameter value of the log parameter, the first configuration parameter and the parameter value of the first configuration parameter according to a preset operator to obtain a parameter description; Generate a first URL based on the prefix, the parameter password and the parameter description according to a preset format; The update module is also used to: parse the first URL through the SDK to obtain a host name and parameter description; Determine whether the host name is consistent with the parameter password; When it is determined that the host name is consistent with the parameter password, performing a first segmentation on the parameter description according to a preset first operator to obtain a plurality of sub-parameter descriptions; Performing a second segmentation on the multiple sub-parameter descriptions according to a preset second operator to obtain multiple configuration parameters and a parameter value of each configuration parameter; Obtaining a parameter modification value of a first configuration parameter in the first configuration parameter modification instruction; The parameter modification value is used to hot-update the parameter value of the corresponding configuration parameter to obtain a first target configuration parameter pair.
7. A mobile terminal, characterized in that: The mobile terminal includes a processor, and the processor is used to implement the small program security debugging method as described in any one of claims 1 to 5 when executing the computer program stored in the memory.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the mini-program security debugging method as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Data prefetching method, device, equipment and storage medium
CN110609714A
Hot update code detection method and device, electronic equipment and storage medium
CN111897559A