Page data display method and device, electronic equipment and storage medium
By optimizing distributed cache interaction through combined query identifiers, the problem of numerous interactions and long processing times caused by reading data from multiple pages is solved, resulting in more efficient page data retrieval.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2023-05-30
- Publication Date
- 2026-04-17
AI Technical Summary
In user-terminal device interaction scenarios, reading data from multiple pages requires multiple interactions with the distributed cache, resulting in numerous interactions, long interaction times, and overall transaction timeouts.
In response to a request to open a target page, based on the type of the target page and/or user attribute information, M query dimensions are determined, combined into N query identifiers, and page data is retrieved from the distributed cache and displayed.
It reduces the number of interactions, reduces system consumption and latency, reduces the impact of network jitter and occasional slowdowns in distributed cache processing on the page data retrieval process, and reduces interaction time.
Smart Images

Figure CN116701797B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of big data technology, specifically to a method, apparatus, electronic device, and storage medium for displaying page data. Background Technology
[0002] In scenarios where users interact with terminal devices, the terminal device can display different page data to different users, and each user can perform operations such as selection based on the page data displayed by the terminal device. For example, in scenarios such as coupon redemption or flash sales, the terminal device can display information about the activities that each user can participate in on the interactive window page. In related technologies, application software generally uses distributed caching to store page data or hot data.
[0003] In realizing the concept disclosed herein, the inventors discovered at least the following problems in the related technology: each time page data is read, a complete interaction with the distributed cache is required. Reading data from multiple pages leads to a large number of interactions, longer interaction times, and overall transaction timeouts. Summary of the Invention
[0004] In view of the above problems, this disclosure provides a method, apparatus, electronic device and storage medium for displaying page data.
[0005] According to the first aspect of this disclosure, a method for displaying page data is provided, comprising:
[0006] In response to receiving a request to open the target page, determine M query dimensions based on the type of the target page and / or user attribute information, where M≥1;
[0007] Based on M query dimensions, determine N combined query identifiers, where each combined query identifier includes at least one query dimension, and M≥N≥1;
[0008] Retrieve page data from the distributed cache based on N combined query identifiers; and
[0009] Display page data.
[0010] According to embodiments of this disclosure, N combined query identifiers are determined based on M query dimensions, including:
[0011] Combine the query identifiers of the M query dimensions into a first query identifier;
[0012] Based on the first query identifier, a first combination result matching the first query identifier is determined. This first combination result indicates whether the first query identifier exists in the distributed cache.
[0013] If the first query identifier exists in the first combined result representation, the first query identifier is determined as the combined query identifier.
[0014] According to embodiments of this disclosure, the method further includes:
[0015] If the first query identifier is not present in the first combined result representation, the query identifiers of at least two query dimensions will be combined into a second query identifier.
[0016] Based on the second query identifier, determine the second combination result that matches the second query identifier;
[0017] If the second query identifier exists in the second combination result representation, the second query identifier and the remaining query identifiers are determined as N combination query identifiers, where the remaining query identifiers include query identifiers that do not form the second query identifier;
[0018] If the second combined result does not represent a second query identifier, the query identifiers of the M query dimensions are determined as N combined query identifiers.
[0019] According to embodiments of this disclosure, the method further includes:
[0020] If the first query identifier does not exist in the first combined result representation, the query identifiers of the M query dimensions are determined as M combined query identifiers, where M = N.
[0021] According to embodiments of this disclosure, determining a first combination result matching the first query identifier based on the first query identifier includes:
[0022] Retrieve the combined record, which includes the standard query identifier that has been combined in the distributed cache; and
[0023] The first combination result is determined based on the first query identifier and the combined record.
[0024] According to embodiments of this disclosure, prior to obtaining the combined record, the method further includes:
[0025] Obtain the query frequency of L full query dimensions, where full query dimensions include query dimensions for multiple pages and multiple user attribute information, and L≥M≥1; and
[0026] Based on the query frequency, the L full query dimensions are combined into S standard query identifiers, and combined records are generated, where S≥1.
[0027] According to embodiments of this disclosure, retrieving page data from a distributed cache based on N combined query identifiers includes:
[0028] Using N combined query identifiers as N primary key names, and through N retrieval operations, retrieve N key values that match the N primary key names from the distributed cache. The N key values include page data corresponding to M query dimensions.
[0029] A second aspect of this disclosure provides a page data display device, comprising:
[0030] The determination module is used to respond to a request to open a target page and determine M query dimensions, M≥1, based on the type of the target page and / or user attribute information.
[0031] The combination module is used to determine N combined query identifiers based on M query dimensions, wherein the combined query identifier includes at least one query dimension, and M≥N≥1;
[0032] The acquisition module is used to retrieve page data from the distributed cache based on N combined query identifiers; and
[0033] The display module is used to display page data.
[0034] A third aspect of this disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the page data display method described above.
[0035] A fourth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the page data display method described above.
[0036] The fifth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described page data display method.
[0037] The embodiments of this disclosure, in response to a request to open a target page, determine M query dimensions based on the type of the target page and / or user attribute information; determine N combined query identifiers, each including at least one query dimension, based on the M query dimensions; and retrieve and display page data from a distributed cache based on the N combined query identifiers, thus achieving page data retrieval with reduced interaction counts. In the embodiments of this disclosure, query dimensions are merged into combined query identifiers for each user and page type, reducing data dimensions. Therefore, interaction with the distributed cache based on combined query identifiers can achieve the technical effects of reducing interaction counts, reducing system consumption, and reducing latency. Furthermore, reducing the number of interactions with the distributed cache can also reduce the impact of network jitter and occasional slowdowns in distributed cache processing on the page data retrieval process, further reducing interaction time. Attached Figure Description
[0038] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0039] Figure 1 This illustration schematically depicts an application scenario of the page data display method according to an embodiment of the present disclosure;
[0040] Figure 2 A flowchart illustrating a page data display method according to an embodiment of the present disclosure is shown schematically;
[0041] Figure 3 A flowchart illustrating a combined query identifier determination method according to a first embodiment of the present disclosure is shown schematically;
[0042] Figure 4 A flowchart illustrating a combined query identifier determination method according to a second embodiment of the present disclosure is shown schematically.
[0043] Figure 5 The illustration shows a flowchart of determining a combined query identifier according to a specific embodiment of the present disclosure;
[0044] Figure 6 This illustration schematically shows a data flow diagram of determining a combined query identifier based on query dimensions and user attribute information according to a specific embodiment of the present disclosure;
[0045] Figure 7 A schematic diagram illustrating the structure of a page data display device according to an embodiment of the present disclosure is shown; and
[0046] Figure 8 A block diagram schematically illustrates an electronic device suitable for a page data display method according to an embodiment of the present disclosure. Detailed Implementation
[0047] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0048] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0049] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0050] When using expressions such as "at least one of A, B, and C", the expression should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).
[0051] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of data (including but not limited to user personal information) comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good morals.
[0052] In scenarios where users interact with terminal devices, application software typically uses distributed caching to store page data or frequently accessed data to address the issue of poor concurrent read / write capabilities of databases. For high-concurrency scenarios such as coupon redemption and flash sales, application software also stores activity information, inventory information, and various parameter information in distributed caches to provide users with a high-efficiency server.
[0053] However, the principle of distributed caching is that only data under one key can be read in a single interaction. Due to this limitation, when displaying multiple pages of data across multiple dimensions to a user through a single page, multiple interactions with the distributed cache are required to retrieve the data for each page. This results in longer interaction times, increasing system performance overhead and processing latency.
[0054] Furthermore, the interaction time will be further increased by factors such as network jitter and occasional slowdowns in distributed caching, which are added to the data acquisition process after multiple interactions.
[0055] Therefore, in order to solve the problem of excessive interaction times, long interaction periods, and overall transaction timeouts caused by reading multiple interactive data, this disclosure provides a page data display method, apparatus, electronic device, and storage medium.
[0056] Embodiments of this disclosure provide a method for displaying page data, comprising: in response to receiving a request to open a target page, determining M query dimensions, M≥1, based on the type of the target page and / or user attribute information; determining N combined query identifiers based on the M query dimensions, wherein the combined query identifiers include at least one query dimension, M≥N≥1; retrieving page data from a distributed cache based on the N combined query identifiers; and displaying the page data.
[0057] Figure 1 The illustration depicts an application scenario of the page data display method according to an embodiment of the present disclosure.
[0058] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, a server 105, and a distributed cache 106. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105, and between the server 105 and the distributed cache 106. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0059] Users can interact with server 105 via network 104 using at least one of the first terminal device 101, second terminal device 102, and third terminal device 103 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, second terminal device 102, and third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0060] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0061] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0062] It should be noted that the page data display method provided in this embodiment can generally be executed by server 105. Correspondingly, the page data display device provided in this embodiment can generally be located in server 105. The page data display method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the page data display device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0063] For example, any one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 generates a request to open the target page based on the user's operation, and sends the request to the server 105. Upon receiving the request to open the target page, the server 105 determines M query dimensions (M≥1) based on the type of the target page and / or user attribute information; determines N combined query identifiers based on the M query dimensions, where each combined query identifier includes at least one query dimension (M≥N≥1); and retrieves page data from the distributed cache 106 based on the N combined query identifiers. Then, the server 105 can send the page data and instructions for displaying the page data to any one of the first terminal device 101, the second terminal device 102, and the third terminal device 103, so that any one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 can display the page data.
[0064] Alternatively, the page data display method provided in this embodiment can be executed by any one of the first terminal device 101, the second terminal device 102, and the third terminal device 103. Correspondingly, the page data display device provided in this embodiment can generally be located in any one of the first terminal device 101, the second terminal device 102, and the third terminal device 103.
[0065] For example, any one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 generates a request to open the target page based on the user's operation. In response to receiving the request to open the target page, M query dimensions are determined based on the type of the target page and / or user attribute information, where M ≥ 1; based on the M query dimensions, N combined query identifiers are determined, where each combined query identifier includes at least one query dimension, where M ≥ N ≥ 1; based on the N combined query identifiers, page data is retrieved from the distributed cache 106. Then, the page data is displayed on any one of the first terminal device 101, the second terminal device 102, and the third terminal device 103.
[0066] It should be understood that Figure 1 The number of terminal devices, networks, servers, and distributed caches shown is merely illustrative. Depending on implementation needs, there can be any number of terminal devices, networks, and servers.
[0067] The following will be based on Figure 1 The described scene, through Figures 2-6 The page data display method of the disclosed embodiments will be described in detail.
[0068] Figure 2 A flowchart illustrating a page data display method according to an embodiment of the present disclosure is shown schematically.
[0069] like Figure 2 As shown, the method 200 includes operations S210 to S240.
[0070] In operation S210, in response to receiving a request to open the target page, M query dimensions are determined based on the type of the target page and / or user attribute information, where M≥1.
[0071] In operation S220, based on M query dimensions, N combined query identifiers are determined, wherein each combined query identifier includes at least one query dimension, and M≥N≥1.
[0072] In operation S230, page data is retrieved from the distributed cache based on N combined query identifiers.
[0073] Operating S240, displaying page data.
[0074] According to embodiments of this disclosure, the type of the target page is used to characterize the function of the target page. For example, if function 1 of the target page is used to display transaction activities that users can participate in, then the type of the target page is "participable activities"; if function 2 of the target page is used to display various shopping coupons that users can purchase, then the type of the target page is "shopping coupon purchase".
[0075] According to embodiments of this disclosure, user attribute information includes information such as the user's gender, age, and region. It should be noted that user attribute information is obtained or used only with the user's permission. For example, before a user logs into the system, permission to use the user's attribute information is obtained from the user through an interactive page.
[0076] According to embodiments of this disclosure, the query dimension is used to represent the dimensions of multiple items to be displayed on the target page.
[0077] According to embodiments of this disclosure, query dimensions can be determined based on the type of the target page. For example, if the target page is used to display specific information about a flash sale item A, the items to be displayed on the target page include price, release time, and inventory quantity. The query dimensions can correspond one-to-one with the items to be displayed, namely price, release time, and inventory quantity.
[0078] According to embodiments of this disclosure, query dimensions can also be determined based on user attributes. For example, when a user opens the "My Information" page to view user information, the items to be displayed on the target page include specific information about user attributes, such as region, age, and gender.
[0079] According to embodiments of this disclosure, query dimensions can also be determined based on the type of the target page and user attribute information.
[0080] For example, when the target page type is "Participable Activities," the target page displays a list of multiple activities that users can participate in, with each activity list including multiple activities of the same type. In the above case, the items to be displayed include the activity list and the multiple activities within the activity list. When displaying a list of flash sales and limited-time offers on the target page, the query dimensions determined based on the target page type are "flash sales" and "limited-time offers."
[0081] When the available purchase activities include product A and product B, and the available flash sale activities include product C, the activities that a user can participate in are determined to be product A and product C based on user attribute information such as the user's location and gender. Therefore, the query dimensions also include the specific information of product A and product C.
[0082] According to embodiments of this disclosure, M query dimensions can be determined based on the mapping relationship between the target page type and / or user attribute information and query dimensions. The mapping relationship can be pre-stored in the terminal device or server.
[0083] According to embodiments of this disclosure, a combined query identifier is used to retrieve page data in a distributed cache, wherein the combined query identifier includes at least one query dimension.
[0084] For example, two or more query dimensions can be combined to obtain a combined query identifier. Alternatively, a combined query identifier can be determined based on a single query dimension without combining query dimensions.
[0085] According to embodiments of this disclosure, the distributed cache stores information in a key / value format. In these embodiments, the distributed cache is modified so that a single value in the distributed cache can store multiple pieces of information representing combined query identifiers. Therefore, by interacting with the distributed cache N times based on N combined query identifiers, page information across M query dimensions can be obtained.
[0086] According to embodiments of this disclosure, after obtaining page data, the page data can be displayed to the user on the target page.
[0087] According to embodiments of this disclosure, a target page can be displayed through an interactive window of a terminal device. Displaying page data includes: the server retrieving page data from a distributed cache and sending the page data and instructions for displaying the page data to the terminal device, so that the terminal device can display the page data on the target page.
[0088] According to embodiments of this disclosure, displaying page data further includes: after the terminal device obtains page data from a distributed cache, displaying the page data on the target page.
[0089] The embodiments of this disclosure, in response to a request to open a target page, determine M query dimensions based on the type of the target page and / or user attribute information; determine N combined query identifiers, each including at least one query dimension, based on the M query dimensions; and retrieve and display page data from a distributed cache based on the N combined query identifiers, thus achieving page data retrieval with reduced interaction counts. In the embodiments of this disclosure, for each user and page type, by merging query dimensions into combined query identifiers, the data dimensions are reduced. Therefore, interaction with the distributed cache based on the combined query identifiers can achieve the technical effects of reducing the number of interactions, reducing system consumption, and reducing latency. Furthermore, reducing the number of interactions with the distributed cache can also reduce the impact of network jitter and occasional slowdowns in distributed cache processing on the page data retrieval process, further reducing interaction time.
[0090] Figure 3 A flowchart illustrating a combined query identifier determination method according to a first embodiment of the present disclosure is shown.
[0091] like Figure 3 As shown, the combination query identifier determination 300 in the first embodiment includes operations S321 to S323, which can be used as a specific embodiment of operation S220.
[0092] In operation S321, the query identifiers of the M query dimensions are combined into the first query identifier.
[0093] In operation S322, based on the first query identifier, a first combination result matching the first query identifier is determined. The first combination result is used to characterize whether the first query identifier exists in the distributed cache.
[0094] In operation S323, if the first query identifier exists in the first combined result representation, the first query identifier is determined as the combined query identifier.
[0095] According to embodiments of this disclosure, the query identifier can be understood as the name of the query dimension, and the specific implementation includes: determining the primary key name of the distributed cache as the name of the query dimension.
[0096] For example, if the query dimension is determined to be the price of product A based on the type of the target page, the query identifier would be "the price of product A". If the query dimension is determined to be the user's location (province X) based on user attribute information, the query identifier would be "province X". If the query dimension is determined to be a flash sale event available in province X based on the type of the target page and user attribute information, the query identifier would be "flash sale in province X".
[0097] According to embodiments of this disclosure, the first query identifier includes N query dimensions. The query identifiers of the N query dimensions can be combined in a preset order to obtain the first query identifier.
[0098] According to embodiments of this disclosure, N query dimensions can be combined in the order of the first letter or number of the query identifier. For example, if the query dimensions include Province X, Female, and 20 years old, the first combined query identifier can be "Province X + 20 years old + Female", with the combination order being letters-numbers-text characters.
[0099] According to embodiments of this disclosure, the first combined result is used to characterize whether a first query identifier exists in the distributed cache. By modifying the distributed cache, the distributed cache key includes a query identifier for at least one query dimension, and the value can store multiple activity identifiers and activity names.
[0100] According to embodiments of this disclosure, the key in the distributed cache may include query identifiers for multiple query dimensions. For example, combining multiple query dimensions such as Beijing, male, and 40-50 years old yields a first query identifier "beijng+male+age40-50". When key = "beijng+male+age40-50" exists in the distributed cache, the first combination result indicates the existence of the first query identifier in the distributed cache. The value of key = "beijng+male+age40-50" can be obtained based on the first query identifier, thus obtaining all page data that can be accessed by "Beijing, male, 40-50 years old".
[0101] The embodiments of this disclosure prioritize combining all query dimensions into a first query identifier and determine whether the first query identifier exists in the distributed cache. This can minimize the number of query dimensions and the number of dimension combinations, so as to obtain all page data through a single interaction.
[0102] According to an embodiment of this disclosure, when the first combined result characterizes the absence of a first query identifier, the query identifiers of the M query dimensions are determined as M combined query identifiers, where M = N.
[0103] According to an embodiment of this disclosure, when the first combination result indicates that the distributed cache does not have a first query identifier, it means that the page data of the M query dimensions in the distributed cache are stored in at least two keys respectively, and are not stored in a key that is a combination of the M query dimensions.
[0104] As a specific implementation, if the first combined result does not represent the first query identifier, the original interaction method with the distributed cache is maintained, and page data of M query dimensions is obtained through M interactions in order to reduce performance consumption.
[0105] According to embodiments of this disclosure, the key in the distributed cache may include only a query identifier for one query dimension.
[0106] For example, a query dimension for activities only for men could be: key = "male", value = activity id1, activity name1, activity id2, activity name2. A query dimension for activities in Beijing could be: key = "beijing", value = activity id3, activity name3, activity id4, activity name4. A query dimension for activities for those aged 40-50 could be: key = "age40-50", value = activity id5, activity name5, activity id6, activity name6. Therefore, the query identifier for each query dimension is used as a combined query identifier to retrieve page data for the three query dimensions (activities 1-6) through three interactions.
[0107] Figure 4 A flowchart illustrating a combined query identifier determination method according to a second embodiment of the present disclosure is shown.
[0108] like Figure 4 As shown, the combined query identifier determination method 400 of the second embodiment includes operations S421 to S424, which can be used as a specific embodiment of operation S220.
[0109] In operation S421, if the first query identifier is not present in the first combined result representation, the query identifiers of at least two query dimensions are combined into a second query identifier.
[0110] In operation S422, a second combination result matching the second query identifier is determined based on the second query identifier.
[0111] In operation S423, if the second combination result characterization has a second query identifier, the second query identifier and the remaining query identifiers are determined as N combination query identifiers, wherein the remaining query identifiers include query identifiers that do not form the second query identifier.
[0112] In operation S424, if the second combined result representation does not have a second query identifier, the query identifiers of the M query dimensions are determined as N combined query identifiers.
[0113] According to a specific embodiment of this disclosure, if the first combination result indicates that the first query identifier does not exist, the M query dimensions are combined again to obtain a second query identifier. Then, it is determined whether the second query identifier exists in the distributed cache based on the second combination result, so as to determine the combined query identifier based on the second query identifier.
[0114] According to embodiments of this disclosure, combining query identifiers of at least two query dimensions into a second query identifier includes: using M-1 as a base, combining M-1 query dimensions into a second query identifier.
[0115] For example, when the query dimensions are male, Beijing, and 40-50 years old, if the distributed cache contains key = "beijng+male", the second combination result indicates that the distributed cache contains the second query identifier "Beijing male". Therefore, the value of key = "beijng+male" can be obtained based on the second query identifier, and all page data that can be accessed by "Beijing, male, 40-50 years old" can be obtained based on the remaining query identifier "age40-50".
[0116] According to embodiments of this disclosure, combining query identifiers of at least two query dimensions into a second query identifier further includes: combining them in the order of M-1, M-2, ..., 3, 2, according to all possible permutations of two or more query dimensions to obtain the second query identifier.
[0117] For example, when the query dimensions are A, B, C, and D, the second query identifier includes A+B+C, B+C+D, A+B+D, A+C+D, A+B, B+C, C+D, A+C, A+D, and B+D.
[0118] In embodiments of this disclosure, when it is impossible to combine M query dimensions into a single query identifier, a second query identifier is generated by combining the query dimensions twice, and the existence of the key in the distributed cache is determined based on the second query identifier. This can reduce the number of query dimensions from M to N, reduce the number of interactions, and reduce system consumption and latency.
[0119] Figure 5 The illustration shows a flowchart of determining a combined query identifier according to a specific embodiment of the present disclosure.
[0120] like Figure 5 As shown in the flowchart 500, the process of determining the combined query identifier includes operations S501 to S507.
[0121] In operation S501, the first query identifier is generated based on the query identifiers of M query dimensions.
[0122] In operation S502, check if the first query identifier exists in the distributed cache. If the first query identifier exists in the distributed cache, proceed to operation S506. If the first query identifier does not exist in the distributed cache, proceed to operation S503.
[0123] In operation S503, a second query identifier is generated based on the query identifiers of the M query dimensions. For example, at least two query dimensions are combined to obtain multiple second query identifiers.
[0124] In operation S504, check if a second query identifier exists in the distributed cache. For example, for each of multiple second query identifiers, check if the second query identifier exists in the distributed cache. If the second query identifier exists in the distributed cache, proceed to operation S507. If the second query identifier does not exist in the distributed cache, proceed to operation S505.
[0125] In operation S505, M combined query identifiers are determined based on the second query identifier and the remaining query identifier. For example, multiple second query identifiers existing in the distributed cache are used as corresponding multiple combined query identifiers, and the remaining query identifiers are used as combined query identifiers.
[0126] Operation S506 determines the first query identifier as M combined query identifiers. In the above case, M=1.
[0127] Operation S507 determines the query identifiers of the M query dimensions as M combined query identifiers.
[0128] Figure 6 The illustration shows a data flow diagram of determining a combined query identifier based on query dimensions and user attribute information according to a specific embodiment of the present disclosure.
[0129] like Figure 6 As shown in the data flow diagram 600, a specific implementation example of determining the combined query identifier based on the type of the target page and user attribute information is provided.
[0130] Based on the type of the target page, M initial query dimensions can be determined, such as the first initial query dimension 601_1, ..., the m-th initial query dimension 601_m, ..., the M-th initial query dimension 601_M. Each initial query dimension corresponds to multiple options, and each option can be regarded as a query dimension.
[0131] For example, the first query dimension 601_1 includes query dimensions A 602_11, B 602_12, and C 602_13; the m-th query dimension 601_m includes query dimensions D 602_m1 and E 602_m2; and the M-th query dimension 601_M includes query dimensions F 602_M1, G 602_M2, and H 602_M3.
[0132] According to embodiments of this disclosure, after determining M initial query dimensions based on the type of the target page, a selection item can be determined from each initial query dimension based on user attribute information 603 to obtain the query dimension. For example, query dimension A602_11, query dimension D602_m1, and query dimension G602_M2.
[0133] After determining query dimension A 602_11, query dimension D 602_m1, and query dimension G 602_M2, a first combined query identifier 604 can be generated based on the query identifiers of the query dimensions. For example, based on the query identifiers A', D', and G' corresponding to query dimensions A, D, and G respectively, the first combined query identifier 604 "query identifier A' + query identifier D' + query identifier G'" is obtained.
[0134] According to one embodiment of this disclosure, when determining the query dimension solely based on the type of the target page, multiple options under the initial query dimension can be determined as the query dimension.
[0135] According to an embodiment of this disclosure, determining a first combined result matching the first query identifier based on the first query identifier includes: obtaining a combined record, the combined record including a standard query identifier that has been combined in a distributed cache; and determining the first combined result based on the first query identifier and the combined record.
[0136] According to embodiments of this disclosure, a combined record is used to record combined standard query identifiers in the distributed cache. The standard query identifier represents the query identifier obtained during the modification of the distributed cache, that is, the new key generated in the distributed cache.
[0137] According to embodiments of this disclosure, by obtaining combined records when generating standard query identifiers, the first combined result can be quickly determined, reducing query time and further improving interaction efficiency.
[0138] According to embodiments of this disclosure, a second combination result matching the second query identifier is determined based on the second query identifier, which is similar to the operation described above and will not be repeated here.
[0139] According to embodiments of this disclosure, the combined records can be pre-stored on a local server or local terminal device, eliminating the need to obtain the combined records through interaction during the implementation of the above-described page data display method, thus reducing the number of interactions.
[0140] According to embodiments of this disclosure, before obtaining the combined record, the method further includes:
[0141] Obtain the query frequency of L full query dimensions, where the full query dimensions include query dimensions for multiple pages and multiple user attribute information, L≥M≥1; and based on the query frequency, combine the L full query dimensions into S standard query identifiers and generate combined records, S≥1.
[0142] According to embodiments of this disclosure, before modifying the distributed cache, multiple combinations with high query frequencies can be determined by obtaining the query frequency of all query dimensions. According to embodiments of this disclosure, L full query dimensions are combined, and a query frequency list is generated based on the query frequency of the L full query dimensions. The query frequency list includes multiple candidate standard query identifiers and the query frequency of each candidate standard query identifier.
[0143] According to embodiments of this disclosure, S standard query identifiers are obtained from multiple candidate standard query identifiers in the query frequency list in descending order of query frequency, and combined query records are generated.
[0144] According to embodiments of this disclosure, historical query dimension information between an application or system and a distributed cache can be obtained through a monitoring system, the query frequency of combined query identifiers can be automatically output, and multiple query dimensions that can be combined can be displayed to developers so as to automatically generate combined query tags.
[0145] According to embodiments of this disclosure, business personnel can also use the activity editing module to maintain different activities across different dimensions according to business needs. Historical query dimension information is obtained through the monitoring system, and multiple query dimensions are selected based on personalized or business requirements to generate a combined query identifier.
[0146] According to embodiments of this disclosure, retrieving page data from a distributed cache based on N combined query identifiers includes:
[0147] Using N combined query identifiers as N primary key names, and through N retrieval operations, retrieve N key values that match the N primary key names from the distributed cache. The N key values include page data corresponding to M query dimensions.
[0148] The embodiments of this disclosure solve the problem that, due to the limitations of distributed caching, only one dimension of the activity list can be queried at a time by reducing M query dimensions to 1 or N combined query identifiers, thus optimizing the original N queries into 1 or N queries. This achieves the technical effects of reducing the number of interactions, reducing interaction time, and reducing system consumption and latency.
[0149] Figure 7 A schematic block diagram of a page data display device according to an embodiment of the present disclosure is shown.
[0150] like Figure 7 As shown, the page data display device 700 of this embodiment includes a determining module 710, a combining module 720, an acquiring module 730, and a display module 740.
[0151] The determining module 710 is configured to, in response to receiving a request to open a target page, determine M query dimensions, where M ≥ 1, based on the type of the target page and / or user attribute information. In one embodiment, the determining module 710 may be used to perform the operation S210 described above, which will not be repeated here.
[0152] The combination module 720 is used to determine N combined query identifiers based on M query dimensions, wherein each combined query identifier includes at least one query dimension, and M ≥ N ≥ 1. In one embodiment, the combination module 720 can be used to perform the operation S220 described above, which will not be repeated here.
[0153] The acquisition module 730 is used to retrieve page data from the distributed cache based on N combined query identifiers. In one embodiment, the acquisition module 730 can be used to perform the operation S230 described above, which will not be repeated here.
[0154] The display module 740 is used to display page data. In one embodiment, the display module 740 can be used to perform the operation S240 described above, which will not be repeated here.
[0155] According to embodiments of this disclosure, the combination module 720 includes a first combination unit, a second combination unit, and a third combination unit.
[0156] The first combining unit is used to combine the query identifiers of the M query dimensions into a first query identifier. In one embodiment, the first combining unit can be used to perform the operation S321 described above, which will not be repeated here.
[0157] The second combination unit is used to determine a first combination result that matches the first query identifier based on the first query identifier. The first combination result is used to indicate whether the first query identifier exists in the distributed cache. In one embodiment, the second combination unit can be used to perform the operation S322 described above, which will not be repeated here.
[0158] The third combining unit is used to determine the first query identifier as a combined query identifier when the first combining result indicates the existence of the first query identifier. In one embodiment, the third combining unit can be used to perform the operation S323 described above, which will not be repeated here.
[0159] According to embodiments of this disclosure, the combination module 720 further includes a fourth combination unit, a fifth combination unit, a sixth combination unit, and a seventh combination unit.
[0160] The fourth combination unit is used to combine the query identifiers of at least two query dimensions into a second query identifier when the first combination result indicates that the first query identifier does not exist. In one embodiment, the fourth combination unit can be used to perform the operation S421 described above, which will not be repeated here.
[0161] The fifth combining unit is used to determine a second combining result that matches the second query identifier based on the second query identifier. In one embodiment, the fifth combining unit can be used to perform the operation S422 described above, which will not be repeated here.
[0162] The sixth combination unit is used to determine the second query identifier and the remaining query identifiers into N combined query identifiers when the second combination result indicates the existence of the second query identifier. The remaining query identifiers include query identifiers that did not form the second query identifier. In one embodiment, the sixth combination unit can be used to perform the operation S423 described above, which will not be repeated here.
[0163] The seventh combination unit is used to determine the query identifiers of the M query dimensions as N combined query identifiers when the second combination result characterizes the absence of a second query identifier. In one embodiment, the seventh combination unit can be used to perform the operation S424 described above, which will not be repeated here.
[0164] According to an embodiment of this disclosure, the combination module 720 further includes an eighth combination unit, which is used to determine the query identifiers of the M query dimensions as M combined query identifiers, where M=N, when the first combination result characterizes the absence of a first query identifier.
[0165] According to embodiments of this disclosure, the second combining unit includes an acquisition subunit and a determination subunit.
[0166] The sub-unit is used to retrieve the combined record, which includes the standard query identifier that has been combined in the distributed cache.
[0167] The determined sub-unit is used to determine the first combination result based on the first query identifier and the combined record.
[0168] According to embodiments of this disclosure, the page data display device 700 further includes a frequency acquisition module and a record generation module.
[0169] The frequency acquisition module is used to obtain the query frequency of L full query dimensions. The full query dimensions include query dimensions of multiple pages and multiple user attribute information, where L≥M≥1.
[0170] The record generation module is used to combine L full query dimensions into S standard query identifiers based on the query frequency, and generate combined records, where S≥1.
[0171] According to embodiments of this disclosure, the acquisition module includes a frequency acquisition unit, which uses N combined query identifiers as N primary key names and acquires N key values matching the N primary key names from the distributed cache through N acquisition operations. The N key values include page data corresponding to M query dimensions.
[0172] According to embodiments of this disclosure, any multiple modules among the determining module 710, combining module 720, acquiring module 730, and display module 740 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module.
[0173] According to embodiments of this disclosure, at least one of the determining module 710, combining module 720, acquiring module 730, and displaying module 740 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable method of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three methods. Alternatively, at least one of the determining module 710, combining module 720, acquiring module 730, and displaying module 7400 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0174] Figure 8 A block diagram schematically illustrates an electronic device suitable for a page data display method according to an embodiment of the present disclosure.
[0175] like Figure 8 As shown, an electronic device 800 according to an embodiment of this disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0176] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0177] According to embodiments of this disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0178] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0179] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0180] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this disclosure.
[0181] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0182] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0183] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by processor 801, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0184] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0185] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0186] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0187] The specific embodiments described above further illustrate the purpose, technical solutions, and beneficial effects of this disclosure. It should be understood that the above descriptions are merely specific embodiments of this disclosure and are not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.
Claims
1. A method for displaying page data, comprising: In response to receiving a request to open a target page, M query dimensions are determined based on the type of the target page and / or user attribute information, where M ≥ 1; Based on the M query dimensions, N combined query identifiers are determined, wherein each combined query identifier includes at least one of the query dimensions, and M ≥ N ≥ 1; Based on the N combined query identifiers, retrieve page data from the distributed cache; and Display the page data; The step of determining N combined query identifiers based on the M query dimensions includes: Combine the query identifiers of the M query dimensions into a first query identifier; Based on the first query identifier, a first combination result matching the first query identifier is determined, and the first combination result is used to characterize whether the first query identifier exists in the distributed cache; If the first query identifier is not present in the first combination result, the query identifiers of at least two query dimensions will be combined into a second query identifier. Based on the second query identifier, determine the second combination result that matches the second query identifier; If the second combined result indicates the existence of the second query identifier, the second query identifier and the remaining query identifiers are determined as the N combined query identifiers, wherein the remaining query identifiers include query identifiers that do not form the second query identifier; If the second combined result indicates that the second query identifier does not exist, the query identifiers of the M query dimensions are determined as the N combined query identifiers.
2. The method according to claim 1, wherein, The method further includes: If the first query identifier exists in the first combined result representation, the first query identifier is determined as the combined query identifier.
3. The method according to claim 2, further comprising: If the first query identifier does not exist in the first combined result representation, the query identifiers of the M query dimensions are determined as M combined query identifiers, where M=N.
4. The method according to claim 2, wherein, The step of determining the first combination result matching the first query identifier based on the first query identifier includes: Retrieve the combined record, which includes the combined standard query identifier in the distributed cache; and The first combination result is determined based on the first query identifier and the combined record.
5. The method according to claim 4, wherein, Before retrieving the combined records, the following is also included: Obtain the query frequency of L full query dimensions, where each full query dimension includes query dimensions for multiple pages and multiple user attribute information, and L ≥ M ≥ 1; and Based on the query frequency, the L full query dimensions are combined into S standard query identifiers, and the combined record is generated, where S≥1.
6. The method according to claim 1, wherein, The step of retrieving page data from the distributed cache based on the N combined query identifiers includes: Using the N combined query identifiers as N primary key names, and through N retrieval operations, retrieve N key values that match the N primary key names from the distributed cache. The N key values include page data corresponding to the M query dimensions.
7. A page data display device, comprising: The determination module is used to, in response to receiving a request to open a target page, determine M query dimensions based on the type of the target page and / or user attribute information, where M≥1; The combination module is used to determine N combined query identifiers based on the M query dimensions, wherein the combined query identifiers include at least one of the query dimensions, and M≥N≥1; The acquisition module is used to retrieve page data from the distributed cache based on the N combined query identifiers; and The display module is used to display the page data; The combination module is further configured to: combine the query identifiers of the M query dimensions into a first query identifier; determine a first combination result matching the first query identifier based on the first query identifier, wherein the first combination result is used to indicate whether the first query identifier exists in the distributed cache; if the first combination result indicates that the first query identifier does not exist, combine the query identifiers of at least two query dimensions into a second query identifier; determine a second combination result matching the second query identifier based on the second query identifier; if the second combination result indicates that the second query identifier exists, determine the second query identifier and the remaining query identifiers as the N combined query identifiers, wherein the remaining query identifiers include query identifiers that did not form the second query identifier; if the second combination result indicates that the second query identifier does not exist, determine the query identifiers of the M query dimensions as the N combined query identifiers.
8. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Data request processing method and device, computer equipment and storage medium
CN111901383A