Small program exception monitoring method and device, equipment and storage medium

Monitoring applet exceptions through timed tasks, obtaining and processing exception data, and generating quick access links, solving the problem of low manual monitoring efficiency, realizing rapid exception discovery and processing of applets, improving monitoring accuracy and efficiency, and ensuring The stability and user experience of the applet.

CN118964133APending Publication Date: 2024-11-15创优数字科技(广东)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411070565.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing mini-program abnormal monitoring methods rely on manual labor and are inefficient and cannot detect abnormalities in time, which affects the user experience and the stability of mini-programs.

Method used

By setting up timing tasks to monitor applet exceptions, obtain exception data, determine the location of the exception and generate a quick access link, and send it to the background server for alarms, realizing automated exception monitoring and rapid processing.

Benefits of technology

It improves the efficiency and accuracy of abnormal monitoring, promptly detects and handles abnormalities, ensures the stability and user experience of the mini program, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964133A_ABST
    Figure CN118964133A_ABST
Patent Text Reader

Abstract

The invention discloses an applet exception monitoring method and device, equipment and a storage medium. Whether an applet is abnormal or not is monitored by setting a timed task; when the monitoring is abnormal, acquiring abnormal data; obtaining a source file corresponding to the applet, and determining an abnormal position corresponding to the abnormal data in the source file; generating a quick access link according to the abnormal position; and sending the quick access link to a background server and giving an alarm. According to the scheme, the timing task is set, and the abnormality of the applet is monitored regularly and regularly by using the timing task, so that the monitoring efficiency can be improved, and the abnormality can be found in time; according to the method, the abnormal data is acquired, the corresponding abnormal position in the source file is determined, and the quick access link is generated according to the abnormal position, so that a background server can perform quick access, the abnormal data is solved, meanwhile, an alarm is given to remind the background server to perform timely processing, the monitoring accuracy and rapidness are improved, and the user experience is improved. And the stability of the applet and the user experience are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of mini-program anomaly monitoring, and specifically to a mini-program anomaly monitoring method, device, equipment and storage medium. Background Art

[0002] As an emerging application form of mobile Internet, mini programs are rapidly gaining popularity due to their convenience and lightweight features. However, mini programs may encounter various anomalies during the development and operation process. Therefore, mini programs need to be monitored to ensure their normal operation.

[0003] The existing exception monitoring methods for mini programs usually rely on manual work, but manual monitoring is inefficient and cannot detect exceptions in a timely manner, which will directly affect the user experience and the stability of the mini program. Summary of the invention

[0004] In view of this, the present application provides a mini-program exception monitoring method, device, equipment and storage medium to solve the problem of low efficiency of manual monitoring and failure to detect anomalies in a timely manner, which directly affects the user experience and stability of the mini-program.

[0005] To achieve the above objectives, the proposed solution is as follows:

[0006] In a first aspect, a method for monitoring anomalies of a mini program includes:

[0007] Set up a scheduled task, and use the scheduled task to monitor whether the mini program has any abnormalities;

[0008] When an exception is detected in the mini program, obtaining exception data;

[0009] Obtain a source file corresponding to the mini-program, and determine an abnormal position corresponding to the abnormal data in the source file;

[0010] generating a quick access link according to the abnormal location;

[0011] The quick access link is sent to a backend server and an alarm is issued.

[0012] Preferably, the setting of the scheduled task includes:

[0013] Select multiple time periods in a day, and for each of the time periods, generate configuration items according to the time period;

[0014] Call the pre-acquired task scheduling library and configure the timer according to the configuration items;

[0015] The timers corresponding to the various time periods are combined as a timed task.

[0016] Preferably, determining the abnormal position corresponding to the abnormal data in the source file includes:

[0017] Extract the file path, abnormal line number, and abnormal column number corresponding to the abnormal data;

[0018] Locate the abnormal page number corresponding to the abnormal data from the source file according to the file path;

[0019] The abnormal position is located at the abnormal page number of the source file using the abnormal line number and the abnormal column number.

[0020] Preferably, generating a quick access link according to the abnormal location includes:

[0021] Obtaining source code information at the abnormal location;

[0022] Generate a unique identification code corresponding to the abnormal data using the abnormal location and source code information;

[0023] A quick access link is generated based on the unique identification code.

