WO2023272858A1 - Page resource caching method and apparatus, device, and medium - Google Patents

Page resource caching method and apparatus, device, and medium Download PDF

Info

Publication number
WO2023272858A1
WO2023272858A1 PCT/CN2021/109049 CN2021109049W WO2023272858A1 WO 2023272858 A1 WO2023272858 A1 WO 2023272858A1 CN 2021109049 W CN2021109049 W CN 2021109049W WO 2023272858 A1 WO2023272858 A1 WO 2023272858A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
predicted
value
page address
address
Prior art date
Application number
PCT/CN2021/109049
Other languages
French (fr)
Chinese (zh)
Inventor
余鸿飞
Original Assignee
未鲲(上海)科技服务有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 未鲲(上海)科技服务有限公司 filed Critical 未鲲(上海)科技服务有限公司
Publication of WO2023272858A1 publication Critical patent/WO2023272858A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the page resource caching method, device, device and medium of the present application obtain the page loading completion signal of the i-th visit page first, and the page loading completion signal carries the user identifier to be predicted and the real value of the address of the i-th visit page , secondly in response to the page loading completion signal, obtain the target user portrait according to the user identifier to be predicted, adopt the first preset page prediction model, and perform the process according to the real value of the ith visit page address and the target user portrait Predict the page address of the i+1th access, obtain the predicted value of the i+1th accessed page address, and then search the predicted value of the i+1th accessed page address in the local cache, when no cached result is found , obtain page resources from the server according to the predicted value of the i+1th access page address, obtain the page resources to be cached, and finally store the page resources to be cached in the local cache, so that the user does not perceive automatically cache the page resource that the user may visit next time to the local cache, and when the user actually
  • the client loads the i-th visit page of the user ID to be predicted, and generates a page loading completion signal when the i-th visit page is loaded, and uses the page address of the i-th visit page as the i-th visit page address
  • the user identifier to be predicted and the real value of the address of the i-th visited page are used as parameters carried by the page loading completion signal.
  • the i-th visited page refers to the page currently browsed by the user.
  • a page is a Web (Global Wide Area Network) page.
  • the real value of the address of the i-th visit page that is, the URL (Uniform Resource Locator) address of the page that the user actually visits the i-th time corresponding to the user ID to be predicted.
  • the user profile also includes: user risk level, user security level, and historical investment records (product type, amount).
  • the first preset page prediction model is a model trained based on an AI (artificial intelligence) deep learning model.
  • Page resources that is, static resources of the page, such as CSS (Cascading Style Sheet), JS (JavaScript), HTML (Hypertext Markup Language), image files, etc.
  • CSS CSS
  • JS JavaScript
  • HTML Hypertext Markup Language
  • the step of obtaining the user profile to be predicted according to the user ID to be predicted includes: acquiring the user profile library; searching the user ID to be predicted in the user profile library, The user portrait corresponding to the user identifier found in the user portrait database is used as the user portrait to be predicted.
  • the user portrait to be predicted and the actual value of the i-1th visited page address are input into the second preset page prediction model to predict the page address of the i-th visit.
  • the address prediction value and the i-th visit page calibration value train the second preset page prediction model, thereby eliminating the need to manually collect training data, and quickly improving the performance of the first preset page prediction model for the next visit. Accuracy of Page Address Prediction.
  • the real value of the i-th visited page address is the address of the page actually visited by the user
  • the real value of the i-th visited page address is used as the i-th visited page calibration value.
  • Target user portrait acquisition module 200 configured to respond to the page loading completion signal, and acquire a target user portrait according to the user identifier to be predicted;
  • the page resource determination module 500 to be cached is used to obtain the page resource from the server according to the i+1th access page address prediction value to obtain the page resource to be cached when no cached result is found;
  • Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

A page resource caching method and apparatus, a device, and a medium, relating to the technical field of artificial intelligence. The method comprises: obtaining a page loading completion signal for an i-th accessed page, the page loading completion signal carrying a user identifier to be predicted and an i-th accessed page address real value (S1); in response to the page loading completion signal, obtaining a target user portrait according to the user identifier to be predicted (S2); using a first preset page prediction model to predict a (i+1)-th accessed page address according to the i-th accessed page address real value and the target user portrait, to obtain a (i+1)-th accessed page address predicted value (S3); searching in a local cache according to the (i+1)-th accessed page address predicted value (S4); when a cache result is not found, obtaining a page resource from a server according to the (i+1)-th accessed page address predicted value, to obtain a page resource to be cached (S5); and storing the page resource to be cached in the local cache (S6). Therefore, a page resource that is likely to be accessed next time by a user is automatically cached to a local cache on the premise of no perception by the user, thereby increasing the speed of loading of an unopened page.

Description

