Data processing method and device for media page, computer device and storage medium
By determining the cache update method based on media set identifiers and access popularity values, only the necessary media page content modules are updated, which solves the problem of server traffic pressure when popular media is updated, and improves server response speed and page access smoothness.
Patent Information
- Application Number
- CN202210962763.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-11
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-08-11
AI Technical Summary
When popular media pages are updated, traditional media websites need to frequently update cached page data on their servers, resulting in high traffic pressure and causing website lag or crashes.
By obtaining the media set identifier of the target media, querying the access popularity value and media category, the cache update method of the target content module is determined, and only the necessary cached media data is updated.
This reduces server traffic load, improves response speed, and makes media page access smoother.
Smart Images

Figure CN117640758B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for processing media pages. Background Technology
[0002] With the development of computer technology, browsing media pages to obtain media information has become an indispensable part of people's lives.
[0003] In traditional technology, major media websites typically cache the entire page data of a media page. When some content on a media page needs to be updated, the cached page data also needs to be updated. For example, major media websites usually cache the entire page data of a video's details page. When some content on the video's details page needs to be updated, the cached page data also needs to be updated. When popular media pages are updated, a large number of users access the popular media pages at the same time. In order to fetch the latest data from the media pages, the server needs to frequently update the cached page data, which will put a lot of traffic pressure on the server, causing the media website to lag or even crash. Summary of the Invention
[0004] Therefore, it is necessary to provide a data processing method, apparatus, computer device, computer-readable storage medium, and computer program product for media pages to address the aforementioned technical problems, thereby reducing server traffic pressure.
[0005] Firstly, this application provides a data processing method for a media page. The method includes:
[0006] In response to a page access request from the target media, obtain the media set identifier corresponding to the target media; the media set identifier is the identifier of the media set to which the target media belongs;
[0007] Query the access popularity value corresponding to the media set identifier;
[0008] Based on the access popularity value and the media category to which the target media belongs, determine the caching update method for the target content module in the media page of the target media;
[0009] The cached media data corresponding to the target content module is updated based on the cache update method.
[0010] Secondly, this application also provides a data processing apparatus for a media page. The apparatus includes:
[0011] The media set identifier determination module is used to obtain the media set identifier corresponding to the target media in response to a page access request of the target media; the media set identifier is the identifier of the media set to which the target media belongs;
[0012] The access popularity value determination module is used to query the access popularity value corresponding to the media set identifier;
[0013] The cache update method determination module is used to determine the cache update method of the target content module in the media page of the target media based on the access popularity value and the media category to which the target media belongs;
[0014] The data update module is used to update the cached media data corresponding to the target content module based on the cache update method.
[0015] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0016] In response to a page access request from the target media, obtain the media set identifier corresponding to the target media; the media set identifier is the identifier of the media set to which the target media belongs;
[0017] Query the access popularity value corresponding to the media set identifier;
[0018] Based on the access popularity value and the media category to which the target media belongs, determine the caching update method for the target content module in the media page of the target media;
[0019] The cached media data corresponding to the target content module is updated based on the cache update method.
[0020] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0021] In response to a page access request from the target media, obtain the media set identifier corresponding to the target media; the media set identifier is the identifier of the media set to which the target media belongs;
[0022] Query the access popularity value corresponding to the media set identifier;
[0023] Based on the access popularity value and the media category to which the target media belongs, determine the caching update method for the target content module in the media page of the target media;
[0024] The cached media data corresponding to the target content module is updated based on the cache update method.
[0025] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0026] In response to a page access request from the target media, obtain the media set identifier corresponding to the target media; the media set identifier is the identifier of the media set to which the target media belongs;
[0027] Query the access popularity value corresponding to the media set identifier;
[0028] Based on the access popularity value and the media category to which the target media belongs, determine the caching update method for the target content module in the media page of the target media;
[0029] The cached media data corresponding to the target content module is updated based on the cache update method.
[0030] The aforementioned data processing method, apparatus, computer equipment, storage medium, and computer program product for media pages involve a server responding to a page access request for target media initiated by a terminal. Based on the media set identifier of the media set to which the target media belongs, the server queries the access popularity value of the media set. Based on the access popularity value and the media category to which the media set belongs, the server determines the cache update method for the target content module within the media page of the target media, and updates the cached media data of the target content module according to the cache update method. The cache update method for the target content module is determined based on the access popularity value and the media category, making it applicable to various application scenarios with different access popularity values and different media categories. Furthermore, compared to updating the cached data of the entire media page, updating the cached media data of the target content module within the media page is more flexible, resulting in a smaller amount of data involved in updating the cache, reducing server traffic pressure, improving server response speed, and making media page access smoother. Attached Figure Description
[0031] Figure 1 This is an application environment diagram of a data processing method for a media page in one embodiment;
[0032] Figure 2 This is a flowchart illustrating a data processing method for a media page in one embodiment;
[0033] Figure 3 This is a schematic diagram illustrating the number of visits to a sports event in one embodiment;
[0034] Figure 4 This is a schematic diagram of the target time window in one embodiment;
[0035] Figure 5 This is a schematic diagram of the server structure in one embodiment;
[0036] Figure 6 This is a schematic diagram illustrating the determination of global media popularity data and local media popularity data in one embodiment;
[0037] Figure 7 This is a schematic diagram of a TV series' media page in one embodiment;
[0038] Figure 8 This is a schematic diagram illustrating the percentage of statistics obtained by counting the access volume of the global media set in one embodiment.
[0039] Figure 9 This is a schematic diagram of a media page for a sports event, as shown in one embodiment.
[0040] Figure 10 This is a flowchart illustrating a data processing method for a media page in a specific embodiment.
[0041] Figure 11 This is a schematic diagram of a data processing method for a media page in one scenario embodiment;
[0042] Figure 12 This is a schematic diagram of a data processing method for a media page, as shown in another scenario embodiment.
[0043] Figure 13 This is a structural block diagram of a data processing device for a media page in one embodiment;
[0044] Figure 14 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0046] The data processing method for media pages provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a communication network. A data storage system can store the data that server 104 needs to process. The data storage system can be a standalone device, integrated onto server 104, or integrated into the cloud or other network servers.
[0047] Terminal 102 sends a page access request for the target media to the server. Server 104 receives the page access request for the target media and obtains the media set identifier of the target media. The media set identifier is the identifier of the media set to which the target media belongs. Server 104 determines the access popularity value of the target media based on the media set identifier. Server 104 determines the cache update method of the target content module in the media page of the target media according to the access popularity value and the media category to which the target media belongs. If the cached media data corresponding to the target content module in the media page meets the cache update method, then server 104 updates the cached media data corresponding to the target content module.
[0048] The terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, IoT device, or portable wearable device. IoT devices can include smart speakers, smart TVs, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices.
[0049] Server 104 can be an independent physical server or a service node in a blockchain system. The service nodes in the blockchain system form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP).
[0050] In addition, server 104 can also be a server cluster consisting of multiple physical servers, which can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0051] Terminal 102 and server 104 can be connected via Bluetooth, USB (Universal Serial Bus) or network, etc., and this application does not impose any restrictions.
[0052] In some embodiments, such as Figure 2 As shown, a data processing method for a media page is provided. This method can be executed by a server or a terminal alone, or by both a server and a terminal. In this embodiment, the method is described using the server as an example, and includes the following steps:
[0053] Step S202: In response to the page access request of the target media, obtain the media set identifier of the target media; the media set identifier is the identifier of the media set to which the target media belongs.
[0054] The target media can be video, audio, or live stream footage. The target media can be displayed on the terminal, allowing users to view it through the terminal.
[0055] A request to access a target media page can be sent from a terminal to a server to access the media page of the target media. The media page of the target media is used to display the target media and related information about the target media. The related information about the target media may include, but is not limited to, description information of the media set and list information of the media set.
[0056] A media set includes at least one medium. If a media set includes one medium, that medium is the target medium. If a media set includes two or more media, the target medium can be any medium in the media set. For example, if the target medium is video, the media set includes at least one video; if the target medium is audio, the media set includes at least one audio; if the target medium is live video, the media set includes at least one live video belonging to the same live streaming room.
[0057] A media set identifier is a unique identifier for a media set, used to identify the media set. Two different media sets will have different media set identifiers. For example, if a media set includes multiple videos (or multiple audios), the identifier of that media set is also the media set identifier for the multiple videos (or multiple audios); if a media set includes multiple live streams belonging to the same live stream room, the identifier of that media set is also the identifier of the live stream room and the media set identifier for the multiple live streams.
[0058] Specifically, the terminal sends a page access request for the target media to the server. The server receives the page access request and obtains the media set identifier corresponding to the target media based on the page access request.
[0059] In one implementation, the page access request carries the media set identifier of the media set to which the target media belongs, and the server obtains the media set identifier carried in the page access request.
[0060] In another implementation, the page access request carries the media identifier of the target media. The server obtains the media identifier carried in the page access request and finds the media set identifier of the media set to which the target media belongs based on the media identifier.
[0061] The media identifier is a unique identifier for the target media, used to represent the identity of the target media. For a media set and the target media within that media set, the server predetermines the media set identifier for the media set and the media identifier for the target media, and associates the media set identifier with the media identifier. The server obtains the media identifier carried in the page access request, searches for the media set identifier associated with that media identifier, and obtains the media set identifier of the media set to which the target media belongs.
[0062] In one application scenario, an application's media resources comprise multiple media sets, each containing at least one media item. The terminal initiates a page access request for the target media through the application, and the application's server retrieves the media set identifier carried in the page access request. An application is used to view media; for example, it can be used to access video, audio, or live streaming.
[0063] For example, the main page of the application displays access controls for multiple media sets. The display style of the access controls for each media set can be designed according to the media set. For example, the display style of the access controls for each media set is a promotional image of the media set. On the main page of the application, the terminal detects a trigger operation for the access control of the media set. In response to the trigger operation, the terminal sends a page access request to the target media of the media set to the application's server. The page access request is used to access the media page of the target media.
[0064] When a media set includes multiple videos or multiple audios, the target media can be any media in the media set. In practical applications, if the terminal detects the trigger operation of the access control for the media set for the first time, the target media can be the media with the first sequence number in the media set. If the terminal does not detect the trigger operation of the access control for the media set for the first time, the target media can be the media with the last sequence number in the historical playback media of the media set.
[0065] When a media set includes multiple live feeds, the target media can be the live feed with the last number in the media set.
[0066] Step S204: Query the access popularity value corresponding to the media set identifier.
[0067] Among them, the access popularity value corresponding to the media set identifier is the access popularity value of the media set (including the target media) corresponding to the media set identifier.
[0068] In one application scenario, the access popularity value is the access popularity value of a media set among all media sets globally, and all media sets globally include at least this media set. The access popularity value of a media set can be measured by the number of visits to the media set among all media sets globally over a certain period of time; if the number of visits to the media set among all media sets globally is large over a certain period of time, the access popularity value of the media set is small, and vice versa. For example, for two media sets among all media sets globally, if the access popularity value of the first media set is greater than the access popularity value of the second media set, then the number of visits to the first media set is less than the number of visits to the second media set.
[0069] In another application scenario, the access popularity value is the access popularity value of a media set within all media sets in a preset category. The preset category is the media category to which the media set belongs, and all media sets in the preset category include at least that media set. The access popularity value of a media set can be measured by the number of visits to the media set within all media sets in the preset category over a certain period of time. If the number of visits to the media set within the preset category is high over a certain period of time, then the access popularity value of the media set is low; conversely, if the number of visits to the media set within the preset category is low, then the access popularity value of the media set is high. For example, for two media sets within a preset category, if the access popularity value of a third media set is greater than the access popularity value of a fourth media set, then the number of visits to the third media set is less than the number of visits to the fourth media set.
[0070] Specifically, at regular intervals, the server counts the access volume of all media sets within that interval to determine the access popularity value corresponding to each media set within that interval, and saves the media set identifiers of all media sets along with their corresponding access popularity values. When responding to a page access request for the target media, the server obtains the media set identifier of the target media, and searches for the access popularity value associated with that media set identifier among all saved media set identifiers and associated access popularity values.
[0071] Step S206: Based on the access popularity value and the media category to which the target media belongs, determine the caching update method for the target content module in the media page of the target media.
[0072] The media category to which the target media belongs is also the media category of the media set to which the target media belongs. The media category of the media set can be determined based on the playback format and content displayed in the media set.
[0073] In one application scenario, the application's media resources include multiple media sets. Based on the content displayed in each media set, the media category of each media set is determined to divide the multiple media sets into different media categories. In practical applications, multiple media categories include, but are not limited to: TV series category, movie category, variety show category, sports category, animation category, live broadcast category, and music category. For example, the media category to which the target media belongs can be any one of the following media categories: TV series category, movie category, variety show category, sports category, animation category, live broadcast category, or music category.
[0074] A target media page is used to display the target media and related information. The media page includes multiple content modules, which are used to display the target media. Each target content module includes multiple content modules, or some of them. The content displayed on the media page includes the content displayed by these target content modules. For example, the content displayed on the media page includes, but is not limited to, description information and list information of the media set. Correspondingly, the target content modules include, but are not limited to, a media description module for displaying the description information of the media set, and a media list module for displaying the list information of the media set.
[0075] The cache update method for the target content module is the condition for updating the cached media data of the target content module. It reflects the update frequency of the cached media data. The cache update method for the target content module on the media page differs depending on the media category to which the target media belongs, and also differs depending on the access popularity value of the media set to which the target media belongs.
[0076] Specifically, a preset category is set in advance. The preset category can be a category with less traffic among all media categories. For example, if the sports category has less traffic among all media categories, then the preset category can be the sports category.
[0077] If the target media belongs to a media category other than the preset category, and the media set to which the target media belongs is a media set with a large number of visits in the global media set (the access popularity value corresponding to the target media is relatively small), then the cache update method of the target content module is determined to be the first preset method; if the target media belongs to a media category other than the preset category, but the media set to which the target media belongs is not a media set with a large number of visits in the global media set (the access popularity value corresponding to the target media is relatively large), then the cache update method of the target content module is determined to be the second preset method; the update frequency of the cached media data of the target content module corresponding to the first preset method is higher than the update frequency of the cached media data of the target content module corresponding to the second preset method.
[0078] If the target media belongs to a preset category, and the media set to which the target media belongs is a media set with a relatively high number of visits (the target media has a relatively low access popularity value), then the cache update method for the target content module is determined to be the third preset method. If the target media belongs to a preset category, and the media set to which the target media belongs is not a media set with a relatively high number of visits (the target media has a relatively high access popularity value), then the cache update method for the target content module is determined to be the fourth preset method. The update frequency of the cached media data of the target content module corresponding to the third preset method is higher than the update frequency of the cached media data of the target content module corresponding to the fourth preset method.
[0079] Step S208: Update the cached media data corresponding to the target content module based on the cache update method.
[0080] The cached media data corresponding to the target content module is media data cached for the target content module. This cached media data is used to display the content of the target content module in the media page. In practical applications, the cached media data corresponding to the target content module includes, but is not limited to: the application version number, the media resource platform number, and the configuration parameters of the target content module, enabling the application to display the content of the target content module based on the cached media data corresponding to the target content module.
[0081] Specifically, if the target content module meets its corresponding cache update method, then the cached media data corresponding to the target content module is updated.
[0082] In one implementation, the cache update method includes a timed update time for the target content module; if the cache time of the cached media data in the target content module reaches the timed update time, the cached media data in the target content module is updated; the cache time of the cached media data is the duration for which the cached media data exists in the target content module.
[0083] In another implementation, the cache update method includes a timed update time for the target content module; if the current time reaches the timed update time, the cached media data of the target content module is updated; the current time is the time when the server receives the page access request.
[0084] In the aforementioned data processing method for media pages, the server responds to the target media page access request initiated by the terminal. Based on the media set identifier of the media set to which the target media belongs, it queries the access popularity value of the media set. Based on the access popularity value and the media category to which the media set belongs, it determines the cache update method for the target content module in the media page of the target media, and updates the cached media data of the target content module according to the cache update method. The cache update method for the target content module is determined based on the access popularity value and the media category, making the cache update method for the target content module applicable to various application scenarios with different access popularity values and different media categories. Moreover, compared to updating the cached data of the entire media page, updating the cached media data of the target content module in the media page is more flexible, resulting in a smaller amount of data involved in updating the cache, reducing the server's traffic pressure, improving the server's response speed, and making the access to the media page smoother.
[0085] In some embodiments, the data processing method for media pages further includes: periodically collecting page access requests within a target time window; determining the number of accesses to each media set accessed within the target time window based on each collected page access request, wherein each accessed media set includes media sets under a preset category; updating global media popularity data based on the number of accesses to each accessed media set; the global media popularity data is the access popularity data of global media sets; and updating local media popularity data based on the number of accesses to each media set under a preset category; the local media popularity data is the access popularity data of each media set under a preset category.
[0086] The target time window can be a time period corresponding to a preset window duration; page access requests within the target time window include page access requests received within the time period corresponding to the target time window. It can be understood that there can be multiple page access requests, and the preset window duration can be set according to requirements.
[0087] The media sets accessed within the target time window are multiple media sets to which multiple media pages accessed by multiple terminals within the target time window belong. Within the target time window, a terminal may initiate multiple page access requests for the same media set. Therefore, the number of media sets accessed within the target time window may not be the same as the number of multiple page access requests received within the target time window.
[0088] The number of accesses for each media set refers to the number of times each media set is accessed within the target time window.
[0089] Media collections may belong to multiple media categories, including preset categories and non-preset categories. Non-preset categories are media categories other than the preset categories. In practice, multiple media categories can be divided into preset and non-preset categories based on their access volume. Media collections belonging to preset categories will have fewer accesses than those belonging to non-preset categories. It is understood that there can be multiple preset categories.
[0090] Global media popularity data is the access popularity data of a global media set, which includes all media sets accessed within the target time window. Global media popularity data is obtained by counting the number of accesses to all media sets within the target time window, and includes the access popularity value of all media sets within the target time window.
[0091] Local media popularity data refers to the access popularity data of each media set under a preset category. Each media set under a preset category includes all media sets belonging to the preset category that were accessed within the target time window. Local media popularity data is obtained by statistically analyzing the number of accesses to each media set belonging to the preset category within the target time window, and includes the access popularity value of each media set belonging to the preset category within that time window. It can be understood that when there are multiple preset categories, local media popularity data includes the access popularity value of each media set under each preset category.
[0092] Specifically, the server periodically collects page access requests within a target time window, meaning the server periodically collects page access requests within a window duration (the duration corresponding to the target time window). For example, at each collection cycle, the server determines a target time window based on the window duration and collects page access requests within that target time window.
[0093] The server collects multiple page access requests within a target time window, obtains multiple media set identifiers corresponding to each page access request, and calculates the access count for each media set in the global media set based on the multiple media set identifiers. Based on the access count for each media set in the global media set, the server obtains the global media popularity data corresponding to the target time window. Based on the access count for each media set under a preset category in the global media set, the server obtains the local media popularity data corresponding to the target time window. If there are multiple preset categories, the server obtains the local media popularity data corresponding to the target time window based on the access count for each media set under each preset category in the global media set.
[0094] For the current target time window, the server uses the global media popularity data corresponding to the current target time window to replace the global media popularity data corresponding to the previous target time window, thus updating the global media popularity data. The server also uses the local media popularity data corresponding to the current target time window to replace the local media popularity data corresponding to the previous target time window, thus updating the local media popularity data. In other words, the server updates both the global and local media popularity data every data collection cycle.
[0095] Global media popularity data is used to find the first access popularity value of a media set within the global media set. Local media popularity data is used to find the second access popularity value of a media set belonging to a preset category within each media set under the preset category.
[0096] It should be noted that because media sets belonging to the preset categories have relatively low access volume, the server configures fewer container resources for these media sets. However, when a media set belonging to the preset category is updated, the access volume of that media set may exceed the access volume corresponding to the container resources configured for that media set, putting significant traffic pressure on the server.
[0097] For example, sports events belong to a preset category. Before a sports event is updated, viewers may visit the media page for that event to view replays or popular clips, leading to an increase in sports event traffic. As the sports event is about to be updated, even more viewers will visit the media page, waiting for the update. During the sports event's broadcast, traffic reaches its peak for the day. After the event ends, traffic gradually decreases. When sports event traffic reaches its peak for the day, it may exceed the traffic capacity of the container resources configured for the sports event. For example, the traffic for a sports event on a certain day might be as follows: Figure 3 As shown, sports events are updated at 10:00. After 8:00, viewers may visit the media page of the sports event, causing the number of visits to the sports event to gradually increase. The broadcast period for sports events is from 10:00 to 12:00, during which the number of visits to the sports event reaches the highest point of the day. For example, the number of visits to the sports event reaches its peak at 11:00. The sports event ends at 12:00, and after 12:00, the number of visits to the sports event gradually decreases.
[0098] However, in practical applications, when a media set belonging to a preset category is updated, there are still many other media sets in the global media set with higher access volumes than the current media set. If only global media popularity data is used, the server cannot understand that the access volume of the media set has changed significantly. Therefore, it is necessary to determine local media popularity data for media sets belonging to preset categories. For media sets belonging to preset categories, the second access popularity value of the media set can be found through local media popularity data. This allows the server to determine the caching update method for the target content module corresponding to the media set based on the second access popularity value, which can reduce the traffic pressure on the server caused by the increased access volume of the media set.
[0099] In some embodiments, the global media popularity data corresponding to the target time window is obtained based on the number of visits to each media set in the global media set, including: sorting each media set in the global media set in descending order of the number of visits to obtain the visit ranking of each media set, using the visit ranking of each media set as the first visit popularity value of each media set, and associating the media set identifier of each media set with the corresponding first visit popularity value to obtain the global media popularity data corresponding to the current target time window.
[0100] For example, multiple page access requests within the target time window S1 are collected, and multiple media set identifiers corresponding to the multiple page access requests are obtained. Based on the multiple media set identifiers, the access counts corresponding to x media sets (multiple media sets included in the global media set) are determined. The x media sets are sorted in descending order of access counts to obtain the access count ranking of each media set in the x media sets. The access count ranking of each media set in the x media sets is used as the first access popularity value of each media set. For example, if the access ranking of media set V1 is 1, then the first access popularity value of V1 is 1; if the access ranking of media set V2 is x, then the first access popularity value of V2 is x. The media set identifiers of x media sets are associated with the first access popularity values of x media sets respectively. For example, let the media set identifier (Collection id, cid) of media set V1 be cid(a), and associate the media set identifier of media set V1 with the first access popularity value to get: cid(a)-1; let the media set identifier of media set V2 be cid(b), and associate the media set identifier of media set V2 with the first access popularity value to get: cid(b)-x. The global media popularity data corresponding to the target time window S1 includes: x media set identifiers, and x first access popularity values associated with each of the x media set identifiers.
[0101] In some embodiments, after ranking the number of visits to each media set as the first access popularity value of each media set, the process includes: associating the media set identifier of each media set whose access count ranks among the top preset values with the corresponding first access popularity value to obtain global media popularity data for the current target time window.
[0102] It should be noted that if the number of media sets globally within the target time window is less than a preset value, the global media popularity data includes the first access popularity value corresponding to each media set in the global media set. The preset value can be set according to actual needs, and this application embodiment does not limit the preset value.
[0103] For example, assuming a preset value of 100, for x media sets corresponding to the target time window S1, the x media sets are sorted in descending order of access count to obtain the access count ranking of each media set. The top 100 media sets by access count are selected from the x media sets, and these 100 media sets are associated with their respective first access popularity values to obtain the global media popularity data corresponding to the target time window S1. Thus, the global media popularity data corresponding to the target time window S1 includes: 100 media set identifiers, and 100 first access popularity values associated with each of the 100 media set identifiers; the 100 first access popularity values range from 1 to 100.
[0104] In some embodiments, local media popularity data corresponding to the target time window is obtained based on the number of visits to each media set under a preset category in the global media set. This includes: sorting each media set under the preset category in descending order of the number of visits to obtain the ranking of the number of visits to each media set under the preset category; using the ranking of the number of visits to each media set under the preset category as the second access popularity value of each media set under the preset category; obtaining the preset category identifier of the preset category; associating the preset category identifier, the media set identifier of each media set under the preset category, and the corresponding second access popularity value to obtain local media popularity data corresponding to the current target time window.
[0105] For example, multiple page access requests within the target time window S1 are collected, and multiple media set identifiers corresponding to each page access request are obtained. The access counts corresponding to x media sets are determined based on these identifiers. Based on the global access counts of the x media sets, the access counts corresponding to y media sets under a preset category are determined (y is less than x). The y media sets are then sorted in descending order of access counts to obtain the access count ranking for each media set within the y media sets. For instance, if the access count ranking of media set V1 (belonging to a preset category) is 1, then the second access popularity value of V1 is 1, and the access count ranking of media set V2 (belonging to a preset category) is... If the media set is named 'y', then the second access popularity value of V2 is 'y'. The preset category identifier is obtained, and the preset category identifier, the media set identifiers of the 'y' media sets, and the second access popularity values of the 'y' media sets are associated. For example, if the preset category identifier is 'type1', and the media set identifier of media set V1 is 'cid(a)', associating the preset category identifier, the media set identifier of media set V1, and the second access popularity value yields: 'type1-cid(a)-1'; similarly, if the media set identifier of media set V2 is 'cid(b)', associating the preset category identifier, the media set identifier of media set V2, and the second access popularity value yields: 'type1-cid(b)-y'. The local media popularity data corresponding to the target time window S1 includes: the associated preset category identifier, the 'y' media set identifiers, and the 'y' second access popularity values corresponding to each of the 'y' media sets.
[0106] For example, the preset categories include a first preset category and a second preset category. Within x media sets, y first media sets belonging to the first preset category and z media sets belonging to the second preset category (y+z≤x) are determined. The y first media sets are sorted in descending order of access count to obtain the access count ranking of each first media set within the y first media sets. This access count ranking is used as the second access popularity value for each first media set. Similarly, the z second media sets are sorted in descending order of access count to obtain the access count ranking of each second media set within the z second media sets. This access count ranking is used as the second access popularity value for each second media set. The first target identifier (type1) of the first preset category and the second target identifier (type2) of the second preset category are obtained. The first target identifier (type1), the media set identifiers of the y first media sets, and the access count rankings of the y first media sets are correlated. The second target identifier (type2), the media set identifiers of the z second media sets, and the access count rankings of the z second media sets are also correlated to obtain local media popularity data. For example, local media popularity data includes: type1-cid(a)-1 (the first media set belonging to the first preset category, with media set identifier cid(a), and second access popularity value of 1), type1-cid(b)-y (the first media set belonging to the first preset category, with media set identifier cid(b), and second access popularity value of y), type2-cid(c)-1 (the second media set belonging to the second preset category, with media set identifier cid(c), and second access popularity value of 1), and type2-cid(d)-z (the second media set belonging to the second preset category, with media set identifier cid(d), and second access popularity value of z).
[0107] In some embodiments, after ranking the number of visits to each media set under a preset category as the second access popularity value of each media set under the preset category, the method includes: obtaining the preset category identifier of the preset category, associating the preset category identifier of the preset category, the media set identifier of each media set whose number of visits ranks among the top preset values under the preset category, and the corresponding second access popularity value to obtain the local media popularity data corresponding to the current target time window under the preset category.
[0108] It should be noted that if the number of media sets under the preset category within the target time window is less than the preset value, the local media popularity data includes the second access popularity value corresponding to each media set under the preset category.
[0109] For example, assuming a preset value of 50, for y media sets under a preset category within a target time window S1, after obtaining the second access popularity value of the y media sets, the top 50 media sets in terms of access frequency are selected from the y media sets. The preset category identifier, the media set identifiers of the selected 50 media sets, and the corresponding second access popularity values are associated to obtain the local media popularity data corresponding to the target time window S1. Thus, the local media popularity data corresponding to the target time window S1 includes: the preset category identifier, the identifiers of the 50 media sets, and 50 second access popularity values associated with the 50 media set identifiers respectively; the 50 second access popularity values include 1 to 60.
[0110] In some embodiments, global media popularity data and local media popularity data are stored in a storage system. In the storage system, global media popularity data and local media popularity data corresponding to the current target time window are used to replace global media popularity data and local media popularity data corresponding to the previous target time window, so as to update global media popularity data and local media popularity data.
[0111] Specifically, the storage system can be a remote dictionary server (Redis). Redis is a key-value storage system that can support various storage structures.
[0112] For example, global media popularity data can adopt a Redis string structure. The key in the global media popularity data can be a preset first string, which is used to indicate that the data structure corresponds to the global media popularity data. The value can be a media set identifier string for each global media set, which is used to represent the media set identifier. The preset first string can be set according to actual needs. For example, the preset first string can be: top_cid. The media set identifier string can be a JSON list string corresponding to the media set identifier.
[0113] Add a score to the value. The score can be the number of visits corresponding to the value (the number of visits corresponding to the media set identifier). Sort the media set identifier strings in descending order of score to obtain global media popularity data in the form of a ranking list. In the global media popularity data in the ranking list, you can find the ranking of the number of visits corresponding to the media set identifier, that is, the first popularity value of the media set identifier. It should be noted that this data structure can be determined based on a preset number of media sets ranked first by number of visits. For example, if the preset number is 100, then you can obtain global media popularity data for the top 100 media sets by number of visits. This global media popularity data can also be called the global top 100 list by number of visits.
[0114] Local media popularity data can be structured using a Redis hashmap. The key in this data can be a predefined second string, indicating that the data structure corresponds to local media popularity data. The field can be a predefined category identifier string, representing a predefined category. The value can be a media set identifier string for each media within that predefined category. The predefined second string can be customized according to specific needs; for example, it could be `top_type_cid`. The predefined category identifier string can be an enumeration value corresponding to the predefined category, and the media set identifier string can be a JSON list string corresponding to the media set identifier.
[0115] Add a "score" field to the value field. The score can be the number of visits corresponding to the value (the number of visits corresponding to the media set identifier). Sort the media set identifier strings in descending order of score to obtain local media popularity data in the form of a ranking list. In the local media popularity data in the ranking list format, you can find the ranking of the number of visits corresponding to the media set identifier in its preset category, that is, the second most popular visit value for that media set identifier. It should be noted that this data structure can be determined based on the top preset number of media sets with the highest number of visits in each preset category; for example, if the preset number is 50, the local media popularity data can be obtained based on the top 50 media sets with the highest number of visits in each preset category, and this local media popularity data can also be called the local top 50 list of visits.
[0116] Since Redis stores only strings, using Redis to store global and local media popularity data involves a small amount of data, which will not affect the server's read and write performance, and thus will not affect the server's response speed.
[0117] In the above embodiments, the server collects page access requests within the current target time window and determines the access count of each media set within the current target time window. Based on the access count of each media set within the current target time window, the server updates the global media popularity data corresponding to the previous target time window. Based on the access count of each media set under a preset category within the current target time window, the server updates the local media popularity data corresponding to the previous target time window. The server periodically updates the global and local media popularity data, ensuring that the global and local media popularity data reflect the current access popularity of each media set and guaranteeing the real-time nature of the global and local media popularity data.
[0118] In some embodiments, periodically collecting page access requests within a target time window includes: determining a window sliding step size; sliding the target time window according to the window sliding step size, and collecting page access requests within the target time window after each slide.
[0119] The target time window is the time period corresponding to the preset window duration, the window sliding step is the time period corresponding to the preset collection duration, the preset window duration is longer than the preset collection duration, and the preset collection duration can be determined according to actual needs.
[0120] Specifically, a target time window is defined, which slides along the timeline with a window size increment. After each slide, page access requests within the target time window are collected. The target time window slides along the timeline at intervals, and the latest (earliest) moment corresponding to the target time window after the slide is separated from the latest (earliest) moment corresponding to the target time window before the slide by the specified collection time interval. In other words, periodically collecting page access requests within the target time window can also be understood as: at intervals, collecting page access requests within the window duration preceding the current moment, where the current moment is the moment when the interval has been reached.
[0121] For example, such as Figure 4 As shown, the target time window is w1, the earliest time of the target time window w1 is t1, and the latest time is t2. The duration between t1 and t2 is the window duration corresponding to the target time window. After a window sliding step, the target time window w1 is slid. The earliest time of the slid target time window w1 is t3, and the latest time is t4. The duration between t4 and t2 is the acquisition duration corresponding to the window sliding step. Similarly, the duration between t3 and t1 is also the acquisition duration corresponding to the window sliding step.
[0122] The collection duration and window duration can be set according to actual needs. Media sets may have high traffic at certain times and low traffic at other times. For example, sports-related media sets may have high traffic at the start of the event and decrease afterward. Similarly, popular TV series may have high traffic during new episodes but low traffic at other times.
[0123] If the collection duration corresponding to the window sliding step is too long, the server may not be able to update the global and local media popularity data in a timely manner, thus failing to promptly determine changes in the access volume of the media set. If the collection duration corresponding to the window sliding step is too short, the server will frequently update the global and local media popularity data, placing a significant computational burden on the server. If the window duration corresponding to the target time window is too long, there will be many page access requests, resulting in a large computational workload for determining the global and local media popularity data, which may also prevent timely updates of the global and local media popularity data. Since the window duration is longer than the collection duration, if the window duration is too short, the server will also frequently update the global and local media popularity data, placing a significant computational burden on the server. Therefore, it is necessary to set appropriate collection and window durations so that the server can promptly detect changes in the access volume of the media set without placing excessive computational burden on the server.
[0124] For example, the collection duration can be set to 1 second and the window duration to 30 seconds. For instance, at 11:00:30, the target time window corresponds to the period from 11:00:00 to 11:00:30, collecting page access requests within this period. After the target time window slides for one window increment, at 11:00:31, the new target time window corresponds to the period from 11:00:01 to 11:00:31, collecting page access requests within this period. It should be understood that the 1-second collection duration and 30-second window duration are merely examples; in practical applications, the collection duration and window duration can be set according to actual needs. This application embodiment does not limit the collection duration and window duration.
[0125] In the above embodiments, the target time window is slid according to the window sliding step size to realize the periodic collection of page access requests within the target time window. As a result, the server can periodically update the global media popularity data and local media popularity data, so that the global media popularity data and local media popularity data can reflect the current access popularity of each media set, ensuring the real-time nature of the global media popularity data and local media popularity data.
[0126] In some embodiments, determining the number of accesses to each media set accessed within a target time window includes: performing stream computation on the media set identifier of each accessed media set to obtain the word frequency corresponding to each accessed media set; and determining the number of accesses corresponding to each accessed media set based on the word frequency corresponding to each accessed media set.
[0127] The word frequency corresponding to each media set is the word frequency of the media set identifier of each media set. The word frequency of the media set identifier can be used to reflect the frequency of the media set identifier appearing within the target time window.
[0128] Specifically, for multiple page access requests within the target time window, multiple media set identifiers corresponding to each page access request are obtained. The word frequency of each media set identifier is then calculated using a stream processing engine. For each media set identifier's word frequency, the product of that word frequency and the window duration corresponding to the target time window is calculated to obtain the access count for that media set identifier, i.e., the access count for the media set corresponding to that media set identifier. In practical applications, the stream processing engine can be Flink, a distributed processing framework for real-time stream processing. It is understood that the stream processing engine can also be implemented using other distributed processing frameworks, such as Spark, a computing engine for large-scale data processing. This application embodiment does not limit the specific implementation of the stream processing engine.
[0129] In one application scenario, such as Figure 5 As shown, the server includes: an access layer, a page middleware, a business layer, a data caching layer, and basic components. It should be noted that the functional layers included in the server described above are merely an example. In practical applications, to meet various application scenarios of server-terminal interaction, the server may also include other functional layers. This embodiment does not limit the functional layers included in the server.
[0130] The access layer provides gateway capabilities and includes PB and HTTP channels. The PB channel handles PB protocol conversion, while the HTTP channel handles HTTPS protocol conversion. The access layer can also be used for user authentication. HTTPS adds SSL (Secure Socket Layer) to HTTP (Hypertext Transfer Protocol) to ensure secure transmission through encryption and authentication. PB (Protocol Buffer) is a data serialization protocol. The inclusion of PB and HTTP channels in the access layer is merely an example; in practical applications, the access layer may also include other gateway-related components.
[0131] The page middleware platform includes page services, experimental system services, and management configuration services. Page services can deliver different media pages to the terminal based on different media set identifiers. The management configuration service stores the configuration of the media pages, including multiple content modules within the media page and the style of each content module. The experimental system service provides experimental parameters for the media pages. In practical applications, the page service obtains the page experimental parameters corresponding to the media set identifier through the experimental system, and then obtains the media page configuration corresponding to the page experimental parameters through the management configuration service to determine multiple content modules. The page service then assembles these multiple content modules into a media page and sends it to the terminal. The above-described page middleware platform, including page services, experimental system services, and management configuration services, is only an example; in practical applications, the access layer may also include other page-related components.
[0132] The business layer includes a preprocessing service and content module microservices. The preprocessing service is used to obtain general information about the media page; for example, it can determine the media category based on the media set identifier. The content module microservices are used to cache the media data of each content module and send the media data of the content modules to the page service in the page platform. Each content module includes the target content module in the media page of the target media. The above business layer, including the preprocessing service and content module microservices, is only an example. In actual applications, the business layer may also include other business-related components.
[0133] The data caching layer provides various data services, such as consistent hashing caching. It includes a storage system, data layer services corresponding to each content module, and microservices of the business layer's content modules. These microservices retrieve media data from the corresponding data layer services within the data caching layer, and the data layer services can update the media data in the data layer services from the origin server. The above description of the data caching layer, including the storage system and data layer services corresponding to each content module, is merely an example. In practical applications, the data caching layer may also include other data caching-related components.
[0134] The basic components include a data acquisition system and a big data processing platform. The data acquisition system collects, reports, transmits, and distributes data to achieve high-performance data reporting. The big data processing platform enables offline and real-time computation and storage of massive amounts of data, and includes a stream computing engine. The above-mentioned basic components, including the data acquisition system and big data processing platform, are merely an example; in practical applications, the basic components may also include other basic components.
[0135] In some embodiments, such as Figure 6 As shown, the terminal initiates a page access request to the server. The preprocessing service in the business layer of the server obtains the media set identifier and media category corresponding to each page access request. The preprocessing service reports the media set identifier and media category to the data acquisition system. The data acquisition system reports the media set identifier and media category to the stream processing engine of the big data processing platform. Using the target time window of the stream processing engine, word frequency statistics are performed on the media set identifier and media category within the target time window to obtain the global media popularity data and local media popularity data corresponding to the target time window. For example, the global media popularity data includes the media set identifiers of the top 100 media sets in terms of access frequency within the target time window, and the first access popularity value associated with each of the top 100 media set identifiers. The local media popularity data includes the media set identifiers of the top 50 media sets in terms of access frequency under a preset category within the target time window, and the second access popularity value associated with each of the top 50 media set identifiers. The stream computing engine transmits the global media popularity data and local media popularity data to the storage system of the data caching layer.
[0136] In the above embodiments, the stream computing engine performs word frequency statistics on each media set identifier corresponding to the target time window to obtain the access count of each media set identifier. The stream computing engine can quickly calculate the access count of each media set, thereby enabling the server to update the global media popularity data and local media popularity data in a timely manner, ensuring the real-time nature of the global media popularity data and local media popularity data.
[0137] In some embodiments, querying the access popularity value corresponding to a media set identifier includes: searching for a first access popularity value of the media set identifier in global media popularity data; global media popularity data is access popularity data of global media sets; or, searching for a second access popularity value of the media set identifier in local media popularity data; local media popularity data is access popularity data of each media set under a preset category.
[0138] The first access popularity value of the media set identifier, i.e., the first access popularity value of the media set corresponding to the media set identifier, is used to reflect the access ranking of the media set among all media sets within the target time window. The higher the access ranking of the media set among all media sets, the lower the first access popularity value; the lower the access ranking of the media set among all media sets, the higher the first access popularity value. For example, if the access ranking of a media set among all media sets is 1, then the first access popularity value is 1, indicating that the media set is the media set with the most accesses within the target time window.
[0139] The second access popularity value of a media set identifier, i.e., the second access popularity value of the media set corresponding to the media set identifier, is used to reflect the access ranking of the media set among all media sets in the preset category within the target time window. The higher the access ranking of the media set among all media sets in the preset category, the lower the second access popularity value; the lower the access ranking of the media set among all media sets in the preset category, the higher the second access popularity value. For example, if the access ranking of a media set among all media sets in the preset category is 1, then the second access popularity value is 1, indicating that the media set is the media set with the most accesses in the preset category within the target time window.
[0140] Specifically, in this embodiment, the access popularity value is either a first access popularity value or a second access popularity value; the media category corresponding to the media set identifier is determined; if the media category corresponding to the media set identifier does not belong to a preset category, the first access popularity value corresponding to the media set identifier is searched in the global media popularity data; if the media category corresponding to the media set identifier belongs to a preset category, the second access popularity value corresponding to the media set identifier is searched in the local media popularity data.
[0141] In one possible application scenario, the application's media resources, comprising multiple media sets, are divided into several different media categories. These categories include, but are not limited to, TV series, movies, variety shows, sports, animation, live streaming, and music. The number of visits to media sets belonging to preset categories is less than the number of visits to media sets not belonging to preset categories. In practical applications, preset categories include at least one of the following: sports, animation, or music. Due to the smaller audience size, the number of visits to media sets belonging to the sports, animation, or music categories is less than the number of visits to media sets belonging to the TV or variety show categories.
[0142] In the above embodiments, for media sets that do not belong to a preset category, the server can look up the first access popularity value corresponding to the media set in the global media popularity data. For media sets that belong to a preset category, the server can look up the second access popularity value corresponding to the media set in the local media popularity data. In other words, the server can understand the access volume of the media set based on the global media popularity data or the local media data, so as to determine the caching update method of the target content module corresponding to the media set in order to reduce the traffic pressure on the server.
[0143] In some embodiments, searching for a first access popularity value for a media set identifier in global media popularity data includes: calling the data query interface of the storage system to search for the first access popularity value corresponding to the media set identifier in the global media popularity data of the storage system; searching for a second access popularity value for a media set identifier in local media popularity data includes: calling the data query interface of the storage system to search for the second access popularity value corresponding to the media set identifier in the local media popularity data of the storage system.
[0144] The storage system is used to store global media popularity data and local media popularity data; the storage system is equipped with a data query interface, through which the storage system provides external query services.
[0145] Specifically, the terminal initiates a page access request to the server. The preprocessing service in the business layer of the server obtains the media set identifier corresponding to the page access request. The preprocessing service calls the data query interface to the storage system of the data caching layer. If the media category corresponding to the media set identifier is not a preset category, the preprocessing service searches for the first access popularity value associated with the media set identifier in the global media popularity data through the data query interface. If the media category corresponding to the media set identifier is a preset category, the preprocessing service searches for the second access popularity value associated with the media set identifier in the local media popularity data through the data query interface.
[0146] For example, the storage system is Redis. The preprocessing service calls the Redis data query interface. If the media category corresponding to the media set identifier cid(f) is not a preset category, the first access popularity value N corresponding to the media set identifier cid(f) is obtained through the data query interface. If the media category corresponding to the media set identifier is a preset category, the second access popularity value M corresponding to the media set identifier cid(f) is obtained through the data query interface.
[0147] In the above embodiments, global media popularity data and local media popularity data are stored in a storage system. Through the data query interface of the storage system, the first access popularity value corresponding to the media set identifier is queried in the global media popularity data, or the second access popularity value corresponding to the media set identifier is queried in the local media popularity data. The amount of data involved in the global media popularity data and local media popularity data is small. Querying the access popularity value through the storage system ensures that the query operation will not put pressure on the server and the access popularity value corresponding to the media set identifier can be quickly retrieved.
[0148] In some embodiments, querying the access popularity value corresponding to a media set identifier includes: searching for a first access popularity value of the media set identifier in global media popularity data, and searching for a second access popularity value of the media set identifier in local media popularity data.
[0149] Specifically, in this embodiment, the access popularity value includes a first access popularity value and a second access popularity value. After obtaining the media set identifier corresponding to the page access request, the preprocessing service calls the data query interface to the storage system of the data caching layer. Through the data query interface, it queries the first access popularity value corresponding to the media set identifier in the global media popularity data, and queries the second access popularity value corresponding to the media set identifier in the local media popularity data.
[0150] For example, the storage system is Redis. The preprocessing service calls the Redis data query interface to query the first access popularity value N corresponding to the media set identifier cid(f) in the global media popularity data, and to query the second access popularity value M corresponding to the media set identifier cid(f) in the local media popularity data.
[0151] In the above embodiments, without distinguishing the media category corresponding to the media set identifier, the system directly queries the first access popularity value corresponding to the media set identifier from the global media data of the storage system, and queries the second access popularity value corresponding to the media set identifier from the local media data of the storage system. The global and local media popularity data involve small amounts of data, and querying the access popularity value through the storage system minimizes server load and allows for quick retrieval of the access popularity value corresponding to the media set identifier.
[0152] In some embodiments, the access popularity value includes a first access popularity value reflecting the media set to which the target media belongs within the global media set; based on the access popularity value and the media category to which the target media belongs, the cache update method of the target content module in the media page of the target media is determined, including: when the media category to which the target media belongs does not belong to a preset category and the first access popularity value belongs to a first preset range, determining the timed update time corresponding to the media list module, interaction module and media description module in the media page of the target media; wherein, the media list module, interaction module and media description module belong to the target content module.
[0153] Wherein, if the first access popularity value of a media set belongs to the first preset interval, it means that the media set ranks high in the number of accesses in the global media set, that is, the media set has a large number of accesses in the global media set. The first preset interval can be set according to actual needs, for example, the first preset interval can be set to [1,10], or the first preset interval can also be set to [1,20]. In this embodiment of the application, the value of the first preset interval is not limited.
[0154] In one possible scenario, all media categories include: TV dramas, movies, variety shows, sports, animation, live streaming, and music; the preset categories include: sports, animation, and music. In this scenario, if the target media belongs to a category other than the preset categories, then the target media can belong to any one of the following categories: TV dramas, movies, variety shows, or live streaming.
[0155] For target media that does not belong to the preset category, the target content modules in the media page of the target media include: media list module, interactive module and media description module.
[0156] The media list module is used to display a list control for a media set. This list control includes media controls for each media item in the set. When a media control in the list is triggered, the media page for that media item is displayed. For example, such as... Figure 7As shown, the media set is a TV series (belonging to the TV series category), and 70 is the media page of one episode (target media) within the TV series. Media page 70 includes a media list module 701, which displays the episode list controls for the TV series. The episode list controls include multiple episode controls for the TV series, such as the episode control 7011 for the first episode. When an episode control is triggered, the media page for the corresponding episode can be displayed. For example, if the media set is a variety show (belonging to the variety show category), the media list module displays a list of past episodes of the variety show, which includes program controls for multiple episodes of the variety show. For example, if the media set is a live streaming room (belonging to the live streaming category), the media list module displays a list of historical live streams of the live streaming room, which includes controls for multiple live stream screens of the live streaming room.
[0157] The interactive module displays interactive controls for the media set. In practical applications, these controls include, but are not limited to: a favorite control, a share control, and a download control. The favorite control is used to favorite the media set to the cloud when triggered; the share control generates a share link to the media page when triggered, allowing the media page of the media set to be displayed; the download control downloads some or all of the media data in the media set to the local machine when triggered. For example, such as... Figure 7 As shown, the media set is a TV series, and the media page 70 includes an interactive module 702. The interactive module 702 includes a like control 7021, a share control 7022, and a download control 7023. The like control 7021 can be used to like or favorite the TV series, the share control 7022 can generate a share link for the TV series, and the download control 7023 can be used to download part or all of the media data of the TV series.
[0158] The media description module displays descriptive information for the media set, including the set's name, a brief description, and online ratings. For example, such as... Figure 7 As shown, the media set is a TV series, and the media page 70 includes a media description module 703, which is used to display: the TV series name, a brief synopsis, and online ratings.
[0159] Specifically, for ease of description, media categories that do not belong to the preset categories are referred to as non-preset categories. For media sets that are not preset categories, multiple preset update times are set in multiple preset intervals (including the first preset interval) for the media list module, interaction module, and media description module corresponding to the media set. The preset update time is the interval for updating cached media data.
[0160] If the first access popularity value of the media set belongs to the first preset range, then the preset update time of the media list module under the first preset range is obtained and the preset update time is used as the first scheduled update time; the preset update time of the interaction module under the first preset range is obtained and the preset update time is used as the second scheduled update time; the preset update time of the media description module under the first preset range is obtained and the preset update time is used as the third scheduled update time.
[0161] For media sets not categorized by default, the timeliness requirements for updating the media list module, interaction module, and media description module differ. Therefore, within the first default timeframe, the default update times for these modules are different. In practical applications, when a media set is updated, the content of the media list module needs to be updated accordingly. For example, if a TV series updates its 20th episode, the media list module for that series needs to add the corresponding episode control. If the media list module is not updated in a timely manner, it will affect the viewing of the 20th episode. The media description module includes content that needs updating, such as the media set's online rating. If the media description module is not updated in a timely manner, it will not affect the user's viewing of the media set. Therefore, the timeliness requirement for updating the media description module is less than that for the media list module. The interaction module typically does not need to be updated. Therefore, within the first preset interval, the first timed update time of the media list module is shorter than the second timed update time of the media description module, and the second timed update time is shorter than the third timed update time of the interaction module. The first, second, and third timed update times can be set according to actual needs. For example, the first timed update time is 1 second, the second timed update time is 30 seconds, and the third timed update time is 10 minutes.
[0162] It should be noted that, in the total number of visits to the global media collection, the number of visits to the media collection belonging to the first preset interval accounts for a large proportion of the total number of visits to the global media collection.
[0163] For example, such as Figure 8As shown, statistics on the access volume of the global media sets were compiled, revealing the access volume distribution of the top 7 media sets. Specifically, the media set identified as cid1 accounted for 13.8% of the total access volume of the global media sets; cid2 accounted for 4.7%; cid3 accounted for 4.4%; cid4 accounted for 4.4%; cid5 accounted for 3.67%; cid6 accounted for 2.8%; and cid7 accounted for 2.3%. In other words, the top 7 media sets accounted for 36.07% of the total access volume of the global media sets.
[0164] Therefore, a timed update time is set for the media list module, interactive module, and media description module corresponding to the media set belonging to the first preset interval. This allows the cached media data of the target content module corresponding to the media set to be updated in a timely manner when the media set is accessed in large numbers, thereby reducing the traffic pressure on the server.
[0165] In the above embodiments, for media sets that do not belong to a preset category, the update timeliness requirements of the media list module, interaction module, and media description module in the media page are different. Therefore, the timed update times of the media list module, interaction module, and media description module are different. If the first access popularity value corresponding to the media set belongs to a first preset interval, the timed update times of the media list module, interaction module, and media description module under the first preset interval are obtained respectively, so that subsequent updates to the cached media data of the media list module, interaction module, and media description module can meet their respective update timeliness requirements.
[0166] In some embodiments, the target content module in the media page of a media set that is not a preset category further includes a popular media clip module and a recommendation module. Accordingly, determining the caching update method of the target content module in the media page of the target media based on the access popularity value and the media category to which the target media belongs further includes: when the media category to which the target media belongs does not belong to a preset category and the first access popularity value belongs to a first preset range, determining the timed update time corresponding to the popular media clip module and the recommendation module in the media page of the target media.
[0167] The "Popular Media Clips" module displays media clips from a media set or target media. For example, if the media set is a TV series, the popular media clips could be clips from the TV series that have high click-through rates or generate significant discussion. Figure 7As shown, the media set is a TV series, and the media page 70 includes a popular media clip module 704. The popular media clips displayed in the popular media clip module 704 are trailers or other information from the TV series. For example, the media set is a live stream, and the popular media clips are the segments with the highest viewership in the live stream.
[0168] The recommendation module displays recommended media sets or clips. These sets or clips can be determined based on historically viewed media sets. The account holders of the historically viewed media sets must be the same as the account holders of the target media. The recommended media sets or clips may be those that the account holder is interested in. Determining recommended media sets or clips based on historically viewed media sets can be achieved using existing methods, which will not be elaborated upon here.
[0169] Specifically, multiple preset update times are pre-set for the popular media clip module and the recommendation module under multiple preset intervals (including the first preset interval). If the first access popularity value of the media set belongs to the first preset interval, the preset update time of the popular media clip module under the first preset interval is obtained, and this preset update time is used as the fourth timed update time of the popular media clip module; the preset update time of the recommendation module under the first preset interval is obtained, and this preset update time is used as the fifth timed update time of the recommendation module. The fourth and fifth timed update times can be set according to actual needs. For example, the fourth timed update time is 5 seconds, and the fifth timed update time is 10 seconds.
[0170] Since the recommendation module is used to provide personalized recommendations for the account holders corresponding to the media page, the content of the recommendation module may be the same for different account holders. If the media page includes a recommendation module, and the data of the entire media page is cached and updated instead of being modularized, the amount of data involved in caching and updating the cached data of the entire media page will be huge. However, in the above embodiment, the target content module in the media page also includes a popular media clip module and a recommendation module. The timed update time corresponding to the popular media clip module and the recommendation module can be determined, so that subsequent updates can be made to the cached media data of the popular media clip module and the recommendation module. The amount of data involved in updating the cached media data of the popular media clip module and the recommendation module is small, which reduces the traffic pressure on the server.
[0171] In some embodiments, the access popularity value includes a second access popularity value reflecting the media set to which the target media belongs in each media set under a preset category; based on the access popularity value and the media category to which the target media belongs, the cache update method of the target content module in the media page of the target media is determined, including: when the media category to which the target media belongs belongs to a preset category and the second access popularity value belongs to a second preset range, determining the timed update time corresponding to the media description module, the popular media segment module and the media list module in the media page of the target media; wherein, the media description module, the popular media segment module and the media list module belong to the target content module.
[0172] If the second access popularity value of a media set falls within the second preset interval, it indicates that the media set ranks highly in terms of access frequency among all media sets within the preset category, meaning that the media set has a large number of visits among all media sets within the preset category. The second preset interval can be set according to actual needs, for example, the second preset interval can be set to [1,3], or the second preset interval can also be set to [1,5]. This application embodiment does not limit the value of the first preset interval.
[0173] For target media belonging to a preset category, the target content module on the media page includes a media description module, a popular media clips module, and a media list module. For example, such as... Figure 9 As shown, the media set is a sports event (belonging to the sports category). The media page 90 includes a media description module 901, a popular media clips module 902, and a media list module 903. The media description module 901 is used to display the sports event name, participating teams, and scores. The popular media clips module 902 is used to display clips related to the sports event, including but not limited to: highlights of a specific athlete in the sports event, and highlights of scoring points in the sports event. For example, the popular media clips module 902 includes: highlights of athlete A 9021 and highlights of scoring points 9022. The media list module 903 is used to display the segment list control of the sports event. The segment list control includes multiple segment controls corresponding to multiple segments of media in the sports event. When a segment control is triggered, the media page of the segment media corresponding to that segment control can be displayed. For example, the media list module 903 is used to display segment controls 9031 for multiple segments of the sports event video. The replay of the sports event can be viewed through the segment controls 9031.
[0174] Specifically, for a media set with a preset category, multiple preset update times are set in advance for the media description module, popular media clips module, and media list module of the media set under multiple preset intervals (including the second preset interval).
[0175] If the second access popularity value of the media set belongs to the second preset range, then the preset update time of the media list module under the second preset range is obtained, and this preset update time is used as the sixth timed update time of the media list module; the preset update time of the popular media segment module under the second preset range is obtained, and this preset update time is used as the seventh timed update time of the popular media segment module; the preset update time of the media description module under the second preset range is obtained, and this preset update time is used as the eighth timed update time of the media description module.
[0176] For media sets with preset categories, the timeliness requirements for updating the media list module, popular media clips module, and media description module differ. Therefore, within the second preset interval, the preset update times for these modules are different. In practical applications, for example, during sports event updates, a large number of users may watch multiple segments of the sports event, thus requiring the media list module to be updated promptly. Similarly, a large number of users may watch highlights of a particular athlete or scoring moments, necessitating timely updates for the popular media clips module as well. However, a delayed update of the media description module will not affect user viewing of the media set. Therefore, within the second preset interval, the sixth scheduled update time for the media list module is shorter than the seventh scheduled update time for the media description module, which in turn is shorter than the eighth scheduled update time. The sixth, seventh, and eighth scheduled update times can be set according to actual needs. For example, the sixth scheduled update time is 1 second, the seventh is 5 seconds, and the eighth is 10 minutes.
[0177] In the above embodiments, for media sets belonging to preset categories, the update timeliness requirements of the media list module, popular media segment module, and media description module in the media page are different. Therefore, the timed update times of the media list module, popular media segment module, and media description module are different. If the second access popularity value corresponding to the media set belongs to the second preset interval, the timed update times of the media list module, popular media segment module, and media description module under the second preset interval are obtained respectively, so that subsequent updates to the media list module, popular media segment module, and media description module can meet their respective update timeliness requirements.
[0178] In some embodiments, updating the cached media data corresponding to the target content module based on the cache update method includes: if the cached media data corresponding to the target content module satisfies the cache update method, then updating the cached media data corresponding to the target content module. The data processing method for the media page further includes: obtaining the updated cached media data corresponding to the target content module; obtaining the sender identifier of the page access request for the target media; and sending the updated cached media data to the sender based on the sender identifier.
[0179] The sender identifier is the identifier of the sender (terminal) that sends the page access request. The sender identifier is a unique identifier that distinguishes different senders; it can be obtained from the page access request. For example, an application runs on the sender and initiates a page access request to the server through the application on the sender. This page access request carries the sender identifier. After receiving the page access request, the server retrieves the sender identifier carried in the page access request.
[0180] Specifically, the cache update method includes the scheduled update time of the target content module. The cache update method is satisfied when the cached media data corresponding to the target content module reaches the scheduled update time. If the cached media data corresponding to the target content module reaches the scheduled update time, then the cached media data corresponding to the target content module is updated.
[0181] The target content module includes multiple content modules. If the cached media data corresponding to the target content module meets the cache update method, then the cached media data corresponding to the target content module is updated. This includes: if at least one content module in the target content module meets the corresponding cache update method, then the cached media data of that at least one content module is updated. Accordingly, obtaining the updated cached media data corresponding to the target content module includes: obtaining the updated cached media data of that at least one content module, and obtaining the cached media data of the content modules that have not been updated.
[0182] The content module microservice in the business layer obtains media data from the corresponding data layer service in the data caching layer to update the cached media data corresponding to the target content module in the content module microservice. The media data obtained from the corresponding data layer service and cached in the content module microservice is used as the updated cached media data corresponding to the target content module.
[0183] For media sets that do not belong to the preset categories, the target content modules for the media set include: media list module, interactive module, and media description module.
[0184] In one possible scenario, if the caching time of the cached media data corresponding to the media list module reaches the first scheduled update time of the media list module, the content module microservice will obtain media data from the media list data layer service (the data layer service corresponding to the media list module in the data caching layer) to update the cached media data corresponding to the media list module, thus obtaining the first updated cached media data corresponding to the media list module. If the caching time of the cached media data corresponding to the interactive module reaches the second scheduled update time of the interactive module, the content module microservice obtains media data from the interactive data layer service (the data layer service corresponding to the interactive module in the data caching layer) to update the cached media data corresponding to the interactive module, thus obtaining the second updated cached media data corresponding to the interactive module; if the caching time of the cached media data corresponding to the media description module reaches the third scheduled update time of the media description module, the content module microservice obtains media data from the media description data layer service (the data layer service corresponding to the media description module in the data caching layer) to update the cached media data corresponding to the media description module, thus obtaining the third updated cached media data corresponding to the media description module; the first updated cached media data, the second updated cached media data, and the third updated cached media data are sent to the sender corresponding to the sender identifier; the sender displays the media page of the target media based on the first updated cached media data, the second updated cached media data, and the third updated cached media data.
[0185] For example, for a media set that does not belong to a preset category, assume that the timed update time of the media list module is 1 second, the timed update time of the interaction module is 30 seconds, and the timed update time of the media description module is 10 minutes; if the caching time of the cached media data corresponding to the media list module reaches 1 second, then the cached media data corresponding to the media list module is updated to obtain the updated cached media data d1 corresponding to the media list module; if the caching time of the cached media data corresponding to the interaction module reaches 30 seconds, then the cached media data corresponding to the interaction module is updated to obtain the updated cached media data d2 corresponding to the interaction module; if the caching time of the cached media data corresponding to the media description module reaches 10 minutes, then the cached media data corresponding to the media description module is updated to obtain the updated cached media data d3 corresponding to the media description module, and d1, d2, and d3 are sent to the sending end.
[0186] In another possible scenario, if the caching time of the cached media data corresponding to the media list module reaches the first scheduled update time of the media list module, the content module microservice obtains the media data from the media list data layer service to get the first updated cached media data corresponding to the media list module. If the caching time of the cached media data corresponding to the interaction module has not reached the second scheduled update time of the interaction module, the cached media data corresponding to the interaction module is used as the second updated cached media data of the interaction module; if the caching time of the cached media data corresponding to the media description module has not reached the third scheduled update time of the media description module, the cached media data corresponding to the media description module is used as the third updated cached media data of the media description module; the first updated cached media data, the second updated cached media data, and the third updated cached media data are sent to the sender corresponding to the sender identifier.
[0187] For media sets belonging to preset categories, the target content modules corresponding to the media set include: media list module, popular media clips module, and media description module.
[0188] In one possible scenario, if the caching time of the cached media data corresponding to the media list module reaches the fourth scheduled update time of the media list module, the content module microservice retrieves media data from the media list data layer service to obtain the fourth updated cached media data corresponding to the media list module. If the caching time of the cached media data corresponding to the popular media segment module reaches the fifth scheduled update time of the popular media segment module, the content module microservice retrieves media data from the popular media segment data layer service (the data layer service corresponding to the popular media segment module in the data caching layer) to obtain the fifth updated cached media data corresponding to the popular media segment module. If the caching time of the cached media data corresponding to the media description module reaches the sixth scheduled update time of the media description module, the content module microservice retrieves media data from the media description data layer service to obtain the sixth updated cached media data corresponding to the media description module. The fourth, fifth, and sixth updated cached media data are then sent to the sender corresponding to the sender identifier. The sender displays the media page of the target media based on the fourth, fifth, and sixth updated cached media data.
[0189] For example, for a media set belonging to a preset category, assuming the media list module updates every 1 second, the popular media clips module updates every 5 seconds, and the media description module updates every 10 minutes; if the caching time of the corresponding cached media data in the media list module reaches 1 second, then the cached media data corresponding to the media list module is updated, resulting in updated cached media data d4 for the media list module; if the caching time of the corresponding cached media data in the popular media clips module reaches 5 seconds, then the cached media data corresponding to the popular media clips module is updated, resulting in updated cached media data d5 for the popular media clips module; if the caching time of the corresponding cached media data in the media description module reaches 10 minutes, then the cached media data corresponding to the media description module is updated, resulting in updated cached media data d6 for the media description module, and d4, d5, and d6 are sent to the sending end.
[0190] In another possible scenario, if the caching time of the cached media data corresponding to the media list module reaches the fourth scheduled update time of the media list module, the content module microservice obtains the media data from the media list data layer service to get the fourth updated cached media data corresponding to the media list module. If the caching time of the cached media data corresponding to the popular media segment module has not reached the fifth scheduled update time of the popular media segment module, the media cached data corresponding to the popular media segment module is used as the fifth updated cached media data corresponding to the popular media segment module. If the caching time of the cached media data corresponding to the media description module has not reached the sixth scheduled update time of the media description module, the cached media data corresponding to the media description module is used as the sixth updated cached media data corresponding to the media description module, and the fourth updated cached media data, the fifth updated cached media data, and the sixth updated cached media data are sent to the sender corresponding to the sender identifier.
[0191] The updated cached media data of the target content module is used to display the media page of the target media. When it is necessary to view the media page of other media in the media set to which the target media belongs, the updated cached media data of the target content module in the media page of other media can be retrieved again through the data processing method of the media page mentioned above.
[0192] It should be noted that the target media page includes multiple content modules. The target content module can include all of these content modules. The server sends the updated cached media data corresponding to the target content module to the sending end. That is, the server sends all the data of the media page to the sending end. The sending end can display the media page according to the updated cached media data corresponding to the target content module. Alternatively, the target content module can also include some of the content modules among these multiple content modules. In this case, in addition to sending the updated cached media data corresponding to the target content module to the sending end, the server will also send data of other content modules (content modules other than the target content module among the multiple content modules) to the sending end. This allows the sending end to obtain all the data of the media page. The sending end can display the media page according to the updated cached media data corresponding to the target content module and the data of other content modules.
[0193] In the above embodiments, if the cached media data corresponding to the target content module meets the cache update method, the cached media data corresponding to the target content module is updated, and the updated cached media data is sent to the sending end. If the media page is not modularized, when an access request is received, the server needs to update the cache of the entire data of the media page, resulting in a very large amount of updated data. However, the above embodiments update the cache of media data of certain modules that meet the cache update method when some modules of the target content module in the media page meet the cache update method, thereby reducing the amount of data involved in updating the cache, reducing the traffic pressure on the server, and improving the server response speed.
[0194] In some embodiments, the data processing method for the media page further includes: if the cached media data corresponding to the target content module does not meet the cache update method, obtaining the sender identifier of the page access request of the target media; and sending the cached media data to the sender based on the sender identifier.
[0195] Specifically, if the cached media data corresponding to the target content module does not meet the cache update method, it means that the cache time of the cached media data corresponding to the target content module has not reached the scheduled update time. If the cache time of the cached media data corresponding to the target content module has not reached the scheduled update time, the cached media data corresponding to the target content module will not be updated, and the cached media data corresponding to the target content module will be sent directly to the sending end.
[0196] The target content module includes multiple content modules. If the cached media data corresponding to the target content module does not meet the cache update method, it means that each content module in the target content module does not meet the corresponding cache update method.
[0197] For media sets that do not belong to the preset categories, the target content modules corresponding to the media set include: media list module, interaction module, and media description module. If the caching time of the cached media data corresponding to the media list module has not reached the first timed update time of the media list module, the caching time of the cached media data corresponding to the interaction module has not reached the second timed update time of the interaction module, and the caching time of the cached media data corresponding to the media description module has not reached the third timed update time of the media description module, then the first cached media data corresponding to the media list module, the second cached media data corresponding to the interaction module, and the third cached media data corresponding to the media description module will not be updated, and the first cached media data, the second cached media data, and the third cached media data will be sent to the sending end corresponding to the sending end identifier.
[0198] For a media set belonging to a preset category, the target content modules corresponding to the media set include: a media list module, a popular media clip module, and a media description module. If the caching time of the cached media data corresponding to the media list module has not reached the fourth timed update time of the media list module, the caching time of the cached media data corresponding to the popular media clip module has not reached the fifth timed update time of the popular media clip module, and the caching time of the cached media data corresponding to the media description module has not reached the sixth timed update time of the media description module, then the fourth cached media data corresponding to the media list module, the fifth cached media data corresponding to the popular media clip module, and the sixth cached media data corresponding to the media description module will not be updated, and the fourth cached media data, the fifth cached media data, and the sixth cached media data will be sent to the sender corresponding to the sender identifier.
[0199] In the above embodiments, if the cached media data corresponding to the target content module does not meet the cache update method, the cached media data corresponding to the target content module is sent to the sending end. Thus, when the cached media data corresponding to the target content module does not meet the cache update method, the cached media data corresponding to the target content module can be used directly, reducing server traffic pressure and improving server response speed.
[0200] In some embodiments, the data processing method for the media page further includes: obtaining the origin pull method of the data layer service corresponding to the target content module; the origin pull method is determined based on the access popularity value when updating the media to be updated belonging to the media set; updating the media data of the data layer service according to the origin pull method to obtain the updated media data; updating the cached media data corresponding to the target content module based on the cache update method, including: when the timed update time is reached, updating the cached media data corresponding to the target content module based on the updated media data.
[0201] Specifically, when updating media belonging to a media set, the data query interface of the storage system is called. If the media set does not belong to the preset category, the access popularity value of the media set in the global media set is queried in the global media popularity data through the data query interface. If the media set belongs to the preset category, the access popularity value of the media set in each media set under the preset category is queried in the local media popularity data through the data query interface.
[0202] If the media set does not belong to the preset category, and the access popularity value of the media set in the global media set is within the first preset range, then the origin return method of the data layer service corresponding to the target content module is determined to be the first preset origin return method; if the media set does not belong to the preset category, and the access popularity value of the media set in the global media set is not within the first preset range, then the origin return method of the data layer service corresponding to the target content module is determined to be the second preset origin return method.
[0203] If the media set belongs to a preset category, and the access popularity value of the media set in each media set under the preset category belongs to the second preset range, then the origin return method of the data layer service corresponding to the target content module is determined to be the first preset origin return method; if the media set does not belong to a preset category, and the access popularity value of the media set in each media set under the preset category does not belong to the second preset range, then the origin return method of the data layer service corresponding to the target content module is determined to be the second preset origin return method.
[0204] If the media set does not belong to a preset category, but its access popularity value falls within the first preset range, it indicates that the media set has a high access volume within the global media set. Therefore, when the media set awaiting update is updated, the media data of the data layer service needs to be updated promptly so that the target content module of the media set can obtain the updated media data in a timely manner. The origin pull method for the data layer service corresponding to the target content module is determined to be the first preset origin pull method. The origin pull method of the data layer service being the first preset origin pull method indicates that the media data of the data layer service needs to be updated.
[0205] Similarly, if the media set belongs to a preset category and its access popularity value belongs to the second preset range, it means that the media set has a high access volume among the media sets under the preset category. Therefore, when the media to be updated in the media set is updated, the media data of the data layer service needs to be updated in a timely manner so that the target content module of the media set can obtain the updated media data in a timely manner. The origin return method of the data layer service corresponding to the target content module is determined to be the first preset origin return method.
[0206] Updating media data in the data layer service according to the origin server method means that if the origin server method of the data layer service is the first preset origin server method, then the updated media data is obtained from the origin server to update the media data of the data layer service.
[0207] When the scheduled update time is reached, the cached media data corresponding to the target content module is updated based on the updated media data. This means that if the cached media data corresponding to the target content module meets the cache update method, the target content module obtains the media data for updating from the data layer service. Since the data layer service's origin return method is the first preset origin return method, the data layer service obtains the updated media data from the origin server, enabling the target content module to obtain the updated media data from the data layer service, and then use the updated media data to update the cached media data corresponding to the target content module.
[0208] In some embodiments, if the origin retrieval method of the data layer service is the second preset origin retrieval method, the media data of the data layer service of the target content module will not be updated.
[0209] For example, if the media set is a TV series, when updating episode 20 of the TV series, the access popularity value of the TV series is queried in the global media popularity data. If the access popularity value of the TV series is 1 (belonging to the first preset range), then the origin return method of the data layer service of the target content module corresponding to the TV series is set to the first preset origin return method. Assume that the cached media data corresponding to the target content module is h1, and the data layer service corresponding to the target content module caches media data h2. When the server receives the page access request corresponding to the TV series, if the cached media data h1 corresponding to the target content module of the TV series meets the cache update method, then the data layer service obtains the updated media data h3 from the origin server and replaces the media data h2 in the data layer service with the updated media data h3. The content module microservice obtains the updated media data h3 from the data layer service and updates the cached media data h1 with the updated media data h3.
[0210] If the access popularity value of the TV series is 30 (not within the first preset range), then the origin return method of the data layer service of the target content module corresponding to the TV series is set to the second preset origin return method; when the server receives the page access request corresponding to the TV series, if the cached media data h1 corresponding to the target content module of the TV series meets the cache update method, then the media data h2 is obtained from the data layer service, and the cached media data h1 is updated using the media data h2.
[0211] When a media set with high access volume is being updated, a large number of terminals send page access requests to the server at the same time. If the media data of the target content module is not updated in time, the terminals cannot display the updated media. Therefore, the terminals will update the media data again and send more page access requests to the server, bringing huge traffic pressure to the server. In the above embodiment, the origin pull method of the data layer service corresponding to the target content module is determined according to the access popularity value of the media set. If the access popularity value of the media set reflects the high access volume of the media set, the media data cached by the data layer service corresponding to the target content module is updated. This allows the target content module to use the updated media data of the data layer service to update its cached media data. In this way, when the media set is being updated, the target content module can obtain the updated media data in time, thereby reducing the number of times the terminal performs retries, reducing the number of page access requests sent by the terminal to the server, and thus reducing the traffic pressure brought to the server by multiple retries.
[0212] In some embodiments, the data layer service corresponding to the target content module includes a media description service and a media list service; updating the media data of the data layer service according to the origin-following method to obtain updated media data includes: determining the origin-following identifier corresponding to each of the media description service and the media list service according to the origin-following method; if each origin-following identifier meets the preset origin-following conditions, then updating the media data corresponding to each of the media description service and the media list service.
[0213] The target content module includes a media description module and a media list module. Correspondingly, the data layer services include a media description service corresponding to the media description module and a media list service corresponding to the media list module. The media description service caches first media data, which is used by the media description module to update its cached first-cache media data. The media list service caches second media data, which is used by the media list module to update its cached second-cache media data.
[0214] The origin retrieval method includes the origin retrieval identifier corresponding to the media description service and the origin retrieval identifier corresponding to the media list service. The origin retrieval identifier is either a first identifier or a second identifier, which can be represented by numerical values. For example, the first identifier is represented by 1 and the second identifier is represented by 0.
[0215] The source retrieval identifier can satisfy the preset source retrieval conditions if the source retrieval identifier is the first identifier.
[0216] Specifically, the origin return method is either the first preset origin return method or the second preset origin return method; the first preset origin return method indicates that the media data in the media description service and the media list service needs to be updated; that is, if the origin return method is the first preset origin return method, then the origin return identifier corresponding to the media description service is determined to be the first identifier, and the origin return identifier corresponding to the media list service is also determined to be the first identifier.
[0217] The second origin pull method indicates that no updates to the media data in the media description service and the media list service are required. In other words, if the origin pull method is the second preset origin pull method, then the origin pull identifier corresponding to the media description service is determined to be the second identifier, and the origin pull identifier corresponding to the media list service is also determined to be the second identifier.
[0218] If each origin identifier meets the preset origin conditions, then the media data corresponding to the media description service and the media list service are updated, including: if the origin identifier corresponding to the media description service is the first identifier, and the origin identifier corresponding to the media list service is the first identifier, then the media data corresponding to the media description service and the media list service are updated. For example, if the origin identifier corresponding to the media description service is 1, and the origin identifier corresponding to the media list service is 1, then the media data corresponding to the media description service and the media list service are updated.
[0219] Accordingly, if the origin identifier corresponding to the media description service is the second identifier, and the origin identifier corresponding to the media list service is the second identifier, then the media data corresponding to the media description service and the media list service will not be updated.
[0220] In some embodiments, the data layer service corresponding to the target content module includes a media list service; accordingly, updating the media data of the data layer service according to the origin-following method to obtain updated media data includes: determining the origin-following identifier corresponding to the media list service according to the origin-following method; if the origin-following identifier meets the preset origin-following conditions, then updating the media data corresponding to each media list service.
[0221] Specifically, in this embodiment, the first preset origin pull method indicates that the media data in the media list service needs to be updated. Therefore, if the origin pull method is the first preset origin pull method, the origin pull identifier corresponding to the media list service is determined to be the first identifier. The second preset origin pull method indicates that the media data in the media list service does not need to be updated. Therefore, if the origin pull method is the second preset origin pull method, the origin pull identifier corresponding to the media list service is determined to be the second identifier.
[0222] If the origin identifier corresponding to the media list service is the first identifier, then update the media data corresponding to the media list service.
[0223] In some embodiments, the data layer service corresponding to the target content module includes: a popular media segment service corresponding to the popular media segment module, and a media list service; accordingly, the media data of the data layer service is updated according to the origin-following method to obtain updated media data, including: determining the origin-following identifier corresponding to the popular media segment service and the origin-following identifier corresponding to the media list service according to the origin-following method; if the origin-following identifier corresponding to the media segment service and the origin-following identifier corresponding to the media list service both meet the preset origin-following conditions, then the media data corresponding to the popular media segment service and the media list service are updated respectively.
[0224] Specifically, in this embodiment, the first preset origin return method is used to indicate that the media data in the popular media segment service and the media list service needs to be updated. Therefore, if the origin return method is the first preset origin return method, the origin return identifiers of the popular media segment service and the media list service are both determined to be the first identifier. The second preset origin return method is used to indicate that the media data in the popular media segment service and the media list service does not need to be updated. Therefore, if the origin return method is the second preset origin return method, the origin return identifiers of the popular media segment service and the media list service are both determined to be the second identifier.
[0225] If both the popular media clip service and the media list service use the first identifier as their source identifier, then update the corresponding media data for each service.
[0226] It is conceivable that the data layer service corresponding to the target content module may also include other content services corresponding to other content modules. Similarly, the origin pull method of other content services can be determined based on the access popularity value of the media set, thereby updating the media data cached by other content services. This application embodiment does not limit the specific content services included in the data layer service corresponding to the target content module.
[0227] In the above embodiments, the origin-fetching method of the data layer service corresponding to the target content module is determined based on the access popularity value of the media set. If the access popularity value of the media set reflects the high access volume of the media set, the origin-fetching identifiers of both the media description service and the media list service are determined to be the first identifier. Then, the media data corresponding to the media description service and the media list service are updated respectively, so that the media description module uses the updated media data cached by the media description service to update its cached media data, and the media list module uses the updated media data cached by the media list service to update its cached media data. In this way, when the media to be updated in the media set is updated, the media description module and the media list module can obtain the updated media data in a timely manner, thereby reducing the number of times the terminal performs retries, reducing the number of page access requests sent by the terminal to the server, and thus reducing the traffic pressure on the server caused by multiple retries.
[0228] In some embodiments, when updating media belonging to a media set, estimated container resources are determined based on the historical access popularity value of the media set, and the current container resources of the media set are expanded based on the estimated container resources.
[0229] Specifically, when a media set does not belong to a preset category, its historical access popularity value can be the first access popularity value within a historical time window; when a media set belongs to a preset category, its historical access popularity value can be the second access popularity value within a historical time window. The historical time window can be the time window corresponding to the last time the media set was updated. The estimated container resources are used to reflect the storage capacity for caching and updating the data corresponding to the media set.
[0230] Specifically, a mapping relationship between the historical access popularity value of a media set and the estimated container resources is pre-defined. After obtaining the historical access popularity value of the media set, the estimated container resources corresponding to the historical access popularity value are determined according to the mapping relationship. If the estimated container resources of the media set are greater than the current container resources, the current container resources are expanded according to the difference between the estimated container resources and the current container resources.
[0231] In one specific embodiment, such as Figure 10 As shown, the data processing methods for media pages include:
[0232] S0010. The server determines the window sliding step size, slides the target time window according to the window sliding step size, and collects page access requests within the target time window after each slide.
[0233] S0011. Based on each page access request collected, the server performs stream calculation on the media set identifier of each accessed media set to obtain the word frequency corresponding to each accessed media set. Based on the word frequency corresponding to each accessed media set, the server determines the number of accesses corresponding to each accessed media set. Each accessed media set includes media sets under a preset category.
[0234] S0012. The server updates the global media popularity data based on the number of accesses to each media set; the global media popularity data is the access popularity data of the global media set; the server also updates the local media popularity data based on the number of accesses to each media set under the preset category; the local media popularity data is the access popularity data of each media set under the preset category.
[0235] S1010. The server responds to the page access request of the target media and obtains the media set identifier corresponding to the target media; the media set identifier is the identifier of the media set to which the target media belongs;
[0236] S1011. The server calls the data query interface of the storage system and searches for the first access popularity value corresponding to the media set identifier in the global media popularity data of the storage system through the data query interface.
[0237] S1012. When the media category to which the target media belongs does not belong to the preset category, and the first access popularity value belongs to the first preset range, the server determines the timed update time corresponding to the media list module, interaction module and media description module in the media page of the target media; wherein, the media list module, interaction module and media description module belong to the target content module;
[0238] or,
[0239] S1013. The server calls the data query interface of the storage system and searches for the second access popularity value corresponding to the media set identifier in the local media popularity data of the storage system through the data query interface.
[0240] S1014. When the target media belongs to a preset category and the second access popularity value is within a second preset range, the server determines the corresponding timed update time for the media description module, popular media segment module, and media list module in the media page of the target media; wherein, the media description module, popular media segment module, and media list module belong to the target content module;
[0241] S1015. The origin pull method for the server to obtain the data layer service corresponding to the target content module; the origin pull method is determined based on the access popularity value when updating the media to be updated that belongs to the media set;
[0242] S1016. The server determines the corresponding origin identifier for the media description service and the media list service according to the origin return method. If each origin return identifier meets the preset origin return conditions, the server updates the corresponding media data for the media description service and the media list service.
[0243] S1017. When the scheduled update time is reached, the server updates the cached media data corresponding to the target content module based on the updated media data.
[0244] S1018. The server obtains the updated cached media data corresponding to the target content module, obtains the sender identifier of the page access request for the target media, and sends the updated cached media data to the sender based on the sender identifier.
[0245] or,
[0246] S1019. If the cached media data corresponding to the target content module does not meet the cache update method, the server obtains the sender identifier of the page access request of the target media and sends the cached media data to the sender based on the sender identifier.
[0247] In one scenario implementation, such as Figure 11 As shown, the preprocessing service receives a page access request, obtains the media set identifier and media category based on the request, and calls the data query interface of the storage system. If the media category does not belong to the preset category, the preprocessing service queries the first access popularity value of the media set identifier in the global media popularity data through the data query interface. The preprocessing service sends the media set identifier, media category, and first access popularity value to the page service, which forwards the media set identifier, media category, and first access popularity value to the content module microservice. The content module microservice updates the cached media data of the target content module microservice based on the media set identifier, media category, and first access popularity value.
[0248] If the media category belongs to the preset category ( Figure 11 If (not shown), then through the data query interface, the second access popularity value of the media set identifier is queried in the local media popularity data; the preprocessing service sends the media set identifier, media category and second access popularity value to the page service, and the page service forwards the media set identifier, media category and second access popularity value to the content module microservice; the content module microservice updates the cached media data of the target content module microservice according to the media set identifier, media category and second access popularity value.
[0249] For example, the preprocessing service receives a page access request and obtains the media set identifier cid(g) and media category type1 based on the request. Assuming type1 is the sports category, which belongs to the preset category, the preprocessing service queries the local media popularity data for the second access popularity value M1 corresponding to cid(g) through the data query interface of the storage system. The preprocessing service sends cid(g), type1, and M1 to the page service. The page service forwards cid(g), type1, and M1 to the content module microservice. The content module microservice determines whether M1 belongs to the second preset interval. If M1 belongs to the second preset interval, it determines that the timed update time of the media list module is 1 second, and the timed update time of the popular media clip module is 5 seconds. The description module updates every 5 minutes. If the cache time of media data k41 in the media list module reaches 1 second, the content module microservice retrieves media data k42 from the media list service layer of the data caching layer and replaces k41 with k42, thus updating the cached media data in the media list module. If the cache time of media data k51 in the popular media segment module reaches 5 seconds, the content module microservice retrieves media data k52 from the popular media segment service layer of the data caching layer and replaces k51 with k52, thus updating the cached media data in the popular media segment module. If the cache time of media data k61 in the media description module does not reach 5 minutes, the content module microservice does not update the cached media data in the media description module.
[0250] In another scenario embodiment, such as Figure 12 As shown, the preprocessing service receives a page access request, obtains the media set identifier and media category based on the request, and calls the data query interface of the storage system to query the first and second access popularity values of the media set identifier in the global and local media popularity data. The preprocessing service sends the media set identifier, media category, first and second access popularity values to the page service, which forwards these values to the content module microservice. The content module microservice updates the cached media data of the target content module microservice based on the media set identifier, media category, first and second access popularity values.
[0251] For example, the preprocessing service receives a page access request and obtains the media set identifier cid(h) and media category type2 based on the page access request. The preprocessing service queries the global media popularity data and the local media popularity data through the data query interface of the storage system to find the first access popularity value N2 and the second access popularity value M2 corresponding to cid(h). The preprocessing service sends cid(h), type2, N2 and M2 to the page service. The page service forwards cid(h), type2, N2 and M2 to the content module microservice. Assuming that the media category type2 is the live broadcast category, that is, it does not belong to the preset category, the content module microservice determines whether N2 belongs to the first preset interval. If N2 belongs to the first preset interval, then it determines... The media list module updates every 1 second, the interaction module every 10 seconds, and the media description module every 10 minutes. If the cache time of cached media data k11 in the media list module reaches 1 second, the content module microservice retrieves media data k12 from the media list service in the data caching layer and replaces k11 with k12, thus updating the cached media data in the media list module. If the cache time of cached media data k21 in the interaction module does not reach 10 seconds, the content module microservice does not update the cached media data in the interaction module. Similarly, if the cache time of cached media data k31 in the media description module does not reach 10 minutes, the content module microservice does not update the cached media data in the media description module.
[0252] The data processing method for the aforementioned media page involves the server responding to a page access request for the target media initiated by the terminal. Based on the media set identifier of the media set to which the target media belongs, the server queries the access popularity value of the media set. Based on the access popularity value and the media category to which the media set belongs, the server determines the cache update method for the target content module in the media page of the target media, and updates the cached media data of the target content module according to the cache update method. The cache update method for the target content module is determined based on the access popularity value and the media category, making the cache update method for the target content module applicable to various application scenarios with different access popularity values and different media categories.
[0253] Furthermore, the method of caching and updating data for the entire media page by the server requires caching and updating the data of each media page in a media set that includes multiple media pages. Since some data is identical across these media pages, it will also be cached and updated repeatedly. For example, the content of the media description module in the media set will be displayed in the same way across all media pages. Therefore, caching and updating data for the entire media page results in a large amount of data being cached and updated by the server. In contrast, the data processing method described above caches and updates data for the target content module. Identical data across media pages in the media set corresponds to a single content module. Therefore, caching and updating media data for the target content module within a media page is more flexible, involves a smaller amount of data for updating the cache, reduces server bandwidth pressure, improves server response speed, and makes accessing media pages smoother.
[0254] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0255] Based on the same inventive concept, this application also provides a media page data processing apparatus for implementing the aforementioned media page data processing method. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more media page data processing apparatus embodiments provided below can be found in the limitations of the media page data processing method described above, and will not be repeated here.
[0256] In some embodiments, such as Figure 13 As shown, a data processing device for a media page is provided, including: a media set identifier determination module 100, an access popularity value determination module 200, a cache update method determination module 300, and a data update module 400;
[0257] The media set identifier determination module 100 is used to obtain the media set identifier corresponding to the target media in response to the page access request of the target media; the media set identifier is the identifier of the media set to which the target media belongs;
[0258] The access popularity value determination module 200 is used to query the access popularity value corresponding to the media set identifier;
[0259] The cache update method determination module 300 is used to determine the cache update method of the target content module in the media page of the target media based on the access popularity value and the media category to which the target media belongs;
[0260] The data update module 400 is used to update the cached media data corresponding to the target content module based on the cache update method.
[0261] In some embodiments, the access popularity value determination module 200 includes:
[0262] The query unit is used to find the first access popularity value of a media set identifier in the global media popularity data; the global media popularity data is the access popularity data of the global media set; or,
[0263] The query unit is used to find the second access popularity value of the media set identifier in the local media popularity data; the local media popularity data is the access popularity data of each media set under the preset category.
[0264] In some embodiments, the query unit includes:
[0265] The interface call subunit is used to call the data query interface of the storage system; the storage system stores global media popularity data and local media popularity data.
[0266] The query subunit is used to search for the first access popularity value corresponding to the media set identifier in the global media popularity data of the storage system through the data query interface; or,
[0267] The query subunit is used to search for the second access popularity value corresponding to the media set identifier in the local media popularity data of the storage system through the data query interface.
[0268] In some embodiments, the data processing apparatus for the media page further includes:
[0269] The popularity data update module is used to periodically collect page access requests within a target time window; based on each collected page access request, it determines the number of times each media set is accessed within the target time window; each accessed media set includes media sets under a preset category; based on the number of times each media set is accessed, it updates the global media popularity data; the global media popularity data is the access popularity data of the global media sets; based on the number of times each media set under a preset category is accessed, it updates the local media popularity data; the local media popularity data is the access popularity data of each media set under a preset category.
[0270] In some embodiments, the popularity data update module includes:
[0271] The timed acquisition unit is used to determine the window sliding step size; slide the target time window according to the window sliding step size, and collect page access requests within the target time window after each slide.
[0272] In some embodiments, the popularity data update module includes:
[0273] The access count determination unit is used to perform stream computation on the media set identifier of each accessed media set to obtain the word frequency corresponding to each accessed media set; based on the word frequency corresponding to each accessed media set, the access count corresponding to each accessed media set is determined.
[0274] In some embodiments, the access popularity value includes a first access popularity value reflecting the media set to which the target media belongs within the global media set; the cache update method determination module includes:
[0275] The first determining unit is used to determine the timed update time of the media list module, interaction module, and media description module in the media page of the target media when the media category to which the target media belongs does not belong to a preset category and the first access popularity value belongs to a first preset range; wherein, the media list module, interaction module, and media description module belong to the target content module.
[0276] In some embodiments, the access popularity value includes a second access popularity value reflecting the media set to which the target media belongs within each media set under a preset category; the cache update method determination module includes:
[0277] The first determining unit is used to determine the timed update time of the media description module, popular media clip module, and media list module in the media page of the target media when the media category to which the target media belongs belongs to a preset category and the second access popularity value belongs to a second preset range; wherein, the media description module, popular media clip module, and media list module belong to the target content module.
[0278] In some embodiments, the cache update method includes a timed update interval; the data processing device for the media page further includes:
[0279] The origin pull module is used to obtain the origin pull method of the data layer service corresponding to the target content module. The origin pull method is determined based on the access popularity value when updating the media to be updated that belongs to the media set. The media data of the data layer service is updated according to the origin pull method to obtain the updated media data.
[0280] Accordingly, the data update module is used to update the cached media data corresponding to the target content module based on the updated media data when the scheduled update time is reached.
[0281] In some embodiments, the data layer services corresponding to the target content module include a media description service and a media list service; the origin-following module includes:
[0282] The origin identifier determination unit is used to determine the origin identifier corresponding to the media description service and the media list service according to the origin method.
[0283] The source update unit is used to update the media data corresponding to the media description service and the media list service if each source identifier meets the preset source conditions.
[0284] In some embodiments, the data update module includes:
[0285] The data update unit is used to update the cached media data corresponding to the target content module if the cached media data corresponding to the target content module meets the cache update method.
[0286] The data processing device for the media page also includes:
[0287] The data sending module is used to obtain the updated cached media data corresponding to the target content module; obtain the sender identifier of the page access request of the target media; and send the updated cached media data to the sender based on the sender identifier.
[0288] The data sending module is also used to obtain the sender identifier of the page access request of the target media if the cached media data corresponding to the target content module does not meet the cache update method; and to send the cached media data to the sender based on the sender identifier.
[0289] The modules in the data processing device for the aforementioned media page can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0290] In some embodiments, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows: Figure 14 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores global media popularity data, local media popularity data, cached media data, etc. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a media page data processing method.
[0291] Those skilled in the art will understand that Figure 14 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0292] In some embodiments, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the data processing method for the media page described above.
[0293] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the data processing method for the media page described above.
[0294] In some embodiments, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the data processing method for the media page described above.
[0295] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0296] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0297] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0298] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A data processing method for a media page, characterized in that, The method includes: In response to a page access request from the target media, obtain the media set identifier corresponding to the target media; the media set identifier is the identifier of the media set to which the target media belongs; Query the access popularity value corresponding to the media set identifier; the access popularity value includes the first access popularity value reflecting the media set to which the target media belongs within the global media set; If the media category to which the target media belongs does not belong to a preset category, and the first access popularity value belongs to a first preset range, the timed update time corresponding to the media list module, interaction module, and media description module in the media page of the target media is determined; wherein, the media list module, the interaction module, and the media description module belong to the target content module; The cached media data corresponding to the target content module is updated based on the scheduled update time.
2. The method according to claim 1, characterized in that, The query for the access popularity value corresponding to the media set identifier includes: Search for the first access popularity value of the media set identifier in the global media popularity data; the global media popularity data is the access popularity data of the global media set; or, The second access popularity value of the media set identifier is found in the local media popularity data; the local media popularity data is the access popularity data of each media set under the preset category.
3. The method according to claim 2, characterized in that, The step of searching for the first access popularity value of the media set identifier in the global media popularity data includes: Call the data query interface of the storage system to find the first access popularity value corresponding to the media set identifier in the global media popularity data of the storage system; The step of searching for the second access popularity value of the media set identifier in the local media popularity data includes: Call the data query interface of the storage system to find the second access popularity value corresponding to the media set identifier in the local media popularity data of the storage system.
4. The method according to claim 1, characterized in that, The method further includes: Periodically collect page access requests within a target time window; Based on each page access request collected, the number of accesses to each media set accessed within the target time window is determined; each accessed media set includes media sets under a preset category. The global media popularity data is updated based on the number of visits to each media set; the global media popularity data is the access popularity data of the global media set. The local media popularity data is updated based on the number of visits to each media set under the preset category; the local media popularity data is the access popularity data of each media set under the preset category.
5. The method according to claim 4, characterized in that, The periodic collection of page access requests within the target time window includes: Determine the window sliding step size; The target time window is slid according to the window sliding step size, and after each slide, the page access requests within the target time window after the slide are collected.
6. The method according to claim 4, characterized in that, Determining the number of accesses for each media set accessed within the target time window includes: Stream computation is performed on the media set identifiers of each accessed media set to obtain the word frequency corresponding to each accessed media set; Based on the word frequency corresponding to each media set accessed, the number of accesses corresponding to each media set accessed is determined.
7. The method according to claim 1, characterized in that, The access popularity value includes a second access popularity value that reflects the media set to which the target media belongs in each media set under a preset category; The method further includes: If the media category to which the target media belongs belongs to the preset category and the second access popularity value belongs to the second preset range, determine the timed update time corresponding to the media description module, popular media segment module and media list module in the media page of the target media. The media description module, the popular media clips module, and the media list module belong to the target content module.
8. The method according to claim 1, characterized in that, The method further includes: Obtain the origin pull method of the data layer service corresponding to the target content module; the origin pull method is determined based on the access popularity value when updating the media to be updated belonging to the media set; Update the media data of the data layer service according to the origin pull method to obtain the updated media data; The step of updating the cached media data corresponding to the target content module based on the scheduled update time includes: When the scheduled update time is reached, the cached media data corresponding to the target content module is updated based on the updated media data.
9. The method according to claim 8, characterized in that, The data layer services corresponding to the target content module include a media description service and a media list service; updating the media data of the data layer services according to the origin-following method to obtain updated media data includes: According to the origin retrieval method, determine the origin retrieval identifier corresponding to the media description service and the media list service respectively; If each of the aforementioned origin identifiers meets the preset origin conditions, then the media data corresponding to the media description service and the media list service are updated respectively.
10. The method according to any one of claims 1 to 7, characterized in that, The step of updating the cached media data corresponding to the target content module based on the scheduled update time includes: If the cached media data corresponding to the target content module meets the timed update time, then update the cached media data corresponding to the target content module. The method further includes: Obtain the updated cached media data corresponding to the target content module; Obtain the sender identifier of the page access request for the target media; The updated cached media data is sent to the sender based on the sender identifier.
11. The method according to any one of claims 1 to 9, characterized in that, The method further includes: If the cached media data corresponding to the target content module does not meet the timed update time, then obtain the sender identifier of the page access request for the target media; The cached media data is sent to the sender based on the sender identifier.
12. A data processing device for a media page, characterized in that, The device includes: The media set identifier determination module is used to obtain the media set identifier corresponding to the target media in response to a page access request of the target media; the media set identifier is the identifier of the media set to which the target media belongs; The access popularity value determination module is used to query the access popularity value corresponding to the media set identifier; the access popularity value includes a first access popularity value reflecting the media set to which the target media belongs within the global media set; The cache update method determination module includes a first determination unit, used to determine the timed update time of the media list module, interaction module and media description module in the media page of the target media when the media category to which the target media belongs does not belong to a preset category and the first access popularity value belongs to a first preset range; wherein, the media list module, the interaction module and the media description module belong to the target content module; The data update module is used to update the cached media data corresponding to the target content module based on the scheduled update time.
13. The apparatus according to claim 12, characterized in that, The access popularity value determination module includes a query unit, which is used to search for a first access popularity value of the media set identifier in the global media popularity data; the global media popularity data is the access popularity data of the global media set; or, to search for a second access popularity value of the media set identifier in the local media popularity data; the local media popularity data is the access popularity data of each media set under a preset category.
14. The apparatus according to claim 13, characterized in that, The query unit includes: The interface call subunit is used to call the data query interface of the storage system; the storage system stores global media popularity data and local media popularity data. The query subunit is used to search for the first access popularity value corresponding to the media set identifier in the global media popularity data of the storage system through the data query interface; or, through the data query interface, to search for the second access popularity value corresponding to the media set identifier in the local media popularity data of the storage system.
15. The apparatus according to claim 12, characterized in that, The device also includes a popularity data update module, which is used to periodically collect page access requests within a target time window; and based on each collected page access request, determine the number of times each media set accessed within the target time window is accessed. The accessed media sets include media sets under preset categories; the global media popularity data is updated based on the number of accesses to each accessed media set. The global media popularity data refers to the access popularity data of the global media set; The local media popularity data is updated based on the number of visits to each media set under the preset category; The local media popularity data refers to the access popularity data of each media set under the preset category.
16. The apparatus according to claim 15, characterized in that, The popularity data update module includes a timed acquisition unit, which is used to determine the window sliding step size; slide the target time window according to the window sliding step size, and collect page access requests within the target time window after each slide.
17. The apparatus according to claim 15, characterized in that, The popularity data update module includes an access count determination unit, which is used to perform stream calculation on the media set identifier of each accessed media set to obtain the word frequency corresponding to each accessed media set; Based on the word frequency corresponding to each media set accessed, the number of accesses corresponding to each media set accessed is determined.
18. The apparatus according to claim 12, characterized in that, The access popularity value includes a second access popularity value that reflects the media set to which the target media belongs in each media set under a preset category; The first determining unit is further configured to determine the timed update time of the media description module, popular media segment module and media list module in the media page of the target media when the media category to which the target media belongs belongs to the preset category and the second access popularity value belongs to the second preset range; The media description module, the popular media clips module, and the media list module belong to the target content module.
19. The apparatus according to claim 12, characterized in that, The device further includes a back-to-origin module, which is used to obtain the back-to-origin method of the data layer service corresponding to the target content module; the back-to-origin method is determined based on the access popularity value when updating the media to be updated belonging to the media set; the media data of the data layer service is updated according to the back-to-origin method to obtain the updated media data; The data update module is also used to update the cached media data corresponding to the target content module based on the updated media data when the scheduled update time is reached.
20. The apparatus according to claim 19, characterized in that, The data layer services corresponding to the target content module include media description service and media list service; the origin return module includes: The origin identification determination unit is used to determine the origin identification corresponding to the media description service and the media list service respectively according to the origin method. The source update unit is used to update the media data corresponding to the media description service and the media list service respectively if each of the source identifiers meets the preset source conditions.
21. The apparatus according to any one of claims 12 to 18, characterized in that, The data update module includes a data update unit, which is used to update the cached media data corresponding to the target content module if the cached media data corresponding to the target content module meets the timed update time. The device further includes a data sending module, which is used to acquire updated cached media data corresponding to the target content module; Obtain the sender identifier of the page access request for the target media; The updated cached media data is sent to the sender based on the sender identifier.
22. The apparatus according to any one of claims 12 to 20, characterized in that, The device further includes a data sending module, which is used to obtain the sender identifier of the page access request of the target media if the cached media data corresponding to the target content module does not meet the timed update time. The cached media data is sent to the sender based on the sender identifier.
23. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
24. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
25. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.