Methods, apparatus, electronic devices, storage media, and programs for identifying popular external links
Patent Information
- Application Number
- JP2026116052
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-09-29
- Filing Date
- 2026-06-24
- Publication Date
- 2026-09-03
AI Technical Summary
【0009】 本開示の方案を用いて、多段キャッシュメカニズムを導入してトリプレットカウンタに対して階層処理とフィルタリングを行うことにより、従来技術の高同時シナリオにおける性能ボトルネックを効果的に克服し、人気外部リンクの識別効率とリアルタイム性を大幅に向上することができる。
Smart Images

Figure 2026140941000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to the field of data processing technology, in particular to the fields of file sharing, data statistics, etc., and can be used for application scenarios such as external link identification, and specifically relates to a method, an apparatus, an electronic device and a storage medium for identifying popular external links. [Background Art]
[0002] File storage and sharing services support users to share resources in the form of external links. When a user shares an external link of a file to various platforms, it may cause widespread dissemination and access. Timely and accurate identification of these popular external links is extremely important for optimizing the arrangement of network resources and implementing precise operation policies to improve service value. However, in the prior technical solutions, when faced with a large amount of external link access data, it is difficult to meet the requirements of low computational cost and high real-time performance at the same time. [Summary of the Invention] [Problem to be Solved by the Invention]
[0003] The present disclosure provides a method, an apparatus, an electronic device, a storage medium and a program for identifying popular external links. [Means for Solving the Problem]
[0004] In a first aspect of the present disclosure, there is provided a method for identifying a popular external link, the method comprising: obtaining, according to a user's operation on an external link, an external link identifier, a user area code and an operation type, and constructing a triplet counter, wherein each counter corresponds to one {external_link_area_operation_type} dimension; performing hierarchical processing and filtering on the triplet counter by using multi-level cache, and identifying potential popular triplets; Identifying persistently popular external links based on potential popularity triplets, associated with counter values for the current time period and the past M historical time periods, where M is a positive integer; This includes outputting the results of identifying popular external links.
[0005] A second aspect of this disclosure provides a device for identifying popular external links, the device being: An operation count module for obtaining an external link identifier, user location area code, and operation type in response to a user's operation on an external link, and constructing a triplet counter, wherein each counter corresponds to one {external link_area_operation type} dimension. A multi-stage filtering module that uses a multi-stage cache to perform hierarchical processing and filtering on triplet counters to identify potentially popular triplets, A popularity identification module for identifying persistently popular external links, where M is a positive integer, based on potential popularity triplets, and associated with counter values for the current time period and the past M historical time periods. It includes a result output module for outputting the identification results of popular external links.
[0006] A third aspect of this disclosure provides an electronic device, which is At least one processor, The system comprises at least one processor and memory that is communicated with, The memory stores instructions that are executable by the at least one processor, and when executed by the at least one processor, the instructions cause one of the methods in the embodiments of the present disclosure to be performed.
[0007] A fourth aspect of this disclosure provides a non-temporary computer-readable storage medium that stores computer instructions for causing a computer to perform any one of the methods of the embodiments of this disclosure.
[0008] A fifth aspect of this disclosure provides a program, when executed by a processor, for performing any one of the methods in the embodiments of this disclosure.
[0009] By using the method disclosed herein, a multi-stage caching mechanism is introduced to perform hierarchical processing and filtering on triplet counters, thereby effectively overcoming the performance bottlenecks in high-concurrent scenarios of conventional technologies and significantly improving the identification efficiency and real-time capabilities of popular external links.
[0010] It should be understood that the information contained herein is not intended to describe any key points or important features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Further details of other features of this disclosure will be provided in the specification below.
[0011] The attached drawings are for the purpose of providing a better understanding of this solution and do not constitute a limitation of this disclosure. [Brief explanation of the drawing]
[0012] [Figure 1] This is a flowchart of the method for identifying popular external links according to the embodiments of this disclosure. [Figure 2] This is a schematic diagram of the three-tiered cache structure according to the embodiments of this disclosure. [Figure 3] This is another flowchart of the method for identifying popular external links according to the embodiments of this disclosure. [Figure 4] This is a schematic diagram of the structure of a popular external link identification device according to an embodiment of the present disclosure. [Figure 5] This is a schematic diagram illustrating the scenario of a method for identifying popular external links according to an embodiment of the present disclosure. [Figure 6] This is a block diagram of an electronic device for a method of identifying popular external links to implement an embodiment of the present disclosure. [Modes for carrying out the invention]
[0013] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the accompanying drawings. These drawings contain various details of the embodiments of the present disclosure to facilitate understanding, and these should be considered to be merely illustrative. Therefore, it should be understood by those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, descriptions of well-known features and structures are omitted in the following description for the sake of clarity and conciseness.
[0014] The terms "first" and "second" herein are used to designate and distinguish a plurality of similar technical terms, and are not intended to limit the order, nor are they intended to limit that there are only two such terms. For example, a first feature and a second feature refer to two types / two features, the first feature may be one or more, and the second feature may also be one or more.
[0015] In addition, in order to describe the present specification more clearly, many details are set forth in the following specific embodiments. It should be understood by those skilled in the art that the present specification can be practiced without these details. In order to clarify the gist of the present specification, detailed descriptions of methods, means, components and circuits well known to those skilled in the art are omitted.
[0016] Before describing the technical aspects of the embodiments of the present disclosure, further explanations will be given on technical terms that may be used in the present disclosure.
[0017] External link: an externally accessible link generated by a user for a personal file in a storage system, through which other people can directly save, view, play and download the file without needing to log in to the storage system.
[0018] Among related technologies, current popular resource statistics mainly employ two approaches. One is implemented using a simple counter in a remote dictionary service (Redis), where the access count increases by 1 each time an external link is viewed, and access data for all counters is statistically compiled and sorted periodically. However, with Redis's simple counter, if the amount of access data is sufficiently large, the number of counters that need to be maintained becomes very high, resulting in very high computational costs and making it unacceptable. On the other hand, statistics using big data platforms have relatively strong computational power and can process large amounts of data, but their consumption of computational resources is relatively high. In a minute-by-minute real-time identification scenario, the consumption of computational resources to meet the demand for statistically compiling large amounts of data every minute increases tens of times compared to hourly, failing to effectively meet real-time requirements and facing relatively high resource pressure.
[0019] This disclosure proposes a method for identifying popular external links to at least partially solve one or more of the aforementioned problems and other potential problems. By constructing a technical means that combines a counter based on a triplet of {external link_area_operation type} with multi-stage cache hierarchical processing, the system can handle high concurrent access with lower data processing latency, thereby ensuring minute-by-minute real-time performance and significantly improving the overall identification efficiency of popular external links and system throughput. First, through a sequential filtering mechanism of multi-stage cache, a rapid reduction in data volume is achieved, effectively overcoming the excessive computational costs or huge resource consumption of big data platforms in conventional technologies due to the maintenance of large counters, and significantly reducing the system's storage and computational load. Second, the method ensures minute-by-minute real-time performance for popularity identification, enabling business systems to respond to changes in popularity in a timely manner, improving the timeliness and accuracy of operational policy adjustments. Furthermore, the multi-dimensional statistical capabilities by area and behavior type allow the system to accurately adapt to user behavior characteristics and policy environments in different regions, improving the system's applicability and management efficiency.
[0020] Embodiments of the present disclosure provide a method for identifying popular external links. Figure 1 is a flowchart of a method for identifying popular external links according to an embodiment of the present disclosure, and the method for identifying popular external links can be applied to an apparatus for identifying popular external links. The apparatus for identifying popular external links is located in an electronic device. The electronic device includes, but is not limited to, a fixed device and / or a mobile device. For example, the fixed device includes, but is not limited to, a server, and the server may be a cloud server or a conventional server. For example, the mobile device includes, but is not limited to, an external link identification device, and the external link identification device may be a mobile phone, a tablet computer, a vehicle-mounted terminal, or the like. In some possible implementations, the method for identifying popular external links can also be implemented by a processor invoking computer-readable instructions stored in a memory. As shown in Figure 1, the method for identifying popular external links includes the following.
[0021] In S101, in response to a user's operation on an external link, an external link identifier, a user location area code and an operation type are acquired, and a triplet counter is constructed.
[0022] In S102, hierarchical processing and filtering are performed on the triplet counter by using multi-level cache to identify potential popular triplets.
[0023] In S103, based on the potential popular triplets, sustained popular external links are identified in combination with counter values of a current time period and M past historical time periods.
[0024] In S104, an identification result of popular external links is output.
[0025] Here, the external link identifier refers to a unique identifier for an external link. In embodiments of this disclosure, the external link identifier may be a unique identification number (Identity document, ID) generated for each external link, which can be used to distinguish different external links.
[0026] Here, the user location area code refers to an area or area code determined by geographic positioning technology based on the user's Internet Protocol (IP) address. In the embodiments of this disclosure, the user location area code may be an area code from an International Organization for Standardization (ISO) standard.
[0027] Here, the operation type refers to the action a user performs on an external link. In embodiments of this disclosure, the operation type may include at least one of viewing, playing, downloading, sharing, or commenting.
[0028] Here, a counter refers to a tool or mechanism for recording the occurrence count of an event, which has a core function of statistically counting the number of a particular event or object. In particular, each triplet counter corresponds to one {external link_area_operation type} dimension.
[0029] In embodiments of this disclosure, when a user performs an operation on an external link, specific information about the operation, including the corresponding external link identifier, the area code located by the user's IP address, and the type of user operation, can be recorded, and a unique triplet can be constructed using this information. For example, if a user performs a download operation on external link A in area CN, the constructed triplet counter may be {A_CN_Download}.
[0030] Here, multi-tiered caching refers to a technique for storing and processing data in a hierarchical manner. In the embodiments of this disclosure, the multi-tiered caching can be divided into a large-capacity primary cache and a relatively small-capacity secondary cache in order to filter and store data according to different policies at different tiers.
[0031] Here, a potentially popular triplet refers to a triplet whose count value increases rapidly in a short period of time and which has the potential to become popular. In embodiments of this disclosure, a potentially popular triplet may not have fully achieved the final popularity criteria, but it has a potential trend towards becoming popular.
[0032] In embodiments of this disclosure, triplet counter data is placed in different tiers of caches according to a popularity distribution. Exemplarily, a primary cache can store frequently accessed triplet data for short periods, and a secondary cache can periodically transfer frequently accessed triplets. In the secondary cache, this count data can be processed more comprehensively, and mechanisms such as sorting and filtering can identify triplets with high count values or relatively fast growth rates. Finally, identified triplets can be designated as potential popular triplets.
[0033] Here, the current time period refers to the time interval during which statistics are currently being performed. In embodiments of this disclosure, the current time period may be a customized time window, such as minutes or hours.
[0034] Here, the historical time period refers to several time intervals from which statistics are performed prior to the time series. In embodiments of this disclosure, the historical time period can be used to compare and analyze persistent change trends.
[0035] Here, a persistently popular external link refers to an external link that exhibits relatively high popularity over multiple time periods. In embodiments of this disclosure, a persistently popular external link has a consistently high volume of access or interaction over a certain period of time.
[0036] In embodiments of the present disclosure, a counter value for the current time period can be compared with counter data from the past M historical time periods based on filtered potential popular triplets. Exemplarily, if a triplet's counter value remains relatively high in the current time period and shows a sustainedly high popularity or increasing trend compared to historical data, the corresponding external link of that triplet is recognized as a sustained popular external link.
[0037] Here, the recognition result is the output of the recognized popular external link. In embodiments of this disclosure, the identification result may include information such as an external link identifier, area code, operation type, and its popularity level.
[0038] In embodiments of this disclosure, a corresponding results list or log can be generated for external links identified as popular, specifically including the external link identifier, popularity data, location area code, and popularity level. Exemplarily, the identification results can be output in the form of a report, real-time push, or an Application Programming Interface (API) interface.
[0039] The technical aspects of the embodiments of this disclosure achieve fine-grained statistics of user access behavior through a triplet counter structure based on external links, areas, and behavior types, significantly improving the accuracy and dimensional richness of popularity identification. By using a hierarchical processing mechanism of multi-stage caching, high-frequency access data is aggregated and sorted in real time in the primary cache, effectively reducing the computational load on the system's global data and significantly improving data processing efficiency and overall system performance. Furthermore, by setting a time cycle of minutes to perform popularity determination and output, the system can complete the identification task within near real-time latency, fully satisfying the high timeliness requirements of the business side. In addition, by fusing access data from the current cycle and multiple historical cycles, the system can dynamically capture the persistence and changing trends of external link popularity, enabling continuous tracking and intelligent prediction of popular resources. Finally, the output structured popularity identification results provide a standardized data interface to downstream business systems, providing highly timely data input to automated decision-making functions such as automatic resource scheduling and dynamic policy placement, and improving the degree of automation in system management.
[0040] In some embodiments, the multi-tiered cache includes at least two tiers of cache, and the tiering and filtering includes: updating and preliminary filtering of triplet counters in the first tier cache according to a first predetermined policy to obtain a first candidate set; further filtering of the first candidate set in the next tier cache according to a second predetermined policy to obtain a second candidate set with less data than the first candidate set; and determining potential popular triplets based on the second candidate set.
[0041] Here, the first-tier cache refers to the first tier of a cache mechanism used for triplet counters to store frequently accessed or manipulated data streams. In the embodiments of this disclosure, the capacity of the first-tier cache is maximum, and the maximum number of counters that can be stored is the product of the number of external links, the number of areas, and the number of actions.
[0042] Here, the first predetermined policy refers to a set of rules or algorithms implemented in a first-tier cache used to filter or update data. In embodiments of this disclosure, the first predetermined policy may be an incremental statistics of a counter, an access frequency sort, or a fast filtering policy in a time window.
[0043] Here, the first candidate set refers to the set of triplets generated after the first-tier cache has been pre-filtered. In embodiments of the present disclosure, the triplets in the first candidate set may have relatively high popularity or a rapidly increasing trend.
[0044] In embodiments of the present disclosure, counter data can be pre-filtered in a first-tier cache based on a first predetermined policy. Exemplary filtering rules of the first predetermined policy may include setting a threshold number of times to filter high-popularity triplets, sorting by access frequency to select the most active triplets, or dynamically tracking popularity increases based on short-time window access data. Upon completion of filtering, a first candidate set containing the pre-identified high-popularity triplets is generated.
[0045] Here, the next-level cache refers to a second or higher level of caching mechanism for further storing and filtering data filtered by the first-level cache. In the embodiments of this disclosure, the capacity of the next-level cache is much smaller than the capacity of the first-level cache.
[0046] Here, the second predetermined policy refers to a set of deeper filtering rules or algorithms implemented in the next level of the cache to further narrow the range of the candidate set. In embodiments of this disclosure, the second predetermined policy may include, for example, integrated popularity calculation, growth trend determination, or comparative analysis across time periods.
[0047] Here, the second candidate set refers to the data set obtained through a second predetermined policy filtering in the next level of the cache. In the embodiments of this disclosure, the amount of data in the second candidate set is less than that of the first candidate set, but it includes potential popular triplets and has higher accuracy.
[0048] In embodiments of this disclosure, the first candidate set generated by the first-tier cache is propagated to the next-tier cache for further filtering and processing. Furthermore, the first candidate set is filtered in the next-tier cache using a second predetermined policy. Exemplary filtering rules of the second predetermined policy may include integrating counter values and popularity growth rates to filter out the triplets with the most pronounced popularity change trends; performing comparative analysis across time periods to retain triplets that are active across multiple time periods; or filtering according to geographical distribution to prioritize triplets experiencing a surge in access within a particular area. Once filtering is complete, a second candidate set is generated, which has less data than the first candidate set but contains the final potential popularity triplets and has higher accuracy.
[0049] In embodiments of this disclosure, potential popular triplets can be determined based on a second candidate set. Exemplaryly, any of the triplets in the second candidate set may be determined as a potential popular triplet, or the second candidate set may be re-filtered and the filtered results determined as potential popular triplets. In particular, potential popular triplets are characterized by high access volume, a prominent growth trend, and strong persistence of popularity.
[0050] In this way, by using multi-tiered caching to layer data processing tasks, direct processing of the entire dataset is avoided, computational pressure is reduced, and overall processing efficiency is improved. The first-tier cache is responsible for high-speed filtering of high-frequency data, while the next-tier cache is responsible for deep analysis and precise filtering, and by combining the two, efficient data processing can be achieved. The first-tier cache reduces the amount of data that needs to be further processed through preliminary filtering, and the next-tier cache further reduces the data scope, reducing memory demand and the consumption of computational resources, effectively avoiding the high cost of full computation, especially in mass data scenarios. The first-tier cache can process data in real time, respond quickly to user operations, and generate a first candidate set, while the next-tier cache can be combined with more complex policies to further identify popularity and ensure the real-time demand for identifying minute-by-minute popularity external links. Through multi-stage filtering, the data scope is gradually reduced, and from preliminary candidates to the identification of the final potential popularity triplet, multi-dimensional elements (e.g., popularity, growth trend, regional distribution, etc.) are comprehensively considered to make more accurate judgments and avoid misjudgments and omissions.
[0051] In some embodiments, the caching has at least two levels, specifically including a first-level cache, a second-level cache, and a third-level cache, where the hierarchical processing and filtering involves updating counter values in the first-level cache at a minute-by-minute time granularity, with each counter having a minute-by-minute expiration date, and when the counter value in the first-level cache exceeds a preset threshold, the corresponding information is stored in the second-level cache, and the third-level cache periodically queries the second-level cache, sorts the retrieved triplets, and filters out potentially popular triplets.
[0052] Here, the minute-by-minute expiration time is the limit on the storage time of each counter in the first-tier cache. In embodiments of this disclosure, if the lifetime of any counter exceeds the minute-by-minute expiration time, the counter is automatically removed. Exemplarily, the minute-by-minute expiration time is between 1 and 10 minutes, and the expiration time can be dynamically adjusted depending on the load.
[0053] In the embodiments of this disclosure, the triplet counter value can be updated in the first-tier cache with a time granularity of minutes. For example, when a user performs an operation on an external link, the counter value corresponding to the external link, its area, and the operation type is incremented by 1, with the counter having a time granularity of minutes. Furthermore, each counter has an expiration time set in minutes, and when its lifetime exceeds the minute-by-minute expiration time, the counter is cleared and memory resources are released.
[0054] Here, the first-tier cache is the first layer of a caching mechanism for storing frequently accessed data over short periods and updating counters in real time, ensuring efficient processing of popular data. For example, the first-tier cache can be implemented based on a Redis database using a key-value counter, a triplet string for the key, and an integer count for the value.
[0055] Here, a pre-set threshold is used to determine whether to transfer a certain counter value from the first-tier cache to the second-tier cache. This threshold is typically a limit on the counter value, and only when the counter value exceeds this threshold is it considered that the triplet may have a certain level of popularity or potential trend.
[0056] Here, the correspondence information refers to information about the counter. In the embodiments of this disclosure, the correspondence information can be transferred to a second-tier cache for further processing.
[0057] Here, the second-tier cache refers to the second layer of a caching mechanism that can be used to store data filtered from the first-tier cache. In the embodiments of this disclosure, the second-tier cache can be implemented based on a Redis database using a key-value store counter, a key as a triplet string, and a value as an integer count.
[0058] In the embodiments of this disclosure, when a counter value reaches or exceeds a preset threshold, corresponding information related to the counter can be stored in a second-tier cache. Furthermore, the second-tier cache can further filter the data transferred from the first-tier cache to include popular data and store these filtering results for subsequent analysis.
[0059] Here, the third-tier cache refers to the third layer of the caching mechanism, which allows for periodic queries, sorting, and fine-tuning of data filtered from the second-tier cache, ultimately enabling the identification of potential popular triplets.
[0060] In the embodiments of this disclosure, a third-tier cache periodically queries the triplet data stored in the second-tier cache and sorts its count values. Exemplaryly, more filtering criteria (e.g., incremental popularity, time trend, etc.) can be combined to ultimately identify potential popular triplets.
[0061] In this way, the third-tier caching mechanism enables tiered data processing and stepwise filtering, effectively reducing memory and computational pressure and improving overall processing efficiency. Setting minute-by-minute expiration times ensures that data in the first-tier cache always maintains relatively high timeliness, avoiding resource waste from storing invalid data. Pre-configured thresholds and data volume reduction policies allow popular data to quickly stand out from large amounts of normal data, guaranteeing the accuracy of filtering results. Sorting and multidimensional filtering in the third-tier cache further improve the accuracy of popularity identification, supporting periodic data analysis and processing.
[0062] In some embodiments, updating counter values in a first-tier cache with a time granularity of minutes includes determining the current time period based on the operation time in response to the user's operation on an external link, and incrementing the value of the corresponding triplet counter based on the current time period.
[0063] Here, the current time period refers to a time window divided into predefined time units (e.g., minutes) used to statistically record the time periods in which user operations occurred. In embodiments of this disclosure, the current time period has a time granularity of minutes, and each time period represents an independent time segment.
[0064] In embodiments of this disclosure, when a user performs an operation on an external link, the timestamp of the operation can first be captured. The timestamp can then be compared with a predefined time period to determine which time period the operation belongs to.
[0065] In the embodiments of this disclosure, first, a triplet counter corresponding to the current time period can be located based on the external link identifier of the user operation, the user's location area code, and the operation type, and its value can be incremented by 1.
[0066] Thus, the minute-by-minute time cycle ensures that user interaction data is quickly aggregated into corresponding time windows, providing highly accurate time segmentation for real-time popularity identification. Simultaneously, manipulating the increment counter value allows for rapid reflection of changing user behavior trends, providing an accurate statistical basis for subsequent filtering and analysis.
[0067] In some embodiments, updating a counter value in the first-tier cache can be achieved by generating one count update instruction for each user operation event and processing the count update instruction to perform a 1-increment operation on the corresponding counter in the first-tier cache.
[0068] Specifically, when a user performs an operation event (e.g., viewing, playing, or downloading an external link), information about that operation, such as the external link identifier, the user's area code, the operation type, and the operation time, can be captured. Then, based on this information, a count update instruction can be generated, the instruction containing the triplet and the operation type (increment + 1) indicating that the triplet counter needs to triplet. This step converts the user's actions into standardized instructions to facilitate subsequent operation processing. Furthermore, the count update instruction can be sent to a first-tier cache for processing. The cache retrieves the corresponding counter based on the triplet information in the instruction and performs the increment operation.
[0069] In some embodiments, the corresponding information includes a triplet identifier and a counter value.
[0070] Here, a triplet identifier is used to uniquely identify a combination of values for a particular data group and typically consists of three dimensions of information. In embodiments of this disclosure, the triplet identifier can be a combination of an external link identifier, an area code, and an operation type. Among these, the external link identifier is used to label a specific external link and is a core object of data processing; the area code is used to identify the area or region where the user is located and can distinguish regional access traffic; and the operation type is used to identify a specific action performed by the user and can distinguish different methods of interaction.
[0071] In the embodiments of this disclosure, when a counter value in the first-tier cache exceeds a preset threshold, data transfer logic is triggered, and the triplet identifier and counter value corresponding to the counter are stored in the second-tier cache. Specifically, it is possible to first check whether a record matching the triplet identifier exists in the second-tier cache. If a record already exists, the counter value is updated, and the counter value in the first-tier cache is cumulatively added to the corresponding record in the second-tier cache to ensure the continuity of data statistics. Conversely, if there is no corresponding record in the second-tier cache, a new entry is created, the triplet identifier and counter value are stored in the second-tier cache, and at the same time, a relevant timestamp or other metadata is recorded for use in subsequent analysis. In particular, when data is stored in the second-tier cache, further filtering conditions can be set or data compression can be performed based on business requirements, further optimizing the data storage structure of the second-tier cache.
[0072] Thus, the second-tier cache storage policy allows data to have greater timeliness and structure, providing more precise candidate data for subsequent popularity analysis while simultaneously reducing storage and computation costs.
[0073] In some embodiments, pre-configured thresholds are dynamically set based on historical popularity data statistics, and differential thresholds are set for different areas or operation types.
[0074] Here, historical popularity data refers to a collection of data related to popularity obtained by statistically analyzing user actions within a certain period in the past.
[0075] In embodiments of this disclosure, historical access data for external links can be aggregated and analyzed periodically. It is rational to collect user activity records for the past week or month, statistically analyze access data for each triplet, and archive it as historical popularity data. Subsequently, the popularity patterns of each external link can be analyzed based on the historical popularity data. For example, if users in a certain area have a relatively high access volume trend for a certain type of activity, a relatively high threshold can be set for that area and activity type to avoid erroneous popularity judgments. Similarly, if the historical access volume for a certain region or activity type is relatively low, a relatively low threshold can be set to identify potential popularity in a timely manner.
[0076] In this way, by dynamically setting pre-defined thresholds based on historical popularity data, the system can achieve more precise and flexible popularity identification, overcoming the limitations of fixed thresholds with poor adaptability. By setting differential thresholds for different areas or operation types, the identification accuracy in specific scenarios is further optimized, effectively reducing false positives and underreporting rates. This dynamic adjustment mechanism based on historical data allows the system to sense and adapt to changes in long-term user behavior patterns, improving the adaptability and robustness of the algorithm.
[0077] In some embodiments, periodically querying the second-tier cache from the third-tier cache includes periodically querying the second-tier cache from the third-tier cache using asynchronous queries at minute intervals.
[0078] In the embodiments of this disclosure, first, a time interval in minutes is set at which the third-tier cache periodically queries the second-tier cache. In particular, the time interval can be determined by a pre-configured parameter and can be performed at the end of each time cycle, ensuring that query tasks are executed at a fixed frequency, avoiding resource waste due to frequent queries, and simultaneously allowing timely retrieval of popular data that has been updated. Furthermore, an asynchronous query mechanism can be employed to avoid blocking the real-time processing flow by query operations. Specifically, an event can be triggered when the configured query time interval is reached, pushing the query task to an asynchronous processing thread or module, which can then process the task using an independent work thread, or the query task can be sent to a message queue in the form of a message, and the second-tier cache can consume the query tasks one by one via the message queue and perform query operations on the third-tier cache. Furthermore, once an asynchronous query task is started, a query request can be initiated from the third-tier cache to the second-tier cache, where the query request can select data in the second-tier cache based on pre-configured rules. In particular, query operations are usually performed in batches, and to improve query efficiency, it is possible to retrieve second-tier cache records that satisfy multiple conditions at once.
[0079] In this way, asynchronous queries are implemented through message queues or event-driven mechanisms, separating data query tasks from real-time count processing flows, eliminating blocking of the master thread for query operations, and significantly improving throughput and response speed in high-concurrency scenarios. At the same time, by setting a periodic scheduled query policy, it is ensured that popular candidate data updated in the three-tier cache can be retrieved in a timely manner, while avoiding unnecessary resource overhead due to continuous polling, and achieving an optimized balance between processing efficiency and system load.
[0080] In some embodiments, sorting the retrieved triplets to filter out potential popular triplets involves using a heapsort algorithm to retrieve the top-K potential popular triplets by arranging them in descending order of counter values.
[0081] Here, the heapsort algorithm refers to a selection sort algorithm based on a heap data structure. In the embodiments of this disclosure, the heapsort algorithm can select a minimal heapsort and be adjusted to dynamically maintain the properties of a minimal heap, thereby enabling rapid filtering of the Top-K data.
[0082] In embodiments of this disclosure, a minimal heap is initialized based on a heapsort algorithm, and the heap capacity is set to K depending on the Top-K popular triplet to be retrieved. The properties of the minimal heap ensure that the heap currently stores the largest K counter-value triplets, and that the vertex of the heap is always the current least popular triplet. Subsequently, records can be read one by one from the retrieved triplet data, each record containing a triplet identifier and a counter value. Specifically, during the traverse process, each record can be dynamically adjusted with respect to the current heap. Exemplarily, if the number of elements in the heap is less than K, a triplet can be directly inserted into the heap; if the heap is already full (i.e., there are already K triplets in the heap), the recorded counter value can be compared with the heap top (minimum value); if the counter value is greater than the heap top, the heap top can be replaced, and the heap structure can be dynamically adjusted to maintain the minimal heap property; conversely, if the counter value is less than or equal to the heap top, the record can be directly skipped. Finally, once the traverse is complete, the elements stored in the heap are the K potential popular triplets with the largest counter values. At this point, the triplet data in the heap is popped up and arranged in descending order. The final result is the Top-K potential popular triplets. In particular, K must not be greater than M, and K must be a positive integer.
[0083] Thus, using the heapsort algorithm to filter top-K triplets reduces computational complexity and is suitable for popularity identification in large-scale data scenarios. The minimal heap structure can dynamically maintain top-K triplets during the data traverse process, eliminating the need to perform a global sort after the traverse is complete, and significantly improving processing efficiency. At the same time, the minimal heap always retains up to K elements, avoiding the need to store all data and reducing memory consumption.
[0084] In some embodiments, identifying persistently popular external links based on potential popular triplets, in association with counter values for the current time period and the past M historical time periods, includes calculating the sum or weighted average of the counter values for the same triplets in the current time period and the past M historical time periods, and identifying a persistently popular external link if the sum or weighted average of the counter values exceeds a persistent popularity threshold.
[0085] Here, a weighted average refers to a method of calculating the average of a set of numbers by assigning a weight to each number and adjusting the contribution of each number based on the magnitude of the weight. In the embodiments of this disclosure, the weights can be adjusted in chronological order to reflect the dynamic changing trends of popularity. Here, the weight is a parameter in the weighted average calculation and is used to represent the importance of counter values in different time periods, and the specific assignment of weights can be adjusted based on business requirements.
[0086] In embodiments of this disclosure, first, counter values for the same triplet in the current time period and the past M historical time periods of the time series can be obtained from a third-tier cache, where the counter value in each time period is the number of accesses the triplet accumulated during the corresponding time period. Subsequently, the sum or weighted average of the counter values can be calculated. Exemplarily, to obtain the sum of the counter values, the counter values in all time periods can be directly added together to calculate the total number of accesses. Furthermore, the counter values in each time period can be weighted based on set weights to obtain a weighted average of the counter values. In particular, the weights can be assigned dynamically.
[0087] Here, the persistent popularity threshold refers to a fixed or dynamic numerical value pre-set to distinguish between normal popularity and persistent popularity. In embodiments of this disclosure, a triplet is identified as a persistently popular external link when the sum or weighted average of its counter values exceeds the threshold. In particular, the setting of the persistent popularity threshold is generally based on historical statistical data and may vary depending on dimensions such as area and operation type.
[0088] In embodiments of the present disclosure, the sum or weighted average of the calculated counter values can be compared to a predetermined persistent popularity threshold. If the sum or weighted average of the counter values exceeds the popularity threshold, the triplet is identified as a persistently popular external link; conversely, if it does not exceed the popularity threshold, the triplet is ignored.
[0089] In this way, by linking the counter values of the current time period with the past M historical time periods and calculating a weighted average, popular external links with sustained popularity can be effectively identified. The weighted average calculation method considers both recent and historical data, avoiding misjudgments of popularity due to short-term traffic spikes that appear based solely on the current time period data, while the weighted assignment highlights the importance of recent data, ensuring real-time and dynamic popularity identification. The setting of a sustained popularity threshold allows for adjustment of the threshold size based on specific business scenarios, providing a flexible judgment criterion that can be adapted to popularity identification requirements in different areas, operation types, or time periods.
[0090] In some embodiments, the weight of recent time periods is higher than that of earlier time periods in the weighted average.
[0091] Here, "recent time period" refers to the present or a time period relatively close to the present, while "early time period" refers to a historical time period relatively far removed from the present. In particular, recent time period data usually reflects the latest dynamics of user behavior and is a key focus for popularity identification, while early time period data can be used for analyzing long-term trends but has relatively little impact on real-time popularity.
[0092] In embodiments of the present disclosure, weights can be assigned to each time period based on the principle that recent weights are higher than previous weights. Exemplarily, each time period can be arranged in chronological order, with the weight of the current time period set to 1, and the corresponding weight gradually decreasing until the weight becomes 0 for each time period going back.
[0093] Thus, by assigning relatively high weight to recent time periods in the weighted average calculation, we can focus more on the latest trends in user behavior, avoid over-reliance on historical data in popularity identification, ensure the real-time response capability of popular external links with high weight to recent time periods, while lower weight to earlier time periods provides support for historical data and avoids misjudgments due to short-term traffic spikes.
[0094] In some embodiments, identifying persistent popular external links based on potential popular triplets, in association with counter values for the current time period and the past M historical time periods, includes obtaining counter values for identical triplets in the current time period and the past M historical time periods, inputting these counter values into a pre-trained machine learning model, and using the machine learning model to predict persistent popular external links.
[0095] In the embodiments of this disclosure, counter values for identical triplets in the current time period and the past M historical time periods can be obtained from a three-tiered cache. These counter values represent the number of times or frequency of user access to the external link and are arranged in chronological order to form time-series data.
[0096] Here, a pre-trained machine learning model refers to a model that has completed training, has completed training using historical data, and can output predictive results based on experience and rules after being given input data. In embodiments of this disclosure, a pre-trained model is typically designed for a popularity identification task and can predict whether a given triplet is persistently popular based on the time series, trend, and other relevant features of counter values.
[0097] In the embodiments of this disclosure, organized time-series data can be input into a pre-trained machine learning model, and the model can predict whether a triplet belongs to the category of sustained popularity based on the rules it learned during training. In this way, the pre-trained model can capture the complex features and time-series rules of the counter values, avoiding misjudgments and missed decisions that may occur with simple rule-based methods. The rapid predictive capability of the pre-trained model enables real-time determination of sustained popularity external links in large-scale data processing, eliminating the need to spend a lot of time on complex calculations and manual rule design, and improving response speed.
[0098] In some embodiments, outputting the identification results for popular external links includes structuring the identification results for popular external links by area dimension, forming area-specific popularity lists, and filtering or weight-sorting the area-specific popularity lists based on a pre-configured area priority setting and outputting them.
[0099] Here, a popular list by area refers to classifying and organizing the identification results of popular external links by area dimension to form a set of popular external links with regional attributes. In embodiments of this disclosure, a popular list by area can provide a localized popularity view.
[0100] In embodiments of this disclosure, after identifying popular external links, each popular external link can be classified into a corresponding area dimension based on the geographical location information accessed by the user. For example, the geographical location information accessed by the user may include an IP address, browser language settings, or the user's area attribute label. Subsequently, a list of popular links by area can be generated based on the classification results. In particular, each area has an independent set of popular external link data containing the popularity identification results.
[0101] Here, pre-configured area prioritization refers to a set of predefined rules for determining the priority of processing popular data in different areas. In embodiments of this disclosure, prioritization can be configured based on factors such as business requirements, traffic distribution, and activity policies.
[0102] In embodiments of this disclosure, it is possible to choose to process or output only certain relatively high-priority area popularity lists, while skipping relatively low-priority area popularity external links based on a pre-configured area priority. Next, based on the area priority, the popular external links in the area popularity lists can be weighted sorted. Exemplaryly, popular external links corresponding to relatively high-priority areas are multiplied by a scaling weight, and the weighted popularity values are used to sort the external links in the popularity list in descending order, ensuring that high-priority popular external links are output preferentially.
[0103] In this way, by organizing the identification results of popular external links by area dimension and performing selection or weighted sorting based on pre-set area priority settings, it is possible to focus on the behavioral habits of users in different areas and the distribution characteristics of popular external links, thereby achieving more precise popularity management and optimization. The pre-set area priority settings are highly flexible and can be dynamically adjusted based on business requirements at different times of the day. The dynamism of the priority settings optimizes the efficiency of system resource utilization by ensuring that computation and presentation resources are preferentially concentrated on important areas.
[0104] In some embodiments, the method for identifying popular external links further includes periodically clearing expired counter data in a multi-tiered cache, recording an error log including the error type and cache hierarchy if an error occurs during cache reading, writing, or data processing, and performing performance monitoring and optimization based on the error log.
[0105] In the embodiments of this disclosure, the first-tier cache can automatically delete expired data periodically via a memory management policy based on a pre-configured expiration policy. The second-tier cache can automatically delete data periodically via a memory management policy after periodically querying data in the third-tier cache. Data in the third-tier cache can be scanned for and deleted of expired data via a scheduled task (e.g., a daily delete script).
[0106] Here, the error type refers to an abnormal type caused by a failure in a cache read / write or data processing operation during the process of identifying popular external links. In embodiments of this disclosure, the error type may include read / write errors, data format errors, timeout errors, connection errors, and the like.
[0107] Here, the cache hierarchy refers to the specific storage layers in a multi-tiered cache used in a method for identifying popular external links. In embodiments of this disclosure, the cache hierarchy may include at least a first-tier cache, a second-tier cache, and a third-tier cache.
[0108] Here, an error log refers to a log file containing error information used to track and analyze abnormal conditions. In embodiments of this disclosure, the error log may include a timestamp, error type, cache hierarchy, detailed description, and the like.
[0109] In embodiments of this disclosure, an error capture mechanism can be added during cache read / write or data processing. If an operation fails, abnormal information is captured and further written to an error log file. In particular, the error log can be stored in a file system, database, or dedicated monitoring system.
[0110] In the embodiments of this disclosure, error logs can be periodically analyzed to statistically track the frequency, type, and distribution of errors. For example, the number of errors across different cache tiers can be statistically analyzed, high-frequency error types and their causes (e.g., errors during specific time periods or operations) can be analyzed, and error logs can be monitored in real time using monitoring tools to set up alert rules. Furthermore, optimization measures can be taken based on the log analysis results. For instance, if first-tier cache overflows are frequent, memory capacity can be increased; if second-tier cache connections time out, network bandwidth can be improved or the cache connection pool policy optimized; and if third-tier cache write latency is long, disk input / output (I / O) performance can be optimized or storage data can be compressed. In particular, logs can be continuously monitored even after optimization measures are implemented to ensure that the problem is resolved.
[0111] By periodically clearing cached data, expired data can avoid occupying resources, improving cache hit rate and operational efficiency, thereby ensuring the real-time and accuracy of the popular external link identification process. Recording error logs allows for the rapid acquisition of anomaly information such as error type, cache hierarchy, and detailed description, enabling precise localization of the problem and reducing the time spent on exhaustive troubleshooting. Analyzing error logs allows for the discovery of potential performance bottlenecks and timely optimization measures, thereby reducing failure rates and improving overall stability. Error logs provide a reliable data foundation for performance monitoring and optimization. Regularly analyzing logs allows for the discovery of trending issues in long-term operations and accurate optimization.
[0112] In some embodiments, the method for identifying popular external links further includes writing the identification results of popular external links and their associated popularity values to a long-running aggregated cache structure implemented on a ring buffer to maintain historical popularity data for the past few hours, and generating a historical popularity report that reflects the popularity change trend of popular external links based on the data in the long-running aggregated cache structure.
[0113] Here, a ring buffer refers to a fixed-size queue data structure that cyclically overwrites older data when the data capacity is full. In embodiments of this disclosure, a ring buffer can be used to store popular external links and their popularity data for the past few hours, and older data that exceeds the time range can be automatically discarded.
[0114] Here, the long-term aggregated cache structure refers to a storage mechanism implemented based on a ring buffer. In the embodiments of this disclosure, the long-term aggregated cache structure can aggregate and maintain historical popularity data of popular external links and can store data over a certain time period.
[0115] In the embodiments of this disclosure, a fixed-size storage space can first be allocated to the popularity data of popular external links. Then, the identification results of popular external links and their associated popularity values can be written to a buffer in real time. Exemplarily, if the buffer is not full during the writing process, data is written directly; if the buffer is full, the previously written data is overwritten, performing a circular overwrite. Furthermore, popularity data in the ring buffer can be aggregated and calculated. Exemplarily, the data in the buffer can be statistically analyzed according to the time dimension to calculate metrics such as average popularity per hour and maximum popularity, and data for the same external links can be aggregated to generate popularity change data for each external link. In particular, data exceeding the buffer time range can be periodically erased to ensure that the cache structure retains only popularity information for the most recent few hours.
[0116] Here, historical popularity report refers to a visualized or structured data output generated based on data in a long-term aggregated cache structure. In the embodiments of this disclosure, the historical popularity report can embody the historical change trend of popular external link popularity.
[0117] In embodiments of this disclosure, historical popularity trend changes of popular external links can be analyzed based on data in a long-term aggregated cache structure. For example, the popularity growth rate may be calculated from current popularity and historical popularity, or popularity peaks and corresponding points in time may be identified from popularity values over a recent period. The analysis results can then be structured as data or a graph report. For example, popularity can be sorted by time, and a popularity change curve for popular external links can be obtained to represent the dynamic change in popularity over time. Average popularity, maximum popularity, and change trends can also be calculated to obtain key statistical indicators for each popular external link.
[0118] Thus, the fixed capacity and cyclic overwrite mechanism of the ring buffer effectively limit the use of storage space, avoiding the unlimited accumulation of historical data, while simultaneously ensuring that the cache always retains popular external link popularity data for the past few hours, resulting in relatively high memory efficiency and real-time capabilities. The long-term aggregated cache structure dynamically maintains historical popularity data of popular external links and can update popularity change statistics in real time, quickly capturing peak values or trend changes in the popularity of popular external links and adapting to the dynamics of popularity data. By generating historical popularity reports, it is possible to clearly reflect the popularity change trends of popular external links and support further popularity prediction and analysis. For example, it can identify external links whose popularity is steadily increasing, providing a basis for traffic scheduling and content recommendations.
[0119] In some embodiments, the method for identifying popular external links further includes determining popularity information, duration, and popularity trends based on the identification results and / or historical popularity reports of popular external links, organizing the popularity information, duration, and popularity trends as broadcast information, and pushing the broadcast information to target terminals.
[0120] Here, popularity information refers to core data of popular external links within a certain time period. In the embodiments of this disclosure, popularity information may include statistical indicators such as popularity value, average popularity, and maximum popularity, and can reflect the level of attention given to external links.
[0121] Here, duration refers to the time range over which a popular external link remains popular. In embodiments of this disclosure, duration can help evaluate the stability and persistence of popularity.
[0122] Here, the popularity trend can reflect the dynamic characteristics of changes in the popularity of popular external links. In the embodiments of this disclosure, the popularity trend can describe the increase or decrease in the popularity of popular external links over time.
[0123] In the embodiments of this disclosure, relevant data can first be extracted from the identification results of popular external links and historical popularity reports. Exemplarily, the current popularity value and basic statistical indicators can be extracted from the identification results, and popularity change data within a certain period can be extracted from the historical popularity reports. Then, the popularity data in the popularity identification results can be directly read to obtain the current popularity, the average popularity can be obtained by averaging the data in the historical popularity reports, and the maximum popularity can be obtained by identifying the popularity peaks in the historical popularity reports. This integrates the current popularity, average popularity, and maximum popularity as popularity information. Next, the duration can be recorded from the time the popular external link was first identified as popular, and the duration can be determined based on the difference between the current time and the start time. In particular, for popular external links recognized multiple times, time-series records can be maintained, and cumulative durations can be aggregated. Finally, based on the time-series data in the historical popularity reports, changes in popularity over time can be analyzed, and popularity trends can be obtained. For example, if the rate of increase in popularity is positive and gradually increases, it can be determined to be an upward trend; if the rate of increase in popularity is negative and gradually decreases, it can be determined to be a downward trend; and if the change in popularity is relatively small and remains within a certain range, it can be determined to be a stable trend.
[0124] Here, broadcast information refers to organized popularity data used to push relevant information about popular external links to target devices. In embodiments of this disclosure, broadcast information may include external link identifiers, area codes, popularity values, duration, and trend analysis.
[0125] In the embodiments of this disclosure, information such as external link identifiers, area codes, popularity values, duration, and trend analysis can be organized as broadcast information. Exemplarily, the broadcast information can be presented in structured data or visualized report format so that target devices can quickly analyze it. Finally, the broadcast information can be pushed to target devices via system notifications, API interfaces, or message queues. In particular, target devices may be monitoring systems, content recommendation platforms, advertising delivery systems, or user interfaces, specifically defined according to business requirements.
[0126] In this way, structured popularity analysis data is pushed to target devices in a timely manner, achieving a low-latency flow of popularity status information from the system to the business side, significantly shortening the perception and decision-making pathway. Broadcast information integrates multidimensional data such as popularity values, duration, and trend analysis to constitute a complete depiction of the dynamic characteristics of popularity external links, providing deep data support for impact assessment and policy formulation in business departments. Through quantitative analysis of the popularity lifecycle, it provides crucial grounds for accurately and efficiently allocating computation and bandwidth resources by helping business departments predict the stages of popularity development.
[0127] In some embodiments, the method for identifying popular external links can quickly identify the most viewed popular external links at a minute-by-minute time granularity while simultaneously significantly reducing computational and memory costs. By sequentially reducing the data range and dynamically filtering it, the method enables efficient data management and real-time popularity monitoring, providing businesses with precise support for broadcasting popular content.
[0128] Specifically, if external link B triggers a user action (e.g., viewing, playing, or dumping) in area C, the corresponding {B_C_Action} dimension counter can be incremented by 1. This constitutes the first-tier cache, which records the underlying access data for all external links under different areas and action categories, with a data volume hierarchy of "number of external links × number of areas × number of actions". To ensure that the count results reflect the most recent user actions, a new counter is created every minute to record minute-by-minute data. This design guarantees accuracy in the count time range and real-time updates on a minute-by-minute basis.
[0129] Furthermore, if the value of a counter in the first-tier cache is greater than a pre-set threshold, the information associated with that counter can be stored in the second-tier cache. The second-tier cache is implemented using Redis's sorted sets (also known as zsets) and specializes in storing external link data that has a relatively high number of actions in area C and requires special attention. By setting a reasonable threshold, the data volume tier of the second-tier cache can be drastically reduced to 1 / 10,000 to 1 / 100,000 of that of the first-tier cache, thereby significantly reducing the cost of subsequent sorting and computation.
[0130] Furthermore, the second-tier cache is queried periodically every minute, filtering out external links, areas, and behavior categories that require attention. This data is then retrieved from the first-tier cache and written to the third-tier cache. The third-tier cache also uses Redis's zset data structure and is primarily used for aggregating and sorting popular content on a minute-by-minute basis. By arranging this popular content in descending order based on its popularity score, the most noteworthy {external links_areas_behaviors} within the current minute can be quickly identified. This minute-by-minute popularity ranking provides real-time data support for subsequent analysis and business decision-making.
[0131] Furthermore, by co-querying the third-tier cache for the most recent few minutes, it is possible to further analyze which {external link_area_behavior} persists in the popularity header over a certain period of time. For content with relatively long durations and high popularity rankings, it can be considered a popular external link, and its popularity status can be broadcast. In this process, not only is the underlying popularity information of popular external links provided, but the duration of their popularity and popularity trends (e.g., rising, falling, or stable) are also recorded. This data provides crucial information for traffic adjustment, content recommendation, or ad optimization in business scenarios.
[0132] Finally, to further support long-term trend analysis, we maintain a Redis zset data structure that generates a third-tier cache while simultaneously storing and aggregating {external link_area_behavior} data from the past few hours. This data structure allows us to generate popularity reports across multiple time dimensions, comprehensively reflecting the historical dynamics and development trends of popular content, and providing richer insights for business decision-making.
[0133] In some embodiments, the data granularity of the first-tier cache is designed to be minute-based, meaning that one new {B_C_Action} counter is generated every minute, used to record the number of occurrences of the corresponding action (e.g., view, play, or dump) in area C of external link B within that minute. Counters from different minutes are independent of each other and unrelated. This ensures that the time range of the cache data is clear, facilitating subsequent popularity identification and data filtering. In particular, to optimize storage space usage, an expiration date can be set for each {B_C_Action} counter. Specifically, a Redis Time-to-Live (TTL) is set for the counter at the same time as its generation. This expiration date ensures that the counter data is automatically deleted after a certain period of time (e.g., a few minutes), without requiring any additional clearing operations. This ensures that each counter occupies cache space only during the time its data is valid, after which it is automatically cleared by Redis, freeing up storage resources. By setting expiration dates rationally, the maximum cache space occupancy can be adjusted according to business requirements and resource capacity, ensuring a balance in performance.
[0134] Figure 2 shows a schematic diagram of a three-tier cache structure according to an embodiment of the present disclosure, and as shown in Figure 2, includes a first-tier cache 201, a second-tier cache 202, and a third-tier cache 203, where the third-tier cache 203 includes a potential popularity triplet 2031 and a persistent popularity external link 2032.
[0135] Specifically, the first-tier cache 201 is used to record basic data for all external links, different areas, and user actions (e.g., browsing, playback, dumping). Its main function is to count each online user request and store these counts at a minute-by-minute granularity. The data in the first-tier cache has a relatively large data volume hierarchy, covering all external links, areas, and action dimensions, while setting an expiration date to ensure that data is automatically deleted after a few minutes, thus reducing storage space usage.
[0136] Furthermore, the second-tier cache 202 is used to filter important data in the first-tier cache. Specifically, when a counter in the first-tier cache exceeds a set threshold, the information of that counter is written to the second-tier cache. Through threshold filtering, the second-tier cache effectively reduces the data volume hierarchy, retaining only data that is likely to be popular, and significantly reducing the consumption of memory and computational resources.
[0137] Furthermore, a third-tier cache 203 is used to further aggregate and track popular external link data. Here, potential popularity triplets 2031 are used to store external link data identified as popularity trends in the current time period, including external link identifiers, area identifiers, and behavioral types (i.e., triplet structure). This data primarily originates from the second-tier cache and is generated by sorting analysis of data in the current minute, reflecting preliminary popularity trends in that time period. Persistent popularity external links 2032 are used to store popular external links identified after continuous tracking. By analyzing popularity changes over a time range of several minutes or longer for potential popularity triplets, popular external links that remain at the top can be identified and labeled as persistently popular.
[0138] In some embodiments, when a user performs an action such as viewing, dumping, or playing on an external link, the corresponding interface invokes a counting service to escalate information such as the external link identifier, area identifier, and operation type. The counting service first operates on a first-tier cache, synchronously incrementing the corresponding counter value by 1 based on the current external link, area, and action dimensions. This tier of cache is minute-granular, recording all underlying access data for all external links in the current minute, ensuring that the latest trends of popular content can be statistically analyzed in real time.
[0139] After the first-tier cache count update is complete, further asynchronous tasks can be initiated to sequentially update the second and third-tier caches, allowing for filtering and aggregation of key data. Specifically, first, when a certain counter value in the first-tier cache exceeds a set threshold, the correlation data of that popular external link can be written to the second-tier cache. The second-tier cache is primarily used to identify external links with relatively high current access volumes, significantly reducing the data volume hierarchy and thereby lowering subsequent computational and memory resource requirements. Subsequently, based on a time scheduling mechanism, popularity data can be extracted from the second-tier cache every minute, linked with the latest records in the first-tier cache, and the aggregated and sorted results of popular external links can be written to the third-tier cache. The third-tier cache stores minute-by-minute popularity rankings, helping to quickly identify the most popular external links for that minute.
[0140] Simultaneously, it is possible to periodically co-query the third-tier cache for the most recent few minutes, and by analyzing popular content with relatively long durations and high popularity rankings, persistently popular external links can be identified. Key metrics such as popularity information, duration, and trend changes can be calculated from this popularity data, and the analysis results can be pushed to the business end via popularity broadcasts. Popular broadcast content includes external link identifiers, area codes, behavior types, popularity values, popularity duration, and trend analysis, providing comprehensive and reliable data support. In addition, long-term caches can be maintained to aggregate popularity data over several hours, generating multi-dimensional historical trend reports that provide businesses with deeper decision-making grounds.
[0141] Figure 3 shows another flowchart of a method for identifying popular external links according to an embodiment of the present disclosure, and as shown in Figure 3, the method for identifying popular external links includes the following:
[0142] In S301, the user interacts with an external link, that is, the user initiates an interactive action on the external link, triggering the counting requirements for the external link service.
[0143] In S302, the operation type is determined, and specific operation types are categorized based on user actions, including actions such as viewing external links, dumping external links, and playing external links.
[0144] In S303, the external link operation request is processed, that is, the external link service is used to complete normal business processing logic such as recording user actions and updating the playback status.
[0145] In S304, the operation is completed, meaning the general processing logic of the external link service is finished and the user request is satisfied.
[0146] In S305, the count service is called; that is, the external link service calls the count service via the interface and transmits the external link identifier, area identifier, and activity information to the count service.
[0147] In S306, updating the first-tier cache, that is, the count service performing an operation on the first-tier cache based on these parameters, i.e., adding 1 to the corresponding counter value, can be achieved using the increment (INCR) command.
[0148] In S307, it is determined whether the value is greater than a pre-set threshold; that is, the counting service checks the counter value in the first-tier cache and determines whether it exceeds a pre-set threshold. If the counter value has not reached the threshold, the process proceeds to S308; if the counter value exceeds the threshold, the process proceeds to S309.
[0149] In S308, if a return occurs, i.e., if the counter value has not reached the threshold, the counting service returns directly to the external link service, performs no further processing, indicates that the action did not trigger the popularity identification logic, and the process terminates.
[0150] In S309, when the second-tier cache is updated, i.e., when the counter value exceeds the threshold, the counting service writes the data of popular external links to the second-tier cache, i.e., stores the data in a Redis zset, and this can be achieved using the Add Sorted Set (ZADD) command.
[0151] In S310, when a potential popular triplet is updated, i.e., when the second-tier cache detects a popular external link, an asynchronous worker task can store this popular external link data in the potential popular triplet of the third-tier cache, which can be achieved using the ZADD command.
[0152] In S311, persistent popular external links can be updated, meaning that an asynchronous worker task can store popular external links verified through persistent tracking in a three-tier cache of persistent popular external links, which can be achieved using the Hashtable Setup (HEST) command.
[0153] The schematic diagrams shown in Figures 2 and 3 are illustrative, not restrictive, and expandable. Those skilled in the art should understand that various obvious changes and / or substitutions can be made based on the examples in Figures 2 and 3, and that the resulting technical embodiments remain within the scope of the embodiments of this disclosure.
[0154] Embodiments of the present disclosure provide a popular external link identification device, as shown in Figure 4, the device comprises: an operation counter module 401 for acquiring an external link identifier, a user location area code, and an operation type in response to a user's operation on an external link, and constructing a triplet counter, where each counter corresponds to one {external link_area_operation type} dimension; a multi-stage filtering module 402 for performing hierarchical processing and filtering on the triplet counter using a multi-stage cache to identify potential popular triplets; a popularity identification module 403 for identifying persistent popular external links based on potential popular triplets, in association with counter values for the current time period and the past M historical time periods, where M is a positive integer; and a result output module 404 for outputting the identification results of popular external links.
[0155] In some embodiments, the multi-stage cache includes at least two levels of cache, and the multi-stage filtering module 402 includes a preliminary filtering submodule for updating and preliminary filtering the triplet counter in the first level cache according to a first predetermined policy to obtain a first candidate set, a secondary filtering submodule for further filtering the first candidate set in the next level cache according to a second predetermined policy to obtain a second candidate set with less data than the first candidate set, and a potential popularity determination submodule for determining potential popular triplets based on the second candidate set.
[0156] In some embodiments, the cache has at least two levels, specifically including a first-level cache, a second-level cache, and a third-level cache, and the multi-level filtering module 402 includes a first-level count submodule in the first-level cache that updates counter values at a minute-period time granularity, with each counter having a minute-based expiration date; a second-level filtering submodule for storing corresponding information in the second-level cache when the counter value in the first-level cache exceeds a preset threshold; and a third-level sort submodule in the third-level cache that periodically queries the second-level cache, sorts the retrieved triplets, and filters out potentially popular triplets.
[0157] In some embodiments, the first-level count submodule is used to determine the current time period based on the operation time in response to the user's operation on an external link, wherein the current time period has a time granularity of minutes, and to increment the value of the corresponding triplet counter based on the current time period.
[0158] In some embodiments, the corresponding information includes a triplet identifier and a counter value.
[0159] In some embodiments, pre-configured thresholds are dynamically set based on historical popularity data statistics, and differential thresholds are set for different areas or operation types.
[0160] In some embodiments, a third-tier sort submodule is used to periodically query the second-tier cache in the third-tier cache using asynchronous queries at minute intervals.
[0161] In some embodiments, a third-tier sort submodule is used with a heapsort algorithm to obtain the top-K potential popular triplets by sorting them in descending order of counter values.
[0162] In some embodiments, the popularity identification module 403 includes a history calculation submodule for calculating the sum or weighted average of counter values of the same triplets in the current time period and the past M historical time periods, and a threshold comparison submodule for identifying a persistently popular external link if the sum or weighted average of the counter values exceeds a persistent popularity threshold.
[0163] In some embodiments, the weight of recent time periods is higher than that of earlier time periods in the weighted average.
[0164] In some embodiments, the popularity identification module 403 comprises a numerical acquisition submodule for obtaining counter values of identical triplets in the current time period and the past M historical time periods, a model prediction submodule for inputting the counter values into a machine learning model that has been pre-trained as features, and predicting persistently popular external links using the machine learning model.
[0165] In some embodiments, the results output module 404 includes a dimensionality partitioning molecule module for configuring the identification results of popular external links by area dimension and forming an area-specific popularity list, and a results sort submodule for filtering or weight-sorting the area-specific popularity list and outputting it based on a preset area priority setting.
[0166] In some embodiments, the popular external link identification device further includes an expiration clearing module 405 (not shown in Figure 4) for periodically clearing expired counter data in a multi-stage cache, an error recording module 406 (not shown in Figure 4) for recording an error log including the error type and cache hierarchy when an error occurs during cache reading, writing, or data processing, and a monitoring and optimization module 407 (not shown in Figure 4) for performance monitoring and optimization based on the error log.
[0167] In some embodiments, the popular external link identification device further includes a data retention module 408 (not shown in Figure 4) for continuously writing the identification results of popular external links and their associated popularity values to a long-term aggregated cache structure implemented based on a ring buffer, and for maintaining historical popularity data for the past few hours, and a report generation module 409 (not shown in Figure 4) for generating a historical popularity report that reflects the popularity change trend of popular external links based on the data in the long-term aggregated cache structure.
[0168] In some embodiments, the popular external link identification device further includes an information organization module 410 (not shown in Figure 4) for determining popularity information, duration, and popularity trends based on the identification results and / or historical popularity reports of popular external links, and an information broadcast module 411 (not shown in Figure 4) for organizing the popularity information, duration, and popularity trends as broadcast information and pushing the broadcast information to target terminals.
[0169] A description of the specific functions and examples of each module and submodule of the apparatus of the embodiments of this disclosure can be found in the relevant descriptions of the corresponding steps in the above-described method embodiments and will not be repeated here.
[0170] The popular external link identification device in the embodiments of this disclosure records the specific access dimensions of external links through a triplet counter, filters potential popularity in conjunction with a multi-tier cache, and enhances the accuracy of popular external link identification. By employing a multi-tier cache policy, high-frequency data over short periods is stored in the first-tier cache, reducing the computational pressure on global data and significantly improving performance. Popularity can be rapidly identified within minute-by-minute time cycles, and results can be output in real time, ensuring that business timeliness requirements are met. By linking data from the current time cycle with historical time cycles, the continuous change trends of popular external links can be dynamically tracked, enabling timely processing and analysis support for popular resources. The output popularity identification results provide crucial evidence for business decision-making and facilitate timely action to address the business impact of popular external links.
[0171] The embodiments of this disclosure provide a schematic diagram of a scenario for identifying popular external links, as shown in Figure 5.
[0172] As stated above, the methods for identifying popular external links provided in the embodiments of this disclosure are applied to electronic devices. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other appropriate computers.
[0173] Specifically, electronic devices can perform the following operations:
[0174] The system obtains the external link identifier, user location area code, and operation type in response to the user's operation on an external link, constructs a triplet counter, each counter corresponding to one {external link_area_operation type} dimension, performs hierarchical processing and filtering on the triplet counter using a multi-level cache to identify potential popular triplets, identifies persistent popular external links based on the potential popular triplets by associating them with counter values for the current time period and the past M historical time periods, where M is a positive integer, and outputs the results of the popular external link identification.
[0175] The scene diagram shown in Figure 5 is merely illustrative and not restrictive, and those skilled in the art should understand that various obvious changes and / or substitutions can be made based on the example in Figure 5, and the resulting technical embodiments remain within the scope of the embodiments of this disclosure.
[0176] In the technical aspects of this disclosure, the acquisition, storage, and use of relevant user personal information will comply with the provisions of applicable laws and regulations and will not violate public order and morals.
[0177] According to embodiments of the present disclosure, the present disclosure further provides electronic devices, non-temporary computer-readable storage media, and program products.
[0178] Figure 6 is a block diagram of an electronic device 600 according to an embodiment of the present disclosure. An electronic device refers to any form of digital computer, such as a laptop computer, desktop computer, workstation, personal digital assistant, server, blade server, mainframe computer, and other compatible computers. An electronic device further refers to any form of mobile device, such as a personal digital assistant, cellular phone, intelligent phone, wearable device, and other similar computer equipment. The components, their connections, and functions described in this disclosure are illustrative and do not limit the realization of anything described or specified in this disclosure.
[0179] As shown in Figure 6, device 600 includes a computing unit 601 capable of performing various appropriate operations and processes based on computer program instructions stored in read-only memory (ROM) 602, or computer program instructions loaded from storage unit 608 into random access memory (RAM) 603. RAM 603 can further store various programs and data necessary for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are connected to each other via bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0180] Multiple components in device 600 are connected to an I / O interface 605, which includes an input unit 606 such as a keyboard and mouse, an output unit 607 such as various displays and speakers, a storage unit 608 such as a magnetic disk or optical disk, and a communication unit 609 such as a network card, modem, or wireless communication transceiver. The communication unit 609 allows device 600 to exchange information / data with other devices via computer networks such as the Internet and / or various carrier networks.
[0181] The computing unit 601 may be a variety of general-purpose and / or dedicated processing components having processing and computing capabilities. Some exemplary components of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, a computing unit that executes various machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs each of the methods and processes described above, for example, the method for identifying popular external links. For example, in some embodiments, the method for identifying popular external links can be implemented as a computer software program tangibly contained in a machine-readable medium such as a storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed into device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the method for identifying popular external links described above can be performed. In addition, in other embodiments, the computing unit 601 may be configured to perform a method for identifying popular external links by any other suitable method (e.g., firmware).
[0182] Various embodiments of the systems or technologies described in this disclosure can be implemented by digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standards (ASSPs), systems-on-a-chip (SOCs), complex-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. Each of these embodiments may be implemented by one or more computer programs that run and / or interpret on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.
[0183] Program code for performing the methods of this disclosure can be written in any combination of one or more programming languages. These program codes are provided to a processor or controller of a general-purpose computer, a dedicated computer, or other programming data processing device, so that when the program code is executed by the processor or controller, it can perform the functions / operations defined in the flowcharts and / or block diagrams. The program code may run entirely in a mainscan, partially in a mainscan, partially as an independent soft encapsulation and partially in a remote mainscan, or entirely in a remote mainscan or server.
[0184] In this disclosure, machine-readable media may be tangible media containing or storing programs used by or in conjunction with instruction execution systems, devices, or equipment. Machine-readable media may be machine-readable signal media or machine-readable storage media. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any suitable combination of the contents described above. Further exemplary examples of machine-readable storage media include one or more wired electrical connections, portable computer disk cartridges, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any combination of the contents described above.
[0185] To provide user interaction, a computer may implement the systems and technologies described herein, which may include a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor), a keyboard and pointing device for the user to provide input to the computer (e.g., a mouse or trackball). Other types of devices may also be used to provide user interaction; for example, the feedback provided to the user may be any form of sensor feedback (e.g., visual feedback, auditory feedback, or haptic feedback), and input from the user may be accepted in any form (e.g., acoustic input, voice input, haptic input).
[0186] The systems and technologies described herein can be implemented in computing systems that include background components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include front-end components (e.g., user computers having a graphics user interface or network browser, through which users can interact with embodiments of the systems and technologies described herein), or in any combination of such background components, middleware components, or front-end components. Components of the system can be connected to one another via digital data communication in any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0187] A computer system can include a client and a server. Typically, the client and server are geographically separated and interact via a communication network. The client-server relationship is created by a computer program that operates on the corresponding computer. The server may be a cloud server, a server in a distributed system, or a server incorporating blockchain technology, etc.
[0188] It should be understood that steps can be newly ranked, added, or deleted using the various forms of flows shown above. For example, each step described in this disclosure may be executed in parallel, sequentially, or in a different order. This disclosure is not limited to this, as long as the technical aspects disclosed in this disclosure can achieve the desired results.
[0189] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, subcombinations, and substitutions are possible due to design considerations and other factors. Any changes, equivalent substitutions, and improvements within the gist and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for identifying popular external links, In response to a user's action on an external link, the external link identifier, user location area code, and action type are obtained, and a triplet counter is constructed, wherein each counter corresponds to one {external link_area_action type} dimension. Using a multi-stage cache, hierarchical processing and filtering are performed on the triplet counter to identify potential popular triplets, Based on the aforementioned potential popularity triplet, persistent popularity external links are identified by associating them with counter values for the current time period and the past M historical time periods, where M is a positive integer. This includes outputting the identification results of the aforementioned popular external links, How to identify popular external links.
2. The multi-stage cache includes at least two levels of cache, The aforementioned hierarchical processing and filtering are performed as follows: In the first-tier cache, updates and preliminary filtering are performed on the triplet counter according to a first predetermined policy to obtain a first candidate set. In the next level of the cache, the first candidate set is further filtered according to a second predetermined policy to obtain a second candidate set with less data than the first candidate set. This includes determining the potential popular triplet based on the second candidate set, A method for identifying popular external links as described in claim 1.
3. The aforementioned at least two-tiered cache specifically includes a first-tier cache, a second-tier cache, and a third-tier cache. The aforementioned hierarchical processing and filtering are performed as follows: In the first-tier cache, the counter values are updated with a time granularity of minutes, and each counter is given an expiration date of minutes. When the counter value in the first-level cache exceeds a preset threshold, the corresponding information is stored in the second-level cache. The third-tier cache includes periodically querying the second-tier cache, sorting the retrieved triplets, and filtering the potentially popular triplets. A method for identifying popular external links as described in claim 2.
4. Updating the counter value in the first-level cache with a time granularity of minutes is: The current time period is determined based on the time of the user's operation on the external link, and the current time period has a time granularity of minutes. This includes incrementing the value of the corresponding triplet counter based on the current time period, A method for identifying popular external links as described in claim 3.
5. The aforementioned corresponding information includes a triplet identifier and a counter value. A method for identifying popular external links as described in claim 3.
6. The aforementioned pre-set thresholds are dynamically set based on historical popularity data statistics, and differential thresholds are set for different areas or operation types. A method for identifying popular external links as described in claim 3.
7. In the aforementioned third-tier cache, periodically querying the aforementioned second-tier cache is: This includes periodically querying the second-tier cache in the third-tier cache using asynchronous queries at intervals of minutes, A method for identifying popular external links as described in claim 3.
8. Sort the acquired triplets and filter out the potentially popular triplets, This involves using the heapsort algorithm to arrange the counter values in descending order and obtain the top-K potential popular triplets. A method for identifying popular external links as described in claim 3.
9. Based on the aforementioned potential popularity triplets, identifying persistently popular external links by associating them with counter values for the current time period and the past M historical time periods is possible. Calculate the sum or weighted average of the counter values of the same triplet in the current time period and the past M historical time periods, If the sum of the counter values or the weighted average value exceeds the sustained popularity threshold, the persistently popular external link is identified, A method for identifying popular external links as described in claim 1.
10. Of the aforementioned weighted average values, the weight of recent time periods is higher than that of earlier time periods. A method for identifying popular external links as described in claim 9.
11. Based on the aforementioned potential popularity triplets, identifying persistently popular external links by associating them with counter values for the current time period and the past M historical time periods is possible. Obtain the counter values of identical triplets in the current time period and the past M historical time periods, The aforementioned counter value is input into a pre-trained machine learning model as a feature, This includes predicting the sustained popularity of external links using the machine learning model, A method for identifying popular external links as described in claim 1.
12. Outputting the identification results for the aforementioned popular external links is: The identification results of the aforementioned popular external links are constructed according to the area dimension, and a list of popular links by area is formed. This includes filtering or weighting and sorting the area-specific popularity list based on pre-configured area priority settings and outputting it. A method for identifying popular external links as described in claim 1.
13. The method for identifying the aforementioned popular external links further includes: Periodically clear the expired counter data in the multi-stage cache, If an error occurs during cache reading, writing, or data processing, an error log including the error type and cache hierarchy will be recorded. This includes performing performance monitoring and optimization based on the aforementioned error log, A method for identifying popular external links as described in claim 1.
14. The method for identifying the aforementioned popular external links further includes: The identification results of the aforementioned popular external links and their associated popularity values are written to a long-term aggregated cache structure implemented based on a ring buffer, thereby maintaining historical popularity data for the past few hours. This includes generating a historical popularity report that reflects the trend of changes in the popularity of popular external links, based on the data in the aforementioned long-term aggregated cache structure. A method for identifying popular external links as described in claim 1.
15. The method for identifying the aforementioned popular external links further includes: Based on the identification results of the aforementioned popular external links and / or the aforementioned historical popularity report, popularity information, duration, and popularity trends are determined. This includes organizing the popularity information, duration, and popularity trend as broadcast information and pushing the broadcast information to the target terminal. A method for identifying popular external links according to claim 14.
16. A device for identifying popular external links, An operation count module for obtaining an external link identifier, user location area code, and operation type in response to a user's operation on an external link, and constructing a triplet counter, wherein each counter corresponds to one {external link_area_operation type} dimension. A multi-stage filtering module for identifying potential popular triplets by performing hierarchical processing and filtering on the triplet counter using a multi-stage cache, A popularity identification module for identifying persistently popular external links, where M is a positive integer, based on the aforementioned potential popularity triplet, and linked to counter values of the current time period and the past M historical time periods. The system includes a result output module for outputting the identification results of the aforementioned popular external links. Popular external link identification device
17. At least one processor, The system comprises at least one processor and a memory that is communicated with by it, The memory stores instructions that can be executed by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is caused to perform the method according to any one of claims 1 to 15. Electronic devices.
18. A non-temporary computer-readable storage medium storing computer instructions that cause a computer to perform the method described in any one of claims 1 to 15.
19. A program for implementing the method described in any one of claims 1 to 15, which is executed by a processor in a computer.