Data updating method, device, equipment, storage medium and program product

By using multimodal large models to predict the life of cached data and update the cached data in the Redis database, the problem that cached data update strategy in the existing technology cannot guarantee timeliness, and the user access response speed is improved.

CN118861071BActive Publication Date: 2024-12-13CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411336796.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-13
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

The existing Redis database cache data update strategy cannot guarantee timeliness, resulting in the cache data being unable to be updated in time, reducing the user access response speed.

Method used

By obtaining the log data of the target web page, we build text data and visits containing preset keywords, use a multi-modal big model to predict the life of cached data of each preset keyword, and update the cached data based on the lifespan to ensure that the cached data is Timeliness.

Benefits of technology

Real-time dynamic update of cached data is realized, ensuring the timeliness of cached data and improving user access response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118861071B_ABST
    Figure CN118861071B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment, storage medium and program product for data updating, which specifically include: obtaining log data of a target web page, the log data including multiple preset keywords, preset information corresponding to each preset keyword, and the number of visits to the preset keywords at different time points, the preset information being used to measure the popularity of the preset keywords; constructing text data containing preset keywords based on the log data; inputting the text data and the number of visits to the preset keywords at different time points into a multimodal large model, so that the multimodal large model can obtain the number of visits change trend of different preset keywords based on the number of visits to each preset keyword at different time points, obtain the association relationship of different preset keywords in combination with the text data, and predict the life of the cache data corresponding to each preset keyword; and update the cache data according to the life of the cache data corresponding to each preset keyword. In this way, the timeliness of the cache data can be guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of big data technology, and in particular, relates to a method, device, equipment, storage medium and program product for data updating. Background Art

[0002] Generally, storing data that users frequently access in the cache can improve the response speed of user access, thereby improving the user experience.

[0003] For distributed networks, a Redis database that stores data in the form of key-value is usually used as a cache. The cached data in the Redis database can be updated by updating the key.

[0004] However, the update strategy for updating the key cannot guarantee the timeliness of the cached data in the Redis database, resulting in the Redis database being unable to provide the corresponding cached data when the user requests the cached data, thus reducing the response speed of user access. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, device, storage medium and program product for updating data, which can timely update cached data in a database to ensure the timeliness of the cached data.

[0006] In a first aspect, an embodiment of the present application provides a method for updating data, including:

[0007] Obtaining log data of a target webpage, wherein the log data includes a plurality of preset keywords, preset information corresponding to each preset keyword, and the number of visits to each preset keyword at different time points, wherein the preset information is used to measure the popularity of the preset keyword;

[0008] Constructing text data containing the preset keyword based on the log data, wherein the text data includes the preset keyword and preset information corresponding to the preset keyword;

[0009] The text data and the number of visits to each preset keyword at different time points are input into a multimodal large model, so that the multimodal large model can obtain the number of visits change trend of different preset keywords based on the number of visits to each preset keyword at different time points, obtain the association relationship of different preset keywords in combination with the text data, and predict the life span of the cache data corresponding to each preset keyword;

[0010] The cache data is updated according to the life span of the cache data corresponding to each preset keyword.

[0011] In a possible implementation, the multimodal big model includes a keyword prediction model, a trend prediction model, and a cache data life prediction model; the inputting of the text data and the access volume of each preset keyword at different time points into the multimodal big model to obtain the life of the cache data corresponding to each preset keyword output by the multimodal big model includes:

[0012] Input the text data into the keyword prediction model to obtain a target keyword output by the keyword prediction model, wherein the target keyword is the most popular keyword in the text data predicted by the keyword prediction model based on the preset information, and the keyword prediction model is trained based on historical text data of historical preset keywords in the historical log data of the target webpage;

[0013] Inputting the visit volume of each preset keyword at different time points into the trend prediction model to obtain trend information output by the trend prediction model, wherein the trend prediction model is trained using the historical log data of the target webpage, and the trend information is predicted based on the visit volume of the historical preset keywords at different time points;

[0014] The target keyword and the trend information are input into a cache data life prediction model to obtain the life of the cache data corresponding to each preset keyword output by the cache data life prediction model.

[0015] In a possible implementation, inputting the text data into a keyword prediction model to obtain a target keyword output by the keyword prediction model includes:

[0016] Converting the text data into a text vector through a word embedding layer in the keyword prediction model;

[0017] Extracting the structure of the text vector through the coding layer in the keyword prediction model to obtain the association relationship between the preset keywords in the text data;

[0018] The structure of the text vector is parsed through a decoding layer in the keyword prediction model, and the target keyword is determined based on the structure of the text vector.

[0019] In a possible implementation, there are multiple preset keywords; inputting the visit volume of each preset keyword at different time points into a trend prediction model to obtain trend information output by the trend prediction model includes:

[0020] Taking each preset keyword as a node, and constructing a relationship graph according to the preset association relationship between each preset keyword;

[0021] The relationship graph is input into the trend prediction model, so that the trend prediction model uses the connection relationship in the relationship graph and a preset transformation function to calculate the predicted visit volume of each preset keyword, and uses the predicted visit volume of each preset keyword as the trend information.

[0022] In a possible implementation, inputting the target keyword and the trend information into a cache data life prediction model to obtain the life of cache data corresponding to each preset keyword output by the cache data life prediction model includes:

[0023] The target keyword and the trend information are input into the cache data life prediction model, so that the cache data life prediction model adopts a preset attention score algorithm to calculate the attention scores corresponding to the target keyword and the trend information, and uses the attention scores corresponding to the target keyword and the trend information to perform a weighted fusion calculation on the target keyword and the trend information to obtain the life of the cache data corresponding to each preset keyword.

[0024] In a possible implementation, before inputting the text data and the access volume of each preset keyword at different time points into the multimodal big model to obtain the life span of cache data corresponding to each preset keyword output by the multimodal big model, the method further includes:

[0025] Obtain the historical log data of the target webpage, wherein the historical log data includes historical preset keywords, historical preset information corresponding to the historical preset keywords, and the number of visits to each historical preset keyword at different time points, wherein the historical preset information is used to measure the popularity of the historical preset keywords

[0026] Constructing historical text data containing the historical preset keyword using the historical log data, wherein the historical text data includes the historical preset keyword and historical preset information corresponding to the historical preset keyword;

