Resource recommendation method, device, equipment and storage medium

By generating pre-recommendation tasks in the recommendation system and dynamically adjusting them based on real-time load data, the problems of low efficiency and load imbalance in the existing system are solved, and efficient and stable resource recommendations are achieved.

CN119807527BActive Publication Date: 2025-09-23BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411875565.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-09-23
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

Existing recommendation systems are inefficient and slow to respond when processing computationally complex links, and are prone to performance issues under load imbalance, affecting user experience.

Method used

By generating pre-recommendation tasks based on historical user access data and writing the relationship between them and the estimated access time into a distributed memory database, the number of tasks is dynamically adjusted based on real-time load data, and the resource recommendation service is called to execute pre-recommendation tasks, thus optimizing the resource recommendation process.

Benefits of technology

The response efficiency and system stability of resource recommendations have been improved, and efficient resource recommendation performance can be maintained under different load conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807527B_ABST
    Figure CN119807527B_ABST
Patent Text Reader

Abstract

The present disclosure provides a resource recommendation method, apparatus, device, and storage medium, which relate to technical fields such as deep learning and natural language processing, and can be applied to scenarios such as intelligent search. The method comprises: determining an estimated access time for a first user based on the first user's historical access data, generating a pre-recommendation task based on the estimated access time, and writing the association between the pre-recommendation task and the estimated access time into a distributed memory database; based on the real-time load data of a resource recommendation service, calling the resource recommendation service to execute the pre-recommendation task to obtain a pre-recommended resource, and storing the association between the first user and the pre-recommended resource; and performing resource recommendation based on the association between the first user and the pre-recommended resource.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of computer technology, particularly artificial intelligence, deep learning, natural language processing, and other technical fields, and can be applied to intelligent search scenarios. Specifically, it relates to a resource recommendation method, apparatus, device, and storage medium. Background Art

[0002] In today's digital age, personalized recommendation systems have become a core means of improving user experience and enhancing user engagement. However, recommendation systems face the dual challenges of efficiency and responsiveness. Users often have to wait for a long time to receive recommendations, and when dealing with complex computational links, they may even encounter difficulties in providing recall resources. These problems have a serious negative impact on user experience. Summary of the Invention

[0003] The present disclosure provides a resource recommendation method, apparatus, device, and storage medium.

[0004] According to one aspect of the present disclosure, a resource recommendation method is provided, comprising:

[0005] Determining an estimated access time for the first user based on the first user's historical access data, generating a pre-recommended task based on the estimated access time, and writing an association between the pre-recommended task and the estimated access time into a distributed memory database;

[0006] According to real-time load data of the resource recommendation service, calling the resource recommendation service to execute the pre-recommendation task to obtain pre-recommended resources, and storing an association relationship between the first user and the pre-recommended resources;

[0007] Based on the association relationship between the first user and the pre-recommended resource, a resource recommendation is performed.

[0008] According to one aspect of the present disclosure, a resource recommendation device is provided, comprising:

[0009] a pre-recommendation task module, configured to determine an estimated access time for a first user based on the first user's historical access data, generate a pre-recommendation task based on the estimated access time, and write an association between the pre-recommendation task and the estimated access time into a distributed memory database;

[0010] a pre-recommended resource module, configured to call the resource recommendation service to execute the pre-recommendation task to obtain pre-recommended resources based on real-time load data of the resource recommendation service, and store an association between the first user and the pre-recommended resources;

[0011] The resource recommendation module is used to recommend resources based on the association relationship between the first user and the pre-recommended resources.

[0012] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method provided by any embodiment of the present disclosure.

[0016] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method provided by any embodiment of the present disclosure.

[0017] According to another aspect of the present disclosure, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the computer program implements the method provided according to any embodiment of the present disclosure.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flow chart of a resource recommendation method provided according to an embodiment of the present disclosure;

[0020] Figure 2 is a flowchart of another resource recommendation method provided according to an embodiment of the present disclosure;

[0021] Figure 3a is a flowchart of another resource recommendation method provided according to an embodiment of the present disclosure;

[0022] Figure 3b is an example diagram of a resource recommendation method provided according to an embodiment of the present disclosure;

[0023] Figure 4 is a structural diagram of a resource recommendation device provided according to an embodiment of the present disclosure;

[0024] Figure 5 It is a block diagram of an electronic device used to implement the resource recommendation method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] Figure 1 This is a flow chart of a resource recommendation method provided according to an embodiment of the present disclosure. The method is applicable to the case where resources to be recommended are preloaded for users. The method can be executed by a resource recommendation device, which can be implemented in software and / or hardware and can be integrated into an electronic device. Figure 1 As shown, the resource recommendation method of this embodiment may include:

[0026] S101, determining an estimated access time for a first user based on the first user's historical access data, generating a pre-recommended task based on the estimated access time, and writing an association between the pre-recommended task and the estimated access time into a distributed in-memory database;

[0027] S102: Based on real-time load data of a resource recommendation service, calling the resource recommendation service to execute the pre-recommendation task to obtain pre-recommended resources, and storing an association between the first user and the pre-recommended resources;

[0028] S103: Recommend resources based on the association relationship between the first user and the pre-recommended resources.

[0029] In an embodiment of the present disclosure, historical access data of each user can be obtained from the log system of a specified search engine or a specified application, and the estimated access time of each user can be obtained by predicting the access time based on the historical access data of each user. For example, multiple time periods can be divided, and the historical access frequency of each user in each time period can be determined based on the historical access time of each user, and the time period with the highest historical access frequency can be used as the estimated access time of the user; or, the resources of interest to the user can be determined based on the historical search terms of each user in the historical access process, and the estimated access time can be determined based on the time corresponding to the resources of interest. For example, if it is determined based on the historical search terms of a user that the user is interested in the live broadcast of a certain sports event, the live broadcast time of the sports event can be used as the estimated access time.

[0030] The first user may refer to a user who is about to access a specified search engine or a specified application within a certain length of time in the future, such as within the next 6 hours. For each first user, a pre-recommendation task can be generated for the first user based on the estimated access time, and the correlation between the pre-recommendation task and the estimated access time can be written into a distributed memory database such as a Redis (Remote Dictionary Serve) database, which is used to start resource calculation before the first user actually accesses, thereby improving the response efficiency to the first user's actual access request. However, recalling the pre-recommended resources for each first user in advance may increase the computational complexity of the resource recommendation service; moreover, the resource recommendation service not only needs to process each pre-recommendation task in advance, but more importantly, it needs to process the actual access requests of online users. In particular, in the case of unbalanced load, it is easy for the resource recommendation service to have performance problems under high load, such as slow response, crash, etc., thereby affecting the stability and reliability of the resource recommendation service.

[0031] In an embodiment of the present disclosure, the CPU usage rate, memory occupancy and other indicators of the resource recommendation service can be monitored in real time to obtain real-time load data of the resource recommendation service, and the number of pre-recommendation tasks read from the distributed memory database can be adjusted according to the real-time load data, and the resource recommendation service can be called to execute the pre-recommendation tasks read to obtain pre-recommendation resources. For example, the first user's behavioral preferences, points of interest, etc. are feature-encoded to obtain the first user's features, and each existing resource in the resource library is feature-encoded to obtain each existing resource feature. The semantic similarity between each first user feature and each existing resource feature is determined, and multiple existing resources with relatively high semantic similarity are selected as the pre-recommended resources for the first user. It should be noted that the embodiment of the present disclosure does not specifically limit the resource recommendation service. For example, in a text-image scenario, a generative large model can be used to generate a new image for the first user based on the first user's behavioral preferences, points of interest, and text descriptions input by the first user, as the pre-recommended resources for the first user.

[0032] Furthermore, the association between the first user and the pre-recommended resources can be recorded. When the first user actually accesses the service, the pre-recommended resources for the first user can be determined directly based on the association between the first user and the pre-recommended resources, and the corresponding pre-recommended resources can be fed back to the first user. By monitoring the CPU usage, memory usage, and other indicators of the resource recommendation service in real time, and dynamically adjusting the number of pre-recommended tasks read from the distributed memory database based on real-time load data, that is, implementing a "peak shaving and valley filling" strategy, the stability and efficiency of the service can be significantly improved, and the performance of the resource recommendation service when dealing with different loads can also be improved.

[0033] The technical solution provided by the embodiment of the present disclosure generates pre-recommendation tasks for the first user based on the first user's historical access data before the first user actually visits, and dynamically adjusts the number of pre-recommendation tasks read according to the real-time load data of the resource recommendation service, and calls the resource recommendation service to execute the read pre-recommendation tasks to obtain pre-recommendation resources. When the first user actually visits, the pre-recommendation resources calculated in advance can be directly fed back, which not only improves the response efficiency to the first user's actual access request, but also improves the performance of the resource recommendation service when dealing with different loads.

[0034] Figure 2 This is a flow chart of another resource recommendation method provided according to an embodiment of the present disclosure. Figure 2 Based on the above embodiment, the resource recommendation method of this embodiment may include:

[0035] S201, determining an estimated access time for a first user based on the first user's historical access data, generating a pre-recommended task based on the estimated access time, and writing an association between the pre-recommended task and the estimated access time into a distributed in-memory database;

[0036] S202, determining a first quantity according to real-time load data of the resource recommendation service;

[0037] S203, reading the first number of pre-recommended tasks from the distributed memory database; continuing to execute S204 or jumping to execute S205;

[0038] S204: In response to determining that the read pre-recommended task has not expired based on the estimated access time of the pre-recommended task and that the real-time load data meets the pre-recommendation requirement, calling the resource recommendation service to execute the read pre-recommended task to obtain the pre-recommended resource; then jumping to S206;

[0039] S205 , in response to determining that the read pre-recommended tasks have not expired based on the estimated access time of the pre-recommended tasks, and the real-time load data does not meet the pre-recommendation requirement, storing each read pre-recommended task in a message queue; and continuing to S206 ;

[0040] S206: Recommend resources based on the association relationship between the first user and the pre-recommended resources.

[0041] In an embodiment of the present disclosure, the estimated access time of each first user can be obtained by predicting the visit time based on the historical access data of each first user, a pre-recommended task can be generated based on the estimated access time, and the correlation between the pre-recommended task and the estimated access time can be written into a distributed memory database. It is also possible to monitor the CPU usage, memory occupancy and other indicators of the resource recommendation service in real time to obtain the real-time load data of the resource recommendation service, and calculate the first quantity based on the real-time load data. For example, when the t-th first quantity has been calculated, the first coefficient can be calculated based on the real-time load data, and the calculated t-th first quantity can be scaled using the first coefficient to obtain the t+1-th first quantity, that is, to update the first quantity. The first coefficient is negatively correlated with the real-time load data.

[0042] Exemplarily, a first number of pre-recommended tasks are read from a distributed memory database, that is, each pre-recommended task read is deleted from the distributed memory database. For each pre-recommended task read, whether the pre-recommended task is overdue is determined based on the estimated access time and current time of the pre-recommended task; if overdue, the pre-recommended task is discarded; if not overdue, whether the real-time load data of the resource recommendation service meets the pre-recommendation requirements is determined, for example, whether the real-time load data is less than a preset load threshold value, such as 80%; if the pre-recommendation requirements are met, the resource recommendation service is called to execute the read pre-recommended task to obtain the corresponding pre-recommended resource, and the association relationship between the first user and the corresponding pre-recommended resource can be recorded in the cache. If the pre-recommendation requirements are not met, the read pre-recommended task is stored in the message queue and not processed temporarily, that is, the message queue is used as a buffer for the pre-recommended task, which can temporarily store tasks when the system load is high to avoid task loss. It should be noted that if the pre-recommendation requirements are not met, the first quantity can be gradient-scaled according to the corresponding real-time load data.

[0043] By generating a pre-recommended task for each first user based on their historical access data, and writing the relationship between the pre-recommended task and the estimated access time into a distributed memory database; and determining a first quantity based on real-time load data, and reading the first quantity of pre-recommended tasks from the distributed memory database; and intelligently scheduling resource recommendation tasks by determining whether the pre-recommended task has expired and whether the real-time load data meets the requirements, effectively avoiding the processing of expired tasks. When the load permits, the resource recommendation service is called in a timely manner to determine and cache the relationship between the first user and the pre-recommended resources; when the load is too high, the pre-recommended tasks are stored in the message queue, which can improve system stability and achieve a balance between efficient and accurate resource recommendations and system load.

[0044] In an optional embodiment, determining the first quantity based on the real-time load data of the resource recommendation service includes: in response to determining that the real-time load data is less than a preset first load threshold and greater than a preset second load threshold, determining the first quantity based on the real-time load data of the resource recommendation service. Exemplarily, in response to determining that the real-time load data is less than the preset first load threshold and greater than a preset second load threshold, for example, less than 80% and greater than 40%, determining the first quantity based on the real-time load data of the resource recommendation service.

[0045] In an optional embodiment, calling the resource recommendation service to execute the pre-recommendation task to obtain the pre-recommendation resource based on the real-time load data of the resource recommendation service also includes: determining a second quantity based on the real-time load data; reading the second quantity of pre-recommendation tasks from the message queue; in response to determining that the read pre-recommendation task has not expired based on the estimated access time of the pre-recommendation task, and the real-time load data meets the pre-recommendation requirement, calling the resource recommendation service to execute the pre-recommendation task read from the message queue to obtain the pre-recommendation resource; in response to determining that the read pre-recommendation task has not expired based on the estimated access time of the pre-recommendation task, and the real-time load data does not meet the pre-recommendation requirement, discarding each pre-recommendation task read from the message queue.

[0046] In the embodiment of the present disclosure, not only the first quantity but also the second quantity is determined based on the real-time load data. The second number of pre-recommended tasks is read from the message queue, that is, each pre-recommended task read is deleted from the message queue. For each pre-recommended task read from the message queue, it is determined whether the pre-recommended task is overdue based on the estimated access time and current time of the pre-recommended task; if it is overdue, the pre-recommended task is discarded; if it is not overdue, it is determined whether the real-time load data of the resource recommendation service meets the pre-recommendation requirements. If the pre-recommendation requirements are met, the resource recommendation service is called to execute the read pre-recommendation task to obtain the corresponding pre-recommended resource, and the association relationship between the first user and the corresponding pre-recommended resource can be recorded in the cache. If the pre-recommendation requirements are not met, the pre-recommended task read from the message queue is discarded. By also determining the second number based on the real-time load data and reading the second number of pre-recommended tasks from the message queue; by judging whether the pre-recommended task is overdue and whether the real-time load data meets the requirements, the resource recommendation tasks are intelligently scheduled to effectively avoid the processing of expired tasks. When the load permits, the resource recommendation service is called in time to determine and cache the association between the first user and the pre-recommended resources; when the load is too high, the corresponding pre-recommendation task is discarded, further improving the efficiency of resource recommendation while taking into account load balancing.

[0047] In an optional embodiment, determining the first quantity and the second quantity based on the real-time load data includes: in response to determining that the real-time load data is less than a preset second load threshold, determining the first quantity based on the real-time load data; in response to determining that the first quantity reaches the preset first quantity threshold, determining the remaining load data based on the load data required to be consumed by the pre-recommended task of the first quantity threshold; and determining the second quantity based on the remaining load data.

[0048] In an embodiment of the present disclosure, if the real-time load data is less than a preset second load threshold, for example, 40%, a first quantity is determined based on the real-time load data. If the first quantity reaches a preset first quantity threshold, for example, 100 items, the load data required for the pre-recommended tasks of the first quantity threshold is determined, and the available remaining load data is determined based on the load data required to be consumed. The second quantity is determined in combination with the available remaining load data, thereby reading the pre-recommended tasks of the first quantity threshold from the distributed memory database, and reading the second number of pre-recommended tasks from the message queue, that is, giving priority to reading the pre-recommended tasks from the distributed memory database, and using the message queue as a buffer for the pre-recommended tasks, which can fully utilize the high-speed access and processing capabilities of the distributed memory database, and further improve resource processing efficiency.

[0049] The technical solution provided by the embodiment of the present disclosure generates a pre-recommended task for each first user based on the historical access data of each first user, and writes the correlation between the pre-recommended task and the estimated access time into a distributed memory database; and determines the first quantity and the second quantity based on real-time load data, reads the first quantity of pre-recommended tasks from the distributed memory database, and reads the second quantity of pre-recommended tasks from the message queue, that is, the pre-recommended tasks are read from the distributed memory database first, and the message queue is used as a buffer for the pre-recommended tasks. This can not only efficiently utilize the high-speed processing capability of the distributed memory database, but also flexibly respond to load changes, thereby improving the efficiency of resource recommendation.

[0050] Figure 3a This is a flowchart of another resource recommendation method provided according to an embodiment of the present disclosure. Figure 3a Based on the above embodiment, the resource recommendation method of this embodiment may include:

[0051] S301, obtaining the historical access time, historical search terms, and historical resources of the first user during the historical search process;

[0052] S302, determining the search patterns of the first user in different time periods according to the historical access times and the time period types to which the historical access times belong;

[0053] S303, determining the first user's area of ​​interest based on the historical search terms and the historical resources;

[0054] S304: Input the historical access time, the search pattern, and the field of interest into a pre-trained estimated access model to obtain the output estimated access time, generate a pre-recommended task based on the estimated access time, and write the association between the pre-recommended task and the estimated access time into a distributed in-memory database;

[0055] S305: Based on the real-time load data of the resource recommendation service, calling the resource recommendation service to execute the pre-recommendation task to obtain pre-recommended resources, and storing the association between the first user and the pre-recommended resources;

[0056] S306: Recommend resources based on the association relationship between the first user and the pre-recommended resources.

[0057] In the disclosed embodiments, for any first user, historical access data for the first user can be obtained from the log system of a designated search engine or a designated application. The historical access data includes historical access times, historical search terms carried in historical access requests, and historical resources actually accessed. Based on the first user's historical access times, the first user's access frequency in different time periods, such as weekdays, weekends, holidays, morning rush hour, and evening rush hour, is determined to identify the first user's search patterns in different time periods. The search pattern can be active or inactive, for example.

[0058] In addition, keywords in historical search terms can be extracted to determine the frequency, semantics or themes of the keywords; themes of historical resources visited by the first user, such as web pages, articles, videos, etc., can also be subject-identified to extract the main content or theme of each historical resource. The first user's field of interest is determined by combining the frequency, semantics or themes of keywords and the main content or theme of each historical resource. The first user's historical visit time, search patterns in different time periods, and fields of interest are input into a pre-trained estimated access model to obtain the first user's estimated visit time, that is, the first user's next visit time. By comprehensively analyzing the first user's historical access data in search engines or applications, including historical access time, historical search terms, and historical resource content, the user's active time period and fields of interest can be accurately identified, and then the pre-trained estimated access model is used to determine the estimated visit time for the first user, thereby improving the accuracy of obtaining the estimated visit time and providing strong support for personalized resource recommendations.

[0059] In an optional embodiment, the above method also includes: obtaining the actual access time of the first user; determining the time difference between the actual access time of the first user and the estimated access time of the first user, and performing feedback update on the estimated access model based on the time difference; wherein, the time difference is used to positively reward the estimated access model when it is less than or equal to a preset time difference threshold; and negatively punish the estimated access model when the time difference is greater than the time difference threshold.

[0060] In the embodiment of the present disclosure, a reinforcement learning algorithm can also be used to update the prediction model according to the estimated access time and actual access time output by the estimated access model, so as to continuously improve the accuracy of the model prediction through iterative learning. Exemplarily, the estimated access model is used as an agent to determine the estimated access time for each first user; obtain the actual access time of the first user; determine the time difference between the actual access time and the estimated access time, and based on the reward function, feedback update the estimated access model according to the time difference. Exemplarily, if the time difference is less than or equal to the preset time difference threshold, the estimated access model is positively rewarded; if the time difference is greater than the time difference threshold, the estimated access model is negatively penalized. By using reinforcement learning to provide positive or negative feedback to the estimated access model according to the time difference between the estimated access time and the actual access time, the model is continuously optimized, thereby more accurately predicting user access behavior.

[0061] In addition, multiple time periods may be divided, for example, into hours within a day, and the estimated access time and actual access time of each first user may be counted to obtain the following statistical results:

[0062] Estimated visits (T) Estimated no visit (F) Actual visit (T) TT TF Actually not visited (F) FT FF

[0063] The accuracy of the estimated access model is calculated as TT / (TT+FT); the recall rate is calculated as TT / (TT+TF). Specifically, the accuracy is the ratio of the number of successfully estimated time points to the total number of estimated access times, while the recall rate is the ratio of the number of successfully estimated time points to the total number of actual accesses. These accuracy and recall rates enable dynamic evaluation of the estimated access model and can also be used to trigger retraining and optimization of the estimated access model.

[0064] The technical solution provided by the embodiment of the present disclosure can accurately identify the user's active time periods and areas of interest by comprehensively analyzing the first user's historical access data in the search engine or application, including historical access time, historical search terms and historical resource content, and then use the pre-trained estimated access model to determine the estimated access time for the first user, thereby improving the accuracy of the estimated access time and providing strong support for personalized resource recommendations; and through reinforcement learning, the estimated access model is given positive or negative feedback according to the time difference between the estimated access time and the actual access time, and the model is continuously optimized, thereby further improving the accuracy of obtaining the estimated access time.

[0065] In an optional embodiment, the resource recommendation based on the association relationship between the first user and the pre-recommended resource includes: in response to receiving an actual access request from a second user, determining whether there is a pre-recommended resource associated with the second user based on the association relationship between the first user and the pre-recommended resource; in response to determining that there is a pre-recommended resource associated with the second user, feeding back the associated pre-recommended resource to the second user; in response to determining that there is no pre-recommended resource associated with the second user, generating a real-time recommendation task, and obtaining a real-time recommended resource by calling the resource recommendation service to execute the real-time recommendation task, and feeding back the real-time recommended resource to the second user.

[0066] The second user is any user who actually accesses the site. In response to the actual access request of the second user, based on the association relationship between the first user and the pre-recommended resources, it is determined whether there are pre-recommended resources associated with the second user, that is, whether the second user belongs to each first user; if so, the associated pre-recommended resources are directly fed back to the second user without calling the resource recommendation service for calculation, thereby improving the efficiency of responding to the actual access request. If not, a real-time recommendation task is generated for the second user, and the resource recommendation service is called to execute the real-time recommendation task to obtain real-time recommended resources, and the real-time recommended resources are fed back to the second user, that is, the actual access request is responded to in a timely manner and avoided to be missed, which can significantly improve the coverage of the actual access request.

[0067] refer to Figure 3bThe resource recommendation method can be specifically as follows: collect user data to obtain the historical access data of each first user; input the historical access data of each first user into a pre-trained estimated access model to obtain the estimated access time of each first user, generate a pre-recommended task based on the estimated access time, and write each pre-recommended task into a distributed memory database to start recall resource calculation before the first user actually accesses; monitor the real-time load data of the resource recommendation service; determine the first quantity based on the real-time load data, or determine the first quantity and the second quantity based on the real-time load data; obtain the first quantity of pre-recommended tasks from the distributed memory database, or obtain the first quantity of pre-recommended tasks from the distributed memory database and obtain the second quantity of pre-recommended tasks from the message queue, that is, adopt a peak shaving and valley filling strategy to schedule each pre-recommended task according to the real-time load data.

[0068] Furthermore, if the real-time load data meets the pre-recommendation requirements, the resource recommendation service is called to calculate the read pre-recommendation tasks to obtain pre-recommended resources. In response to the first user's actual access request, the pre-recommended resources are fed back to the first user to provide personalized resource recommendations for the first user. Based on the feedback mechanism, a reinforcement learning algorithm can also be used to update the estimated access model in combination with the first user's estimated access time and actual access time. Alternatively, the accuracy and recall of the estimated access model can be determined based on the first user's estimated access time and actual access time. If the accuracy and recall meet the set retraining conditions, the training set of the estimated access model is updated and the estimated access model is retrained.

[0069] Figure 4 This is a schematic diagram of the structure of a resource recommendation device provided according to an embodiment of the present disclosure. The device is suitable for preloading recommended resources for users. The device can be implemented in software and / or hardware and can be integrated into electronic devices. Figure 4 As shown, the resource recommendation device 400 of this embodiment may include:

[0070] a pre-recommendation task module 410 for determining an estimated access time for a first user based on the first user's historical access data, generating a pre-recommendation task based on the estimated access time, and writing an association between the pre-recommendation task and the estimated access time into a distributed in-memory database;

[0071] The pre-recommendation resource module 420 is configured to call the resource recommendation service to execute the pre-recommendation task based on the real-time load data of the resource recommendation service to obtain pre-recommended resources, and store the association between the first user and the pre-recommended resources;

[0072] The resource recommendation module 430 is configured to recommend resources based on the association between the first user and the pre-recommended resources.

[0073] In an optional implementation, the pre-recommendation resource module 420 includes a first pre-recommendation submodule, and the first pre-recommendation submodule includes:

[0074] a first quantity unit, configured to determine a first quantity according to real-time load data of the resource recommendation service;

[0075] A first task reading unit, configured to read the first number of pre-recommended tasks from the distributed memory database;

[0076] a first resource unit configured to, in response to determining, based on the estimated access time of the pre-recommended task, that the read pre-recommended task has not expired and the real-time load data meets the pre-recommendation requirement, call the resource recommendation service to execute the read pre-recommended task to obtain the pre-recommended resource;

[0077] The queue storing unit is configured to store each pre-recommended task read into a message queue in response to determining that the pre-recommended task read has not expired according to the estimated access time of the pre-recommended task and that the real-time load data does not meet the pre-recommendation requirement.

[0078] In an optional implementation, the pre-recommendation resource module 420 includes a second pre-recommendation submodule, and the second pre-recommendation submodule includes:

[0079] a second quantity unit, configured to further determine a second quantity according to the real-time load data;

[0080] a second task reading unit, configured to read the second number of pre-recommended tasks from the message queue;

[0081] a second resource unit configured to, in response to determining, based on the estimated access time of the pre-recommended task, that the read pre-recommended task has not expired and the real-time load data meets the pre-recommendation requirement, call the resource recommendation service to execute the pre-recommended task read from the message queue to obtain the pre-recommended resource;

[0082] The task discarding unit is configured to discard each pre-recommended task read from the message queue in response to determining that the read pre-recommended task has not expired based on the estimated access time of the pre-recommended task and the real-time load data does not meet the pre-recommendation requirement.

[0083] In an optional implementation manner, the first quantity unit is specifically used for:

[0084] In response to determining that the real-time load data is less than a preset first load threshold and greater than a preset second load threshold, the first number is determined according to the real-time load data.

[0085] In an optional embodiment, the first quantity unit is specifically configured to determine the first quantity according to the real-time load data in response to determining that the real-time load data is less than a preset second load threshold;

[0086] The second quantity unit is specifically used to determine the remaining load data based on the load data required to be consumed by the pre-recommended task of the first quantity threshold in response to determining that the first quantity reaches the preset first quantity threshold; and determine the second quantity based on the remaining load data.

[0087] In an optional implementation, the pre-recommendation task module 410 includes:

[0088] A history acquisition submodule, configured to acquire the historical access time, historical search terms, and historical resources of the first user during the historical search process;

[0089] A search mode submodule, configured to determine the search mode of the first user in different time periods according to each of the historical access times and the time period type to which each of the historical access times belongs;

[0090] an interest submodule, configured to determine the first user's area of ​​interest based on the historical search terms and the historical resources;

[0091] The pre-recommendation task submodule is used to input the historical access time, the search pattern and the field of interest into a pre-trained estimated access model to obtain the output estimated access time.

[0092] In an optional implementation, the resource recommendation device 400 further includes a model updating module; the model updating module includes:

[0093] An actual access submodule, configured to obtain the actual access time of the first user;

[0094] a model updating submodule, configured to determine a time difference between the actual access time and the estimated access time, and to perform feedback updating on the estimated access model according to the time difference;

[0095] The time difference is used to positively reward the estimated access model when the time difference is less than or equal to a preset time difference threshold; and negatively penalize the estimated access model when the time difference is greater than the time difference threshold.

[0096] In an optional implementation, the resource recommendation module 430 is specifically configured to:

[0097] In response to receiving an actual access request from a second user, determining whether there is a pre-recommended resource associated with the second user based on the association relationship between the first user and the pre-recommended resource;

[0098] In response to determining that there is a pre-recommended resource associated with the second user, feeding back the associated pre-recommended resource to the second user;

[0099] In response to determining that there is no pre-recommended resource associated with the second user, a real-time recommendation task is generated, and the real-time recommended resource is obtained by calling the resource recommendation service to execute the real-time recommendation task, and the real-time recommended resource is fed back to the second user.

[0100] The resource recommendation device provided in the embodiment of the present invention can execute the resource recommendation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0101] In the technical solutions disclosed herein, the acquisition, storage, and application of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0102] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0103] Figure 5 It is a block diagram of an electronic device used to implement the resource recommendation method according to an embodiment of the present disclosure. Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0104] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 can also be stored in the RAM 503. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0105] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0106] The computing unit 501 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as the resource recommendation method. For example, in some embodiments, the resource recommendation method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the resource recommendation method described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the resource recommendation method by any other appropriate means (e.g., by means of firmware).

[0107] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0108] like Figure 5As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 can also be stored in the RAM 503. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0109] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0110] The computing unit 501 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as the resource recommendation method. For example, in some embodiments, the resource recommendation method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the resource recommendation method described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the resource recommendation method by any other appropriate means (e.g., by means of firmware).

[0111] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0112] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0113] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0114] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, audio input, or tactile input).

[0115] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web player through which a user can interact with embodiments of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0116] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0117] Artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, audio recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.

[0118] Cloud computing refers to a technology system that provides network access to elastically scalable shared pools of physical or virtual resources. These resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on-demand in a self-service manner. Cloud computing technology provides efficient and powerful data processing capabilities for the application of technologies such as artificial intelligence and blockchain, as well as for model training.

[0119] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.

[0120] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A resource recommendation method, comprising: Determining an estimated access time for the first user based on the first user's historical access data, generating a pre-recommended task based on the estimated access time, and writing an association between the pre-recommended task and the estimated access time into a distributed memory database; determining a first quantity based on real-time load data of a resource recommendation service; Reading the first number of pre-recommended tasks from the distributed memory database; In response to determining, based on the estimated access time of the pre-recommended task, that the read pre-recommended task has not expired and the real-time load data meets the pre-recommendation requirement, calling the resource recommendation service to execute the read pre-recommended task to obtain a pre-recommended resource; In response to determining, based on the estimated access time of the pre-recommended task, that the read pre-recommended task has not expired and the real-time load data does not meet the pre-recommendation requirement, storing each read pre-recommended task in a message queue and storing an association between the first user and the pre-recommended resource; Based on the association relationship between the first user and the pre-recommended resource, a resource recommendation is performed.

2. The method according to claim 1, wherein The step of calling the resource recommendation service to execute the pre-recommendation task and obtain the pre-recommended resource according to the real-time load data of the resource recommendation service further includes: determining a second quantity based on the real-time load data; Reading the second number of pre-recommended tasks from the message queue; In response to determining, based on the estimated access time of the pre-recommended task, that the read pre-recommended task has not expired and the real-time load data meets the pre-recommendation requirement, calling the resource recommendation service to execute the pre-recommended task read from the message queue to obtain the pre-recommended resource; In response to determining that the read pre-recommended tasks have not expired according to the estimated access time of the pre-recommended tasks and the real-time load data does not meet the pre-recommendation requirement, each pre-recommended task read from the message queue is discarded.

3. The method according to claim 1, wherein The determining the first quantity according to the real-time load data of the resource recommendation service includes: In response to determining that the real-time load data is less than a preset first load threshold and greater than a preset second load threshold, the first number is determined according to the real-time load data.

4. The method according to claim 2, wherein: Determining the first quantity and the second quantity according to the real-time load data includes: In response to determining that the real-time load data is less than a preset second load threshold, determining the first quantity according to the real-time load data; In response to determining that the first quantity reaches a preset first quantity threshold, determining remaining load data based on load data required to be consumed by pre-recommended tasks corresponding to the first quantity threshold; The second number is determined based on the remaining load data.

5. The method according to claim 1, wherein Determining the estimated access time of the first user based on the historical access data of the first user includes: Obtaining historical access time, historical search terms, and historical resources of the first user during a historical search process; determining, according to each of the historical access times and the type of time period to which each of the historical access times belongs, a search pattern of the first user in different time periods; determining the first user's area of ​​interest based on the historical search terms and the historical resources; The historical access time, the search pattern and the field of interest are input into a pre-trained estimated access model to obtain the output estimated access time.

6. The method according to claim 5, further comprising: Obtaining the actual access time of the first user; Determining a time difference between the actual access time and the estimated access time, and performing feedback update on the estimated access model according to the time difference; The time difference is used to positively reward the estimated access model when the time difference is less than or equal to a preset time difference threshold; and negatively penalize the estimated access model when the time difference is greater than the time difference threshold.

7. The method according to claim 1, wherein The performing resource recommendation based on the association relationship between the first user and the pre-recommended resource includes: In response to receiving an actual access request from a second user, determining whether there is a pre-recommended resource associated with the second user based on the association relationship between the first user and the pre-recommended resource; In response to determining that there is a pre-recommended resource associated with the second user, feeding back the associated pre-recommended resource to the second user; In response to determining that there is no pre-recommended resource associated with the second user, a real-time recommendation task is generated, and the real-time recommended resource is obtained by calling the resource recommendation service to execute the real-time recommendation task, and the real-time recommended resource is fed back to the second user.

8. A resource recommendation device, comprising: a pre-recommendation task module, configured to determine an estimated access time for a first user based on the first user's historical access data, generate a pre-recommendation task based on the estimated access time, and write an association between the pre-recommendation task and the estimated access time into a distributed memory database; a pre-recommended resource module, configured to call the resource recommendation service to execute the pre-recommendation task to obtain pre-recommended resources based on real-time load data of the resource recommendation service, and store an association between the first user and the pre-recommended resources; a resource recommendation module, configured to recommend resources based on the association between the first user and the pre-recommended resources; The pre-recommendation resource module includes a first pre-recommendation submodule, and the first pre-recommendation submodule includes: a first quantity unit, configured to determine a first quantity according to real-time load data of the resource recommendation service; A first task reading unit, configured to read the first number of pre-recommended tasks from the distributed memory database; a first resource unit configured to, in response to determining, based on the estimated access time of the pre-recommended task, that the read pre-recommended task has not expired and the real-time load data meets the pre-recommendation requirement, call the resource recommendation service to execute the read pre-recommended task to obtain the pre-recommended resource; The queue storing unit is configured to store each pre-recommended task read into a message queue in response to determining that the pre-recommended task read has not expired according to the estimated access time of the pre-recommended task and that the real-time load data does not meet the pre-recommendation requirement.

9. The device according to claim 8, wherein The pre-recommendation resource module includes a second pre-recommendation submodule, and the second pre-recommendation submodule includes: a second quantity unit, configured to determine a second quantity according to the real-time load data; a second task reading unit, configured to read the second number of pre-recommended tasks from the message queue; a second resource unit configured to, in response to determining, based on the estimated access time of the pre-recommended task, that the read pre-recommended task has not expired and the real-time load data meets the pre-recommendation requirement, call the resource recommendation service to execute the pre-recommended task read from the message queue to obtain the pre-recommended resource; The task discarding unit is configured to discard each pre-recommended task read from the message queue in response to determining that the read pre-recommended task has not expired based on the estimated access time of the pre-recommended task and the real-time load data does not meet the pre-recommendation requirement.

10. The device according to claim 8, wherein The first quantity unit is specifically used for: In response to determining that the real-time load data is less than a preset first load threshold and greater than a preset second load threshold, the first number is determined according to the real-time load data.

11. The device according to claim 9, wherein The first quantity unit is specifically configured to determine the first quantity according to the real-time load data in response to determining that the real-time load data is less than a preset second load threshold; The second quantity unit is specifically used to determine the remaining load data based on the load data required to be consumed by the pre-recommended task of the first quantity threshold in response to determining that the first quantity reaches the preset first quantity threshold; and determine the second quantity based on the remaining load data.

12. The device according to claim 8, wherein The pre-recommendation task module includes: A history acquisition submodule, configured to acquire the historical access time, historical search terms, and historical resources of the first user during the historical search process; A search mode submodule, configured to determine the search mode of the first user in different time periods according to each of the historical access times and the time period type to which each of the historical access times belongs; an interest submodule, configured to determine the first user's area of ​​interest based on the historical search terms and the historical resources; The pre-recommendation task submodule is used to input the historical access time, the search pattern and the field of interest into a pre-trained estimated access model to obtain the output estimated access time.

13. The apparatus according to claim 12, further comprising a model updating module; the model updating module comprising: An actual access submodule, configured to obtain the actual access time of the first user; a model updating submodule, configured to determine a time difference between the actual access time and the estimated access time, and to perform feedback updating on the estimated access model according to the time difference; The time difference is used to positively reward the estimated access model when the time difference is less than or equal to a preset time difference threshold; and negatively penalize the estimated access model when the time difference is greater than the time difference threshold.

14. The device according to claim 8, wherein The resource recommendation module is specifically used to: In response to receiving an actual access request from a second user, determining whether there is a pre-recommended resource associated with the second user based on the association relationship between the first user and the pre-recommended resource; In response to determining that there is a pre-recommended resource associated with the second user, feeding back the associated pre-recommended resource to the second user; In response to determining that there is no pre-recommended resource associated with the second user, a real-time recommendation task is generated, and the real-time recommended resource is obtained by calling the resource recommendation service to execute the real-time recommendation task, and the real-time recommended resource is fed back to the second user.

15. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.

17. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Resource recommendation method and device, electronic equipment and storage medium

    CN116450901A

  • Method, device and storage medium for knowledge recommendation

    WO2023272530A1