页面资源的缓存方法、装置、设备及介质Cache method, device, equipment and medium for page resources
本申请要求于2021年06月28日提交中国专利局、申请号为202110722084.X,发明名称为“页面资源的缓存方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110722084.X submitted to the China Patent Office on June 28, 2021, and the title of the invention is "page resource caching method, device, equipment and medium", the entire content of which is passed References are incorporated in this application.
技术领域technical field
本申请涉及到人工智能技术领域,特别是涉及到一种页面资源的缓存方法、装置、设备及介质。The present application relates to the technical field of artificial intelligence, in particular to a method, device, device and medium for caching page resources.
背景技术Background technique
当用户访问某个页面时,客户端首先会去下载该页面的静态资源,比如CSS(层叠样式表)、JS(JavaScript)、HTML(超文本标记语言)、图片文件等,页面的静态资源全部下载完成时,整个页面才会正常加载。这种加载方式存在如下问题:如果页面的静态资源比较大,或者用户当前的网络状态不理想时,下载静态资源会耗费更多的时间,用户在等待页面加载时,往往看到的是长时间的加载动画或者页面白屏,影响了用户体验。发明人意识到为了解决加载慢的问题,采用客户端自带的缓存功能,当用户访问页面时客户端会将该页面的静态资源缓存到本地,当用户再次打开该页面时,客户端直接从本地缓存中读取静态资源文件,从而提高了加载速度。但是采用客户端自带的缓存功能缓存访问过的页面的静态资源的方法,依赖于用户事先打开过页面,对于用户未打开过的页面该缓存策略无效,从而无法提高未打开过的页面的加载速度。When a user visits a page, the client will first download the static resources of the page, such as CSS (Cascading Style Sheet), JS (JavaScript), HTML (Hypertext Markup Language), image files, etc. All the static resources of the page When the download is complete, the entire page loads normally. This loading method has the following problems: If the static resources of the page are relatively large, or the user's current network status is not ideal, it will take more time to download the static resources. When the user is waiting for the page to load, he often sees a long time The loading animation or blank screen of the page affects the user experience. The inventor realizes that in order to solve the problem of slow loading, the client uses the built-in caching function. When the user accesses the page, the client will cache the static resources of the page locally. When the user opens the page again, the client directly downloads the The static resource files are read in the local cache, thus improving the loading speed. However, the method of using the cache function of the client to cache the static resources of the visited pages depends on the user having opened the page in advance, and the caching strategy is invalid for the pages that the user has not opened, so that the loading of the pages that have not been opened cannot be improved. speed.
技术问题technical problem
旨在解决现有技术采用客户端自带缓存功能缓存访问过的页面的静态资源的方法,无法提高未打开过的页面的加载速度的技术问题。The invention aims to solve the technical problem that the prior art method of caching the static resources of the visited pages by using the built-in caching function of the client cannot improve the loading speed of the unopened pages.
技术解决方案technical solution
本申请的主要目的为提供一种页面资源的缓存方法、装置、设备及介质,旨在解决现有技术采用客户端自带缓存功能缓存访问过的页面的静态资源的方法,无法提高未打开过的页面的加载速度的技术问题。The main purpose of this application is to provide a caching method, device, equipment and medium for page resources, aiming to solve the problem that the prior art uses the client's own caching function to cache the static resources of pages that have been visited, and cannot improve the performance of pages that have not been opened. Technical issues with page load speed.
为了实现上述发明目的,本申请提出一种页面资源的缓存方法,所述方法包括:In order to achieve the purpose of the above invention, this application proposes a method for caching page resources, the method comprising:
获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;Acquiring the page loading completion signal of the i-th visit page, the page loading completion signal carrying the user identifier to be predicted and the real value of the i-th visit page address;
响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;Responding to the page loading completion signal, acquiring a target user portrait according to the user identifier to be predicted;
采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;Using the first preset page prediction model, predicting the page address of the i+1th visit according to the real value of the page address of the ith visit and the target user portrait, to obtain the predicted value of the page address of the i+1th visit;
将所述第i+1次访问页面地址预测值在本地缓存中进行查找;Searching the predicted value of the i+1th access page address in the local cache;
当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;When the cache result is not found, obtain the page resource from the server according to the i+1th access page address prediction value, and obtain the page resource to be cached;
将所述待缓存的页面资源存储到所述本地缓存。storing the page resources to be cached in the local cache.
本申请还提出了一种页面资源的缓存装置,所述装置包括:The present application also proposes a caching device for page resources, and the device includes:
页面加载完成信号获取模块,用于获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;The page loading completion signal acquisition module is used to obtain the page loading completion signal of the i-th visit page, and the page loading completion signal carries the user identifier to be predicted and the real value of the i-th visit page address;
目标用户画像获取模块,用于响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;A target user portrait acquisition module, configured to acquire a target user portrait according to the user identifier to be predicted in response to the page loading completion signal;
页面地址预测模块,用于采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;The page address prediction module is configured to use the first preset page prediction model to predict the page address of the i+1th visit according to the real value of the page address of the ith visit and the target user portrait, to obtain the i+1th visit The predicted value of the page address of the second visit;
缓存查找定模块,用于将所述第i+1次访问页面地址预测值在本地缓存中进行查找;A cache lookup module, configured to look up the i+1th access page address prediction value in a local cache;
待缓存的页面资源确定模块,用于当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;The page resource determination module to be cached is used to obtain the page resource from the server according to the i+1th access page address prediction value to obtain the page resource to be cached when no cached result is found;
存储模块,用于将所述待缓存的页面资源存储到所述本地缓存。A storage module, configured to store the page resource to be cached in the local cache.
本申请还提出了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现如下方法步骤:The present application also proposes a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the following method steps when executing the computer program:
获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;Acquiring the page loading completion signal of the i-th visit page, the page loading completion signal carrying the user identifier to be predicted and the real value of the i-th visit page address;
响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;Responding to the page loading completion signal, acquiring a target user portrait according to the user identifier to be predicted;
采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;Using the first preset page prediction model, predicting the page address of the i+1th visit according to the real value of the page address of the ith visit and the target user portrait, to obtain the predicted value of the page address of the i+1th visit;
将所述第i+1次访问页面地址预测值在本地缓存中进行查找;Searching the predicted value of the i+1th access page address in the local cache;
当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;When the cache result is not found, obtain the page resource from the server according to the i+1th access page address prediction value, and obtain the page resource to be cached;
将所述待缓存的页面资源存储到所述本地缓存。storing the page resources to be cached in the local cache.
本申请还提出了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下方法步骤:The present application also proposes a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following method steps are implemented:
获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;Acquiring the page loading completion signal of the i-th visit page, the page loading completion signal carrying the user identifier to be predicted and the real value of the i-th visit page address;
响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;Responding to the page loading completion signal, acquiring a target user portrait according to the user identifier to be predicted;
采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;Using the first preset page prediction model, predicting the page address of the i+1th visit according to the real value of the page address of the ith visit and the target user portrait, to obtain the predicted value of the page address of the i+1th visit;
将所述第i+1次访问页面地址预测值在本地缓存中进行查找;Searching the predicted value of the i+1th access page address in the local cache;
当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;When the cache result is not found, obtain the page resource from the server according to the i+1th access page address prediction value, and obtain the page resource to be cached;
将所述待缓存的页面资源存储到所述本地缓存。storing the page resources to be cached in the local cache.
有益效果Beneficial effect
本申请的页面资源的缓存方法、装置、设备及介质,通过首先获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值,其次响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像,采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值,然后将所述第i+1次访问页面地址预测值在本地缓存中进行查找,当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源,最后将所述待缓存的页面资源存储到所述本地缓存,从而在用户无感知的情况下自动将用户下一次可能访问的页面资源缓存到本地缓存,用户实际访问预测的页面地址时,将从本地缓存中获取页面资源进行加载,从而减少了页面加载的时间,提高了未打开过的页面的加载速度,提高了用户体验。The page resource caching method, device, device and medium of the present application obtain the page loading completion signal of the i-th visit page first, and the page loading completion signal carries the user identifier to be predicted and the real value of the address of the i-th visit page , secondly in response to the page loading completion signal, obtain the target user portrait according to the user identifier to be predicted, adopt the first preset page prediction model, and perform the process according to the real value of the ith visit page address and the target user portrait Predict the page address of the i+1th access, obtain the predicted value of the i+1th accessed page address, and then search the predicted value of the i+1th accessed page address in the local cache, when no cached result is found , obtain page resources from the server according to the predicted value of the i+1th access page address, obtain the page resources to be cached, and finally store the page resources to be cached in the local cache, so that the user does not perceive automatically cache the page resource that the user may visit next time to the local cache, and when the user actually visits the predicted page address, the page resource will be obtained from the local cache for loading, thereby reducing the page loading time and improving the unopened The loading speed of the past pages improves the user experience.
附图说明Description of drawings
图1为本申请一实施例的页面资源的缓存方法的流程示意图;FIG. 1 is a schematic flowchart of a method for caching page resources according to an embodiment of the present application;
图2 为本申请一实施例的页面资源的缓存装置的结构示意框图;FIG. 2 is a schematic block diagram of a cache device for page resources according to an embodiment of the present application;
图3 为本申请一实施例的计算机设备的结构示意框图。FIG. 3 is a schematic block diagram of a computer device according to an embodiment of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional features and advantages of the present application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的实施方式Embodiments of the present invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.
参照图1,本申请实施例中提供一种页面资源的缓存方法,所述方法包括:Referring to FIG. 1, an embodiment of the present application provides a method for caching page resources, the method comprising:
S1:获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;S1: Obtain the page loading completion signal of the i-th visited page, the page loading completion signal carries the user identifier to be predicted and the real value of the i-th visited page address;
S2:响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;S2: Responding to the page loading completion signal, acquiring a target user portrait according to the user identifier to be predicted;
S3:采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;S3: Using the first preset page prediction model, predicting the page address of the i+1th visit according to the real value of the page address of the ith visit and the target user portrait, and obtaining the page address prediction of the i+1th visit value;
S4:将所述第i+1次访问页面地址预测值在本地缓存中进行查找;S4: Search the predicted value of the i+1th access page address in the local cache;
S5:当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;S5: When the cached result is not found, obtain the page resource from the server according to the predicted value of the i+1th access page address, and obtain the page resource to be cached;
S6:将所述待缓存的页面资源存储到所述本地缓存。S6: Store the page resource to be cached in the local cache.
本实施例通过首先获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值,其次响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像,采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值,然后将所述第i+1次访问页面地址预测值在本地缓存中进行查找,当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源,最后将所述待缓存的页面资源存储到所述本地缓存,从而在用户无感知的情况下自动将用户下一次可能访问的页面资源缓存到本地缓存,用户实际访问预测的页面地址时,将从本地缓存中获取页面资源进行加载,从而减少了页面加载的时间,提高了未打开过的页面的加载速度,提高了用户体验。In this embodiment, by first obtaining the page loading completion signal of the i-th access page, the page loading completion signal carries the user identifier to be predicted and the real value of the i-th access page address, and secondly responding to the page loading completion signal, according to the Describe the user ID to be predicted to obtain the target user portrait, adopt the first preset page prediction model, and predict the page address of the i+1 visit according to the real value of the page address of the ith visit and the target user portrait, and obtain The i+1th access page address prediction value, and then look up the i+1th access page address prediction value in the local cache, and when no cached result is found, according to the i+1th access page The address prediction value obtains the page resource from the server, obtains the page resource to be cached, and finally stores the page resource to be cached in the local cache, so that the page that the user may visit next time is automatically stored without the user's perception The resources are cached in the local cache. When the user actually visits the predicted page address, the page resources will be obtained from the local cache for loading, thereby reducing the page loading time, increasing the loading speed of unopened pages, and improving the user experience.
对于S1,客户端加载待预测的用户标识的第i次访问页面,当第i次访问页面被加载完成时生成页面加载完成信号,将第i次访问页面的页面地址作为第i次访问页面地址真实值,将待预测的用户标识和第i次访问页面地址真实值作为所述页面加载完成信号携带的参数。For S1, the client loads the i-th visit page of the user ID to be predicted, and generates a page loading completion signal when the i-th visit page is loaded, and uses the page address of the i-th visit page as the i-th visit page address For the real value, the user identifier to be predicted and the real value of the address of the i-th visited page are used as parameters carried by the page loading completion signal.
页面加载完成信号,是第i次访问页面加载完成生成的信号。The page loading completion signal is the signal generated when the i-th access page is loaded.
客户端可以是移动设备的客户端,也可以是电脑的客户端,还可以是浏览器。The client can be a mobile device client, a computer client, or a browser.
可选的,所述第i次访问页面,是指用户当前浏览的页面。页面,是Web(全球广域网)页面。Optionally, the i-th visited page refers to the page currently browsed by the user. A page is a Web (Global Wide Area Network) page.
待预测的用户标识,也就是访问第i次访问页面的用户的用户标识。用户标识可以是用户名称、用户ID等唯一标识一个用户的数据。The user ID to be predicted is the user ID of the user who visits the i-th visit page. The user identifier may be data that uniquely identifies a user, such as a user name and a user ID.
第i次访问页面地址真实值,也就是待预测的用户标识对应的用户第i次实际访问的页面的URL(统一资源定位器)地址。The real value of the address of the i-th visit page, that is, the URL (Uniform Resource Locator) address of the page that the user actually visits the i-th time corresponding to the user ID to be predicted.
对于S2,在收到所述页面加载完成信号时,响应所述页面加载完成信号,获取所述待预测的用户标识对应的用户画像作为目标用户画像。For S2, when the page loading completion signal is received, in response to the page loading completion signal, acquire the user portrait corresponding to the user identifier to be predicted as the target user portrait.
可选的,在收到所述页面加载完成信号时,响应所述页面加载完成信号,调用页面预测接口,获取所述待预测的用户标识对应的用户画像作为目标用户画像,从而将用户画像和客户端解耦合,有利于提高客户端服务的稳定性。Optionally, when the page loading completion signal is received, the page prediction interface is called in response to the page loading completion signal, and the user portrait corresponding to the user identifier to be predicted is obtained as the target user portrait, so that the user portrait and Client decoupling helps to improve the stability of client services.
可选的,所述获取所述待预测的用户标识对应的用户画像作为目标用户画像的步骤,包括:获取用户画像库;将所述待预测的用户标识在所述用户画像库中进行查找,将在所述用户画像库中查找到的用户标识对应的用户画像作为所述目标用户画像。Optionally, the step of acquiring the user profile corresponding to the user ID to be predicted as the target user profile includes: acquiring a user profile library; searching the user ID to be predicted in the user profile library, The user portrait corresponding to the user identification found in the user portrait database is used as the target user portrait.
用户画像库包括:用户标识、用户画像,每个用户标识对应一个用户画像。The user portrait library includes: user ID and user portrait, and each user ID corresponds to a user portrait.
用户画像包括但不限于:性别、年龄、学历、所在地、设备信息、用户分类标签、历史浏览记录。User portraits include but are not limited to: gender, age, education, location, device information, user classification tags, and historical browsing records.
当本申请应用于金融行业时,所述用户画像还包括:用户风险等级、用户安全等级、历史投资记录(产品类型、金额)。When this application is applied to the financial industry, the user profile also includes: user risk level, user security level, and historical investment records (product type, amount).
对于S3,将所述第i次访问页面地址真实值和所述目标用户画像输入所述第一预设页面预测模型进行第i+1次访问的页面地址预测,将预测得到的页面地址作为第i+1次访问页面地址预测值。For S3, input the real value of the page address of the i-th visit and the target user portrait into the first preset page prediction model to predict the page address of the i+1-th visit, and use the predicted page address as the first page address i+1 access page address prediction value.
可选的,调用所述页面预测接口,将所述第i次访问页面地址真实值和所述目标用户画像输入所述第一预设页面预测模型进行第i+1次访问的页面地址预测,将预测得到的页面地址作为第i+1次访问页面地址预测值,从而将第一预设页面预测模型和客户端解耦合,有利于提高客户端服务的稳定性。Optionally, calling the page prediction interface, inputting the real value of the page address of the i-th visit and the target user portrait into the first preset page prediction model to predict the page address of the i+1-th visit, The predicted page address is used as the predicted value of the i+1th visit page address, thereby decoupling the first preset page prediction model from the client, which is beneficial to improving the stability of the client service.
比如,所述第i次访问页面地址真实值是用户m第i次访问的页面的页面地址的真实值,则第i+1次访问页面地址预测值是预测用户m在第i+1次会访问的页面的页面地址,在此举例不做具体限定。For example, the real value of the page address of the i-th visit is the real value of the page address of the page visited by the user m for the i-th time, then the predicted value of the page address for the i+1 visit is to predict that the user m will visit the page for the i+1 time The page address of the accessed page is not specifically limited in this example.
采用目标用户画像作为所述第一预设页面预测模型的输入,是因为画像相同或相近的用户,下一次可能进入的页面会类似。比如,高风险承受能力的用户,在浏览投资列表页时,会倾向于选择波动性更大的基金产品,所以当用户还未进入基金产品页时,提前将波动性更大的基金产品对应的页面的页面资源缓存到客户端的本地缓存,在此举例不做具体限定。The target user portrait is used as the input of the first preset page prediction model because users with the same or similar portraits may enter similar pages next time. For example, users with high risk tolerance will tend to choose fund products with greater volatility when browsing the investment list page, so before the user enters the fund product page, the corresponding fund products with greater volatility will be selected in advance. The page resources of the page are cached in the client's local cache, which is not limited in this example.
其中,所述第一预设页面预测模型是基于AI(人工智能)深度学习模型训练得到的模型。Wherein, the first preset page prediction model is a model trained based on an AI (artificial intelligence) deep learning model.
对于S4,根据所述第i+1次访问页面地址预测值在客户端的本地缓存中进行查找,当在客户端的本地缓存中查找到所述第i+1次访问页面地址预测值对应的页面资源时确定所述缓存查找结果为已缓存,当在客户端的本地缓存中未查找到所述第i+1次访问页面地址预测值对应的页面资源时确定所述缓存查找结果为未缓存。For S4, search in the client's local cache according to the i+1th access page address prediction value, when the page resource corresponding to the i+1th access page address prediction value is found in the client's local cache When determining that the cache lookup result is cached, when the page resource corresponding to the i+1th access page address prediction value is not found in the local cache of the client, it is determined that the cache lookup result is not cached.
页面资源,也就是页面的静态资源,比如CSS(层叠样式表)、JS(JavaScript)、HTML(超文本标记语言)、图片文件等。Page resources, that is, static resources of the page, such as CSS (Cascading Style Sheet), JS (JavaScript), HTML (Hypertext Markup Language), image files, etc.
对于S5,当未查找到缓存结果时,意味着客户端的本地缓存中没有存储所述第i+1次访问页面地址预测值对应的页面资源,因此根据所述第i+1次访问页面地址预测值从服务端获取页面资源,将获取的所有页面资源作为待缓存的页面资源。For S5, when the cache result is not found, it means that the page resource corresponding to the i+1th access page address prediction value is not stored in the local cache of the client, so according to the i+1th access page address prediction The value obtains page resources from the server, and uses all obtained page resources as page resources to be cached.
对于S6,将所述待缓存的页面资源存储到客户端的本地缓存中,以使用户访问所述第i+1次访问页面地址预测值对应的页面时,是从客户端的本地缓存中获取页面资源进行加载,从而减少了页面加载的时间,提高了未打开过的页面的加载速度,提高了用户体验。For S6, the page resource to be cached is stored in the local cache of the client, so that when the user accesses the page corresponding to the predicted value of the i+1th access page address, the page resource is obtained from the local cache of the client Loading, thereby reducing the page loading time, improving the loading speed of pages that have not been opened, and improving user experience.
在一个实施例中,上述根据所述待预测的用户标识获取目标用户画像的步骤,包括:In one embodiment, the above-mentioned step of acquiring a target user portrait according to the user identifier to be predicted includes:
S21:调用页面预测接口,将所述待预测的用户标识输入给用户画像模型,获取所述用户画像模型输出的目标用户画像,其中,所述用户画像模型根据所述待预测的用户标识获取待画像的用户数据,根据所述待画像的用户数据进行用户画像,得到所述目标用户画像。S21: Call the page prediction interface, input the user identification to be predicted into the user portrait model, and obtain the target user portrait output by the user portrait model, wherein the user portrait model obtains the target user portrait according to the user identification to be predicted The user data of the portrait, the user portrait is performed according to the user data to be portraited, and the target user portrait is obtained.
本实施例实现了通过调用页面预测接口,将所述待预测的用户标识输入给用户画像模型,获取所述用户画像模型输出的目标用户画像,所述用户画像模型根据所述待预测的用户标识获取待画像的用户数据,根据所述待画像的用户数据进行用户画像,得到所述目标用户画像,从而有利于实时生成用户画像,提高了确定的目标用户画像的准确性,从而提高了下一次访问的页面地址预测的准确性;通过页面预测接口将用户画像和客户端解耦合,有利于提高客户端服务的稳定性。In this embodiment, by calling the page prediction interface, the user identification to be predicted is input to the user portrait model, and the target user portrait output by the user portrait model is obtained, and the user portrait model is based on the user identification to be predicted Acquiring the user data to be profiled, and performing user portraits according to the user data to be profiled, to obtain the target user portrait, which is conducive to real-time generation of user portraits, improving the accuracy of the determined target user portraits, thereby improving the next time The accuracy of the visited page address prediction; decoupling the user portrait from the client through the page prediction interface helps to improve the stability of the client service.
对于S21,调用页面预测接口,将所述待预测的用户标识输入给用户画像模型,所述用户画像模型在收到所述待预测的用户标识时,将获取待画像的用户数据,根据所述待画像的用户数据实时进行用户画像,将用户画像得到的数据作为所述目标用户画像。For S21, call the page prediction interface, input the user ID to be predicted into the user portrait model, and the user portrait model will obtain the user data to be profiled when receiving the user ID to be predicted, according to the The user data to be profiled is profiled in real time, and the data obtained from the profile is used as the profile of the target user.
待画像的用户数据包括但不限于:用户基本信息、用户分类标签和历史浏览记录。用户基本信息包括但不限于:性别、年龄、学历、所在地、设备信息。用户分类标签是对用户进行分类的类别标签。历史浏览记录是用户历史浏览页面的记录。The user data to be profiled includes, but is not limited to: basic user information, user classification tags, and historical browsing records. Basic user information includes, but is not limited to: gender, age, education, location, and device information. The user classification label is a category label for classifying users. Browsing history records are records of users' historical browsing pages.
所述用户画像模型,是基于神经网络训练得到的模型。The user portrait model is a model obtained based on neural network training.
在一个实施例中,上述将所述第i+1次访问页面地址预测值在本地缓存中进行查找的步骤,包括:In one embodiment, the above step of searching the predicted value of the i+1th access page address in the local cache includes:
S41:将所述第i+1次访问页面地址预测值在所述本地缓存中进行查找;S41: Look up the predicted value of the i+1th access page address in the local cache;
S42:当没有查找到页面地址时,确定在所述本地缓存中未查找到缓存结果;S42: When no page address is found, determine that no cached result is found in the local cache;
S43:当查找到页面地址时,根据所述第i+1次访问页面地址预测值从所述服务端获取版本标识,得到待缓存的版本标识,将所述本地缓存中的所述第i+1次访问页面地址预测值对应的页面资源的版本标识作为本地缓存版本标识;S43: When the page address is found, obtain the version identifier from the server according to the predicted value of the i+1th access page address, obtain the version identifier to be cached, and store the i+1th access in the local cache The version identifier of the page resource corresponding to the predicted value of the page address accessed once is used as the local cache version identifier;
S44:将所述待缓存的版本标识与所述本地缓存版本标识进行对比;S44: Compare the version identifier to be cached with the locally cached version identifier;
S45:当所述待缓存的版本标识与所述本地缓存版本标识相同时,确定在所述本地缓存中查找到缓存结果;S45: When the version identifier to be cached is the same as the local cache version identifier, determine that a cached result is found in the local cache;
S46:当所述待缓存的版本标识与所述本地缓存版本标识不相同时,确定在所述本地缓存中未查找到缓存结果。S46: When the version identifier to be cached is different from the local cache version identifier, determine that no cached result is found in the local cache.
本实施例实现了将所述待缓存的版本标识与所述本地缓存版本标识进行对比,当所述待缓存的版本标识与所述本地缓存版本标识相同时,确定所述缓存查找结果为已缓存,当所述待缓存的版本标识与所述本地缓存版本标识不相同时,确定所述缓存查找结果为未缓存,从而提高了缓存查找结果的准确性。In this embodiment, the version identifier to be cached is compared with the locally cached version identifier, and when the version identifier to be cached is the same as the locally cached version identifier, it is determined that the cache lookup result is cached , when the version identifier to be cached is different from the locally cached version identifier, determine that the cached lookup result is not cached, thereby improving the accuracy of the cached lookup result.
对于S42,当没有查找到页面地址时,意味着所述第i+1次访问页面地址预测值在客户端的本地缓存中没有缓存页面资源,因此可以确定在所述本地缓存中未查找到缓存结果。For S42, when the page address is not found, it means that the i+1th access page address prediction value does not cache page resources in the local cache of the client, so it can be determined that no cached result is found in the local cache .
对于S43,当查找到页面地址时,意味着所述第i+1次访问页面地址预测值在客户端的本地缓存中缓存有页面资源,根据所述第i+1次访问页面地址预测值从所述服务端获取版本标识,将获取的版本标识作为待缓存的版本标识;将客户端的本地缓存中的所述第i+1次访问页面地址预测值对应的页面资源的版本标识作为本地缓存版本标识。也就是说,待缓存的版本标识是服务端的最新版本的页面资源的版本标识,本地缓存版本标识是本地缓存的页面资源的版本标识。For S43, when the page address is found, it means that the i+1th access page address prediction value has page resources cached in the local cache of the client, and the i+1th access page address prediction value is obtained from the The server obtains the version identifier, and uses the obtained version identifier as the version identifier to be cached; uses the version identifier of the page resource corresponding to the i+1th access page address prediction value in the client's local cache as the local cache version identifier . That is to say, the version identifier to be cached is the version identifier of the latest version of the page resource on the server, and the locally cached version identifier is the version identifier of the locally cached page resource.
对于S45,当所述待缓存的版本标识与所述本地缓存版本标识相同时,意味着服务端的最新版本的页面资源和本地缓存的页面资源相同,因此确定在所述本地缓存中查找到缓存结果。For S45, when the version identifier to be cached is the same as the local cached version identifier, it means that the latest version of the page resource on the server side is the same as the page resource in the local cache, so it is determined that the cached result is found in the local cache .
对于S46,当所述待缓存的版本标识与所述本地缓存版本标识不相同时,意味着服务端的最新版本的页面资源和本地缓存的页面资源不相同,因此确定在所述本地缓存中未查找到缓存结果。For S46, when the version identifier to be cached is different from the local cache version identifier, it means that the latest version of the page resource on the server side is different from the page resource in the local cache, so it is determined that no to the cached result.
在一个实施例中,上述根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源的步骤,包括:In one embodiment, the above step of obtaining page resources from the server according to the predicted value of the i+1th access page address, and obtaining the page resources to be cached includes:
S51:根据所述第i+1次访问页面地址预测值生成页面资源获取请求,将所述页面资源获取请求发送给所述服务端;S51: Generate a page resource acquisition request according to the predicted value of the i+1th access page address, and send the page resource acquisition request to the server;
S52:获取所述服务端根据所述页面资源获取请求发送的页面资源作为所述待缓存的页面资源。S52: Obtain the page resource sent by the server according to the page resource acquisition request as the page resource to be cached.
本实施例实现了根据所述第i+1次访问页面地址预测值生成页面资源获取请求,然后获取所述服务端根据所述页面资源获取请求发送的页面资源作为所述待缓存的页面资源,从而获取到服务端的最新版本的页面资源,为提前在客户端的本地缓存中进行页面资源的缓存提供了基础。In this embodiment, a page resource acquisition request is generated according to the predicted value of the i+1th access page address, and then the page resource sent by the server according to the page resource acquisition request is acquired as the page resource to be cached, In this way, the latest version of the page resource on the server is obtained, which provides a basis for caching the page resource in the local cache of the client in advance.
对于S51,根据所述第i+1次访问页面地址预测值生成页面资源获取请求,也就是说,在生成页面资源获取请求时,将所述第i+1次访问页面地址预测值封装到页面资源获取请求的参数。For S51, generate a page resource acquisition request according to the predicted value of the i+1th access page address, that is, when generating the page resource acquisition request, encapsulate the i+1th accessed page address prediction value into the page Parameters for resource fetch requests.
对于S52,所述服务端在收到所述页面资源获取请求时,首先从所述页面资源获取请求中解析出所述第i+1次访问页面地址预测值,然后将解析出的所述第i+1次访问页面地址预测值从页面资源库中进行查找,将在页面资源库中查找到的页面地址对应的页面资源发送给所述页面资源获取请求对应的客户端。For S52, when the server receives the page resource acquisition request, it first parses the predicted value of the i+1th access page address from the page resource acquisition request, and then parses the parsed The predicted value of the page address for i+1 visits is searched from the page resource library, and the page resource corresponding to the page address found in the page resource library is sent to the client corresponding to the page resource acquisition request.
页面资源库包括:页面地址、页面资源,每个页面地址对应一个页面资源。The page resource library includes: page addresses and page resources, and each page address corresponds to a page resource.
在一个实施例中,上述获取第i次访问页面的页面加载完成信号的步骤之后,还包括:In one embodiment, after the above-mentioned step of obtaining the page loading completion signal of the i-th visited page, it further includes:
S71:根据所述待预测的用户标识和所述第i次访问页面地址真实值获取第i-1访问的页面的页面地址真实值,得到第i-1访问页面地址真实值;S71: Obtain the real value of the page address of the i-1th visited page according to the user identifier to be predicted and the real value of the i-th visited page address, and obtain the real value of the i-1th visited page address;
S72:根据所述待预测的用户标识获取待预测的用户画像;S72: Obtain a user portrait to be predicted according to the user identifier to be predicted;
S73:根据所述第i-1访问页面地址真实值、所述第i次访问页面地址真实值和所述待预测的用户画像对第二预设页面预测模型进行训练;S73: Train a second preset page prediction model according to the actual value of the i-1th accessed page address, the actual value of the i-th accessed page address, and the user portrait to be predicted;
S74:根据训练后的所述第二预设页面预测模型更新所述第一预设页面预测模型。S74: Update the first preset page prediction model according to the trained second preset page prediction model.
本实施例实现了在获取第i次访问页面的页面加载完成信号时,对第二预设页面预测模型进行训练,根据训练后的所述第二预设页面预测模型更新所述第一预设页面预测模型,从而无需人工采集训练数据,快速的提升了第一预设页面预测模型的进行下一次访问的页面地址预测的准确性;通过将训练的模型和提供服务的模型分开,有利于提高提供服务的第一预设页面预测模型的响应效率。In this embodiment, when the page loading completion signal of the i-th accessed page is acquired, the second preset page prediction model is trained, and the first preset is updated according to the trained second preset page prediction model. The page prediction model eliminates the need to manually collect training data, and quickly improves the accuracy of the page address prediction for the next visit of the first preset page prediction model; by separating the trained model from the service-providing model, it is beneficial to improve The response efficiency of the prediction model for the first preset page of the service is provided.
对于S71,根据所述待预测的用户标识和所述第i次访问页面地址真实值,从客户端的本地缓存中获取第i-1访问的页面的页面地址的真实值,将获取的第i-1访问的页面的页面地址的真实值作为第i-1访问页面地址真实值。For S71, according to the user identifier to be predicted and the real value of the i-th visited page address, the real value of the page address of the i-1th accessed page is obtained from the local cache of the client, and the obtained i-th The actual value of the page address of the page accessed by 1 is used as the actual value of the i-1th accessed page address.
对于S72,将所述待预测的用户标识输入给用户画像模型,获取所述用户画像模型根据所述待预测的用户标识发送的所述待预测的用户画像。For S72, input the to-be-predicted user identifier into a user portrait model, and acquire the to-be-predicted user portrait sent by the user portrait model according to the to-be-predicted user identifier.
可选的,调用所述页面训练接口,将所述待预测的用户标识输入给用户画像模型,获取所述用户画像模型根据所述待预测的用户标识发送的所述待预测的用户画像,从而将用户画像和客户端解耦合,有利于提高客户端服务的稳定性。Optionally, calling the page training interface, inputting the user identity to be predicted into the user portrait model, and obtaining the user portrait to be predicted sent by the user portrait model according to the user identity to be predicted, so that Decoupling the user profile from the client will help improve the stability of the client service.
可选的,所述根据所述待预测的用户标识获取待预测的用户画像的步骤,包括:获取所述用户画像库;将所述待预测的用户标识在所述用户画像库中进行查找,将在所述用户画像库中查找到的用户标识对应的用户画像作为所述待预测的用户画像。Optionally, the step of obtaining the user profile to be predicted according to the user ID to be predicted includes: acquiring the user profile library; searching the user ID to be predicted in the user profile library, The user portrait corresponding to the user identifier found in the user portrait database is used as the user portrait to be predicted.
对于S73,将所述第i-1访问页面地址真实值和所述待预测的用户画像输入所述第二预设页面预测模型进行第i次访问的页面地址预测,根据预测得到的页面地址和所述第i次访问页面地址真实值对第二预设页面预测模型进行训练。For S73, input the actual value of the i-1th visited page address and the user portrait to be predicted into the second preset page prediction model to predict the page address of the i-th visit, according to the predicted page address and The actual value of the i-th accessed page address is used to train the second preset page prediction model.
调用所述页面训练接口,将所述第i-1访问页面地址真实值和所述待预测的用户画像输入所述第二预设页面预测模型进行第i次访问的页面地址预测,根据预测得到的页面地址和所述第i次访问页面地址真实值对第二预设页面预测模型进行训练,从而将第二预设页面预测模型和客户端解耦合,有利于提高客户端服务的稳定性。Calling the page training interface, inputting the actual value of the i-1th visited page address and the user portrait to be predicted into the second preset page prediction model to predict the page address of the i-th visit, and obtain The page address of the second preset page prediction model and the actual value of the i-th visit page address are used to train the second preset page prediction model, thereby decoupling the second preset page prediction model from the client, which is beneficial to improving the stability of the client service.
其中,所述第一预设页面预测模型和所述第二预设页面预测模型的模型结构相同。Wherein, the model structures of the first preset page prediction model and the second preset page prediction model are the same.
对于S74,根据训练后的所述第二预设页面预测模型的模型参数更新所述第一预设页面预测模型的模型参数。For S74, update the model parameters of the first preset page prediction model according to the trained model parameters of the second preset page prediction model.
可以理解的是,在另一个实施例中,也可以根据所述第i-1访问页面地址真实值、所述第i次访问页面地址真实值和所述待预测的用户画像对第一预设页面预测模型进行训练,在此不做限定。It can be understood that, in another embodiment, the first preset can also be made according to the real value of the address of the i-1th visited page, the real value of the address of the i-th visited page, and the user portrait to be predicted. The page prediction model is trained, which is not limited here.
在一个实施例中,上述根据所述第i-1访问页面地址真实值、所述第i次访问页面地址真实值和所述待预测的用户画像对第二预设页面预测模型进行训练的步骤,包括:In one embodiment, the above step of training the second preset page prediction model according to the actual value of the i-1th visited page address, the true value of the i-th visited page address and the user portrait to be predicted ,include:
S731:将所述第i次访问页面地址真实值作为第i次访问页面标定值;S731: Use the real value of the address of the i-th accessed page as the calibration value of the i-th accessed page;
S732:将所述待预测的用户画像和所述第i-1访问页面地址真实值输入所述第二预设页面预测模型进行第i次访问的页面地址预测,得到第i访问页面地址预测值;S732: Input the user portrait to be predicted and the actual value of the i-1th accessed page address into the second preset page prediction model to predict the page address of the i-th accessed page, and obtain the predicted value of the i-th accessed page address ;
S733:根据所述第i访问页面地址预测值和所述第i次访问页面标定值对所述第二预设页面预测模型进行训练。S733: Train the second preset page prediction model according to the i-th accessed page address prediction value and the i-th accessed page calibration value.
本实施例将所述待预测的用户画像和所述第i-1访问页面地址真实值输入所述第二预设页面预测模型进行第i次访问的页面地址预测,根据所述第i访问页面地址预测值和所述第i次访问页面标定值对所述第二预设页面预测模型进行训练,从而无需人工采集训练数据,快速的提升了第一预设页面预测模型的进行下一次访问的页面地址预测的准确性。In this embodiment, the user portrait to be predicted and the actual value of the i-1th visited page address are input into the second preset page prediction model to predict the page address of the i-th visit. According to the i-th visited page The address prediction value and the i-th visit page calibration value train the second preset page prediction model, thereby eliminating the need to manually collect training data, and quickly improving the performance of the first preset page prediction model for the next visit. Accuracy of Page Address Prediction.
对于S731,因所述第i次访问页面地址真实值是用户实际访问的页面地址,因此将所述第i次访问页面地址真实值作为第i次访问页面标定值。For S731, since the real value of the i-th visited page address is the address of the page actually visited by the user, the real value of the i-th visited page address is used as the i-th visited page calibration value.
对于S732,将所述待预测的用户画像和所述第i-1访问页面地址真实值输入所述第二预设页面预测模型进行第i次访问的页面地址预测,将预测得到的页面地址作为第i访问页面地址预测值。For S732, input the user portrait to be predicted and the actual value of the i-1th visited page address into the second preset page prediction model to predict the page address of the i-th visit, and use the predicted page address as Predicted address value of the i-th accessed page.
对于S733,将所述第i访问页面地址预测值和所述第i次访问页面标定值输入交叉熵损失函数进行损失值计算,得到目标损失值,根据所述目标损失值更新所述第二预设页面预测模型的参数。For S733, input the i-th accessed page address prediction value and the i-th accessed page calibration value into a cross-entropy loss function to calculate a loss value to obtain a target loss value, and update the second predicted value according to the target loss value Set the parameters of the page prediction model.
在一个实施例中,上述根据训练后的所述第二预设页面预测模型更新所述第一预设页面预测模型的步骤,包括:In one embodiment, the step of updating the first preset page prediction model according to the trained second preset page prediction model includes:
S741:采用预设的模型参数更新时间,根据所述第二预设页面预测模型中的模型参数更新所述第一预设页面预测模型中的模型参数,其中,所述第一预设页面预测模型和所述第二预设页面预测模型的模型结构相同。S741: Using the preset model parameter update time, update the model parameters in the first preset page prediction model according to the model parameters in the second preset page prediction model, wherein the first preset page prediction model The model has the same model structure as the second preset page prediction model.
本实施例实现了采用预设的模型参数更新时间更新所述第一预设页面预测模型中的模型参数,从而避免频繁更新影响所述第一预设页面预测模型提供服务的能力。In this embodiment, the model parameters in the first preset page prediction model are updated by using the preset model parameter update time, thereby avoiding that frequent updates affect the ability of the first preset page prediction model to provide services.
对于S741,预设的模型参数更新时间包括但不限于:每日3点。For S741, the preset time for updating model parameters includes but is not limited to: 3 o'clock every day.
其中,从所述第二预设页面预测模型中提取出模型参数,得到待更新的模型参数矩阵;根据所述待更新的模型参数矩阵更新所述第一预设页面预测模型中的模型参数,将更新后的所述第一预设页面预测模型用于下一次进行下一次访问的页面地址预测,通过只更新模型参数,从而减少了更新的数据量,提高了更新的效率。Wherein, extracting model parameters from the second preset page prediction model to obtain a model parameter matrix to be updated; updating model parameters in the first preset page prediction model according to the model parameter matrix to be updated, The updated first preset page prediction model is used to predict the page address of the next visit, and only the model parameters are updated, thereby reducing the amount of updated data and improving the updating efficiency.
参照图2,本申请还提出了一种页面资源的缓存装置,所述装置包括:Referring to FIG. 2, the present application also proposes a caching device for page resources, and the device includes:
页面加载完成信号获取模块100,用于获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;The page loading completion signal acquisition module 100 is used to obtain the page loading completion signal of the i-th visit page, and the page loading completion signal carries the user identifier to be predicted and the real value of the i-th visit page address;
目标用户画像获取模块200,用于响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;Target user portrait acquisition module 200, configured to respond to the page loading completion signal, and acquire a target user portrait according to the user identifier to be predicted;
页面地址预测模块300,用于采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;The page address prediction module 300 is configured to use the first preset page prediction model to predict the page address of the i+1th visit according to the real value of the page address of the ith visit and the target user portrait, and obtain the i+1th visit. 1 access page address prediction value;
缓存查找定模块400,用于将所述第i+1次访问页面地址预测值在本地缓存中进行查找;A cache lookup module 400, configured to look up the i+1th access page address prediction value in a local cache;
待缓存的页面资源确定模块500,用于当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;The page resource determination module 500 to be cached is used to obtain the page resource from the server according to the i+1th access page address prediction value to obtain the page resource to be cached when no cached result is found;
存储模块600,用于将所述待缓存的页面资源存储到所述本地缓存。The storage module 600 is configured to store the page resource to be cached in the local cache.
本实施例通过首先获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值,其次响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像,采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值,然后将所述第i+1次访问页面地址预测值在本地缓存中进行查找,当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源,最后将所述待缓存的页面资源存储到所述本地缓存,从而在用户无感知的情况下自动将用户下一次可能访问的页面资源缓存到本地缓存,用户实际访问预测的页面地址时,将从本地缓存中获取页面资源进行加载,从而减少了页面加载的时间,提高了未打开过的页面的加载速度,提高了用户体验。In this embodiment, by first obtaining the page loading completion signal of the i-th access page, the page loading completion signal carries the user identifier to be predicted and the real value of the i-th access page address, and secondly responding to the page loading completion signal, according to the Describe the user ID to be predicted to obtain the target user portrait, adopt the first preset page prediction model, and predict the page address of the i+1 visit according to the real value of the page address of the ith visit and the target user portrait, and obtain The i+1th access page address prediction value, and then look up the i+1th access page address prediction value in the local cache, and when no cached result is found, according to the i+1th access page The address prediction value obtains the page resource from the server, obtains the page resource to be cached, and finally stores the page resource to be cached in the local cache, so that the page that the user may visit next time is automatically stored without the user's perception The resources are cached in the local cache. When the user actually visits the predicted page address, the page resources will be obtained from the local cache for loading, thereby reducing the page loading time, increasing the loading speed of unopened pages, and improving the user experience.
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于储存页面资源的缓存方法等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种页面资源的缓存方法。所述页面资源的缓存方法,包括:获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;将所述第i+1次访问页面地址预测值在本地缓存中进行查找;当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;将所述待缓存的页面资源存储到所述本地缓存。Referring to FIG. 3 , an embodiment of the present application also provides a computer device, which may be a server, and its internal structure may be as shown in FIG. 3 . The computer device includes a processor, memory, network interface and database connected by a system bus. Among them, the processor designed by the computer is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs and databases. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store data such as the caching method of the page resource. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a page resource caching method is realized. The caching method of the page resource includes: obtaining the page loading completion signal of the i-th access page, the page loading completion signal carrying the user identifier to be predicted and the real value of the i-th access page address; responding to the completion of the page loading signal, obtaining a target user portrait according to the user identifier to be predicted; using the first preset page prediction model, performing the i+1th visit page according to the real value of the i-th visit page address and the target user portrait Address prediction, obtaining the i+1th access page address prediction value; searching the i+1th access page address prediction value in the local cache; when no cache result is found, according to the i+1th access page address prediction value The predicted value of the page address of the second visit obtains the page resource from the server to obtain the page resource to be cached; and stores the page resource to be cached in the local cache.
本实施例通过首先获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值,其次响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像,采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值,然后将所述第i+1次访问页面地址预测值在本地缓存中进行查找,当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源,最后将所述待缓存的页面资源存储到所述本地缓存,从而在用户无感知的情况下自动将用户下一次可能访问的页面资源缓存到本地缓存,用户实际访问预测的页面地址时,将从本地缓存中获取页面资源进行加载,从而减少了页面加载的时间,提高了未打开过的页面的加载速度,提高了用户体验。In this embodiment, by first obtaining the page loading completion signal of the i-th access page, the page loading completion signal carries the user identifier to be predicted and the real value of the i-th access page address, and secondly responding to the page loading completion signal, according to the Describe the user ID to be predicted to obtain the target user portrait, adopt the first preset page prediction model, and predict the page address of the i+1 visit according to the real value of the page address of the ith visit and the target user portrait, and obtain The i+1th access page address prediction value, and then look up the i+1th access page address prediction value in the local cache, and when no cached result is found, according to the i+1th access page The address prediction value obtains the page resource from the server, obtains the page resource to be cached, and finally stores the page resource to be cached in the local cache, so that the page that the user may visit next time is automatically stored without the user's perception The resources are cached in the local cache. When the user actually visits the predicted page address, the page resources will be obtained from the local cache for loading, thereby reducing the page loading time, increasing the loading speed of unopened pages, and improving the user experience.
本申请一实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现一种页面资源的缓存方法,包括步骤:获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;将所述第i+1次访问页面地址预测值在本地缓存中进行查找;当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;将所述待缓存的页面资源存储到所述本地缓存。An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for caching page resources is implemented, including the steps of: obtaining the page load of the i-th accessed page Complete signal, the page loading completion signal carries the user identification to be predicted and the real value of the i-th visit page address; in response to the page loading completion signal, obtain the target user portrait according to the user identification to be predicted; adopt the first prediction A page prediction model is set, and the page address prediction of the i+1th visit is performed according to the real value of the page address of the ith visit and the target user portrait, and the predicted value of the page address of the i+1th visit is obtained; The predicted value of the page address of the i+1 visit is searched in the local cache; when the cache result is not found, the page resource is obtained from the server according to the predicted value of the page address of the i+1 visit, and the page resource to be cached is obtained. ; Store the page resource to be cached in the local cache.
上述执行的页面资源的缓存方法,通过首先获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值,其次响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像,采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值,然后将所述第i+1次访问页面地址预测值在本地缓存中进行查找,当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源,最后将所述待缓存的页面资源存储到所述本地缓存,从而在用户无感知的情况下自动将用户下一次可能访问的页面资源缓存到本地缓存,用户实际访问预测的页面地址时,将从本地缓存中获取页面资源进行加载,从而减少了页面加载的时间,提高了未打开过的页面的加载速度,提高了用户体验。The page resource caching method executed above firstly obtains the page loading completion signal of the i-th access page, the page loading completion signal carries the user identifier to be predicted and the real value of the i-th access page address, and secondly responds to the page Loading completion signal, obtaining target user portrait according to the user identifier to be predicted, using the first preset page prediction model, and performing the i+1th visit according to the real value of the i-th visit page address and the target user portrait The page address prediction of the i+1th access page address is obtained, and then the i+1th access page address prediction value is searched in the local cache. When the cache result is not found, according to the first The predicted value of the page address for i+1 visits obtains the page resource from the server, obtains the page resource to be cached, and finally stores the page resource to be cached in the local cache, thereby automatically saving the user The page resources that may be accessed next time are cached in the local cache. When the user actually visits the predicted page address, the page resources will be obtained from the local cache for loading, thereby reducing the page loading time and improving the loading speed of unopened pages , improving the user experience.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the computer programs can be stored in a non-volatile computer-readable memory In the medium, when the computer program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, any references to memory, storage, database or other media provided in the present application and used in the embodiments may include non-volatile and/or volatile memory. Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
所述计算机可读存储介质可以是非易失性,也可以是易失性。The computer-readable storage medium may be non-volatile or volatile.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, apparatus, article or method comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional same elements in the process, apparatus, article or method comprising the element.
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only preferred embodiments of the application, and are not intended to limit the patent scope of the application. Any equivalent structure or equivalent process conversion made by using the specification and drawings of the application, or directly or indirectly used in other related All technical fields are equally included in the patent protection scope of the present application.