[0027] The multimodal large model is obtained by training with first sample data, wherein the first sample data includes the historical text data, the number of visits of the historical preset keywords, and the life span of cache data corresponding to each historical preset keyword.

[0028] In a possible implementation, before inputting the text data into the keyword prediction model to obtain the target keyword output by the keyword prediction model, the method further includes:

[0029] The historical log data of the target webpage is obtained, wherein the historical log data includes historical preset keywords, historical preset information corresponding to the historical preset keywords, and the number of visits to each historical preset keyword at different time points, and the historical preset information is used to measure the popularity of the historical preset keywords.

[0030] Constructing historical text data containing the historical preset keyword using the historical log data, wherein the historical text data includes the historical preset keyword and historical preset information corresponding to the historical preset keyword;

[0031] The keyword prediction model is obtained by training using second sample data, wherein the second sample data includes the historical text data and the most popular keyword among the historical preset keywords;

[0032] Before inputting the access volume of each preset keyword at different time points into the trend prediction model to obtain the trend information output by the trend prediction model, the method further includes:

[0033] The trend prediction model is obtained by training with third sample data, wherein the third sample includes the visits of the historical preset keyword at different time points and the tag visits of the historical preset keyword, wherein the tag visits refer to the actual visits of the historical preset keyword within a preset time period from the latest time point among the different time points;

[0034] Before inputting the target keyword and the trend information into a cache data life prediction model to obtain the life of cache data corresponding to each preset keyword output by the cache data life prediction model, the method further includes:

[0035] The cache data life prediction model is obtained by training with the fourth sample data, and the fourth sample data includes the output result of the trend prediction model, the output result of the keyword prediction model and the actual life of the cache data corresponding to each historical preset keyword.

[0036] In a second aspect, an embodiment of the present application provides a data updating device, the device comprising:

[0037] An acquisition module, used to acquire log data of a target webpage, wherein the log data includes a plurality of preset keywords, preset information corresponding to each preset keyword, and the number of visits to each preset keyword at different time points, wherein the preset information is used to measure the popularity of the preset keyword;

[0038] A construction module, configured to construct text data containing the preset keyword based on the log data, wherein the text data includes the preset keyword and preset information corresponding to the preset keyword;

[0039] An input module, used to input the text data and the number of visits of each preset keyword at different time points into the multimodal large model, so that the multimodal large model can obtain the number of visits change trend of different preset keywords based on the number of visits of each preset keyword at different time points, obtain the association relationship of different preset keywords in combination with the text data, and predict the life of the cache data corresponding to each preset keyword;

[0040] The updating module is used to update the cache data according to the life span of the cache data corresponding to each preset keyword.

[0041] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;

[0042] When the processor executes the computer program instructions, the method according to any one of the first aspects is implemented.

[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described in any one of the first aspects is implemented.

[0044] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a method as described in any one of the first aspects.

[0045] The data updating method, device, equipment, storage medium and program product of the embodiment of the present application can construct text data containing preset keywords and the number of visits of each preset keyword at different time points based on the log data after obtaining the log data of the target web page. The text data also includes preset information corresponding to each preset keyword, and the preset information can reflect the popularity of the preset keyword to a certain extent. Then the text layout and the number of visits of each preset keyword at different time points are input into the multimodal large model, and the life of the cache data corresponding to each preset keyword output by the multimodal large model can be obtained. In this way, the number of visits of each preset keyword at different time points can reflect the change trend of each preset keyword, and the text data can reflect the association between different preset keywords. Therefore, the multimodal large model comprehensively considers the association relationship of the preset keywords and the change trend of the visits of the preset keywords, and can obtain the change trend of the heat of each preset keyword, so as to predict the storage time of the cache data of each preset keyword according to the change trend of the heat of each preset keyword, and obtain the life of the cache data corresponding to each preset keyword. In this way, the storage time of the cache data can be updated dynamically according to the log data in real time, ensuring the timeliness of the cache data. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0047] Figure 1 It is a flowchart of a method for updating data provided by an embodiment of the present application;

[0048] Figure 2a This is an exemplary schematic diagram of the number of visits of a preset keyword provided in an embodiment of the present application;

[0049] Figure 2b is an exemplary schematic diagram of time series data provided by an embodiment of the present application;

[0050] Figure 3 is an exemplary schematic diagram of a network crawler module provided in an embodiment of the present application;

[0051] Figure 4 is an exemplary schematic diagram of a word embedding layer provided in an embodiment of the present application;

[0052] Figure 5 is an exemplary schematic diagram of a graph neural network model provided in an embodiment of the present application;

[0053] Figure 6 is an exemplary schematic diagram of a multimodal large model training method provided in an embodiment of the present application;

[0054] Figure 7 is an exemplary schematic diagram of a system structure of an application of a method for updating data provided by an embodiment of the application;

[0055] Figure 8 is an exemplary schematic diagram of a fusion information module provided in an embodiment of the present application;

[0056] Fig. 9 It is a structural schematic diagram of a data updating device provided in an embodiment of the present application;

[0057] Fig.10 It is a structural schematic diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0058] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0059] 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 statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0060] Currently, due to problems such as cache avalanche, cache penetration, and cache breakdown, the Redis database will lose its cache function, that is, the Redis database cannot respond to the user's access request and return the cache data requested by the user to the terminal. To this end, the cache data in the Redis database can be updated by updating the key. Specifically, there are three update strategies:

[0061] Strategy 1: Update the key regularly to achieve the effect of regularly updating the cached data in the database. In this way, the time interval for regular updates needs to be determined according to the frequency of data updates. If the time interval is too short, the data in the database will be over-updated, increasing the database load; if the time interval is too long, the cached data in the database will be out of sync with the data in the underlying data source, and users will not be able to obtain cached data from the database, reducing the response speed.

[0062] Strategy 2: Lazily update the key, that is, when the cached data corresponding to the key in the database is requested, the cached data corresponding to the key is updated. In this way, if the cached data corresponding to the key has expired, the expired cached data will be stored in the database until the cached data corresponding to the key is requested, which will occupy storage space and affect the read and write performance of the database.