[0024] Preferably, the generating a unique identification code corresponding to the abnormal data by using the abnormal position and source code information includes:

[0025] Converting the source code information into a first identification code;

[0026] Determine an abnormal row number and an abnormal column number from the abnormal position, and convert the abnormal row number and the abnormal column number into coordinate values;

[0027] Combining the first identification code with the coordinate value to obtain a second identification code;

[0028] The second identification code is modified according to a preset length to obtain a unique identification code.

[0029] Preferably, after sending the quick access link to the backend server and issuing an alarm, the method further comprises:

[0030] When the quick access link is clicked, jump to the target page of the quick access link;

[0031] Extracting source code information corresponding to the abnormal data from the target page;

[0032] An abnormality analysis is performed on the abnormal data based on the source code information to obtain an analysis result.

[0033] Preferably, performing anomaly analysis on the abnormal data based on the source code information to obtain an analysis result includes:

[0034] Determine each execution call link of the source code information from the target page;

[0035] Determine whether there is an abnormality in each execution call link;

[0036] If at least one of the execution call links is abnormal, the execution call link with the abnormality is checked to obtain an analysis result;

[0037] If there is no abnormality in each of the execution call links, the source code information is compared with the abnormal data to determine whether there is an abnormal source code in the source code information;

[0038] If there is an abnormal source code in the source code information, the abnormal source code constitutes the analysis result;

[0039] If there is no abnormal source code in the source code information, the analysis result is determined to be an abnormal monitoring error.

[0040] In a second aspect, a mini-program abnormality monitoring device includes:

[0041] A scheduled task monitoring module is used to set a scheduled task and use the scheduled task to monitor whether the mini program has any abnormality;

[0042] An abnormal data acquisition module is used to acquire abnormal data when an abnormality is detected in the mini program;

[0043] An abnormal position determination module, used to obtain a source file corresponding to the mini-program, and determine an abnormal position corresponding to the abnormal data in the source file;

[0044] A quick access link generation module, used to generate a quick access link according to the abnormal location;

[0045] The link sending and alarm module is used to send the quick access link to the background server and issue an alarm.

[0046] In a third aspect, a mini-program abnormality monitoring device includes a memory and a processor;

[0047] The memory is used to store programs;

[0048] The processor is used to execute the program to implement the various steps of the mini-program anomaly monitoring method as described in any one of the first aspects.

[0049] In a fourth aspect, a storage medium stores a computer program thereon, and when the computer program is executed by a processor, the various steps of the mini-program anomaly monitoring method as described in any one of the aspects are implemented.

[0050] It can be seen from the above technical scheme that this application sets a timed task and uses the timed task to monitor whether the applet has an abnormality; when the applet is detected to have an abnormality, the abnormal data is obtained; the source file corresponding to the applet is obtained, and the abnormal position corresponding to the abnormal data in the source file is determined; a quick access link is generated according to the abnormal position; the quick access link is sent to the background server and an alarm is issued. This scheme sets a timed task and uses the timed task to regularly monitor the applet for abnormalities, which can improve the monitoring efficiency and timely discover abnormalities; when the applet is detected to have an abnormality, the abnormal data is obtained, and the abnormal position corresponding to the abnormal data in the source file is determined, and a quick access link is generated according to the abnormal position, which can be quickly accessed by the background server to solve the abnormal data, and an alarm is issued to remind the background server to handle it in time, thus ensuring the rapid discovery, summary and transmission of abnormalities, improving the accuracy and rapidity of monitoring, and is very beneficial to the stability of the applet and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0052] Figure 1 An optional flow chart of a method for monitoring anomalies of a small program provided in an embodiment of the present application;

[0053] Figure 2 A schematic diagram of the structure of a small program abnormality monitoring device provided in an embodiment of the present application;

[0054] Figure 3 A schematic diagram of the structure of a mini-program anomaly monitoring device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0056] As an emerging application form of mobile Internet, mini programs are rapidly gaining popularity due to their convenience and lightweight features. However, mini programs may encounter various anomalies during the development and operation process. Therefore, mini programs need to be monitored to ensure their normal operation.

[0057] The existing exception monitoring methods for mini programs usually rely on manual work, but manual monitoring is inefficient and cannot detect exceptions in a timely manner, which will directly affect the user experience and the stability of the mini program.

