Information flow data generation method, device and electronic device

By querying the user identity identification table and querying information flow data in different index tables, dynamically adjusting the user identity identification, the problem of low efficiency in information flow data generation is solved, and the efficiency of information flow data generation and server processing capabilities are improved.

CN113722322BActive Publication Date: 2024-11-08MIGU DIGITAL MEDIA CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111004332.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-30
Publication Date
2024-11-08
Estimated Expiration
2041-08-30

AI Technical Summary

Technical Problem

In the prior art, the information flow data generation efficiency is low, especially when the user scale is expanded, there is a problem of read diffusion in the read mode, and a large number of copy operations are required in the write mode, resulting in a decrease in efficiency.

Method used

By obtaining the information flow data generation request of the target user, querying the user identity table to determine the characteristic user, and querying the information flow data in the first index table and the second index table respectively, generating the target information flow data based on the query results, and dynamically adjusting User identity to optimize index table load and distribution policies.

Benefits of technology

It improves the efficiency of information flow data generation, overcomes the bottleneck of single index table query, and optimizes the server's information flow data processing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113722322B_ABST
    Figure CN113722322B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention relate to the field of Internet technology, and disclose a method, device, and electronic device for generating information flow data. The method includes: obtaining an information flow data generation request of a first target user; querying a user identity identification table to determine a first characteristic user and a second characteristic user among the users followed by the first target user; querying a first index table for first information flow data corresponding to the first characteristic user, and querying a second index table for second information flow data corresponding to the second characteristic user; generating target information flow data for the first target user based on the first information flow data and the second information flow data. In the above manner, the embodiments of the present invention improve the efficiency of generating information flow data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of Internet technology, and specifically to a method, device and electronic device for generating information stream data. Background Art

[0002] With the continuous development of Internet technology, information flow data is increasingly widely used. When a user sends a request to generate information flow data to a server through a client, the server generates information flow data and returns the information flow data to the client.

[0003] The information flow generation mode (Feed architecture) adopted by the server side directly affects the generation efficiency of the information flow data. In the related art, the information flow generation mode adopted by the server side includes a read mode and a write mode. However, the inventors found in the process of implementing the embodiments of the present invention that: in the read mode, the information flow generation efficiency will decrease linearly with the expansion of the user scale, that is, there is a read diffusion problem; in the write mode, if the number of big V users is large, the server needs to perform a large number of copy operations, which also reduces the efficiency of information flow generation. Summary of the invention

[0004] In view of the above problems, embodiments of the present invention provide a method, device and electronic device for generating information stream data, which are used to solve the problem of low efficiency of generating information stream data in the prior art.

[0005] According to one aspect of an embodiment of the present invention, a method for generating information flow data is provided, the method comprising:

[0006] Obtaining a request for generating information flow data of a first target user;

[0007] Query the user identity table to determine a first characteristic user and a second characteristic user among the users followed by the first target user;

[0008] Query the first information flow data corresponding to the first characteristic user in the first index table, and query the second information flow data corresponding to the second characteristic user in the second index table;

[0009] The target information flow data of the first target user is generated according to the first information flow data and the second information flow data.

[0010] In an optional manner, generating the target information flow data of the first target user according to the first information flow data and the second information flow data includes:

[0011] combining the first information stream data and the second information stream data to generate combined information stream data;

[0012] After deleting illegal information flow data and duplicate information flow data in the combined information flow data, sorting the combined information flow data;

[0013] The target information flow of the target user is determined according to a preset number of information flow data that are ranked first in the sorting results.

[0014] In an optional manner, the method further includes:

[0015] Receiving information flow data published by a second target user;

[0016] Query the user identity table to determine the identity of the second target user;

[0017] If the second target user is determined to be a first characteristic user according to the identity identifier of the second target user, the information flow data published by the second target user is saved in the first index table;

[0018] If the second target user is determined to be a second characteristic user according to the identity identifier of the second target user, the information flow data published by the second target user is saved in the second index table.

