Page data processing method and device, computer equipment, readable storage medium and program product
By dividing the labor between the main thread and the auxiliary thread of the front-end page, the auxiliary thread is responsible for data processing and page display data generation, which solves the problem of too long loading time caused by front-end page data processing and achieves faster page loading.
Patent Information
- Application Number
- CN202411693623.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-18
AI Technical Summary
When the front-end page processes data from the back-end, the data occupies memory resources, increasing the overhead of page rendering and updating, resulting in a long page loading time or even causing page stuttering.
By dividing the labor between the main thread and the auxiliary thread of the front-end page, the auxiliary thread is responsible for pulling the pending data, extracting key features, and generating page display data, and then sending this data to the main thread. The main thread is responsible for controlling the display of page content. .
By processing data by auxiliary threads, the processing burden of the main thread is reduced, the overhead of page rendering and updating, and thus the page loading time is reduced.
Smart Images

Figure CN119473625A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a page data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the development of information technology and digital economy, user needs are becoming more and more diversified. Therefore, the backend will generate a large amount of data and transmit a large amount of data to the front end so that the front-end page function development can meet user needs. When the front end processes the data from the back end, the data will occupy a certain amount of memory resources, increase the overhead of page rendering and updating, and make the front-end page loading time longer, and even cause the front-end page to freeze. Therefore, there is an urgent need for a way to reduce page loading time. Summary of the invention
[0003] Based on this, it is necessary to provide a page data processing method, device, computer equipment, computer-readable storage medium and computer program product that can reduce the cleaning efficiency of page loading time in response to the above technical problems.
[0004] In a first aspect, the present application provides a page data processing method, which is applied to a main thread and an auxiliary thread of a front-end page, wherein the auxiliary thread is independent of the main thread, and comprises:
[0005] In response to the backend interaction, the auxiliary thread is used to pull the data to be processed, and key features are extracted from the data to be processed to obtain key feature data;
[0006] According to the key feature data, using the auxiliary thread to generate page display data corresponding to the data to be processed, and sending the page display data to the main thread;
[0007] According to the page display data, the main thread is used to control the front-end page to display content.
[0008] In a second aspect, the present application further provides a page data processing device, which is applied to a main thread and an auxiliary thread of a front-end page, wherein the auxiliary thread is independent of the main thread, and comprises:
[0009] An extraction module, used for pulling the data to be processed through the auxiliary thread in response to the backend interaction, and extracting key features of the data to be processed to obtain key feature data;
[0010] A generating module, used for determining the page display data corresponding to the key feature data through the auxiliary thread, and sending the page display data to the main thread;
[0011] A display module is used to display the received page display data on the front-end page through the main thread.
[0012] In a third aspect, the present application further provides a computer device, including a memory and a processor, applied to a main thread and an auxiliary thread of a front-end page, wherein the auxiliary thread is independent of the main thread, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0013] In response to the backend interaction, the auxiliary thread is used to pull the data to be processed, and key features are extracted from the data to be processed to obtain key feature data;
[0014] According to the key feature data, using the auxiliary thread to generate page display data corresponding to the data to be processed, and sending the page display data to the main thread;
[0015] According to the page display data, the main thread is used to control the front-end page to display content.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium, which is applied to a main thread and an auxiliary thread of a front-end page, wherein the auxiliary thread is independent of the main thread, and a computer program is stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0017] In response to the backend interaction, the auxiliary thread is used to pull the data to be processed, and key features are extracted from the data to be processed to obtain key feature data;
[0018] According to the key feature data, using the auxiliary thread to generate page display data corresponding to the data to be processed, and sending the page display data to the main thread;
[0019] According to the page display data, the main thread is used to control the front-end page to display content.
[0020] In a fifth aspect, the present application further provides a computer program product, which is applied to a main thread and an auxiliary thread of a front-end page, wherein the auxiliary thread is independent of the main thread, and comprises a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0021] In response to the backend interaction, the auxiliary thread is used to pull the data to be processed, and key features are extracted from the data to be processed to obtain key feature data;
[0022] According to the key feature data, using the auxiliary thread to generate page display data corresponding to the data to be processed, and sending the page display data to the main thread;
[0023] According to the page display data, the main thread is used to control the front-end page to display content.
[0024] The above-mentioned page data processing method, device, computer equipment, computer-readable storage medium and computer program product are applied to the main thread and auxiliary thread of the front-end page. The auxiliary thread is independent of the main thread. By responding to the back-end interaction, the auxiliary thread is used to pull the data to be processed, and the key features of the data to be processed are extracted to obtain the key feature data; according to the key feature data, the auxiliary thread is used to generate page display data corresponding to the data to be processed, and the page display data is sent to the main thread; according to the page display data, the main thread is used to control the front-end page to display the content, and the key feature extraction and page display data determination process are performed by the auxiliary thread without occupying more processing resources of the main thread. The main thread can directly pull and display the page display data processed by the auxiliary thread, which reduces the memory resources occupied by the main thread to a certain extent, thereby reducing the overhead of page rendering and updating, thereby reducing the page loading time. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 An application environment diagram of a page data processing method in an embodiment;
[0027] Figure 2 A schematic diagram of a flow chart of a page data processing method in one embodiment;
[0028] Figure 3 It is a flowchart of the steps of extracting key features from the data to be processed to obtain key feature data in one embodiment;
[0029] Figure 4 A schematic flow chart of a step of determining page display data corresponding to the key feature data in an embodiment;
[0030] Figure 5 A schematic diagram of a flow chart of data processing of attribute value data by an auxiliary thread in one embodiment;
[0031] Figure 6 is a structural block diagram of a page data processing device in one embodiment;
[0032] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0034] It should be noted that the information and data involved in this application (including but not limited to data for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the acquisition, transmission, storage, use and processing of relevant data are in compliance with the relevant provisions of national laws and regulations. For content pushed to users (for example, page display data, etc.), users can refuse or conveniently refuse content push, etc. In the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be considered as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0035] The page data processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. In response to the back-end interaction, the server 104 uses the auxiliary thread to pull the data to be processed, and extracts the key features of the data to be processed to obtain the key feature data; according to the key feature data, the auxiliary thread is used to generate the page display data corresponding to the data to be processed, and the page display data is sent to the main thread; according to the page display data, the main thread is used to control the front-end page to display the content. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0036] In an exemplary embodiment, Figure 2As shown, a page data processing method is provided, which is applied to Figure 1 The server 104 in the example is used to illustrate the main thread and auxiliary thread applied to the front-end page, and the auxiliary thread and the main thread are independent of each other, including the following steps 202 to 206. Among them:
[0037] Step 202, in response to the backend interaction, using the auxiliary thread to pull the data to be processed, and extracting key features from the data to be processed to obtain key feature data.
[0038] The auxiliary thread in step 202 may be constructed through Web Workers.
[0039] As an embodiment, using an auxiliary thread to pull data to be processed includes: the data to be processed includes X sub-data to be processed, the auxiliary thread includes Y sub-threads, and X and Y are positive integers; for each of the Y sub-threads, the X data to be processed are randomly allocated to the Y sub-threads, and the allocated data to be processed are respectively pulled by the Y sub-threads.
[0040] It is understandable that when multiple sub-threads are randomly assigned multiple data to be processed, there may be data that the user wants to display on the front-end page, but because the sub-thread does not process it in time, it is not displayed on the front-end page in time, or the data waiting to be processed by the sub-thread has reached the processing limit of the sub-thread. At this time, if it is still assigned to the sub-thread, it is easy to cause the data processing of the sub-thread to crash, resulting in the subsequent inability to process data normally, affecting the data processing of the entire auxiliary thread.
[0041] As an embodiment, pulling data to be processed through an auxiliary thread includes: the data to be processed includes X sub-data to be processed, the auxiliary thread includes Y sub-threads, and X and Y are positive integers; for the X sub-data to be processed, generating processing priorities of the X sub-data to be processed according to data contents of the X sub-data to be processed; obtaining thread processing information of the Y sub-threads, wherein the thread processing information is used to characterize thread processing congestion of the sub-threads; and pulling the X sub-data to be processed through the Y sub-threads according to the processing priorities of the X sub-data to be processed and the thread processing information of the Y sub-threads.
[0042] The thread processing information includes at least one of the amount of data allocated to the thread and the limit of the amount of data processed by the thread;
[0043] Further, based on the data contents of the X sub-data to be processed, generating processing priorities of the X sub-data to be processed includes: acquiring the displayed data of the front-end page, generating the association degrees between the X sub-data to be processed and the displayed data respectively according to the data contents of the X sub-data to be processed and the displayed data, and generating the processing priorities of the X sub-data to be processed according to the association degrees between the X sub-data to be processed and the displayed data respectively.
[0044] As an embodiment, generating the association degree between the X sub-data to be processed and the displayed data respectively according to the data contents of the X sub-data to be processed and the displayed data, including: generating the association degree between the X sub-data to be processed and the displayed data respectively according to the correlation and similarity between the data contents of the X sub-data to be processed and the displayed data, wherein the higher the correlation, the higher the association degree; the higher the similarity, the higher the association degree.
[0045] Furthermore, the higher the correlation between the sub-data to be processed and the displayed data, the higher the generated processing priority.
[0046] In this way, considering that the displayed data of the front-end page can be represented as the content that the user wants to see to a certain extent, the correlation between the X sub-data to be processed and the displayed data of the front-end page is used as the basis for generating the processing priority, so that the data that is more related to the displayed data is processed first, thereby ensuring the processing efficiency of the data that the user expects to be displayed.
[0047] As another embodiment, generating processing priorities for X sub-data to be processed based on data contents of the X sub-data to be processed includes: obtaining historical access frequencies of users to the X sub-data to be processed based on the data contents of the X sub-data to be processed; generating processing priorities for the X sub-data to be processed based on historical access frequencies of users to the X sub-data to be processed, wherein a higher historical access frequency leads to a higher generated processing priority.
[0048] In this way, considering that the data frequently accessed by users can be characterized as the data that users want to see to a certain extent, the historical access frequency of users to X sub-data to be processed is used as the basis for generating processing priorities, so that the sub-data to be processed with a higher historical access frequency can be processed first, thereby ensuring the processing efficiency of the data that users expect to be displayed.
[0049] As another embodiment, generating processing priorities of X sub-data to be processed according to data contents of X sub-data to be processed includes: generating associations between the X sub-data to be processed and the displayed data according to the data contents of the X sub-data to be processed and the displayed data, and generating first priorities of the X sub-data to be processed according to the associations between the X sub-data to be processed and the displayed data; acquiring historical access frequencies of users to the X sub-data to be processed according to the data contents of the X sub-data to be processed; generating second priorities of the X sub-data to be processed according to the historical access frequencies of users to the X sub-data to be processed; and merging the first priorities and the second priorities of the X sub-data to be processed to obtain processing priorities of the X sub-data to be processed.
[0050] In this way, both situations (the displayed data on the front-end page mentioned above, and the data frequently accessed by users) can be represented as data that users want to see to a certain extent, so the priority generation methods corresponding to the two situations are involved in the processing priority generation decision to ensure that the generated processing priority is more accurate.
[0051] As an embodiment, the higher the processing priority of the to-be-processed sub-data is, the lower the thread processing congestion level represented by the thread processing information of the allocated sub-thread is.
[0052] In this way, it is ensured that the to-be-processed sub-data with higher processing priority can be processed by the sub-thread faster.
[0053] As an embodiment, extracting key features from the data to be processed to obtain key feature data includes: extracting key features from the data to be processed to obtain key feature data according to the data type of the data to be processed.
[0054] Step 204: Based on the key feature data, the auxiliary thread is used to generate page display data corresponding to the data to be processed, and the page display data is sent to the main thread.
[0055] Exemplarily, step 204 includes: according to the data type corresponding to the key feature data, using the auxiliary thread to process the key feature data, obtaining page display data corresponding to the key feature data, and sending the page display data to the main thread.
[0056] Step 206, based on the page display data, use the main thread to control the front-end page to display content.
[0057] Exemplarily, step 206 includes: using the main thread to determine a target position corresponding to the page display data, and controlling the front-end page to display content according to the target position and the page display data.
[0058] As an embodiment, determining the target position corresponding to the page display data includes: obtaining a blank area of the front page, wherein the blank area is an area where no data is displayed; and determining any position in the blank area as the target position corresponding to the page display data.
[0059] As another embodiment, determining the target position corresponding to the page display data includes: if there is no blank area on the front page, adjusting the position of the displayed data at any position in the front page to obtain a blank area, and determining any position in the blank area as the target position corresponding to the page display data.
[0060] It is understandable that in order to display beautifully, the front-end page usually does not leave blank space, that is, there is no blank area on the front-end page most of the time. Therefore, the position of the displayed data in the front-end page can be adjusted through the above method so that the page display data can be displayed in the front-end page.
[0061] Furthermore, step 206 includes: obtaining page usage information of the front-end page, wherein the page usage information is used to characterize at least one of the page display status and the user usage behavior status; based on the page usage information, filtering the target position corresponding to the page display data in each display position in the front-end page; adjusting the position of the displayed data at the target position in the front-end page; and controlling the front-end page to display the page display data at the target position.
[0062] The page usage information includes the display position of each displayed data on the front-end page, and the historical access frequency of the user to each of the X sub-data to be processed.
[0063] As an embodiment, according to the page usage information, the target positions corresponding to the page display data are filtered in each display position in the front-end page, including: obtaining the correlation between the page display data and each displayed data in the front-end page, selecting the target display data from each displayed data in the front-end page, and filtering the target positions corresponding to the page display data in each display position in the front-end page according to the display position of the target display data, specifically, filtering the target positions corresponding to the display positions of the target display data that are adjacent to the display position of the target display data in each display position in the front-end page.
[0064] As another embodiment, according to the page usage information, the target position corresponding to the page display data is filtered in each display position in the front-end page, including: if the page usage information includes the user's historical access frequency for X sub-data to be processed, wherein the higher the historical access frequency, the higher the display visibility of the corresponding target position on the front-end page. For example, when the target position is in the center of the front-end page, the display visibility of the target position on the front-end page is the highest.
[0065] In this way, the page display data with a higher historical access frequency is placed at a higher display visibility position on the front page, making it easier for users to find the page display data, thereby improving the display accuracy of the page display data.
[0066] In the above-mentioned page data processing method, the main thread and the auxiliary thread are applied to the front-end page, and the auxiliary thread is independent of the main thread. By responding to the back-end interaction, the auxiliary thread is used to pull the data to be processed, and the key features of the data to be processed are extracted to obtain the key feature data; according to the key feature data, the auxiliary thread is used to generate page display data corresponding to the data to be processed, and the page display data is sent to the main thread; according to the page display data, the main thread is used to control the front-end page to display the content, and the auxiliary thread is used to extract the key features and determine the page display data, without occupying more processing resources of the main thread. The main thread can directly pull and display the page display data processed by the auxiliary thread, which reduces the memory resources occupied by the main thread to a certain extent. Therefore, the overhead of page rendering and updating is reduced, thereby reducing the page loading time.
[0067] In an exemplary embodiment, Figure 3 As shown, a method for accurately extracting key features is provided, and key features are extracted from the data to be processed to obtain key feature data, including steps 302 to 308. Among them:
[0068] Step 302: Identify the data type of the data to be processed according to the data content of the data to be processed, and obtain the data type.
[0069] The data type includes at least one of a user behavior type and a traffic type.
[0070] Exemplarily, step 302 includes: pulling the matching degree between the data content of the data to be processed and the user behavior content and the traffic content respectively; identifying the data type to which the data to be processed belongs according to the matching degree between the data content of the data to be processed and the user behavior content and the traffic content respectively, and obtaining the data type.
[0071] Furthermore, pulling the matching degree between the data content of the data to be processed and the user behavior content and the traffic content respectively includes: pulling the correlation and similarity between the data content of the data to be processed and the user behavior content and the traffic content respectively, and determining the matching degree between the data content of the data to be processed and the user behavior content and the traffic content respectively according to the correlation and similarity between the data content of the data to be processed and the user behavior content and the traffic content respectively, wherein the higher the correlation, the higher the matching degree, and the higher the similarity, the higher the matching degree.
[0072] As an embodiment, the data type of the data to be processed is identified according to the matching degree between the data content of the data to be processed and the user behavior content and the traffic content, respectively, to obtain the data type, including: if the matching degree between the data content of the data to be processed and the user behavior content is higher than a preset matching degree threshold, the user behavior type is determined as the data type; and / or, if the matching degree between the data content of the data to be processed and the traffic content is higher than a preset matching degree threshold, the traffic type is determined as the data type.
[0073] Step 304: If the data type includes the user behavior type, user operation feature extraction is performed on the data to be processed to obtain key feature data.
[0074] The user operation feature in step 304 includes at least one of a visit frequency feature, a visit number feature, a visit residence time feature and an operation feature.
[0075] As one embodiment, step 304 includes: if the data type includes a user behavior type, identifying the access frequency corresponding to the data to be processed to obtain key feature data; and / or identifying the number of accesses corresponding to the data to be processed to obtain key feature data; and / or identifying the access residence time corresponding to the data to be processed to obtain key feature data; and / or identifying the operation behavior corresponding to the data to be processed to obtain key feature data.
[0076] Step 306: If the data type includes a flow type, flow distribution feature extraction is performed on the data to be processed to obtain key feature data.
[0077] The flow distribution feature in step 306 includes at least one of a flow threshold feature, a flow average feature, and a flow fluctuation amplitude feature, and the flow threshold feature includes at least one of a flow peak feature and a flow valley feature.
[0078] As one embodiment, step 306 includes: if the data type includes a traffic type, calculating the traffic threshold of the data to be processed to obtain key characteristic data; and / or calculating the traffic average value of the data to be processed to obtain key characteristic data; and / or calculating the traffic fluctuation amplitude of the data to be processed to obtain key characteristic data.
[0079] Further, the flow threshold of the data to be processed is calculated to obtain key characteristic data, including: calculating the flow peak value of the data to be processed to obtain key characteristic data; and / or calculating the flow valley value of the data to be processed to obtain key characteristic data.
[0080] Step 308: If the data type includes user behavior type and traffic type, user operation feature extraction and traffic distribution feature extraction are performed on the data to be processed to obtain key feature data.
[0081] Optionally, the specific implementation method of performing user operation feature extraction and traffic distribution feature extraction on the data to be processed to obtain key feature data can refer to the specific implementation content of the above steps 304 to 306, which will not be repeated here.
[0082] In this embodiment, the data type to which the data to be processed belongs is identified based on the data content of the data to be processed to obtain the data type; if the data type includes the user behavior type, user operation feature extraction is performed on the data to be processed to obtain key feature data; if the data type includes the traffic type, traffic distribution feature extraction is performed on the data to be processed to obtain key feature data; if the data type includes the user behavior type and the traffic type, user operation feature extraction and traffic distribution feature extraction are performed on the data to be processed to obtain key feature data; based on the data type, key feature data is extracted from the data to be processed, so that the extracted key feature data matches the data type to which the data to be processed belongs, thereby improving the accuracy of key feature data extraction.
[0083] In an exemplary embodiment, Figure 4 As shown, in order to provide an accurate method for determining the page display data corresponding to the key feature data, generating the page display data corresponding to the data to be processed according to the key feature data includes steps 402 to 406. Among them:
[0084] Step 402: Identify attribute name data and attribute value data corresponding to the attribute name data from the key feature data.
[0085] The attribute name data includes title data, and the title data includes at least one of load title data and data status title data.
[0086] As an embodiment, step 402 includes: obtaining the data property type of each data in the key feature data, wherein the data property type includes a variable type or an immutable type, and determining the data whose corresponding data property type in the key feature data is an immutable type as attribute name data; determining the data whose corresponding data property type in the key feature data is a variable type as attribute value data; and according to the correlation between the attribute name data and the attribute value data, corresponding the attribute name data with the attribute value data.
[0087] As another embodiment, step 402 includes: determining data of an immutable data property type corresponding to the key feature data as attribute name data, and determining value data corresponding to the attribute name data as attribute value data corresponding to the attribute name data.
[0088] Step 404: Process the attribute value data according to the data processing component that matches the attribute data type of the attribute value data to obtain attribute value processed data.
[0089] The data processing component may be a preset function, such as a traffic function, or a database mapping relationship, which is not limited here.
[0090] As an embodiment, step 404 includes: if the attribute data type of the attribute value data includes a payload data type, then according to a payload data processing component corresponding to the payload data type, data processing is performed on the attribute value data to obtain attribute value processed data; if the attribute data type of the attribute value data includes a data status type, then according to a data status processing component corresponding to the data status type, data processing is performed on the attribute value data to obtain attribute value processed data.
[0091] Among them, the load data type includes at least one of the processor's load rate type, used load data type and remaining load data type, the processor includes at least one of CPU (Central Processing Unit), GPU (Graphics Processing Unit) and NPU (Neural network Processing Unit), and the data state type includes at least one of time type, unit type, coordinate type and value type.
[0092] As an embodiment, according to the load data processing component corresponding to the load utilization type, data processing is performed on the attribute value data to obtain attribute value processing data, including at least one of the following items: if the load utilization type includes a CPU load utilization type, data processing is performed on the attribute value data according to the CPU load utilization processing component corresponding to the CPU load utilization type to obtain attribute value processing data; if the load utilization type includes a GPU load utilization type, data processing is performed on the attribute value data according to the GPU load utilization processing component corresponding to the GPU load utilization type to obtain attribute value processing data; if the load utilization type includes an NPU load utilization type, data processing is performed on the attribute value data according to the NPU load utilization processing component corresponding to the NPU load utilization type to obtain attribute value processing data.
[0093] Further, according to the data status processing component corresponding to the data status type, the attribute value data is processed to obtain attribute value processed data, including at least one of the following items: if the data status type includes a time type, according to the time data processing component corresponding to the time type, the attribute value data is processed to obtain attribute value processed data; if the data status type includes a unit type, according to the unit data processing component corresponding to the unit type, the attribute value data is processed to obtain attribute value processed data; if the data status type includes a coordinate type, according to the coordinate data processing component corresponding to the coordinate type, the attribute value data is processed to obtain attribute value processed data; if the data status type includes a coordinate type, according to the value data processing component corresponding to the value type, the attribute value data is processed to obtain attribute value processed data.
[0094] Step 406: Process the data according to the attribute name data and the attribute value to determine the page display data corresponding to the key feature data.
[0095] Exemplarily, step 406 includes: combining the attribute name data and the attribute value processing data to obtain page display data corresponding to the key feature data.
[0096] Optionally, refer to Figure 5 , the auxiliary thread including Y sub-threads obtains the attribute name data and the attribute value data corresponding to the attribute name data, and processes the attribute value data by calling the data processing component to obtain the attribute value processing data.
[0097] In this embodiment, attribute name data and attribute value data corresponding to the attribute name data are identified from key feature data; the attribute value data is processed according to a data processing component that matches the attribute data type of the attribute value data to obtain attribute value processing data; page display data corresponding to the key feature data is determined according to the attribute name data and the attribute value processing data, and the attribute value data is processed by the data processing component that matches the attribute data type, thereby ensuring the data processing accuracy of the attribute value data and further ensuring the accuracy of determining the page display data.
[0098] As a detailed embodiment, a main thread and an auxiliary thread are applied to a front-end page, the auxiliary thread and the main thread are independent of each other, and in response to back-end interaction, for X sub-data to be processed, according to the data content of the X sub-data to be processed, the processing priorities of the X sub-data to be processed are generated; thread processing information of Y sub-threads is obtained, wherein the thread processing information is used to characterize the thread processing congestion degree of the sub-threads; according to the processing priorities of the X sub-data to be processed and the thread processing information of the Y sub-threads, the X sub-data to be processed are pulled through the Y sub-threads; according to the data content of the data to be processed, the data type to which the data to be processed belongs is identified to obtain the data type; if the data type includes a user behavior type, user operation feature extraction is performed on the data to be processed to obtain key feature data; if the data type includes a traffic type, traffic distribution feature extraction is performed on the data to be processed to obtain key feature data; if the data type includes a traffic type and a traffic type, user operation feature extraction and traffic distribution feature extraction are performed on the data to be processed to obtain key feature data.
[0099] Furthermore, attribute name data and attribute value data corresponding to the attribute name data are identified from the key feature data through an auxiliary thread; if the attribute data type of the attribute value data includes a load utilization type, then the attribute value data is processed according to a load data processing component corresponding to the load utilization type to obtain attribute value processing data; if the attribute data type of the attribute value data includes a data status type, then the attribute value data is processed according to a data status processing component corresponding to the data status type to obtain attribute value processing data; based on the attribute name data and the attribute value processing data, page display data corresponding to the key feature data is determined; page usage information of the front-end page is obtained through the main thread, wherein the page usage information is used to characterize at least one of a page display status and a user usage behavior status; based on the page usage information, a target position corresponding to the page display data is screened in each display position in the front-end page; and the front-end page is controlled to display the page display data at the target position.
[0100] In this way, by responding to the back-end interaction, the data to be processed is pulled by the auxiliary thread, and the key feature data is extracted from the data to be processed to obtain the key feature data; the page display data corresponding to the key feature data is determined by the auxiliary thread, and the page display data is sent to the main thread; the received page display data is displayed on the front-end page by the main thread, and the key feature extraction and page display data determination process are performed by the auxiliary thread without occupying more processing resources of the main thread. The main thread can directly pull and display the page display data processed by the auxiliary thread, which reduces the memory resources occupied by the main thread to a certain extent. Therefore, the overhead of page rendering and updating is reduced, thereby reducing the page loading time.
[0101] Furthermore, based on the data type, key feature data is extracted from the data to be processed, so that the extracted key feature data matches the data type to which the data to be processed belongs, thereby improving the accuracy of key feature data extraction; the attribute value data is processed by a data processing component that matches the attribute data type, thereby ensuring the data processing accuracy of the attribute value data, and further ensuring the accuracy of the determination of the page display data.
[0102] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0103] Based on the same inventive concept, the embodiment of the present application also provides a page data processing device for implementing the page data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the page data processing device provided below can refer to the limitations of the page data processing method above, and will not be repeated here.
[0104] In an exemplary embodiment, Figure 6 As shown, a page data processing device 600 is provided, comprising: an extraction module 602, a generation module 604 and a display module 606, wherein:
[0105] The extraction module 602 is used to respond to the backend interaction, use the auxiliary thread to pull the data to be processed, and extract key features of the data to be processed to obtain key feature data;
[0106] A generating module 604 is used to generate page display data corresponding to the data to be processed by using an auxiliary thread according to the key feature data, and send the page display data to the main thread;
[0107] The display module 606 is used to control the front-end page to display content according to the page display data using the main thread.
[0108] In one of the embodiments, the extraction module 602 is also used to identify the data type to which the data to be processed belongs based on the data content of the data to be processed, and obtain the data type, wherein the data type includes at least one of a user behavior type and a traffic type; if the data type includes the user behavior type, user operation feature extraction is performed on the data to be processed to obtain key feature data; if the data type includes the traffic type, traffic distribution feature extraction is performed on the data to be processed to obtain key feature data; if the data type includes the traffic type and the traffic type, user operation feature extraction and traffic distribution feature extraction are performed on the data to be processed to obtain key feature data.
[0109] In one embodiment, the data to be processed includes X sub-data to be processed, and the auxiliary thread includes Y sub-threads, where X and Y are positive integers; the extraction module 602 is further used to generate, for the X sub-data to be processed, processing priorities of the X sub-data to be processed according to data contents of the X sub-data to be processed; obtain thread processing information of the Y sub-threads, wherein the thread processing information is used to characterize thread processing congestion of the sub-threads; and use the Y sub-threads to pull the X sub-data to be processed according to the processing priorities of the X sub-data to be processed and the thread processing information of the Y sub-threads.
[0110] In one of the embodiments, the generation module 604 is also used to identify attribute name data and attribute value data corresponding to the attribute name data from the key feature data; perform data processing on the attribute value data according to a data processing component that matches the attribute data type of the attribute value data to obtain attribute value processing data; and determine the page display data corresponding to the key feature data according to the attribute name data and the attribute value processing data.
[0111] In one of the embodiments, the generation module 604 is also used to, if the attribute data type of the attribute value data includes a load utilization type, perform data processing on the attribute value data according to a load data processing component corresponding to the load utilization type to obtain attribute value processing data; if the attribute data type of the attribute value data includes a data status type, perform data processing on the attribute value data according to a data status processing component corresponding to the data status type to obtain attribute value processing data.
[0112] In one of the embodiments, the display module 606 is also used to obtain page usage information of the front-end page, wherein the page usage information is used to characterize at least one of the page display status and the user usage behavior status; based on the page usage information, the target position corresponding to the page display data is filtered in each display position in the front-end page; and the front-end page is controlled to display the page display data at the target position.
[0113] Each module in the above-mentioned page data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0114] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a page data processing method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0115] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0116] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0117] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0118] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0119] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0120] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0121] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A page data processing method, characterized in that: A main thread and an auxiliary thread applied to a front-end page, wherein the auxiliary thread and the main thread are independent of each other, and the method includes: In response to the backend interaction, the auxiliary thread is used to pull the data to be processed, and key features are extracted from the data to be processed to obtain key feature data; According to the key feature data, using the auxiliary thread to generate page display data corresponding to the data to be processed, and sending the page display data to the main thread; According to the page display data, the main thread is used to control the front-end page to display content.
2. The method according to claim 1, characterized in that The step of extracting key features from the data to be processed to obtain key feature data includes: According to the data content of the data to be processed, the data type to which the data to be processed belongs is identified to obtain the data type; If the data type includes a user behavior type, extracting user operation features from the data to be processed to obtain key feature data; If the data type includes a flow type, extracting flow distribution characteristics of the data to be processed to obtain key characteristic data; If the data type includes flow type and flow type, user operation feature extraction and flow distribution feature extraction are performed on the data to be processed to obtain key feature data.
3. The method according to claim 1, characterized in that The data to be processed includes X sub-data to be processed, the auxiliary thread includes Y sub-threads, X and Y are positive integers; and using the auxiliary thread to pull the data to be processed includes: For the X sub-data to be processed, generating processing priorities of the X sub-data to be processed according to data contents of the X sub-data to be processed; Obtaining thread processing information of the Y sub-threads, wherein the thread processing information is used to characterize thread processing congestion levels of the sub-threads; According to the processing priorities of the X to-be-processed sub-data and the thread processing information of the Y sub-threads, the X to-be-processed sub-data are pulled by using the Y sub-threads.
4. The method according to claim 1, characterized in that: Generating page display data corresponding to the data to be processed according to the key feature data includes: Identifying attribute name data and attribute value data corresponding to the attribute name data from the key feature data; According to the data processing component matching the attribute data type of the attribute value data, the attribute value data is processed to obtain attribute value processed data; The page display data corresponding to the key feature data is determined according to the attribute name data and the attribute value processing data.
5. The method according to claim 4, characterized in that The step of processing the attribute value data according to the data processing component matching the attribute data type of the attribute value data to obtain attribute value processed data includes: If the attribute data type of the attribute value data includes a load utilization type, performing data processing on the attribute value data according to a load data processing component corresponding to the load utilization type to obtain attribute value processing data; If the attribute data type of the attribute value data includes a data status type, data processing is performed on the attribute value data according to a data status processing component corresponding to the data status type to obtain attribute value processing data.
6. The method according to any one of claims 1 to 5, characterized in that The controlling the front-end page to display content according to the page display data includes: Acquire page usage information of the front-end page, wherein the page usage information is used to characterize at least one of a page display status and a user usage behavior status; According to the page usage information, selecting a target position corresponding to the page display data from each display position in the front-end page; The front-end page is controlled to display the page display data at the target location.
7. A page data processing device, characterized in that: A main thread and an auxiliary thread applied to a front-end page, wherein the auxiliary thread is independent of the main thread, and the device comprises: An extraction module, used for responding to the backend interaction, using the auxiliary thread to pull the data to be processed, and extracting key features of the data to be processed to obtain key feature data; A generating module, configured to generate page display data corresponding to the data to be processed by using the auxiliary thread according to the key feature data, and send the page display data to the main thread; The display module is used to display data on the page and control the front-end page to display content using the main thread.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.