Page processing method and device, electronic equipment and storage medium
By sorting and sorting the page cache in the cache, and combining user customer group information to match the target cache display, the problem of low page processing efficiency is solved and the efficient concurrency ability is improved.
Patent Information
- Application Number
- CN202510828622.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-07-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the face of tens of thousands of concurrency, the existing page processing methods are low in processing efficiency and insufficient concurrency capabilities, and cannot effectively support the personalized content display of a large number of users.
By classifying the page cache in the cache based on the page type, sorting the page priority and modification time, a page cache queue is generated, and matching the target page cache according to user customer information for display.
It improves page processing efficiency, improves concurrency capabilities, reduces the frequency of access to the database, ensures the real-time and accuracy of page display, and improves the high concurrency support capabilities of the APP.
Smart Images

Figure CN120354024A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of page caching, and particularly to a page processing method, apparatus, electronic device, and storage medium. Background Art
[0002] In current page processing methods, the pages of an APP (Application) carry all user traffic. With the continuous expansion of the business scale and the number of users, it is estimated that the user traffic may reach a ten-thousand-level concurrency situation at present and in the future. Therefore, it is urgent to optimize the performance of page processing to achieve the ability to carry ten-thousand-level concurrency. Since the pages of the APP currently have the ability of "thousands of people, thousands of faces", that is, "different people see different content", in this scenario, because the returned content for each person is different, the page processing efficiency and concurrency ability in the current page processing method are relatively low. Summary of the Invention
[0003] Embodiments of this application provide a page processing method, apparatus, electronic device, and storage medium to solve one or more problems existing in the related art.
[0004] According to a first aspect of this application, a page processing method is provided. The method includes: classifying the page caches in the cache based on the page type of the page to obtain the page caches corresponding to each page type in the cache; the page cache at least includes page population information, page content data, page priority, and modification time; the page population information includes: characteristic information of the user group applicable to the page and characteristic information of the user group not applicable to the page; sorting the page caches corresponding to each page type based on the page priority and modification time of the page to obtain a page cache queue corresponding to each page type; each page type corresponds to at least one of the page caches; in response to receiving a display instruction for a page, matching the user population information included in the display instruction with the page population information, and determining a corresponding target page cache from the page cache queue; each page cache queue includes at least one page cache that matches the user population information; and displaying the page based on the target page cache.
[0005] According to an implementation manner of this application, before classifying the page caches in the cache based on the page type of the page, the method further includes: generating first cache information corresponding to the page based on the page type and the page data in the database; and updating the page cache corresponding to the page in the cache based on the first cache information to obtain an updated page cache.
[0006] According to an embodiment of the present application, generating the first cache information corresponding to the page based on the page type and the page data in the database includes at least one of the following: in response to receiving a modification instruction for the page data, modifying the page data of the page based on the modification instruction to obtain modified page data, and generating the first cache information corresponding to the page based on the page type and the modified page data; based on a set timed refresh task, determining the pages to be refreshed in the database, and generating the first cache information corresponding to the pages to be refreshed based on the page type and page data of the pages to be refreshed.
[0007] According to an embodiment of the present application, the method further includes: in response to the failure of updating the page cache corresponding to the page in the cache, deleting all page caches corresponding to the page in the cache.
[0008] According to an embodiment of the present application, matching the user population information included in the display instruction with the page population information and determining the corresponding target page cache from the page cache queue includes: the key value of the page cache includes at least the page type, and the value of the page cache includes at least the page population information; in response to the target page type of the display instruction, obtaining the page cache queue corresponding to the target page type; based on the order of the page caches in the page cache queue, sequentially matching the user population information with the page population information corresponding to the page caches; in response to the successful matching of the user population information and the page population information, determining the corresponding page cache as the target page cache.
[0009] According to an embodiment of the present application, the method further includes: matching the user population information included in the display instruction with the page population information included in the page data in the database; in response to the successful matching of the user population information and the page population information, generating the target page cache based on the corresponding page data.
[0010] According to an embodiment of the present application, sorting the page caches corresponding to each page type based on the page priority and modification time of the page to obtain a page cache queue corresponding to each page type includes: arranging the page caches corresponding to each page type based on the page priority to obtain a first sequence; sorting the page caches with the same page priority in the first sequence according to the modification time to obtain the page cache queue.
[0011] According to a second aspect of the present application, there is provided a page processing apparatus, the apparatus comprising: a cache module configured to classify page caches in the cache based on the page type of a page, so as to obtain page caches corresponding to respective page types in the cache; the page cache at least includes page customer group information, page content data, page priority, and modification time; the page customer group information includes: characteristic information of user groups applicable to the page and characteristic information of user groups inapplicable to the page; a sorting module configured to sort the page caches corresponding to respective page types based on the page priority and modification time of the page, so as to obtain page cache queues corresponding to respective page types; each of the page types corresponds to at least one of the page caches; a matching module configured to, in response to receiving a display instruction for a page, match the user customer group information included in the display instruction with the page customer group information, and determine a corresponding target page cache from the page cache queue; each of the page cache queues includes at least one page cache matching the user customer group information; and a display module configured to display the page based on the target page cache.
[0012] According to a third aspect of the present application, there is provided an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method of the present application.
[0013] According to a fourth aspect of the present application, there is provided a non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause a computer to execute the method of the present application.
[0014] The method of the embodiments of the present application classifies page caches in the cache based on the page type of a page, so as to obtain page caches corresponding to respective page types in the cache; the page cache at least includes page customer group information; sorts the page caches corresponding to respective page types based on the page priority and modification time of the page, so as to obtain page cache queues corresponding to respective page types; in response to receiving a display instruction for a page, matches the user customer group information included in the display instruction with the page customer group information, and determines a corresponding target page cache from the page cache queue; each of the page cache queues includes at least one page cache matching the user customer group information; and displays the page based on the target page cache. In this way, the page processing efficiency can be improved and the concurrency ability can be enhanced.
[0015] It should be understood that the teachings of the present application do not necessarily achieve all the beneficial effects described above. Instead, specific technical solutions can achieve specific technical effects, and other embodiments of the present application can also achieve beneficial effects not mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present application will become readily understood. In the drawings, several embodiments of the present application are shown in an exemplary rather than restrictive manner, where: In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0017] Figure 1 Shows the processing flow diagram of the page processing method provided by the embodiment of the present application Figure 1 ; Figure 2 Shows the processing flow diagram of the page processing method provided by the embodiment of the present application Figure 2 ; Figure 3 Shows the processing flow diagram of the page processing method provided by the embodiment of the present application Figure 3 ; Figure 4 Shows the processing flow diagram of the page processing method provided by the embodiment of the present application Figure 4 ; Figure 5 Shows an application scenario diagram of the page processing method provided by the embodiment of the present application; Figure 6 Shows an optional schematic diagram of the page processing device provided by the embodiment of the present application; Figure 7 Shows the composition structure diagram of the electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] To make the objectives, features, and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present application.
[0019] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0020] In the following description, the terms "first / second" only distinguish similar objects and do not represent a specific order for the objects. Understandably, "first / second" can be interchanged with a specific order or sequence when allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0022] The processing flow in the page processing method provided by the embodiments of this application will be described. Refer to Figure 1 , Figure 1 is a schematic diagram of the processing flow of the page processing method provided by the embodiments of this application Figure 1 , and will be described in conjunction with Figure 1 the steps S101 - S104 shown.
[0023] Step S101: Classify the page caches in the cache based on the page type of the page to obtain the page caches corresponding to each page type in the cache; the page cache at least includes page population information, page content data, page priority, and modification time; the page population information includes: characteristic information of the user groups applicable to the page and characteristic information of the user groups not applicable to the page.
[0024] In some embodiments, the page type may include page types such as home page type, secondary page type, and pop - up page type, etc. The embodiments of this application do not limit the specific page type. The page may include pages in an application. The cache can be used to temporarily store page data to avoid accessing the database for each instruction for the page. The page cache may include information such as page population information, page content data, page priority, and modification time. The embodiments of this application do not limit the specific page cache. Each page type corresponds to at least one page cache. The page population information may include: characteristic information of the user groups applicable to the page and characteristic information of the user groups not applicable to the page.
[0025] Step S102: Sort the page caches corresponding to each page type based on the page priority and modification time of the page to obtain the page cache queue corresponding to each page type; each page type corresponds to at least one page cache.
[0026] In some embodiments, the page priority may include: the priority among pages of the same preset page type. The page with a higher page priority is placed in the front in the page cache queue. The modification time may include: the timestamp of the last modification of the page. The modification time can be used to: when the page priorities are the same, determine the sorting order of the page caches in the page cache queue. The page cache with a later modification time is placed in the front in the page cache queue. The page cache queue may include: multiple page caches classified by page type, and the pages in each page cache queue are sorted according to the page priority and the modification time. The specific page cache queue may be a redis cache queue.
[0027] Step S103, in response to receiving a display instruction for a page, match the user population information included in the display instruction with the page population information, and determine the corresponding target page cache from the page cache queue; each page cache queue includes at least one page cache that matches the user population information.
[0028] Step S104, display the page based on the target page cache.
[0029] In some embodiments, the display instruction may include: an instruction for the user to request page display. Each page cache queue including at least one page cache that matches the user population information may include: the last page cache in each page cache queue is a page cache applicable to the entire population. Sequentially match the user population information in the display instruction with the page population information in the page cache queue, determine the page cache that matches the user population information from the page cache queue, and determine this page cache as the target page cache. Displaying the page based on the target page cache may include: obtaining the page data in json format corresponding to the target page cache from the cache, and displaying the page based on the page data in json format.
[0030] The method of the embodiments of the present application can effectively improve the display speed of the APP pages while ensuring the integrity of the function of personalized pages for each user. On the basis of increasing the performance of the page backend interface by 50%, it ensures the real-time effectiveness of the in-house management configuration information in the page, and also ensures real-time and accurate population matching. The page processing method can greatly improve the ability of the page to support high concurrency. In the traditional way, each time a user requests the home page, it is necessary to access the database. However, through the page processing method, it is not necessary to access the database every time the home page is requested, and the write operation of the in-house management project to the cache can be restricted to a lower frequency (20 - 30 times a day), effectively avoiding the impact of the cache write operation on the APP performance. At the same time, the read operation of the cache on the mobile side will not affect the APP performance even during the peak period (200 times per second), which can improve the page processing efficiency and enhance the concurrency ability.
[0031] In some embodiments, a schematic diagram of the processing flow of the page processing method is shown as follows. Figure 2 As Figure 2 shown, before classifying the page caches in the cache based on the page type of the page in step S101, the page processing method may further include: Step S201: Generate first cache information corresponding to the page based on the page type and the page data in the database.
[0032] Step S202: Update the page cache corresponding to the page in the cache based on the first cache information to obtain an updated page cache.
[0033] In this embodiment, the page data in the database may include information such as page content and page attributes stored in the database. Among them, the page attributes may include page customer group information, page priority, page modification time, and other attributes. The first cache information may include information generated according to the page type and the page data in the database. The first cache information specifically includes page customer group information, priority, modification time, and other information. The page cache in the cache can be updated through the page data in the database. The page data in the database may include the key value and the numerical value of the page data, where the key value of the page data consists of the page id (unique identifier); the data structure is a string. The data structure of the page data is of the json format type. The specific page data may include: Key: homeCache: 20243212323 Value: page json format data. The cache data volume of the page cache may include: there can be five page caches in the page cache queue corresponding to each page type, and there are a total of 5 page types, so 25 page caches can be cached in the cache. A page cache in json format is about 39kb, so the single cache data volume is small and suitable for being stored in the cache. The updated page cache may include: the page cache updated by the first cache information, including the latest page content and attribute information.
[0034] In some embodiments, generating the first cache information corresponding to the page based on the page type and the page data in the database in step S201 includes at least one of the following: in response to receiving a modification instruction for the page data, modifying the page data of the page based on the modification instruction to obtain modified page data, and generating the first cache information corresponding to the page based on the page type and the modified page data; based on a set timed refresh task, determining the pages to be refreshed in the database, and generating the first cache information corresponding to the pages to be refreshed based on the page type and the page data of the pages to be refreshed.
[0035] In some embodiments, the modification instruction may include: the modification instruction sent by the administrator for the page data. Specifically, the modification instruction may include: instructions corresponding to modification operations such as updating page content, adjusting customer group information, and adjusting page components. The modified page data may include: the page data obtained after the modification operation. The timed refresh task may include: a cache update task that is automatically executed according to a preset time period. The timed refresh task may be used to: update the page data in the database to the cache. The page to be refreshed may include: the page for which it is determined to update the cache when the timed refresh task is executed.
[0036] As an example, the page of the APP on the platform with the page type of the home page may display different content according to the user customer group information. When the in-house management user on the platform modifies the content of a certain module on the home page in the background and sends a modification instruction, in response to the modification instruction, the page data corresponding to the home page in the database is modified to obtain the modified page data. Based on the page type (home page) and the modified page data, the first cache information corresponding to the home page is generated. The first cache information includes information such as new page content, applicable customer groups for the page, inapplicable customer groups for the page, and modification time. The first cache information can be used to update the page cache of the home page in the cache.
[0037] As an example, a timed refresh task is set, for example, to execute once during the non-peak hours of the APP every day. When the timed refresh task is triggered, the page to be refreshed in the database is determined. For example, the home page is determined as the page to be refreshed. Based on the page type of the home page and the page data of the home page in the database, the first cache information corresponding to the home page is generated. Based on the page type and the existing page data in the database, new first cache information is generated. The first cache information can be used to update the page cache of the home page in the cache.
[0038] In some embodiments, the page processing method may further include: in response to the failure of updating the page cache corresponding to the page in the cache, deleting all page caches corresponding to the page in the cache.
[0039] As an example, when the in-house management user on the platform modifies the content in a certain component of the home page and sends a modification instruction, in response to the modification instruction, the page data corresponding to the home page in the database is modified and the first cache information of the home page is generated. The page cache of the home page in the cache is updated according to the first cache information. In the case of failure to update the page cache of the home page in the cache, all page caches corresponding to the home page in the cache are deleted.
[0040] In some embodiments, the processing flow of the page processing method is schematically shown Figure 3 , such as Figure 3 shown, including: Such as Figure 3As shown, matching the user population information included in the display instruction with the page population information in step S103 and determining the corresponding target page cache from the page cache queue may specifically include: Step S301, in response to the target page type of the display instruction, obtain the page cache queue corresponding to the target page type.
[0041] Step S302, based on the order of the page caches in the page cache queue, sequentially match the user population information with the page population information corresponding to the page caches.
[0042] Step S303, in response to successful matching of the user population information and the page population information, determine the corresponding page cache as the target page cache.
[0043] In this embodiment, the key value of the page cache may include the page type, and the value of the page cache may include the page population information. The page cache in the page cache matching may include: the key value of the page cache and the value of the page cache. The key value of the page cache may be composed of the page type; the data structure is a string. The value of the page cache is composed of the page id, the list of inapplicable populations, the list of applicable populations, and the page effective time; the data structure is List <map>Type. The specific page cache may include: Key:home:1:2024 Value: (homeid:20243212321,rejectGroup:[-1,-2,-3],applyGroup:[-1,-2,-3],startTime:"2023-11-01 00:00:00), (homeid:20243212322,rejectGroup:[-1,-2,-3],applyGroup:[-1,-2,-3],startTime:"2023-11-01 00:00:00"), (homeid:20243212323,rejectGroup:[-1,-2,-3],applyGroup:[-l,-2,-3],startTime:"2023-11-01 00:00:00")。
[0044] As an example, when the user opens the APP and requests to display the home page, a display instruction is generated. The target page type included in the display instruction is the home page, and the display instruction also includes user customer group information. According to the target page type, the page cache queue corresponding to the home page is obtained from the cache. The page cache queue includes multiple page caches of the home page arranged in sequence, and each cache corresponds to the same or different page customer group information and page content. The first page cache obtained from the obtained home page data list is retrieved, and it is checked whether the page cache has taken effect. If it has taken effect, the user customer group information is matched with the page customer group information of the page cache. In response to the customer group corresponding to the page customer group information being applicable to the customer group corresponding to the user customer group information, it is determined that the user customer group information and the page customer group information match successfully, and the corresponding page cache is determined as the target page cache. If the page customer group information of the first page cache does not match the user customer group information, the same operation is performed on the second page cache in sequence. This continues until a matching page cache appears. Since the last page cache of each page cache queue is the page cache applicable to all customer groups, a page cache that matches the user customer group information can definitely be found.
[0045] In some embodiments, the page processing method may further include: matching the user customer group information with the page customer group information included in the page data in the database; in response to the user customer group information and the page customer group information matching successfully, generating a target page cache based on the corresponding page data.
[0046] As an example, if the page cache queue corresponding to the home page fails to be obtained from the cache, it will jump back to the database to match the user population information with the page population information included in the page data in the database. In response to the successful matching of the user population information and the page population information, the corresponding page data will be updated to the cache to obtain the target page cache. The failure to obtain the page cache queue corresponding to the home page from the cache may include: the key value of the page cache in the page cache queue is empty.
[0047] In some embodiments, the processing flow of the page processing method is schematically shown Figure 4 , such as Figure 4 shown, including: such as Figure 4 shown, in step S102, sorting the page caches corresponding to each page type based on the page priority and modification time of the page to obtain the page cache queue corresponding to each page type, which may specifically include: Step S401, arranging the page caches corresponding to each page type based on the page priority to obtain a first sequence.
[0048] Step S402, sorting the page caches with the same page priority in the first sequence according to the modification time to obtain the page cache queue.
[0049] In this embodiment, the first sequence may include: an initial sequence obtained by sorting the page caches corresponding to each page type based on the page priority. There may be the same order corresponding to the page caches with the same page priority in the first sequence. The modification time can be used to: sort the page caches when the page priorities are the same. The page cache queue may include: a page cache sequence obtained by sorting according to the page priority first and then the modification time.
[0050] As an example, for the page cache of the home page type, the page caches with page priorities 1, 2, and 3 are arranged in this first sequence in turn. For the page caches with the same page priority in the first sequence, they are sorted according to the modification time. For example, in the first sequence, there are three page caches with a page priority of 2, then these three page caches are arranged in descending order of modification time.
[0051] Refer to Figure 5 , an application scenario diagram of the page processing method provided in the embodiment of the present application, which is applied to the APP home page performance optimization process.
[0052] Step 1a, the internal management user modifies the home page data. Specifically, the internal management user modifies the home page data in the background.
[0053] Step 1b, the scheduled task refreshes the page cache. Specifically, set a scheduled task that is used to regularly refresh the page cache in the cache according to the home page data in the database.
[0054] Step 2, query the database. Specifically, it is used to query the page data that needs to be updated to the redis cache from the database.
[0055] Step 3, update the redis data (page, customer group information). Update the home page data obtained from the database to the redis cache.
[0056] Step 4, the user views the page and the mobile terminal sends the customer number. Specifically, the user opens the APP on the mobile terminal, and the mobile terminal sends the customer number of the user to the server corresponding to the APP.
[0057] Step 5, query the user's customer group list according to the customer number. Specifically, the server queries the customer group list of the user according to the customer number provided by the mobile terminal.
[0058] Step 6, obtain the home page cache list and match the home page with the order of 1. Specifically, obtain the home page cache list from the cache and match the page cache of the home page with the order of 1.
[0059] Step 7, check if the page is effective, and at the same time obtain the page customer group information of this home page. Specifically, check if the matched target page has become effective, and obtain the page customer group information of the target page.
[0060] Step 8, match the user's customer group list with the page customer group. Specifically, match the customer group list of the user with the page customer group information.
[0061] Step 9, determine if the match is successful.
[0062] If the match is successful (Y), then execute Step 10, obtain the corresponding json format data from the cache and return it.
[0063] If the match fails (N), then execute Step 11, match the home page with the priority of 2 of this type. Specifically, if the page with the priority of 1 does not match, then match the page customer group information of the page with the priority of 2.
[0064] Step 12, if no home page is matched, then display the all-customer-group page. Specifically, the all-customer-group page is applicable to all customer groups.
[0065] Step 13, delete all caches of the corresponding page. Specifically, if the update of the redis data fails, then delete all caches of the corresponding page.
[0066] Step 14, throw an exception. Specifically, an exception is thrown in case of cache deletion failure or other exceptions.
[0067] Step 15, catch the exception, execute the database matching logic, and refresh the page cache again. Specifically, after catching the exception, use the original matching logic in the database for page display and refresh the page cache again.
[0068] Next, continue to describe the exemplary structure of the software modules included in the page processing device 90 provided by the embodiments of the present application. In some embodiments, as Figure 6 shown, the page processing device 90 may include: a cache module 901, configured to classify the page caches in the cache based on the page type of the page, to obtain the page caches corresponding to each page type in the cache; the page cache includes at least page population information; a sorting module 902, configured to sort the page caches corresponding to each page type based on the page priority and modification time of the page, to obtain a page cache queue corresponding to each page type; a matching module 903, configured to, in response to receiving a display instruction for a page, match the user population information included in the display instruction with the page population information, and determine a corresponding target page cache from the page cache queue; each page cache queue includes at least one page cache that matches the user population information; a display module 904, configured to display the page based on the target page cache.
[0069] In some embodiments, the page processing device 90 further includes an update module, and the update module may be configured to: generate first cache information corresponding to the page based on the page type and the page data in the database; update the page cache corresponding to the page in the cache based on the first cache information to obtain an updated page cache.
[0070] In some embodiments, the update module may be configured to perform at least one of the following: in response to receiving a modification instruction for the page data, modify the page data of the page based on the modification instruction to obtain modified page data, and generate first cache information corresponding to the page based on the page type and the modified page data; based on a set timed refresh task, determine the pages to be refreshed in the database, and generate first cache information corresponding to the pages to be refreshed based on the page type and the page data of the pages to be refreshed.
[0071] In some embodiments, the update module may be configured to: in response to the failure of updating the page cache corresponding to the page in the cache, delete all the page caches corresponding to the page in the cache.
[0072] In some embodiments, the key value of the page cache includes at least the page type, and the value of the page cache includes at least the page population information. The matching module 903 can be configured to: in response to the target page type of the display instruction, obtain the page cache queue corresponding to the target page type; based on the order of the page caches in the page cache queue, sequentially match the user population information with the page population information corresponding to the page cache; in response to the successful matching of the user population information and the page population information, determine the corresponding page cache as the target page cache.
[0073] In some embodiments, the page processing device 90 further includes a query module, and the query module can be configured to: match the user population information with the page population information included in the page data in the database; in response to the successful matching of the user population information and the page population information, generate a target page cache based on the corresponding page data.
[0074] In some embodiments, the sorting module 902 can be configured to: sort the page caches corresponding to each page type based on the page priority to obtain a first sequence; sort the page caches with the same page priority in the first sequence according to the modification time to obtain the page cache queue.
[0075] It should be noted that the description of the device in the embodiments of the present application is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments, so details will not be repeated. For the technical details not described in the page processing device provided in the embodiments of the present application, they can be understood according to Figures 1 to 5 the description of any one of the accompanying drawings.
[0076] According to the embodiments of the present application, the present application also provides an electronic device and a non-transitory computer-readable storage medium.
[0077] Figure 7 FIG. shows a schematic block diagram of an exemplary electronic device 800 that can be used to implement the embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processing, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present application described herein and / or claimed.
[0078] As Figure 7 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0079] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disc, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0080] The computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 executes the various methods and processes described above, such as the page processing method. For example, in some embodiments, the page processing method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the page processing method described above can be executed. Alternatively, in other embodiments, the computing unit 801 can be configured to execute the page processing method in any other appropriate manner (e.g., by means of firmware).
[0081] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0082] The program code for implementing the methods of this application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0083] In the context of this application, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0084] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0085] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0086] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship between the client and the server is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, or a server of a distributed system, or a server incorporating a blockchain.
[0087] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this application can be achieved, and no limitation is made herein.
[0088] As described above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.< / map>
Claims
1. A page processing method, characterized in that, The method includes: Classifying the page caches in the cache based on the page type of the page to obtain the page caches corresponding to each page type in the cache; the page cache includes at least page population information, page content data, page priority, and modification time; the page population information includes: characteristic information of the user groups applicable to the page and characteristic information of the user groups not applicable to the page; Sorting the page caches corresponding to each page type based on the page priority and modification time of the page to obtain a page cache queue corresponding to each page type; each page type corresponds to at least one of the page caches; In response to receiving a display instruction for a page, matching the user population information included in the display instruction with the page population information, and determining a corresponding target page cache from the page cache queue; each page cache queue includes at least one page cache that matches the user population information; Displaying the page based on the target page cache.
2. The method according to claim 1, characterized in that Before classifying the page caches in the cache based on the page type of the page, the method further includes: Generating first cache information corresponding to the page based on the page type and the page data in the database; Updating the page cache corresponding to the page in the cache based on the first cache information to obtain an updated page cache.
3. The method according to claim 2, wherein The generating first cache information corresponding to the page based on the page type and the page data in the database includes at least one of the following: In response to receiving a modification instruction for the page data, modifying the page data of the page based on the modification instruction to obtain modified page data, and generating first cache information corresponding to the page based on the page type and the modified page data; Based on a set timed refresh task, determining the pages to be refreshed in the database, and generating first cache information corresponding to the pages to be refreshed based on the page type and page data of the pages to be refreshed.
4. The method according to claim 2, wherein The method further includes: In response to the failure of updating the page cache corresponding to the page in the cache, deleting all page caches corresponding to the page in the cache.
5. The method according to claim 1, wherein The matching the user population information included in the display instruction with the page population information and determining a corresponding target page cache from the page cache queue includes: The key value of the page cache includes at least the page type, and the value of the page cache includes at least the page population information; In response to the target page type of the display instruction, obtaining the page cache queue corresponding to the target page type; Based on the order of the page caches in the page cache queue, sequentially matching the user population information with the page population information corresponding to the page caches; In response to the successful matching of the user population information with the page population information, determining the corresponding page cache as the target page cache.
6. The method according to claim 1, wherein The method further includes: Matching the user population information included in the display instruction with the page population information included in the page data in the database; In response to successful matching of the user population information and the page population information, generate the target page cache based on the corresponding page data.
7. The method according to claim 1, characterized in that, Sort the page caches corresponding to each page type based on the page priority and modification time of the page, to obtain a page cache queue corresponding to each page type, including: Arrange the page caches corresponding to each page type based on the page priority, to obtain a first sequence; Sort the page caches with the same page priority in the first sequence according to the modification time, to obtain the page cache queue.
8. A page processing device, characterized in that, The apparatus includes: A cache module, configured to classify the page caches in the cache based on the page type of the page, to obtain the page caches corresponding to each page type in the cache; the page cache at least includes page population information, page content data, page priority, and modification time; the page population information includes: characteristic information of the user group applicable to the page and characteristic information of the user group not applicable to the page; A sorting module, configured to sort the page caches corresponding to each page type based on the page priority and modification time of the page, to obtain a page cache queue corresponding to each page type; each page type corresponds to at least one of the page caches; A matching module, configured to, in response to receiving a display instruction for a page, match the user population information included in the display instruction with the page population information, and determine the corresponding target page cache from the page cache queue; each page cache queue includes at least one page cache that matches the user population information; A display module, configured to display the page based on the target page cache.
9. An electronic device, characterized in that, Including: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method according to any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause a computer to execute the method according to any one of claims 1-7.
Citation Information
Patent Citations
Page generation method and device based on custom module, equipment and storage medium
CN111273904A
Page display method and device, electronic equipment and storage medium
CN116974561A
Method and apparatus for classifying and acquiring cache pages, and electronic device
WO2020024709A1