[0019] In an optional manner, the method further includes:

[0020] Determine the total number of users with the first characteristic and the total number of users with the second characteristic according to the user identity identification table;

[0021] If the ratio of the total number of users with the first characteristic to the total number of users with the second characteristic is greater than a first preset threshold, switching the identities of some users with the first characteristic to users with the second characteristic;

[0022] If the ratio of the total number of the first characteristic users to the total number of the second characteristic users is less than a second preset threshold, the identities of some of the second characteristic users are switched to first characteristic users.

[0023] In an optional manner, if the second target user is determined to be a second characteristic user according to the identity identifier of the second target user, saving the information flow data published by the second target user into the second index table includes:

[0024] If the second target user is determined to be a second characteristic user according to the identity identifier of the second target user, the information flow data published by the second target user is temporarily stored in the first index table;

[0025] Distribute the information flow data temporarily stored in the first index table to the second index table;

[0026] If the distribution is successful, the information flow data temporarily stored in the first index table is deleted from the first index table;

[0027] If the distribution fails, the information flow data temporarily stored in the first index table continues to be distributed to the second index table through a scheduled task.

[0028] In an optional manner, the method further includes:

[0029] Determine the current amount of information flow data to be distributed according to the first index table;

[0030] If the data volume of the to-be-distributed data stream is not greater than the real-time distribution data volume threshold, the to-be-distributed information stream data in the first index table is distributed to the second index table in real time;

[0031] If the amount of the information flow data to be distributed is greater than the real-time distribution data amount threshold, then determining the information flow data for real-time distribution and the information flow data for scheduled task distribution respectively;

[0032] The information flow data for real-time distribution is distributed to the second index table in real time, and the information flow data for scheduled task distribution is distributed to the second index table through a scheduled task.

[0033] In an optional manner, the method further includes:

[0034] Determine the average delay of distributing information flow data within a preset time;

[0035] If the average delay is greater than a third preset threshold, lowering the real-time distribution data volume threshold;

[0036] If the average delay is less than a fourth preset threshold, the real-time distribution data volume threshold is increased.

[0037] According to another aspect of an embodiment of the present invention, there is provided an information flow generating device, the device comprising:

[0038] An acquisition module, used for acquiring an information flow data generation request of a first target user;

[0039] A determination module, configured to query a user identity table to determine a first characteristic user and a second characteristic user among the users followed by the first target user;

[0040] A query module, configured to query the first information flow data corresponding to the first characteristic user in the first index table, and query the second information flow data corresponding to the second characteristic user in the second index table;

[0041] A generating module is used to generate target information flow data of the first target user according to the first information flow data and the second information flow data.

[0042] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0043] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the above-mentioned information flow data generation method.

[0044] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, characterized in that at least one executable instruction is stored in the storage medium, and when the executable instruction is executed on an electronic device, the electronic device executes the operation of the above-mentioned information flow data generation method.

[0045] In an embodiment of the present invention, after obtaining a request for generating information flow data for a first target user sent by a target terminal, the first characteristic user and the second characteristic user among the users followed by the first target user can be determined through a user identity table, and the first information flow data corresponding to the first characteristic user and the second information flow data corresponding to the second characteristic user can be queried according to the first index table and the second index table respectively; the target information flow data of the first target user is generated according to the first information flow data and the second information flow data. It can be seen that the embodiment of the present invention uses different index tables to query information flow data according to different user identity identifications, which can overcome the bottleneck of a single index table query and improve the efficiency of generating information flow data.

[0046] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:

[0048] Figure 1 A schematic flow chart of a method for generating information flow data provided by an embodiment of the present invention is shown.

[0049] Figure 2 A schematic diagram showing the structure of an information stream data generating device provided by an embodiment of the present invention is shown;

[0050] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0051] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0052] Figure 1 The flowchart of a method for generating information flow data according to an embodiment of the present invention is shown, and the method is executed by a server. The memory of the server is used to store at least one executable instruction, and the executable instruction enables the processor of the electronic device to execute the operation of the above-mentioned method for generating information flow data. Figure 1 As shown, the method comprises the following steps:

[0053] Step 110: Obtain an information flow data generation request of a first target user.

[0054] Among them, the information flow data generation request for the first target user sent by the target terminal can be obtained. The target terminal can be a smart terminal such as a mobile phone, a tablet computer, a desktop computer, a wearable smart device, etc. An application is installed on the target terminal, and the first target user can log in to the application on the target terminal and perform a trigger operation. The target terminal can send the information flow data generation request for the first target user to the server according to the trigger operation of the first target user.

[0055] Step 120: query the user identity table to determine the first characteristic user and the second characteristic user among the users followed by the first target user.

[0056] Among them, the concerned user is the user currently added to the attention of the first target user. After the server obtains the information flow data generation request for the first target user sent by the target terminal, it can query the follower table (followee table) to determine the concerned users of the first target user, and query the user identity table (follower_followee_idx table) to determine the first characteristic user and the second characteristic user among the concerned users. The follower table may include, for example, a user ID attribute and a concerned user attribute, that is, the follower table may save all concerned users corresponding to each user. The first characteristic user may be, for example, a big V user, and the second characteristic user may be, for example, an ordinary user, and the first characteristic user and the second characteristic user may be set according to actual conditions. The user identity table may include, for example, a user ID attribute, an identity attribute, an attribute of the number of concerned users, and an attribute of the number of fans, that is, the user identity table may save the user ID, identity, number of concerned users, and number of fans corresponding to each user. It should be noted that a big V user is generally a user whose number of fans is greater than a preset threshold, and an ordinary user is generally a user other than a big V user. According to the number of fans of any user saved in the user identity table, the identity of the user can be adjusted.

[0057] Step 130: Query the first information flow data corresponding to the first characteristic user in the first index table, and query the second information flow data corresponding to the second characteristic user in the second index table.

[0058] Among them, the first index table (feed_temp table) can, for example, use a read mode to save data, and save the first information flow data corresponding to the first feature user; the second index table (feed table) can, for example, use a write mode to save data, and save the second information flow data corresponding to the second feature user. The first index table can, for example, include information flow ID attributes, follow-up user ID attributes, and fan user ID attributes, that is, the first index table can save the information flow ID corresponding to any information flow data, the publisher ID of the information flow data, and the receiver ID of the information flow data. Therefore, the user ID of the first feature user can be determined as the target fan user ID in the first index table, and the information flow data corresponding to the target fan user ID can be queried, and the queried information flow data can be assembled in real time to generate the first information flow data. The second index table can, for example, include user ID attributes and information flow attributes, that is, the second index table can save the user ID of any second feature user and the information flow data of the second feature user. Therefore, according to the user ID of the second feature user, the second information flow data corresponding to the second feature user can be directly queried in the second index table.

[0059] Step 140: Generate target information flow data of the first target user according to the first information flow data and the second information flow data.

[0060] When generating the target information flow data of the first target user according to the first information flow data and the second information flow data, the first information flow data and the second information flow data can be combined to generate the combined information flow data, and after deleting the illegal information flow data and the duplicate information flow data in the combined information flow data, the combined information flow data is sorted, and the target information flow of the target user is determined according to the preset number of information flow data at the top of the sorting result. Furthermore, the target information flow data can also be paged according to the number of pages of the display screen of the target client, and the target information flow data after the page processing is returned to the target client.

[0061] Furthermore, the server may also save the information flow data published by the first characteristic user into the first index table, and save the information flow data published by the second characteristic user into the second index table. Furthermore, when saving the information flow data, the server first receives the information flow data published by the second target user, and then queries the user identity table to determine the identity of the second target user. If the second target user is determined to be the first characteristic user based on the identity of the second target user, the information flow data published by the second target user is saved into the first index table; if the second target user is determined to be the second characteristic user based on the identity of the second target user, the information flow data published by the second target user is saved into the second index table.

