A data stream request processing method, device, equipment and medium

By receiving data stream requests from clients, obtaining candidate sets from target data sources based on refresh type, and determining state transition conditions, the problem of long browsing time and insufficient learning caused by existing recommendation algorithms is solved, achieving efficient data push and learning effects.

CN117909571BActive Publication Date: 2026-07-03BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2023-12-11
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing recommendation algorithms result in users spending a lot of time browsing and are unable to learn effectively from the pushed data content.

Method used

By receiving data stream requests from clients, obtaining a candidate set from the target data source based on the refresh type, determining the refresh type based on state transition conditions, and feeding back the target data content to construct the next data stream request, the system can filter the data source and prioritize pushing unviewed content.

Benefits of technology

It reduces the time operators spend browsing, improves the browsing experience, and allows operators to learn effectively based on the pushed content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117909571B_ABST
    Figure CN117909571B_ABST
Patent Text Reader

Abstract

This disclosure relates to a method, apparatus, device, and medium for processing data stream requests. The method provided in the embodiments of this disclosure determines the data source based on the refresh type in the data stream request and pulls a candidate set from the data source. This achieves filtering of the data source through the refresh type, thereby ensuring that the data content in the candidate set pulled each time is different. At the same time, based on the state transition conditions satisfied by the key information of the candidate set, the refresh type is switched, so that when the server receives the next data stream request sent by the client, it pulls the candidate set again according to the refresh type after the switch. This does not take up too much browsing time for the operator and can ensure that the operator can effectively learn from the pushed data content, thus improving the operator's browsing experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of network communication, and specifically to a method, apparatus, device, and medium for processing data stream requests. Background Technology

[0002] Currently, in the field of content recommendation, the type of data content a user sees depends on the recommendation service. Existing recommendation services select multiple data contents most suitable for the current user after algorithmic steps such as targeting, recall, and ranking. However, current recommendation algorithms sift through a massive candidate set and push data to the user statelessly. This results in users spending a long time browsing and cannot effectively learn from the pushed data content. Summary of the Invention

[0003] In view of this, embodiments of the present disclosure provide a method, apparatus, electronic device, and storage medium for processing data stream requests, in order to solve the problem that current recommendation algorithms result in users spending a long time browsing and are unable to effectively learn from the pushed data content.

[0004] In a first aspect, embodiments of this disclosure provide a method for processing data stream requests, the method comprising:

[0005] Receive a first data stream request sent by the client, wherein the first data stream request carries a first refresh type;

[0006] In response to the first data stream request, a candidate set is obtained from the target data source corresponding to the first refresh type, and key information corresponding to the candidate set is determined, wherein the target data source stores multiple data contents;

[0007] Obtain the target state transition conditions satisfied by the key information, and determine the second refresh type corresponding to the target state transition conditions based on the correspondence between the state transition conditions and refresh types;

[0008] The target data content is obtained from the candidate set, and the target data content and the second refresh type are fed back to the client so that the client can construct a second data stream request according to the second refresh type, wherein the second data stream request is the next data stream request after the first data stream request.

[0009] Secondly, embodiments of this disclosure provide a data stream request processing apparatus, the apparatus comprising:

[0010] The receiving module is used to acquire a first data stream request sent by the client, wherein the first data stream request carries a first refresh type;

[0011] The response module is used to respond to the first data stream request, obtain a candidate set from the target data source corresponding to the first refresh type, and determine the key information corresponding to the candidate set, wherein the target data source includes multiple data contents;

[0012] The acquisition module is used to acquire the target state transition conditions satisfied by the key information, and determine the second refresh type corresponding to the target state transition conditions based on the correspondence between the state transition conditions and the refresh type.

[0013] The feedback module is used to obtain target data content from the candidate set, and feed back the target data content and the second refresh type to the client, so that the client can construct a second data stream request according to the second refresh type, wherein the second data stream request is the next data stream request after the first data stream request.

[0014] Thirdly, embodiments of this disclosure provide a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the method described in the first aspect or any corresponding embodiment.

[0015] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer instructions for causing a computer to perform the methods described in the first aspect or any corresponding embodiment.

[0016] The method provided in this disclosure has the following advantages compared to the prior art:

[0017] This embodiment of the disclosure determines the data source based on the refresh type in the data stream request and pulls a candidate set from the data source. This achieves data source filtering through refresh type, ensuring that the data content in the candidate set pulled each time is different. At the same time, based on the state transition conditions satisfied by the key information of the candidate set, the refresh type is switched, so that when the server receives the next data stream request sent by the client, it pulls the candidate set again according to the refresh type after the switch. This does not consume too much browsing time for the operator and can ensure that the operator can effectively learn from the pushed data content, thus improving the operator's browsing experience. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating a data stream request processing method according to some embodiments of the present disclosure;

[0020] Figure 2 This is a schematic diagram illustrating the data content acquisition process according to some embodiments of this disclosure;

[0021] Figure 3 This is a schematic diagram of a refresh type transfer mechanism according to some embodiments of the present disclosure;

[0022] Figure 4 This is a schematic diagram illustrating a historical sequence according to some embodiments of this disclosure;

[0023] Figure 5 This is a structural block diagram of a data stream request processing apparatus according to an embodiment of the present disclosure;

[0024] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present disclosure. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0026] According to embodiments of this disclosure, a method, apparatus, electronic device, and storage medium for processing data stream requests are provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0027] This embodiment provides a method for processing data stream requests. Figure 1 This is a flowchart of a data stream request processing method according to an embodiment of the present disclosure, such as... Figure 1 As shown, the process includes the following steps:

[0028] Step S11: Receive a first data stream request sent by the client, wherein the first data stream request carries a first refresh type.

[0029] The method provided in this disclosure is applied to a server, and a communication connection is established between the server and the client. Specifically, when an operator opens the client to browse relevant data content, the client can generate a data structure, which includes a refresh type (RefreshType), a timestamp, and other relevant parameters. These other relevant parameters may include access permissions and callback addresses, etc., which are not specifically limited here.

[0030] Then, the client encapsulates the data structure into a data stream request, uses this data stream request as the first data stream request, specifies the server address and feed interface address in the first data stream request, and sends the first data stream request to the server using network communication protocols (such as HTTP, WebSocket, etc.).

[0031] Ultimately, the server receives the first data stream request sent by the client based on the network communication protocol and port listening. The server then uses the first refresh type carried in the first data stream request to fetch the corresponding data content and determines the refresh type of the client's next data stream request based on the fetched data content.

[0032] In one embodiment of this disclosure, the first refresh type carried by the first data stream request can be one of the following: first refresh type (Open type), unviewed type (Loadmore type), history type (History type), and end type (End type). The Open type can be understood as being determined based on the first refresh when the operator enters the client. The Loadmore, History, and End types are refresh types returned by the server. The Loadmore type is used to recommend data content that the operator has not viewed to the client, the History type is used to recommend data content that the operator has viewed to the client, and the End type is used to indicate the end of the recommendation process.

[0033] Step S12: In response to the first data stream request, obtain the candidate set from the target data source corresponding to the first refresh type, and determine the key information corresponding to the candidate set. The target data source stores multiple data contents.

[0034] In one embodiment of this disclosure, obtaining a candidate set from the target data source corresponding to the first refresh type and determining the key information corresponding to the candidate set includes the following steps a1-a3:

[0035] Step a1: Obtain the target data source corresponding to the first refresh type.

[0036] In one embodiment of this disclosure, obtaining the target data source corresponding to the first refresh type includes the following process:

[0037] Step (1): Obtain the association between refresh type and preset data source, and determine the first data source corresponding to the first refresh type based on the association.

[0038] In one embodiment of this disclosure, different refresh types correspond to different preset data sources. Specifically, the first data source corresponding to the Open type includes: an insert type data source and a regular recommended data source; the first data source corresponding to the Loadmore type includes an insert type data source; and the second data source corresponding to the History type includes a regular recommended data source. Here, the insert type can be understood as officially released data content, and the data content stored in the insert type data source is also insert type data content. Insert type data content can be understood as officially released data content in real time, and it is also data content that the operator has not viewed. For example, insert type data content can be real-time news content or game update content, or other unconventional recommended data content.

[0039] The data source for regular recommendations stores data content recommended based on the user's interests. For example, if the user's interest is in game guides, the data source for regular recommendations would store related videos or articles. Or, if the user's interest is in travel, the data source for regular recommendations could store travel guides, travel videos, and so on.

[0040] Therefore, by setting preset data sources for different refresh types, the aim is to ensure that the data content pushed to the client first is the data that the operator has not viewed.

[0041] Step (2): Determine the time range corresponding to the first refresh type.

[0042] In one embodiment of this disclosure, determining the time range corresponding to the first refresh type includes: determining a start timestamp based on the first refresh type; obtaining the timestamp carried by the first data stream request and using the timestamp carried by the first data stream request as the end timestamp; and constructing a time range based on the start timestamp and the end timestamp.

[0043] In one embodiment of this disclosure, since the data content pushed to the client is guaranteed to be unviewed by the operator, but there may be situations where there is no data content in the insert type data source and the regular recommended data source, a corresponding fallback strategy needs to be set to ensure that there is data content that can be pushed to the client. The fallback strategy is to push the viewed data content to the client.

[0044] Therefore, different time ranges need to be set for different refresh types, and the data content viewed by the operator will be retrieved according to the time range. For Open and Loadmore types, the corresponding starting timestamp can be the timestamp T0 when the operator first enters the client within the current recommendation lifecycle. For History type, the corresponding starting timestamp is the timestamp T1 when the server receives the Open type data stream request within the current recommendation lifecycle. Thus, the time range for Open and Loadmore types is [T0-T], and the time range for History type is [T1-T], where T is the current timestamp. A complete recommendation lifecycle is Open > Loadmore > History > End.

[0045] Step (3) Obtain historical data content that falls within the time range and use the historical data content to construct a second data source.

[0046] In one embodiment of this disclosure, historical data content falling within a time range can be obtained from the history browsing history of the operator, and then the content ID corresponding to the historical data content can be read. The content ID is used to deduplicate the historical data content falling within the time range to ensure that each content ID retains only one historical data content. A second data source is constructed based on the deduplicated historical data content.

[0047] Step (4) select the first data source and the second data source as the target data source, wherein the priority of the first data source is greater than the priority of the second data source.

[0048] In one embodiment of this disclosure, after obtaining the first data source and the second data source, the first data source and the second data source are used as the target data source corresponding to the first refresh type. Taking the Open type as an example, the first data source corresponding to the Open type includes an insertion type data source and a regular recommended data source. The data source corresponding to the regular recommendation type includes a historical data source with a time range of [T0-T]. Among them, the insertion type data source has a higher priority than the regular recommended data source, and the regular recommended data source has a higher priority than the historical data source.

[0049] In one embodiment of this disclosure, the priority of the first data source is set higher than that of the second data source. This ensures that data content not yet viewed by the operator is pushed to the client first. Furthermore, if the first data source is exhausted, historical data content can be used as a fallback to ensure that data content can still be provided to the client, avoiding blank pushes. This implements an intervention strategy of "prioritizing unviewed data and providing a fallback for viewed data," solving the problem of existing technologies using a historical N-day time window as a deduplication set and filtering by difference, which suffers from a single filtering mode and inability to recommend already viewed data content.

[0050] Step a2: Construct a candidate set based on the data content stored in the target data source.

[0051] In one embodiment of this disclosure, constructing a candidate set based on the data content stored in the target data source includes: obtaining the data content stored in the target data source and determining the priority of the target data source; arranging the data content in descending order of priority to obtain the candidate set.

[0052] Specifically, such as Figure 2 As shown, this embodiment of the disclosure abstracts the data source into the following four types of services:

[0053] ①Service A: Reads data sources of insert type.

[0054] ②Service B: Reads the data source recommended by the general public.

[0055] ③Service C: Reads historical data within the time range [T0-T].

[0056] ④ Service D: Read historical data content from the time range [T1-T].