[0063] Strategy 3: Set the key lifespan to permanent, so that the cache data corresponding to the key is permanently valid, which can avoid the cache breakdown problem. However, the cache data is permanently stored in the storage space, which will take up a lot of storage space.

[0064] It can be seen that the existing update strategy cannot guarantee the timeliness of cached data in the database, and thus cannot guarantee the response speed to user access requests.

[0065] In order to solve the above technical problems, the embodiments of the present application provide a method, device, equipment, storage medium and program product for data updating. The method for data updating provided by the embodiments of the present application is first introduced below.

[0066] Figure 1 FIG. 1 is a flow chart showing a method for updating data provided by an embodiment of the present application. Figure 1 As shown, the method includes:

[0067] S101, obtaining log data of a target web page.

[0068] The log data includes a plurality of preset keywords, preset information corresponding to each preset keyword, and the number of visits to each preset keyword at different time points, and the preset information is used to measure the popularity of the preset keyword. In one example, the log data may be log data of the target web page within the time range of one year before the current moment.

[0069] It should be noted that the preset keywords and the preset information corresponding to the preset keywords are preset according to actual business needs. For example, the preset keyword can be A, and the preset information can be the user's behavior information and the search mode of the web page. The behavior information is the user's click and browse behavior on the preset keyword A. The search mode of the web page refers to the algorithm used by the search engine after the user clicks the preset keyword. The above preset information and preset keywords are only examples. In actual implementation, the preset information and preset keywords are not limited to this and can be preset according to the actual business scenario.

[0070] refer to Figure 2a , Figure 2a A popularity trend is constructed for the electronic device based on the log data. The popularity trend refers to the sum of the visits of each preset keyword in the target web page. The log data includes the historical visit records of the web page. Figure 2a The horizontal axis in the statistical chart shown represents the date, and the vertical axis represents the total number of visits to each preset keyword of the target web page. Specifically, the electronic device can obtain the total number of visits to each preset keyword every day from 2023 / 9 / 16 to 2023 / 9 / 25 by searching for the preset keyword in the historical access record.

[0071] Further, the electronic device obtains the total number of visits to each preset keyword every day based on the log data, and constructs a Figure 2b The time series data of visits shown in Figure 1. Figure 2b The horizontal axis represents the date, and the vertical axis represents the number of visits. Based on the number of visits per day for a preset keyword from 2023 / 9 / 16 to 2023 / 9 / 25, we can construct Figure 2b The time series data shown.

[0072] S102: Construct text data containing preset keywords based on the log data.

[0073] The text data includes preset keywords and preset information corresponding to the preset keywords.

[0074] Specifically, the Hypertext Markup Language (HTML) content of the target web page may be crawled by using crawler technology to obtain the log data of the target web page.

[0075] In an example, Scrapy can be used as a web crawler framework, such as Figure 3 As shown, Figure 3 The web crawler module shown in is the web crawler framework. After the user determines that the target web page with preset keywords needs to be crawled, the electronic device sends a Hypertext Transfer Protocol (HTTP) request to the target web page through the above web crawler framework to obtain the HTML string of the target web page, and inputs the obtained HTML string into the web page parser. The web page parser searches for preset keywords in the HTML string, and uses the preset keywords and the preset information corresponding to the preset keywords as hot data, which is the above text data. Among them, the web crawler module determines the target web page to be crawled based on the new Uniform Resource Locator (URL) table to avoid repeated crawling of web pages.

[0076] S103. Input text data and the number of visits to each preset keyword at different time points into the multimodal big model, so that the multimodal big model can obtain the visit volume change trend of different preset keywords based on the number of visits to each preset keyword at different time points, obtain the correlation between different preset keywords in combination with the text data, and predict the life span of the cache data corresponding to each preset keyword.

[0077] Among them, the lifespan of cached data refers to the storage time of cached data. Based on the visit volume change trend of different preset keywords and the correlation between different preset keywords, the multimodal large model can predict the popularity of each preset keyword. The popularity of the preset keyword is expressed as the storage time of the preset keyword. The longer the storage time, the higher the popularity of the preset keyword. Therefore, after obtaining the popularity of each preset keyword, the multimodal large model determines the lifespan of the cached data corresponding to each preset keyword based on the popularity of each preset keyword.

[0078] S104: Update the cache data according to the lifespan of the cache data corresponding to each preset keyword.

[0079] By adopting the above method, after obtaining the log data of the target web page, text data containing preset keywords and the number of visits of each preset keyword at different time points can be constructed based on the log data. The text data also includes preset information corresponding to each preset keyword, and the preset information can reflect the popularity of the preset keyword to a certain extent. Then the text layout and the number of visits of each preset keyword at different time points are input into the multimodal large model, and the life of the cache data corresponding to each preset keyword output by the multimodal large model can be obtained. In this way, the number of visits of each preset keyword at different time points can reflect the change trend of each preset keyword, and the text data can reflect the association between different preset keywords. Therefore, the multimodal large model comprehensively considers the association relationship of the preset keywords and the change trend of the number of visits of the preset keywords, and can obtain the change trend of the popularity of each preset keyword, so as to predict the storage time of the cache data of each preset keyword according to the change trend of the popularity of each preset keyword, and obtain the life of the cache data corresponding to each preset keyword. In this way, the storage time of the cache data can be updated dynamically according to the log data in real time, ensuring the timeliness of the cache data.

[0080] In some embodiments of the present application, the multimodal large model is composed of a keyword prediction model, a trend prediction model, and a cache data life prediction model. Among them, the keyword prediction model outputs the most popular keyword in the text data based on the input text data, the trend prediction model predicts the future visits of each preset keyword based on the input time series data, and the cache data life prediction model combines the output results of the above trend prediction model and keyword prediction model to predict the life of the cache data. Based on this, for the above S102, the text data and the visits of each preset keyword at different time points are input into the multimodal large model to obtain the life of the cache data corresponding to each preset keyword output by the multimodal large model, which can be specifically implemented as follows:

[0081] Step 1: Input text data into the keyword prediction model to obtain the target keyword output by the keyword prediction model.

[0082] The target keyword is the most popular keyword in the text data predicted by the keyword prediction model based on preset information, and the keyword prediction model is trained based on the historical text data of historical preset keywords in the historical log data of the target webpage.