[0062] It should be noted that when the total number of first characteristic users and the total number of second characteristic users are within the optimal range, the target information flow data can be generated faster by querying the first index table and the second index table, and when the total number of first characteristic users and the total number of second characteristic users are not within the optimal range, the efficiency of generating the target information flow data by querying the first index table and the second index table is low. Therefore, the user identity identifiers in the user identity identification table can be dynamically adjusted so that the total number of first characteristic users and the total number of second characteristic users are always within the optimal range. When dynamically adjusting the user identity identifiers in the user identity identification table, the total number of first characteristic users and the total number of second characteristic users can be first determined according to the user identity identification table; if the ratio of the total number of first characteristic users to the total number of second characteristic users is greater than the first preset threshold, the identity identifiers of some first characteristic users are switched to second characteristic users, and if the ratio of the total number of first characteristic users to the total number of second characteristic users is less than the second preset threshold, the identity identifiers of some second characteristic users are switched to first characteristic users.

[0063] Furthermore, if the server determines that the second target user is a second characteristic user based on the identity identifier of the second target user, the server may first temporarily store the information flow data published by the second target user in the first index table, and then distribute the information flow data temporarily stored in the first index table to the second index table, so as to prevent the data loss problem that may be caused if the server directly saves the information flow data published by the second target user in the second index table. If the server distribution is successful, the information flow data temporarily stored in the first index table will be deleted from the first index table to optimize the storage space of the first index table; if the server distribution fails, the information flow data temporarily stored in the first index table will continue to be distributed to the second index table through a scheduled task.

[0064] Furthermore, the distribution status attribute (push_status) and the distribution failure count attribute (failed_time) can be set in the first index table. The distribution status attribute is used to record the distribution status of the information flow data, and the distribution failure count attribute is used to record the number of distribution failures of the information flow data. In the first index table, the distribution status attribute of the information flow data of the first characteristic user is marked as 5, indicating that the information flow data does not need to be distributed; the distribution status attribute of the information flow data of the second characteristic user is marked as 0, indicating that the information flow data needs to be distributed; if the distribution fails, the distribution status attribute of the information flow data is further marked as 3, and the value corresponding to the distribution failure count attribute is increased by 1, and the information flow data that failed to be distributed is continued to be distributed by the scheduled task. For example, the scheduled task is used to distribute once every 1 minute. If the distribution fails for 5 consecutive times, an alarm is issued and manual intervention is performed. Different data storage time thresholds can be set for the first index table and the second index table, respectively, and data that exceeds the data storage time threshold is cleaned up to save storage space of the first index table and the second index table.

[0065] It should be noted that when the server distributes the information flow data temporarily stored in the first index table to the second index table, real-time distribution or scheduled distribution can be selected. Real-time distribution is suitable for the case where system resources are relatively abundant, and scheduled distribution is suitable for the case where system resources are relatively scarce. Further, the server can first determine the current amount of information flow data to be distributed according to the first index table. If the amount of data flow to be distributed is not greater than the real-time distribution data amount threshold, the information flow data to be distributed in the first index table is distributed to the second index table in real time. If the amount of information flow data to be distributed is greater than the real-time distribution data amount threshold, the information flow data for real-time distribution and the information flow data for scheduled task distribution are first determined respectively, and then the information flow data for real-time distribution is distributed to the second index table in real time, and the information flow data for scheduled task distribution is distributed to the second index table through the scheduled task. Further, the real-time distribution data amount threshold can be adjusted according to actual conditions. When adjusting the real-time distribution data amount threshold, the average delay of distributing information flow data within a preset time can be first determined. If the average delay is greater than the third preset threshold, the real-time distribution data amount threshold is lowered. If the average delay is less than the fourth preset threshold, the real-time distribution data amount threshold is increased.