[0058] The embodiment of the present invention provides a method for monitoring applet anomalies. The method can be applied to various computer terminals or smart terminals. The execution subject can be a processor or server of the computer terminal or smart terminal. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0059] S1: Set a scheduled task, and use the scheduled task to monitor whether the mini program has any abnormalities.

[0060] In order to promptly detect whether any abnormality occurs in the mini-program, this application sets up a scheduled task. This scheduled task can monitor whether any abnormality occurs in the mini-program. Compared with the manual monitoring in the prior art, it is more timely and can ensure the normal operation of the mini-program, and promptly detect and handle any abnormality in the mini-program.

[0061] You can use node-schedule of Node.js to set up scheduled tasks. Node.js is an open source, cross-platform JavaScript runtime environment that can execute code and allow JavaScript to run on the server side. node-schedule is a third-party task library for Node.js, which is used to schedule tasks in Node.js applications to be executed at a certain point in the future. It can support multiple functions, such as scheduled data cleaning, scheduled email sending, scheduled backup, scheduled data monitoring, etc.

[0062] Abnormal situations of mini programs usually include two aspects, namely the technical level and the user experience level. Technical level anomalies include mini program initialization failure, network request failure, network anomaly, version incompatibility, insufficient memory, server anomaly, third-party interface call failure, etc. User experience level anomalies include loading failure, page jump failure, mini program function failure, page layout disorder, user information verification failure, etc.

[0063] Regardless of which of the above abnormal situations occurs, the scheduled task can monitor it.

[0064] S2: When an exception is detected in the mini program, obtain the exception data.

[0065] When an exception is detected in the Mini Program, the exception data is obtained immediately. The exception data refers to the data generated during the operation of the Mini Program that is inconsistent with normal operation or expected behavior, such as the data corresponding to the abnormal part, or it can be a collection of data information that causes the Mini Program to have errors. Subsequent monitoring and analysis can be carried out based on the exception data.

[0066] S3: Obtain a source file corresponding to the mini-program, and determine an abnormal position corresponding to the abnormal data in the source file.

[0067] The source file of a mini program usually contains a series of files and directories used to define the mini program's functions, interfaces, and behaviors. These files and directories together constitute the basis for the development and deployment of the mini program, and the location of the source code data corresponding to the abnormal data in the source file can be extracted from them as the abnormal location.

[0068] In order to better identify the abnormal situation, this solution traces the source, that is, searches for errors that may cause the mini program to be abnormal from the source files corresponding to the mini program. This can efficiently and accurately find the source and cause of the abnormality.

[0069] The abnormal position refers to the position where the abnormal data and the corresponding source code data in the source file are located. The abnormality does not refer to the position where the abnormality exists in the source file.

[0070] S4: Generate a quick access link according to the abnormal location.

[0071] After locating the abnormal position, the abnormal analysis or inspection can be carried out. In order to facilitate the background server to quickly and accurately find the abnormal position for abnormal analysis, this solution generates a quick access link according to the abnormal position after locating the abnormal position. This quick access link contains abnormal data, the execution process of the applet, and other information of the applet. The abnormal situation of the applet can be obtained from the quick access link. In the prior art, after determining the abnormal position, the user needs to manually search for the abnormal position in the source file, and cannot quickly send the abnormality-related information to the background server, which greatly affects the efficiency of monitoring and the normal operation of the applet. Therefore, this solution reduces manual intervention and reduces operation and maintenance costs through the above-mentioned process of automatically locating the abnormal position and generating a quick access link.

[0072] S5: Send the quick access link to the backend server and issue an alarm.

[0073] The quick access link is sent to the background server, and an alarm is issued at the same time, so that the background server can respond quickly and perform abnormal analysis, which improves the speed of resolving abnormal problems.