[0083] The keyword prediction model may be a Transformer model based on an attention mechanism. The Transformer model may extract the association between preset keywords based on preset information in the text data, determine the influence between the preset keywords, and thus predict the target keyword with the highest popularity among the input preset keywords.

[0084] Specifically, the above step 1 can be implemented as follows:

[0085] The text data is converted into text vectors through the word embedding layer in the keyword prediction model.

[0086] The structure of the text vector is extracted through the encoding layer in the keyword prediction model to obtain the association relationship between each preset keyword in the text data.

[0087] The structure of the text vector is parsed through the decoding layer in the keyword prediction model, and the target keyword is determined based on the structure of the text vector.

[0088] Among them, the word embedding layer and keyword prediction model are implemented based on the attention mechanism.

[0089] The structure of the text vector can reflect the correlation between the text vectors, so that the keyword prediction model can obtain the correlation between the preset keywords. Furthermore, based on the correlation between the preset keywords, the most important keyword among the preset keywords can be determined, that is, the target keyword with the highest popularity can be predicted.

[0090] In one example, the word embedding layer has a structure like Figure 4 As shown in the figure, the word embedding layer includes the attention layer (Attention, ATT), the multiplicative attention layer (Multiplicative Attention, MUL), the addition and normalization layer (Add & Norm) and the feedforward neural network (Feed Forward).

[0091] Among them, ATT is used to determine the weight of input data;

[0092] MUL is used to perform element-by-element multiplication of ATT output data and value (value, V);

[0093] Add & Norm is used to perform weighted summation and normalize the result of weighted summation;

[0094] Feed Forward is used to continuously adjust the weight of input data.

[0095] In this way, the text data is first converted into a text vector through the word embedding layer in the keyword prediction model, so that the subsequent keyword prediction model can process the text vector. The encoding layer in the keyword prediction model can extract the structural features of the text vector, wherein the structural features can reflect the correlation between the text vectors, and the correlation between the text vectors reflects the correlation between the text data. Further, the decoding layer in the keyword prediction model can parse the structure of the extracted text vector, that is, by analyzing the correlation between the preset keywords and judging the influence between the preset keywords, the target keyword with the highest popularity among the preset keywords can be accurately predicted, thereby improving the accuracy of the prediction results.

[0096] Step 2: Input the visits of each preset keyword at different time points into the trend prediction model to obtain the trend information output by the trend prediction model. The trend prediction model is trained using the historical log data of the target web page, and the trend information is predicted based on the visits of the historical preset keywords at different time points.

[0097] It can be understood that the trend prediction model is trained using the visits of various historical preset keywords at different time points.

[0098] Wherein, the number of preset keywords can be multiple, and the above step 2 can be specifically implemented as follows:

[0099] Each preset keyword is taken as a node, and a relationship graph is constructed according to the preset association relationship between each preset keyword. The relationship graph is input into the trend prediction model, so that the trend prediction model uses the connection relationship in the relationship graph and the preset transformation function to calculate the predicted visit volume of each preset keyword, and the predicted visit volume of each preset keyword is used as trend information.

[0100] The trend prediction model is obtained by training the Graph Neural Network (GNN) model using the historical visits of preset keywords. The preset keywords are used as nodes, the visits of preset keywords are used as the representation of nodes, and a two-dimensional array representing each node is constructed. The two-dimensional array is shown in Table 1:

[0101] Table 1

[0102]

[0103] On the basis of the above-mentioned node construction, connecting lines are established between nodes with preset association relationships to obtain a relationship graph. The trend prediction model includes multiple convolutional layers. For each node in the relationship graph, the trend prediction model uses a preset transformation function and the visit volume of other nodes that have a connection relationship with the node to calculate the predicted visit volume of the node.

[0104] like Figure 5 As shown, after the electronic device constructs a relationship graph based on the preset keywords and the number of visits of each preset keyword, the relationship graph is input into the trend prediction model to obtain the predicted number of visits of each preset keyword. The trend prediction model is a graph neural network model.

[0105] Among them, the relationship graph can be expressed in the form of a node information matrix, and the node information matrix is ​​as follows:

[0106]

[0107] Specifically, the number in the subscript of each element in the node information matrix is ​​used to indicate the number of the node with a connection relationship, and the value of each element is used to indicate the value of the connection line in the relationship graph, which is used to indicate the degree of association between the nodes.

[0108] For example, Figure 5 In the relationship diagram shown in the figure, the node on the upper left is node 1, and the node on the upper middle is node 2. The numerical sequence in the subscript of is used to indicate the direction of the connection line between node 1 and node 2, with the connection line pointing from node 1 to node 2. The value of is used to represent the value of the connection line between node 1 and node 2, that is, .

[0109] The above relationship graph is input into the trend prediction model. The trend prediction model determines the adjacent nodes of each node based on the connecting lines in the relationship graph, and uses the preset transformation function to perform three iterative calculations on the node representation of each node to obtain the accurate node representation of each node. The node representation is used as the predicted visit volume of each node corresponding to the preset keyword.

[0110] In this way, a relationship graph is constructed based on the preset association relationship. The trend prediction model can determine the influence of each node's adjacent nodes on the node through iterative calculations based on the association relationship of each node, thereby accurately calculating the number of visits to each preset keyword in the future period of time, thereby improving the accuracy of the prediction results.

[0111] Step 3: Input the target keyword and trend information into the cache data life prediction model to obtain the life of the cache data corresponding to each preset keyword output by the cache data life prediction model.

[0112] Specifically, the above step 3 can be implemented as follows:

[0113] The target keywords and trend information are input into the cache data life prediction model, so that the cache data life prediction model uses a preset attention score algorithm to calculate the attention scores corresponding to the target keywords and trend information, and uses the attention scores corresponding to the target keywords and trend information to perform weighted fusion calculations on the target keywords and trend information to obtain the life of the cache data corresponding to each preset keyword.

[0114] Among them, the preset attention score algorithm is preset based on experience. For example, the preset attention score algorithm can be a dot product attention score algorithm, an additive attention score algorithm, or a scaled dot product attention score algorithm.

[0115] The method of weighted fusion calculation is as follows:

[0116] The target keywords and trend information are converted into vectors to obtain keyword vectors and trend information vectors. The target keyword vector is obtained by multiplying the keyword vector and the corresponding attention score, and the target trend information vector is obtained by multiplying the trend information vector and the corresponding attention score.

