An information flow sorting method, device, equipment and medium based on Elasticsearch
By using Elasticsearch's information flow sorting method in social lending platforms, combining freshness and investability score models, the difficulty of users in finding high-quality investment information on the platform is solved, and user experience and satisfaction are improved.
Patent Information
- Application Number
- CN202411320803.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-23
AI Technical Summary
The sorting method of loan requests in social lending platforms causes users to constantly scratch the screen to find high-quality investment information, resulting in poor user experience.
The information flow sorting method based on Elasticsearch is used to rate each historical information flow through the freshness score model and the projectability score model. Combining user preferences and behavioral characteristics, appropriate information flow is accurately recommended.
It improves user investment experience and satisfaction, makes the sort of historical information flow more in line with user needs, and reduces the user's operating burden on the platform.
Smart Images

Figure CN118839068B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of information flow sorting, and in particular to an information flow sorting method, device, equipment and medium based on Elasticsearch. Background Art
[0002] With the development of information technology, loan companies have relied on Internet technology to spawn a large number of online loan platforms, that is, applicants apply for group borrowing through online loans, which can be understood as applicants being able to make loan requests on online loan platforms.
[0003] The current online lending platforms may include social lending platforms, that is, individuals can apply for loan requests on social lending platforms, and accordingly individuals can also borrow money through loan requests on social lending platforms. However, since the loan requests on social lending platforms are currently displayed in the form of feed information, and since the front-end page of the social lending platform is a waterfall flow model, this means that if users want to see better investment information, they need to swipe the screen continuously, resulting in additional operations and a poor user experience. Summary of the invention
[0004] The present application provides an information flow sorting method, apparatus, device and medium based on Elasticsearch, which scores each feed information by setting a scoring model based on Elasticsearch, so that the feed information flow can be sorted according to the score, so that users can directly see better investment information, thereby improving the user experience.
[0005] In a first aspect, the present application provides an information flow sorting method based on Elasticsearch, the method comprising:
[0006] Collecting historical data of multiple historical information flows, and storing the historical data of each historical information flow in the Elasticsearch index by setting fields, wherein the historical data includes display data, click data, and content data of the historical information flow, and the content data includes an investment guarantee value;
[0007] Use a freshness score model to calculate the freshness of the display data, click data, and investment guarantee value of each historical information flow to obtain a freshness score corresponding to each historical information flow, wherein the freshness score model is obtained through a custom script of Elasticsearch;
[0008] Use a feasibility score model to calculate the feasibility of the content data of each historical information flow to obtain a feasibility score corresponding to each historical information flow, wherein the feasibility score model is obtained through a custom script of Elasticsearch;
[0009] The ranking score of each historical information flow is obtained by subtracting the freshness score from the investability score;
[0010] The multiple historical information flows are sorted and displayed according to the sorting score of each historical information flow and the type of each historical information flow.
[0011] Optionally, a freshness score model is used to calculate the freshness of the investment guarantee value in the display data, click data, and content data of each historical information flow to obtain a freshness score corresponding to each historical information flow, including:
[0012] Calculate the display data using the display data calculation formula in the freshness score model to obtain a display score;
[0013] Calculate the click data using the click data calculation formula in the freshness score model to obtain the click score;
[0014] The investment guarantee formula in the freshness score model is used to calculate the investment guarantee value in the content data to obtain the investment guarantee score;
[0015] The display score, click score and investment guarantee score are weighted and added together to obtain the freshness score.
[0016] Optionally, the display data is calculated using a display data calculation formula in a freshness score model to obtain a display score, including:
[0017] Get the number of times each historical information stream appears on the first page of the carousel area and the number of times each historical information stream appears in the first three information streams of the carousel area from the Elasticsearch index;
[0018] Substitute the number of times the first page of the carousel area appears into the formula for the number of times the first page of the carousel area appears to obtain the score of the number of times the first page of the carousel area appears. The formula for the number of times the first page of the carousel area appears is as follows:
[0019] ;
[0020] in, The fraction indicating the number of times the first page of the carousel appears; Indicates the number of times it appears on the first page of the carousel area; represents the attenuation factor; Indicates the current timestamp; Indicates the creation time of the historical information flow;
[0021] Substitute the number of times the first three information flows in the carousel area appear into the formula of the first three times in the carousel area to obtain the score of the number of times the first three information flows in the carousel area appear. The formula of the first three times in the carousel area is as follows:
[0022] ;
[0023] in, Indicates the fraction of times the information appears in the first three information streams in the carousel area; Indicates the number of times the first three information streams appear in the carousel area; represents the attenuation factor; Indicates the current timestamp; Indicates the update time of the historical information flow.
[0024] Optionally, the click data is calculated using a click data calculation formula in the freshness score model to obtain a click score, including:
[0025] Get the number of times each historical information stream has been viewed and shared from the Elasticsearch index;
[0026] Substitute the number of times the details are viewed into the number of times the details are viewed formula to obtain the score of the number of times the details are viewed. The number of times the details are viewed formula is as follows:
[0027] ;
[0028] in, A score indicating the number of times the detail has been viewed; Indicates the number of times the details have been viewed;
[0029] Substitute the number of shares into the number of shares formula to obtain the number of shares score. The number of shares formula is as follows:
[0030] ;
[0031] in, A score indicating the number of times it has been shared; Indicates the number of times it has been shared.
[0032] Optionally, the pitchability score model is used to calculate the pitchability of the content data of each historical information flow to obtain the pitchability score corresponding to each historical information flow, including:
[0033] Obtain content data of each historical information flow from the Elasticsearch index, the content data including binary variable data and investment amount data, the binary variable data including whether the historical information flow is in an investment state, whether the historical information flow has a red envelope, and whether the initiator of the historical information flow has been deregistered, and the investment amount data including the tender interest rate, tender duration, cumulative redemption amount, cumulative total number of investors, and cumulative number of loans;
[0034] The binary variable formula of the investability score model is used to calculate the binary variable data in the content data to obtain the binary variable score;
[0035] Substitute the tender interest rate, tender duration, cumulative repayment amount, cumulative total number of investors and cumulative number of loans into the amount data formula in the investability score model to obtain the amount data score. The amount data formula is as follows:
[0036] ;
[0037] in, Indicates the fraction of amount data; represents the first weight; represents the second weight; represents the third weight; represents the 4th weight; represents the 5th weight; It indicates the bidding interest rate; Indicates the duration of tender issuance; Indicates the cumulative redemption amount; Indicates the total number of cumulative investors; Indicates the cumulative number of loans;
[0038] Add the binary variable score and the amount data score to obtain the investability score.
[0039] Optionally, the method further comprises:
[0040] The historical information flows with a investability score greater than 0 are sorted and displayed.
[0041] Optionally, the multiple historical information flows are sorted and displayed according to the sorting score of each historical information flow and the type of each historical information flow, including:
[0042] Set product type values for multiple historical information streams;
[0043] Arrange the product type values of multiple historical information flows in positive order to obtain a type sequence;
[0044] Arrange the ranking scores of multiple historical information flows in descending order to obtain a score sequence;
[0045] According to each historical information flow, the type sequence and the score sequence are combined to obtain a final sequence, and multiple historical information flows are displayed according to the final sequence.
[0046] In a second aspect, the present application provides an information flow sorting device based on Elasticsearch, the device comprising:
[0047] A storage unit, used to collect historical data of multiple historical information flows, and store the historical data of each historical information flow in an Elasticsearch index by setting fields, wherein the historical data includes display data, click data, and content data of the historical information flow, and the content data includes an investment guarantee value;
[0048] A calculation unit, used to calculate the freshness of the display data, click data and investment guarantee value of each historical information flow using a freshness score model to obtain a freshness score corresponding to each historical information flow, wherein the freshness score model is obtained through a custom script of Elasticsearch;
[0049] The calculation unit is further used to use a pitchability score model to perform pitchability calculation on the content data of each historical information flow to obtain a pitchability score corresponding to each historical information flow, wherein the pitchability score model is obtained through a custom script of Elasticsearch;
[0050] An obtaining unit, used for obtaining a ranking score of each historical information flow by subtracting a freshness score from a pitchability score;
[0051] The sorting unit is used to sort and display the multiple historical information flows according to the sorting score of each historical information flow and the type of each historical information flow.
[0052] Optionally, the calculation unit is used to use a freshness score model to calculate the freshness of the investment guarantee value in the display data, click data and content data of each historical information flow, and obtain the freshness score corresponding to each historical information flow, including:
[0053] A display data calculation unit, used to calculate the display data using the display data calculation formula in the freshness score model to obtain a display score;
[0054] A click data calculation unit, used to calculate the click data using the click data calculation formula in the freshness score model to obtain a click score;
[0055] An investment guarantee calculation unit, used to calculate the investment guarantee value in the content data using the investment guarantee formula in the freshness score model to obtain an investment guarantee score;
[0056] The freshness calculation unit is used to perform weighted addition calculation on the display score, the click score and the investment guarantee score to obtain the freshness score.
[0057] Optionally, a data calculation unit is displayed, specifically used for:
[0058] Get the number of times each historical information stream appears on the first page of the carousel area and the number of times each historical information stream appears in the first three information streams of the carousel area from the Elasticsearch index;
[0059] Substitute the number of times the first page of the carousel area appears into the formula for the number of times the first page of the carousel area appears to obtain the score of the number of times the first page of the carousel area appears. The formula for the number of times the first page of the carousel area appears is as follows:
[0060] ;
[0061] in, The fraction indicating the number of times the first page of the carousel appears; Indicates the number of times it appears on the first page of the carousel area; represents the attenuation factor; Indicates the current timestamp; Indicates the creation time of the historical information flow;
[0062] Substitute the number of times the first three information flows in the carousel area appear into the formula of the first three times in the carousel area to obtain the score of the number of times the first three information flows in the carousel area appear. The formula of the first three times in the carousel area is as follows:
[0063] ;
[0064] in, Indicates the fraction of times the information appears in the first three information streams in the carousel area; Indicates the number of times the first three information streams appear in the carousel area; represents the attenuation factor; Indicates the current timestamp; Indicates the update time of the historical information flow.
[0065] Optionally, click on the data calculation unit, specifically for:
[0066] Get the number of times each historical information stream has been viewed and shared from the Elasticsearch index;
[0067] ;
[0068] in, A score indicating the number of times the detail has been viewed; Indicates the number of times the details have been viewed;
[0069] Substitute the number of shares into the number of shares formula to obtain the number of shares score. The number of shares formula is as follows:
[0070] ;
[0071] in, A score indicating the number of times it has been shared; Indicates the number of times it has been shared.
[0072] Optionally, the calculation unit is used to use the pitchability score model to perform pitchability calculation on the content data of each historical information flow, and when obtaining the pitchability score corresponding to each historical information flow, specifically to:
[0073] Obtain content data of each historical information flow from the Elasticsearch index, the content data including binary variable data and investment amount data, the binary variable data including whether the historical information flow is in an investment state, whether the historical information flow has a red envelope, and whether the initiator of the historical information flow has been deregistered, and the investment amount data including the tender interest rate, tender duration, cumulative redemption amount, cumulative total number of investors, and cumulative number of loans;
[0074] The binary variable formula of the investability score model is used to calculate the binary variable data in the content data to obtain the binary variable score;
[0075] Substitute the tender interest rate, tender duration, cumulative repayment amount, cumulative total number of investors and cumulative number of loans into the amount data formula in the investability score model to obtain the amount data score. The amount data formula is as follows:
[0076] ;
[0077] in, Indicates the fraction of amount data; represents the first weight; represents the second weight; represents the third weight; represents the 4th weight; represents the 5th weight; It indicates the bidding interest rate; Indicates the duration of tender issuance; Indicates the cumulative redemption amount; Indicates the total number of cumulative investors; Indicates the cumulative number of loans;
[0078] Add the binary variable score and the amount data score to obtain the investability score.
[0079] Optionally, the device further comprises:
[0080] The judgment unit is used to sort and display the historical information flows whose investability scores are greater than 0.
[0081] Optionally, the sorting unit is specifically used for:
[0082] Set product type values for multiple historical information streams;
[0083] Arrange the product type values of multiple historical information flows in positive order to obtain a type sequence;
[0084] Arrange the ranking scores of multiple historical information flows in descending order to obtain a score sequence;
[0085] According to each historical information flow, the type sequence and the score sequence are combined to obtain a final sequence, and multiple historical information flows are displayed according to the final sequence.
[0086] In a third aspect, the present application provides an electronic device, the electronic device comprising a memory and a processor:
[0087] The memory is used to store computer programs;
[0088] The processor is used to execute the method provided by the first aspect according to the computer program.
[0089] In a fourth aspect, the present application further provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the method provided in the first aspect above.
[0090] It can be seen that this application has the following beneficial effects:
[0091] The present application provides an information flow sorting method based on Elasticsearch, which comprises the following steps: firstly, collecting historical data of multiple historical information flows, and storing the historical data of each historical information flow in an Elasticsearch index by setting fields, wherein the historical data comprises display data, click data and content data of the historical information flow, and the content data comprises an investment guarantee value; performing freshness calculation on the display data, click data and investment guarantee value of each historical information flow using a freshness score model to obtain a freshness score corresponding to each historical information flow, wherein the freshness score model is obtained through a custom script of Elasticsearch; performing investability calculation on the content data of each historical information flow using an investability score model to obtain a investability score corresponding to each historical information flow, wherein the investability score model is obtained through a custom script of Elasticsearch; subtracting the freshness score from the investability score to obtain a ranking score of each historical information flow; and finally sorting and displaying multiple historical information flows according to the ranking score of each historical information flow and the type of each historical information flow. In this process, through the custom script of Elasticsearch, the freshness score model and the investability score model are combined to perform scoring calculations during the sorting process. It can sort according to user preferences and behavioral characteristics, accurately recommend appropriate historical information streams, and make the sorting of historical information streams more in line with user needs, thereby improving user investment experience and satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0093] Figure 1 This is a flow chart of an embodiment of an information flow sorting method based on Elasticsearch in the embodiment of the present application;
[0094] Figure 2 This is a schematic diagram of the front-end interface of the social lending platform in the embodiment of the present application;
[0095] Figure 3 This is a schematic diagram of the structure of an information flow sorting system based on Elasticsearch in an embodiment of the present application;
[0096] Figure 4 This is a flow chart of an embodiment of an information flow sorting method based on Elasticsearch in the embodiment of the present application;
[0097] Figure 5 This is a schematic diagram of the overall query structure of Elasticsearch in an embodiment of the present application;
[0098] Figure 6 This is a schematic diagram of code for calculating the score of the number of times the first page of the carousel area appears based on Elasticsearch in an embodiment of the present application;
[0099] Figure 7 This is a schematic diagram of code for calculating the number of times the first three information flows appear in the carousel area based on Elasticsearch in an embodiment of the present application;
[0100] Figure 8 This is a schematic diagram of code for calculating the number of times the details have been viewed based on Elasticsearch in an embodiment of the present application;
[0101] Fig. 9 This is a schematic diagram of code for calculating the number of times a content is shared based on Elasticsearch in an embodiment of the present application;
[0102] Fig.10 This is a schematic diagram of the code for calculating the investment guarantee score based on Elasticsearch in an embodiment of the present application;
[0103] Fig.11 This is a schematic diagram of the code for calculating the freshness score based on Elasticsearch in an embodiment of the present application;
[0104] Fig.12 This is a schematic diagram of code for calculating binary variable scores based on Elasticsearch in an embodiment of the present application;
[0105] Fig.13 This is a schematic diagram of the code for calculating the amount data score based on Elasticsearch in an embodiment of the present application;
[0106] Fig.14 This is a schematic diagram of the code for calculating the ranking score based on Elasticsearch in an embodiment of the present application;
[0107] Fig.15 A schematic diagram of a code for setting a sorting mechanism based on Elasticsearch in an embodiment of the present application;
[0108] Fig.16 This is a schematic diagram of the structure of an information flow sorting device based on Elasticsearch in an embodiment of the present application;
[0109] Fig.17 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0110] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0111] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0112] First, a brief description of the terms that may be involved in this application is given:
[0113] Feed information: A content aggregator formed by combining several information sources that users actively subscribe to is called a feed, which can help users continuously obtain the latest subscribed content. For example, a dynamic post in the circle of friends is a feed.
[0114] Elasticsearch: is a distributed, highly scalable, and highly real-time search and data analysis engine. It can easily enable large amounts of data to be searched, analyzed, and explored. Taking full advantage of the horizontal scalability of Elasticsearch can make data more valuable in a production environment. The implementation principle of Elasticsearch is mainly divided into the following steps. First, the user submits the data to the Elasticsearch database, and then the corresponding sentence is segmented through the word segmentation controller, and its weight and word segmentation results are stored in the data. When the user searches for data, the results are ranked and scored according to the weight, and then the returned results are presented to the user.
[0115] At present, the front end of the social lending platform sorts and displays feed information with investment attributes. However, since the current sorting method sorts according to the creation time, feed information that has not been invested in for a long time will be refreshed to the top of the sorting due to the automatic renewal function. There will also be a situation where low-interest feed information is ranked ahead of high-interest feed information, and feed information without red envelopes will be refreshed ahead of feed information with red envelopes. The above problems will cause users to perform additional sliding or searching operations when selecting appropriate feed information, thereby reducing the user experience.
[0116] In the embodiment of the present application, a scoring model is set based on Elasticsearch to score each feed information, so that the feed information flow can be sorted according to the score, so that users can directly see better investment information, thereby improving the user experience.
[0117] In specific implementation, the method may include, for example: first, collecting historical data of multiple historical information flows, and storing the historical data of each historical information flow in an Elasticsearch index by setting fields, wherein the historical data includes display data, click data and content data of the historical information flow, and the content data includes an investment guarantee value; using a freshness score model to calculate the freshness of the display data, click data and investment guarantee value of each historical information flow to obtain a freshness score corresponding to each historical information flow, wherein the freshness score model is obtained through a custom script of Elasticsearch; using a feasibility score model to calculate the feasibility of the content data of each historical information flow to obtain a feasibility score corresponding to each historical information flow, wherein the feasibility score model is obtained through a custom script of Elasticsearch; using the feasibility score to subtract the freshness score from the feasibility score to obtain a ranking score for each historical information flow; finally, sorting and displaying multiple historical information flows according to the ranking score of each historical information flow and the type of each historical information flow.
[0118] It can be seen that the method provided by the implementation of this application can be sorted according to user preferences and behavioral characteristics through custom scripts and Elasticsearch's functionscore syntax, so that the sorting of historical information flows is more in line with user needs. In addition, in the sorting process, the freshness score model and the investability score model are combined for scoring calculation to accurately recommend appropriate historical information flows, thereby improving user investment experience and satisfaction.
[0119] To facilitate understanding of the specific implementation of the information flow sorting method based on Elasticsearch provided in the embodiment of the present application, it will be described below with reference to the accompanying drawings.
[0120] It should be noted that the subject implementing the information flow sorting method based on Elasticsearch may be the information flow sorting system based on Elasticsearch provided in the embodiment of the present application, or may be the information flow sorting device based on Elasticsearch provided in the embodiment of the present application, and the information flow sorting device based on Elasticsearch may be carried in an electronic device or a functional module of an electronic device. The electronic device in the embodiment of the present application may be any device capable of implementing the information flow sorting method based on Elasticsearch in the embodiment of the present application, for example, may be an Internet of Things (IoT) device.
[0121] Figure 1 A flowchart of an information flow sorting method based on Elasticsearch provided in an embodiment of the present application. The method can be applied to an information flow sorting system based on Elasticsearch, which can be, for example, Figure 3 The information flow sorting system 300 based on Elasticsearch is shown; the method can also be applied to an information flow sorting device based on Elasticsearch, which can be, for example, Fig.16 The information flow sorting device 1600 based on Elasticsearch shown in FIG. 1 may also be integrated into Fig.17 Functional modules in the electronic device 1700 are shown.
[0122] like Figure 1 As shown, the method includes the following S101~S105:
[0123] S101: Collect historical data of multiple historical information flows, and store the historical data of each historical information flow in an Elasticsearch index by setting fields, wherein the historical data includes display data, click data, and content data of the historical information flow, and the content data includes an investment guarantee value.
[0124] In order to optimize the display order of information streams, it is first necessary to collect historical data of multiple historical information streams, and store the historical data of each historical information stream in the Elasticsearch index by setting fields, wherein the historical data includes the display data, click data and content data of the historical information stream; the display data and click data of each historical information stream are calculated for freshness using the freshness score model to obtain the freshness score corresponding to each historical information stream; the content data of each historical information stream is calculated for investability using the investability score model to obtain the investability score corresponding to each historical information stream; and the ranking score of each historical information stream is obtained by subtracting the freshness score from the investability score; finally, the multiple historical information streams are sorted and displayed according to the ranking score of each historical information stream and the type of each historical information stream. Therefore, the embodiment of the present application stores the historical data of the historical information streams collected by S101 to facilitate subsequent calculations.
[0125] The historical information flow in the embodiment of the present application is as follows Figure 2 As shown in the figure, it is a feed information of loan request. Users can apply for loans in the social lending platform. After the application is successful, similar feed information will be generated and displayed on the front-end page. At the same time, other users can also select the feed information of loan through the front-end page, thus realizing social lending. It should be noted that Figure 2 The feed information shown has a red envelope component. The red envelope refers to the feed information of the person who initiated the loan request. The person can set a certain proportion of the red envelope as a guarantee red envelope. If someone guarantees him, when the loan of the feed information is successful, the person will get the red envelope; other friends who share the current feed information can also get the red envelope.
[0126] As an example, S101 may include: collecting historical data of multiple historical information flows, and recording statistical information of each historical information flow by setting fields of an Elasticsearch index, wherein the set fields are shown in Table 1 below:
[0127] Table 1 shows the field names, types, and meanings of the Elasticsearch index.
[0128]
[0129] In this application, historical data is divided into display data, click data and content data, among which display data includes: the number of times it appears on the first page of the carousel area and the number of times it appears in the first three information flows in the carousel area; click data includes: the number of times the details are viewed and the number of times it is shared; the last content data includes: whether it is guaranteed, whether it is investing, whether it comes with a red envelope, whether the initiating user has been cancelled, the bidding interest rate, the bidding duration, the cumulative redemption amount, the cumulative number of investors and the cumulative number of loans.
[0130] In this process, when collecting historical information streams with loan information, not only unique content data is collected for subsequent scoring data, but better sorting can be performed based on specific historical information streams, thereby improving the user experience.
[0131] S102: Use a freshness score model to calculate the freshness of the display data, click data, and investment guarantee value of each historical information flow to obtain a freshness score corresponding to each historical information flow, wherein the freshness score model is obtained through a custom script of Elasticsearch.
[0132] As an example, S102 may include: S1021, using the display data calculation formula in the freshness score model to calculate the display data to obtain the display score; S1022, using the click data calculation formula in the freshness score model to calculate the click data to obtain the click score; S1023, using the investment guarantee formula in the freshness score model to calculate the investment guarantee value in the content data to obtain the investment guarantee score, where the investment guarantee value is a binary variable; S1024, performing weighted addition calculation on the display score, click score and investment guarantee score to obtain the freshness score.
[0133] As described above, the display data set in the embodiment of the present application includes the number of times the first page of the carousel area appears and the number of times the first three information flows of the carousel area appear. Therefore, S1021 needs to calculate these two types of data respectively, which may include:
[0134] (1) Obtain the number of times each historical information stream appears on the first page of the carousel area and the number of times each historical information stream appears in the first three information streams of the carousel area from the Elasticsearch index;
[0135] (2) Substitute the number of times the content appears on the first page of the carousel area into the formula for the number of times the content appears on the first page of the carousel area to obtain the score of the number of times the content appears on the first page of the carousel area. The formula for the number of times the content appears on the first page of the carousel area is as follows:
[0136] ;
[0137] in, The fraction indicating the number of times the first page of the carousel appears; Indicates the number of times it appears on the first page of the carousel area; represents the attenuation factor; Indicates the current timestamp; Indicates the creation time of the historical information flow.
[0138] In the embodiment of the present application, a combination of a logarithmic function and an exponential function is used to calculate the score of the number of times an information stream appears on the first page of the carousel area. The characteristic of the logarithmic function is that as the input value increases, the growth rate of the output value gradually slows down, which means that the more times an information stream appears on the first page of the carousel area, the smaller its impact on the freshness score. The exponential function is used to further enhance this attenuation effect. It takes into account the creation time of the historical information stream. The newer the historical information stream, the more likely it is to attract the user's attention.
[0139] (3) Substitute the number of times the information appears in the first three information flows in the carousel area into the formula for the first three times in the carousel area to obtain the score of the number of times the information appears in the first three information flows in the carousel area. The formula for the first three times in the carousel area is as follows:
[0140] ;
[0141] in, Indicates the fraction of times the information appears in the first three information streams in the carousel area; Indicates the number of times the first three information streams appear in the carousel area; represents the attenuation factor; Indicates the current timestamp; Indicates the update time of the historical information flow.
[0142] In the embodiment of the present application, a combination of an exponential function and a power function is used to calculate the number of times the first three information flows in the carousel area appear, and the update time of the historical information flow is incorporated. The characteristic of the exponential function is that as the input value increases, the output value decreases rapidly, which means that the more times the first three information flows in the carousel area appear, the less impact it has on the freshness score. The power function is to further strengthen this attenuation effect. It takes into account the update time of the historical information flow. The newer the historical information flow, the more likely it is to attract the user's attention.
[0143] As described above, the click data set in the embodiment of the present application includes the number of times the details are viewed and the number of times the details are shared. Therefore, S1022 needs to calculate these two types of data separately, which may specifically include:
[0144] (1) Obtain the number of times each historical information flow has been viewed and shared from the Elasticsearch index;
[0145] (2) Substitute the number of times the details are viewed into the formula for the number of times the details are viewed to obtain the score for the number of times the details are viewed. The formula for the number of times the details are viewed is as follows:
[0146] ;
[0147] in, A score indicating the number of times the detail has been viewed; Indicates the number of times the details have been viewed.
[0148] In the embodiment of the present application, a power function and an inverse function are used to calculate the number of times the details are viewed. The characteristic of the power function is that as the input value increases, the output value increases rapidly, which means that the more times the user clicks to view the details, the greater the impact on the freshness score. The inverse function is to balance this growth effect. It takes into account the number of times the historical information flow is viewed. The more times the number of views indicates that the user is more interested in this historical information flow.
[0149] (3) Substitute the number of times shared into the number of times shared formula to obtain the number of times shared score. The number of times shared formula is as follows:
[0150]
[0151] in, A score indicating the number of times it has been shared; Indicates the number of times it has been shared.
[0152] In the embodiment of the present application, a combination of a reciprocal function and a logarithmic function is used to calculate the score of the number of times shared. The characteristic of the reciprocal function is that as the input value increases, the output value decreases rapidly, which means that the more times the user clicks to share, the smaller the impact on the freshness score. The logarithmic function is to balance this attenuation effect. It takes into account the number of times the historical information flow is shared. The more times the historical information flow is shared, the more popular it is.
[0153] Among them, S1023 needs to calculate the investment guarantee value to obtain the investment guarantee score, which may include:
[0154] (1) Obtain the investment guarantee value of each historical information flow from the Elasticsearch index; since the investment guarantee value is a binary variable, it has only two values. If the historical information flow is guaranteed by the user, the corresponding investment guarantee value is 1; correspondingly, if the historical information flow is not guaranteed by the user, the corresponding investment guarantee value is 0.
[0155] (2) Substitute the investment guarantee value into the investment guarantee value formula to obtain the investment guarantee value score, where the investment guarantee value formula is as follows:
[0156]
[0157] in, Indicates the numerical score of investment guarantee; Indicates the investment guarantee value.
[0158] In the embodiment of the present application, the investment guarantee value is used as a factor. If a historical information flow has been invested or guaranteed by a user, its freshness score should be lower because it is no longer a new or undiscovered investment opportunity.
[0159] S1024 is to perform weighted addition on the scores obtained above to obtain the final score of the freshness score model, that is, the freshness score. The calculation formula for obtaining the freshness score can be as follows:
[0160]
[0161] in, Indicates the freshness score; represents the first weight; represents the second weight; represents the third weight; represents the 4th weight; It represents the fifth weight, in which the weights of all factors can be set equal, or can be adjusted according to actual needs, which is not limited here.
[0162] During this process, the freshness score of the historical information stream can be obtained through the function_score function of Elasticsearch, and it can be sorted based on the freshness score later, so that the sorting display of the historical information stream is more in line with user needs.
[0163] S103: Use a pitchability score model to calculate the pitchability of the content data of each historical information flow to obtain a pitchability score corresponding to each historical information flow, wherein the pitchability score model is obtained through a custom script of Elasticsearch.
[0164] As an example, S103 may include: S1031, obtaining content data of each historical information flow from the Elasticsearch index, the content data including binary variable data and investment amount data; S1032, using the binary variable formula of the investability score model to calculate the binary variable data in the content data to obtain a binary variable score, the binary variable data including whether the historical information flow is in an investment state, whether the historical information flow has a red envelope, and whether the initiating user of the historical information flow has been cancelled; S1033, substituting the issuance rate, issuance time, cumulative redemption amount, cumulative total number of investors and cumulative number of loans into the amount data formula in the investability score model to obtain the amount data score; S1034, adding the binary variable score and the amount data score to obtain the investability score.
[0165] Among them, S1032 needs to calculate the binary variable data to obtain the binary variable data score, which may specifically include:
[0166] (1) Obtain from the Elasticsearch index whether the historical information flow is in the investment state, whether the historical information flow has a red envelope, and whether the initiator of the historical information flow has been logged out;
[0167] Since the above binary variable data is a binary variable, there are only two values. If the historical information flow is in the investment state, the historical information flow has a red envelope, and the initiating user of the historical information flow has been deregistered, the corresponding investment state value, red envelope value, and initiating user deregistration value are all 1; correspondingly, if the historical information flow is not in the investment state, the historical information flow does not have a red envelope, and the initiating user of the historical information flow has not been deregistered, the corresponding investment state value, red envelope value, and initiating user deregistration value are all 0.
[0168] (2) Substitute the investment status value, the red envelope value, and the initiating user cancellation value into the binary variable formula to obtain the binary variable score, where the binary variable formula is as follows:
[0169]
[0170] in, represents a binary variable score; Indicates the investment status value; Indicates that it has a red envelope value; Indicates the value of the initiating user logout.
[0171] In the embodiment of the present application, the investment status value, the red envelope value and the initiating user logout value can be directly used as a factor. If the investment status value and the red envelope value are 1, the investability score will increase; and if the initiating user logout value is 1, the investability score will decrease.
[0172] Among them, the investment amount data set in the embodiment of the present application includes the bidding interest rate, bidding duration, cumulative redemption amount, cumulative total number of investors and cumulative number of loans, so S1033 needs to substitute these data into the amount data formula for calculation, where the amount data formula is as follows:
[0173]
[0174] in, Indicates the fraction of amount data; represents the first weight; represents the second weight; represents the third weight; represents the 4th weight; represents the 5th weight; It indicates the bidding interest rate; Indicates the duration of tender issuance; Indicates the cumulative redemption amount; Indicates the total number of cumulative investors; Indicates the cumulative number of loans.
[0175] In the embodiment of the present application, the score of the amount data is calculated using a logarithmic function, and their values can be any non-negative number. The logarithmic function is used to convert the values of these factors, which can reduce the impact of large values and make the score smoother. For all factors, if their values increase, they will increase the investability score.
[0176] Specifically, S1034 may include: after obtaining the binary variable score and the amount data score, the two may be added together to obtain a final investability score. The specific investability score obtaining formula is as follows:
[0177]
[0178] in, represents the investability score; represents a binary variable score; Indicates the fraction of the amount data.
[0179] During this process, the function_score function of Elasticsearch can be used to obtain the investability score of the historical information flow, and it can be sorted based on the investability score later, so that the sorting display of the historical information flow is more in line with user needs.
[0180] S104: Subtract the freshness score from the investability score to obtain a ranking score for each historical information flow.
[0181] After obtaining the freshness score and investability score of each historical information flow, the ranking score of each historical information flow can be obtained through the formula. The specific ranking formula is as follows:
[0182]
[0183] in, represents the ranking score; Indicates the freshness score; Represents the investability score.
[0184] It should be noted that if the investability score corresponding to a historical information flow is 0, the historical information flow will not be sorted and displayed, and the other historical information flows will be sorted from large to small according to the sorting scores.
[0185] S105: Sorting and displaying the multiple historical information flows according to the ranking score of each historical information flow and the type of each historical information flow.
[0186] In the embodiment of the present application, the basic sorting mechanism of Elasticsearch is used in combination with a custom script for sorting, and the historical information flow is scored according to the attributes and characteristics. Therefore, the judgment dimensions for sorting and displaying in the embodiment of the present application are divided into two types: one is the sorting score obtained by the above calculation, and the other is the product type of the historical information flow. The specific process may include: S1051, setting the product type values of multiple historical information flows; S1052, arranging the product type values of multiple historical information flows in ascending order to obtain a type sequence; S1053, arranging the sorting scores of multiple historical information flows in descending order to obtain a score sequence; S1054, combining the type sequence and the score sequence to obtain a final sequence, and displaying multiple historical information flows according to the final sequence.
[0187] Among them, S1051 may include setting the historical information flow product type as an ordinary product type value of 1, the historical information flow product type as an automatically renewed product type value of 2, and arranging the product type values of multiple historical information flows in positive order through S1052, that is, the ordinary product type needs to be arranged before the automatically renewed product type, because the automatically renewed historical information flow will update the creation time, which will cause the automatically renewed historical information flow to be arranged in front. In order to solve this problem, taking the product type sorting into consideration will ensure that the ordinary product type has a higher priority.
[0188] It should be noted that the automatic renewal function means that if no one invests after the release period of the feed information expires, it will be automatically republished, such as automatic renewal.
[0189] After obtaining the type sequence, you can consider sorting the multiple historical information flows in descending order according to their ranking scores, that is, the ones with larger ranking scores are placed in front, and obtain a score sequence. Finally, combine the type sequence and the score sequence to obtain the final sequence, and display multiple historical information flows according to the final sequence.
[0190] It can be seen that the embodiment of the present application can sort according to the user's preferences and behavioral characteristics through the custom script and the function score syntax of Elasticsearch, so that the sorting of historical information flows is more in line with user needs. In addition, in the sorting process, the freshness score model and the investability score model are combined to perform score calculations, and appropriate historical information flows are accurately recommended, thereby improving the user's investment experience and satisfaction. Finally, combined with the basic sorting mechanism of Elasticsearch and the custom script, the sorting is made more flexible and accurate, and users can more easily find historical information flows of interest.
[0191] The system in the embodiment of the present application can be seen, for example, Figure 3 The information flow sorting system 300 based on Elasticsearch shown basically includes a front end, a service UI, a service layer, a data layer, a database, and an operating environment. The following is an explanation of the process of generating historical information flows and sorting and displaying historical information flows in an embodiment of the present application based on the information flow sorting system 300 of Elasticsearch:
[0192] First, user 1 initiates a loan request through the front end of the social loan platform, and then transmits the request to the lending system through the personal loan UI. The lending system initiates a loan request to the product system, and the product system transmits the information of the new loan request to the homepage feed stream system. After the homepage feed stream system generates the corresponding loan feed information, user 2 may subsequently operate the loan feed information through the front end of the social loan platform. The front end of the social loan platform will transmit the operation data to the personal loan UI, and the personal loan UI will transmit the modification request to the homepage feed stream system based on the operation data to modify the data of the loan feed information flow, and at the same time obtain the relevant data of the loan feed information through the friend system. Finally, the aggregation results of the historical data of the historical information flow will be synchronously updated to the Elasticsearch cluster, and then the ranking scores of multiple historical information flows will be calculated through the Elasticsearch cluster for sorting and display.
[0193] In order to make the method provided in the embodiment of the present application clearer and easier to understand, Figure 4 A specific example of this method is described.
[0194] like Figure 4 As shown, the implementation may include:
[0195] S401: Collect historical data of multiple historical information flows, and store the historical data of each historical information flow in an Elasticsearch index by setting fields, wherein the historical data includes display data, click data, and content data of the historical information flow, and the content data includes an investment guarantee value.
[0196] like Figure 5As shown in the Elasticsearch overall query structure shown, the logic of custom sorting in the embodiment of the present application is based on the function_score function in Elasticsearch. The function_score function allows you to modify the score of an Elasticsearch query to retrieve a document. To use the function_score function, the user needs to define a query and one or more functions, which are used to calculate the new score for each document returned by the query. The logic of the function_score function in the embodiment of the present application is based on the result set filtered by the query part, and is implemented by a custom scoring script through the script_score script. Among them, "score_mode:max" refers to taking the maximum value among multiple scoring scripts, which is not involved in the embodiment of the present application, so it is the current script score, and "boost_mode:replace" refers to replacing the original es default scoring mechanism with the custom score of function_score.
[0197] Therefore, based on the above-mentioned es overall query structure setting, based on the query part, the historical data of each historical information flow needs to be stored in the Elasticsearch index. Therefore, it is necessary to first collect the historical data of multiple historical information flows, and store the historical data of each historical information flow in the Elasticsearch index by setting the fields. The specific defined fields are as shown in the above embodiment and will not be repeated here.
[0198] S402: Calculate the display data of the historical information flow using the display data calculation formula in the freshness score model to obtain a display score, wherein the freshness score model is obtained through a custom script of Elasticsearch.
[0199] The display data includes the number of times the historical information flow appears on the first page of the carousel area and the number of times the historical information flow appears in the first three information flows on the first page of the carousel area.
[0200] Therefore, when using the freshness score model for calculation, it can be as follows Figure 6 The formula for the number of times a message appears on the first page of the carousel area is established based on the Elasticsearch code. First, the parameters required for the formula for the number of times a message appears on the first page of the carousel area are created. Then, the number of times a message appears on the first page of the carousel area is calculated based on the formula for the number of times a message appears on the first page of the carousel area. The specific calculation formula can be as shown above and will not be repeated here. Figure 7As shown, a formula for the number of times the first three information flows appear in the carousel area is established based on the Elasticsearch code. First, the parameters required for the formula for the number of times the first three information flows appear in the carousel area are created, and then the number of times the first three information flows appear in the carousel area are calculated according to the formula for the number of times the historical information flow appears in the first three information flows in the carousel area. The specific calculation formula can be as shown above and will not be repeated here.
[0201] During this process, the function_score function of Elasticsearch can be used to obtain the relevant scores of the historical information flow regarding the displayed data, and weighted scoring can be performed based on the display score later, so that the sorting and display of the historical information flow can better meet the needs of users.
[0202] S403: Calculate the click data of the historical information flow using the click data calculation formula in the freshness score model to obtain a click score.
[0203] Display data includes the number of times the details of the historical information flow were viewed and the number of times the historical information flow was shared.
[0204] Therefore, when using the freshness score model for calculation, it can be as follows Figure 8 The formula for the number of times the details have been viewed is established based on the Elasticsearch code. First, the parameters required for the formula for the number of times the details have been viewed are created, and then the number of times the details have been viewed in the historical information flow is calculated based on the formula for the number of times the details have been viewed. The specific calculation formula can be as shown above and will not be repeated here. Fig. 9 As shown, a formula for the number of times shared is established based on the Elasticsearch code. First, the parameters required for the formula for the number of times shared are created, and then the number of times the historical information flow is shared is calculated according to the formula. The specific calculation formula can be as shown above and will not be repeated here.
[0205] During this process, the function_score function of Elasticsearch can be used to obtain the relevant scores of the historical information flow regarding click data, and weighted scores can be subsequently performed based on the click scores, so that the sorting and display of the historical information flow can better meet user needs.
[0206] S404: Calculate the investment guarantee value in the content data of the historical information flow using the investment guarantee formula in the freshness score model to obtain an investment guarantee score.
[0207] When using the freshness score model for calculation, it can be as follows Fig.10As shown, based on the Elasticsearch code investment guarantee formula, firstly, the parameters required by the investment guarantee formula are created, and then the investment guarantee score of the historical information flow is calculated according to the investment guarantee formula. The specific calculation formula can be as shown above and will not be repeated here.
[0208] In this process, the function_score function of Elasticsearch can be used to obtain the relevant scores of historical information streams about investment guarantees, and weighted scores can be subsequently performed based on the investment guarantee scores, so that the sorting and display of historical information streams can better meet user needs.
[0209] S405: Perform weighted addition calculation on the display score, click score and investment guarantee score to obtain the freshness score of the historical information flow.
[0210] Since the scores obtained above are all related to the freshness of the historical information flow, when finally calculating the freshness score of the historical information flow, it is necessary to perform weighted addition calculation on the display score, click score and investment guarantee score. The specific formula is shown in the above embodiment and will not be described in detail here.
[0211] The entire Elasticsearch script that specifically calculates the freshness score of the historical information stream can be as follows Fig.11 As shown, firstly, all the required field values are obtained, then the scores of various factors are calculated using the above formula, and finally these scores are weightedly added to obtain the freshness score of the freshness model.
[0212] S406: Calculate the binary variable data in the content data of the historical information flow using the binary variable formula of the investability score model to obtain a binary variable score.
[0213] In the embodiment of the present application, binary variable data including whether the historical information flow is in an investment state, whether the historical information flow has a red envelope, and whether the initiating user of the historical information flow has been deregistered are used as binary variable data, and the specific values thereof are used to determine whether the investability can be increased, thereby obtaining a specific binary variable data formula, which can be as follows: Fig.12 As shown, based on the Elasticsearch binary variable formula, the parameters required for the binary variable formula are first created, and then the binary variable score is obtained by calculation according to the binary variable formula. The specific calculation formula can be as shown in the above embodiment and will not be repeated here.
[0214] S407: Calculate the bid issuance rate, bid issuance time, cumulative repayment amount, cumulative total number of investors and cumulative number of loans in the content data of the historical information flow using the amount data formula of the investability score model to obtain an amount data score.
[0215] In the embodiment of the present application, the interest rate, duration of tender issuance, cumulative repayment amount, cumulative total number of investors and cumulative number of loans in the content data are used to calculate the score through a logarithmic function, which can be as follows: Fig.13 As shown, an amount data formula is established based on the Elasticsearch code. First, the parameters required by the amount data formula are created, and then the amount data score of the historical information flow is calculated according to the amount data formula. The specific calculation formula can be as shown above and will not be repeated here.
[0216] S408: Add the binary variable score and the amount data score to obtain the investability score of the historical information flow.
[0217] When the investability score model is used for calculation, an investability score formula that adds the binary variable score and the amount data score can be established based on the Elasticsearch code. The specific calculation formula can be as shown above and will not be repeated here.
[0218] S409: Subtract the freshness score from the investability score to obtain a ranking score of the historical information flow, and arrange the ranking scores of multiple historical information flows in descending order to obtain a score sequence.
[0219] The calculation of the historical information flow ranking score in the embodiment of the present application is based on the Elasticsearch code. The specific code content can be as follows: Fig.14 As shown, the formula is first used to calculate the score of the number of times on the first page of the carousel area, the score of the number of times in the first three information flows in the carousel area, the score of the number of times users click to view details, the score of the number of times users click to share, and the score of whether the information is guaranteed by user investment, and then weights are set for each factor to finally calculate the freshness score; similarly, the formula is used to calculate the binary variable score and the amount data score, and then the binary variable score and the amount data score are directly added together to obtain the investability score. Finally, when obtaining the ranking score, the investability score is subtracted from the freshness score, and if the investability score corresponding to the historical information flow is 0, the corresponding historical information flow will not be sorted and displayed.
[0220] In this process, the freshness score model and investability score model are combined to score and calculate the historical information flow, which can accurately recommend appropriate feed information, thereby improving the user's investment experience and satisfaction.
[0221] S410: Setting product type values of historical information flows, and arranging product type values of multiple historical information flows in positive order to obtain a type sequence.
[0222] like Fig.15As shown, in the embodiment of the present application, when setting the sorting, not only the dimension of sorting score is added to the basic sorting mechanism, but also the dimension of product type of historical information flow is added, that is, "feed_type" is set as a sorting dimension, "feed_type" is placed in the first place as a sorting element, "asc" indicates positive order, "desd" indicates reverse order, and correspondingly "_score" indicates the sorting score. The specific sorting method can be as shown in the above embodiment, which will not be repeated here.
[0223] S411: Combining the type sequence and the score sequence according to each historical information flow to obtain a final sequence, and displaying multiple historical information flows according to the final sequence.
[0224] In this process, by combining Elasticsearch's basic sorting mechanism, custom scripts, and functionscore syntax, it is possible to sort according to user preferences and behavioral characteristics, making the sorting of feed information more in line with user needs, and making the sorting more flexible and accurate, so that users can more easily find the feed information they are interested in.
[0225] This embodiment provides an information flow sorting method based on Elasticsearch. Through a custom script of Elasticsearch, a freshness score model and an investability score model are combined to perform scoring calculations during the sorting process. The method can sort information flows according to user preferences and behavioral characteristics, accurately recommend appropriate historical information flows, and make the sorting of historical information flows more in line with user needs, thereby improving user investment experience and satisfaction.
[0226] See also Fig.16 , the embodiment of the present application provides an information flow sorting device 1600 based on Elasticsearch, the device comprising:
[0227] The storage unit 1601 is used to collect historical data of multiple historical information flows, and store the historical data of each historical information flow in an Elasticsearch index by setting fields, wherein the historical data includes display data, click data, and content data of the historical information flow, and the content data includes an investment guarantee value;
[0228] A calculation unit 1602 is used to calculate the freshness of the display data, click data and investment guarantee value of each historical information flow using a freshness score model to obtain a freshness score corresponding to each historical information flow, wherein the freshness score model is obtained through a custom script of Elasticsearch;
[0229] The calculation unit 1602 is further used to use the pitchability score model to perform pitchability calculation on the content data of each historical information flow to obtain a pitchability score corresponding to each historical information flow, wherein the pitchability score model is obtained through a custom script of Elasticsearch;
[0230] An obtaining unit 1603 is used to obtain a ranking score of each historical information flow by subtracting a freshness score from a pitchability score;
[0231] The sorting unit 1604 is used to sort and display the multiple historical information flows according to the sorting score of each historical information flow and the type of each historical information flow.
[0232] Optionally, the calculation unit 1602 is used to use a freshness score model to calculate the freshness of the investment guarantee value in the display data, click data and content data of each historical information flow, and obtain the freshness score corresponding to each historical information flow, including:
[0233] A display data calculation unit, used to calculate the display data using the display data calculation formula in the freshness score model to obtain a display score;
[0234] A click data calculation unit, used to calculate the click data using the click data calculation formula in the freshness score model to obtain a click score;
[0235] An investment guarantee calculation unit, used to calculate the investment guarantee value in the content data using the investment guarantee formula in the freshness score model to obtain an investment guarantee score;
[0236] The freshness calculation unit is used to perform weighted addition calculation on the display score, the click score and the investment guarantee score to obtain the freshness score.
[0237] Optionally, a data calculation unit is displayed, specifically used for:
[0238] Get the number of times each historical information stream appears on the first page of the carousel area and the number of times each historical information stream appears in the first three information streams of the carousel area from the Elasticsearch index;
[0239] Substitute the number of times the first page of the carousel area appears into the formula for the number of times the first page of the carousel area appears to obtain the score of the number of times the first page of the carousel area appears. The formula for the number of times the first page of the carousel area appears is as follows:
[0240] ;
[0241] in, The fraction indicating the number of times the first page of the carousel appears; Indicates the number of times it appears on the first page of the carousel area; represents the attenuation factor; Indicates the current timestamp; Indicates the creation time of the historical information flow;
[0242] Substitute the number of times the first three information flows in the carousel area appear into the formula of the first three times in the carousel area to obtain the score of the number of times the first three information flows in the carousel area appear. The formula of the first three times in the carousel area is as follows:
[0243] ;
[0244] in, Indicates the fraction of times the information appears in the first three information streams in the carousel area; Indicates the number of times the first three information streams appear in the carousel area; represents the attenuation factor; Indicates the current timestamp; Indicates the update time of the historical information flow.
[0245] Optionally, click on the data calculation unit, specifically for:
[0246] Get the number of times each historical information stream has been viewed and shared from the Elasticsearch index;
[0247] ;
[0248] in, A score indicating the number of times the detail has been viewed; Indicates the number of times the details have been viewed;
[0249] Substitute the number of shares into the number of shares formula to obtain the number of shares score. The number of shares formula is as follows:
[0250]
[0251] in, A score indicating the number of times it has been shared; Indicates the number of times it has been shared.
[0252] Optionally, the calculation unit 1602 is used to use the pitchability score model to perform pitchability calculation on the content data of each historical information flow, and when obtaining the pitchability score corresponding to each historical information flow, specifically to:
[0253] Obtain content data of each historical information flow from the Elasticsearch index, the content data including binary variable data and investment amount data, the binary variable data including whether the historical information flow is in an investment state, whether the historical information flow has a red envelope, and whether the initiator of the historical information flow has been deregistered, and the investment amount data including the tender interest rate, tender duration, cumulative redemption amount, cumulative total number of investors, and cumulative number of loans;
[0254] The binary variable formula of the investability score model is used to calculate the binary variable data in the content data to obtain the binary variable score;
[0255] Substitute the tender interest rate, tender duration, cumulative repayment amount, cumulative total number of investors and cumulative number of loans into the amount data formula in the investability score model to obtain the amount data score. The amount data formula is as follows:
[0256]
[0257] in, Indicates the fraction of amount data; represents the first weight; represents the second weight; represents the third weight; represents the 4th weight; represents the 5th weight; It indicates the bidding interest rate; Indicates the duration of tender issuance; Indicates the cumulative redemption amount; Indicates the total number of investors; Indicates the cumulative number of loans;
[0258] Add the binary variable score and the amount data score to obtain the investability score.
[0259] Optionally, the device 1600 further includes:
[0260] The judgment unit is used to sort and display the historical information flows whose investability scores are greater than 0.
[0261] Optionally, the sorting unit 1604 is specifically configured to:
[0262] Set product type values for multiple historical information streams;
[0263] Arrange the product type values of multiple historical information flows in positive order to obtain a type sequence;
[0264] Arrange the ranking scores of multiple historical information flows in descending order to obtain a score sequence;
[0265] According to each historical information flow, the type sequence and the score sequence are combined to obtain a final sequence, and multiple historical information flows are displayed according to the final sequence.
[0266] It should be noted that the specific implementation method and effect of the information flow sorting device 1600 based on Elasticsearch can be found in the above Figure 1 or Figure 4 The relevant descriptions in the provided methods will not be repeated here.
[0267] The present application embodiment also provides an electronic device 1700, such as Fig.17 As shown, the electronic device 1700 includes a memory 1701 and a processor 1702:
[0268] The memory 1701 is used to store computer programs;
[0269] The processor 1702 is used to execute the above according to the computer program Figure 1 or Figure 4 The method provided.
[0270] In addition, the present application also provides a computer-readable storage medium, the computer-readable storage medium is used to store a computer program, and the computer program is used to execute Figure 1 or Figure 4 The method provided.
[0271] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0272] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is only schematic, in which the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the goals of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0273] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. An information flow sorting method based on Elasticsearch, characterized in that: The method comprises: Collecting historical data of multiple historical information flows, and storing the historical data of each historical information flow in the Elasticsearch index by setting fields, wherein the historical data includes display data, click data and content data of the historical information flow, and the content data includes an investment guarantee value; Using a freshness score model to calculate the freshness of the display data, the click data, and the investment guarantee value of each historical information flow, to obtain a freshness score corresponding to each historical information flow, wherein the freshness score model is obtained through a custom script of Elasticsearch; Using a pitchability score model to calculate the pitchability of the content data of each historical information flow to obtain a pitchability score corresponding to each historical information flow, wherein the pitchability score model is obtained through a custom script of Elasticsearch; Wherein, the use of the investability score model to calculate the investability of the content data of each historical information flow to obtain the investability score corresponding to each historical information flow includes: obtaining the content data of each historical information flow from the Elasticsearch index, the content data including binary variable data and investment amount data, the binary variable data including whether the historical information flow is in an investment state, whether the historical information flow has a red envelope, and whether the initiating user of the historical information flow has been deregistered, and the investment amount data including the issuance rate, issuance time, cumulative redemption amount, cumulative total number of investors and cumulative number of loans; using the binary variable formula of the investability score model to calculate the binary variable data in the content data to obtain a binary variable score; using the amount data formula in the investability score model to calculate the investment amount data in the content data to obtain an amount data score; adding the binary variable score and the amount data score to obtain the investability score; Subtracting the freshness score from the investability score to obtain a ranking score for each historical information flow; The multiple historical information flows are sorted and displayed according to the sorting score of each historical information flow and the type of each historical information flow.
2. The method according to claim 1, characterized in that The using of the freshness score model to calculate the freshness of the display data, the click data and the investment guarantee value in the content data of each historical information flow to obtain the freshness score corresponding to each historical information flow includes: Calculating the display data using the display data calculation formula in the freshness score model to obtain a display score; Calculating the click data using the click data calculation formula in the freshness score model to obtain a click score; Calculating the investment guarantee value in the content data using the investment guarantee formula in the freshness score model to obtain an investment guarantee score; The display score, the click score and the investment guarantee score are weightedly added to obtain the freshness score.
3. The method according to claim 2, characterized in that The step of calculating the display data using the display data calculation formula in the freshness score model to obtain a display score includes: Obtaining from the Elasticsearch index the number of times each historical information stream appears on the first page of the carousel area and the number of times each historical information stream appears in the first three information streams of the carousel area; Substitute the number of times the content appears on the first page of the carousel area into the formula for the number of times the content appears on the first page of the carousel area to obtain the score of the number of times the content appears on the first page of the carousel area. The formula for the number of times the content appears on the first page of the carousel area is as follows: ; in, Indicates the number of times the first page of the carousel appears; Indicates the number of times it appears on the first page of the carousel area; represents the attenuation factor; Indicates the current timestamp; Indicates the creation time of the historical information flow; Substitute the number of times the first three information streams appear in the carousel area into the formula of the first three times in the carousel area to obtain the score of the number of times the first three information streams appear in the carousel area. The formula of the first three times in the carousel area is as follows: ; in, Indicates the fraction of times the information appears in the first three information streams in the carousel area; Indicates the number of times the first three information streams appear in the carousel area; represents the attenuation factor; Indicates the current timestamp; Indicates the update time of the historical information flow.
4. The method according to claim 2, characterized in that: The step of calculating the click data using the click data calculation formula in the freshness score model to obtain the click score includes: Obtaining the number of times the details of each historical information flow are viewed and the number of times the details are shared from the Elasticsearch index; Substitute the number of times the details have been viewed into the number of times the details have been viewed formula to obtain the score of the number of times the details have been viewed. The number of times the details have been viewed formula is as follows: ; in, A score indicating the number of times the detail has been viewed; Indicates the number of times the details have been viewed; Substitute the number of times shared into the number of times shared formula to obtain the score of the number of times shared. The number of times shared formula is as follows: ; in, A score indicating the number of times it has been shared; Indicates the number of times it has been shared.
5. The method according to claim 1, characterized in that The step of calculating the investment amount data in the content data using the amount data formula in the investability score model to obtain an amount data score includes: Substitute the bid issuance rate, bid issuance time, cumulative repayment amount, cumulative total number of investors and cumulative number of loans into the amount data formula in the investability score model to obtain the amount data score. The amount data formula is as follows: ; in, Indicates the fraction of amount data; represents the first weight; represents the second weight; represents the third weight; represents the 4th weight; represents the 5th weight; It indicates the bidding interest rate; Indicates the duration of tender issuance; Indicates the cumulative redemption amount; Indicates the total number of cumulative investors; Indicates the cumulative number of loans.
6. The method according to claim 1, characterized in that The method further comprises: The historical information flows with a investability score greater than 0 are sorted and displayed.
7. The method according to claim 1, characterized in that The sorting and displaying the multiple historical information flows according to the sorting score of each historical information flow and the type of each historical information flow includes: Setting product type values of the plurality of historical information flows; Arrange the product type values of the multiple historical information flows in positive order to obtain a type sequence; Arrange the ranking scores of the multiple historical information flows in descending order to obtain a score sequence; The type sequence and the score sequence are combined according to each historical information flow to obtain a final sequence, and the multiple historical information flows are displayed according to the final sequence.
8. An information flow sorting device for Elasticsearch, characterized in that: The device comprises: A storage unit, used to collect historical data of multiple historical information flows, and store the historical data of each historical information flow in the Elasticsearch index by setting fields, wherein the historical data includes display data, click data and content data of the historical information flow, and the investment guarantee value in the content data; A calculation unit, configured to calculate the freshness of the display data, the click data and the investment guarantee value of each historical information flow using a freshness score model to obtain a freshness score corresponding to each historical information flow, wherein the freshness score model is obtained through a custom script of Elasticsearch; A calculation unit, configured to perform a pitchability calculation on the content data of each historical information flow using a pitchability score model to obtain a pitchability score corresponding to each historical information flow, wherein the pitchability score model is obtained through a custom script of Elasticsearch; The calculation unit uses the investability score model to calculate the investability of the content data of each historical information flow, and when obtaining the investability score corresponding to each historical information flow, it is specifically used to: obtain the content data of each historical information flow from the Elasticsearch index, the content data includes binary variable data and investment amount data, the binary variable data includes whether the historical information flow is in an investment state, whether the historical information flow has a red envelope, and whether the initiating user of the historical information flow has been cancelled, and the investment amount data includes the issuance rate, the issuance time, the cumulative redemption amount, the cumulative total number of investors, and the cumulative number of loans; use the binary variable formula of the investability score model to calculate the binary variable data in the content data to obtain the binary variable score; use the amount data formula in the investability score model to calculate the investment amount data in the content data to obtain the amount data score; add the binary variable score and the amount data score to obtain the investability score; An obtaining unit, configured to obtain a ranking score of each historical information flow by subtracting the freshness score from the investability score; A sorting unit is used to sort and display the multiple historical information flows according to the sorting score of each historical information flow and the type of each historical information flow.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the processor is used to execute a program stored in the memory to run the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
A system and method for collecting consumer information
CA2325153A1
Healthy economic development-based novel e-commerce platform and investment management system
CN108335175A
Sorting method and device for product recommendation and electronic equipment
CN111192108A
Transaction facilitating marketplace platform
US20150073929A1
Method and apparatus for rapid search for agricultural parcels and generation of relevant search results
US20220012253A1