[0074] It can be seen from the above technical scheme that this application sets a timed task and uses the timed task to monitor whether the applet has an abnormality; when the applet is detected to be abnormal, the abnormal data is obtained; the source file corresponding to the applet is obtained, and the abnormal position corresponding to the abnormal data in the source file is determined; a quick access link is generated according to the abnormal position; the quick access link is sent to the background server and an alarm is issued. This scheme sets a timed task and uses the timed task to regularly monitor the applet for abnormalities, which can improve the monitoring efficiency and timely discover abnormalities; when the applet is detected to be abnormal, the abnormal data is obtained, and the abnormal position corresponding to the abnormal data in the source file is determined, and a quick access link is generated according to the abnormal position, which can be quickly accessed by the background server to solve the abnormal data, and an alarm is issued to remind the background server to handle it in time. The stability of the applet reflects the reputation and brand value of the enterprise corresponding to the applet. The user experience directly affects the user satisfaction and retention rate. Therefore, this scheme ensures the rapid discovery, summary and transmission of abnormalities, improves the accuracy and rapidity of monitoring, and is very beneficial to the stability of the applet and the user experience.

[0075] In the method provided in the embodiment of the present invention, the process of setting a scheduled task is specifically described as follows:

[0076] Select multiple time periods in a day, and for each of the time periods, generate configuration items according to the time period;

[0077] Call the pre-acquired task scheduling library and configure the timer according to the configuration items;

[0078] The timers corresponding to the various time periods are combined as a timed task.

[0079] Specifically, in order to ensure the real-time monitoring, multiple time periods can be set, and a one-hour scheduled task can be set every 5 minutes, or the time period from 6 am to 11 pm every day can be set as the time period for the scheduled task. The time period can be set independently according to user needs or the stability performance of the mini program, and this embodiment does not limit this.

[0080] After setting multiple time periods, corresponding configuration items are generated for each time period. The configuration items are used to configure scheduled tasks, that is, calling the pre-acquired task scheduling library, such as node-schedule, and generating corresponding timers for each configuration item. The timers will execute monitoring tasks at fixed times. These timers are combined as scheduled tasks for this solution.

[0081] The setting of scheduled tasks can also be set according to the specific circumstances of the applet, thus ensuring the flexibility of the monitoring method provided by this solution.

[0082] The following is a detailed description of the process of determining the abnormal position corresponding to the abnormal data in the source file in the present application.

[0083] Extract the file path, abnormal line number, and abnormal column number corresponding to the abnormal data;

[0084] Locate the abnormal page number corresponding to the abnormal data from the source file according to the file path;

[0085] The abnormal position is located at the abnormal page number of the source file using the abnormal line number and the abnormal column number.

[0086] Specifically, the abnormal line number refers to the line number of the source code data corresponding to the abnormal data in the source file, and the abnormal column number refers to the column number of the source code data corresponding to the abnormal data in the source file. The file path can locate the abnormal page number in the source file. After clarifying the file path, abnormal line number, and abnormal column number, the abnormal position can be accurately located. Therefore, the above solution needs to extract the file path, abnormal line number, and abnormal column number corresponding to the abnormal data.

[0087] Among them, the existing method relies on the Sourcemap plug-in. The Sourcemap plug-in is a software tool or software module that requires manual input of file path, line number and column number to query the abnormal position. However, this solution does not require the Sourcemap plug-in. After extracting the file path, abnormal line number and abnormal column number, the abnormal position can be quickly located by directly using the Sourcemap program. The Sourcemap program is a mechanism and process for users to generate and maintain source code mapping, which generates one or more files containing the mapping relationship between source code and compiled code. The abnormal position can be easily and quickly located through the file path, abnormal line number and abnormal column number, which greatly improves the efficiency of abnormal tracing.

[0088] The above scheme illustrates the process of determining the abnormal position corresponding to the abnormal data in the source file in the present application, and the following embodiment explains in detail the process of generating a quick access link according to the abnormal position in the present application.

[0089] Obtaining source code information at the abnormal location;

[0090] Generate a unique identification code corresponding to the abnormal data using the abnormal location and source code information;

[0091] A quick access link is generated based on the unique identification code.

[0092] Specifically, at the abnormal position of the source file, there is source code information corresponding to the abnormal data, so subsequent abnormal analysis can be performed based on the source code information. In order to facilitate the background server to quickly and concisely go to the abnormal position for abnormal analysis, this solution uses the abnormal position and source code information to generate a quick access link. In this way, abnormal situations can be sent and received in the background server anytime and anywhere without omissions and mistransmissions, thereby ensuring the accuracy of abnormal monitoring. The staff of the background server can click on the quick access link to obtain data or information related to the abnormality.

[0093] Before generating a quick access link, first use the abnormal location and source code information to generate a unique identification code corresponding to the abnormal data. The specific process may include:

[0094] Converting the source code information into a first identification code;

[0095] Determine an abnormal row number and an abnormal column number from the abnormal position, and convert the abnormal row number and the abnormal column number into coordinate values;

[0096] Combining the first identification code with the coordinate value to obtain a second identification code;

[0097] The second identification code is modified according to a preset length to obtain a unique identification code.

[0098] The source code information may be converted into the first identification code by character encoding, digital encoding (binary encoding, hexadecimal encoding, etc.), or by using a hash function MD5

[0099] (Message-Digest Algorithm 5), calculates a fixed-length digest of source code information of any length, and at the same time ensures the integrity and authenticity of the data, and the abnormal row number and abnormal column number represent the row and column information, establishes a two-dimensional rectangular coordinate system at the abnormal page number, and determines the abnormal position in the coordinate system according to the row and column information, and determines the coordinate value therefrom; since the abnormal position and source code information represent the occurrence of the abnormal situation and also include relevant content of the abnormal situation, it is very accurate to use the first identification code and the coordinate value to construct an identification code that uniquely corresponds to the abnormal data, and the two can be combined, such as adding the coordinate value in front of the first identification code, or splicing the coordinate value behind the first identification code, and this embodiment does not limit this.

[0100] In addition, considering the simplicity, convenience and transmittability of the quick access link, the length of the quick access link should not be too long, so the second identification code is modified according to the preset length to obtain a standard unique identification code.

[0101] Furthermore, after sending the quick access link to the backend server and issuing an alarm, the present application further includes:

[0102] When the quick access link is clicked, jump to the target page of the quick access link;

[0103] Extracting source code information corresponding to the abnormal data from the target page;

[0104] An abnormality analysis is performed on the abnormal data based on the source code information to obtain an analysis result.

[0105] Specifically, after receiving the alarm, the staff member clicks on the quick access link, and the staff member's current page will jump to the target page of the quick access link; or after receiving the quick access link and the alarm, the backend server will automatically click on the quick access link to query the exception after it is clear that an exception has occurred in the mini-program, and obtain data information about the abnormal situation, that is, extract the source code information corresponding to the abnormal data from the target page, and use the source code information to perform exception analysis on the abnormal data to obtain the analysis result.

[0106] In the process of sending quick access links to the background server, an efficient data transmission mechanism can be used, such as RESTful API (Representational State Transfer Application Programming Interface), which is a network application design style and development method based on the HTTP protocol. It operates resources through standard HTTP methods, so that various services on the network can be called uniformly and conveniently. Therefore, the use of RESTful API can ensure that the quick access link can be transmitted to the background server in real time, securely and completely.

[0107] There are many ways to issue an alarm, such as sending an alarm message to the background server, or directly initiating an alarm to the background server. Alarms can also be issued through the artificial intelligence mechanism on the software where the mini program is located. All of these can achieve the purpose of immediate alarm and realize rapid response to abnormal situations, shorten the time from abnormality discovery to repair, and reduce the impact of abnormalities on mini programs, users or businesses.

[0108] The process of performing an abnormality analysis on the abnormal data based on the source code information to obtain an analysis result includes the following steps:

[0109] Determine each execution call link of the source code information from the target page;

[0110] Determine whether there is an abnormality in each execution call link;

[0111] If at least one of the execution call links is abnormal, the execution call link with the abnormality is checked to obtain an analysis result;

[0112] If there is no abnormality in each of the execution call links, the source code information is compared with the abnormal data to determine whether there is an abnormal source code in the source code information;

[0113] If there is an abnormal source code in the source code information, the abnormal source code constitutes the analysis result;

[0114] If there is no abnormal source code in the source code information, the analysis result is determined to be an abnormal monitoring error.

[0115] Specifically, since there are many types of abnormal situations that may occur in the mini program, from the relationship between the abnormal data and the source code information, it is easy to ignore the execution call link. Therefore, first check the link, that is, determine the execution call links of the source code information from the target page, and then determine whether there is an abnormality in each execution call link. If at least one execution call link has an abnormality, it means that the abnormal situation may be caused by the abnormality of this execution call link. Then check this one or more execution call links with abnormalities to obtain analysis results; if all execution call links have no abnormal problems, it means that the problem is not in the link, then determine whether there is an abnormality in the source code information, that is, determine whether there is an abnormal source code in the source code information. If so, the abnormal source code is included in the analysis result for analysis. If not, it may be a monitoring error.