Claims (20)

  1. 一种页面资源的缓存方法,其中,所述方法包括:A method for caching page resources, wherein the method includes:
    获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;Acquiring the page loading completion signal of the i-th visit page, the page loading completion signal carrying the user identifier to be predicted and the real value of the i-th visit page address;
    响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;Responding to the page loading completion signal, acquiring a target user portrait according to the user identifier to be predicted;
    采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;Using the first preset page prediction model, predicting the page address of the i+1th visit according to the real value of the page address of the ith visit and the target user portrait, to obtain the predicted value of the page address of the i+1th visit;
    将所述第i+1次访问页面地址预测值在本地缓存中进行查找;Searching the predicted value of the i+1th access page address in the local cache;
    当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;When the cache result is not found, obtain the page resource from the server according to the i+1th access page address prediction value, and obtain the page resource to be cached;
    将所述待缓存的页面资源存储到所述本地缓存。storing the page resources to be cached in the local cache.
  2. 根据权利要求1所述的页面资源的缓存方法,其中,所述根据所述待预测的用户标识获取目标用户画像的步骤,包括:The method for caching page resources according to claim 1, wherein the step of acquiring a target user portrait according to the user identifier to be predicted comprises:
    调用页面预测接口,将所述待预测的用户标识输入用户画像模型,获取所述用户画像模型输出的目标用户画像,其中,所述用户画像模型根据所述待预测的用户标识获取待画像的用户数据,根据所述待画像的用户数据进行用户画像,得到所述目标用户画像。calling the page prediction interface, inputting the user identification to be predicted into the user portrait model, and obtaining the target user portrait output by the user portrait model, wherein the user portrait model obtains the user to be profiled according to the user identification to be predicted Data, perform user portrait according to the user data to be portraited, and obtain the target user portrait.
  3. 根据权利要求1所述的页面资源的缓存方法,其中,所述将所述第i+1次访问页面地址预测值在本地缓存中进行查找的步骤,包括:The method for caching page resources according to claim 1, wherein the step of searching the predicted value of the i+1th access page address in a local cache includes:
    将所述第i+1次访问页面地址预测值在所述本地缓存中进行查找;Searching the predicted value of the i+1th access page address in the local cache;
    当没有查找到页面地址时,确定在所述本地缓存中未查找到缓存结果;When the page address is not found, it is determined that no cached result is found in the local cache;
    当查找到页面地址时,根据所述第i+1次访问页面地址预测值从所述服务端获取版本标识,得到待缓存的版本标识,将所述本地缓存中的所述第i+1次访问页面地址预测值对应的页面资源的版本标识作为本地缓存版本标识;When the page address is found, obtain the version identifier from the server according to the i+1th access page address prediction value, obtain the version identifier to be cached, and store the i+1th access in the local cache The version identifier of the page resource corresponding to the predicted value of the accessed page address is used as the local cache version identifier;
    将所述待缓存的版本标识与所述本地缓存版本标识进行对比;comparing the version identifier to be cached with the locally cached version identifier;
    当所述待缓存的版本标识与所述本地缓存版本标识相同时,确定在所述本地缓存中查找到缓存结果;When the version identifier to be cached is the same as the local cache version identifier, determine that a cached result is found in the local cache;
    当所述待缓存的版本标识与所述本地缓存版本标识不相同时,确定在所述本地缓存中未查找到缓存结果。When the version identifier to be cached is different from the local cache version identifier, it is determined that no cached result is found in the local cache.
  4. 根据权利要求1所述的页面资源的缓存方法,其中,所述根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源的步骤,包括:The method for caching page resources according to claim 1, wherein the step of obtaining page resources from the server according to the predicted value of the page address of the i+1 access to obtain the page resources to be cached includes:
    根据所述第i+1次访问页面地址预测值生成页面资源获取请求,将所述页面资源获取请求发送给所述服务端;Generate a page resource acquisition request according to the predicted value of the i+1th access page address, and send the page resource acquisition request to the server;
    获取所述服务端根据所述页面资源获取请求发送的页面资源作为所述待缓存的页面资源。Acquire the page resource sent by the server according to the page resource acquisition request as the page resource to be cached.
  5. 根据权利要求1所述的页面资源的缓存方法,其中,所述获取第i次访问页面的页面加载完成信号的步骤之后,还包括:The caching method for page resources according to claim 1, wherein, after the step of obtaining the page loading completion signal of the i-th accessed page, further comprising:
    根据所述待预测的用户标识和所述第i次访问页面地址真实值获取第i-1访问的页面的页面地址真实值,得到第i-1访问页面地址真实值;Obtain the real value of the page address of the i-1th visited page according to the user identifier to be predicted and the real value of the i-th visited page address, and obtain the real value of the i-1th visited page address;
    根据所述待预测的用户标识获取待预测的用户画像;Obtaining a user portrait to be predicted according to the user identifier to be predicted;
    根据所述第i-1访问页面地址真实值、所述第i次访问页面地址真实值和所述待预测的用户画像对第二预设页面预测模型进行训练;Training a second preset page prediction model according to the actual value of the i-1th visited page address, the true value of the i-th visited page address, and the user portrait to be predicted;
    根据训练后的所述第二预设页面预测模型更新所述第一预设页面预测模型。Updating the first preset page prediction model according to the trained second preset page prediction model.
  6. 根据权利要求5所述的页面资源的缓存方法,其中,所述根据所述第i-1访问页面地址真实值、所述第i次访问页面地址真实值和所述待预测的用户画像对第二预设页面预测模型进行训练的步骤,包括:The method for caching page resources according to claim 5, wherein, according to the actual value of the i-1th accessed page address, the actual value of the i-th accessed page address, and the user portrait to be predicted for the first Two preset steps for training the page prediction model, including:
    将所述第i次访问页面地址真实值作为第i次访问页面标定值;Using the real value of the i-th visit page address as the i-th visit page calibration value;
    将所述待预测的用户画像和所述第i-1访问页面地址真实值输入所述第二预设页面预测模型进行第i次访问的页面地址预测,得到第i访问页面地址预测值;Inputting the user portrait to be predicted and the actual value of the i-1th visited page address into the second preset page prediction model to predict the page address of the i-th visited page, and obtain the predicted value of the i-th visited page address;
    根据所述第i访问页面地址预测值和所述第i次访问页面标定值对所述第二预设页面预测模型进行训练。The second preset page prediction model is trained according to the i-th access page address prediction value and the i-th access page calibration value.
  7. 根据权利要求5所述的页面资源的缓存方法,其中,所述根据训练后的所述第二预设页面预测模型更新所述第一预设页面预测模型的步骤,包括:The method for caching page resources according to claim 5, wherein the step of updating the first preset page prediction model according to the trained second preset page prediction model comprises:
    采用预设的模型参数更新时间,根据所述第二预设页面预测模型中的模型参数更新所述第一预设页面预测模型中的模型参数,其中,所述第一预设页面预测模型和所述第二预设页面预测模型的模型结构相同。Update the model parameters in the first preset page prediction model according to the model parameters in the second preset page prediction model by using a preset model parameter update time, wherein the first preset page prediction model and The model structures of the second preset page prediction models are the same.
  8. 一种页面资源的缓存装置,其中,所述装置包括:A caching device for page resources, wherein the device includes:
    页面加载完成信号获取模块,用于获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;The page loading completion signal acquisition module is used to obtain the page loading completion signal of the i-th visit page, and the page loading completion signal carries the user identifier to be predicted and the real value of the i-th visit page address;
    目标用户画像获取模块,用于响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;A target user portrait acquisition module, configured to acquire a target user portrait according to the user identifier to be predicted in response to the page loading completion signal;
    页面地址预测模块,用于采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;The page address prediction module is configured to use the first preset page prediction model to predict the page address of the i+1th visit according to the real value of the page address of the ith visit and the target user portrait, to obtain the i+1th visit The predicted value of the page address of the second visit;
    缓存查找定模块,用于将所述第i+1次访问页面地址预测值在本地缓存中进行查找;A cache lookup module, configured to look up the i+1th access page address prediction value in a local cache;
    待缓存的页面资源确定模块,用于当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;The page resource determination module to be cached is used to obtain the page resource from the server according to the i+1th access page address prediction value to obtain the page resource to be cached when no cached result is found;
    存储模块,用于将所述待缓存的页面资源存储到所述本地缓存。A storage module, configured to store the page resource to be cached in the local cache.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中,所述处理器执行所述计算机程序时实现如下方法步骤:A computer device, comprising a memory and a processor, the memory stores a computer program, wherein the processor implements the following method steps when executing the computer program:
    获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;Acquiring the page loading completion signal of the i-th visit page, the page loading completion signal carrying the user identifier to be predicted and the real value of the i-th visit page address;
    响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;Responding to the page loading completion signal, acquiring a target user portrait according to the user identifier to be predicted;
    采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;Using the first preset page prediction model, predicting the page address of the i+1th visit according to the real value of the page address of the ith visit and the target user portrait, to obtain the predicted value of the page address of the i+1th visit;
    将所述第i+1次访问页面地址预测值在本地缓存中进行查找;Searching the predicted value of the i+1th access page address in the local cache;
    当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;When the cache result is not found, obtain the page resource from the server according to the i+1th access page address prediction value, and obtain the page resource to be cached;
    将所述待缓存的页面资源存储到所述本地缓存。storing the page resources to be cached in the local cache.
  10. 根据权利要求9所述的计算机设备,其中,所述根据所述待预测的用户标识获取目标用户画像的步骤,包括:The computer device according to claim 9, wherein the step of obtaining a target user portrait according to the user identifier to be predicted comprises:
    调用页面预测接口,将所述待预测的用户标识输入用户画像模型,获取所述用户画像模型输出的目标用户画像,其中,所述用户画像模型根据所述待预测的用户标识获取待画像的用户数据,根据所述待画像的用户数据进行用户画像,得到所述目标用户画像。calling the page prediction interface, inputting the user identification to be predicted into the user portrait model, and obtaining the target user portrait output by the user portrait model, wherein the user portrait model obtains the user to be profiled according to the user identification to be predicted Data, perform user portrait according to the user data to be portraited, and obtain the target user portrait.
  11. 根据权利要求9所述的计算机设备,其中,所述将所述第i+1次访问页面地址预测值在本地缓存中进行查找的步骤,包括:The computer device according to claim 9, wherein the step of searching the i+1th access page address prediction value in a local cache comprises:
    将所述第i+1次访问页面地址预测值在所述本地缓存中进行查找;Searching the predicted value of the i+1th access page address in the local cache;
    当没有查找到页面地址时,确定在所述本地缓存中未查找到缓存结果;When the page address is not found, it is determined that no cached result is found in the local cache;
    当查找到页面地址时,根据所述第i+1次访问页面地址预测值从所述服务端获取版本标识,得到待缓存的版本标识,将所述本地缓存中的所述第i+1次访问页面地址预测值对应的页面资源的版本标识作为本地缓存版本标识;When the page address is found, obtain the version identifier from the server according to the i+1th access page address prediction value, obtain the version identifier to be cached, and store the i+1th access in the local cache The version identifier of the page resource corresponding to the predicted value of the accessed page address is used as the local cache version identifier;
    将所述待缓存的版本标识与所述本地缓存版本标识进行对比;comparing the version identifier to be cached with the locally cached version identifier;
    当所述待缓存的版本标识与所述本地缓存版本标识相同时,确定在所述本地缓存中查找到缓存结果;When the version identifier to be cached is the same as the local cache version identifier, determine that a cached result is found in the local cache;
    当所述待缓存的版本标识与所述本地缓存版本标识不相同时,确定在所述本地缓存中未查找到缓存结果。When the version identifier to be cached is different from the local cache version identifier, it is determined that no cached result is found in the local cache.
  12. 根据权利要求9所述的计算机设备,其中,所述根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源的步骤,包括:The computer device according to claim 9, wherein the step of obtaining page resources from the server according to the i+1th access page address prediction value to obtain page resources to be cached includes:
    根据所述第i+1次访问页面地址预测值生成页面资源获取请求,将所述页面资源获取请求发送给所述服务端;Generate a page resource acquisition request according to the predicted value of the i+1th access page address, and send the page resource acquisition request to the server;
    获取所述服务端根据所述页面资源获取请求发送的页面资源作为所述待缓存的页面资源。Acquire the page resource sent by the server according to the page resource acquisition request as the page resource to be cached.
  13. 根据权利要求9所述的计算机设备,其中,所述获取第i次访问页面的页面加载完成信号的步骤之后,还包括:The computer device according to claim 9, wherein, after the step of obtaining the page loading completion signal of the i-th accessed page, further comprising:
    根据所述待预测的用户标识和所述第i次访问页面地址真实值获取第i-1访问的页面的页面地址真实值,得到第i-1访问页面地址真实值;Obtain the real value of the page address of the i-1th visited page according to the user identifier to be predicted and the real value of the i-th visited page address, and obtain the real value of the i-1th visited page address;
    根据所述待预测的用户标识获取待预测的用户画像;Obtaining a user portrait to be predicted according to the user identifier to be predicted;
    根据所述第i-1访问页面地址真实值、所述第i次访问页面地址真实值和所述待预测的用户画像对第二预设页面预测模型进行训练;Training a second preset page prediction model according to the actual value of the i-1th visited page address, the true value of the i-th visited page address, and the user portrait to be predicted;
    根据训练后的所述第二预设页面预测模型更新所述第一预设页面预测模型。Updating the first preset page prediction model according to the trained second preset page prediction model.
  14. 根据权利要求13所述的计算机设备,其中,所述根据所述第i-1访问页面地址真实值、所述第i次访问页面地址真实值和所述待预测的用户画像对第二预设页面预测模型进行训练的步骤,包括:The computer device according to claim 13, wherein, the second preset according to the real value of the i-1th visited page address, the real value of the i-th visited page address and the user portrait to be predicted The steps of training the page prediction model include:
    将所述第i次访问页面地址真实值作为第i次访问页面标定值;Using the real value of the i-th visit page address as the i-th visit page calibration value;
    将所述待预测的用户画像和所述第i-1访问页面地址真实值输入所述第二预设页面预测模型进行第i次访问的页面地址预测,得到第i访问页面地址预测值;Inputting the user portrait to be predicted and the actual value of the i-1th visited page address into the second preset page prediction model to predict the page address of the i-th visited page, and obtain the predicted value of the i-th visited page address;
    根据所述第i访问页面地址预测值和所述第i次访问页面标定值对所述第二预设页面预测模型进行训练。The second preset page prediction model is trained according to the i-th access page address prediction value and the i-th access page calibration value.
  15. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下方法步骤:A computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the following method steps are implemented:
    获取第i次访问页面的页面加载完成信号,所述页面加载完成信号携带有待预测的用户标识和第i次访问页面地址真实值;Acquiring the page loading completion signal of the i-th visit page, the page loading completion signal carrying the user identifier to be predicted and the real value of the i-th visit page address;
    响应所述页面加载完成信号,根据所述待预测的用户标识获取目标用户画像;Responding to the page loading completion signal, acquiring a target user portrait according to the user identifier to be predicted;
    采用第一预设页面预测模型,根据所述第i次访问页面地址真实值和所述目标用户画像进行第i+1次访问的页面地址预测,得到第i+1次访问页面地址预测值;Using the first preset page prediction model, predicting the page address of the i+1th visit according to the real value of the page address of the ith visit and the target user portrait, to obtain the predicted value of the page address of the i+1th visit;
    将所述第i+1次访问页面地址预测值在本地缓存中进行查找;Searching the predicted value of the i+1th access page address in the local cache;
    当未查找到缓存结果时,根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源;When the cache result is not found, obtain the page resource from the server according to the i+1th access page address prediction value, and obtain the page resource to be cached;
    将所述待缓存的页面资源存储到所述本地缓存。storing the page resources to be cached in the local cache.
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述根据所述待预测的用户标识获取目标用户画像的步骤,包括:The computer-readable storage medium according to claim 15, wherein the step of acquiring a target user portrait according to the user identifier to be predicted comprises:
    调用页面预测接口,将所述待预测的用户标识输入用户画像模型,获取所述用户画像模型输出的目标用户画像,其中,所述用户画像模型根据所述待预测的用户标识获取待画像的用户数据,根据所述待画像的用户数据进行用户画像,得到所述目标用户画像。calling the page prediction interface, inputting the user identification to be predicted into the user portrait model, and obtaining the target user portrait output by the user portrait model, wherein the user portrait model obtains the user to be profiled according to the user identification to be predicted Data, perform user portrait according to the user data to be portraited, and obtain the target user portrait.
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述将所述第i+1次访问页面地址预测值在本地缓存中进行查找的步骤,包括:The computer-readable storage medium according to claim 15, wherein the step of looking up the i+1th access page address prediction value in a local cache comprises:
    将所述第i+1次访问页面地址预测值在所述本地缓存中进行查找;Searching the predicted value of the i+1th access page address in the local cache;
    当没有查找到页面地址时,确定在所述本地缓存中未查找到缓存结果;When the page address is not found, it is determined that no cached result is found in the local cache;
    当查找到页面地址时,根据所述第i+1次访问页面地址预测值从所述服务端获取版本标识,得到待缓存的版本标识,将所述本地缓存中的所述第i+1次访问页面地址预测值对应的页面资源的版本标识作为本地缓存版本标识;When the page address is found, obtain the version identifier from the server according to the i+1th access page address prediction value, obtain the version identifier to be cached, and store the i+1th access in the local cache The version identifier of the page resource corresponding to the predicted value of the accessed page address is used as the local cache version identifier;
    将所述待缓存的版本标识与所述本地缓存版本标识进行对比;comparing the version identifier to be cached with the locally cached version identifier;
    当所述待缓存的版本标识与所述本地缓存版本标识相同时,确定在所述本地缓存中查找到缓存结果;When the version identifier to be cached is the same as the local cache version identifier, determine that a cached result is found in the local cache;
    当所述待缓存的版本标识与所述本地缓存版本标识不相同时,确定在所述本地缓存中未查找到缓存结果。When the version identifier to be cached is different from the local cache version identifier, it is determined that no cached result is found in the local cache.
  18. 根据权利要求15所述的计算机可读存储介质,其中,所述根据所述第i+1次访问页面地址预测值从服务端获取页面资源,得到待缓存的页面资源的步骤,包括:The computer-readable storage medium according to claim 15, wherein the step of obtaining page resources from the server according to the predicted value of the i+1th access page address, and obtaining the page resources to be cached comprises:
    根据所述第i+1次访问页面地址预测值生成页面资源获取请求,将所述页面资源获取请求发送给所述服务端;Generate a page resource acquisition request according to the predicted value of the i+1th access page address, and send the page resource acquisition request to the server;
    获取所述服务端根据所述页面资源获取请求发送的页面资源作为所述待缓存的页面资源。Acquire the page resource sent by the server according to the page resource acquisition request as the page resource to be cached.
  19. 根据权利要求15所述的计算机可读存储介质,其中,所述获取第i次访问页面的页面加载完成信号的步骤之后,还包括:The computer-readable storage medium according to claim 15, wherein, after the step of obtaining the page loading completion signal of the i-th accessed page, further comprising:
    根据所述待预测的用户标识和所述第i次访问页面地址真实值获取第i-1访问的页面的页面地址真实值,得到第i-1访问页面地址真实值;Obtain the real value of the page address of the i-1th visited page according to the user identifier to be predicted and the real value of the i-th visited page address, and obtain the real value of the i-1th visited page address;
    根据所述待预测的用户标识获取待预测的用户画像;Obtaining a user portrait to be predicted according to the user identifier to be predicted;
    根据所述第i-1访问页面地址真实值、所述第i次访问页面地址真实值和所述待预测的用户画像对第二预设页面预测模型进行训练;Training a second preset page prediction model according to the actual value of the i-1th visited page address, the true value of the i-th visited page address, and the user portrait to be predicted;
    根据训练后的所述第二预设页面预测模型更新所述第一预设页面预测模型。Updating the first preset page prediction model according to the trained second preset page prediction model.
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述根据所述第i-1访问页面地址真实值、所述第i次访问页面地址真实值和所述待预测的用户画像对第二预设页面预测模型进行训练的步骤,包括:The computer-readable storage medium according to claim 19, wherein, according to the actual value of the address of the i-1th accessed page, the actual value of the address of the i-th accessed page, and the user portrait to be predicted for the first Two preset steps for training the page prediction model, including:
    将所述第i次访问页面地址真实值作为第i次访问页面标定值;Using the real value of the i-th visit page address as the i-th visit page calibration value;
    将所述待预测的用户画像和所述第i-1访问页面地址真实值输入所述第二预设页面预测模型进行第i次访问的页面地址预测,得到第i访问页面地址预测值;Inputting the user portrait to be predicted and the actual value of the i-1th visited page address into the second preset page prediction model to predict the page address of the i-th visited page, and obtain the predicted value of the i-th visited page address;
    根据所述第i访问页面地址预测值和所述第i次访问页面标定值对所述第二预设页面预测模型进行训练。The second preset page prediction model is trained according to the i-th access page address prediction value and the i-th access page calibration value.