[0066] In an embodiment of the present invention, after obtaining a request for generating information flow data for a first target user sent by a target terminal, the first characteristic user and the second characteristic user among the users followed by the first target user can be determined through a user identity table, and the first information flow data corresponding to the first characteristic user and the second information flow data corresponding to the second characteristic user can be queried according to the first index table and the second index table respectively; the target information flow data of the first target user is generated according to the first information flow data and the second information flow data. It can be seen that the embodiment of the present invention uses different index tables to query information flow data according to different user identity identifications, which can overcome the bottleneck of a single index table query and improve the efficiency of generating information flow data.

[0067] Figure 2 FIG. 1 is a schematic diagram showing the structure of an information stream data generating device according to an embodiment of the present invention. Figure 2 As shown, the device 300 includes: an acquisition module 310 , a determination module 320 , a query module 330 and a generation module 340 .

[0068] Among them, the acquisition module 310 is used to obtain the information flow data generation request of the first target user; the determination module 320 is used to query the user identity identification table to determine the first characteristic user and the second characteristic user among the users followed by the first target user; the query module 330 is used to query the first information flow data corresponding to the first characteristic user in the first index table, and query the second information flow data corresponding to the second characteristic user in the second index table; the generation module 340 is used to generate the target information flow data of the first target user based on the first information flow data and the second information flow data.

[0069] In an optional manner, the generating module 340 is used to:

[0070] combining the first information stream data and the second information stream data to generate combined information stream data;

[0071] After deleting illegal information flow data and duplicate information flow data in the combined information flow data, sorting the combined information flow data;

[0072] The target information flow of the target user is determined according to a preset number of information flow data that are ranked first in the sorting results.

[0073] In an optional manner, the apparatus 300 further includes a storage module, which is used to:

[0074] Receiving information flow data published by a second target user;

[0075] Query the user identity table to determine the identity of the second target user;

[0076] If the second target user is determined to be a first characteristic user according to the identity identifier of the second target user, the information flow data published by the second target user is saved in the first index table;

[0077] If the second target user is determined to be a second characteristic user according to the identity identifier of the second target user, the information flow data published by the second target user is saved in the second index table.

[0078] In an optional manner, the save module is used to:

[0079] Determine the total number of users with the first characteristic and the total number of users with the second characteristic according to the user identity identification table;

[0080] If the ratio of the total number of users with the first characteristic to the total number of users with the second characteristic is greater than a first preset threshold, switching the identities of some users with the first characteristic to users with the second characteristic;

[0081] If the ratio of the total number of the first characteristic users to the total number of the second characteristic users is less than a second preset threshold, the identities of some of the second characteristic users are switched to first characteristic users.

[0082] In an optional manner, the save module is used to:

[0083] If the second target user is determined to be a second characteristic user according to the identity identifier of the second target user, the information flow data published by the second target user is temporarily stored in the first index table;

[0084] Distribute the information flow data temporarily stored in the first index table to the second index table;

[0085] If the distribution is successful, the information flow data temporarily stored in the first index table is deleted from the first index table;

[0086] If the distribution fails, the information flow data temporarily stored in the first index table continues to be distributed to the second index table through a scheduled task.

[0087] In an optional manner, the save module is used to:

[0088] Determine the current amount of information flow data to be distributed according to the first index table;

[0089] If the data volume of the to-be-distributed data stream is not greater than the real-time distribution data volume threshold, the to-be-distributed information stream data in the first index table is distributed to the second index table in real time;

[0090] If the amount of the information flow data to be distributed is greater than the real-time distribution data amount threshold, then determining the information flow data for real-time distribution and the information flow data for scheduled task distribution respectively;

[0091] The information flow data for real-time distribution is distributed to the second index table in real time, and the information flow data for scheduled task distribution is distributed to the second index table through a scheduled task.

[0092] In an optional manner, the save module is used to:

[0093] Determine the average delay of distributing information flow data within a preset time;

[0094] If the average delay is greater than a third preset threshold, lowering the real-time distribution data volume threshold;