[0116] Furthermore, the background server can store quick access links to form an exception library for subsequent exception comparison and analysis, providing data support for the subsequent optimization process of the mini program, and can perform in-depth analysis and use data analysis tools to dig deep into abnormal data to identify potential problems, so as to achieve the purpose of early warning, that is, to prevent the mini program from having abnormalities and take some measures in advance.

[0117] After obtaining the analysis results, the analysis results can be displayed intuitively in the form of tables and lists to enhance the readability and comprehensibility of the abnormal analysis, and the analysis report can be automatically generated for saving. The staff can perform code repairs and improve the user experience based on the analysis report to improve the quality of the mini program.

[0118] and Figure 1 Corresponding to the method described above, the embodiment of the present invention also provides a small program abnormality monitoring device for Figure 1 In the specific implementation of the method, the applet abnormality monitoring device provided in the embodiment of the present invention can be used in a computer terminal or various mobile devices, combined with Figure 2 , introduce the small program abnormality monitoring device, such as Figure 2 As shown, the device may include:

[0119] A scheduled task monitoring module 10 is used to set a scheduled task and use the scheduled task to monitor whether an exception occurs in the mini-program;

[0120] The abnormal data acquisition module 20 is used to acquire abnormal data when an abnormality is detected in the mini program;

[0121] An abnormal position determination module 30 is used to obtain a source file corresponding to the mini-program and determine an abnormal position corresponding to the abnormal data in the source file;

[0122] A quick access link generation module 40, used to generate a quick access link according to the abnormal location;

[0123] The link sending and alarm module 50 is used to send the quick access link to the background server and issue an alarm.

[0124] It can be seen from the above technical scheme that this application sets a timed task and uses the timed task to monitor whether the applet has an abnormality; when the applet is detected to be abnormal, the abnormal data is obtained; the source file corresponding to the applet is obtained, and the abnormal position corresponding to the abnormal data in the source file is determined; a quick access link is generated according to the abnormal position; the quick access link is sent to the background server and an alarm is issued. This scheme sets a timed task and uses the timed task to regularly monitor the applet for abnormalities, which can improve the monitoring efficiency and timely discover abnormalities; when the applet is detected to be abnormal, the abnormal data is obtained, and the abnormal position corresponding to the abnormal data in the source file is determined, and a quick access link is generated according to the abnormal position, which can be quickly accessed by the background server to solve the abnormal data, and an alarm is issued to remind the background server to handle it in time. The stability of the applet reflects the reputation and brand value of the enterprise corresponding to the applet. The user experience directly affects the user satisfaction and retention rate. Therefore, this scheme ensures the rapid discovery, summary and transmission of abnormalities, improves the accuracy and rapidity of monitoring, and is very beneficial to the stability of the applet and the user experience.

[0125] Furthermore, the embodiment of the present application provides a small program abnormality monitoring device. Optionally, Figure 3 The hardware structure diagram of the applet abnormality monitoring device is shown in FIG. Figure 3 The hardware structure of the applet exception monitoring device may include: at least one processor 01, at least one communication interface 02, at least one memory 03 and at least one communication bus 04.

[0126] In the embodiment of the present application, the number of the processor 01 , the communication interface 02 , the memory 03 , and the communication bus 04 is at least one, and the processor 01 , the communication interface 02 , and the memory 03 communicate with each other through the communication bus 04 .

[0127] The processor 01 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.

[0128] The memory 03 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory.

[0129] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to execute the following small program abnormality monitoring method, including:

[0130] Set up a scheduled task, and use the scheduled task to monitor whether the mini program has any abnormalities;

[0131] When an exception is detected in the mini program, obtaining exception data;

[0132] Obtain a source file corresponding to the mini-program, and determine an abnormal position corresponding to the abnormal data in the source file;

[0133] generating a quick access link according to the abnormal location;

[0134] The quick access link is sent to a backend server and an alarm is issued.

[0135] Optionally, the detailed functions and extended functions of the program may refer to the description of the mini-program anomaly monitoring method in the method embodiment.

[0136] The embodiment of the present application further provides a storage medium, which can store a program suitable for execution by a processor, and when the program is running, controls the device where the storage medium is located to execute the following applet abnormality monitoring method, including:

[0137] Set up a scheduled task, and use the scheduled task to monitor whether the mini program has any abnormalities;

[0138] When an exception is detected in the mini program, obtaining exception data;

[0139] Obtain a source file corresponding to the mini-program, and determine an abnormal position corresponding to the abnormal data in the source file;

[0140] generating a quick access link according to the abnormal location;

[0141] The quick access link is sent to a backend server and an alarm is issued.

[0142] Specifically, the storage medium may be a computer-readable storage medium, and the computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk or a ROM.

[0143] Optionally, the detailed functions and extended functions of the program may refer to the description of the mini-program anomaly monitoring method in the method embodiment.

[0144] In addition, the functional modules in the various embodiments of the present disclosure can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a live broadcast device, or a network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present disclosure.

[0145] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0146] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0147] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for monitoring anomalies of a small program, characterized in that: include: Set up a scheduled task and use the scheduled task to monitor whether the mini program has any abnormalities; When an exception is detected in the mini program, obtaining exception data; Obtaining a source file corresponding to the mini-program, and determining an abnormal position corresponding to the abnormal data in the source file; generating a quick access link according to the abnormal location; The quick access link is sent to the backend server and an alarm is issued.

2. The method according to claim 1, characterized in that The setting of the scheduled task includes: Select multiple time periods in a day, and for each time period, generate a configuration item according to the time period; Call the pre-acquired task scheduling library and configure the timer according to the configuration items; The timers corresponding to the various time periods are combined as a timed task.

3. The method according to claim 1, characterized in that Determining the abnormal position corresponding to the abnormal data in the source file includes: Extract the file path, abnormal row number, and abnormal column number corresponding to the abnormal data; Locating the abnormal page number corresponding to the abnormal data from the source file according to the file path; The abnormal position is located at the abnormal page number of the source file using the abnormal row number and the abnormal column number.

4. The method according to claim 1, wherein Generating a quick access link according to the abnormal location includes: Obtaining source code information at the abnormal location; Generating a unique identification code corresponding to the abnormal data using the abnormal location and source code information; A quick access link is generated based on the unique identification code.

5. The method according to claim 4, characterized in that The generating a unique identification code corresponding to the abnormal data by using the abnormal location and source code information includes: Converting the source code information into a first identification code; Determine an abnormal row number and an abnormal column number from the abnormal position, and convert the abnormal row number and abnormal column number into coordinate values; Combining the first identification code with the coordinate value to obtain a second identification code; The second identification code is modified according to a preset length to obtain a unique identification code.

6. The method according to claim 1, wherein After sending the quick access link to the backend server and issuing an alarm, the method further includes: When the quick access link is clicked, the page is redirected to the target page of the quick access link; Extracting source code information corresponding to the abnormal data from the target page; An abnormality analysis is performed on the abnormal data based on the source code information to obtain an analysis result.

7. The method according to claim 6, characterized in that The performing anomaly analysis on the abnormal data based on the source code information to obtain an analysis result includes: Determining each execution call link of the source code information from the target page; Determine whether there are any abnormalities in the execution call links; If at least one of the execution call links has an exception, the execution call link with the exception is checked to obtain an analysis result; If there is no abnormality in each of the execution call links, then comparing the source code information with the abnormal data to determine whether there is an abnormal source code in the source code information; If there is abnormal source code in the source code information, the abnormal source code constitutes the analysis result; If the abnormal source code does not exist in the source code information, the analysis result is determined to be an abnormal monitoring error.

8. A small program abnormality monitoring device, characterized in that: include: A scheduled task monitoring module is used to set scheduled tasks and use the scheduled tasks to monitor whether the mini-program has any abnormalities; An abnormal data acquisition module is used to acquire abnormal data when an abnormality occurs in the mini program; An abnormal location determination module, configured to obtain a source file corresponding to the mini-program and determine an abnormal location corresponding to the abnormal data in the source file; A quick access link generation module, configured to generate a quick access link according to the abnormal location; The link sending and alarm module is used to send the quick access link to the background server and issue an alarm.

9. A small program abnormality monitoring device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement the various steps of the mini-program anomaly monitoring method as described in any one of claims 1-7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the mini-program anomaly monitoring method as described in any one of claims 1 to 7 is implemented.