PCT/CN2021/109049 2021-06-28 2021-07-28 Page resource caching method and apparatus, device, and medium WO2023272858A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110722084.X 2021-06-28
CN202110722084.XA CN113419784A (en) 2021-06-28 2021-06-28 Page resource caching method, device, equipment and medium

Publications (1)

Publication Number Publication Date
WO2023272858A1 true WO2023272858A1 (en) 2023-01-05

Family

ID=77717808

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/109049 WO2023272858A1 (en) 2021-06-28 2021-07-28 Page resource caching method and apparatus, device, and medium

Country Status (2)

Country Link
CN (1) CN113419784A (en)
WO (1) WO2023272858A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383537A (en) * 2023-05-23 2023-07-04 飞狐信息技术(天津)有限公司 Page data preloading method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150200994A1 (en) * 2012-05-29 2015-07-16 Google Inc. Preloading resources of a web page
CN108280125A (en) * 2017-12-12 2018-07-13 腾讯科技(深圳)有限公司 Method, apparatus, storage medium and the electronic device that the page is shown
CN112073405A (en) * 2020-09-03 2020-12-11 中国平安财产保险股份有限公司 Webpage data loading method and device, computer equipment and storage medium
CN112612982A (en) * 2021-01-05 2021-04-06 上海哔哩哔哩科技有限公司 Webpage preloading method and device and computer equipment
CN112905939A (en) * 2021-02-25 2021-06-04 平安普惠企业管理有限公司 HTML5 page resource loading method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107864173A (en) * 2017-06-26 2018-03-30 平安普惠企业管理有限公司 Terminal page caching method, system and readable storage medium storing program for executing
CN111639289B (en) * 2020-05-13 2024-02-23 北京三快在线科技有限公司 Webpage loading method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150200994A1 (en) * 2012-05-29 2015-07-16 Google Inc. Preloading resources of a web page
CN108280125A (en) * 2017-12-12 2018-07-13 腾讯科技(深圳)有限公司 Method, apparatus, storage medium and the electronic device that the page is shown
CN112073405A (en) * 2020-09-03 2020-12-11 中国平安财产保险股份有限公司 Webpage data loading method and device, computer equipment and storage medium
CN112612982A (en) * 2021-01-05 2021-04-06 上海哔哩哔哩科技有限公司 Webpage preloading method and device and computer equipment
CN112905939A (en) * 2021-02-25 2021-06-04 平安普惠企业管理有限公司 HTML5 page resource loading method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383537A (en) * 2023-05-23 2023-07-04 飞狐信息技术(天津)有限公司 Page data preloading method, device, equipment and storage medium
CN116383537B (en) * 2023-05-23 2023-09-08 飞狐信息技术(天津)有限公司 Page data preloading method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113419784A (en) 2021-09-21

