Push similar article determination method and device, storage medium and electronic device
By calculating the similarity between candidate articles and historical push articles and removing duplicate articles, the problem of news media pushing similar articles is solved, improving user experience and reducing resource usage.
Patent Information
- Application Number
- CN202210658173.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-10
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-06-10
AI Technical Summary
When pushing articles in news media, similar articles may be pushed repeatedly, affecting the user experience.
By obtaining the top N articles with the highest user matching and the user's historical push articles, the similarity between each candidate article and historical article is calculated. If the similarity is less than or equal to the preset threshold, repeated articles will be removed.
It effectively avoids repeated pushing of similar articles to the same user, improves user experience, and reduces resource occupancy.
Smart Images

Figure CN114943036B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for determining similar articles pushed by a push service, a storage medium, and an electronic device. Background Art
[0002] At present, there are many news media, and each media will report on hot information that the public is concerned about. In order to increase the activity of users, it is necessary to push personalized article information to different users from time to time. However, the core of the content reported by each media will not change, but there will be differences in expression, modification, etc., that is to say, there may be similar articles in the candidate article pool (articles provided by different media may describe the same thing), which will result in similar articles being selected for the same user for multiple pushes when pushing articles to users. Therefore, it is necessary to determine whether the currently selected article has been pushed in the process of historical pushes, so as to avoid repeatedly selecting similar articles for the same user to push, thereby affecting the user experience. Summary of the invention
[0003] In view of this, the present invention provides a method and device for determining push similar articles, as well as a storage medium and an electronic device, to at least partially solve the above-mentioned problem.
[0004] In order to solve the above problems, the present invention provides a method for determining push similar articles, the method comprising:
[0005] Get the top N articles that have the highest matching degree with the user as candidate articles;
[0006] Get the user's historical push articles;
[0007] Based on the candidate articles and the historically pushed articles, calculate the article similarity between each candidate article and the historically pushed articles;
[0008] In response to the comparison result that the article similarity is less than or equal to the preset threshold, the candidate articles that are repeated with the historical pushed articles are removed.
[0009] Optionally, in the above-mentioned method embodiments of the present invention, based on the candidate articles and the historically pushed articles, calculating the article similarity between each candidate article and the historically pushed articles includes:
[0010] Perform word segmentation on candidate articles and historical pushed articles respectively;
[0011] Eliminate stop words in the candidate articles after word segmentation and the historical pushed articles after word segmentation, and obtain the corresponding candidate article keywords and historical pushed article keywords respectively;
[0012] Construct a directed cyclic graph based on the keywords of historically pushed articles;
[0013] Based on the directed cyclic graph of historically pushed articles and the keywords of candidate articles, the candidate article paths are obtained to obtain the result vector;
[0014] Based on the result vector, calculate the article similarity between the candidate article and the historically pushed articles.
[0015] Optionally, in the above-mentioned method embodiments of the present invention, the stop words in the candidate articles after word segmentation and the historical pushed articles after word segmentation are eliminated to obtain the candidate article keywords and the historical pushed article keywords respectively, including:
[0016] Preset stop word list;
[0017] According to the stop word list, the stop words in the candidate articles after word segmentation and the historical pushed articles after word segmentation are eliminated to obtain the corresponding candidate article keywords and historical pushed article keywords respectively.
[0018] Optionally, in the above-mentioned method embodiments of the present invention, a directed cyclic graph is constructed according to keywords of historically pushed articles, including:
[0019] Summarize the key words of historically pushed articles;
[0020] A directed cyclic graph is constructed by taking the keywords of historically pushed articles as nodes and the order of the keywords of historically pushed articles as the direction of each node.
[0021] Optionally, in the above-mentioned method embodiments of the present invention, based on the directed cyclic graph of historically pushed articles and the keywords of the candidate articles, the candidate article path is obtained to obtain a result vector, including:
[0022] Traverse each word in the candidate article keywords in the directed cyclic graph to determine whether a node identical to the word can be found;
[0023] If the same node is found, the current word is marked as the first preset identifier and added to the result vector, and the next word in the candidate article keyword is searched backward from the current node in the directed cyclic graph;
[0024] If the same node is not found, the current word is marked as a second preset identifier and added to the result vector, and the current word is continued to be searched backward with the current node in the directed cyclic graph. When the step length of traversal of each out-degree of the previous node is greater than the preset step length and the node with the same word as the current word is still not found, the next word in the candidate article keywords is traversed again in the directed cyclic graph;
[0025] After the traversal is completed, the final result vector is obtained.
[0026] Optionally, in the above-mentioned method embodiments of the present invention, calculating the article similarity between the candidate article and the historically pushed article according to the result vector includes:
[0027] Based on the final result vector, the ratio of the number of first preset identifiers in the result vector to the length of the entire result vector is calculated.
[0028] Optionally, in the above method embodiments of the present invention, the method further includes:
[0029] If the comparison result of the response article similarity is greater than a preset threshold, the candidate article is not similar to the historically pushed article, and the keywords of the candidate article are used to supplement the construction of a directed cyclic graph.
[0030] In order to solve the above problem, the present invention also provides a push similar article determination device, which includes:
[0031] The selection module obtains the top N articles with the highest matching degree with the user as candidate articles;
[0032] Acquisition module, used to obtain historical pushed articles;
[0033] A similarity calculation module is used to calculate the article similarity between each candidate article and the historically pushed articles based on the candidate articles and the historically pushed articles;
[0034] The deduplication module is used to respond to the comparison result that the article similarity is less than or equal to a preset threshold, and remove candidate articles that are duplicates of historical pushed articles.
[0035] To solve the above problems, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an embodiment of any of the above-mentioned methods for determining similar articles through push.
[0036] To solve the above problems, the present invention also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer executable program, and the processor is used to run the computer executable program to implement an embodiment of any method of the above-mentioned push similar article determination method.
[0037] The push similar article determination method and device, storage medium and electronic device provided by the present invention effectively avoid the problem of repeatedly pushing similar articles to the same user by screening similar articles, improve user experience, and reduce resource usage.
[0038] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0040] Figure 1 It is a flowchart of a method for determining similar articles through push according to an exemplary embodiment of the present invention;
[0041] Figure 2 is a schematic diagram of a flow chart of article similarity calculation provided by an exemplary embodiment of the present invention;
[0042] Figure 3 is a schematic diagram of a process for eliminating stop words provided by an exemplary embodiment of the present invention;
[0043] Figure 4 is a schematic diagram of a process of constructing a graph provided by an exemplary embodiment of the present invention;
[0044] Figure 5 It is a flowchart of a method for determining similar articles for push push provided by another exemplary embodiment of the present invention;
[0045] Figure 6 is a schematic diagram of a construction diagram of a keyword B provided by an exemplary embodiment of the present invention;
[0046] Figure 7 is a schematic structural diagram of a device provided by an exemplary embodiment of the present invention;
[0047] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0048] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.
[0049] It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0050] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0051] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0052] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0053] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0054] It should also be understood that the description of the various embodiments of the present invention focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0055] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0056] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0057] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0058] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0059] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0060] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0061] Exemplary Methods
[0062] Figure 1 FIG. 1 is a flow chart of a method for determining similar articles to be pushed provided by an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the method comprises the following steps:
[0063] Step S101, obtaining the top N articles with the highest matching degree with the user as candidate articles;
[0064] Wherein, N is a positive integer; and as for the method of selecting candidate articles, those skilled in the art may select a selection method in the prior art according to actual needs, which is not limited here.
[0065] Step S102, obtaining the user's historical push articles;
[0066] Regarding the method for obtaining historical pushed articles, those skilled in the art may select an obtaining method in the prior art according to actual needs, and no limitation is made here.
[0067] Step S103, based on the candidate articles and the historically pushed articles, calculating the article similarity between each candidate article and the historically pushed articles;
[0068] Alternatively, if Figure 2As shown, step S103 specifically includes:
[0069] Step S1031, segmenting the candidate articles and the historically pushed articles respectively;
[0070] Step S1032, removing stop words from the candidate articles after word segmentation and the historical pushed articles after word segmentation, and obtaining corresponding keyword terms of the candidate articles and keyword terms of the historical pushed articles respectively;
[0071] Alternatively, if Figure 3 As shown, step S1032 specifically includes:
[0072] Step S10321, pre-setting a stop word list;
[0073] Step S10322, according to the stop word list, remove the stop words in the candidate articles after word segmentation and the historical pushed articles after word segmentation, and obtain the corresponding candidate article keywords and historical pushed article keywords respectively.
[0074] Step S1033, constructing a directed cyclic graph based on the keywords of historically pushed articles;
[0075] There may be one or more directed cyclic graphs constructed based on the keywords of historically pushed articles. Specifically, if there is one historically pushed article, a directed cyclic graph may be constructed based on the keywords of the historically pushed articles of the historically pushed article; if there are multiple historically pushed articles, a directed cyclic graph may be constructed based on the keywords of the historically pushed articles of the multiple historically pushed articles, or a directed cyclic graph may be constructed corresponding to the keywords of the historically pushed articles of each historically pushed article, i.e., multiple directed cyclic graphs.
[0076] It should be noted that if the same historical push article keywords exist in one or more historical push articles, when constructing a directed cyclic graph, the same historical push article keywords can only appear once as a node. In other words, if the same historical push article keywords exist in one or more historical push articles, when constructing a directed cyclic graph, the same historical push article keywords are merged.
[0077] Alternatively, if Figure 4 As shown, step S1033 specifically includes:
[0078] Step S10331, summarizing the key words of historically pushed articles;
[0079] Step S10332, constructing a directed cyclic graph with the keywords of the historically pushed articles as nodes and the sequence of the keywords of the historically pushed articles as the direction of each node.
[0080] Step S1034, based on the directed cyclic graph of historically pushed articles and the keywords of the candidate articles, obtain the candidate article path and obtain a result vector;
[0081] Optionally, step S1034 specifically includes:
[0082] Traverse each word in the candidate article keywords in the directed cyclic graph to determine whether a node identical to the word can be found;
[0083] If the same node is found, the current word is marked as the first preset identifier and added to the result vector, and the next word in the candidate article keyword is searched backward from the current node in the directed cyclic graph;
[0084] If the same node is not found, the current word is marked as a second preset identifier and added to the result vector, and the current word is continued to be searched backward with the current node in the directed cyclic graph. When the step length of traversal of each out-degree of the previous node is greater than the preset step length and the node with the same word as the current word is still not found, the next word in the candidate article keywords is traversed again in the directed cyclic graph;
[0085] After the traversal is completed, the final result vector is obtained.
[0086] Furthermore, when multiple directed cyclic graphs are constructed based on the keywords of historically pushed articles, each candidate article traverses the multiple directed cyclic graphs. This method can accurately calculate the article similarity between the candidate articles and the historically pushed articles, thereby making deduplication more accurate; when a directed cyclic graph is constructed based on the keywords of historically pushed articles, each candidate article only traverses the directed cyclic graph. This method can effectively compress the amount of calculation data and improve calculation efficiency.
[0087] Optionally, when the first word in the candidate article keywords is traversed in the directed cyclic graph, if the first word in the candidate article keywords is not found in the directed cyclic graph, the first word in the candidate article keywords is directly marked as a second preset identifier with the same number as the preset step size and added to the result vector, and the next word in the candidate article keywords is re-traversed in the directed cyclic graph.
[0088] In addition, it should be noted that when the previous word of the current word in the candidate article keywords is not found in the directed cyclic graph, it is marked as a second preset identifier with the same number as the preset step size and added to the result vector, and the current word in the candidate article keywords is no longer searched according to the candidate article path of the previous word, but the entire directed cyclic graph is traversed again.
[0089] Step S1035, calculating the article similarity between the candidate article and the historically pushed articles based on the result vector.
[0090] Optionally, step S1035 specifically includes: based on the final result vector, calculating the ratio of the number of first preset identifiers in the result vector to the length of the entire result vector.
[0091] Step S104, in response to the comparison result that the article similarity is less than or equal to a preset threshold, remove candidate articles that are duplicated with historically pushed articles.
[0092] In an optional embodiment of the present invention, the method further includes: in response to the comparison result that the article similarity is greater than a preset threshold, the candidate article is not similar to the historically pushed article, and the directed cyclic graph is constructed using the candidate article keywords to supplement.
[0093] The push similar article determination method provided by the present invention effectively avoids the problem of repeatedly pushing similar articles to the same user, improves user experience, and can reduce resource usage.
[0094] Figure 5 FIG. 2 is a flow chart of a method for determining similar articles in push mode provided by another exemplary embodiment of the present invention. Figure 5 As shown, the method comprises the following steps:
[0095] Step S201, using the trained recommendation model, obtaining the top N articles with the highest matching degree with the user from the candidate article content pool as candidate articles;
[0096] In one implementation of the embodiment of the present invention, the recommendation model may be a DeepCrossing model, a NeuralCF model, a PNN model or a Wide&Deep model in the prior art, and the embodiment of the present invention does not specifically limit the recommendation model used. In addition, the number of candidate articles is determined based on the articles included in the preset matching range, and the embodiment of the present invention does not specifically limit the number of candidate articles. Wherein, N is a positive integer.
[0097] In this embodiment, the candidate articles include a candidate article A, which is "I like to read novels". It should be noted that the candidate article A is only an example for explaining the present invention in detail, and this embodiment is described by taking only one candidate article as an example.
[0098] Step S202, obtaining historical push articles, including a historical push article B, which is "I don't like watching TV or movies". It should be noted that candidate article A is an example listed for explaining the present invention in detail, and this embodiment only takes one historical push article as an example for explanation.
[0099] Step S203, using the Jieba word segmentation tool to segment the candidate article A and the historical push article B respectively;
[0100] After word segmentation, the candidate article A is: I / like / read / novels;
[0101] The historical pushed article B after word segmentation is: I don’t like watching TV and I don’t like watching movies.
[0102] Step S204, according to a preset stop word list, stop words are removed from the candidate article A after word segmentation and the historical push article B after word segmentation to obtain the keyword A and the keyword B;
[0103] The preset stop word list may be: of, is, I, you, he, etc. This embodiment does not impose any limitation on the stop word list, and those skilled in the art may flexibly set it according to actual needs.
[0104] Keyword A is: like / read / novel;
[0105] Keyword B is: don’t like watching TV / don’t like watching movies.
[0106] Step S205, constructing a directed cyclic graph of keyword B.
[0107] In this embodiment, each word of the keyword B is used as a node, and the order of the keyword B is used as the direction of each node to construct a directed cyclic graph, such as Figure 6 As shown, a directed cyclic graph constructed for keyword B is obtained.
[0108] Step S206, constructing a result vector, traversing all words in keyword A in turn, searching in the directed cyclic graph, marking "1" or "0" according to the search result, and adding the marked number to the result vector.
[0109] Wherein, step S206 may further include:
[0110] Traverse each word in the keyword A in the directed cyclic graph to determine whether a node identical to the word can be found;
[0111] If the same node is found, the current word is marked as "1" (the first preset identifier) and added to the result vector, and the next word in the keyword A is searched backward from the current node in the directed cyclic graph;
[0112] If no identical node is found, mark the current word as "0" (the second preset identifier) and add it to the result vector, and continue to search for the current word backward from the current node in the directed acyclic graph; when the step length of traversing each out-degree of the previous node is greater than the preset step length and no node identical to the current word is found, traverse the next word in the keyword A again in the directed acyclic graph;
[0113] In this embodiment, the preset step length is preferably five. Of course, those skilled in the art can also select according to actual needs, and no limitation is made here.
[0114] Specifically, first, determine whether the word "like" in the keyword A is in the directed acyclic graph. If an identical node to the word "like" is found, mark the current word "like" as "1" and add it to the result vector. At this time, the result vector is 1; continue to traverse the next word "watch", and determine whether the word "watch" is in the directed acyclic graph. If an identical node to the word "watch" is found, mark the current word "watch" as "1" and add it to the result vector. At this time, the result vector is: 11; the next word after "watch" is "novel". Continue to search in each out-degree of the current node "watch", and find the "TV" node and "movie" node after the "watch" node. No node identical to the word "novel" is found. At this time, the result vector is: 110; traverse the next node of the "TV" node. The next node is "not". The node "not" is not the same as the word "novel", so continue to search in the graph. The maximum search step length is five, and none are found. At this time, the result vector is 1100000, and the traversal ends. The final result vector is 1100000.
[0115] After all traversals are completed, a final result vector is formed. The final result vector is: 1100000.
[0116] Step S207, calculate the proportion of the number of "1"s in the result vector in the overall result vector to obtain the article similarity between the candidate article A and the historical push article. The similarity of the candidate article A is 28.5%.
[0117] Step S208, if the article similarity is less than or equal to the preset threshold, determine that the candidate article A is similar to the historical push article B, and remove duplicates from the candidate article A; if the article similarity is greater than the preset threshold, determine that the candidate article A is not similar to the historical push article B, and use the keyword A of the candidate article to supplement and construct the directed acyclic graph.
[0118] For the preset threshold, those skilled in the art can flexibly select according to actual needs, and no limitation is made here.
[0119] The push similar article determination method provided by the present invention effectively avoids the problem of repeatedly pushing similar articles to the same user, improves user experience, and can reduce resource usage.
[0120] Exemplary Devices
[0121] Figure 7 Schematic diagram of the structure of a device provided by an exemplary embodiment of the present invention. Figure 7 As shown, the device comprises:
[0122] The selection module 31 obtains the top N articles with the highest matching degree with the user as candidate articles;
[0123] The acquisition module 32 is used to acquire historical pushed articles;
[0124] A similarity calculation module 33 is used to calculate the article similarity between each candidate article and the historically pushed articles based on the candidate articles and the historically pushed articles;
[0125] In one embodiment, the similarity calculation module 33 may include a word segmentation unit 331 , a stop word elimination unit 332 , a graph construction unit 333 , a path acquisition unit 334 and a calculation unit 335 .
[0126] The word segmentation unit 331 is used to segment the historical pushed articles and the candidate articles respectively, and send the segmented historical pushed articles and the segmented candidate articles to the stop word elimination unit 332.
[0127] The stop word removal unit 332 is used to remove stop words from the historical pushed articles and the candidate articles after word segmentation, obtain corresponding keywords of the historical pushed articles and the candidate articles, and send the keywords of the historical pushed articles to the graph construction unit 333.
[0128] In one embodiment, the stop word elimination unit 332 may also include a stop word list unit (not shown in the figure), which is used to eliminate stop words in the candidate articles after word segmentation and the historical pushed articles after word segmentation according to the stop word list, and obtain corresponding candidate article keywords and historical pushed article keywords respectively.
[0129] The graph construction unit 333 is used to construct a directed cyclic graph of the keywords of the historically pushed articles.
[0130] In one embodiment, the graph construction unit 333 is specifically used to: summarize the keywords of historically pushed articles; use the keywords of historically pushed articles as nodes and the sequence of the keywords of historically pushed articles as the direction of each node to construct a directed cyclic graph.
[0131] The path acquisition unit 334 is used to acquire the candidate article path based on the directed cyclic graph of the historically pushed articles and the candidate article keywords to obtain a result vector.
[0132] In one embodiment, the path acquisition unit 334 is specifically used for:
[0133] Traverse each word in the candidate article keywords in the directed cyclic graph to determine whether a node identical to the word can be found;
[0134] If the same node is found, the current word is marked as the first preset identifier and added to the result vector, and the next word in the candidate article keyword is searched backward from the current node in the directed cyclic graph;
[0135] If the same node is not found, the current word is marked as a second preset identifier and added to the result vector, and the current word is continued to be searched backward with the current node in the directed cyclic graph. When the step length of traversal of each out-degree of the previous node is greater than the preset step length and the node with the same word as the current word is still not found, the next word in the candidate article keywords is traversed again in the directed cyclic graph;
[0136] After the traversal is completed, the final result vector is obtained.
[0137] The calculation unit 335 is used to calculate the ratio of the number of first preset identifiers in the result vector to the length of the entire result vector based on the final result vector of the candidate article.
[0138] The deduplication module 34 is used to remove candidate articles that are duplicated with historically pushed articles in response to a comparison result that the article similarity is less than or equal to a preset threshold.
[0139] In one embodiment, if the article similarity is greater than a preset threshold, the candidate article is not similar to the historically pushed article, and the deduplication module 34 is further used to send the candidate article keywords to the graph construction unit 333 to construct a directed cyclic graph and add the candidate article to the directed cyclic graph.
[0140] The push similar article determination device provided by the present invention effectively avoids the problem of repeatedly pushing similar articles to the same user, improves user experience, and can reduce resource usage.
[0141] It should be noted that the above-mentioned device corresponds to the push-pushed similar article determination method provided by the present invention. Other descriptions can refer to the description of the push-pushed similar article determination method provided by the present invention, which will not be repeated here.
[0142] Exemplary Electronic Devices
[0143] Figure 8The electronic device provided by an exemplary embodiment of the present invention may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signals from them. Figure 8 FIG. 1 is a block diagram of an electronic device according to an embodiment of the present disclosure. Figure 8 As shown, the electronic device includes one or more processors 41 and a memory 42 .
[0144] The processor 41 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0145] The memory 42 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 41 may run the program instructions to implement the push push similar article determination method and / or other desired functions of the software program of each embodiment of the present disclosure described above. In one example, the electronic device may also include: an input device 43 and an output device 44, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0146] In addition, the input device 43 may also include, for example, a keyboard, a mouse, etc.
[0147] The output device 44 can output various information to the outside, and can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto.
[0148] Of course, to simplify, Figure 8 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.
[0149] Exemplary computer program products and computer-readable storage media
[0150] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the push similar article determination method according to various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
[0151] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0152] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, causes the processor to execute the steps of the push similar article determination method according to various embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0153] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0154] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0155] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0156] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0157] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0158] It should also be noted that in the apparatus, equipment and method of the present disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present disclosure. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present disclosure. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown here, but to the widest scope consistent with the principles and novel features disclosed herein.
[0159] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for determining similar articles in push notifications, characterized in that: The method comprises: Get the top N articles that have the highest matching degree with the user as candidate articles; Get the user's historical push articles; Based on the candidate articles and the historically pushed articles, calculating the article similarity between each of the candidate articles and the historically pushed articles includes: Performing word segmentation on the candidate article and the historical pushed article respectively; Eliminate stop words in the candidate article after word segmentation and the historical pushed article after word segmentation, and obtain corresponding candidate article keywords and historical pushed article keywords respectively; Constructing a directed cyclic graph based on the keywords of the historically pushed articles; Based on the directed cyclic graph of the historically pushed articles and the keywords of the candidate articles, the candidate article paths are obtained to obtain a result vector, including: Traversing each word in the candidate article keywords in the directed cyclic graph to determine whether a node identical to the word can be found; If the same node is found, the current word is marked as the first preset identifier and added to the result vector, and the next word in the candidate article keywords is searched backwards with the current node in the directed cyclic graph; If the same node is not found, the current word is marked as a second preset identifier and added to the result vector, and the current word is continued to be searched backward with the current node in the directed cyclic graph, and when the step length of traversal of each out-degree of the previous node is greater than the preset step length and the node same as the current word is still not found, the next word in the candidate article keywords is re-traversed in the directed cyclic graph; After the traversal is completed, the final result vector is obtained; Calculating the article similarity between the candidate article and the historically pushed article according to the result vector includes: Based on the final result vector, calculate the ratio of the number of first preset identifiers in the result vector to the length of the entire result vector; In response to the comparison result that the article similarity is less than or equal to a preset threshold, candidate articles that are duplicates of the historically pushed articles are removed.
2. The method for determining similar articles pushed by push according to claim 1 is characterized in that: The stop words in the candidate article after word segmentation and the historical pushed article after word segmentation are eliminated to obtain the candidate article keywords and the historical pushed article keywords respectively, including: Preset stop word list; According to the stop word list, stop words in the candidate article after word segmentation and the historical pushed article after word segmentation are eliminated to obtain corresponding keyword terms of the candidate article and keyword terms of the historical pushed article, respectively.
3. The method for determining similar articles pushed by push according to claim 1 is characterized in that: The step of constructing a directed cyclic graph based on the keywords of the historically pushed articles includes: Summarize the key words of the historically pushed articles; The directed cyclic graph is constructed by taking the keywords of the historically pushed articles as nodes and the sequence of the keywords of the historically pushed articles as the direction of each node.
4. The method for determining similar articles pushed by push according to claim 1 is characterized in that: The calculating, based on the result vector, the article similarity between the candidate article and the historically pushed article comprises: Based on the final result vector, the ratio of the number of the first preset identifiers in the result vector to the length of the entire result vector is calculated.
5. The method for determining similar articles pushed by push according to claim 1 is characterized in that: The method further comprises: In response to the comparison result that the article similarity is greater than the preset threshold, the candidate article is not similar to the historically pushed article, and the keyword of the candidate article is used to supplement the construction of the directed cyclic graph.
6. A push similar article determination device, characterized in that: The device comprises: The selection module obtains the top N articles with the highest matching degree with the user as candidate articles; Acquisition module, used to obtain historical pushed articles; A similarity calculation module is used to calculate the article similarity between each candidate article and the historically pushed article based on the candidate article and the historically pushed article, including: The word segmentation unit is used to segment the historical pushed articles and the candidate articles respectively, and send the segmented historical pushed articles and the segmented candidate articles to the stop word elimination unit; A stop word removal unit is used to remove stop words from the historical pushed articles and the candidate articles after word segmentation, respectively obtain the keywords of the historical pushed articles and the keywords of the candidate articles, and send the keywords of the historical pushed articles to the graph construction unit; A graph construction unit is used to construct a directed cyclic graph of keywords of historically pushed articles; The path acquisition unit is used to acquire the candidate article path based on the directed cyclic graph of historically pushed articles and the candidate article keywords, and obtain the result vector, including: Traversing each word in the candidate article keywords in the directed cyclic graph to determine whether a node identical to the word can be found; If the same node is found, the current word is marked as the first preset identifier and added to the result vector, and the next word in the candidate article keywords is searched backwards with the current node in the directed cyclic graph; If the same node is not found, the current word is marked as a second preset identifier and added to the result vector, and the current word is continued to be searched backward with the current node in the directed cyclic graph, and when the step length of traversal of each out-degree of the previous node is greater than the preset step length and the node same as the current word is still not found, the next word in the candidate article keywords is re-traversed in the directed cyclic graph; After the traversal is completed, the final result vector is obtained; A calculation unit, used for calculating the article similarity between the candidate article and the historically pushed article according to the result vector; The deduplication module is used to respond to the comparison result that the article similarity is less than or equal to a preset threshold value, and remove the candidate articles that are repeated with the historical pushed articles.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the push similar article determination method described in any one of claims 1 to 5 is implemented.
8. An electronic device, comprising a memory and a processor, wherein the memory is used to store a computer executable program, and the processor is used to run the computer executable program to implement the push similar article determination method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Information updating method and apparatus based on social network platform
CN105608627A
Text similarity analysis method and device, storage medium and electronic equipment
CN110390085A