[0117] A dot product operation is performed on the target keyword vector and the target trend information vector to obtain a first dot product result. A dot product operation is performed on the first dot product result and the trend information vector to obtain a second dot product result. A dot product operation is performed on the second dot product result and the target keyword vector to obtain the lifespan of the cache data corresponding to each preset keyword.

[0118] In this way, the cache data life prediction model calculates the corresponding attention scores of the target keyword and trend information, and obtains the contribution of the target keyword and trend information to the prediction of the popularity of the preset keyword. Then, the attention score is used to perform a weighted fusion of the target keyword and trend information, and the calculated cache data life is more in line with the actual application scenario, and the calculated cache data life is more accurate.

[0119] The method provided by the embodiment of the present application is adopted to use a keyword prediction model to predict the target keyword with the highest popularity in the text data. The keyword prediction model is obtained by training based on the historical text data of the historical preset keywords in the historical log data of the target webpage. Therefore, the keyword prediction model can comprehensively consider the preset information of each preset keyword, so as to accurately predict the future popularity of each preset keyword and output the target keyword with the highest popularity. The trend prediction model can predict the future visit volume of each preset keyword according to the visit volume of each preset keyword at different time points. Among them, the trend prediction model can be trained based on the visit volume of the historical preset keywords at different time points. Therefore, the trend prediction model can learn the change trend of the visit volume of the keyword from the visit volume of the historical preset keywords at different time points, so that after obtaining the visit volume of the preset keywords at different time points, the future visit volume of each preset keyword can be accurately predicted. Based on the output results of the trend prediction model and the keyword prediction model, the cache data life prediction model comprehensively considers the change trend of the visit volume of each preset keyword and the preset keyword with the highest popularity among multiple preset keywords, and can predict the life of the cache data of each preset keyword, thereby improving the accuracy of the prediction results of the cache data life prediction model. Subsequent updating of the cache data using the predicted life of the cache data can ensure the timeliness of the cache data.

[0120] The following describes how to train the multimodal large model, keyword prediction model, trend prediction model, and cache data life prediction model in the above embodiments. Specifically, there are two implementation methods:

[0121] Implementation method 1: The multimodal large model includes a keyword prediction model, a trend prediction model, and a cache data life prediction model. A set of label data can be set to train the multimodal large model. The specific implementation method is as follows:

[0122] Obtain the historical log data of the target web page, use the historical log data to construct historical text data containing historical preset keywords, and use the sample data to train a multimodal large model.

[0123] The historical log data includes historical preset keywords, historical preset information corresponding to the historical preset keywords, and the number of visits to each historical preset keyword at different time points. The historical preset information is used to measure the popularity of the historical preset keywords. The historical text data includes historical preset keywords and the historical preset information corresponding to the historical preset keywords. The sample data includes historical text data, the number of visits to the historical preset keywords, and the life of the cache data corresponding to each historical preset keyword.

[0124] It should be noted that the mean squared error (MSE) can be used as the loss function to calculate the loss function value of the multimodal large model. The loss function value can be reduced by adjusting the model parameters in the multimodal large model. When the loss function value is less than a preset threshold or the number of iterations reaches a preset number, the model training is stopped to obtain the multimodal large model.

[0125] In addition, in order to prevent the model from overfitting, the L2 regularization training model can be used in the embodiment of the present application to improve the generalization ability of the multimodal large model. After the electronic device obtains the historical text data and the corresponding visits of the historical preset keywords, the historical text data and the corresponding visits of the historical preset keywords can be divided into three parts, which are used as training sets, verification sets and test sets respectively, and the model is trained using training strategies such as batch training, learning rate adjustment and early stopping to improve the training efficiency of the model.

[0126] After stopping the training model, in order to verify the model performance, the root mean square error (RMSE), mean absolute error (MAE), and correlation coefficient can be used to evaluate the performance of the model. It should be noted that the above training strategy and model performance verification method are only used as examples, and the embodiments of the present application do not limit the training strategy and model performance verification method.

[0127] In the above implementation method 1, by using the lifespan of the cache data corresponding to each historical preset keyword as label data and the historical text data and the visits to the historical preset keywords as training data, the multimodal large model can be trained as a whole to improve the model training efficiency.

[0128] Implementation method 2: By setting the label data corresponding to each model, the keyword prediction model, trend prediction model and cache data life prediction model can be trained respectively. The specific implementation method is as follows:

[0129] The historical log data of the target webpage is obtained. The historical log data includes historical preset keywords, historical preset information corresponding to the historical preset keywords, and the number of visits to each historical preset keyword at different time points. The historical preset information is used to measure the popularity of the historical preset keywords.

[0130] The historical log data is used to construct historical text data containing historical preset keywords, where the historical text data includes historical preset keywords and historical preset information corresponding to the historical preset keywords.

[0131] The keyword prediction model is trained using the second sample data, where the second sample data includes historical text data and the most popular keywords among historical preset keywords.

[0132] The trend prediction model is trained using the third sample data. The third sample includes the visits of historical preset keywords at different time points and the tag visits of historical preset keywords. The tag visits refer to the actual visits of the historical preset keywords within a preset time period from the latest time point in different time points.

[0133] The cache data life prediction model is trained using the fourth sample data, and the fourth sample data includes the output result of the trend prediction model, the output result of the keyword prediction model, and the actual life of the cache data corresponding to each historical preset keyword.

[0134] Among them, for the above-mentioned keyword prediction model, trend prediction model and cache data life prediction model, the training strategy and the verification method of the model performance refer to the relevant description in the above-mentioned embodiments, which will not be repeated here.

[0135] In the above-mentioned implementation method 2, sample data are set for the keyword prediction model, trend prediction model and cache data life prediction model respectively, so as to train the keyword prediction model, trend prediction model and cache data life prediction model respectively. In this way, the trained model is more precise and the model output result is more accurate.

[0136] The following combination Figure 6 The data updating method provided in the embodiment of the present application is introduced, such as Figure 6 As shown, the method specifically includes:

[0137] S601, obtaining time series data and text data, and dividing them into training sets and validation sets.