[0057] When retrieving data from the data source, the following steps are performed in parallel:

[0058] (1) Recommendation type 1 (Insert): Requests recommended data content of the insertion type (i.e., the data content stored in the data source of the insertion type), and filters out the data of service C.

[0059] (2) Recommendation type 2 (InsertWithHistory): Requests recommended data content of the insertion type (i.e., the data content stored in the data source of the insertion type), and filters out the data of service D.

[0060] (3) Recommendation type 3: Request recommendation service B (i.e., the data content stored in the data source of regular recommendations) and filter out the data of service C.

[0061] (4) Recommendation type 4 (RecommendWithHistory): Requests the data content of the recommendation insertion type (i.e. the data content stored in the data source of the regular recommendation) and filters out the data of service D.

[0062] When the refresh type is Open, steps (1)-(4) above are executed in parallel. When the refresh type is Loadmore, steps (1) and (3) above are executed in parallel. When the refresh type is History, steps (2) and (4) above are executed in parallel.

[0063] Taking the History type as an example, the History type requires the execution of services B and D. When retrieving data content from the data source, it reads the data content of the regular recommendation type in parallel, denoted as data content M1, and reads the historical data content within the time range [T1-T], denoted as data content M2. Then, it performs deduplication on the read data content. Finally, it sorts the deduplicated data content M1 and data content M2 according to priority to construct a candidate set, namely data content M1-data content M2.

[0064] The method provided in this disclosure allows the server to retrieve data content from various data sources in parallel. By prioritizing the data content according to the data source's priority, it supports a "unviewed first, viewed last" intervention strategy, ensuring lossless latency performance and minimizing the final request delay.

[0065] Step a3: Generate key information corresponding to the candidate set based on the content type and quantity of the data content.

[0066] In one embodiment of this disclosure, the data content type can be either an insertion type or a history type. The data content of the insertion type is the data content stored in the data source of the insertion type. By using the content type and content quantity as key information of the candidate set, it is convenient to use the key information to determine whether it is necessary to switch the refresh type.

[0067] Step S13: Obtain the target state transition conditions satisfied by the key information, and determine the second refresh type corresponding to the target state transition conditions based on the correspondence between the state transition conditions and refresh types.

[0068] In one embodiment of this disclosure, obtaining the target state transition conditions satisfied by the key information includes the following steps b1-b2:

[0069] Step b1: Obtain multiple pre-set state transition conditions.

[0070] In one embodiment of this disclosure, Open>Loadmore>History>End represents a complete push lifecycle. Therefore, when the data content of the candidate set is small, a flow mechanism between refresh types is set up. By flowing the refresh type, not only can the operator prioritize browsing the inserted data content, but the refresh type can also be switched in a timely manner, improving the operator's browsing experience.

[0071] In one embodiment of this disclosure, such as Figure 3 As shown, the conditions for converting the Open type to the Loadmore type are:

[0072] There exists a cell where has_more = true and is_insert = false and is_history = false.

[0073] In the above conditions, `has_more = true` indicates that the number of data contents in the candidate set is greater than 1, meaning there are remaining data in the candidate set; `is_insert = false` indicates that it is not an insert type; `is_history = false` indicates that it is not a history type; and `cell` represents the data content. Based on this, the above conditions can be understood as the existence of remaining data in the candidate set, and the data content is neither insert type nor history type.

[0074] The conditions for converting an Open type to a History type are as follows: the following three conditions are ORed with each other, and satisfying any one of them is sufficient:

[0075] ① There exist cells with is_insert=false and is_history=true.

[0076] In the above conditions, `is_insert = false` indicates that it is not an insert type, `is_history = true` indicates that it is a history type, and `cell` represents the data content. Therefore, the above conditions can be understood as indicating the existence of data content that is not an insert type but belongs to the history type.

[0077] ② There exist cells with is_insert=false and is_history=false, and has_more=false.

[0078] In the above conditions, `has_more = true` indicates that the number of data contents in the candidate set is less than 1, meaning there are no remaining data contents in the candidate set; `is_insert = false` indicates that it is not an insertion type; `is_history = true` indicates that it is a history type; and `cell` represents the data content. Based on this, the above conditions can be understood as the existence of data content that is neither an insertion type nor a history type, and that there are no remaining data contents in the candidate set besides this data content.

[0079] ③ There is no cell with is_insert=false and has_more=false.

[0080] In the above conditions, `has_more = true` indicates that the number of data items in the candidate set is less than 1, meaning there are no remaining data items in the candidate set. `is_insert = false` indicates that it is not an insertion type, and `cell` represents the data content. Therefore, the above conditions can be understood as follows: there is no data content that is not of the insertion type, and there are no remaining data items in the candidate set.

[0081] Conditions for converting Open type to End type:

[0082] There exists a cell where has_more = false and is_insert = false && is_history = true.

[0083] In the above conditions, has_more = true means that the number of data contents in the candidate set is less than 1, that is, there are no remaining data in the candidate set. is_insert = false means that it does not belong to the insertion type. Based on this, the above conditions can be understood as the candidate set having no remaining data, and having data contents that do not belong to the insertion type but belong to the history type.

[0084] Conditions for converting Loadmore type to History type:

[0085] has_more = false.

[0086] In the above conditions, has_more=true means that the number of data contents in the candidate set is less than 1, that is, there are no remaining data in the candidate set. Based on this, the above conditions can be understood as the candidate set having no remaining data.

[0087] Step b2: Match the content type and content quantity with the state transition conditions to obtain the target state transition conditions matched by the content type and content quantity.

[0088] In one embodiment of this disclosure, by matching the content type and content data with the aforementioned state transition conditions, the target state transition condition matched by the content type and content quantity can be determined. Then, based on the correspondence between the state transition conditions and refresh types, the second refresh type corresponding to the target state transition condition is determined. For example, when the target state transition condition matched by the content type and content quantity is "has_more = true and there exists a cell with is_insert = false && is_history = false", the second refresh type is determined to be Loadmore type. Alternatively, when the target state transition condition matched by the content type and content quantity is "there exists a cell with is_insert = false && is_history = false, and has_more = false", the second refresh type is determined to be History type.

[0089] Step S14: Obtain the target data content from the candidate set, and feed back the target data content and the second refresh type to the client so that the client can construct a second data stream request based on the second refresh type, wherein the second data stream request is the next data stream request after the first data stream request.

[0090] In one embodiment of this disclosure, obtaining target data content from a candidate set includes: when the candidate set includes one piece of data content, using that data content as the target data content; or, when the candidate set includes at least two pieces of data content, obtaining the push priority corresponding to the data content; and using the data content with the highest push priority as the target data content.

[0091] In one embodiment of this disclosure, when the candidate set includes only one piece of data content, that data content is directly used as the target data content. Alternatively, when the candidate set includes at least two pieces of data content, the push priority of the data content can be determined based on the operator's interest type. When no interest type exists, the push priority of the data content can be determined based on the relevance of the data content already viewed by the operator. Finally, the data content with the highest push priority is used as the target data content.

[0092] The method provided in this disclosure determines the data source based on the refresh type in the data stream request and pulls a candidate set from the data source. This filters the data source by refreshing the refresh type, ensuring that the data content in the candidate set pulled each time is different. At the same time, based on the state transition conditions satisfied by the key information of the candidate set, the refresh type is switched, so that when the server receives the next data stream request sent by the client, it pulls the candidate set again according to the refresh type after the switch. This does not take up too much browsing time for the operator and can ensure that the operator can effectively learn from the pushed data content, thus improving the operator's browsing experience.

[0093] In one embodiment of this disclosure, after obtaining the target data content and the second refresh type, the target data content and the second refresh type are fed back to the client. After receiving the target data content, the client displays the target data content and constructs a second data stream request based on the second refresh type.

[0094] This embodiment of the disclosure obtains the push priority of each data content in the candidate set, enabling the evaluation and comparison of the data content, thereby selecting the data content with the highest push priority as the target data content. This ensures that the operator receives the highest quality content. Furthermore, selecting the data content with the highest push priority ensures that the operator receives the content they are most interested in or that is important to them. This improves the operator's browsing experience.

[0095] In one embodiment of this disclosure, the method further includes: obtaining a historical sequence corresponding to the client, wherein the historical sequence includes multiple content identifiers arranged in ascending order of timestamps; inserting the target content identifier corresponding to the target data content after the last content identifier in the historical sequence to obtain an updated historical sequence.

[0096] In one embodiment of this disclosure, such as Figure 4 As shown, the historical sequence corresponding to the client can be a zset structure. Each element in the historical sequence includes a content identifier (ID) and a timestamp of the data content corresponding to the content identifier. The elements in the historical sequence are sorted in ascending order of timestamp. When the server pushes the target data content to the client, it inserts the target content identifier corresponding to the pushed target data content after the last content identifier in the historical sequence to obtain the updated historical identifier.

[0097] In one embodiment of this disclosure, by inserting the target content identifier after the last content identifier in the historical sequence, subsequent fast lookup and access are facilitated. Because an ordered list is used for storage, historical records can be accessed sequentially by timestamp. This makes finding and accessing records within a specific time range very fast and efficient. Real-time sorting and updates are also possible; since the list is ordered, no additional sorting operation is required after inserting a new element. Furthermore, compared to other data structures, ordered lists typically have a smaller space and memory footprint. This is highly beneficial for storing large amounts of historical data.

[0098] This embodiment also provides a data stream request processing apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0099] This embodiment provides a data stream request processing apparatus, such as... Figure 5 As shown, it includes:

[0100] The receiving module 51 is used to obtain a first data stream request sent by the client, wherein the first data stream request carries a first refresh type;

[0101] The response module 52 is used to respond to the first data stream request, obtain a candidate set from the target data source corresponding to the first refresh type, and determine the key information corresponding to the candidate set, wherein the target data source includes multiple data contents;

[0102] The acquisition module 53 is used to acquire the target state transition conditions satisfied by the key information, and determine the second refresh type corresponding to the target state transition conditions based on the correspondence between the state transition conditions and the refresh type.

[0103] Feedback module 54 is used to obtain target data content from the candidate set and feed back the target data content and the second refresh type to the client so that the client can construct a second data stream request according to the second refresh type, wherein the second data stream request is the next data stream request after the first data stream request.

[0104] In one embodiment of this disclosure, the response module 52 includes:

[0105] The acquisition unit is used to acquire the target data source corresponding to the first refresh type;

[0106] Construction unit, used to build a candidate set based on the data content stored in the target data source;

[0107] The generation module is used to generate key information corresponding to the candidate set based on the content type and quantity of the data content.

[0108] In one embodiment of this disclosure, the acquisition unit is configured to acquire the association between a refresh type and a preset data source; based on the association, determine a first data source corresponding to a first refresh type; determine a time range corresponding to the first refresh type; acquire historical data content falling within the time range, and construct a second data source using the historical data content; and use the first data source and the second data source as target data sources, wherein the priority of the first data source is greater than the priority of the second data source.

[0109] In one embodiment of this disclosure, a construction unit is used to obtain the data content stored in the target data source and determine the priority of the target data source; and to arrange the data content in descending order of priority to obtain a candidate set.

[0110] In one embodiment of this disclosure, the acquisition unit is configured to determine a start timestamp based on a first refresh type; acquire the timestamp carried by a first data stream request and use the timestamp carried by the first data stream request as an end timestamp; and construct a time range based on the start timestamp and the end timestamp.

[0111] In one embodiment of this disclosure, the acquisition module 53 is used to acquire a plurality of pre-set state transition conditions; match the content type and content quantity with the state transition conditions to obtain the target state transition condition matched by the content type and content quantity.

[0112] In one embodiment of this disclosure, the feedback module 54 is used to take the data content as the target data content when the candidate set includes one data content; or, when the candidate set includes at least two data contents, to obtain the push priority corresponding to the data content; and to take the data content with the highest push priority as the target data content.

[0113] In one embodiment of this disclosure, the apparatus further includes: an insertion module, configured to obtain a historical sequence corresponding to the client, wherein the historical sequence includes multiple content identifiers arranged in ascending order of timestamps; and to insert the target content identifier corresponding to the target data content after the last content identifier in the historical sequence to obtain an updated historical sequence.

[0114] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this disclosure, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system).

[0115] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0116] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0117] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device as shown by a landing page for an app. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0118] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0119] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0120] This disclosure also provides a computer-readable storage medium in which the methods described in this disclosure can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded over a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium may be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0121] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for processing a data stream request, characterized in that, The method includes: Receive a first data stream request sent by the client, wherein the first data stream request carries a first refresh type; In response to the first data stream request, a candidate set is obtained from the target data source corresponding to the first refresh type, and key information corresponding to the candidate set is determined, wherein the target data source stores multiple data contents; Obtain the target state transition conditions satisfied by the key information, and determine the second refresh type corresponding to the target state transition conditions based on the correspondence between the state transition conditions and refresh types; The target data content is obtained from the candidate set, and the target data content and the second refresh type are fed back to the client so that the client can construct a second data stream request according to the second refresh type, wherein the second data stream request is the next data stream request after the first data stream request.

2. The method of claim 1, wherein, The step of obtaining a candidate set from the target data source corresponding to the first refresh type and determining the key information corresponding to the candidate set includes: Obtain the target data source corresponding to the first refresh type; The candidate set is constructed based on the data content stored in the target data source; The candidate set is generated based on the content type and quantity of the data content.

3. The method of claim 2, wherein, The step of obtaining the target data source corresponding to the first refresh type includes: Retrieve the association between refresh type and preset data source; Based on the aforementioned relationship, the first data source corresponding to the first refresh type is determined; Determine the time range corresponding to the first refresh type; Acquire historical data content falling within the stated time range, and construct a second data source using the historical data content; The first data source and the second data source are used as the target data source, wherein the first data source has a higher priority than the second data source.

4. The method of claim 2, wherein, The process of constructing the candidate set based on the data content stored in the target data source includes: Obtain the data content stored in the target data source and determine the priority of the target data source; The data content is arranged in descending order of priority to obtain the candidate set.

5. The method according to claim 3, characterized in that, Determining the time range corresponding to the first refresh type includes: Determine the start timestamp based on the first refresh type; Obtain the timestamp carried by the first data stream request and use the timestamp carried by the first data stream request as the termination timestamp; A time range is constructed based on the start timestamp and the end timestamp.

6. The method according to claim 2, characterized in that, The target state transition conditions satisfied by obtaining the key information include: Obtain multiple pre-set state transition conditions; The content type and the content quantity are matched with the state transition condition to obtain the target state transition condition that the content type and the content quantity match.

7. The method according to claim 1, characterized in that, The step of obtaining the target data content from the candidate set includes: When the candidate set includes a data content, that data content is used as the target data content; or, When the candidate set includes at least two data contents, the push priority corresponding to the data contents is obtained, and the data contents with the highest push priority are taken as the target data contents.

8. The method according to claim 1, characterized in that, The method further includes: Obtain the historical sequence corresponding to the client, wherein the historical sequence includes multiple content identifiers arranged in ascending order of timestamps; The target content identifier corresponding to the target data content is inserted after the last content identifier in the historical sequence to obtain the updated historical sequence.

9. A data stream request processing apparatus, characterized in that, The device includes: The receiving module is used to acquire a first data stream request sent by the client, wherein the first data stream request carries a first refresh type; The response module is used to respond to the first data stream request, obtain a candidate set from the target data source corresponding to the first refresh type, and determine the key information corresponding to the candidate set, wherein the target data source includes multiple data contents; The acquisition module is used to acquire the target state transition conditions satisfied by the key information, and determine the second refresh type corresponding to the target state transition conditions based on the correspondence between the state transition conditions and the refresh type. The feedback module is used to obtain target data content from the candidate set, and feed back the target data content and the second refresh type to the client, so that the client can construct a second data stream request according to the second refresh type, wherein the second data stream request is the next data stream request after the first data stream request.

10. A computer device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of any one of claims 1 to 8.