Preheat data storage method and device, electronic equipment and readable storage medium
By collecting user behavior data and obtaining warm-up data, the problem of slow data response speed when users first access is solved, fast loading and efficient access is achieved, resource usage and server burden are optimized, and user experience and response speed are improved.
Patent Information
- Application Number
- CN202411327534.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, the data response speed is slow when a user accesses the target active service interface for the first time and cannot meet the user's needs.
By collecting user behavior data, determining the target data interface, and obtaining and storing warm-up data, so that users can quickly load during subsequent visits, reducing waiting time and improving response speed.
Improve data access efficiency, optimize resource usage, reduce server burden, avoid obtaining data from slow-responsive remote servers or disks, and significantly improve data response speed.
Smart Images

Figure CN119166925A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a preheating data storage method, device, electronic device and readable storage medium. Background Art
[0002] With the development of information technology, users have higher and higher requirements for data response speed. At present, in response to the client's request for data access, the application server first checks whether the data required by the user exists in the cache. If the data required by the user does not exist in the cache, it is necessary to request the data required by the user from the remote server, and then store the data required by the user first, and then feedback the data required by the user to the client, which results in a slow return of data to the client.
[0003] Therefore, the current data response speed cannot meet user needs. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a preheating data storage method, device, electronic device and readable storage medium, which can improve the data response speed. The specific technical solution is as follows:
[0005] In a first aspect of the present invention, a method for preheating data storage is provided, comprising:
[0006] Acquire multiple user behavior data, each user behavior data includes: user identification information and access records; multiple user behavior data are generated by access history activities;
[0007] According to the access records, a target data interface of the target activity is determined; the target data interface is a server-side interface that provides preheating data related to the user's access records; the activity content information of the historical activity is associated with the activity content information of the target activity;
[0008] Access the target data interface through user identification information to obtain the preheating data of the target activity;
[0009] The preheating data is stored so that the client can access the preheating data.
[0010] In a second aspect of the present invention, a preheating data storage device is provided, comprising:
[0011] An acquisition module is used to acquire multiple user behavior data, each of which includes: user identification information and access records; the multiple user behavior data are generated by access history activities;
[0012] A determination module is used to determine a target data interface of a target activity according to the access record; the target data interface is a server-side interface that provides preheating data related to the user's access record; the activity content information of the historical activity is associated with the activity content information of the target activity;
[0013] An access module, used to access a target data interface through user identification information to obtain preheating data of a target activity;
[0014] The storage module is used to store preheating data so that the client can access the preheating data.
[0015] In another aspect of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned preheating data storage methods.
[0016] In the embodiment of the present invention, the behavior data of multiple users are collected, including user identification information and access records. Since the user behavior data can reflect the user's habit and preference for accessing data, the behavior data of multiple users are generated by accessing historical activities, indicating that multiple users are interested in historical activities. The activity content information of historical activities is associated with the activity content information of target activities to be launched, indicating that multiple users are also interested in the target activities to be launched. The target data interface is accessed through the user identification information to obtain the preheating data related to the target activity, which can ensure that the user can quickly load the preheating data during subsequent access, reduce the user's waiting time, and improve the user experience. The obtained preheating data is stored so that the client can quickly access it during subsequent access, which not only improves the efficiency of data access, but also optimizes the use of resources and reduces the server burden. As a result, it can be avoided that the client obtains this part of the preheating data from a remote server or disk with a slower response speed, so as to improve the data response speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0018] Figure 1 is a flow chart of a preheating data storage method provided in an embodiment of the present application;
[0019] Figure 2 is a flow chart of another method for preheating data storage provided in an embodiment of the present application;
[0020] Figure 3 It is an interactive schematic diagram of a data preheating method provided in an embodiment of the present application;
[0021] Figure 4is a schematic diagram of the structure of an information display device provided in an embodiment of the present application;
[0022] Figure 5 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0024] The preheating data storage method provided in the embodiment of the present application can be applied to at least the following application scenarios, which are described below.
[0025] Currently, after the application server pushes the target activity to the user, the user accesses the service interface of the target activity and needs to obtain the data required by the user from the remote server that the target activity depends on. Then, the data required by the user is cached in the application server first, and finally, the data required by the user is returned to the user. The disadvantage of this solution is that the data response speed is slow when the user accesses the service interface of the target activity for the first time.
[0026] Based on the above application scenarios, the preheating data storage method provided in the embodiment of the present application is described below.
[0027] Figure 1 A flowchart of a preheating data storage method provided in an embodiment of the present application.
[0028] like Figure 1 As shown, the preheating data storage method may include steps 110 to 140, which are specifically as follows:
[0029] Step 110, obtaining a plurality of user behavior data, each of which includes: user identification information and access records; the plurality of user behavior data is generated by access history activities;
[0030] User identification information is used to uniquely identify a user. User identification information includes:
[0031] User ID, a number or string that uniquely identifies a user;
[0032] Username, the name used by the user when registering;
[0033] Device ID, a unique identifier of the device used by the user;
[0034] IP address, the network address when the user accesses the network.
[0035] Access records record the user's behavior in the system or application. Access records include:
[0036] Timestamp: the time when the user action occurred;
[0037] Visited pages, the pages or URLs visited by users;
[0038] Action type: the action performed by the user, such as click, browse, search, purchase, etc.
[0039] Operation content, the specific content of the operation, such as search keywords, buttons clicked, products purchased, etc.;
[0040] Dwell time refers to the time a user stays on a certain page or operation.
[0041] Collect multiple user behavior data, and then extract the user identification information. The user identification information is used to identify the visitor of the page and is a unique identifier of a user.
[0042] Exemplarily, user behavior data includes: user Xiaoh visits page A on January 1, 2024, that is, the user identification information is "Xiaoh", "Xiaoh" is the user name, and the access record is page A.
[0043] Step 120, determining a target data interface of a target activity according to the access record; the target data interface is a server-side interface that provides preheating data related to the user's access record; the activity content information of the historical activity is associated with the activity content information of the target activity;
[0044] Among them, the target data interface is a server-side interface, which helps the system optimize performance and improve user experience by providing warm-up data related to user access records.
[0045] The activity content information of historical activities may include: activities that users have participated in in the past, pages visited, content clicked, etc. The activity content information of target activities may include: new product release information, promotional activity information, content update information, etc.
[0046] The activity content information includes: activity name, activity time, activity rules and activity object. The following describes the correlation between the activity content information of the historical activity and the activity content information of the target activity:
[0047] The activity name of the historical activity is the name of the activity that the user has participated in or visited in the past; the target activity name is the name of the target activity to be launched; if the name of the historical activity is similar to the name of the target activity, it indicates that the user is interested in similar activities.
[0048] The activity time of historical activities refers to the time of activities that the user has participated in or visited in the past; the activity time of the target activity refers to the estimated time of the activity to be launched; if the user frequently participates in a certain type of activity within a specific time period, it can be predicted that the user will be interested in similar activities within a similar time period.
[0049] The activity rules of historical activities are the rules and requirements of activities that the user has participated in or visited in the past; the activity rules of the target activity are the rules and requirements of the activities to be launched; if the historical activity rules are similar to the target activity rules, it indicates that the user is interested in activities with similar rules.
[0050] The activity objects of historical activities refer to the activity objects targeted by the activities that the user has participated in or visited in the past, such as a specific age group, a specific interest group, etc.; the activity objects of target activities refer to the activity objects targeted by the activities to be launched. If the historical activity objects match the target activity objects, it may indicate that the user is interested in activities of similar objects.
[0051] By analyzing the activity content information of historical activities, we can understand users' interests and behavior patterns, facilitate identifying users who are interested in the target activity, and thus provide users with preheating data that they may be interested in.
[0052] On the one hand, the user's frequently used access data can be analyzed through the user's access records, so as to determine the target data interface corresponding to the frequently used access data. On the other hand, when a target activity is about to be launched, the user behavior data that matches the activity object involved in the target activity can be screened out from the user behavior data, so as to determine the target data interface corresponding to this part of the user behavior data that matches the activity object involved in the target activity, so as to access the target data interface through the user identification information.
[0053] Specifically, we can first define the characteristics of the activity objects. For example, if the target activity is to promote a new product, the activity objects may be users who are interested in the product category. If the new product is "smart watches", then the activity objects may include: users who have browsed pages related to smart watches; users who have searched for the keyword "smart watches"; users who have purchased smart watches or similar products.
[0054] Then, based on the characteristics of the activity object, determine the screening conditions, including: records of users visiting smartwatch-related pages; records of users searching for the keyword "smartwatch"; records of users purchasing smartwatches or similar products.
[0055] Next, the user behavior data is filtered out according to the filtering conditions, and the specific steps include: extracting all user behavior data from the user behavior database; filtering out the user behavior data that meets the filtering conditions from all user behavior data.
[0056] Analyze the acquired user behavior data and focus on the activity objects involved in the user access records. For example, if a user has frequently visited pages or content related to a certain activity theme, the user behavior data can indicate the user's interest in the activity object. After analyzing the user behavior data, filter out the user behavior data that matches the activity objects involved in the target activity. Make sure to focus only on the user behavior data related to the target activity.
[0057] Based on historical access records, a mapping relationship between user behavior and activity objects is constructed. Through the mapping relationship, it is possible to determine which user behavior data corresponds to a specific target activity. When the user behavior data related to the target activity is identified, the target data interface that matches these activity objects can be determined through pre-defined rules or data dictionaries. For example, the system may have a configuration file that lists the interface corresponding to each activity object. Pre-defined rules or data dictionaries can automatically match the correct target data interface based on the user's behavior data and activity object.
[0058] The determined target data interface is accessed through the user identification information to obtain the preheated data related to the target activity. The user identification information is used to verify the user's identity and ensure the security of data access in this process. The information contained in the access record, such as access time, access frequency, and access content, can be used to infer the user's interests and needs, so as to select the target data interface that is most relevant to the user's interests and needs.
[0059] Step 130, accessing the target data interface through the user identification information to obtain the preheating data of the target activity;
[0060] Among them, one user identification information is associated with at least one access record. For example, the access record of user Xiaoh includes: page A, page B, page C. Here, there are three user identification information of user Xiaoh in the user behavior data. The user identification information of user Xiaoh can be deduplicated, and one user identification information of user Xiaoh can be retained, so as to access the target data interface according to the user identification information of user Xiaoh and obtain the preheating data. In the preheating activity, the data interface is used to access data related to user behavior, and the data related to user behavior can help predict which users may be interested in the content that is about to be launched.
[0061] Among them, the user identification information is used to uniquely identify the user; the data interface is a pre-defined interface used to query user behavior data based on the user identifier; the access data interface uses the user identifier as a parameter to call the data interface to obtain the user's behavior data.
[0062] For example, there is a video launch warm-up activity, which can be implemented through the following steps:
[0063] Obtaining behavior data of multiple users from a user behavior database. Each user behavior data includes user identification information and access records;
[0064] According to the characteristics of the activity object, filter out the user behavior data that matches the characteristics of the activity object. For example, if the activity object is a user who has watched science fiction movies or similar types of videos, you can filter out the access records of users who have watched science fiction movies or similar types of videos;
[0065] Determine the corresponding data interface according to the content of the accessed data. For example, if the user accesses a page related to science fiction movies, the corresponding data interface may be a video data interface.
[0066] Use the user identification information as a parameter to call the target data interface to obtain the preheating data. For example, if the user identification information is 12345, the preheating data associated with the user identification information can be obtained by calling the target data interface. The target data interface is a server-side interface that provides preheating data related to the user's access record. The preheating data can be video data or graphic data.
[0067] Since one user identification information may be associated with multiple access records, it is necessary to perform deduplication processing on the user identification information and retain one user identification information. For example, the access records of user Xiaoh include page A, page B, and page C, and the user identification information of one user Xiaoh can be retained.
[0068] Step 140: store the preheating data so that the client can access the preheating data.
[0069] Storing preheated data can specifically load data into the cache or memory of the application server. Thus, data can be loaded into the cache or memory in advance before the user accesses it, which can avoid the slow reading of data from the data storage layer or remote server when the user first accesses the active page. The data storage layer is such as a disk or database, thereby greatly reducing the delay of data access and improving the performance and response speed of the application server.
[0070] Steps 110 to 140 are described below respectively:
[0071] This involves step 110 .
[0072] User behavior data can be obtained from the log record library or database corresponding to the application server. Analyze and filter the collected multiple user behavior data to prepare data for calling the target data interface.
[0073] User behavior data can be obtained from the following two sources: log recording library, application servers usually record user access logs, which contain user access records, operation behaviors and other information; database, the database corresponding to the application server stores user detailed behavior data, such as browsing history, search history, purchase history, etc.
[0074] Analyzing the collected multiple user behavior data may include at least one of the following:
[0075] Analyze the frequency with which users visit a page or perform an action, for example, the number of times a user visits a page or the number of times a user searches for a keyword;
[0076] Analyze user behavior patterns at different time periods, for example, user access habits during the day and at night, and user access habits on weekends and weekdays;
[0077] Analyze the user's access path in the application, for example, the user's access path from the homepage to a certain page, or the user's access path from the search page to the purchase page;
[0078] Analyze users' preferences for different types of content, for example, users' preferences for science fiction movies and users' preferences for sports videos;
[0079] Analyze users' preferences for different actions, for example, whether users prefer clicking buttons or sliding pages, or whether users prefer using search functions or browsing recommended content.
[0080] Screening the collected multiple user behavior data may include at least one of the following:
[0081] According to the characteristics of the activity object, filter out the user behavior data that matches it. For example, if the activity object is a user who has watched science fiction movies or similar types of videos, you can filter out the access records of these users;
[0082] Filter based on user behavior patterns. According to the user behavior patterns, filter out users who meet specific behavior patterns, for example, filter out users who frequently visit pages related to science fiction movies, filter out users who frequently search for science fiction movie keywords;
[0083] De-duplicate the user identification information and retain one user identification information. For example, if the access record of user Xiaoh includes page A, page B, and page C, the user identification information of one user Xiaoh can be retained.
[0084] Filter out invalid data processing, filter out invalid or abnormal user behavior data, for example, filter out records with abnormal access time, filter out records with abnormal operation type.
[0085] As user behavior changes, user behavior data needs to be continuously updated to maintain the accuracy and timeliness of user behavior data. Specifically, the update operation of user behavior data can be triggered by real-time monitoring of user behavior or real-time monitoring of changes in online hot data.
[0086] like Figure 2 As shown, in a possible embodiment, before step 110, the method further includes:
[0087] Step 150, obtaining the activity content information of the target activity; the activity content information includes: activity name, activity time, activity rules and activity object;
[0088] Accordingly, step 110 includes:
[0089] Step 160, determining historical activities according to the activity content information of the target activity;
[0090] Step 170, obtaining multiple user behavior data based on historical activities.
[0091] For example, the activity content information is the annual featured video, the time period of the target activity is December 20, 2023 - December 30, 2023, and the activity rules are to display the activity object in response to the user's click operation or search operation on the target activity, and the activity object is a video.
[0092] The purpose of obtaining multiple user behavior data based on the activity content information is to filter the user behavior data related to the target activity. For example, to filter users who have recently participated in an M activity, the user behavior data of the specified M activity interface address can be filtered. The activity content information of the M activity is related to the activity content information of the target activity, so as to facilitate the acquisition of preheating data based on the user behavior data. The M activity is a historical activity.
[0093] Among them, in the step of filtering user behavior data related to the target activity, M activity is an activity related to the video, and the activity content information includes M activity. The user may have performed operations such as watching, liking, and commenting in the M activity. Filter out the user behavior data that has recently participated in the M activity. For example, filter out users who have participated in the M activity between December 1, 2023 and December 19, 2023.
[0094] Filter the user behavior data of the specified M-activity interface address. The interface address of M-activity is "https: / / example.com / m-activity". The filtering condition is to filter out the user behavior data that has visited the interface address. For example, filter out users who have visited "https: / / example.com / m-activity".
[0095] By analyzing users' historical behavior data, we can predict users' interest in upcoming content, thereby providing more accurate recommendations when the event goes online; divide users into different groups based on their interests and behavioral characteristics, so that personalized recommendations can be made for different groups; generate a list of recommended content in advance based on user interest predictions so that it can be quickly displayed to users when the event goes online; and push event preheating information in advance based on user interest predictions to attract users to participate in the event.
[0096] According to the user behavior data, the corresponding preheating data is obtained. By generating preheating data in advance, it can respond quickly when the user visits, reducing data query and processing time; through personalized recommendations and services, the user's satisfaction and participation can be improved; by generating preheating data in advance, the use of server resources can be optimized and the server load when the activity is launched can be reduced; through accurate recommendations and services, the participation and conversion rate of the activity can be improved. Therefore, the reason for obtaining the corresponding preheating data according to the user behavior data is to be able to quickly respond to user needs and provide personalized recommendations and services when the target activity is launched.
[0097] Exemplarily, the activity content information of the target activity to be launched involves a specific activity object, namely, animation video a. Videos of the same type as animation video a include animation video b. Based on the activity content information, multiple user behavior data are obtained, namely, user behavior data of users who have visited animation video b are filtered out from the initial user behavior data.
[0098] Thus, the activity content information of the target activity is obtained, and based on the activity content information, multiple user behavior data are obtained, and the user's historical behavior data, such as access records, search records, etc., are analyzed to predict the user's interest in the content that is about to be launched. Users who are interested in the target activity that is about to be launched can be found, and preheating data is obtained based on user behavior data before the activity starts, and a recommended content list is generated in advance based on the preheating data, so that the recommended content list can be quickly displayed to the user when the target activity goes online.
[0099] This involves step 120 .
[0100] According to the access records, the target data interface of the target activity is determined. For example, the access records of user Xiaoh include: Page A, that is, the interface of Page A is the target data interface. The page interface refers to the API used to access and obtain specific page data. Through the page interface, you can obtain information such as the content, structure, and user behavior data of the page. The page interface is usually provided by the server, and the client can obtain the required data by calling these interfaces.
[0101] In a possible embodiment, step 120 includes:
[0102] Determine an initial data interface according to the access record, where the initial data interface is an interface of the page indicated by the access record;
[0103] Determine the interface information of the initial data interface, the interface information includes: data access frequency, response time, and data initialization cost;
[0104] According to the interface information, a target data interface is screened from the initial data interface, wherein the data access frequency of the target data interface is greater than a preset frequency; the response time of the target data interface is less than a preset response time; and the data initialization cost of the target data interface is lower than a preset initialization cost.
[0105] The access records of user Xiaoh include: page A, page B, page C.
[0106] Determine the corresponding initial data interface according to the user's access record, which may specifically include the following steps:
[0107] First, analyze the access records, which include: the user visited page A; the user visited page B; the user visited page C.
[0108] Next, determine the page interface: the interface of page A is used to access the data of page A; page B interface: the interface of page B is used to access the data of page B; page C interface: the interface of page C is used to access the data of page C.
[0109] Then, the corresponding initial data interface is determined according to the user's access record. For example, if user Xiaoh accesses page A, the interface of page A is the initial data interface.
[0110] Target data interfaces are interfaces that need to be preheated, usually those that need to preload data or be initialized. The target data interface may take more time to load data or initialize resources when accessed for the first time, so a preheating operation is required. The target data interface that needs to be preheated is usually determined based on the characteristics of the interface and business requirements.
[0111] The following describes the interface information separately:
[0112] Data access frequency refers to the number of times data is accessed within a preset time period. Data interfaces that are frequently accessed by users should be given priority for preheating. Therefore, an initial data interface whose data access frequency is greater than a preset frequency can be determined as a target data interface, or an initial data interface whose data access frequency ranks in the top T among multiple initial data interfaces can be determined as a target data interface, where T is a positive integer.
[0113] Response time sensitivity: If some interfaces have particularly high requirements for response time, then these interfaces may also need to be preheated to ensure user experience.
[0114] Data initialization cost, the computation cost when the data interface is first called. Some interfaces require a lot of data calculation or initialization operations when they are first accessed. By preheating the target data interface, these calculations or initialization operations can be amortized before the user actually accesses it.
[0115] Exemplarily, the preset frequency may be: 200 times / day, 150 times / day, 100 times / day;
[0116] The preset response time can be: 100 ms, 110 ms, 120 ms;
[0117] The preset initialization cost can be: 150 units of CPU time, 150 units of memory consumption.
[0118] Therefore, by determining the initial data interface based on the access record, determining the interface information of the initial data interface, and filtering the target data interface from the initial data interface based on the interface information, the target data interface that needs to be preheated can be accurately filtered out from the initial data interface, so that the target data interface can be accessed subsequently to obtain preheating data and improve the interface response speed.
[0119] Step 130: Access the target data interface through the user identification information to obtain the preheating data of the target activity.
[0120] Exemplarily, the target data interface is accessed through the user identification information of the user Xiao h to obtain the preheating data.
[0121] In a possible embodiment, step 130 includes:
[0122] Access the target data interface through user identification information to obtain initial preheating data;
[0123] Determine data access pattern information based on multiple user behavior data, the data access pattern information including: access time, access frequency, access sequence, access type and data relevance information;
[0124] According to the data access pattern information, the preheating data of the target activity is filtered from the initial preheating data.
[0125] Data access patterns refer to the behavior and manner in which users or applications access data.
[0126] The following describes the data access mode information separately:
[0127] Access time is used to determine when data is accessed most frequently, which may be due to specific business processes or user habits. By analyzing user behavior data, you can identify data with high access volume during a specific time period. This helps determine when to preheat the cache and which data to preheat. You can also predict possible peak access periods in the future and preheat the cache in advance.
[0128] Access frequency is used to determine which data is accessed most frequently, which may be hot data. For example, you can set a preheating strategy to load frequently accessed data into the cache in advance, or optimize the cache replacement strategy based on the order in which the data is accessed.
[0129] According to business needs and system performance, set a preset threshold for access frequency. For example, the preset threshold for access frequency is 100 times / day, and set data with an access frequency exceeding 100 times / day as hot data. By analyzing the access frequency of data, determine which data is accessed more frequently than the preset threshold; identify data with an access frequency exceeding the preset threshold as hot data. Load data with an access frequency exceeding the preset threshold into the cache in advance so that it can respond quickly when users access it.
[0130] Optimize cache replacement strategy: Optimize cache replacement strategy based on data access order and frequency to ensure that hot data is always in the cache.
[0131] Access order is used to determine the order in which data is accessed, for example, sequential access or random access.
[0132] Access type is used to determine whether the access record is mainly read or write, or a mixture of read and write. If there are more read operations, cache preheating is very effective. If write operations are frequent, the preheated data may expire quickly, and a more frequent update strategy is required to re-preheat the cache data.
[0133] Data correlation is used to determine whether a group of data is frequently accessed together and whether there is some correlation between these data. For example, if a user often watches anime videos, it is predicted that the user may be interested in anime-related activities, so data preheating is performed for these users.
[0134] First, the target data interface is accessed through the user identification information to obtain initial preheating data, a part of which is required by the user. Therefore, the preheating data is filtered out from the initial preheating data according to the data access pattern information determined based on the user behavior data.
[0135] Use the user identification information as a parameter to call the target data interface to obtain the user's preheating data. For example, call the getUserBehaviorData interface to obtain the user's behavior data.
[0136] Accessing the target data interface through user identification information may include the following steps:
[0137] On the client or server side, the user identification information is passed as a parameter to the target data interface;
[0138] Call the target data interface through HTTP request or RPC call to pass user identification information;
[0139] The target data interface queries the database or cache according to the user identification information to obtain the corresponding user behavior data, user preference data, etc.
[0140] The target data interface returns the acquired data to the client or server.
[0141] User identification information serves as a unique identifier to uniquely identify the user and ensure the accuracy of data queries; the design of the target data interface needs to consider the transmission and processing of user identification information to ensure that the interface can correctly process user identification information; the target data interface queries the database or cache based on the user identification information to obtain the corresponding user behavior data, user preference data, etc.; the target data interface returns the obtained data to the client or server to ensure the correct transmission and processing of the data.
[0142] User behavior data, user preference data, etc. are stored in a database or cache, and the target data interface can obtain the corresponding data by querying the database or cache.
[0143] Therefore, by analyzing the user's data access pattern information, the preheated data that the user may access can be predicted and loaded into the cache in advance. This can improve the cache hit rate, reduce dependence on backend data storage, and improve cache efficiency and utilization. By selecting preheated data from the initial preheated data more effectively based on data access pattern information, this part of preheated data can be stored to facilitate client access to the preheated data, thereby improving the subsequent client access to the preheated data hit rate and overall performance.
[0144] In a possible embodiment, step 130 includes:
[0145] When it is detected that the client triggers a preset operation, the target data interface is accessed through the user identification information to obtain the preheating data of the target activity; or
[0146] When the system time reaches the preset warm-up time, the target data interface is accessed through the user identification information to obtain the warm-up data of the target activity.
[0147] For example, when it is detected that the client triggers a preset operation, it can be regarded as an event trigger. The preset operation can be searching for keywords related to the target activity, or clicking an activity associated with the target activity.
[0148] In this way, when the user accesses the target activity, the preheated data that the user wants to access can be quickly obtained from the cache of the application server, reducing the time for querying data from the database or other storage systems and improving system performance.
[0149] Specifically, the step of detecting that the client triggers a preset operation can be implemented through event monitoring or message queues. For example, when a user visits a certain page, an event monitoring can be triggered, and then the operation of preheating data can be performed in the event monitoring. Alternatively, through a message queue, when a specific event occurs, a message is sent to the message queue, and then a special service monitors the message queue, and when a message is monitored, data preheating is performed.
[0150] Alternatively, when the system time reaches the preset preheating time, the target data interface is accessed through the user identification information to obtain the target preheating data. The preset preheating time may be a preset time period before the online time of the target activity.
[0151] Therefore, when it is detected that the client triggers a preset operation, or when the system time reaches the preset preheating time, the target data interface is accessed through the user identification information to obtain the target preheating data. The preheating data can be obtained at the appropriate time, avoiding premature acquisition of the preheating data and occupying the cache, while ensuring timely acquisition of the preheating data.
[0152] This involves step 140 .
[0153] Before the user accesses the interface, pre-loading the preheated data into the cache can reduce data access latency and improve data response speed, thereby providing users with a faster and smoother functional experience.
[0154] Through data loading operations, the data that may be needed is loaded into the cache in advance, and when the user accesses the interface, the user's needs can be quickly responded to, data query and processing time can be reduced, and data response speed can be improved. It can also optimize the utilization of server resources, reduce the server load when the activity goes online, and improve system performance.
[0155] In a possible embodiment, after step 140, the following steps may also be included:
[0156] Monitoring the user behavior data in real time;
[0157] When a change in the user behavior data is detected, an update operation on the preheating data is triggered.
[0158] User behavior changes over time, such as user interests, preferences, access habits, etc. As user behavior changes, the data in the cache needs to be updated in a timely manner to maintain the accuracy and timeliness of the data.
[0159] Data update operations are triggered by real-time monitoring of user behavior and hot data changes. Specifically, the following steps may be included: real-time monitoring of user behavior data, including access records, search records, and purchase records; when user behavior data changes, preheating data update operations are triggered to maintain data accuracy and timeliness.
[0160] When the user behavior data changes, the preheating data update operation is triggered, including: when the user behavior data changes, new preheating data is obtained according to the changed user behavior data; the new preheating data is loaded into the cache to replace the old preheating data. In this way, when the user accesses the interface, the preheating data is quickly loaded from the cache, the interface can respond quickly, and the user waiting time is reduced.
[0161] Therefore, by real-time monitoring of changes in user behavior and hot data, the data in the cache is updated in a timely manner to maintain data accuracy; by timely updating the data in the cache, users can quickly obtain the latest preheating data when accessing the interface, reducing waiting time and improving user experience; by timely updating the data in the cache, the utilization of server resources is optimized, reducing server load when activities go online, and improving system performance.
[0162] In a possible embodiment, after step 140, the method further includes:
[0163] Push activity content information to the client;
[0164] receiving an access request from a client, the access request being used to request access to target preheating data; the access request being sent by the client after receiving the activity content information;
[0165] In response to the access request, when it is detected that the preheating data includes the target preheating data, the target preheating data is sent to the client.
[0166] After storing the preheating data, the activity content information can be pushed to the client. Because the preheating data is obtained in advance based on the activity content information, after the target activity is pushed to the user, when the user opens the activity page of the target activity, the response speed of the interface will be improved, that is, the performance of the interface corresponding to the target activity can be improved.
[0167] Storing preheating data in a database or cache can reduce data query time; when a user opens the activity page of a target activity, the preheating data can be directly obtained from the database or cache, which reduces data query time and improves the interface response speed. Due to the improved interface response speed, when a user opens the activity page of a target activity, the page loads faster, improving the user experience; the user's operation response speed in the activity page is faster, providing a smoother user experience.
[0168] In response to the access request, first check whether the preheating data includes the target preheating data. If the preheating data includes the target preheating data, directly return the target preheating data to the client to improve the response speed. If the preheating data does not include the target preheating data, obtain the target preheating data from the database or other data sources, and return the target preheating data to the client.
[0169] Here, in response to the access request, if it is detected that the preheating data includes the target preheating data, the target preheating data is sent to the client, which can avoid reading data from the slower data storage layer each time the access is made. This can significantly reduce the delay of data access and improve the performance and response speed of the system.
[0170] On the one hand, it can respond to user requests more quickly and provide corresponding target preheating data. This can greatly shorten the user's waiting time and improve user experience and satisfaction. On the other hand, it can reduce the number of visits to the backend data storage system and reduce system load and resource overhead. Backend resources usually refer to servers, databases, or file systems responsible for data processing and storage.
[0171] In the embodiment of the present invention, the behavior data of multiple users are collected, including user identification information and access records. Since the user behavior data can reflect the user's habit and preference for accessing data, the behavior data of multiple users are generated by accessing historical activities, indicating that multiple users are interested in historical activities. The activity content information of historical activities is associated with the activity content information of target activities to be launched, indicating that multiple users are also interested in the target activities to be launched. The target data interface is accessed through the user identification information to obtain the preheating data related to the target activity, which can ensure that the user can quickly load the preheating data during subsequent access, reduce the user's waiting time, and improve the user experience. The obtained preheating data is stored so that the client can quickly access it during subsequent access, which not only improves the efficiency of data access, but also optimizes the use of resources and reduces the server burden. As a result, it can be avoided that the client obtains this part of the preheating data from a remote server or disk with a slower response speed, so as to improve the data response speed.
[0172] Based on the above Figure 1The preheating data storage method shown, the embodiment of the present application also provides a data preheating method, such as Figure 3 As shown, the data preheating method involves an application server 100 , a remote server 200 and a client 300 .
[0173] The method involves the following steps of the application server 100:
[0174] Step 110, obtaining a plurality of user behavior data, each of the user behavior data includes: user identification information and access records;
[0175] Step 120, determining a target data interface of a target activity according to the access record;
[0176] Steps involving application server 100 and remote server 200:
[0177] Step 130, accessing the target data interface through the user identification information to obtain the preheating data of the target activity;
[0178] The application server 100 sends a data request to the remote server 200 , where the data request includes interface parameters and user identification information. The remote server 200 returns preheating data to the application server in response to the data request.
[0179] Step 140: store the preheating data so that the client can access the preheating data.
[0180] Steps involving the application server 100 and the client 300:
[0181] The client 300 sends an access request to the application server 100 .
[0182] Step 180 , in response to the access request, when it is detected that the preheating data includes the target preheating data, the target preheating data is sent to the client.
[0183] In the embodiment of the present invention, the behavior data of multiple users are collected, including user identification information and access records. Since the user behavior data can reflect the user's habit and preference for accessing data, the behavior data of multiple users are generated by accessing historical activities, indicating that multiple users are interested in historical activities. The activity content information of historical activities is associated with the activity content information of target activities to be launched, indicating that multiple users are also interested in the target activities to be launched. The target data interface is accessed through the user identification information to obtain the preheating data related to the target activity, which can ensure that the user can quickly load the preheating data during subsequent access, reduce the user's waiting time, and improve the user experience. The obtained preheating data is stored so that the client can quickly access it during subsequent access, which not only improves the efficiency of data access, but also optimizes the use of resources and reduces the server burden. As a result, it can be avoided that the client obtains this part of the preheating data from a remote server or disk with a slower response speed, so as to improve the data response speed.
[0184] Based on the above Figure 1 The preheating data storage method shown, the embodiment of the present application also provides a preheating data storage device, such as Figure 4 As shown, the preheating data storage device 400 may include:
[0185] The acquisition module 410 is used to acquire multiple user behavior data, each of which includes: user identification information and access records; the multiple user behavior data are generated by access history activities;
[0186] Determination module 420, for determining a target data interface of a target activity according to the access record; the target data interface is a server-side interface that provides preheating data related to the user's access record; the activity content information of the historical activity is associated with the activity content information of the target activity;
[0187] Access module 430, used to access the target data interface through user identification information to obtain preheating data of the target activity;
[0188] The storage module 440 is used to store the preheating data so that the client can access the preheating data.
[0189] In a possible embodiment, the acquisition module 410 is further used to acquire activity content information of the target activity; the activity content information includes: activity name, activity time, activity rules and activity object;
[0190] The acquisition module 410 is specifically used for:
[0191] Determining historical activities according to the activity content information of the target activity;
[0192] The plurality of user behavior data are obtained according to the historical activities.
[0193] In a possible embodiment, the determination module 420 is specifically configured to:
[0194] Determine an initial data interface according to the access record, where the initial data interface is an interface of the page indicated by the access record;
[0195] Determining interface information of the initial data interface, the interface information including: data access frequency, response time, and data initialization cost;
[0196] According to the interface information, the target data interface is screened from the initial data interface, the data access frequency of the target data interface is greater than a preset frequency; the response time of the target data interface is less than a preset response time; and the data initialization cost of the target data interface is lower than a preset initialization cost.
[0197] In a possible embodiment, the access module 430 includes:
[0198] Access the target data interface through user identification information to obtain initial preheating data;
[0199] Determine data access pattern information according to the plurality of user behavior data, the data access pattern information including: access time, access frequency, access sequence, access type and data correlation information;
[0200] The preheating data of the target activity is filtered from the initial preheating data according to the data access pattern information.
[0201] In a possible embodiment, the access module 430 includes:
[0202] In the case where it is detected that the client triggers a preset operation, accessing the target data interface through the user identification information to obtain preheating data of the target activity; or
[0203] When the system time reaches the preset warm-up time, the target data interface is accessed through the user identification information to obtain the warm-up data of the target activity.
[0204] In a possible embodiment, the preheating data storage device 400 may further include:
[0205] A push module, used for pushing the activity content information to the client;
[0206] A receiving module, configured to receive an access request from the client, wherein the access request is used to request access to target preheating data; the access request is sent by the client after receiving the activity content information;
[0207] A sending module is used for sending the target preheating data to the client in response to the access request when it is detected that the preheating data includes the target preheating data.
[0208] In a possible embodiment, the preheating data storage device 400 may further include:
[0209] A monitoring module, used to monitor the user behavior data in real time;
[0210] The update module is used to trigger an update operation on the preheating data when a change in the user behavior data is detected.
[0211] In the embodiment of the present invention, the behavior data of multiple users are collected, including user identification information and access records. Since the user behavior data can reflect the user's habit and preference for accessing data, the behavior data of multiple users are generated by accessing historical activities, indicating that multiple users are interested in historical activities. The activity content information of historical activities is associated with the activity content information of target activities to be launched, indicating that multiple users are also interested in the target activities to be launched. The target data interface is accessed through the user identification information to obtain the preheating data related to the target activity, which can ensure that the user can quickly load the preheating data during subsequent access, reduce the user's waiting time, and improve the user experience. The obtained preheating data is stored so that the client can quickly access it during subsequent access, which not only improves the efficiency of data access, but also optimizes the use of resources and reduces the server burden. As a result, it can be avoided that the client obtains this part of the preheating data from a remote server or disk with a slower response speed, so as to improve the data response speed.
[0212] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0213] Memory 503, used for storing computer programs;
[0214] The processor 501 is used to execute the program stored in the memory 503, and implements the following steps:
[0215] Acquire multiple user behavior data, each user behavior data includes: user identification information and access records; multiple user behavior data are generated by access history activities;
[0216] According to the access records, a target data interface of the target activity is determined; the target data interface is a server-side interface that provides preheating data related to the user's access records; the activity content information of the historical activity is associated with the activity content information of the target activity;
[0217] Access the target data interface through user identification information to obtain the preheating data of the target activity;
[0218] The preheating data is stored so that the client can access the preheating data.
[0219] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0220] The communication interface is used for communication between the above terminal and other devices.
[0221] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0222] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0223] In another embodiment provided by the present invention, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the preheating data storage method described in any one of the above embodiments.
[0224] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the preheating data storage method described in any one of the above embodiments.
[0225] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0226] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0227] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0228] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for preheating data storage, It is characterized in that The method comprises: Acquire multiple user behavior data, each of which includes: user identification information and access records; the multiple user behavior data are generated by access history activities; Determine a target data interface for a target activity according to the access record; the target data interface is a server-side interface that provides preheating data related to the user's access record; the activity content information of the historical activity is associated with the activity content information of the target activity; Accessing the target data interface through the user identification information to obtain preheating data of the target activity; The preheating data is stored so that the client can access the preheating data.
2. The method according to claim 1, before obtaining the plurality of user behavior data, the method further comprises: include: Get the activity content information of the target activity; The activity content information includes: activity name, activity time, activity rules and activity objects; The obtaining of multiple user behavior data includes: Determining historical activities according to the activity content information of the target activity; The plurality of user behavior data are obtained according to the historical activities.
3. The method according to claim 1, wherein the target data interface of the target activity is determined based on the access record. include: Determine an initial data interface according to the access record, where the initial data interface is an interface of the page indicated by the access record; Determining interface information of the initial data interface, the interface information including: data access frequency, response time, and data initialization cost; According to the interface information, the target data interface is screened from the initial data interface, the data access frequency of the target data interface is greater than a preset frequency; the response time of the target data interface is less than a preset response time; and the data initialization cost of the target data interface is lower than a preset initialization cost.
4. The method according to claim 1, wherein the target data interface is accessed through the user identification information to obtain the preheating data of the target activity. include: Access the target data interface through user identification information to obtain initial preheating data; Determine data access pattern information according to the plurality of user behavior data, the data access pattern information including: access time, access frequency, access sequence, access type and data correlation information; The preheating data of the target activity is filtered from the initial preheating data according to the data access pattern information.
5. The method according to claim 1, wherein the target data interface is accessed through the user identification information to obtain the preheating data of the target activity. include: In the case where it is detected that the client triggers a preset operation, accessing the target data interface through the user identification information to obtain preheating data of the target activity; or, When the system time reaches the preset warm-up time, the target data interface is accessed through the user identification information to obtain the warm-up data of the target activity.
6. The method according to claim 2, wherein after storing the preheating data for the client to access the preheating data, the method further include: Pushing the activity content information to the client; receiving an access request from the client, wherein the access request is used to request access to target preheating data; The access request is sent by the client after receiving the activity content information; In response to the access request, when it is detected that the preheating data includes the target preheating data, the target preheating data is sent to the client.
7. The method according to claim 1, wherein after storing the preheating data for the client to access the preheating data, the method further include: Monitoring the user behavior data in real time; When a change in the user behavior data is detected, an update operation on the preheating data is triggered.
8. A preheating data storage device, It is characterized in that The device comprises: An acquisition module, used to acquire a plurality of user behavior data, each of which includes: user identification information and access records; the plurality of user behavior data is generated by access history activities; A determination module, configured to determine a target data interface of a target activity according to the access record; the target data interface is a server-side interface that provides preheating data related to the user's access record; the activity content information of the historical activity is associated with the activity content information of the target activity; An access module, used to access the target data interface through the user identification information to obtain the preheating data of the target activity; The storage module is used to store the preheating data so that the client can access the preheating data.
9. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Video data caching method and device
CN104778271A
Data acquisition method based on local cache and distributed cache and application server
CN112100537A
Content caching method and device in mobile edge network and electronic equipment
CN112261668A
Hotspot data processing method and device, equipment and storage medium
CN113806399A
Personalized data loading method and device, electronic equipment and storage medium
CN114428901A