[0138] The time series data packet refers to the number of visits to each historical preset keyword at different time points. Both the time series data and the text data are determined based on the log data of the target web page. The specific method of generating the time series data and the text data is referred to the relevant description in the above embodiment, which will not be repeated here.

[0139] The validation set is used to verify the accuracy of the output results of the trained multimodal large model.

[0140] S602: Input the training set into the multimodal large model for model training.

[0141] The multimodal large model includes the above-mentioned keyword prediction model, trend prediction model and cache data life prediction model. The specific training method is referred to the relevant description in the above-mentioned embodiment, which will not be repeated here.

[0142] S603. Continuously update keyword popularity based on model results.

[0143] Among them, keyword popularity refers to the lifespan of cache data corresponding to preset keywords.

[0144] By adopting the method provided in the embodiment of the present application, the access data of the preset keywords can be analyzed and understood intelligently and in real time based on the multimodal large model to dynamically predict the lifespan of the cached data, so as to make predictions based on the actual access data and the preset information. Real-time adjustments are made according to the access data to more accurately update the cached data. Different preset information can also be preset for different preset keywords, so as to customize personalized cache management strategies for different preset keywords. For example, the preset information can be the importance of the data, the frequency of access, and the correlation between the data. The lifespan of the cached data of the preset keywords can be predicted through data analysis in multiple dimensions, and a variety of data sources, such as user behavior, search patterns, time trends, etc., can be comprehensively considered to more accurately predict the popularity of the preset keywords, and then the cached data can be loaded into the database in advance.

[0145] In adopting Figure 6 After training the multimodal large model using the method shown, the multimodal large model is used for model reasoning. Figure 7 Introduce the model reasoning process. Figure 7 As shown, Figure 7 An exemplary schematic diagram of a system structure for data updating provided in an embodiment of the present application, the system structure includes a web crawler module, a time series prediction module, a text data recognition module and a fusion information module.

[0146] Among them, after the electronic device uses the web crawler module to crawl the historical records of web page access popularity, it can obtain time series data and text data, input the time series data into the time series prediction module, and input the text data into the text data recognition module. The output results of the time series prediction module and the output results of the text data recognition module are input into the fusion information module. The fusion information module outputs the life of the key, and dynamically updates the key in Redis based on the obtained key life, thereby achieving the purpose of dynamically updating the cached data corresponding to the key.

[0147] After the web crawler module in the above embodiment obtains the text data, the text data is input into Figure 7 The text data recognition module shown in the figure includes a word embedding layer and a keyword prediction model. The text data recognition module converts text data into text vectors based on the natural language processing (NLP) technology of the word embedding method.

[0148] After obtaining the output results of the text data recognition module and the time series prediction module, the output results of the text data recognition module and the time series prediction module are input into the fusion information module, so that the fusion information module predicts the life of each preset keyword based on the visit trend change predicted by the time series prediction module and the most popular preset keyword predicted by the text data recognition module, thereby obtaining the life of the key, and updating the key in the Redis database to complete the purpose of updating the cache data corresponding to the key. Specifically, the fusion information module is as follows Figure 8 As shown, it specifically includes three dot product processings.

[0149] The most popular preset keyword predicted by the text data recognition module is taken as X, and the number of visits of each preset keyword predicted by the time series prediction module is taken as Y and V. X and Y are converted into vectors, and the attention scores of X and Y are calculated by the preset attention score algorithm. The attention score is used to measure the contribution of X and Y in predicting the life of the cache data corresponding to each preset keyword.

[0150] Calculate the product of X and the corresponding attention score to get Q, calculate the product of Y and the corresponding attention score to get K. Perform a dot product operation on Q and K to get M; perform a dot product operation on M and V to get Z; perform a dot product operation on Z and X, and use the result of the click operation of Z and X as the output result, which is the lifespan of the cache data for each preset keyword.

[0151] It should be noted that after the lifetime of the cache data of each preset keyword is predicted using the multimodal large model, the cache data in the database is updated according to the lifetime of the cache data of each preset keyword. For each preset keyword, if the cache data of the preset keyword has not been accessed within the lifetime period, the cache data of the preset keyword will be cleared at the end of the lifetime period of the preset keyword; if the cache data of the preset keyword is accessed within the lifetime period, the electronic device uses the last access time of the cache data of the preset keyword as the starting time, and updates the storage time of the cache data of the preset keyword in accordance with the predicted lifetime.

[0152] In one example, if the current time is 12:00 on May 31, 2024, and the electronic device predicts using the multimodal large model that the life of the cache data corresponding to the preset keyword 1 is 10 minutes, then the storage time of the cache data corresponding to the preset keyword 1 in the electronic device setting database is set to 12:00 on May 31, 2024 to 12:10 on May 31, 2024. If the cache data corresponding to the preset keyword 1 is not accessed during this time period, the cache data corresponding to the preset keyword 1 is cleared; if the cache data corresponding to the preset keyword 1 is accessed during this time period, and the access time is 12:03 on May 31, 2024, then the electronic device takes the access time as the starting time, and the storage time of the cache data of the preset keyword 1 is updated in a postponed manner, and the storage time is updated to 12:03 on May 31, 2024 to 12:13 on May 31, 2024.

[0153] Based on the same concept, the embodiment of the present application provides a data updating device, such as Fig. 9 As shown, the device comprises:

[0154] The acquisition module 901 is used to acquire log data of the target webpage, where the log data includes a plurality of preset keywords, preset information corresponding to each preset keyword, and the number of visits to each preset keyword at different time points, where the preset information is used to measure the popularity of the preset keyword;

[0155] A construction module 902 is used to construct text data containing preset keywords based on the log data, where the text data includes the preset keywords and preset information corresponding to the preset keywords;

[0156] Input module 903, used to input text data and the number of visits of each preset keyword at different time points into the multimodal large model, so that the multimodal large model can obtain the number of visits change trend of different preset keywords based on the number of visits of each preset keyword at different time points, obtain the correlation relationship of different preset keywords in combination with the text data, and predict the life of the cache data corresponding to each preset keyword;

[0157] The updating module 904 is used to update the cache data according to the life span of the cache data corresponding to each preset keyword.

[0158] In a possible implementation, the multimodal large model includes a keyword prediction model, a trend prediction model, and a cache data life prediction model; the input module 903 is specifically used to:

[0159] Input text data into a keyword prediction model to obtain a target keyword output by the keyword prediction model, wherein the target keyword is the most popular keyword in the text data predicted by the keyword prediction model based on preset information, and the keyword prediction model is trained based on historical text data of historical preset keywords in historical log data of the target webpage;

[0160] Input the visit volume of each preset keyword at different time points into the trend prediction model to obtain the trend information output by the trend prediction model. The trend prediction model is trained using the historical log data of the target web page, and the trend information is predicted based on the visit volume of the historical preset keywords at different time points.

[0161] The target keyword and trend information are input into the cache data life prediction model to obtain the life of the cache data corresponding to each preset keyword output by the cache data life prediction model.

[0162] In a possible implementation, the input module 903 is specifically configured to:

[0163] Convert text data into text vectors through the word embedding layer in the keyword prediction model;

[0164] The structure of the text vector is extracted through the encoding layer in the keyword prediction model to obtain the correlation relationship between the preset keywords in the text data;

[0165] The structure of the text vector is parsed through the decoding layer in the keyword prediction model, and the target keyword is determined based on the structure of the text vector.

[0166] In a possible implementation, the number of preset keywords is multiple; the input module 903 is specifically used to:

[0167] Taking each preset keyword as a node, and constructing a relationship graph according to the preset association relationship between each preset keyword;

[0168] The relationship graph is input into the trend prediction model, so that the trend prediction model uses the connection relationship in the relationship graph, adopts the preset transformation function to calculate the predicted visit volume of each preset keyword, and uses the predicted visit volume of each preset keyword as trend information.

[0169] In a possible implementation, the input module 903 is specifically configured to:

[0170] The target keywords and trend information are input into the cache data life prediction model, so that the cache data life prediction model uses a preset attention score algorithm to calculate the attention scores corresponding to the target keywords and trend information, and uses the attention scores corresponding to the target keywords and trend information to perform weighted fusion calculations on the target keywords and trend information to obtain the life of the cache data corresponding to each preset keyword.

[0171] In a possible implementation, the device further includes a training module:

[0172] The acquisition module 901 is further used to acquire historical log data of the target webpage, the historical log data including historical preset keywords, historical preset information corresponding to the historical preset keywords, and the number of visits of each historical preset keyword at different time points, the historical preset information is used to measure the popularity of the historical preset keywords;

[0173] The construction module 902 is further used to construct historical text data containing historical preset keywords using historical log data, where the historical text data includes historical preset keywords and historical preset information corresponding to the historical preset keywords;

[0174] The training module is used to train a multimodal large model using first sample data, where the first sample data includes historical text data, the number of visits to historical preset keywords, and the lifespan of cached data corresponding to each historical preset keyword.

[0175] In a possible implementation, the acquisition module 901 is also used to obtain historical log data of the target web page, where the historical log data includes historical preset keywords, historical preset information corresponding to the historical preset keywords, and the number of visits to each historical preset keyword at different time points, where the historical preset information is used to measure the popularity of the historical preset keywords.

[0176] The construction module 902 is further used to construct historical text data containing historical preset keywords using historical log data, where the historical text data includes historical preset keywords and historical preset information corresponding to the historical preset keywords.

[0177] The training module is also used to train a keyword prediction model using the second sample data, where the second sample data includes the historical text data and the most popular keywords among the historical preset keywords.

[0178] The training module is also used to train a trend prediction model using the third sample data. The third sample includes the visits of historical preset keywords at different time points and the tag visits of historical preset keywords. The tag visits refer to the actual visits of the historical preset keywords within a preset time period from the latest time point in different time points.

[0179] The training module is also used to train a cache data life prediction model using the fourth sample data. The fourth sample data includes the output results of the trend prediction model, the output results of the keyword prediction model, and the actual life of the cache data corresponding to each historical preset keyword.

[0180] It should be noted that the data updating device is a device corresponding to the above-mentioned data updating method, and all implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.

[0181] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0182] The electronic device may include a processor 1001 and a memory 1002 storing computer program instructions.

[0183] Specifically, the processor 1001 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0184] The memory 1002 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1002 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 1002 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 1002 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1002 is a non-volatile solid-state memory.

[0185] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0186] The processor 1001 implements any one of the data updating methods in the above embodiments by reading and executing the computer program instructions stored in the memory 1002 .

[0187] In one example, the electronic device may further include a communication interface 1003 and a bus 1004. Fig.10 As shown, the processor 1001, the memory 1002, and the communication interface 1003 are connected via a bus 1004 and communicate with each other.

[0188] The communication interface 1003 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0189] Bus 1004 includes hardware, software or both, and couples the components of the electronic device to each other. For example, but not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnect, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable bus or a combination of two or more of these. Where appropriate, bus 1004 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnect.

[0190] In addition, in combination with the data updating method in the above embodiment, the embodiment of the present application can provide a computer storage medium to implement. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the data updating methods in the above embodiment is implemented.

[0191] In combination with the data updating method in the above embodiments, an embodiment of the present application may provide a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes any data updating method in the above embodiments.

[0192] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0193] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0194] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0195] Aspects of the present disclosure are described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0196] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for updating data, It is characterized in that include: Obtaining log data of a target webpage, wherein the log data includes a plurality of preset keywords, preset information corresponding to each preset keyword, and the number of visits to each preset keyword at different time points, wherein the preset information is used to measure the popularity of the preset keyword; Constructing text data containing the preset keyword based on the log data, wherein the text data includes the preset keyword and preset information corresponding to the preset keyword; The text data and the number of visits to each preset keyword at different time points are input into a multimodal large model, so that the multimodal large model can obtain the number of visits change trend of different preset keywords based on the number of visits to each preset keyword at different time points, obtain the association relationship of different preset keywords in combination with the text data, and predict the life span of the cache data corresponding to each preset keyword; The cache data is updated according to the life span of the cache data corresponding to each preset keyword; The multimodal big model includes a keyword prediction model, a trend prediction model and a cache data life prediction model; the text data and the access volume of each preset keyword at different time points are input into the multimodal big model, so that the multimodal big model obtains the access volume change trend of different preset keywords based on the access volume of each preset keyword at different time points, obtains the association relationship of different preset keywords in combination with the text data, and predicts the life of the cache data corresponding to each preset keyword, including: Input the text data into the keyword prediction model to obtain a target keyword output by the keyword prediction model, wherein the target keyword is the most popular keyword in the text data predicted by the keyword prediction model based on the preset information, and the keyword prediction model is trained based on historical text data of historical preset keywords in the historical log data of the target webpage; Inputting the visit volume of each preset keyword at different time points into the trend prediction model to obtain trend information output by the trend prediction model, wherein the trend prediction model is trained using the historical log data of the target webpage, and the trend information is predicted based on the visit volume of the historical preset keywords at different time points; The target keyword and the trend information are input into a cache data life prediction model to obtain the life of the cache data corresponding to each preset keyword output by the cache data life prediction model.

