[go: up one dir, main page]

CN112527668B - Mini-program security debugging method, device, mobile terminal and storage medium - Google Patents

Mini-program security debugging method, device, mobile terminal and storage medium Download PDF

Info

Publication number
CN112527668B
CN112527668B CN202011509998.XA CN202011509998A CN112527668B CN 112527668 B CN112527668 B CN 112527668B CN 202011509998 A CN202011509998 A CN 202011509998A CN 112527668 B CN112527668 B CN 112527668B
Authority
CN
China
Prior art keywords
parameter
applet
configuration
url
configuration parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011509998.XA
Other languages
Chinese (zh)
Other versions
CN112527668A (en
Inventor
何兵
程达
镐振鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202011509998.XA priority Critical patent/CN112527668B/en
Publication of CN112527668A publication Critical patent/CN112527668A/en
Application granted granted Critical
Publication of CN112527668B publication Critical patent/CN112527668B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3644Debugging of software by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of mobile terminals, and provides an applet secure debugging method, device, mobile terminal and storage medium, which comprises the steps of determining a host application carrying the applet operation when detecting the applet operation error; the method comprises the steps of obtaining a prefix of a name of a host application, obtaining a preset parameter password, responding 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, transmitting the first URL to an SDK through the host application, carrying out hot update on the first configuration parameter according to the first URL through the SDK to obtain a first target configuration parameter pair, and refreshing a page of the applet according to the first target configuration parameter pair. The invention can rapidly debug the applet when the applet operates in error, and ensure the operation safety of the applet.

Description

Applet secure debugging method and device, mobile terminal and storage medium
Technical Field
The invention relates to the technical field of mobile terminals, in particular to a method and a device for safely debugging an applet, a mobile terminal and a storage medium.
Background
The small Program (Mini Program) is an application which can be used without downloading and installing, realizes the dream of ' tentacle accessibility ' of the application, and also embodies the concept of ' run out.
Some applets can run on more than ten or even tens of APPs, because the functions of all the APPs are different, the code styles are also different, various compatibility problems can often occur in the applets, developers of the APPs are inconvenient to help to check the problems sometimes because of more service requirements, and at the moment, the development and the test of the SDK need to modify some configurations of the SDK, such as a log switch, a gesture switch, a domain name verification switch, an SDK environment, a timeout threshold of a request, a host ID and the like, so as to attempt to find out reasons of the problems.
The inventor finds that after the SDK configuration is manually modified in the process of realizing the invention, a host developer is required to modify codes and repackage the codes, so that the operation efficiency of the applet is reduced, and functions are added in the SDK to directly modify the SDK, so that the safety problem of the applet is caused.
Therefore, how to provide a secure and versatile SDK configuration modification scheme is an urgent problem to be solved.
Disclosure of Invention
In view of the foregoing, it is necessary to provide an applet secure debugging method, apparatus, mobile terminal and storage medium, which can rapidly debug an applet when an applet is in error and ensure the running security of the applet.
A first aspect of the present invention provides an applet secure debugging method, the method comprising:
when detecting that the operation of the applet is wrong, determining a host application carrying the operation of the applet;
acquiring a prefix of the name of the host application, and acquiring a preset parameter password;
Responding to a first configuration parameter modification instruction input by a user, and generating a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction;
transmitting the first URL to an SDK through the host application, and carrying out hot update on the first configuration parameters through the SDK according to the first URL to obtain a first target configuration parameter pair;
And refreshing the page of the applet according to the first target configuration parameter pair.
In an alternative embodiment, the generating the first URL according to the prefix, the parameter password, and the first configuration parameter modification instruction includes:
analyzing the first configuration parameter modification instruction to obtain a parameter value of the first configuration parameter;
acquiring log parameters, and defining parameter values of the log parameters as preset values;
Connecting the log parameters, the parameter values of the log parameters, the first configuration parameters and the parameter values of the first configuration parameters according to a preset operator to obtain parameter descriptions;
And generating a first URL based on the prefix, the parameter password and the parameter description according to a preset format.
In an optional embodiment, the obtaining, by the SDK, the first target configuration parameter pair by thermally updating the first configuration parameter according to the first URL includes:
Analyzing the first URL through the SDK to obtain a host name and a parameter description;
judging whether the host name is consistent with the parameter password or not;
When the host name is determined to be consistent with the parameter password, carrying out first segmentation on the parameter description according to a preset first operator to obtain a plurality of sub-parameter descriptions;
Performing second division on the multiple sub-parameter descriptions according to a preset second operator to obtain multiple configuration parameters and parameter values of each configuration parameter;
Acquiring a parameter modification value of a first configuration parameter in the first configuration parameter modification instruction;
And thermally updating the parameter values of the corresponding configuration parameters by using the parameter modification values to obtain a first target configuration parameter pair.
In an alternative embodiment, the method further comprises:
Acquiring a plurality of historical system logs when other applets run in error;
locating a plurality of problem points in the plurality of historical system logs;
extracting a plurality of key fields in the plurality of problem points;
Configuring a plurality of configuration parameters according to the plurality of key fields;
And responding to an instruction for opening the small program security debugging interface, and displaying the configuration parameters on the small program security debugging interface.
In an alternative embodiment, the method further comprises:
When the page refreshing of the applet is failed according to the first target configuration parameters, receiving a second configuration parameter modification instruction input by a user;
Generating a second URL according to the prefix, the parameter password and the second configuration parameter modification instruction;
transmitting the second URL to the SDK through the host application, and carrying out hot update on the second configuration parameters through the SDK according to the second URL to obtain a second target configuration parameter pair;
And refreshing the page of the applet according to the second target configuration parameter pair.
In an alternative embodiment, the method further comprises:
acquiring a refreshing result of refreshing the page of the applet;
the refreshing result and the corresponding target configuration parameters are stored in an associated mode;
calculating the number of the target configuration parameters corresponding to the first refreshing result;
and determining common problem points according to the number of the target configuration parameters.
In an alternative embodiment, the method further comprises:
responding to the starting instruction of the small program, and acquiring the updating time of the small program;
judging whether the applet needs to be updated according to the update time;
And when the small program is judged to be required to be updated according to the updating time, downloading an updating packet of the small program, and updating the small program according to the updating packet when the small program is started next time.
A second aspect of the present invention provides an applet secure debugging device, the device comprising:
the bearing module is used for determining a host application for bearing the operation of the applet when the operation error of the applet is detected;
The acquisition module is used for acquiring the prefix of the name of the host application and acquiring a preset parameter password;
The generation module is used for responding to a first configuration parameter modification instruction input by a user and generating a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction;
The updating module is used for transmitting the first URL to the SDK through the host application, and carrying out hot updating on the first configuration parameters through the SDK according to the first URL to obtain a first target configuration parameter pair;
and the refreshing module is used for refreshing the page of the applet according to the first target configuration parameter.
A third aspect of the present invention provides a mobile terminal comprising a processor for implementing the applet secure debugging method when executing a computer program stored in a memory.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the applet secure debugging method.
In summary, according to the applet secure debugging method, device, mobile terminal and storage medium of the present invention, when an applet is in error, a prefix carrying a name of a host application in which the applet is running is determined, a first URL is generated 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 a user, and then the first URL is transferred to an SDK through the host application, so that the SDK thermally updates the first configuration parameter according to the first URL to obtain a first target configuration parameter pair, thereby enabling the mobile terminal to refresh a page of the applet according to the first target configuration parameter pair. When the operation of the applet is in error, the configuration parameters of the applet are dynamically modified through the parameter password, the debugging efficiency of the applet is high, and the code is not required to be modified through the host application, so that the safety of the applet is improved.
Drawings
Fig. 1 is a flowchart of an applet secure debugging method according to an embodiment of the invention.
Fig. 2 is a block diagram of an applet secure debugging device according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a mobile terminal according to a third embodiment of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will be more clearly understood, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It should be noted that, without conflict, the embodiments of the present invention and features in the embodiments may be combined with each other.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
The small program security debugging method provided by the embodiment of the invention is executed by the mobile terminal, and correspondingly, the small program security debugging device is operated in the mobile terminal.
Fig. 1 is a flowchart of an applet secure debugging method according to an embodiment of the invention. The method for safely debugging the small program specifically comprises the following steps, the sequence of the steps in the flow chart can be changed according to different requirements, and some steps can be omitted.
S11, when detecting that the applet operates in error, determining a host application carrying the applet operation.
The host application refers to an application providing an operation environment for the applet, so that the applet runs on the mobile terminal depending on the host application. Where the host application is, for example, a cell phone hundred degrees, etc. Multiple applets may be run in one host application, e.g., applet Y1 and applet Y2 in host application XX 1. One applet may run in multiple host applications, e.g., applet Y3 may run in host application XX2 and host application XX 3.
An applet is an application that can be used without downloading an installation and can run in different application environments (i.e., hosts), such as a web browser application, instant messaging application, and the like.
The mobile terminal can detect whether the operation of the applet is wrong or not through a throws Exception method, and when the operation of the applet is wrong, the mobile terminal determines a host application for providing an operation environment for the applet.
S12, acquiring a prefix of the name of the host application, and acquiring a preset parameter password.
The mobile terminal is pre-stored with a parameter password for modifying the configuration parameters according to the parameter password.
Wherein, the parameter password can be refreshConfig.
In other embodiments, the mobile terminal may further store a parameter password table in advance, where a prefix of a name of the host application and a corresponding parameter password table are recorded in the parameter password table. And matching the parameter password table corresponding to the prefix of the name of the host application by the parameter password table. Different parameter password tables are set for different host applications, so that when the applet operates in a plurality of host applications at the same time and errors occur, the parameter configuration of the different host applications can be modified according to the different parameter password tables. For example, if the WeChat applet runs in the host application XX1 and the host application XX2 at the same time, and if the WeChat applet makes errors in the two host applications at the same time, the mobile terminal may acquire 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, implement modification of the configuration parameters of the host application XX1 through the parameter password P1, and implement modification of the configuration parameters of the host application XX2 through the parameter password P2.
S13, responding to a first configuration parameter modification instruction input by a user, and generating a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction.
The host application may be invoked by a prefix (schema), different schemas may invoke different hosts, and schemas may be followed by parameters to form a URL.
The user can click or touch the applet secure debug function icon on the mobile terminal to trigger the launch of the applet secure debug function, thereby displaying the applet secure debug interface on the mobile terminal.
The user can input a first configuration parameter modification instruction in the applet secure debugging interface, so that the mobile terminal generates a first URL according to the first configuration parameter modification instruction.
In an alternative embodiment, the generating the first URL according to the prefix, the parameter password, and the first configuration parameter modification instruction includes:
analyzing the first configuration parameter modification instruction to obtain a parameter value of the first configuration parameter;
acquiring log parameters, and defining parameter values of the log parameters as preset values;
Connecting the log parameters, the parameter values of the log parameters, the first configuration parameters and the parameter values of the first configuration parameters according to a preset operator to obtain parameter descriptions;
And generating a first URL based on the prefix, the parameter password and the parameter description according to a preset format.
The preset operators are "=" and "≡", the operator "=" is an assignment symbol, and the operator "≡" is a connection symbol.
For example, assuming that a first configuration parameter obtained by analyzing the first configuration parameter modification instruction by the mobile terminal is enableCheckDomain and a parameter value of the obtained first configuration parameter is 0, a log parameter defined by the mobile terminal is enableLog, a parameter value of the log parameter is 1, a parameter password is refreshConfig, and a prefix of a name of a host application is Yiqianbao, the log parameter, the parameter value of the first configuration parameter and the parameter value of the first configuration parameter are connected according to a preset operator, and a parameter description obtained by the mobile terminal is enableLog =1 & enablecheckdomain=0. Then, the mobile terminal generates a first URL (uniform resource locator) according to a preset format based on the prefix, the parameter password and the parameter description, wherein the first URL is Yiqianbao://refreshConfigenableLog =1 & enableCheckDomain=0.
In other embodiments, the parameter value of the log parameter may not be defined as a preset value. That is, the mobile terminal may not need to include a log parameter in the generating the first URL according to the prefix, the parameter password and the first configuration parameter modification instruction.
In this optional embodiment, by designating 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 conveniently and quickly locate the problem point of the error of the operation of the applet according to the system log, and the problem that the user needs to manually input the log parameter and input the parameter value of the log parameter when the operation of the applet is in error for safe debugging is avoided.
S14, transmitting the first URL to the SDK through the host application, and carrying out hot update on the first configuration parameters through the SDK according to the first URL to obtain a first target configuration parameter pair.
Because of some business requirements, after the host is invoked by schema, the host will pass the URL to the SDK for processing, such as pulling up a specified applet.
In an optional embodiment, the obtaining, by the SDK, the first target configuration parameter pair by thermally updating the first configuration parameter according to the first URL includes:
Analyzing the first URL through the SDK to obtain a host name and a parameter description;
judging whether the host name is consistent with the parameter password or not;
When the host name is determined to be consistent with the parameter password, carrying out first segmentation on the parameter description according to a preset first operator to obtain a plurality of sub-parameter descriptions;
Performing second division on the multiple sub-parameter descriptions according to a preset second operator to obtain multiple configuration parameters and parameter values of each configuration parameter;
Acquiring a parameter modification value of a first configuration parameter in the first configuration parameter modification instruction;
And thermally updating the parameter values of the corresponding configuration parameters by using the parameter modification values to obtain a first target configuration parameter pair.
For example, yiqianbao is a scheme of one wallet, which can be called up by Yiqianbao, and then the one wallet will transfer the first URL to the SDK, and the SDK will parse the first URL to obtain the host name and the parameter description. The host name is refreshConfig, which is matched with the password defined above, and the SDK performs the operation of hot updating the configuration parameters.
For example, assuming that the first URL is Yiqianbao:// refreshConfigenableLog =1 & wechatid=aa, the mobile terminal obtains the parameter description in the first URL as enableLog =1 & wechatid=aa, then uses a preset first operator "≡" to perform the first segmentation to obtain a first sub-parameter description enableLog =1 and a second sub-parameter description weChatId =aa, and then uses a preset second operator "=" to perform the second segmentation to obtain the parameter value of the configuration parameter enableLog as 1 and obtain the parameter value of the configuration parameter weChatId as 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 obtained first target configuration parameter pair is (weChatId, BB).
When the mobile terminal judges that the host name is inconsistent with the parameter password, the mobile terminal 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 can be executed.
S15, refreshing the page of the applet according to the first target configuration parameter.
The mobile terminal can preset a time period, and automatically refreshes the page of the applet according to the first target configuration parameter pair in the preset time period after detecting that the SDK carries out thermal update on the first configuration parameter according to the first URL to obtain the first target configuration parameter pair. The mobile terminal can also respond to the refresh command when receiving the refresh command of the page of the applet, and refresh the page of the applet according to the first target configuration parameter.
The method includes the steps that when a certain picture is displayed, the name of the picture with the error is assumed to be a first name, a mobile terminal generates a first URL in response to a picture name configuration parameter modification instruction input by a user, a host application transmits the first URL to an SDK, the SDK carries out hot update on the picture name configuration parameter according to the first URL to obtain a picture name target configuration parameter, the name of the picture corresponding to the picture name target configuration parameter is a second name, and when a page refreshing instruction of the small program is received, the picture corresponding to the second name is displayed according to the picture name target configuration parameter.
In an alternative embodiment, the method further comprises:
When the page refreshing of the applet is failed according to the first target configuration parameters, receiving a second configuration parameter modification instruction input by a user;
Generating a second URL according to the prefix, the parameter password and the second configuration parameter modification instruction;
transmitting the second URL to the SDK through the host application, and carrying out hot update on the second configuration parameters through the SDK according to the second URL to obtain a second target configuration parameter pair;
And refreshing the page of the applet according to the second target configuration parameter pair.
When the page refreshing of the applet is failed according to the first target configuration parameters, the configuration parameters corresponding to the first configuration parameter modification instructions input by the user cannot realize the hot updating of the configuration parameters of the applet, the problem of the applet operation error cannot be solved, and the mobile terminal can need to modify the configuration parameters one by adopting a heuristic.
After receiving a second configuration parameter modification instruction input by a user, obtaining a second target configuration parameter pair according to a process corresponding to the first configuration parameter modification instruction, and refreshing the page of the applet according to the second target configuration parameter pair. And then, acquiring a refreshing result of refreshing the page of the applet according to the second target configuration parameter, if the refreshing fails, indicating that the configuration parameter corresponding to the second configuration parameter modification instruction input by the user cannot realize the hot update of the configuration parameter of the applet, and cannot solve the problem of the applet operation error, and the user can input a third configuration parameter modification instruction to realize the modification of the configuration parameter of the applet. If the refreshing is successful, the configuration parameters corresponding to the second configuration parameter modification instruction input by the user can be updated thermally, so that the problem of error operation of the applet can be solved, and the applet operates normally.
In an alternative embodiment, prior to S11, the method further comprises:
Acquiring a plurality of historical system logs when other applets run in error;
locating a plurality of problem points in the plurality of historical system logs;
extracting a plurality of key fields in the plurality of problem points;
Configuring a plurality of configuration parameters according to the plurality of key fields;
And responding to an instruction for opening the small program security debugging interface, and displaying the configuration parameters on the small program security debugging interface.
The mobile terminal can acquire other applets or a plurality of historical system logs when the applets run in error, and can also receive a plurality of historical system logs when the applets run in error, which are sent by other mobile terminals.
The system log records the occurrence time of all events, access sources and other contents. When an event goes wrong, a specific identifier is used for identifying, a problem point with a problem in the system log can be rapidly located through the specific identifier, and configuration of configuration parameters is performed by extracting key fields in the problem point.
The configuration parameters may include a switch of a log, a switch of a gesture, a switch of a domain name verification, an SDK environment, a timeout threshold of a request, a host ID, and the like.
In the alternative embodiment, all possible error problem points in the running process of the applet can be determined through the historical system log, and the configuration of the configuration parameters is realized according to the problem points, so that the configuration parameters are more comprehensive and accurate, the configuration efficiency of the configuration parameters can be improved, a plurality of configuration parameters are displayed on the applet secure debugging interface, the function of prompting a user can be achieved, and the user can conveniently and rapidly configure the host application according to the plurality of configuration parameters.
In an alternative embodiment, the method further comprises:
acquiring a refreshing result of refreshing the page of the applet;
the refreshing result and the corresponding target configuration parameters are stored in an associated mode;
calculating the number of the target configuration parameters corresponding to the first refreshing result;
and determining common problem points according to the number of the target configuration parameters.
The refreshing result comprises a first result and a second result, wherein the first result is used for indicating that page refreshing of the applet is successful, namely, the mobile terminal can normally operate the applet, and the second result is used for indicating that page refreshing of the applet fails, namely, the mobile terminal still cannot normally operate the applet.
And storing the first target configuration parameter pair and the corresponding refreshing result in a local database of the mobile terminal in a correlated manner.
When the data quantity in the local database exceeds a preset data quantity threshold value, the mobile terminal acquires target configuration parameters corresponding to the first refreshing result in the local database, and calculates the number of the acquired target configuration parameters. The more the number of the target configuration parameters is, the more the reasons for the running errors of the small program are, which is a common problem point, and the fewer the number of the target small program parameters is, the less the reasons for the running errors of the small program are, which is a accidental problem point.
In this optional embodiment, the number of the target configuration parameters corresponding to the first refreshing result is calculated as the refreshing result, and the common problem points are determined according to the number of the target configuration parameters, that is, the common problem points are determined in a statistical manner, so that the determination of the common problem points is more objective and the accuracy is higher. Common problem points are determined, so that a warning effect can be conveniently achieved when a user configures configuration parameters of the applet, the problem that the applet cannot normally run due to errors of the configuration parameters of the applet is avoided, and therefore the running efficiency of the applet is improved.
In an alternative embodiment, the method further comprises:
responding to the starting instruction of the small program, and acquiring the updating time of the small program;
judging whether the applet needs to be updated according to the update time;
And when the small program is judged to be required to be updated according to the updating time, downloading an updating packet of the small program, and updating the small program according to the updating packet when the small program is started next time.
And the mobile terminal calculates the time difference between the update time and the current time, judges whether the time difference is larger than a preset difference threshold, downloads the update package of the applet if the time difference is larger than the preset difference threshold and indicates that the applet is not updated for a long time, and does not need to download the update package of the applet if the time difference is smaller than or equal to the preset difference threshold and indicates that the update time of the applet is not long.
In this alternative embodiment, when it is determined that the applet needs to be updated, an update package of the applet is downloaded, so that the applet is updated according to the update package when the applet is started next time, so that the use of the applet by the user of the mobile terminal is not affected, and the applet is updated to the latest state.
When the operation of the applet is wrong, the method provided by the invention determines the prefix of the name of the host application carrying the operation of the applet, responds to a first configuration parameter modification instruction input by a user, generates a first URL according to the prefix, a preset parameter password and the first configuration parameter modification instruction, and then transmits the first URL to the SDK through the host application, so that the SDK carries out hot update on the first configuration parameter according to the first URL to obtain a first target configuration parameter pair, and the mobile terminal refreshes the page of the applet according to the first target configuration parameter pair. When the operation of the applet is in error, the configuration parameters of the applet are dynamically modified through the parameter password, the debugging efficiency of the applet is high, and the code is not required to be modified through the host application, so that the safety of the applet is improved.
It is emphasized that to further guarantee privacy and security of the plurality of configuration parameters, the plurality of configuration parameters may be stored in a node of the blockchain.
Fig. 2 is a block diagram of an applet secure debugging device according to a second embodiment of the present invention.
In some embodiments, the applet secure debugging device 20 may comprise a plurality of functional modules consisting of computer program segments. The computer program of the individual program segments in the applet secure debugging device 20 may be stored in a memory of the mobile terminal and executed by at least one processor to perform (see in detail fig. 1 for description) the function of applet secure debugging.
In this embodiment, the applet secure debugging device 20 may be divided into a plurality of functional modules according to the functions it performs. The functional modules may include a bearer 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 capable of being executed by at least one processor and of performing a fixed function, stored in a memory. In the present embodiment, the functions of the respective modules will be described in detail in the following embodiments.
The bearer module 201 is configured to determine, when an applet operation error is detected, a host application that carries the applet operation.
The host application refers to an application providing an operation environment for the applet, so that the applet runs on the mobile terminal depending on the host application. Where the host application is, for example, a cell phone hundred degrees, etc. Multiple applets may be run in one host application, e.g., applet Y1 and applet Y2 in host application XX 1. One applet may run in multiple host applications, e.g., applet Y3 may run in host application XX2 and host application XX 3.
An applet is an application that can be used without downloading an installation and can run in different application environments (i.e., hosts), such as a web browser application, instant messaging application, and the like.
The mobile terminal can detect whether the operation of the applet is wrong or not through a throws Exception method, and when the operation of the applet is wrong, the mobile terminal determines a host application for providing an operation environment for the applet.
The obtaining module 202 is configured to obtain a prefix of the name of the host application, and obtain a preset parameter password.
The mobile terminal is pre-stored with a parameter password for modifying the configuration parameters according to the parameter password.
Wherein, the parameter password can be refreshConfig.
In other embodiments, the mobile terminal may further store a parameter password table in advance, where a prefix of a name of the host application and a corresponding parameter password table are recorded in the parameter password table. And matching the parameter password table corresponding to the prefix of the name of the host application by the parameter password table. Different parameter password tables are set for different host applications, so that when the applet operates in a plurality of host applications at the same time and errors occur, the parameter configuration of the different host applications can be modified according to the different parameter password tables. For example, if the WeChat applet runs in the host application XX1 and the host application XX2 at the same time, and if the WeChat applet makes errors in the two host applications at the same time, the mobile terminal may acquire 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, implement modification of the configuration parameters of the host application XX1 through the parameter password P1, and implement modification of the configuration parameters of the host application XX2 through the parameter password P2.
The generating module 203 is 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.
The host application may be invoked by a prefix (schema), different schemas may invoke different hosts, and schemas may be followed by parameters to form a URL.
The user can click or touch the applet secure debug function icon on the mobile terminal to trigger the launch of the applet secure debug function, thereby displaying the applet secure debug interface on the mobile terminal.
The user can input a first configuration parameter modification instruction in the applet secure debugging interface, so that the mobile terminal generates a first URL according to the first configuration parameter modification instruction.
In an alternative embodiment, the generating module 203 generates the first URL according to the prefix, the parameter password, and the first configuration parameter modification instruction includes:
analyzing the first configuration parameter modification instruction to obtain a parameter value of the first configuration parameter;
acquiring log parameters, and defining parameter values of the log parameters as preset values;
Connecting the log parameters, the parameter values of the log parameters, the first configuration parameters and the parameter values of the first configuration parameters according to a preset operator to obtain parameter descriptions;
And generating a first URL based on the prefix, the parameter password and the parameter description according to a preset format.
The preset operators are "=" and "≡", the operator "=" is an assignment symbol, and the operator "≡" is a connection symbol.
For example, assuming that a first configuration parameter obtained by analyzing the first configuration parameter modification instruction by the mobile terminal is enableCheckDomain and a parameter value of the obtained first configuration parameter is 0, a log parameter defined by the mobile terminal is enableLog, a parameter value of the log parameter is 1, a parameter password is refreshConfig, and a prefix of a name of a host application is Yiqianbao, the log parameter, the parameter value of the first configuration parameter and the parameter value of the first configuration parameter are connected according to a preset operator, and a parameter description obtained by the mobile terminal is enableLog =1 & enablecheckdomain=0. Then, the mobile terminal generates a first URL (uniform resource locator) according to a preset format based on the prefix, the parameter password and the parameter description, wherein the first URL is Yiqianbao://refreshConfigenableLog =1 & enableCheckDomain=0.
In other embodiments, the parameter value of the log parameter may not be defined as a preset value. That is, the mobile terminal may not need to include a log parameter in the generating the first URL according to the prefix, the parameter password and the first configuration parameter modification instruction.
In this optional embodiment, by designating 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 conveniently and quickly locate the problem point of the error of the operation of the applet according to the system log, and the problem that the user needs to manually input the log parameter and input the parameter value of the log parameter when the operation of the applet is in error for safe debugging is avoided.
The updating module 204 is configured to transmit the first URL to an SDK through the host application, and 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.
Because of some business requirements, after the host is invoked by schema, the host will pass the URL to the SDK for processing, such as pulling up a specified applet.
In an alternative embodiment, the updating module 204 thermally updates the first configuration parameter by the SDK according to the first URL to obtain the first target configuration parameter pair includes:
Analyzing the first URL through the SDK to obtain a host name and a parameter description;
judging whether the host name is consistent with the parameter password or not;
When the host name is determined to be consistent with the parameter password, carrying out first segmentation on the parameter description according to a preset first operator to obtain a plurality of sub-parameter descriptions;
Performing second division on the multiple sub-parameter descriptions according to a preset second operator to obtain multiple configuration parameters and parameter values of each configuration parameter;
Acquiring a parameter modification value of a first configuration parameter in the first configuration parameter modification instruction;
And thermally updating the parameter values of the corresponding configuration parameters by using the parameter modification values to obtain a first target configuration parameter pair.
For example, yiqianbao is a scheme of one wallet, which can be called up by Yiqianbao, and then the one wallet will transfer the first URL to the SDK, and the SDK will parse the first URL to obtain the host name and the parameter description. The host name is refreshConfig, which is matched with the password defined above, and the SDK performs the operation of hot updating the configuration parameters.
For example, assuming that the first URL is Yiqianbao:// refreshConfigenableLog =1 & wechatid=aa, the mobile terminal obtains the parameter description in the first URL as enableLog =1 & wechatid=aa, then uses a preset first operator "≡" to perform the first segmentation to obtain a first sub-parameter description enableLog =1 and a second sub-parameter description weChatId =aa, and then uses a preset second operator "=" to perform the second segmentation to obtain the parameter value of the configuration parameter enableLog as 1 and obtain the parameter value of the configuration parameter weChatId as 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 obtained first target configuration parameter pair is (weChatId, BB).
When the mobile terminal judges that the host name is inconsistent with the parameter password, the mobile terminal 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 can be executed.
The refresh module 205 is configured to refresh a page of the applet according to the first target configuration parameter pair.
The mobile terminal can preset a time period, and automatically refreshes the page of the applet according to the first target configuration parameter pair in the preset time period after detecting that the SDK carries out thermal update on the first configuration parameter according to the first URL to obtain the first target configuration parameter pair. The mobile terminal can also respond to the refresh command when receiving the refresh command of the page of the applet, and refresh the page of the applet according to the first target configuration parameter.
The method includes the steps that when a certain picture is displayed, the name of the picture with the error is assumed to be a first name, a mobile terminal generates a first URL in response to a picture name configuration parameter modification instruction input by a user, a host application transmits the first URL to an SDK, the SDK carries out hot update on the picture name configuration parameter according to the first URL to obtain a picture name target configuration parameter, the name of the picture corresponding to the picture name target configuration parameter is a second name, and when a page refreshing instruction of the small program is received, the picture corresponding to the second name is displayed according to the picture name target configuration parameter.
In an optional embodiment, the generating module 203 is further configured to receive a second configuration parameter modification instruction input by a user when the page refreshing for refreshing the applet fails according to the first target configuration parameter, and generate a second URL according to the prefix, the parameter password and the second configuration parameter modification instruction.
The updating module 204 is further configured to transmit the second URL to the SDK through the host application, and perform a thermal update on the second configuration parameter according to the second URL through the SDK to obtain a second target configuration parameter pair.
The refresh module 205 is further configured to refresh the page of the applet according to the second target configuration parameter pair.
When the page refreshing of the applet is failed according to the first target configuration parameters, the configuration parameters corresponding to the first configuration parameter modification instructions input by the user cannot realize the hot updating of the configuration parameters of the applet, the problem of the applet operation error cannot be solved, and the mobile terminal can need to modify the configuration parameters one by adopting a heuristic.
After receiving a second configuration parameter modification instruction input by a user, obtaining a second target configuration parameter pair according to a process corresponding to the first configuration parameter modification instruction, and refreshing the page of the applet according to the second target configuration parameter pair. And then, acquiring a refreshing result of refreshing the page of the applet according to the second target configuration parameter, if the refreshing fails, indicating that the configuration parameter corresponding to the second configuration parameter modification instruction input by the user cannot realize the hot update of the configuration parameter of the applet, and cannot solve the problem of the applet operation error, and the user can input a third configuration parameter modification instruction to realize the modification of the configuration parameter of the applet. If the refreshing is successful, the configuration parameters corresponding to the second configuration parameter modification instruction input by the user can be updated thermally, so that the problem of error operation of the applet can be solved, and the applet operates normally.
The display module 206 is configured to obtain a plurality of historical system logs when other applets run in error;
the method comprises the steps of locating a plurality of problem points in a plurality of historical system logs, extracting a plurality of key fields in the plurality of problem points, configuring a plurality of configuration parameters according to the plurality of key fields, responding to an instruction for opening an applet secure debugging interface, and displaying the plurality of configuration parameters on the applet secure debugging interface.
The mobile terminal can acquire other applets or a plurality of historical system logs when the applets run in error, and can also receive a plurality of historical system logs when the applets run in error, which are sent by other mobile terminals.
The system log records the occurrence time of all events, access sources and other contents. When an event goes wrong, a specific identifier is used for identifying, a problem point with a problem in the system log can be rapidly located through the specific identifier, and configuration of configuration parameters is performed by extracting key fields in the problem point.
The configuration parameters may include a switch of a log, a switch of a gesture, a switch of a domain name verification, an SDK environment, a timeout threshold of a request, a host ID, and the like.
In the alternative embodiment, all possible error problem points in the running process of the applet can be determined through the historical system log, and the configuration of the configuration parameters is realized according to the problem points, so that the configuration parameters are more comprehensive and accurate, the configuration efficiency of the configuration parameters can be improved, a plurality of configuration parameters are displayed on the applet secure debugging interface, the function of prompting a user can be achieved, and the user can conveniently and rapidly configure the host application according to the plurality of configuration parameters.
The computing module 207 is further configured to obtain a refresh result of refreshing the page of the applet, store the refresh result and the corresponding target configuration parameters in an associated manner, calculate the number of target configuration parameters corresponding to the refresh result as the first refresh result, and determine a common problem point according to the number of target configuration parameters.
The refreshing result comprises a first result and a second result, wherein the first result is used for indicating that page refreshing of the applet is successful, namely, the mobile terminal can normally operate the applet, and the second result is used for indicating that page refreshing of the applet fails, namely, the mobile terminal still cannot normally operate the applet.
And storing the first target configuration parameter pair and the corresponding refreshing result in a local database of the mobile terminal in a correlated manner.
When the data quantity in the local database exceeds a preset data quantity threshold value, the mobile terminal acquires target configuration parameters corresponding to the first refreshing result in the local database, and calculates the number of the acquired target configuration parameters. The more the number of the target configuration parameters is, the more the reasons for the running errors of the small program are, which is a common problem point, and the fewer the number of the target small program parameters is, the less the reasons for the running errors of the small program are, which is a accidental problem point.
In this optional embodiment, the number of the target configuration parameters corresponding to the first refreshing result is calculated as the refreshing result, and the common problem points are determined according to the number of the target configuration parameters, that is, the common problem points are determined in a statistical manner, so that the determination of the common problem points is more objective and the accuracy is higher. Common problem points are determined, so that a warning effect can be conveniently achieved when a user configures configuration parameters of the applet, the problem that the applet cannot normally run due to errors of the configuration parameters of the applet is avoided, and therefore the running efficiency of the applet is improved.
The downloading module 208 is configured to obtain an update time of the applet in response to the start instruction of the applet, determine whether the applet needs to be updated according to the update time, download an update package of the applet when the applet needs to be updated according to the update time, and update the applet according to the update package when the applet is started next time.
And the mobile terminal calculates the time difference between the update time and the current time, judges whether the time difference is larger than a preset difference threshold, downloads the update package of the applet if the time difference is larger than the preset difference threshold and indicates that the applet is not updated for a long time, and does not need to download the update package of the applet if the time difference is smaller than or equal to the preset difference threshold and indicates that the update time of the applet is not long.
In this alternative embodiment, when it is determined that the applet needs to be updated, an update package of the applet is downloaded, so that the applet is updated according to the update package when the applet is started next time, so that the use of the applet by the user of the mobile terminal is not affected, and the applet is updated to the latest state.
When the operation of the applet is wrong, the device provided by the invention determines the prefix carrying the name of the host application operated by the applet, responds to the first configuration parameter modification instruction input by a user, generates a first URL according to the prefix, the preset parameter password and the first configuration parameter modification instruction, and then transmits the first URL to the SDK through the host application, so that the SDK carries out thermal update on the first configuration parameter according to the first URL to obtain a first target configuration parameter pair, and the mobile terminal refreshes the page of the applet according to the first target configuration parameter pair. When the operation of the applet is in error, the configuration parameters of the applet are dynamically modified through the parameter password, the debugging efficiency of the applet is high, and the code is not required to be modified through the host application, so that the safety of the applet is improved.
It is emphasized that to further guarantee privacy and security of the plurality of configuration parameters, the plurality of configuration parameters may be stored in a node of the blockchain.
Fig. 3 is a schematic structural diagram of a mobile terminal according to a third embodiment of the present invention. In the preferred embodiment of the present invention, the mobile terminal 3 comprises a memory 31, at least one processor 32, at least one communication bus 33 and a transceiver 34.
It will be appreciated by those skilled in the art that the configuration of the mobile terminal shown in fig. 3 is not limiting of the embodiments of the present invention, and that either a bus-type configuration or a star-type configuration is possible, and that the mobile terminal 3 may include more or less other hardware or software than that shown, or a different arrangement of components.
In some embodiments, the mobile terminal 3 is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit, a programmable gate array, a digital processor, an embedded device, and the like. The mobile terminal 3 may further comprise a computer device and a client device, where the client device includes, but is not limited to, any electronic product that can interact with a client by way of a keyboard, a mouse, a remote control, a touch pad, or a voice control device, such as a personal computer, a tablet, a smart phone, a digital camera, etc.
It should be noted that the mobile terminal 3 is only used as an example, and other electronic products that may be present in the present invention or may be present in the future are also included in the scope of the present invention by way of reference.
In some embodiments, the memory 31 has stored therein a computer program which, when executed by the at least one processor 32, performs all or part of the steps in the applet secure debugging method as described. The Memory 31 includes Read-Only Memory (ROM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable rewritable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic tape Memory, or any other medium that can be used for carrying or storing data.
Further, the computer readable storage medium may mainly include a storage program area, which may store an operating system, an application program required for at least one function, and the like, and a storage data area, which may store data created according to the use of the blockchain node, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
In some embodiments, the at least one processor 32 is a Control Unit (Control Unit) of the mobile terminal 3, connects the various components of the entire mobile terminal 3 using various interfaces and lines, and performs various functions of the mobile terminal 3 and processes data by running or executing programs or modules stored in the memory 31, and invoking data stored in the memory 31. For example, the at least one processor 32 may implement all or part of the steps of the applet secure debugging method described in embodiments of the invention when executing a computer program stored in the memory, or may implement all or part of the functions of the applet secure debugging device. The at least one processor 32 may be comprised of integrated circuits, such as a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functionality, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like.
In some embodiments, the at least one communication bus 33 is arranged to enable connected communication between the memory 31 and the at least one processor 32 or the like.
Although not shown, the mobile terminal 3 may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so that functions of managing charging, discharging, power consumption management, etc. are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The mobile terminal 3 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a mobile terminal (which may be a personal computer, a mobile terminal, or a network device, etc.) or a processor (processor) to perform portions of the methods described in the various embodiments of the invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over 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.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it will be obvious that the term "comprising" does not exclude other elements or that the singular does not exclude a plurality. Several of the elements or devices recited in the specification may be embodied by one and the same item of software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (8)

1. A method for secure debugging of an applet, the method comprising:
when detecting that the operation of the applet is wrong, determining a host application carrying the operation of the applet;
acquiring a prefix of the name of the host application, and acquiring a preset parameter password;
Responding to a first configuration parameter modification instruction input by a user, and generating a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction;
transmitting the first URL to an SDK through the host application, and carrying out hot update on the first configuration parameters through the SDK according to the first URL to obtain a first target configuration parameter pair;
Refreshing the page of the applet according to the first target configuration parameter pair;
The generating the first URL according to the prefix, the parameter password, and the first configuration parameter modification instruction includes:
analyzing the first configuration parameter modification instruction to obtain a parameter value of the first configuration parameter;
acquiring log parameters, and defining parameter values of the log parameters as preset values;
Connecting the log parameters, the parameter values of the log parameters, the first configuration parameters and the parameter values of the first configuration parameters according to a preset operator to obtain parameter descriptions;
generating a first URL based on the prefix, the parameter password and the parameter description according to a preset format;
The step of obtaining a first target configuration parameter pair by thermally updating the first configuration parameter through the SDK according to the first URL includes:
Analyzing the first URL through the SDK to obtain a host name and a parameter description;
judging whether the host name is consistent with the parameter password or not;
When the host name is determined to be consistent with the parameter password, carrying out first segmentation on the parameter description according to a preset first operator to obtain a plurality of sub-parameter descriptions;
Performing second division on the multiple sub-parameter descriptions according to a preset second operator to obtain multiple configuration parameters and parameter values of each configuration parameter;
Acquiring a parameter modification value of a first configuration parameter in the first configuration parameter modification instruction;
And thermally updating the parameter values of the corresponding configuration parameters by using the parameter modification values to obtain a first target configuration parameter pair.
2. The applet secure debugging method of claim 1, wherein the method further comprises:
Acquiring a plurality of historical system logs when other applets run in error;
locating a plurality of problem points in the plurality of historical system logs;
extracting a plurality of key fields in the plurality of problem points;
Configuring a plurality of configuration parameters according to the plurality of key fields;
And responding to an instruction for opening the small program security debugging interface, and displaying the configuration parameters on the small program security debugging interface.
3. The applet secure debugging method of claim 1, wherein the method further comprises:
When the page refreshing of the applet is failed according to the first target configuration parameters, receiving a second configuration parameter modification instruction input by a user;
Generating a second URL according to the prefix, the parameter password and the second configuration parameter modification instruction;
transmitting the second URL to the SDK through the host application, and carrying out hot update on the second configuration parameters through the SDK according to the second URL to obtain a second target configuration parameter pair;
And refreshing the page of the applet according to the second target configuration parameter pair.
4. The applet secure debugging method of claim 1, wherein the method further comprises:
acquiring a refreshing result of refreshing the page of the applet;
the refreshing result and the corresponding target configuration parameters are stored in an associated mode;
calculating the number of the target configuration parameters corresponding to the first refreshing result;
and determining common problem points according to the number of the target configuration parameters.
5. The applet secure debugging method of claim 1, wherein the method further comprises:
responding to the starting instruction of the small program, and acquiring the updating time of the small program;
judging whether the applet needs to be updated according to the update time;
And when the small program is judged to be required to be updated according to the updating time, downloading an updating packet of the small program, and updating the small program according to the updating packet when the small program is started next time.
6. An applet secure debugging device, the device comprising:
the bearing module is used for determining a host application for bearing the operation of the applet when the operation error of the applet is detected;
The acquisition module is used for acquiring the prefix of the name of the host application and acquiring a preset parameter password;
The generation module is used for responding to a first configuration parameter modification instruction input by a user and generating a first URL according to the prefix, the parameter password and the first configuration parameter modification instruction;
The updating module is used for transmitting the first URL to the SDK through the host application, and carrying out hot updating on the first configuration parameters through the SDK according to the first URL to obtain a first target configuration parameter pair;
the refreshing module is used for refreshing the page of the applet according to the first target configuration parameters;
The generation module is further used for analyzing the first configuration parameter modification instruction to obtain a parameter value of the first configuration parameter;
acquiring log parameters, and defining parameter values of the log parameters as preset values;
Connecting the log parameters, the parameter values of the log parameters, the first configuration parameters and the parameter values of the first configuration parameters according to a preset operator to obtain parameter descriptions;
generating a first URL based on the prefix, the parameter password and the parameter description according to a preset format;
The updating module is also used for analyzing the first URL through the SDK to obtain a host name and a parameter description;
judging whether the host name is consistent with the parameter password or not;
When the host name is determined to be consistent with the parameter password, carrying out first segmentation on the parameter description according to a preset first operator to obtain a plurality of sub-parameter descriptions;
Performing second division on the multiple sub-parameter descriptions according to a preset second operator to obtain multiple configuration parameters and parameter values of each configuration parameter;
Acquiring a parameter modification value of a first configuration parameter in the first configuration parameter modification instruction;
And thermally updating the parameter values of the corresponding configuration parameters by using the parameter modification values to obtain a first target configuration parameter pair.
7. A mobile terminal, characterized in that it comprises a processor for implementing the applet secure debugging method according to anyone of claims 1 to 5 when executing a computer program stored in a memory.
8. A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the applet secure debugging method according to any one of claims 1 to 5.
CN202011509998.XA 2020-12-18 2020-12-18 Mini-program security debugging method, device, mobile terminal and storage medium Active CN112527668B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011509998.XA CN112527668B (en) 2020-12-18 2020-12-18 Mini-program security debugging method, device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011509998.XA CN112527668B (en) 2020-12-18 2020-12-18 Mini-program security debugging method, device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112527668A CN112527668A (en) 2021-03-19
CN112527668B true CN112527668B (en) 2025-04-29

Family

ID=75001568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011509998.XA Active CN112527668B (en) 2020-12-18 2020-12-18 Mini-program security debugging method, device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112527668B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115390939B (en) * 2022-08-17 2023-07-25 中电金信软件有限公司 Service processing method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110609714A (en) * 2019-07-31 2019-12-24 百度在线网络技术(北京)有限公司 Data prefetching method, device and equipment and storage medium
CN111897559A (en) * 2020-08-06 2020-11-06 厦门美图之家科技有限公司 Hot update code detection method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9703675B2 (en) * 2014-08-11 2017-07-11 Microsoft Technology Licensing, Llc Structured logging and instrumentation framework
CN108415844B (en) * 2018-03-22 2022-03-08 北京奇虎科技有限公司 Plug-in debugging method and device
CN109359237B (en) * 2018-09-30 2021-05-14 上海掌门科技有限公司 Method and equipment for searching hosted program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110609714A (en) * 2019-07-31 2019-12-24 百度在线网络技术(北京)有限公司 Data prefetching method, device and equipment and storage medium
CN111897559A (en) * 2020-08-06 2020-11-06 厦门美图之家科技有限公司 Hot update code detection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112527668A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
CN109492378B (en) Identity verification method based on equipment identification code, server and medium
CN111314141B (en) Route updating method and device
US10871953B2 (en) Application update method and apparatus
US10127057B2 (en) Method and apparatus for dynamically implementing application function
US10498597B2 (en) Deploying and monitoring multiplatform cloud-based infrastructures
CN111694592A (en) Management method and system for project version release
CN112256989B (en) Page loading method, device, terminal equipment and storage medium based on offline package
CN108733459B (en) Distributed timing method, server and system
JP2022100301A (en) Method for determining potential impact on computing device by software upgrade, computer program, and update recommendation computer server (recommendation of stability of software upgrade)
US11846972B2 (en) Method and apparatus for generating software test reports
CN112506559B (en) Gray release method and device based on gateway, electronic equipment and storage medium
CN111694582B (en) Processing method, device and equipment of application resource package and readable storage medium
CN111654522B (en) File synchronization method, file synchronization server and storage medium
US20130232481A1 (en) Information processing apparatus and client management method
US12271483B2 (en) Evaluation apparatus, evaluation system, evaluation method, and program
CN113434254B (en) Client deployment method, client deployment apparatus, computer device, and storage medium
CN112069078B (en) ESA interface pressure test method, ESA interface pressure test device, ESA interface pressure test equipment and storage medium
CN112527668B (en) Mini-program security debugging method, device, mobile terminal and storage medium
US10025646B2 (en) Naming of nodes in NET framework
CN113286014B (en) Dynamic configuration method and device of basic domain name and related equipment
CN112667244B (en) Data verification method, device, electronic equipment and computer readable storage medium
CN112631551A (en) Random number generation method and device, electronic equipment and storage medium
CN116954708A (en) System mirror image data processing method, device, equipment and medium
CN114185502B (en) Log printing method, device, equipment and medium based on production line environment
CN114036068B (en) Update detection method, device, equipment and storage medium based on privacy security

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant