Text recommendation method and device, equipment and medium

By clustering texts and selecting core texts to generate titles and summaries, the problem of low accuracy in recommending multiple related texts is solved, and a more efficient text recommendation effect is achieved.

CN120653767APending Publication Date: 2025-09-16中央军委政法委员会侦查技术中心 +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510807677.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing technologies have low accuracy when recommending multiple related texts, resulting in poor recommendation results.

Method used

By clustering multiple texts to be recommended, the cluster center vector of each text cluster is determined, and the core text is selected from the text cluster based on the cluster center vector, and the title and summary are generated. Finally, the text is recommended to the user end according to the title and summary.

Benefits of technology

It improves the accuracy of text recommendations, enhances content service levels and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653767A_ABST
    Figure CN120653767A_ABST
Patent Text Reader

Abstract

The invention relates to a text recommendation method and device, equipment and a medium, and the method comprises the steps: obtaining a text data set comprising a plurality of to-be-recommended texts, carrying out the clustering of each text, obtaining a plurality of text clusters related to different topics, determining the cluster center vector of each text cluster, and carrying out the clustering of the cluster center vectors; the method comprises the steps of obtaining a cluster center vector of each text cluster, determining a core text of the text cluster from a plurality of texts of the text cluster based on the cluster center vector of each text cluster, then generating a title and an abstract corresponding to the text cluster according to the core text of each text cluster, and finally accurately recommending texts to a user side according to the title and the abstract corresponding to each text cluster. The problem of low recommendation accuracy of related texts under the same theme is avoided, so that the recommendation accuracy is improved, the content service level is improved, and the user satisfaction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of content recommendation and relates to a text recommendation method, device, equipment and medium. Background Art

[0002] Recommending appropriate text content to users is a common application scenario in natural language processing. Currently, text recommendations primarily target one or more individual pieces of content. Specifically, recommendations are determined based on the user's historical preferences, and each of these pieces of content is independent of the other. In practice, it's often necessary to recommend multiple pieces of content related to one or more topics. Traditional methods, when used to recommend content, can result in low recommendation accuracy. Summary of the Invention

[0003] In response to the problems existing in the above-mentioned traditional technologies, the present invention proposes a text recommendation method, a text recommendation device, a computer device and a computer-readable storage medium, which can effectively improve the accuracy of text recommendation.

[0004] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions: In one aspect, a text recommendation method is provided, comprising the steps of: Obtain a text dataset; the text dataset includes multiple texts to be recommended; Clustering multiple texts to be recommended to obtain multiple text clusters on different topics; each text cluster includes multiple texts to be recommended; After determining the cluster center vector of each text cluster, based on the cluster center vector of each text cluster, a core text of the corresponding text cluster is determined from a plurality of texts to be recommended in the corresponding text cluster; Generate the title and summary of each text cluster according to the core text of each text cluster; Recommend texts to users based on the titles and summaries of each text cluster.

[0005] On the other hand, a text recommendation device is also provided, comprising: A data acquisition module is used to acquire a text dataset; the text dataset includes multiple texts to be recommended; A text clustering module is used to cluster multiple texts to be recommended to obtain multiple text clusters on different topics; each text cluster includes multiple texts to be recommended; A core text module is configured to determine the cluster center vector of each text cluster and then determine the core text of the corresponding text cluster from a plurality of texts to be recommended in the corresponding text cluster based on the cluster center vector of each text cluster; The title summary module is used to generate the title and summary of each text cluster according to the core text of each text cluster; The text recommendation module is used to recommend texts to the user according to the titles and summaries corresponding to each text cluster.

[0006] On the other hand, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned text recommendation method when executing the computer program.

[0007] On the other hand, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned text recommendation method are implemented.

[0008] One of the above technical solutions has the following advantages and beneficial effects: The above-mentioned text recommendation method, device, equipment and medium obtain a text data set including multiple texts to be recommended, cluster each text to obtain multiple text clusters on different topics, then determine the cluster center vector of each text cluster, and based on the cluster center vector of each text cluster, determine the core text of the text cluster from the multiple texts of the text cluster, then generate the title and abstract corresponding to the text cluster according to the core text of each text cluster, and finally accurately recommend text to the user end according to the title and abstract corresponding to each text cluster, avoiding the problem of low recommendation accuracy of related texts under the same topic, thereby improving the recommendation accuracy, improving the content service level, and improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0010] Figure 1 A flowchart of a text recommendation method according to an embodiment; Figure 2 Schematic diagram of a process of text clustering in one embodiment; Figure 3 Schematic diagram of the splitting process of the minimum text tree in one embodiment; Figure 4 Schematic diagram of the splitting process of the minimum text tree in another embodiment; Figure 5 Schematic diagram of a process for determining core text in one embodiment; Figure 6 A schematic diagram of a specific process of recommending text in one embodiment; Figure 7 is a module block diagram of a text recommendation device in one embodiment; Figure 8 Schematic diagram of the module structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0011] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the description of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0012] It should be noted that the reference to "embodiment" in this document means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The presentation of this phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It will be understood by those skilled in the art that the embodiments described herein may be combined with other embodiments. The term "and / or" used in the specification of the present invention and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0013] The following describes the embodiments of the present invention in detail with reference to the accompanying drawings.

[0014] In one embodiment, Figure 1 As shown, a text recommendation method is provided, which may include the following steps S10 to S18: S10, obtaining a text dataset; the text dataset includes a plurality of texts to be recommended; S12, clustering the multiple texts to be recommended to obtain multiple text clusters on different topics; each text cluster includes multiple texts to be recommended; S14, after determining the cluster center vector of each text cluster, determining the core text of the corresponding text cluster from the multiple texts to be recommended in the corresponding text cluster based on the cluster center vector of each text cluster; S16, generating titles and summaries corresponding to each text cluster based on the core text of each text cluster; S18, recommending texts to the user terminal according to the titles and summaries corresponding to the respective text clusters.

[0015] The above-mentioned text recommendation method obtains a text data set including multiple texts to be recommended, clusters each text to obtain multiple text clusters on different topics, then determines the cluster center vector of each text cluster, and based on the cluster center vector of each text cluster, determines the core text of the text cluster from the multiple texts of the text cluster, and then generates the title and abstract corresponding to the text cluster according to the core text of each text cluster. Finally, according to the title and abstract corresponding to each text cluster, the text is accurately recommended to the user end, avoiding the problem of low recommendation accuracy of related texts under the same topic, thereby improving the recommendation accuracy, improving the content service level, and improving user satisfaction.

[0016] Specifically, the text to be recommended can include, but is not limited to, news, hot topics, articles, blogs, e-books, comments, and emails. For ease of description, the following text uses news as an example (other text types are also applicable). Content processing devices, such as servers, mobile terminals, in-vehicle systems, or cloud server systems, can first obtain news within a preset time period (the specific time period can be set based on actual application needs) at the current moment as a text dataset. The text dataset contains n text items, which can be represented as T = [t_1, t_2, …, t_n]. The news items in the text dataset are clustered to obtain multiple text clusters, each corresponding to a news topic. News topics can be categorized by hot events (e.g., news on regional conflicts) or content categories (e.g., news on economic development). The cluster center vector of a text cluster corresponds to the text that best represents the cluster (also called the core text). The cluster center vector is denoted by T_centroids. Based on the cluster center vector T_centroids, the core text of the cluster is determined from the multiple text items in the cluster. After retaining the core text of the text cluster, other non-core texts of the text cluster are deleted to improve the accuracy of text recommendation.

[0017] To reduce the amount of data required for recommendations and further improve the accuracy of text recommendations, we can leverage existing large language models (such as Large Language Models (LLMs)) to generate titles and summaries for each text cluster based on the core text of each cluster. A text cluster can have one or more core texts, and large language models can automatically summarize and refine the core text of the cluster to generate the corresponding titles and summaries. Finally, we can recommend text to users based on the titles and summaries of each cluster.

[0018] In one embodiment, regarding the above step S12, as Figure 2 The following processing steps may be further included: S121, calculating the Euclidean distance between any two texts to be recommended; S123, using each text to be recommended as a node and the Euclidean distance between any two texts to be recommended as an edge between the two texts, to construct a complete text graph corresponding to the text dataset; S125, extracting a minimum text tree from the complete text graph; the minimum text tree is a connection method that includes all nodes in the complete text graph, and the sum of the edges in the minimum text tree is the smallest among all connection methods; S127, splits the minimum text tree into multiple text clusters by gradually removing the longest edge in the minimum text tree.

[0019] It can be understood that the Euclidean distance d between any two texts can be calculated according to the following formula: ; xi is a feature vector of a text, yi is the feature vector of another text, i The value ranges from 1 to n, indicating that the embedded feature is an n-dimensional feature vector.

[0020] For example, if there are 100 texts in a text dataset, then the 100 texts are taken as 100 nodes, and the Euclidean distance between any two texts is taken as the edge between the two texts to construct the complete text graph corresponding to the text dataset. Next, remove the redundant edges in the complete text graph. As long as all the nodes in the complete text graph are included, a variety of connection methods can be obtained. Among the multiple connection methods, the connection method with the smallest sum of edges is selected as the minimum text tree. Finally, the longest edge in the minimum text tree is gradually removed to split the minimum text tree into multiple text clusters. Since the longest edge in the minimum text tree is gradually removed during the clustering process, each text cluster contains the text with the smallest Euclidean distance, which makes each text cluster correspond to a news topic more accurately, thereby further enhancing the accuracy of text clustering and providing a more solid foundation for improving the accuracy of text recommendation.

[0021] In one embodiment, regarding the above step S127, as Figure 3 The following processing steps may be further included: S1271, remove the longest edge in the minimum text tree and split the minimum text tree into two text clusters; S1272: Put the two text clusters obtained by splitting into a text cluster set and execute the following loop: S1273, determining whether the number of nodes in all text clusters in the text cluster set is less than a preset number; S1274, when the number of nodes in all text clusters in the text cluster set is less than a preset number, the text cluster in the text cluster set is used as the final text cluster, and the loop ends; S1275 , otherwise, remove the longest edge in the text cluster whose number of nodes is not less than the preset number in the text cluster set, and split the text cluster into two text clusters.

[0022] It can be understood that because the sum of the edges in the minimum text tree is the smallest among all connection methods, the minimum text tree is already the simplest connection method. The minimum text tree has no redundant edges, and removing just one edge will inevitably split the minimum text tree into two text clusters. Therefore, the longest edge in the minimum text tree is determined and removed. At this point, the minimum text tree is split into two text clusters. The two resulting text clusters are placed into a text cluster set, and the following loop is executed: the longest edge in each text cluster in the text cluster set is continuously removed to split each text cluster into two text clusters. This is done until the number of nodes in all text clusters in the text cluster set is less than a preset number (the specific number can be determined based on the constraints of the actual usage scenario, such as content recommendation timeliness and energy consumption requirements). The text cluster in the text cluster set is then used as the final text cluster, and the loop ends. It should be noted that if the number of nodes in a text cluster in a loop is less than the preset number, the text cluster will no longer be split in subsequent loops, thereby improving splitting efficiency.

[0023] In one embodiment, regarding the above step S125, after that, as Figure 4 The following processing steps may also be included: S1261, remove the target edge in the minimum text tree and split the minimum text tree into two text clusters; S1262: Put the two text clusters obtained by splitting into a text cluster set and execute the following loop: S1263, determining whether the number of nodes in all text clusters in the text cluster set is less than a preset number; S1264, when the number of nodes in all text clusters in the text cluster set is less than a preset number, the text cluster in the text cluster set is used as the final text cluster, and the loop ends; S1265 , otherwise, remove the target edge in the text cluster whose number of nodes in the text cluster set is not less than the preset number, and split the text cluster into two text clusters.

[0024] It can be understood that in order to further improve the accuracy of the split, the target edge in the minimum text tree is determined, and the target edge in the minimum text tree is removed. At this time, the minimum text tree is split into two text clusters. The two text clusters obtained by the split are placed into a text cluster set, and the following loop is executed: continue to determine the target edge of the text cluster in the text cluster set, remove the target edge of the text cluster in the text cluster set, until the number of nodes in all text clusters in the text cluster set is less than the preset number, and then end the loop. It should be noted that in a loop round, if the number of nodes in a text cluster is already less than the preset number, then the text cluster will no longer participate in the split in subsequent loop rounds.

[0025] In one embodiment, the above text recommendation method may further include the following processing steps: Determine the sum of edges in the text cluster to be split or the minimum text tree; Traversing each edge of the text cluster to be split or the minimum text tree, and determining the sum of the edges in the two text clusters obtained by splitting according to each edge; When the sum of the reciprocals of the sum of edges in the two text clusters obtained by splitting is greater than the reciprocal of the sum of edges in the text cluster to be split or the minimum text tree, the corresponding edge is determined as the target edge.

[0026] As can be understood, for a text cluster to be split, the sum of the edges in the cluster is recorded as the first sum. For any edge in the text cluster to be split, the sum of the edges in the two text clusters obtained by splitting the edge is recorded as the second sum and the third sum, respectively. When the sum of the reciprocals of the second and third sums is greater than the reciprocal of the first sum, the edge is determined to be the target edge. If the sum of the reciprocals of the second and third sums is not greater than the reciprocal of the first sum, the next edge in the text cluster to be split is determined to be the target edge in the same way.

[0027] For the minimum text tree: record the sum of the edges in the minimum text tree as the fifth sum. Traverse each edge in the minimum text tree: record the sum of the edges in the two text clusters formed by splitting the edge as the second sum and the third sum, respectively. If the sum of the reciprocals of the second and third sums is greater than the reciprocal of the fifth sum, determine that edge as the target edge. If the sum of the reciprocals of the second and third sums is not greater than the reciprocal of the fifth sum, then similarly determine whether the next edge in the minimum text tree is the target edge.

[0028] Specifically, the target edge can be efficiently determined by judging whether the following formula is satisfied: ; in, a and b is the sum of the edges in the two text clusters obtained by splitting, c is the sum of the edges in the text cluster to be split or the minimum text tree.

[0029] In one embodiment, regarding the above step S14, further as follows Figure 5 As shown, the following processing steps may be included: S141, converting each text to be recommended in each text cluster into a dense vector; S142, respectively calculating the average value of each dense vector corresponding to each text cluster to obtain the average vector corresponding to each text cluster; S143, among the dense vectors of each text cluster, taking the dense vector that is most similar to the average vector as the cluster center vector of the corresponding text cluster; S144, respectively calculating the Euclidean distance between each cluster center vector and the dense vector of each to-be-recommended text in the corresponding text cluster; S145 , respectively taking a preset number of texts with the smallest Euclidean distance as core texts of the corresponding text cluster.

[0030] Specifically, the BGE (BAAI General Embedding) semantic vector model can be used to convert text into dense vectors. BGE is a pre-trained language model designed to generate high-quality text embeddings and can generate dense vector representations. Dense vectors can capture the semantic information of the text and generally have better expressive power and more efficient computing performance to further improve the accuracy and efficiency of text recommendations. For any text cluster, the average vector of all dense vectors in the text cluster is calculated, and then the cosine similarity between the average vector and each dense vector is calculated to determine the dense vector that is most similar to the average vector, and then the dense vector is used as the cluster center vector of the text cluster. The Euclidean distance between the cluster center vector and the dense vector of each text is calculated, and a preset number (the specific number can be selected according to actual application needs) of texts with the smallest Euclidean distance are used as the core texts of the text cluster.

[0031] In one embodiment, regarding the above step S18, further as follows Figure 6 As shown, the following processing steps may be included: S181, obtaining target information of the user terminal; the target information includes user information or search information input by the user; S182, performing entity recognition and event extraction on the target information to obtain a processing result; S183, using the processing results to match the titles and abstracts corresponding to the respective text clusters, and determining a plurality of first target text clusters from the respective text clusters; S184, recommending the title and summary corresponding to each first target text cluster to the user terminal, and receiving feedback from the user terminal; S185, determining a plurality of second target text clusters from each first target text cluster according to the feedback; S186: Recommend all the texts to be recommended in each second target text cluster to the user terminal.

[0032] Specifically, user information includes a user's browsing history, search history, click history, and saved history on an app. Entity recognition identifies named entities within the target information, such as nouns like people and places. Event extraction extracts words that describe events within the target information, such as the event's name, location, people involved, and the cause, process, and outcome of the event.

[0033] During the process of performing entity recognition and event extraction on user information to obtain processing results, the processing results may include named entities in the user information and words describing events in the user information (browsing history, search history, historical click behavior, and historical collection behavior can all be considered events). The processing results are matched with the titles and summaries corresponding to each text cluster to determine, from the multiple text clusters, multiple first target text clusters that are closest to the processing results. The number of times the words in the processing results appear in the titles and summaries corresponding to each text cluster can be counted, and the text clusters with the largest number of occurrences are selected as the multiple first target text clusters.

[0034] To facilitate user browsing, the title and summary of each first target text cluster can be recommended to the user. Then, based on user feedback, multiple second target text clusters are determined from each first target text cluster. All text in each second target text cluster is then recommended to the user. This two-level recommendation design further improves the accuracy of recommendations.

[0035] In the process of performing entity recognition and event extraction on the search information and obtaining the processing results, the processing results may include named entities in the search information and words describing events in the search information. The processing results are matched with the titles and abstracts corresponding to each text cluster to determine multiple first target text clusters from multiple text clusters. The number of times the words in the processing results appear in the titles and abstracts corresponding to each text cluster can be counted, and the multiple text clusters with the largest number of appearances can be used as multiple first target text clusters. In order to facilitate user browsing, the titles and abstracts corresponding to each first target text cluster can be recommended to the user end first. Then, feedback from the user end is received, and multiple second target text clusters are determined from each first target text cluster based on the feedback. All texts in each second target text cluster are then recommended to the user end, thereby further improving the accuracy of the recommendation.

[0036] The user's feedback may include clicks, favorites, browsing time, likes, or comments (a like indicates satisfaction, a comment indicates dissatisfaction) generated by the user on each first target text cluster. Based on the feedback, multiple second target text clusters determined to be preferred by the user are determined from each first target text cluster. Multiple second target text clusters can be obtained by retaining text clusters in each first target text cluster that have been favorited, liked, or have been browsed for longer than a preset time, while deleting text clusters in which comments have been browsed or have been browsed for less than a preset time. Finally, the specific information (i.e., text) in each second target text cluster is recommended to the user.

[0037] In addition, user feedback may also include clicks, favorites, browsing time, likes, or comments (likes indicate satisfaction, comments indicate dissatisfaction) on various parts of information in the titles and summaries corresponding to each first target text cluster. The titles and summaries corresponding to the first target text cluster contain multiple parts of information. For example, if a first target text cluster is about conflict between two regions and includes many relatively small conflict incidents, each small conflict incident contained in the title and summary of the first target text cluster can be considered as a single part of information.

[0038] In one embodiment, in step S185, the text in each first target text cluster can be filtered based on the feedback, and the filtered text in each first target text cluster can be recommended to the user. This is because a text cluster is a text cluster about a topic, and there may be some text that the user does not like. Therefore, in order to further improve the accuracy of the recommendation, the text in each first target text cluster can be filtered and recommended based on the feedback.

[0039] Specifically, we can score the texts in each first target text cluster based on the feedback, retain the texts with scores higher than the set threshold, and then recommend these texts to the user. For example, A, B, C, D, and E are used to represent the scores corresponding to click behavior, collection behavior, browsing time, likes, and bombing behavior, and the score corresponding to the feedback is calculated according to the following formula: F :

[0040] in, l 、 k 、 j 、 h and g are the weights corresponding to A, B, C, D and E respectively, Y For prior knowledge.

[0041] In one embodiment, in step S185, the text in each second target text cluster may be filtered based on the feedback, and the filtered text in each second target text cluster may be recommended to the user. This is because a text cluster is a collection of texts about a topic, and may contain some text that the user does not like. Therefore, to further improve the accuracy of the recommendation, the text in each second target text cluster may be filtered and recommended based on the feedback.

[0042] It should be understood that although the above process Figures 1 to 6 The steps in the flowchart are shown in the order indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Figures 1 to 6 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0043] In one embodiment, Figure 7 As shown, a text recommendation device 100 is also provided, comprising a data acquisition module 11, a text clustering module 13, a core text module 15, a title summary module 17, and a text recommendation module 19. The data acquisition module 11 is used to acquire a text dataset; the text dataset includes a plurality of texts to be recommended. The text clustering module 13 is used to cluster the plurality of texts to be recommended to obtain a plurality of text clusters on different topics; each text cluster includes a plurality of texts to be recommended. The core text module 15 is used to determine the cluster center vectors of each text cluster and then, based on the cluster center vectors of each text cluster, determine the core text of the corresponding text cluster from the plurality of texts to be recommended in the corresponding text cluster. The title summary module 17 is used to generate the title and summary corresponding to each text cluster based on the core text of each text cluster. The text recommendation module 19 is used to recommend texts to the user terminal according to the title and summary corresponding to each text cluster.

[0044] The above-mentioned text recommendation device 100 obtains a text data set including multiple texts to be recommended, clusters each text to obtain multiple text clusters on different topics, then determines the cluster center vector of each text cluster, and determines the core text of the text cluster from the multiple texts of the text cluster based on the cluster center vector of each text cluster, then generates the title and abstract corresponding to the text cluster according to the core text of each text cluster, and finally accurately recommends text to the user end according to the title and abstract corresponding to each text cluster, avoiding the problem of low recommendation accuracy of related texts under the same topic, thereby improving the recommendation accuracy, enhancing the content service level, and improving user satisfaction.

[0045] For specific limitations of the above-mentioned text recommendation device 100, please refer to the corresponding limitations of the above-mentioned embodiments of the text recommendation method, which will not be repeated here.

[0046] Figure 8 Schematic diagram of a computer device 4 provided in one embodiment of the present application. Figure 8 As shown, the computer device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable by the processor 401. When the processor 401 executes the computer program 403, the steps of the above-described text recommendation method embodiments can be implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the modules / units in the above-described text recommendation device 100 embodiments can be implemented.

[0047] The computer device 4 can be a desktop computer, a notebook computer, a palmtop computer, a cloud server, etc. The computer device 4 can include but is not limited to a processor 401 and a memory 402. It will be understood by those skilled in the art that Figure 8 The computer device 4 is merely an example and does not limit the computer device 4 . The computer device 4 may include more or fewer components than shown in the figure, or different components.

[0048] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0049] Memory 402 may be an internal storage unit of computer device 4, such as a hard drive or memory of computer device 4. Memory 402 may also be an external storage device of computer device 4, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Memory 402 may also include both an internal storage unit of computer device 4 and an external storage device. Memory 402 is used to store computer programs and other programs and data required by the computer device.

[0050] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0051] If the integrated module / unit is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the process steps in the above-mentioned method embodiments by using a computer program to instruct the relevant hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program can include computer program code, which can be in source code form, object code form, executable file, or some intermediate form. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, removable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunications signals, and software distribution media. It should be noted that the content included in computer-readable media can be appropriately increased or decreased based on the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, based on legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunications signals.

[0052] In one embodiment, a computer-readable storage medium is also provided, which stores a computer program. When the computer program is executed by a processor, the following processing steps are implemented: obtaining a text data set; the text data set includes multiple texts to be recommended; clustering the multiple texts to be recommended to obtain multiple text clusters on different topics; each text cluster includes multiple texts to be recommended; after determining the cluster center vector of each text cluster, based on the cluster center vector of each text cluster, the core text of the corresponding text cluster is determined from the multiple texts to be recommended in the corresponding text cluster; according to the core text of each text cluster, the title and abstract corresponding to each text cluster are generated respectively; and text is recommended to the user terminal according to the title and abstract corresponding to each text cluster.

[0053] In one embodiment, when the above computer program is executed by a processor, it can also implement the processing steps in other embodiments of the above text recommendation method.

[0054] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus DRAM (RDRAM), and DDR DRAM.

[0055] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0056] The above embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that a person skilled in the art would be able to make numerous modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of the present invention. Therefore, the scope of the present invention shall be determined by the appended claims.

Claims

1. A text recommendation method, characterized in that: Including steps: Acquire a text dataset; the text dataset includes a plurality of texts to be recommended; Clustering multiple texts to be recommended to obtain multiple text clusters on different topics; each text cluster includes multiple texts to be recommended; After determining the cluster center vector of each text cluster, based on the cluster center vector of each text cluster, a core text of the corresponding text cluster is determined from a plurality of texts to be recommended in the corresponding text cluster; Generate the title and summary of each text cluster according to the core text of each text cluster; Recommend texts to users based on the titles and summaries of each text cluster.

2. The text recommendation method according to claim 1, characterized in that The steps of clustering multiple texts to be recommended to obtain multiple text clusters on different topics include: Calculate the Euclidean distance between any two texts to be recommended; Each text to be recommended is used as a node, and the Euclidean distance between any two texts to be recommended is used as an edge between the two texts to construct a complete text graph corresponding to the text dataset; Extracting a minimum text tree from the complete text graph; the minimum text tree is a connection method that includes all nodes in the complete text graph, and the sum of the edges in the minimum text tree is the smallest among all connection methods; The minimum text tree is split into multiple text clusters by gradually removing the longest edges in the minimum text tree.

3. The text recommendation method according to claim 2, characterized in that The step of splitting the minimum text tree into multiple text clusters by gradually removing the longest edges in the minimum text tree comprises: Remove the longest edge in the minimum text tree, and split the minimum text tree into two text clusters; Put the two text clusters obtained by splitting into a text cluster set and execute the following loop: Determining whether the number of nodes in all text clusters in the text cluster set is less than a preset number; When the number of nodes in all text clusters in the text cluster set is less than the preset number, the text cluster in the text cluster set is used as the final text cluster, and the loop ends; Otherwise, the longest edge in the text cluster whose number of nodes in the text cluster set is not less than the preset number is removed, and the text cluster is split into two text clusters.

4. The text recommendation method according to claim 2, characterized in that After the step of extracting the minimum text tree from the complete text graph, the method further includes: Removing a target edge in the minimum text tree, and splitting the minimum text tree into two text clusters; Put the two text clusters obtained by splitting into a text cluster set and execute the following loop: Determining whether the number of nodes in all text clusters in the text cluster set is less than a preset number; When the number of nodes in all text clusters in the text cluster set is less than the preset number, the text cluster in the text cluster set is used as the final text cluster, and the loop ends; Otherwise, the target edge in the text cluster whose number of nodes in the text cluster set is not less than the preset number is removed, and the text cluster is split into two text clusters.

5. The text recommendation method according to claim 4, characterized in that Also includes: Determining the sum of edges in the text cluster to be split or the minimum text tree; Traversing each edge of the text cluster to be split or the minimum text tree, and determining the sum of the edges in the two text clusters obtained by splitting according to each edge; When the sum of the reciprocals of the sum of edges in the two text clusters obtained by splitting is greater than the reciprocal of the sum of edges in the text cluster to be split or the minimum text tree, the corresponding edge is determined as the target edge.

6. The text recommendation method according to claim 1, characterized in that After determining the cluster center vectors of each text cluster, the steps of determining the core text of the corresponding text cluster from the multiple texts to be recommended in the corresponding text cluster based on the cluster center vectors of each text cluster include: Convert each text to be recommended in each text cluster into a dense vector respectively; Calculate the average value of each dense vector corresponding to each text cluster respectively to obtain the average vector corresponding to each text cluster; Among the dense vectors of each text cluster, the dense vector that is most similar to the average vector is taken as the cluster center vector of the corresponding text cluster; Calculate the Euclidean distance between each cluster center vector and the dense vector of each text to be recommended in the corresponding text cluster; A preset number of texts with the smallest corresponding Euclidean distance are respectively used as core texts of the corresponding text cluster.

7. The text recommendation method according to claim 1, characterized in that Recommend text to the user based on the title and summary of each text cluster, including: Acquire target information of the user terminal; the target information includes user information or search information input by the user; Performing entity recognition and event extraction on the target information to obtain a processing result; Matching the titles and abstracts corresponding to the respective text clusters using the processing results, and determining a plurality of first target text clusters from the respective text clusters; recommending titles and summaries corresponding to the respective first target text clusters to the user terminal, and receiving feedback from the user terminal; determining a plurality of second target text clusters from each first target text cluster according to the feedback; All the texts to be recommended in each second target text cluster are recommended to the user terminal.

8. A text recommendation device, characterized in that: include: A data acquisition module, configured to acquire a text data set; the text data set includes a plurality of texts to be recommended; A text clustering module is used to cluster multiple texts to be recommended to obtain multiple text clusters on different topics; each text cluster includes multiple texts to be recommended; A core text module is configured to determine the cluster center vector of each text cluster and then determine the core text of the corresponding text cluster from a plurality of texts to be recommended in the corresponding text cluster based on the cluster center vector of each text cluster; The title summary module is used to generate the title and summary of each text cluster according to the core text of each text cluster; The text recommendation module is used to recommend texts to the user according to the titles and summaries corresponding to each text cluster.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the text recommendation method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the text recommendation method according to any one of claims 1 to 7 are implemented.