Processing method and system for client page jamming
By starting asynchronous monitoring threads on the client and using AI big model analysis tools, the problem of difficult and timely solving of client page lag is solved, and the effect of quickly alleviating lags and improving user experience is achieved.
Patent Information
- Application Number
- CN202510117747.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-27
AI Technical Summary
The existing technology is difficult to solve the problem of client page stuttering in a timely manner, which affects the user experience and requires developers to spend a lot of time to repair it.
Using a method and system for handling client page stuttering, by starting an asynchronous monitoring thread to monitor the application page, when the CPU or memory resources exceed the preset usage rate, the page data is crawled for MD5 calculations, a unique page id is generated, and the number of times the page id appears is counted. If there is lag, the client sends a message to the server to use the AI big model analysis tool for analysis and optimizes the page based on the analysis results.
It has achieved timely alleviated page lag problem, provided developers with time to perform subsequent repairs, and improved user experience.
Smart Images

Figure CN120045372A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of page lag optimization, and particularly to a method and system for handling page lag of a client. Background Art
[0002] Currently, there are various APP clients, and each client has its own page application scenarios. However, during daily use, due to limited resources of the client or unstable network, the problem of application lag often occurs during use. When encountering such a problem, basically, the only solutions are to restart the application or wait for the application to recover by itself, and there is no better way to handle the lag situation. Usually, after users report the lag problem, developers simulate the problem through logs or stack information, etc., and then fix the problem. This method takes a lot of time and cannot solve the lag problem immediately. Summary of the Invention
[0003] To overcome the problem that the client cannot solve page lag in a timely manner, the purpose of the present invention is to provide a method and system for handling page lag of a client, which can relieve the page lag problem in a timely manner and provide time for developers to fix it later.
[0004] The present invention is implemented by the following scheme:
[0005] A method for handling page lag of a client, the steps of the method are as follows:
[0006] Step 1: When the client starts, start an asynchronous monitoring thread to monitor the application page. When the CPU or memory resources of the client exceed the preset resource utilization rate, it becomes effective;
[0007] Step 2: When the asynchronous monitoring thread becomes effective, capture the data of the active page and calculate the MD5 of the page data to obtain a page ID. Each page will generate a unique page ID;
[0008] Step 3: For the same page ID, if the ratio of the number of times the same page ID appears to the number of times all page IDs appear within the preset time range is greater than the preset ratio, it indicates that the page has lag;
[0009] Step 4: The client sends a message to the server. The server receives the message, analyzes it using an AI large model analysis tool, and returns the analysis result to the client;
[0010] Step 5: After the client obtains the analysis result returned by the server, optimize the relevant page according to the analysis result to handle the lag problem.
[0011] Further, the page data includes strings of the current page, including html strings, xml strings, and dom strings.
[0012] Further, in step 4, the message is the device machine resource situation of the client, including CPU, memory, and model-related information.
[0013] Further, after step 5, if the page still has lags, repeat steps 3 - 5 to further obtain the analysis results of the AI large model analysis tool for optimization.
[0014] A page lag processing system, the system includes: a thread monitoring module, a page data scraping module, a page lag judgment module, an AI analysis module, and a lag optimization module;
[0015] The thread monitoring module is used to start an asynchronous monitoring thread to monitor the application page when the client starts. When the CPU or memory resources of the client exceed the preset resource utilization rate, it becomes effective;
[0016] The page data scraping module is used to scrape the active page data when the asynchronous monitoring thread becomes effective, and calculate the MD5 of the page data to obtain a page id. Each page will generate a unique page id;
[0017] The page lag judgment module is used to count for the same page id. If the ratio of the number of occurrences of the same page id to the number of occurrences of all page ids within a preset time range is greater than the preset ratio, it indicates that the page has lags;
[0018] The AI analysis module is used for the client to send a message to the server. The server receives the message, uses the AI large model analysis tool for analysis, and returns the analysis results to the client;
[0019] The lag optimization module is used to optimize the relevant page according to the analysis results after the client obtains the analysis results returned by the server to handle the lag problem.
[0020] Further, the page data includes strings of the current page, including html strings, xml strings, and dom strings.
[0021] Further, the message is the device machine resource situation of the client, including CPU, memory, and model-related information.
[0022] Further, after the lag optimization module is executed, if the page still has lags, then execute the page lag judgment module, AI analysis module, and lag optimization module again to further obtain the analysis results of the AI large model analysis tool for optimization.
[0023] The beneficial effects of the present invention are as follows:
[0024] The present invention provides a method and system for handling client page lags. When an application starts, there will be an asynchronous thread that independently performs an MD5 calculation operation on the data within each active page and generates a unique identifier, namely the page ID, for this scenario. Through regular monitoring, the calculation result values of the current page are monitored and statistically analyzed. When multiple calculation result values meet certain conditions, it is determined that the page is lagging in this scenario. At this time, through resource monitoring and processing methods, various downgrading optimizations or parameter adjustments are carried out, thereby automatically alleviating this page lag situation and further improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a flowchart of the method of the present invention;
[0026] Figure 2 is a structural block diagram of the system of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The present invention will be further described below with reference to the accompanying drawings.
[0028] See Figure 1 , a method for handling client page lags, and the steps of the method are as follows:
[0029] Step 1: When the client starts, start an asynchronous monitoring thread to monitor the application page. When the CPU or memory resources of the client exceed the preset resource utilization rate, it becomes effective.
[0030] Step 2: After the asynchronous monitoring thread becomes effective, capture the data of the active page and perform an MD5 calculation on the page data to obtain the page ID. Each page will generate a unique page ID.
[0031] Step 3: For the same page ID, if the ratio of the number of times the same page ID appears to the number of times all page IDs appear within the preset time range is greater than the preset ratio, it indicates that the page is lagging.
[0032] Step 4: The client sends a message to the server. The server receives the message, analyzes it using an AI large model analysis tool, and returns the analysis result to the client.
[0033] Step 5: After the client obtains the analysis result returned by the server, optimize the relevant page according to the analysis result to handle the lag problem.
[0034] The present invention will be further described below with reference to a specific embodiment:
[0035] A method for handling client page lag, the method comprising the following steps:
[0036] Step 1: After the application starts, an additional asynchronous monitoring thread needs to be started. This monitoring thread is mainly used to monitor the lag situation of the application page. After the asynchronous thread starts, it does not take effect immediately. Instead, it starts to take effect when the CPU or memory resources of the client reach a certain limit. For example, after exceeding 50% resource utilization rate, it automatically takes effect.
[0037] Step 2: The monitoring thread grabs the page data of the active page and performs an MD5 calculation operation on this page data. At this time, a unique identifier for this scenario can be generated, that is, each page will automatically generate a unique page ID, and multiple calculation result data will be generated for different page IDs.
[0038] Page data is usually the entire page's HTML string, or XML string, or DOM string. Simply put, it is the data of the entire page.
[0039] Step 3: Statistically analyze the multiple calculation result data within the same page ID. When the lag condition is met, for example, within a certain period, 80% of the pages are the same, it can be determined that there is a lag problem with this page.
[0040] Step 4: After it is clear that there is a lag problem, the client will send a notification message to the server, including the machine resource situation of the client at this time, such as CPU, or memory, etc., and relevant information such as the model of the device. After the server receives this information and comprehensively considers it, it uses an AI large model analysis tool to give suggestions, such as whether it is necessary to reduce the resolution, or reduce network access, etc.
[0041] The AI large model analysis tool is based on an open-source large model. After data training, a large model analysis tool for this scenario is obtained;
[0042] The training data is: the resource situation of the device where the client is located, such as CPU, or memory, etc., and relevant information such as the model of the device. Based on this information, the open-source large model is trained. In this way, when the same model of device is in such resource conditions later, the model can give reasonable suggestions.
[0043] Step 5: After the client obtains the suggestions returned by the server, it makes relevant page adjustments to relieve the lag situation.
[0044] These are the suggestions given after the large model analysis, such as reducing the resolution, reducing network access, etc. as optimization methods. Subsequently, the user optimizes according to the solutions given by the AI large model analysis tool to relieve the lag.
[0045] After that, steps 3-5 can be continued to further obtain optimization suggestions until a non-lagging scenario is reached.
[0046] In the above way, various downgrade optimizations or parameter adjustments are carried out, thereby automatically alleviating this page lag situation and further improving the user experience.
[0047] See Figure 2 , a processing system for client page lag, the system includes: a thread monitoring module, a page data scraping module, a page lag judgment module, an AI analysis module, and a lag optimization module;
[0048] The thread monitoring module is used to start an asynchronous monitoring thread to monitor the application page when the client starts. When the CPU or memory resources of the client exceed the preset resource usage rate, it takes effect and works;
[0049] When the CPU or memory resources of the client exceed the preset resource usage rate, it takes effect and works;
[0050] The page data scraping module is used to scrape the active page data when the asynchronous monitoring thread takes effect, calculate the MD5 of the page data to obtain a page ID, and a unique page ID will be generated for each page;
[0051] The page lag judgment module is used to count for the same page ID. If the ratio of the number of times the same page ID appears to the number of times all page IDs appear within a preset time range is greater than the preset ratio, it means that the page has lag;
[0052] The AI analysis module is used for the client to send a message to the server. The server receives the message, analyzes it using an AI large model analysis tool, and returns the analysis result to the client;
[0053] The lag optimization module is used to optimize the relevant page according to the analysis result after the client obtains the analysis result returned by the server, and handle the lag problem.
[0054] In an embodiment of the present invention, the page data includes the string of the current page, including html string,
[0055] xml string, and dom string.
[0056] In an embodiment of the present invention, the message is the device machine resource situation of the client, including CPU, memory, and model-related information.
[0057] In an embodiment of the present invention, after the lag optimization module is executed, if there is still lag on the page, the page lag judgment module, the AI analysis module, and the lag optimization module are executed again to further obtain the analysis results of the AI large model analysis tool for optimization.
[0058] The above are only the preferred embodiments of the present invention, and all equivalent changes and modifications made according to the scope of the patent application of the present invention shall fall within the scope of the present invention.
Claims
1. A method for processing client page jams, characterized in that: The method steps are as follows: Step 1: When the client starts, an asynchronous monitoring thread is started to monitor the application page. When the client's CPU or memory resources exceed the preset resource usage rate, the work takes effect; Step 2: When the asynchronous monitoring thread takes effect, the active page data is captured and MD5 calculation is performed on the page data to obtain the page id. A unique page id is generated for each page. Step 3: Count the number of times the same page ID appears within a preset time range. If the ratio of the number of times the same page ID appears to the number of times all page IDs appear is greater than a preset ratio, it means that the page is stuck. Step 4: The client sends a message to the server, which receives the message, uses the AI big model analysis tool to analyze it, and returns the analysis results to the client; Step 5: After the client obtains the analysis results returned by the server, it optimizes the relevant pages based on the analysis results to resolve the lag problem.
2. A method for processing client page jamming according to claim 1, characterized in that: The page data includes the character string of the current page, including an HTML character string, an XML character string and a DOM character string.
3. A method for processing client page jamming according to claim 1, characterized in that: In step 4, the message is the resource status of the device where the client is located, including CPU, memory and model related information.
4. A method for processing client page jamming according to claim 1, characterized in that: After step 5, if the page still freezes, repeat steps 3-5 to further obtain the analysis results of the AI large model analysis tool for optimization.
5. A system for processing client page jams, characterized in that: The system includes: a thread monitoring module, a page data capture module, a page jamming judgment module, an AI analysis module and a jamming optimization module; The thread monitoring module is used to start an asynchronous monitoring thread monitoring application page when the client starts, and it takes effect when the CPU or memory resources of the client exceed the preset resource usage rate; The page data capture module is used to capture the active page data after the asynchronous monitoring thread takes effect, and perform MD5 calculation on the page data to obtain the page id. Each page will generate a unique page id; The page jamming judgment module is used to collect statistics for the same page ID. If the ratio of the number of times the same page ID appears to the number of times all page IDs appear is greater than a preset ratio within a preset time range, it indicates that the page is jammed. The AI analysis module is used for the client to send a message to the server, and the server receives the message, uses the AI large model analysis tool to perform analysis, and returns the analysis result to the client; The jamming optimization module is used by the client to obtain the analysis results returned by the server, and then optimize the relevant pages according to the analysis results to solve the jamming problem.
6. A client page jam processing system according to claim 5, characterized in that: The page data includes the character string of the current page, including an HTML character string, an XML character string and a DOM character string.
7. A client page jam processing system according to claim 6, characterized in that: The message is about the resource status of the device where the client is located, including CPU, memory and model-related information.
8. A client page jam processing system according to claim 5, characterized in that: After the jamming optimization module is executed, if the page still jams, the page jamming judgment module, AI analysis module and jamming optimization module are executed again to further obtain the analysis results of the AI large model analysis tool for optimization.