Large model-based front page exception prediction method and device, equipment and medium
Patent Information
- Application Number
- CN202611224500.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]本发明提供一种基于大模型的前端页面异常预测方法、装置、设备及介质,用以解决如何准确的预测目标应用前端页面的潜在异常的技术问题
[0010]上述基于大模型的前端页面异常预测方法、装置、设备及介质,所实现的方案中,可以通过客户端获取用户终端的目标应用,实时采集所述目标应用的前端页面的运行数据,并从所述运行数据中提取前端页面的特征信息;将所述前端页面的特征信息输入至预训练的大语言模型中,预测所述目标应用在未来预设时间段内妨碍业务操作正常运行的前端页面的异常类型;根据所述前端页面的特征信息与所述前端页面的异常类型,动态生成前端页面的修复策略,并对所述目标应用的前端页面执行所述修复策略。在本发明中,通过预训练的大语言模型对前端页面的特征信息进行推理分析,在异常实际发生前预测出未来预设时间段内的异常类型,为主动干预提供了时间窗口,实现了对目标应用前端页面潜在异常的准确预判。此外,根据预测得到的异常类型动态生成对应的修复策略并自动执行,实现了修复操作的快速响应与类型匹配,有效提升了前端异常修复的效率。
Smart Images

Figure CN122963896A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology and is applicable to the financial and medical fields. In particular, it relates to a method, device, equipment and medium for predicting front-end page anomalies based on a large model. Background Technology
[0002] In web application scenarios such as e-commerce transactions, financial payments, and online medical consultations, the stability of the front-end page directly affects business conversion rates and user experience. Especially in online subscriptions of financial products, medical appointments, and report inquiries, the front-end page needs to be compatible with various device types, network conditions, and user operation paths, leading to significant uncertainty in its operational status. Currently, front-end anomaly handling commonly employs a passive monitoring solution based on log collection and threshold alarms, combined with session replay to assist in troubleshooting. Specifically, this solution deploys scripts on user terminals to collect data on code execution anomalies, resource loading anomalies, and interface request anomalies during front-end page operation and reports this data to the server for aggregation and statistics. When the number or rate of anomalies exceeds a preset threshold, an alarm is triggered, notifying developers for manual investigation. Simultaneously, the user's operational sequence and network request link information are recorded when an anomaly occurs. Developers can reconstruct the operation path and environmental context before the anomaly by replaying the session logs to help locate intermittent problems.
[0003] However, existing solutions have significant shortcomings in terms of the timeliness of front-end page anomaly detection, the efficiency of troubleshooting in complex scenarios, and the ability to respond to differentiated issues. First, anomaly detection is delayed, only responding after an anomaly actually occurs and meets the alarm conditions. There is a time window between the occurrence of an anomaly and intervention in repair, during which business operations are continuously hampered. Second, in complex interactive pages containing multi-step forms and dynamic form items, user operation paths are highly diverse, and sporadic script anomalies triggered by specific device models or operation sequences are difficult to reproduce reliably. Session replay relies on manual analysis, resulting in low automation and causing problems to persist for a long time. In addition, during peak promotional periods, when instantaneous high concurrency causes interface delays, anomalies can only be passively reported. When resource loading anomalies occur in weak network environments or on older devices, strategies cannot be dynamically adjusted, making it difficult to guarantee basic availability in different scenarios.
[0004] Therefore, how to accurately predict potential anomalies in the front-end pages of a target application is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for predicting front-end page anomalies based on a large model, in order to solve the technical problem of how to accurately predict potential anomalies of the front-end page of a target application.
[0006] In a first aspect, the present invention provides a front-end page anomaly prediction method based on a large model, comprising: The target application on the user terminal is obtained, and the running data of the front-end page of the target application is collected in real time. Feature information of the front-end page is extracted from the running data. The feature information of the front-end page is input into a pre-trained large language model to predict the abnormal type of the front-end page that will hinder the normal operation of business within a preset time period of the target application. Based on the feature information and the anomaly type of the front-end page, a repair strategy for the front-end page is dynamically generated, and the repair strategy is executed on the front-end page of the target application.
[0007] Secondly, the present invention provides a front-end page anomaly prediction device based on a large model, comprising: The acquisition module is used to acquire the target application of the user terminal, collect the running data of the front-end page of the target application in real time, and extract the feature information of the front-end page from the running data. The prediction module is used to input the feature information of the front-end page into a pre-trained large language model to predict the abnormal type of the front-end page that will hinder the normal operation of business within a preset time period of the target application. The generation module is used to dynamically generate a repair strategy for the front-end page based on the feature information and the anomaly type of the front-end page, and to execute the repair strategy on the front-end page of the target application.
[0008] Thirdly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for predicting front-end page anomalies based on a large model.
[0009] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for predicting front-end page anomalies based on a large model.
[0010] The aforementioned method, apparatus, device, and medium for predicting front-end page anomalies based on a large model, implemented through a client, can acquire the target application on the user terminal, collect real-time operational data of the target application's front-end page, and extract feature information from the operational data. This feature information is then input into a pre-trained large language model to predict the anomaly type of the front-end page that will hinder normal business operations within a preset future time period. Based on the feature information and anomaly type of the front-end page, a repair strategy is dynamically generated, and the repair strategy is executed on the target application's front-end page. In this invention, by using a pre-trained large language model to infer and analyze the feature information of the front-end page, the anomaly type within a preset future time period is predicted before the actual occurrence of the anomaly, providing a time window for proactive intervention and achieving accurate prediction of potential anomalies on the target application's front-end page. Furthermore, the dynamic generation and automatic execution of corresponding repair strategies based on the predicted anomaly types enable rapid response and type matching of repair operations, effectively improving the efficiency of front-end anomaly repair. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram of an application environment for a front-end page anomaly prediction method based on a large model, according to an embodiment of the present invention.
[0013] Figure 2 This is a flowchart illustrating a front-end page anomaly prediction method based on a large model in one embodiment of the present invention.
[0014] Figure 3 yes Figure 2 A schematic diagram of a specific implementation method for step S10.
[0015] Figure 4 yes Figure 2 A schematic diagram of a specific implementation method for step S20.
[0016] Figure 5 yes Figure 2 A schematic diagram of a specific implementation method for step S30.
[0017] Figure 6 This is a schematic diagram of a front-end page anomaly prediction device based on a large model in one embodiment of the present invention.
[0018] Figure 7 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention.
[0019] Figure 8 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] The front-end page anomaly prediction method based on a large model provided in this invention can be applied to, for example... Figure 1 In the application environment, Figure 1 This is a schematic diagram of an application environment for a front-end page anomaly prediction method based on a large model, according to an embodiment of the present invention. The client communicates with the server via a network. The server can obtain the target application of the user terminal through the client, collect the running data of the front-end page of the target application in real time, and extract the feature information of the front-end page from the running data. The feature information of the front-end page is input into a pre-trained large language model to predict the anomaly type of the front-end page that will hinder the normal operation of business within a preset time period in the future. Based on the feature information and the anomaly type of the front-end page, a repair strategy for the front-end page is dynamically generated, and the repair strategy is executed on the front-end page of the target application. In this invention, the feature information of the front-end page is analyzed and reasoned using a pre-trained large language model, predicting the anomaly type within a preset time period before the actual occurrence of the anomaly, providing a time window for proactive intervention, and achieving accurate prediction of potential anomalies of the target application's front-end page. Furthermore, the corresponding repair strategy is dynamically generated and automatically executed based on the predicted anomaly type, achieving rapid response and type matching of the repair operation, effectively improving the efficiency of front-end anomaly repair. The present invention will be described in detail below through specific embodiments.
[0022] Please see Figure 2 As shown, Figure 2 This is a flowchart illustrating a front-end page anomaly prediction method based on a large model provided in an embodiment of the present invention. The front-end page anomaly prediction method based on a large model specifically includes the following steps: S10: Obtain the target application on the user terminal, collect the running data of the front-end page of the target application in real time, and extract the feature information of the front-end page from the running data. Specifically, such as... Figure 3The above, Figure 3 yes Figure 2 A schematic diagram of a specific implementation of step S10, which specifically includes the following steps S11-S13: S11: Collect code execution exception data and resource loading exception data generated by the front-end page during business operation execution, as well as the response status data of the front-end page interface requests. Specifically, in this embodiment of the invention, code execution exception data refers to runtime exception information generated by the front-end page when running JavaScript or other script code, including exception types such as type errors, reference errors, syntax errors, etc., exception occurrence locations such as the file name, line number, column number, exception stack information, and a snapshot of the page state at the time of the exception. Resource loading exception data refers to loading failure or loading timeout events that occur when the front-end page loads external resources. External resources include cascading stylesheet files, JavaScript files, image resources, font files, etc. This data includes at least the resource's Uniform Resource Locator (URI), resource type, reason for loading failure, and failure timestamp. Interface request response status data refers to the interface response status code, response time, response data size, and number of request retries recorded when the front-end page calls the back-end service interface through asynchronous requests. Taking a financial scenario as an example, when a user performs a subscription operation on a financial product subscription page, the front-end page will initiate multiple asynchronous interface requests in a short period of time to verify the user's account status, risk assessment level, and subscription amount. During this process, abnormal code execution data may be captured, such as a null pointer exception triggered when the subscription interest rate field returned by the processing interface is empty or has an abnormal format; abnormal resource loading data may also be captured, such as the risk disclosure document PDF preview component that is dynamically loaded in the subscription process failing to load due to cross-domain permission configuration errors; in addition, response status data of interface requests will also be collected, such as the subscription submission interface returning a 504 gateway timeout status code when the response times out during peak concurrency.
[0023] S12: Collect the user's operation behavior sequence when performing business operations on the front-end page, as well as the device operating environment data of the user terminal. Specifically, in this embodiment of the invention, the operation behavior sequence refers to the time sequence record of a series of interactive operations performed by the user on the front-end page during the execution of business operations. It includes at least the type of interactive event triggered by the user, the event trigger timestamp, the event target element identifier, and the interval between events. The interactive event types include click events, input events, scrolling events, and page jump events. By collecting the operation behavior sequence, a complete user operation path map can be constructed, reconstructing the complete interaction trajectory of the user from entering the page to completing the business operation or before an anomaly occurs. The device operating environment data refers to the hardware and software configuration information and current operating status parameters of the user terminal device, including at least the device model, operating system type and version, browser type and version, current network connection type, network signal strength, device memory usage, and processor load status. By collecting the operation behavior sequence and device operating environment data, user behavior dimensions and environmental dimensions can be incorporated into the scope of anomaly prediction, enabling subsequent feature extraction and anomaly prediction to adapt to different user behavior patterns and environmental states. Taking a financial scenario as an example, when a user performs a purchase operation on the fund product details page, if the user clicks the "Buy Now" button multiple times in a series with an unusually fast operation frequency, the click event sequence and its extremely short time interval will be completely recorded as an operation behavior sequence. At the same time, device operating environment data can detect that the current network type is a weak 4G signal and the device memory usage rate is above 85%. The combination of the above environmental data and the rapid click sequence can detect in advance the risk of page lag or duplicate submissions triggered by repeated clicks due to slow device response.
[0024] S13: Based on the collected code execution exception data, resource loading exception data, response status data, operation behavior sequences, and device operating environment data, the feature information of the front-end page is extracted. Specifically, in this embodiment of the invention, firstly, the collected code execution exception data is encoded for exception types and statistically analyzed for exception frequency, mapping different exception types to corresponding category feature vectors; then, the resource loading exception data is analyzed for statistical features such as resource loading failure rate, distribution of failed resource types, and distribution of loading time; next, the response status data is analyzed for interface response time series and statistically analyzed for status code distribution, extracting interface health features; then, the operation behavior sequences are processed for sequence length normalization, event type encoding, and time interval feature processing, extracting user operation mode features; finally, the device operating environment data is processed for category encoding and numerical normalization, extracting device performance features and environmental status features; the above features are fused and spliced to form a unified feature vector as the feature information of the front-end page. By extracting the above feature information, the original collected data can be transformed into a standard format input suitable for large language model processing, providing high-quality quantitative basis for subsequent model inference. Taking a financial scenario as an example, if the subscription submission interface times out three times in a row, and the user repeatedly clicks the submit button while waiting, and the device operating environment is detected as having normal Wi-Fi network but high memory usage, the extracted feature information can include the interface timeout frequency feature value of 3 times, the user's repeated click behavior feature value of 5 times per minute, and the device memory high load feature value of 88%. After the feature information is encoded, it is input into the large language model. The model can use this information to comprehensively determine whether the abnormal interface response is caused by excessive server load or insufficient local device performance, thereby predicting that subsequent pages may experience abnormalities such as unresponsive interfaces or page freezes.
[0025] S20: Input the feature information of the front-end page into a pre-trained large language model to predict the anomaly type of the front-end page that will hinder the normal operation of business within a preset time period for the target application. Specifically, such as... Figure 4 The above, Figure 4 yes Figure 2 A schematic flowchart of a specific implementation of step S20 includes the following steps S21-S23: S21: The feature information of the front-end page is constructed into serialized text describing the current page state, user operation context, and device environment. Specifically, in this embodiment of the invention, the current page state information includes the page URL, page dwell time, page visibility status, and currently completed business operation stage; the user operation context information includes the sequence of operation steps performed by the user, the currently focused page element, the type and time of the most recent interaction event, and the form filling progress; the device environment information includes the device model, operating system and version, browser and version, network type, signal strength, and memory usage. The above information is combined according to a preset text template to form a continuous serialized text. For example, the feature information is constructed into serialized text in the following form: The current page is a product subscription page, identity verification and risk assessment have been completed, the subscription amount is being filled in, and the page dwell time is 45 seconds; the user's most recent operation is clicking the submit button, which was clicked 4 times consecutively within 3 seconds. Taking a financial scenario as an example, after a user fills in the subscription amount on a financial product subscription page and clicks submit, the characteristic information is constructed into serialized text: The current page is an equity fund subscription page; the user has completed the risk assessment; the subscription amount is 100,000 yuan; the submit button has been clicked; the user is currently waiting for the server to return the result; the page stay time is 35 seconds; the user's operation context is that the user clicked the submit button 3 times consecutively within 30 seconds, with an interval of approximately 5 seconds between each click; the device environment is a flagship mobile phone of a certain brand, the operating system is iOS 16, the browser is Safari 16, the network type is Wi-Fi, the signal strength is good, and the device memory usage is 75%. This serialized text completely describes the page state, operation behavior, and device environment when the user is about to complete the subscription operation, providing a sufficient information foundation for subsequent large language model inference analysis.
[0026] S22: The serialized text is input into a pre-trained large language model to perform inference and analysis of the temporal and causal relationships between the data, thereby obtaining the associated anomaly patterns between the data. Specifically, in this embodiment of the invention, temporal relationship refers to the sequential order and interval pattern between different data events in the time dimension, including the sequential order between page loading and interface requests, the temporal sequence between user operations and anomaly occurrences, and the response sequence between multiple interface requests; causal relationship refers to the causal relationship and dependency logic between different data events, including interface requests triggered by user operations, subsequent resource loading retry caused by interface response failures, and page rendering interruption caused by script anomalies. The pre-trained large language model performs context encoding and attention mechanism calculation on the input serialized text. Through the semantic understanding capability of the model, it identifies the implicit relationships between different entities and events in the text, infers the anomaly propagation path and risk transmission chain existing in the current page running state, and finally outputs structured associated anomaly pattern information. The associated anomaly pattern refers to the combination of abnormal features identified from multi-dimensional data that reflects the regular correlation and dependency between different data events. Taking a financial scenario as an example, after inputting the constructed serialized text of the financial scenario into a pre-trained large language model, the model performs inference analysis on temporal and causal relationships: the time interval between a user's three consecutive clicks of the submit button is approximately 5 seconds, while the response time of the subscription submission interface gradually increases from 2 seconds the first time to 8 seconds the third time. There is a positive temporal correlation between the interface response time and the user's retry behavior. The model further infers causal relationships, determining that the increasingly slow interface response leads to repeated retries by the user, which in turn exacerbates the server load pressure, forming a vicious cycle. There is a causal transmission chain among the three. The final abnormal correlation pattern output by the model is a positive feedback anomaly pattern between the continuously increasing interface response delay and the user's high-frequency retry behavior.
[0027] S23: Based on the correlation anomaly patterns between various data, predict the anomaly types of the front-end pages that will hinder the normal operation of the target application within a preset time period in the future; wherein, the anomaly types include at least one of script execution anomalies, interface request anomalies, resource loading failures, and page rendering anomalies. Specifically, in this embodiment of the invention, the large language model, based on the correlation anomaly patterns obtained through inference, combined with the current page state in the serialized text, user operation context, and device environment information, infers the most likely anomaly type to occur within a preset time period if the user continues the current operation path under the above correlation anomaly patterns. Script execution anomalies refer to uncaught anomalies that occur when the front-end page runs JavaScript code, including type errors, reference errors, syntax errors, etc.; interface request anomalies refer to timeouts, failures, or returned exception status codes that occur when the front-end page calls the back-end interface; resource loading failures refer to loading timeouts, loading failures, or resource unavailability that occur when the front-end page loads external resources; page rendering anomalies refer to white screens, layout errors, missing key areas, or ineffective interactive responses that occur during the rendering process of the front-end page. Taking the medical scenario as an example, the large language model, based on the output correlation anomaly pattern, namely the mutually aggravating anomaly pattern between high-frequency user swiping operations and image resource loading timeouts in a weak network environment, combined with the current page state in the serialized text (loading image data), the user operation context (frequent swiping to view the image list), and the device environment (weak 4G network), predicts that within the next 30 seconds, if the user continues to swipe rapidly and the network signal does not improve, the image resource loading failure rate will continue to rise, eventually causing the image display area to be rendered as an empty placeholder area due to the inability to obtain image data, i.e., page rendering anomaly.
[0028] S30: Based on the feature information and the anomaly type of the front-end page, dynamically generate a repair strategy for the front-end page, and execute the repair strategy on the front-end page of the target application. Specifically, such as... Figure 5 The above, Figure 5 yes Figure 2 A schematic flowchart of a specific implementation of step S30 includes the following steps S31-S34: S31: Based on the anomaly type of the front-end page, determine the repair strategy type that matches the anomaly type. Specifically, in this embodiment of the invention, the mapping relationship between anomaly types and repair strategy types is pre-configured, with different anomaly types corresponding to different repair strategy types. By establishing the mapping relationship between anomaly types and repair strategy types, the corresponding repair strategy type can be quickly matched based on the predicted anomaly type, providing a strategy selection basis for subsequent targeted repair operations.
[0029] S32: If the repair strategy type is hot code update, then obtain the repaired code snippet matching the exception type of the front-end page from the server, and replace the original code snippet that caused the exception in the front-end page with the repaired code snippet. Specifically, in this embodiment of the invention, when the exception type is a script execution exception, it indicates that an uncaught exception occurred when the front-end page was running JavaScript code. This type of exception is usually caused by code logic errors or compatibility issues, and needs to be resolved by correcting the code itself. Therefore, the matching repair strategy type is hot code update. Specifically, it includes the following steps S321-S323: S321: Based on the exception type of the front-end page, determine the location information of the original code segment that caused the exception in the front-end page. Specifically, in this embodiment of the invention, the location information of the original code segment that caused the exception in the front-end page is determined based on the exception type of the front-end page. The location information refers to the specific location of the original code segment in the code file of the front-end page, which includes at least the file name, function name, line number, and column number of the code. After the exception type is predicted, the location information of the corresponding original code segment is found from the pre-stored code mapping relationship according to the exception type. The code mapping relationship is a pre-established data structure used to record the correspondence between different exception types and the code location that caused the exception. The establishment methods include: generating a mapping relationship table between the source code location and the runtime execution code location through the compiler during the code compilation stage, extracting the code location information from the exception stack information recorded by the exception capture mechanism during the code execution stage, or pre-marking the location information of key code segments through code static analysis. By determining the location information of the original code segment, the specific location of the code that caused the exception can be accurately located, providing an accurate location basis for subsequently obtaining the corresponding repaired code segment from the server.
[0030] S322: Based on the location information of the original code fragment, obtain the repaired code fragment matching the exception type from the server. Specifically, in this embodiment of the invention, based on the location information of the original code fragment, obtain the repaired code fragment matching the exception type from the server. The repaired code fragment refers to a corrected version of code generated in advance by developers or automation tools for a specific exception type, used to replace the original code fragment, and is stored in the code repair library on the server. Specifically, the front-end page sends a code retrieval request to the server based on the determined location information of the original code fragment. This request carries at least the exception type identifier, the file name, function name, line number, and column number from the location information.
[0031] S323: Delete the execution context corresponding to the original code fragment in the front-end page, and replace the original code fragment with the repaired code fragment. Specifically, in this embodiment of the invention, after obtaining the repaired code fragment, the front-end page first locates the execution context corresponding to the original code fragment in memory, and releases the memory resources occupied by the execution context by calling the execution context's destruction method or through garbage collection; then, it uses DOM manipulation or JavaScript dynamic code loading mechanisms to replace the text content of the original code fragment with the text content of the repaired code fragment; finally, it re-executes the repaired code fragment, making the repaired code effective in the current page environment. By deleting the execution context corresponding to the original code fragment, it is ensured that variables and functions defined in the original code fragment are no longer referenced after the execution context is destroyed, avoiding memory leaks caused by residual execution context.
[0032] S33: If the repair strategy type is resource degradation, then the resource loading of the front-end page is downgraded according to the network status data in the feature information. Specifically, in this embodiment of the invention, network status data is first extracted from the feature information, including the current network connection type, network signal strength, and network latency; then, the current network quality level is determined according to the network status data, which includes four levels: excellent, good, medium, and poor; when the network quality level is poor or medium, resource degradation processing is triggered. Resource degradation processing includes switching the high-definition image to be loaded to the corresponding low-definition preview image, or switching the large-sized script file to a compressed version, or redirecting the resource file loading request from the main content distribution network node to the backup content distribution network node, or delaying the loading of non-first-screen resources. Through resource degradation processing, the requirements of network bandwidth and response time for resource loading can be reduced without affecting the core functions of business operations, thereby improving the success rate of resource loading. Taking a financial scenario as an example, the exception type of the fund subscription page is an interface request exception, but the corresponding resource degradation strategy is executed according to the network status data in the feature information. The network status data extracted from the feature information shows that the network connection type is fourth-generation mobile communication technology, the signal strength is -105dBm, and the network latency is 350ms. The current network quality level is judged to be poor, triggering resource degradation processing. The front-end page redirects the loading request of the risk disclosure statement PDF file that needs to be loaded in the subscription process to the backup content distribution network node. At the same time, the high-definition graph of the product yield curve on the subscription page is switched to a low-definition preview image, and the loading of the fund manager introduction video that is not on the first screen is delayed until the user completes the subscription operation.
[0033] S34: If the repair strategy type is interaction optimization, then based on the business operation context in the feature information, change the availability status of the interactive component associated with the exception type on the front-end page, and generate a prompt message indicating that the interactive component is currently unavailable. Specifically, this includes the following steps S341-S343: S341 determines the core process components and auxiliary function components in the front-end page based on the business operation context in the feature information. Specifically, in this embodiment of the invention, the front-end page identifies whether each interactive component on the current page belongs to a core process component or an auxiliary function component based on the current process stage information recorded in the business operation context and a pre-configured component type mapping table. The component type mapping table is a pre-established data structure used to record the type affiliation relationship of each interactive component under different business operation process stages. By distinguishing between core process components and auxiliary function components, it is possible to accurately identify regressible interaction optimization objects in subsequent steps, avoiding complete interruption of business operations due to misoperation of core process components. Taking a financial scenario as an example, the business operation context of the fund subscription page is that the subscription amount has been filled in and the subscription is about to be submitted. Based on this business operation context and the component type mapping table, the front-end page determines that the core process component is the submit subscription button, and the auxiliary function components include a coupon selection component, a profit calculator component, and a risk warning pop-up component. When the predicted exception type is an interface request exception and the exception is associated with the coupon calculation service interface, the front-end page identifies the coupon selection component in the auxiliary function components as the target to be optimized.
[0034] S342: When the interactive component associated with the exception type is the accessibility component, the availability state of the accessibility component is changed to an unavailable state. Specifically, in this embodiment of the invention, the front-end page can manipulate the Document Object Model (DOM) to set the disabled attribute of the DOM element of the target accessibility component to true, or add an unavailable style class to the DOM element, so that the component appears grayed out or hidden on the page. At the same time, all interactive event listeners bound to the component are removed to ensure that users cannot trigger the component's interactive logic by clicking or touching. By changing the availability state of the accessibility component to an unavailable state, the interactive entry point associated with the exception can be actively blocked when the server-side accessibility function is abnormal, avoiding repeated failures and poor user experience caused by users continuing to try to use the function. Taking a financial scenario as an example, when the predicted exception is a timeout in the coupon calculation service interface, and the interactive component associated with the exception type is determined to be a coupon selection component, which is an auxiliary function component, the front-end page sets the disabled property of the coupon selection component to true through DOM manipulation. At the same time, it adds an unavailable gray style class to the component and removes the click event listener on the component, so that the user sees the coupon selection area on the page as grayed out and unselectable, and cannot click to expand the coupon list.
[0035] S343: Based on the business operation context, generate a prompt message at the location associated with the auxiliary function component on the front-end page. Specifically, in this embodiment of the invention, the front-end page first determines the content of the prompt message based on the current exception type and business operation context, and then inserts the DOM element of the prompt message into the location area of the auxiliary function component or the location area immediately adjacent to the component. The prompt message is presented on the page in text form so that the user can see it directly. The content of the prompt message includes at least the name of the currently unavailable function and an explanation of the reason for its unavailability, and preferably also includes a suggested operation path for the user. By generating the prompt message, while blocking unavailable auxiliary function components, clear status feedback and alternative operation guidance can be provided to the user, avoiding confusion and misoperation when the function is unavailable. Taking a financial scenario as an example, after the front-end page changes the coupon selection component to an unavailable state, a prompt message text is inserted directly below the original location of the coupon selection component: "The discount function is temporarily unavailable. You can submit your subscription directly, and the system will calculate the fee based on the default rate." This prompt message clearly informs the user of the current unavailable status of the coupon selection function and guides the user to skip the coupon selection and submit their subscription directly. After seeing the message, users understand why the current discount feature is unavailable and follow the instructions to click the "Submit Purchase" button to complete the purchase.
[0036] In one embodiment of the present invention, after dynamically generating a repair strategy for the front-end page based on the feature information of the front-end page and the exception type, and executing the repair strategy on the front-end page of the target application, the method further includes: S41: Monitor the operational metrics of the front-end page of the target application after the repair strategy is executed. Specifically, in this embodiment of the invention, after the repair strategy is completed, the monitoring module in the front-end page begins to collect operational metric data after the repair execution: Page loading time refers to the time elapsed from when the user initiates a page request or triggers a page jump to when the page is fully loaded, reflecting the overall page response speed; Interface request success rate refers to the proportion of all asynchronous interface requests initiated by the front-end page that successfully return a status code of 2xx, reflecting the health of the interface call chain; Script execution error rate refers to the proportion of the number of uncaught exceptions that occur during the execution of JavaScript code on the front-end page to the total number of code executions, reflecting the stability of code execution; Resource loading success rate refers to the proportion of the number of resources that are successfully loaded to the total number of resource loading requests among all external resources loaded by the front-end page, reflecting the availability of the resource distribution network. By monitoring the operational metrics after the repair strategy is executed, the actual effect of the repair strategy can be quantitatively evaluated, providing an objective data basis for judging whether the repair strategy is successful and avoiding the uncertainty caused by relying on subjective human judgment. Taking a financial scenario as an example, after the hot-update code repair strategy for the fund subscription page was implemented, the monitoring module began collecting operational metrics data for the page within 30 seconds of the repair completion. These metrics included the success rate of subscription submission API requests, the script execution error rate, and page loading time. The collected operational metrics showed that the API request success rate increased from 60% to 95%, the script execution error rate decreased from 15% to 1%, and the page loading time stabilized within 800ms.
[0037] S42: Compare the operational indicators with the preset expected results, and calculate the deviation value between the operational indicators and the expected results. Specifically, in this embodiment of the invention, the actual values of each monitored operational indicator are compared with the preset expected results one by one, and the deviation value is calculated for each operational indicator to obtain a set of deviation values corresponding to each operational indicator. By calculating the deviation values, the abstract evaluation of the repair effect is transformed into a quantifiable numerical comparison, so that the degree of repair effect can be intuitively reflected by the numerical magnitude. Taking a financial scenario as an example, the operational indicators of the fund subscription page are compared with the preset expected results. The preset expected results are an interface request success rate of not less than 90%, a script execution error rate of not more than 5%, and a page loading time of not more than 1000ms. The actual monitored interface request success rate is 95%, with a deviation value of 5% from the expected results; the actual monitored script execution error rate is 1%, with a deviation value of 4% from the expected results; the actual monitored page loading time is 800ms, with a deviation value of 200ms from the expected results.
[0038] S43: When the deviation value is less than or equal to a preset threshold, the repair strategy is marked as a valid repair strategy. Specifically, in this embodiment of the invention, the deviation values of each calculated operating indicator are compared with their respective preset thresholds. If the deviation values of all operating indicators are less than or equal to their corresponding preset thresholds, the repair strategy is determined to have successfully repaired the anomaly of the front-end page, and the repair strategy is marked as a valid repair strategy. If the deviation value of any operating indicator is greater than its corresponding preset threshold, the repair strategy is determined to have failed to successfully repair the anomaly of the front-end page.
[0039] S44: When the deviation value is greater than the preset threshold, adjust the execution parameters corresponding to the repair strategy according to the deviation value, re-execute the repair strategy according to the adjusted execution parameters, and monitor the operating indicators of the front-end page after re-execution of the repair strategy. Specifically, in this embodiment of the invention, when the step determines that the deviation value of any operating indicator is greater than the corresponding preset threshold, firstly, determine the execution parameters to be adjusted and the adjustment range according to the magnitude of the deviation values of each operating indicator; the larger the deviation value, the larger the adjustment range. Then, re-execute the repair strategy according to the adjusted execution parameters. Finally, after the repair strategy is re-executed, return to continue monitoring the operating indicators of the front-end page, forming a closed-loop repair verification cycle. By adjusting the execution parameters according to the deviation value and re-executing the repair strategy, adaptive optimization of the repair strategy is achieved, enabling the repair strategy to be dynamically adjusted according to the actual execution effect, improving the applicability and effectiveness of the repair strategy under different scenarios and different degrees of anomalies. Taking a financial scenario as an example, if the deviation value of the success rate of the interface request on the fund subscription page is 25%, which is greater than the corresponding preset threshold of 10%, it is determined that the code hot update repair strategy has failed to repair the anomaly. Based on a 25% deviation, the execution parameters were adjusted, increasing the number of retries for hot code updates from the default 1 to 3, and the timeout for server-side code retrieval requests from 2000ms to 5000ms to address potential failures in retrieving repaired code due to network fluctuations. The hot code update repair strategy was then re-executed according to the adjusted parameters, meaning the repaired code snippets were retrieved from the server again and the replacement operation was performed. After the re-execution was completed, the operational metrics of the fund subscription page were monitored.
[0040] As can be seen, in the above solution, by using a pre-trained large language model to infer and analyze the feature information of the front-end page, the type of anomaly within a preset time period can be predicted before the anomaly actually occurs. This provides a time window for proactive intervention and achieves accurate prediction of potential anomalies on the target application's front-end page. Furthermore, by dynamically generating corresponding repair strategies based on the predicted anomaly types and automatically executing them, rapid response and type matching of repair operations are achieved, effectively improving the efficiency of front-end anomaly repair.
[0041] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0042] In one embodiment, a front-end page anomaly prediction device based on a large model is provided, which corresponds one-to-one with the front-end page anomaly prediction method based on a large model in the above embodiments. For example... Figure 6 As shown, Figure 6This is a schematic diagram of a front-end page anomaly prediction device based on a large model according to an embodiment of the present invention. The device includes an acquisition module 61, a prediction module 62, and a generation module 63. Detailed descriptions of each functional module are as follows: The acquisition module 61 is used to acquire the target application of the user terminal, collect the running data of the front-end page of the target application in real time, and extract the feature information of the front-end page from the running data. Prediction module 62 is used to input the feature information of the front-end page into a pre-trained large language model to predict the abnormal type of the front-end page that will hinder the normal operation of business within a preset time period of the target application. The generation module 63 is used to dynamically generate a repair strategy for the front-end page based on the feature information and the anomaly type of the front-end page, and to execute the repair strategy on the front-end page of the target application.
[0043] In one embodiment, the acquisition module 61 is specifically used for: Collect code execution exception data and resource loading exception data generated by the front-end page during business operation execution, as well as response status data of the front-end page interface requests; Collect the sequence of user actions when performing business operations on the front-end page, as well as the device operating environment data of the user terminal; Based on the collected code execution exception data, resource loading exception data, response status data, operation behavior sequence, and device operating environment data, the feature information of the front-end page is extracted.
[0044] In one embodiment, the prediction module 62 is specifically used for: The feature information of the front-end page is constructed into serialized text describing the current page state, user operation context, and device environment; The serialized text is input into a pre-trained large language model to perform inference analysis on the temporal relationship and causal association between the data, and to obtain the abnormal association patterns between the data. Based on the abnormal patterns of the correlation between various data, predict the types of anomalies that will hinder the normal operation of the front-end pages of the target application within a preset time period in the future; wherein, the anomaly types include at least one of script execution anomalies, interface request anomalies, resource loading failures, and page rendering anomalies.
[0045] In one embodiment, the generation module 63 is specifically used for: Based on the type of exception on the front-end page, determine the type of repair strategy that matches the exception type; If the repair strategy type is hot code update, then obtain the repaired code snippet that matches the exception type of the front-end page from the server, and replace the original code snippet that caused the exception in the front-end page with the repaired code snippet. If the repair strategy type is resource degradation, then the resource loading of the front-end page is degraded according to the network status data in the feature information; If the repair strategy type is interaction optimization, then based on the business operation context in the feature information, the availability status of the interactive component associated with the exception type in the front-end page is changed, and a prompt message indicating that the interactive component is currently unavailable is generated.
[0046] In one embodiment, the generation module 63 is further configured to: Based on the exception type of the front-end page, determine the location information of the original code segment in the front-end page that caused the exception; Based on the location information of the original code snippet, obtain the repaired code snippet that matches the exception type from the server; Delete the execution context corresponding to the original code snippet in the front-end page, and replace the original code snippet with the repaired code snippet.
[0047] In one embodiment, the generation module 63 is further configured to: Based on the business operation context in the feature information, determine the core process components and auxiliary function components in the front-end page; When the interactive component associated with the exception type is the auxiliary function component, the availability status of the auxiliary function component is changed to the unavailable status; Based on the business operation context, a prompt message is generated at the location associated with the auxiliary function component on the front-end page.
[0048] In one embodiment, the front-end page anomaly prediction device based on a large model is further used for: Monitor the performance metrics of the front-end page of the target application after the remediation strategy is executed; The operating indicators are compared with the preset expected results, and the deviation value between the operating indicators and the expected results is calculated. When the deviation value is less than or equal to a preset threshold, the repair strategy is marked as a valid repair strategy; When the deviation value is greater than the preset threshold, the execution parameters corresponding to the repair strategy are adjusted according to the deviation value, the repair strategy is re-executed according to the adjusted execution parameters, and the operating indicators of the front-end page after the repair strategy is re-executed are monitored.
[0049] This invention provides a front-end page anomaly prediction device based on a large model. It uses a pre-trained large language model to infer and analyze the feature information of the front-end page, predicting the anomaly type within a preset time period before the anomaly actually occurs. This provides a time window for proactive intervention and achieves accurate prediction of potential anomalies on the target application's front-end page. Furthermore, it dynamically generates corresponding repair strategies based on the predicted anomaly types and executes them automatically, achieving rapid response and type matching for repair operations, effectively improving the efficiency of front-end anomaly repair.
[0050] Specific limitations regarding the large-model-based front-end page anomaly prediction device can be found in the limitations of the large-model-based front-end page anomaly prediction method described above, and will not be repeated here. Each module in the aforementioned large-model-based front-end page anomaly prediction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0051] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, Figure 7 This is a schematic diagram of a computer device according to an embodiment of the present invention. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side method for predicting front-end page anomalies based on a large model.
[0052] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 8 As shown, Figure 8This is another structural schematic diagram of a computer device according to an embodiment of the present invention. The computer device includes a processor, memory, network interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements client-side functions or steps of a front-end page anomaly prediction method based on a large model.
[0053] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: The target application on the user terminal is obtained, and the running data of the front-end page of the target application is collected in real time. Feature information of the front-end page is extracted from the running data. The feature information of the front-end page is input into a pre-trained large language model to predict the abnormal type of the front-end page that will hinder the normal operation of business within a preset time period of the target application. Based on the feature information and the anomaly type of the front-end page, a repair strategy for the front-end page is dynamically generated, and the repair strategy is executed on the front-end page of the target application.
[0054] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: The target application on the user terminal is obtained, and the running data of the front-end page of the target application is collected in real time. Feature information of the front-end page is extracted from the running data. The feature information of the front-end page is input into a pre-trained large language model to predict the abnormal type of the front-end page that will hinder the normal operation of business in the target application within a preset time period in the future. Based on the feature information and the anomaly type of the front-end page, a repair strategy for the front-end page is dynamically generated, and the repair strategy is executed on the front-end page of the target application.
[0055] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0056] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0057] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0058] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0059] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for predicting anomalies in front-end pages based on a large model, characterized in that, include: The target application on the user terminal is obtained, and the running data of the front-end page of the target application is collected in real time. Feature information of the front-end page is extracted from the running data. The feature information of the front-end page is input into a pre-trained large language model to predict the abnormal type of the front-end page that will hinder the normal operation of business within a preset time period of the target application. Based on the feature information and the anomaly type of the front-end page, a repair strategy for the front-end page is dynamically generated, and the repair strategy is executed on the front-end page of the target application.
2. The front-end page anomaly prediction method based on a large model according to claim 1, characterized in that, The method for acquiring the target application of the user terminal involves real-time collection of the running data of the front-end page of the target application, and extraction of feature information of the front-end page from the running data, including: Collect code execution exception data and resource loading exception data generated by the front-end page during business operation execution, as well as response status data of the front-end page interface requests; Collect the sequence of user actions when performing business operations on the front-end page, as well as the device operating environment data of the user terminal; Based on the collected code execution exception data, resource loading exception data, response status data, operation behavior sequence, and device operating environment data, the feature information of the front-end page is extracted.
3. The front-end page anomaly prediction method based on a large model according to claim 1, characterized in that, The step of inputting the feature information of the front-end page into a pre-trained large language model to predict the anomaly type of the front-end page that will hinder the normal operation of business within a preset time period for the target application includes: The feature information of the front-end page is constructed into serialized text describing the current page state, user operation context, and device environment; The serialized text is input into a pre-trained large language model to perform inference analysis on the temporal relationship and causal association between the data, and to obtain the abnormal association patterns between the data. Based on the abnormal patterns of the correlation between various data, predict the types of anomalies that will hinder the normal operation of the front-end pages of the target application within a preset time period in the future; wherein, the anomaly types include at least one of script execution anomalies, interface request anomalies, resource loading failures, and page rendering anomalies.
4. The front-end page anomaly prediction method based on a large model according to claim 1, characterized in that, The step of dynamically generating a repair strategy for the front-end page based on its feature information and the type of error, and then executing the repair strategy on the front-end page of the target application, includes: Based on the type of exception on the front-end page, determine the type of repair strategy that matches the exception type; If the repair strategy type is hot code update, then obtain the repaired code snippet that matches the exception type of the front-end page from the server, and replace the original code snippet that caused the exception in the front-end page with the repaired code snippet. If the repair strategy type is resource degradation, then the resource loading of the front-end page is degraded according to the network status data in the feature information; If the repair strategy type is interaction optimization, then based on the business operation context in the feature information, the availability status of the interactive component associated with the exception type in the front-end page is changed, and a prompt message indicating that the interactive component is currently unavailable is generated.
5. The front-end page anomaly prediction method based on a large model according to claim 4, characterized in that, If the repair strategy type is hot code update, then the repaired code snippet matching the exception type of the front-end page is obtained from the server, and the original code snippet that caused the exception in the front-end page is replaced with the repaired code snippet, including: Based on the exception type of the front-end page, determine the location information of the original code segment in the front-end page that caused the exception; Based on the location information of the original code snippet, obtain the repaired code snippet that matches the exception type from the server; Delete the execution context corresponding to the original code snippet in the front-end page, and replace the original code snippet with the repaired code snippet.
6. The front-end page anomaly prediction method based on a large model according to claim 4, characterized in that, If the repair strategy type is interaction optimization, then based on the business operation context in the feature information, the availability status of the interactive component associated with the exception type on the front-end page is changed, and a prompt message indicating that the interactive component is currently unavailable is generated, including: Based on the business operation context in the feature information, determine the core process components and auxiliary function components in the front-end page; When the interactive component associated with the exception type is the auxiliary function component, the availability status of the auxiliary function component is changed to the unavailable status; Based on the business operation context, a prompt message is generated at the location associated with the auxiliary function component on the front-end page.
7. The front-end page anomaly prediction method based on a large model according to claim 1, characterized in that, After dynamically generating a repair strategy for the front-end page based on the feature information of the front-end page and the exception type, and executing the repair strategy on the front-end page of the target application, the method further includes: Monitor the performance metrics of the front-end page of the target application after the remediation strategy is executed; The operating indicators are compared with the preset expected results, and the deviation value between the operating indicators and the expected results is calculated. When the deviation value is less than or equal to a preset threshold, the repair strategy is marked as a valid repair strategy; When the deviation value is greater than the preset threshold, the execution parameters corresponding to the repair strategy are adjusted according to the deviation value, the repair strategy is re-executed according to the adjusted execution parameters, and the operating indicators of the front-end page after the repair strategy is re-executed are monitored.
8. A front-end page anomaly prediction device based on a large model, characterized in that, include: The acquisition module is used to acquire the target application of the user terminal, collect the running data of the front-end page of the target application in real time, and extract the feature information of the front-end page from the running data. The prediction module is used to input the feature information of the front-end page into a pre-trained large language model to predict the abnormal type of the front-end page that will hinder the normal operation of business within a preset time period of the target application. The generation module is used to dynamically generate a repair strategy for the front-end page based on the feature information and the anomaly type of the front-end page, and to execute the repair strategy on the front-end page of the target application.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the front-end page anomaly prediction method based on a large model as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the front-end page anomaly prediction method based on a large model as described in any one of claims 1 to 7.