[0095] If the average delay is less than a fourth preset threshold, the real-time distribution data volume threshold is increased.

[0096] In an embodiment of the present invention, after obtaining a request for generating information flow data for a first target user sent by a target terminal, the first characteristic user and the second characteristic user among the users followed by the first target user can be determined through a user identity table, and the first information flow data corresponding to the first characteristic user and the second information flow data corresponding to the second characteristic user can be queried according to the first index table and the second index table respectively; the target information flow data of the first target user is generated according to the first information flow data and the second information flow data. It can be seen that the embodiment of the present invention uses different index tables to query information flow data according to different user identity identifications, which can overcome the bottleneck of a single index table query and improve the efficiency of generating information flow data.

[0097] Figure 3 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.

[0098] like Figure 3 As shown, the electronic device may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .

[0099] The processor 402, the communication interface 404, and the memory 406 communicate with each other via the communication bus 408. The communication interface 404 is used to communicate with other devices such as a client or other server network elements. The processor 402 is used to execute the program 410, which can specifically execute the relevant steps in the above-mentioned embodiment of the method for generating information flow data.

[0100] Specifically, the program 410 may include program code including computer executable instructions.

[0101] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0102] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0103] Program 410 can be specifically called by processor 402 to enable the electronic device to perform the following operations:

[0104] Obtaining a request for generating information flow data of a first target user;

[0105] Query the user identity table to determine a first characteristic user and a second characteristic user among the users followed by the first target user;

[0106] Query the first information flow data corresponding to the first characteristic user in the first index table, and query the second information flow data corresponding to the second characteristic user in the second index table;

[0107] The target information flow data of the first target user is generated according to the first information flow data and the second information flow data.

[0108] In an optional manner, the program 410 may be specifically called by the processor 402 to enable the electronic device to perform the following operations:

[0109] combining the first information stream data and the second information stream data to generate combined information stream data;

[0110] After deleting illegal information flow data and duplicate information flow data in the combined information flow data, sorting the combined information flow data;

[0111] The target information flow of the target user is determined according to a preset number of information flow data that are ranked first in the sorting results.

[0112] In an optional manner, the program 410 may be specifically called by the processor 402 to enable the electronic device to perform the following operations:

[0113] Receiving information flow data published by a second target user;

[0114] Query the user identity table to determine the identity of the second target user;

[0115] If the second target user is determined to be a first characteristic user according to the identity identifier of the second target user, the information flow data published by the second target user is saved in the first index table;

[0116] If the second target user is determined to be a second characteristic user according to the identity identifier of the second target user, the information flow data published by the second target user is saved in the second index table.

[0117] In an optional manner, the program 410 may be specifically called by the processor 402 to enable the electronic device to perform the following operations:

[0118] Determine the total number of users with the first characteristic and the total number of users with the second characteristic according to the user identity identification table;

[0119] If the ratio of the total number of users with the first characteristic to the total number of users with the second characteristic is greater than a first preset threshold, switching the identities of some users with the first characteristic to users with the second characteristic;

[0120] If the ratio of the total number of the first characteristic users to the total number of the second characteristic users is less than a second preset threshold, the identities of some of the second characteristic users are switched to first characteristic users.

[0121] In an optional manner, the program 410 may be specifically called by the processor 402 to enable the electronic device to perform the following operations:

[0122] If the second target user is determined to be a second characteristic user according to the identity identifier of the second target user, the information flow data published by the second target user is temporarily stored in the first index table;

[0123] Distribute the information flow data temporarily stored in the first index table to the second index table;

[0124] If the distribution is successful, the information flow data temporarily stored in the first index table is deleted from the first index table;

[0125] If the distribution fails, the information flow data temporarily stored in the first index table continues to be distributed to the second index table through a scheduled task.

[0126] In an optional manner, the program 410 may be specifically called by the processor 402 to enable the electronic device to perform the following operations:

[0127] Determine the current amount of information flow data to be distributed according to the first index table;

[0128] If the data volume of the to-be-distributed data stream is not greater than the real-time distribution data volume threshold, the to-be-distributed information stream data in the first index table is distributed to the second index table in real time;

[0129] If the amount of the information flow data to be distributed is greater than the real-time distribution data amount threshold, then determining the information flow data for real-time distribution and the information flow data for scheduled task distribution respectively;

[0130] The information flow data for real-time distribution is distributed to the second index table in real time, and the information flow data for scheduled task distribution is distributed to the second index table through a scheduled task.

[0131] In an optional manner, the program 410 may be specifically called by the processor 402 to enable the electronic device to perform the following operations:

[0132] Determine the average delay of distributing information flow data within a preset time;

[0133] If the average delay is greater than a third preset threshold, lowering the real-time distribution data volume threshold;

[0134] If the average delay is less than a fourth preset threshold, the real-time distribution data volume threshold is increased.

[0135] In an embodiment of the present invention, after obtaining a request for generating information flow data for a first target user sent by a target terminal, the first characteristic user and the second characteristic user among the users followed by the first target user can be determined through a user identity table, and the first information flow data corresponding to the first characteristic user and the second information flow data corresponding to the second characteristic user can be queried according to the first index table and the second index table respectively; the target information flow data of the first target user is generated according to the first information flow data and the second information flow data. It can be seen that the embodiment of the present invention uses different index tables to query information flow data according to different user identity identifications, which can overcome the bottleneck of a single index table query and improve the efficiency of generating information flow data.

[0136] An embodiment of the present invention provides a computer-readable storage medium, wherein the storage medium stores at least one executable instruction. When the executable instruction is executed on an electronic device, the electronic device executes the information stream data generating method in any of the above method embodiments.

[0137] An embodiment of the present invention provides an information stream data generating device, which is used to execute the above-mentioned information stream data generating method.

[0138] An embodiment of the present invention provides a computer program, which can be called by a processor to enable an electronic device to execute the information stream data generating method in any of the above method embodiments.

[0139] An embodiment of the present invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed on a computer, the computer executes the information flow data generating method in any of the above method embodiments.

[0140] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description made to specific languages ​​above is for disclosing the best mode of the present invention.

[0141] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0142] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than those expressly recited in each claim.

[0143] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0144] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

Claims

1. A method for generating information flow data, characterized in that: The method comprises: Obtaining a request for generating information flow data of a first target user; Query the user identity table to determine a first characteristic user and a second characteristic user among the users followed by the first target user; Query the first information flow data corresponding to the first characteristic user in the first index table, and query the second information flow data corresponding to the second characteristic user in the second index table; Generating the target information flow data of the first target user according to the first information flow data and the second information flow data, including: combining the first information flow data and the second information flow data to generate combined information flow data; sorting the combined information flow data after deleting illegal information flow data and duplicate information flow data in the combined information flow data; determining the target information flow data of the target user according to a preset number of information flow data with the top of the sorting result; Receive information flow data published by a second target user; query the user identity table to determine the identity of the second target user; if the second target user is determined to be a first characteristic user according to the identity of the second target user, save the information flow data published by the second target user to the first index table; if the second target user is determined to be a second characteristic user according to the identity of the second target user, temporarily store the information flow data published by the second target user in the first index table; distribute the information flow data temporarily stored in the first index table to the second index table; if the distribution is successful, distribute the information flow data temporarily stored in the first index table to the second index table; Delete from the first index table; if the distribution fails, continue to distribute the information flow data temporarily stored in the first index table to the second index table through a scheduled task; determine the current amount of information flow data to be distributed according to the first index table; if the amount of data flow to be distributed is not greater than the real-time distribution data volume threshold, distribute the information flow data to be distributed in the first index table to the second index table in real time; if the amount of information flow data to be distributed is greater than the real-time distribution data volume threshold, respectively determine the information flow data for real-time distribution and the information flow data for scheduled task distribution; distribute the information flow data for real-time distribution to the second index table in real time, and distribute the information flow data for scheduled task distribution to the second index table through a scheduled task; Among them, the total number of first feature users and the total number of second feature users are determined according to the user identity identification table; if the ratio of the total number of the first feature users to the total number of the second feature users is greater than a first preset threshold, the identities of some first feature users are switched to second feature users; if the ratio of the total number of the first feature users to the total number of the second feature users is less than a second preset threshold, the identities of some second feature users are switched to first feature users.

2. The method according to claim 1, characterized in that The method further comprises: Determine the current amount of information flow data to be distributed according to the first index table; If the data volume of the to-be-distributed data stream is not greater than the real-time distribution data volume threshold, the to-be-distributed information stream data in the first index table is distributed to the second index table in real time; If the amount of the information flow data to be distributed is greater than the real-time distribution data amount threshold, then determining the information flow data for real-time distribution and the information flow data for scheduled task distribution respectively; The information flow data for real-time distribution is distributed to the second index table in real time, and the information flow data for scheduled task distribution is distributed to the second index table through a scheduled task.

3. The method according to claim 2, characterized in that The method further comprises: Determine the average delay of distributing information flow data within a preset time; If the average delay is greater than a third preset threshold, lowering the real-time distribution data volume threshold; If the average delay is less than a fourth preset threshold, the real-time distribution data volume threshold is increased.

4. An information flow generating device, characterized in that: The device comprises: An acquisition module, used for acquiring an information flow data generation request of a first target user; A determination module, configured to query a user identity table to determine a first characteristic user and a second characteristic user among the users followed by the first target user; A query module, used to query the first information flow data corresponding to the first characteristic user in the first index table, and query the second information flow data corresponding to the second characteristic user in the second index table; A generating module, configured to generate target information flow data of the first target user according to the first information flow data and the second information flow data, comprising: combining the first information flow data and the second information flow data to generate combined information flow data; sorting the combined information flow data after deleting illegal information flow data and duplicate information flow data in the combined information flow data; and determining the target information flow data of the target user according to a preset number of information flow data at the top of the sorting result; A saving module, used for receiving information flow data published by a second target user; querying the user identity identification table to determine the identity identification of the second target user; if the second target user is determined to be a first characteristic user according to the identity identification of the second target user, saving the information flow data published by the second target user to the first index table; if the second target user is determined to be a second characteristic user according to the identity identification of the second target user, if the second target user is determined to be a second characteristic user according to the identity identification of the second target user, temporarily storing the information flow data published by the second target user in the first index table; distributing the information flow data temporarily stored in the first index table to the second index table; if the distribution is successful, deleting the information flow data temporarily stored in the first index table from the first index table; if the distribution fails, continuing to distribute the information flow data temporarily stored in the first index table to the second index table through a scheduled task; determining the current information flow data to be distributed according to the first index table The amount of information flow data to be distributed; if the amount of data flow to be distributed is not greater than the real-time distribution data volume threshold, the information flow data to be distributed in the first index table is distributed to the second index table in real time; if the amount of information flow data to be distributed is greater than the real-time distribution data volume threshold, the information flow data for real-time distribution and the information flow data for scheduled task distribution are determined respectively; the information flow data for real-time distribution is distributed to the second index table in real time, and the information flow data for scheduled task distribution is distributed to the second index table through scheduled tasks; wherein, the total amount of first characteristic users and the total amount of second characteristic users are determined according to the user identity identification table; if the ratio of the total amount of the first characteristic users to the total amount of the second characteristic users is greater than the first preset threshold, the identity identification of some first characteristic users is switched to the second characteristic users; if the ratio of the total amount of the first characteristic users to the total amount of the second characteristic users is less than the second preset threshold, the identity identification of some second characteristic users is switched to the first characteristic users.

5. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the information stream data generating method as described in any one of claims 1-3.

6. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction. When the executable instruction is executed on the electronic device, the electronic device executes the operation of the information stream data generating method according to any one of claims 1 to 3.