2. The method according to claim 1, It is characterized in that The step of inputting the text data into the keyword prediction model to obtain a target keyword output by the keyword prediction model includes: Converting the text data into a text vector through a word embedding layer in the keyword prediction model; Extracting the structure of the text vector through the coding layer in the keyword prediction model to obtain the association relationship between the preset keywords in the text data; The structure of the text vector is parsed through a decoding layer in the keyword prediction model, and the target keyword is determined based on the structure of the text vector.

3. The method according to claim 1, It is characterized in that The number of the preset keywords is multiple; the number of visits of each preset keyword at different time points is input into the trend prediction model to obtain the trend information output by the trend prediction model, including: Taking each preset keyword as a node, and constructing a relationship graph according to the preset association relationship between each preset keyword; The relationship graph is input into the trend prediction model, so that the trend prediction model uses the connection relationship in the relationship graph and a preset transformation function to calculate the predicted visit volume of each preset keyword, and uses the predicted visit volume of each preset keyword as the trend information.

4. The method according to claim 1, It is characterized in that The step of inputting the target keyword and the trend information into a cache data life prediction model to obtain the life of cache data corresponding to each preset keyword output by the cache data life prediction model includes: The target keyword and the trend information are input into the cache data life prediction model, so that the cache data life prediction model adopts a preset attention score algorithm to calculate the attention scores corresponding to the target keyword and the trend information, and uses the attention scores corresponding to the target keyword and the trend information to perform a weighted fusion calculation on the target keyword and the trend information to obtain the life of the cache data corresponding to each preset keyword.

5. The method according to claim 1, It is characterized in that Before inputting the text data and the page views of each preset keyword at different time points into the multimodal macro model, the method further includes: Acquire historical log data of the target webpage, wherein the historical log data includes historical preset keywords, historical preset information corresponding to the historical preset keywords, and the number of visits of each historical preset keyword at different time points, wherein the historical preset information is used to measure the popularity of the historical preset keywords; Constructing historical text data containing the historical preset keyword using the historical log data, wherein the historical text data includes the historical preset keyword and historical preset information corresponding to the historical preset keyword; The multimodal large model is obtained by training with first sample data, wherein the first sample data includes the historical text data, the number of visits of the historical preset keywords, and the life span of cache data corresponding to each historical preset keyword.

6. The method according to claim 1, It is characterized in that Before inputting the text data into the keyword prediction model to obtain the target keyword output by the keyword prediction model, the method further includes: Acquire historical log data of the target webpage, wherein the historical log data includes historical preset keywords, historical preset information corresponding to the historical preset keywords, and the number of visits of each historical preset keyword at different time points, wherein the historical preset information is used to measure the popularity of the historical preset keywords; Constructing historical text data containing the historical preset keyword using the historical log data, wherein the historical text data includes the historical preset keyword and historical preset information corresponding to the historical preset keyword; The keyword prediction model is obtained by training using second sample data, wherein the second sample data includes the historical text data and the most popular keyword among the historical preset keywords; Before inputting the access volume of each preset keyword at different time points into the trend prediction model to obtain the trend information output by the trend prediction model, the method further includes: The trend prediction model is obtained by training with third sample data, wherein the third sample includes the visits of the historical preset keyword at different time points and the tag visits of the historical preset keyword, wherein the tag visits refer to the actual visits of the historical preset keyword within a preset time period from the latest time point among the different time points; Before inputting the target keyword and the trend information into a cache data life prediction model to obtain the life of cache data corresponding to each preset keyword output by the cache data life prediction model, the method further includes: The cache data life prediction model is obtained by training with the fourth sample data, and the fourth sample data includes the output result of the trend prediction model, the output result of the keyword prediction model and the actual life of the cache data corresponding to each historical preset keyword.

7. A data updating device, It is characterized in that The device comprises: An acquisition module, used to acquire log data of a target webpage, wherein the log data includes a plurality of preset keywords, preset information corresponding to each preset keyword, and the number of visits to each preset keyword at different time points, wherein the preset information is used to measure the popularity of the preset keyword; A construction module, configured to construct text data containing the preset keyword based on the log data, wherein the text data includes the preset keyword and preset information corresponding to the preset keyword; An input module, used to input the text data and the number of visits of each preset keyword at different time points into the multimodal large model, so that the multimodal large model can obtain the number of visits change trend of different preset keywords based on the number of visits of each preset keyword at different time points, obtain the association relationship of different preset keywords in combination with the text data, and predict the life of the cache data corresponding to each preset keyword; An updating module, used for updating cache data according to the life span of the cache data corresponding to each preset keyword; The multimodal large model includes a keyword prediction model, a trend prediction model and a cache data life prediction model; the input module is specifically used to: Input the text data into the keyword prediction model to obtain a target keyword output by the keyword prediction model, wherein the target keyword is the most popular keyword in the text data predicted by the keyword prediction model based on the preset information, and the keyword prediction model is trained based on historical text data of historical preset keywords in the historical log data of the target webpage; Inputting the visit volume of each preset keyword at different time points into the trend prediction model to obtain trend information output by the trend prediction model, wherein the trend prediction model is trained using the historical log data of the target webpage, and the trend information is predicted based on the visit volume of the historical preset keywords at different time points; The target keyword and the trend information are input into a cache data life prediction model to obtain the life of the cache data corresponding to each preset keyword output by the cache data life prediction model.

8. An electronic device, It is characterized in that The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, It is characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method according to any one of claims 1 to 6.