Similar Documents

Publication Publication Date Title
CN101427229B (en) Technique for modifying presentation of information displayed to end users of a computer system
US8413042B2 (en) Referrer-based website personalization
US8527585B2 (en) Prereading method and system for web browser
US20020156803A1 (en) Method for extracting digests, reformatting, and automatic monitoring of structured online documents based on visual programming of document tree navigation and transformation
CN103685604B (en) A kind of domain name pre-parsed method and device
US6728712B1 (en) System for updating internet address changes
CN106294379A (en) The loading method of a kind of page, device and system
US20040255003A1 (en) System and method for reordering the download priority of markup language objects
CN112905939B (en) HTML5 page resource loading method, device, equipment and storage medium
US20210200767A1 (en) Asynchronous Predictive Caching Of Content Listed In Search Results
US20230409398A1 (en) Resource pre-fetch using age threshold
CN111431767B (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
WO2023272858A1 (en) Page resource caching method and apparatus, device, and medium
CN113065940A (en) Invoice reimbursement method, device, equipment and storage medium based on artificial intelligence
CN115061686A (en) Page display method and device based on user tags and electronic equipment
CN111464521A (en) Method, device, computer equipment and storage medium for preventing domain name from being hijacked
US7254542B2 (en) Portal data passing through non-persistent browser cookies
CN113282354A (en) H5 page loading method, device, equipment and storage medium of application program
CN112433784A (en) Page loading method, device, equipment and storage medium
CN111368056B (en) Ancient poetry generating method and device
CN114827271A (en) Multi-level cache online control method and related device
CN112667914B (en) Content matrix display method, device and system based on neural network
CN114610973A (en) Information search matching method and device, computer equipment and storage medium
US11132415B1 (en) Dynamically creating custom hyperlinks for predefined search queries for multiple websites
US9172739B2 (en) Anticipating domains used to load a web page

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21947800

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE