Method for mining text segment associated with long tail intent and related device thereof
By segmenting and weighting online behavioral text data, the problem of identifying long-tail intent clues in massive amounts of data is solved, achieving efficient and high-quality keyword-level clue mining.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2023-06-16
- Publication Date
- 2026-07-21
Smart Images

Figure CN116842176B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence, specifically to natural language processing, deep learning, and knowledge mining technologies, which can be applied to smart city and smart government scenarios. In particular, it relates to a method and related equipment for mining text fragments associated with long-tail intentions. Background Technology
[0002] Mining clues (such as keyword clues) related to specific long-tail intentions (such as illegal or criminal intentions) from massive amounts of user online behavior text data is extremely difficult. This is because ordinary behavior text data accounts for a large proportion of the vast amount of online behavior text data. For example, in thousands of online behavior text data, there may only be a few pieces of online behavior text data related to specific long-tail intentions. Finding clues (such as word-level clues) that are actually related to specific long-tail intentions is extremely difficult.
[0003] Therefore, it is crucial to extract clues (such as word-level clues) related to specific long-tail intentions from massive amounts of user online behavior text data. Summary of the Invention
[0004] This disclosure provides a method and related apparatus for mining text fragments associated with long-tail intentions.
[0005] According to one aspect of this disclosure, a method for mining text fragments associated with long-tail intentions is provided, comprising:
[0006] Obtain network behavior text data of at least one target object; wherein the network behavior text data is associated with a specified long-tail intent;
[0007] At least one piece of text data in the network behavior text data of any target object is segmented to obtain a set of text fragments of the target object;
[0008] Determine the number of times any text segment appears in the text segment set of any target object, and determine a first number of text segment sets containing any text segment;
[0009] Based on the first quantity and the number of occurrences, the weight of any text fragment in the text fragment set of any target object is determined, and based on the weight of each text fragment in the text fragment set of the at least one target object, the target text fragment associated with the specified long-tail intent is determined.
[0010] According to another aspect of this disclosure, an apparatus for mining text fragments associated with long-tail intentions is provided, comprising:
[0011] An acquisition module is used to acquire network behavior text data of at least one target object; wherein the network behavior text data is associated with a specified long-tail intent;
[0012] The segmentation module is used to segment at least one piece of text data in the network behavior text data of any target object to obtain a set of text fragments of the target object;
[0013] The first determining module is used to determine the number of times any text segment appears in the text segment set of any target object, and to determine a first number of text segment sets containing the any text segment;
[0014] The second determining module is used to determine the weight of any text fragment in the text fragment set of any target object based on the first quantity and the number of occurrences;
[0015] The third determining module is used to determine the target text segment associated with the specified long-tail intent based on the weight of each text segment in the text segment set of the at least one target object.
[0016] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method for mining text fragments associated with long-tail intentions as described above in this disclosure.
[0020] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided, the computer instructions being used to cause the computer to execute the method for mining text fragments associated with long-tail intentions as described above in this disclosure.
[0021] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method for mining text fragments associated with long-tail intentions as described above in this disclosure.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0023] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0024] Figure 1 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 1 of this disclosure.
[0025] Figure 2 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 2 of this disclosure;
[0026] Figure 3 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 3 of this disclosure;
[0027] Figure 4 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 4 of this disclosure.
[0028] Figure 5 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 5 of this disclosure;
[0029] Figure 6 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment Six of this disclosure;
[0030] Figure 7 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 7 of this disclosure.
[0031] Figure 8 This is a schematic diagram of the structure of the text fragment mining device associated with long-tail intent provided in Embodiment 8 of this disclosure;
[0032] Figure 9 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0033] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0034] Currently, relevant algorithms can be used to obtain the network behavior text data of a group of people who may be suspected of having long-tail intentions. For example, the group of people suspected of having long-tail intentions includes k individuals, labeled as {p_1, p_2, p_3, ..., p_k}, and the network behavior text data corresponding to the k individuals is as follows: Wherein, the network behavior text data of the i-th person is Q_i={q_i1,q_i2,q_i3,...,q_i{n_i}}, i=1,2,…,k.
[0035] Where q_i1 represents the first search result (or text data such as comment, chat, or forum content) of the i-th person, and n_i represents the number of searches (or comments, chat, or forum content) of the i-th person within a time window.
[0036] In related technologies, word frequency statistics can be used to extract clues related to a specified long-tail intent from the online behavioral text data of k individuals. This mainly includes the following two approaches:
[0037] The first approach involves the following steps to extract clues related to a specified long-tail intent from the online behavioral text data of k individuals:
[0038] 1. Summarize all text data in the dataset;
[0039] 2. Regarding Each piece of text data in the process is segmented into words to obtain a word set for each piece of text data. For example, for text data q_ij, the word set corresponding to q_ij is {w_ij1,w_ij2,w_ij3,...,w_ijm}, where m is the number of words contained in q_ij;
[0040] 3. Count the number of occurrences of each word segment w_ijh in the word segment set corresponding to all text data; where h = 1, 2, ..., m;
[0041] 4. Use frequently occurring word segments as clues related to the specified long-tail intent (i.e., keyword clues).
[0042] The second method involves calculating the TF-IDF (Term Frequency–Inverse Document Frequency) of a single text data set. Based on this TF-IDF information, clues related to a specified long-tail intent are extracted from the online behavioral text data of k individuals.
[0043] 1) To Each piece of text data in the document is segmented into words to obtain a word segmentation set for each piece of text data. For example, the word segmentation set corresponding to q_ij is {w_ij1,w_ij2,w_ij3,...,w_ijm}.
[0044] 2) Calculate TF: For a text data q_ij, calculate the frequency of a word segment w_ijh appearing in this q_ij:
[0045]
[0046] Among them, f w,q This indicates the number of times the segmentation w_ijh appears in q_ij, where |q| represents the total number of segmentations contained in q_ij.
[0047] 3) Calculate IDF:
[0048]
[0049] in, express The total number of words contained therein. This indicates the number of text data entries containing the word segment w_ijh.
[0050] 4) Determine the importance of word segments by using the values of TF, IDF, and TF-IDF. Based on the importance of each word segment, identify the relatively more important words and use them as clues (i.e., keyword clues) related to the specified long-tail intent. TF-IDF = TF * IDF.
[0051] However, in the first approach mentioned above, all text data is mixed and aggregated, and only the frequency of word segmentation is considered. In this case, the top-K words selected (i.e., the top K words with relatively high frequency) are likely to be some general words, i.e., keywords that are not related to the specified long-tail intent. For example, in search behavior, words such as "is", "what", "a country", "a company", and "university" will appear in the top-K, thus making it impossible to truly discover keywords that are related to the specified long-tail intent.
[0052] In the second approach mentioned above, although the text data is considered separately and the TF-IDF calculation method can filter out common word segmentation, the information provided by a single text data is relatively limited.
[0053] Therefore, in response to at least one of the aforementioned problems, this disclosure considers that the textual data of netizens' online behavior is continuous and logical, and that different netizens have potential connections in setting long-tail intentions, that is, they have similar online behaviors (such as similar search content, similar evaluation content, similar chat content, etc.). By mining the similarities among netizens, word-level clue information can be mined to achieve more efficient and high-quality mining of word-level clue information.
[0054] The following describes a method and related apparatus for mining text fragments associated with long-tail intentions according to embodiments of the present disclosure, with reference to the accompanying drawings.
[0055] Figure 1 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 1 of this disclosure.
[0056] This disclosure illustrates by exemplifying the method for mining text segments associated with long-tail intentions configured in a device for mining text segments associated with long-tail intentions. This device for mining text segments associated with long-tail intentions can be applied to any electronic device so that the electronic device can perform the function of determining text segments associated with long-tail intentions.
[0057] Among them, electronic devices can be any device with computing capabilities, such as personal computers (PCs), mobile terminals, servers, etc. Mobile terminals can be hardware devices with various operating systems, touch screens and / or displays, such as mobile phones, tablets, personal digital assistants, wearable devices, etc.
[0058] like Figure 1 As shown, the method for mining text fragments associated with long-tail intents may include the following steps:
[0059] Step S101: Obtain network behavior text data of at least one target object; wherein the network behavior text data is associated with a specified long-tail intent.
[0060] In this embodiment of the disclosure, the designated long-tail intent is a pre-set long-tail intent, which may include, but is not limited to, long-tail intents such as illegal intent, violation intent, illegal intent, and criminal intent.
[0061] In this embodiment of the disclosure, the target object can be, for example, any user or internet user.
[0062] In this embodiment of the disclosure, the network behavior text data of each target object may include, but is not limited to: search data, forum data, chat data, comment data, and other network behavior text data.
[0063] Among them, the online behavior text data may include at least one piece of text data (such as comment content, chat content, forum content, etc.).
[0064] In this embodiment of the disclosure, network behavior text data of at least one target object can be obtained from massive amounts of network behavior text data; wherein, the network behavior text data of each target object is associated with a specified long-tail intent.
[0065] Step S102: Segment at least one piece of text data in the network behavior text data of any target object to obtain a set of text fragments of any target object.
[0066] In this embodiment of the disclosure, for any target object, at least one piece of text data in the network behavior text data of the target object can be segmented to obtain a set of text fragments of the target object. The set of text fragments may include multiple text fragments, including but not limited to: word segmentation, keywords, phrases, etc.
[0067] Taking text fragments as an example, at least one piece of text data in the network behavior text data of the target object can be segmented into words to obtain the word set corresponding to each piece of text data. The word sets of each piece of text data are then summarized to obtain the text fragment set of the target object. The text fragment set of the target object may include multiple words.
[0068] Step S103: Determine the number of times any text fragment appears in the text fragment set of any target object, and determine the first number of text fragment sets containing any text fragment.
[0069] In this embodiment of the disclosure, for any text segment in the text segment set of the target object, the number of times that any text segment appears in the text segment set of the target object can be counted (referred to as the occurrence count of that any text segment in this disclosure, which is the number of times the text segment set contains that any text segment). Furthermore, the number of text segment sets containing that any text segment can also be counted (referred to as the first number in this disclosure).
[0070] Step S104: Based on the first quantity and the number of occurrences, determine the weight of any text fragment in the text fragment set of any target object, and based on the weight of each text fragment in the text fragment set of at least one target object, determine the target text fragment associated with the specified long-tail intent.
[0071] In this embodiment of the disclosure, the weight of any text fragment in the text fragment set of the target object can be determined based on the first quantity and the number of occurrences. The weight is positively correlated with both the number of occurrences and the first quantity, that is, the more times it occurs, the greater the weight, and the greater the first quantity, the greater the weight.
[0072] In this embodiment of the disclosure, a target text segment (such as a keyword) associated with a specified long-tail intent can be determined based on the weight of each text segment in a set of text segments of at least one target object. For example, a text segment with a relatively large weight can be used as the target text segment associated with the specified long-tail intent.
[0073] The method for mining text fragments associated with long-tail intentions according to embodiments of this disclosure involves: acquiring network behavior text data associated with a specified long-tail intention for each target object; segmenting each text data in the network behavior text data of any target object to obtain a set of text fragments for that target object; determining the frequency of occurrence of any text fragment in the set of text fragments for any target object, and determining a first quantity of text fragment sets containing any text fragment; determining the weight of any text fragment in the set of text fragments for any target object based on the first quantity and the frequency of occurrence, and determining the target text fragment associated with the specified long-tail intention based on the weight of each text fragment in the set of text fragments for at least one target object. In summary, since the network behavior text data of the same target object (such as a user) is continuous and logical, by taking the target object (such as a user) as a dimension, comprehensively considering all text data belonging to that target object, determining the weight of each text fragment belonging to that target object, and thus determining the target text fragment (i.e., clue information) associated with the specified long-tail intention based on the weight of each text fragment, the accuracy of the determination result can be improved, thereby achieving efficient and high-quality mining of clue information related to the specified long-tail intention.
[0074] To clearly illustrate how the weight of a text fragment in the target object's text fragment set is determined in the above embodiments, this disclosure also proposes a method for mining text fragments associated with long-tail intentions.
[0075] Figure 2 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 2 of this disclosure.
[0076] like Figure 2 As shown, the method for mining text fragments associated with long-tail intents may include the following steps:
[0077] Step S201: Obtain network behavior text data of at least one target object; wherein the network behavior text data is associated with a specified long-tail intent.
[0078] Step S202: Segment at least one piece of text data in the network behavior text data of any target object to obtain a set of text fragments of any target object.
[0079] Step S203: Determine the number of times any text fragment appears in the text fragment set of any target object, and determine the first number of text fragment sets containing any text fragment.
[0080] The explanation of steps S201 to S203 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.
[0081] Step S204: Obtain the total number of text fragments contained in the text fragment set of any target object.
[0082] In this embodiment of the disclosure, for any target object, the total number of text fragments contained in the text fragment set of the target object can be counted.
[0083] Step S205: Determine the first index value of any text segment based on the total quantity and the number of occurrences.
[0084] In this embodiment of the disclosure, a first index value for any of the above text fragments can be determined based on the total quantity and the number of occurrences. The first index value is positively correlated with the number of occurrences and negatively correlated with the total quantity.
[0085] In one possible implementation of this disclosure, the first index value is determined, for example, by calculating the ratio of the number of occurrences to the total number (referred to as the first ratio in this disclosure), and determining the first index value of any of the above text segments based on the first ratio.
[0086] Among them, the first indicator value and the first ratio are positively correlated, that is, the larger the first ratio is, the larger the first indicator value is, and vice versa.
[0087] As an example, suppose there are k target objects, and the k target objects are {p_1, p_2, p_3, ..., p_k}, and the network behavior text data corresponding to the k target objects is... Wherein, the network behavior text data of the i-th target object is Q_i={q_i1,q_i2,q_i3,...,q_i{n_i}}, i=1,2,…,k. Here, q_i1 represents the first piece of text data of the i-th target object (i.e., search content (or comment content, chat content, forum content, etc.)), and n_i represents the number of searches (or comments, chat, forum content) of the i-th target object within a time window.
[0088] Let |Q| be the number of text segments in the set of text segments corresponding to label Q_i, and let w_ijh be any text segment in the set of text segments corresponding to label Q_i, where j = 1, 2, ..., n_i, h = 1, 2, ..., m, and m is the number of text segments contained in q_ij. Let f be the number of times label w_ijh appears in the set of text segments corresponding to Q_i. w,Q Then we have:
[0089]
[0090] Where TF(w,Q) represents the first index value of w_ijh.
[0091] In summary, determining the first index value based on the ratio of the first quantity to the total number of text fragments contained in the text fragment set of a single target object allows the first index value to reflect the importance of a text fragment in the network behavior of a single target object. Therefore, determining the weight based on the first index value can improve the accuracy of weight calculation.
[0092] Step S206: Determine the second index value of any text segment based on the total quantity and the first quantity.
[0093] In this embodiment of the disclosure, a second index value for any given text segment can be determined based on the total number of text segments contained in the text segment set of the target object and a first number. The second index value is positively correlated with the total number and negatively correlated with the first number.
[0094] In one possible implementation of this disclosure, the second index value is determined, for example, by summing the total number of text segments contained in the text segment sets of each target object. For instance, the second number could be... The total number of text segments contained therein. Then, an intermediate coefficient can be determined based on the sum of the first quantity and the set value, and the ratio of the second quantity to the intermediate coefficient (referred to as the second ratio in this disclosure) can be calculated, thereby determining the second index value of any text segment based on the second ratio.
[0095] Among them, the second indicator value and the second ratio are positively correlated, and the value is set to a pre-set value.
[0096] As an example, if we set the value to 1, then the second index value of w_ijh can be:
[0097]
[0098] in, This represents the second indicator value. express The total number of Chinese text fragments (i.e., the second quantity), Indicates the first quantity.
[0099] In summary, determining the second indicator value based on the second quantity and the first quantity allows the second indicator value to reflect the importance of a single text fragment in the network behavior of all target objects. Therefore, determining the weight based on the second indicator value can improve the accuracy of weight calculation.
[0100] Step S207: Determine the weight of any text fragment in the text fragment set of any target object based on the first index value and the second index value.
[0101] In this embodiment of the disclosure, the weight of any of the above text fragments in the text fragment set of the above target object can be determined based on the first index value and the second index value.
[0102] The weight is positively correlated with the value of the first indicator; that is, the larger the value of the first indicator, the greater the weight, and vice versa.
[0103] The weight is negatively correlated with the value of the second indicator; that is, the larger the value of the second indicator, the smaller the weight, and vice versa.
[0104] Step S208: Determine the target text segment associated with the specified long-tail intent based on the weight of each text segment in the text segment set of at least one target object.
[0105] The explanation of step S208 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.
[0106] The method for mining text fragments associated with long-tail intents according to the present disclosure can determine a first indicator value based on the frequency of occurrence, determine a second indicator value based on a first quantity, and determine a weight based on the first indicator value and the second indicator value, so as to improve the effectiveness and rationality of weight calculation.
[0107] To clearly illustrate how the weight of a text fragment in the target object's text fragment set is determined based on the first and second index values in the above embodiments, this disclosure also proposes a method for mining text fragments associated with long-tail intentions.
[0108] Figure 3 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 3 of this disclosure.
[0109] like Figure 3 As shown, the method for mining text fragments associated with long-tail intents may include the following steps:
[0110] Step S301: Obtain network behavior text data of at least one target object; wherein the network behavior text data is associated with a specified long-tail intent.
[0111] Step S302: Segment at least one piece of text data in the network behavior text data of any target object to obtain a set of text fragments of any target object.
[0112] Step S303: Determine the number of times any text fragment appears in the text fragment set of any target object, and determine the first number of text fragment sets containing any text fragment.
[0113] Step S304: Obtain the total number of text fragments contained in the text fragment set of any target object.
[0114] Step S305: Determine the first index value of any text fragment based on the total quantity and the number of occurrences.
[0115] Step S306: Determine the second index value of any text segment based on the total quantity and the first quantity.
[0116] The explanation of steps S301 to S306 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.
[0117] Step S307: Obtain the third ratio of the first indicator value to the second indicator value.
[0118] In embodiments of this disclosure, the ratio of the first index value to the second index value (referred to as the third ratio in this disclosure) can be calculated. For example, the third ratio can be TF / IDF.
[0119] Step S308: Determine the third index value of any text segment based on the third ratio.
[0120] In this embodiment of the disclosure, a third index value for any of the aforementioned text fragments can be determined based on a third ratio, wherein the third index value and the third ratio are positively correlated. For example, the third ratio can be used as the third index value.
[0121] In summary, TF / IDF represents the statistical value of how important a text segment (such as word segmentation) is to a single target object or all target objects. A higher TF / IDF indicates greater importance of the text segment. TF / IDF can serve as an aid in finding word-level clues related to a specified long-tail intent, a situation that traditional TF-IDF values cannot address because:
[0122] For example, when TF is large and IDF is small, it indicates that the text fragment is of high importance in the network behavior of a single target object and also of high importance in the network behavior of all target objects. However, the TF-IDF (i.e. TF*IDF) calculation may result in a small value. In this case, TF-IDF cannot reflect the importance of the text fragment.
[0123] For example, when both TF and IDF are large, it indicates that the text fragment is of high importance in the network behavior of a single target object, but of low importance in the network behavior of all target objects. However, if TF-IDF (i.e., TF*IDF) is a large value, then TF-IDF cannot indicate that the text fragment is of high importance.
[0124] For example, when both TF and IDF are small, it indicates that the text fragment is less important in the network behavior of a single target object, but more important in the network behavior of all target objects. In this case, TF-IDF (i.e., TF*IDF) may be a small value, and TF-IDF cannot reflect the importance of the text fragment.
[0125] Step S309: Determine the weight of any text fragment in the text fragment set of any target object based on the first indicator value, the second indicator value, and the third indicator value.
[0126] In this embodiment of the disclosure, the weight of any text fragment in the text fragment set of any target object can be determined comprehensively based on the first index value, the second index value, and the third index value.
[0127] Among them, the weight is positively correlated with the value of the first indicator, negatively correlated with the value of the second indicator, and positively correlated with the value of the third indicator.
[0128] Step S310: Determine the target text segment associated with the specified long-tail intent based on the weight of each text segment in the text segment set of at least one target object.
[0129] The explanation of step S310 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.
[0130] The method for mining text fragments associated with long-tail intentions according to the present disclosure can comprehensively determine the weight of a text fragment based on a first indicator value, a second indicator value, and a third indicator value, thereby improving the accuracy and reliability of weight calculation and thus improving the quality of mining target text fragments (i.e., clue information) associated with a specified long-tail intention.
[0131] To clearly illustrate how the target text fragment associated with a specified long-tail intent is determined in the above embodiments, this disclosure also proposes a method for mining text fragments associated with long-tail intents.
[0132] Figure 4 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 4 of this disclosure.
[0133] like Figure 4 As shown, the method for mining text fragments associated with long-tail intents may include the following steps:
[0134] Step S401: Obtain network behavior text data of at least one target object; wherein the network behavior text data is associated with a specified long-tail intent.
[0135] Step S402: Segment at least one piece of text data in the network behavior text data of any target object to obtain a set of text fragments of any target object.
[0136] Step S403: Determine the number of times any text fragment appears in the text fragment set of any target object, and determine the first number of text fragment sets containing any text fragment.
[0137] Step S404: Determine the weight of any text fragment in the text fragment set of any target object based on the first quantity and the number of occurrences.
[0138] The explanation of steps S401 to S404 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.
[0139] Step S405: For any target object among at least one target object, determine a subset of text fragments from the text fragment set of any target object based on the weight of each text fragment in the text fragment set of the arbitrary target object.
[0140] In this embodiment of the disclosure, for any one of the at least one target object, a subset of text segments can be determined from the text segment set of the target object based on the weights of each text segment in the text segment set of the target object. The subset of text segments includes at least one text segment.
[0141] As an example, the text fragments can be sorted according to their weights in the text fragment set of the target object to obtain a sorted sequence. A set number of text fragments that are ranked first in the sorted sequence can be selected to generate a subset of text fragments.
[0142] The set quantity is a pre-defined threshold quantity, and this set quantity is marked as N.
[0143] For example, the text fragments in the set of text fragments of the target object can be sorted from largest to smallest according to their corresponding weights to obtain a sorted sequence. Then, the top N text fragments in the sorted sequence can be selected to generate a subset of text fragments, that is, the subset of text fragments includes the selected N text fragments.
[0144] As another example, the text fragments can be sorted according to their weights in the text fragment set of the target object to obtain a sorted sequence. A set proportion of the text fragments that are ranked first in the sorted sequence can be selected to generate a subset of text fragments.
[0145] The set ratio is a pre-set ratio threshold.
[0146] As another example, a subset of text fragments can be generated by selecting text fragments with weights greater than a set threshold from the text fragments in the target object's text fragment set.
[0147] The threshold value is a pre-set threshold value.
[0148] In this disclosure, for any text fragment in the set of text fragments of the target object, the weight of the text fragment can be compared with a set threshold. If the weight of the text fragment is greater than the set threshold, the text fragment can be added to the text fragment subset. If the weight of the text fragment is less than or equal to the set threshold, the text fragment does not need to be added to the text fragment subset.
[0149] Therefore, it is possible to determine the subset of text fragments corresponding to the target object according to different methods, which can improve the flexibility and applicability of the method.
[0150] Step S406: Determine the target text fragment associated with the specified long-tail intent based on the intersection of at least one subset of text fragments corresponding to the target object.
[0151] In this embodiment of the disclosure, when there is only one target object, all text fragments in the subset of text fragments corresponding to that target object can be used as target text fragments associated with the specified long-tail intent. When there are multiple target objects, the intersection of the subsets of text fragments corresponding to multiple target objects can be used as the target text fragment associated with the specified long-tail intent.
[0152] For example, suppose there are 3 target objects, namely object 1, object 2 and object 3, and suppose the text fragment subset corresponding to object 1 includes text fragment A, text fragment B and text fragment C, the text fragment subset corresponding to object 2 includes text fragment B, text fragment C and text fragment D, and the text fragment subset corresponding to object 3 includes text fragment B, text fragment C and text fragment E. Then the target text fragments associated with the specified long-tail intent can be: text fragment B and text fragment C.
[0153] The method for mining text fragments associated with long-tail intentions in this embodiment of the present disclosure determines the target text fragments associated with a specified long-tail intention by determining the intersection of the subsets of text fragments of different target objects. This can achieve the mining of text fragments that all target objects are interested in, and by taking the text fragments that all target objects are interested in as the target text fragments associated with the specified long-tail intention, the quality of mining target text fragments (i.e., clue information) associated with the specified long-tail intention can be improved.
[0154] To clearly illustrate how the target text fragment associated with a specified long-tail intent is determined in the above embodiments, this disclosure also proposes a method for mining text fragments associated with long-tail intents.
[0155] Figure 5 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 5 of this disclosure.
[0156] like Figure 5 As shown, the method for mining text fragments associated with long-tail intents may include the following steps:
[0157] Step S501: Obtain network behavior text data of at least one target object; wherein the network behavior text data is associated with a specified long-tail intent.
[0158] Step S502: Segment at least one piece of text data in the network behavior text data of any target object to obtain a set of text fragments of any target object.
[0159] Step S503: Determine the number of times any text fragment appears in the text fragment set of any target object, and determine the first number of text fragment sets containing any text fragment.
[0160] Step S404: Determine the weight of any text fragment in the text fragment set of any target object based on the first quantity and the number of occurrences.
[0161] The explanation of steps S501 to S504 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.
[0162] Step S505: Determine at least one candidate text fragment from the text fragment sets of each target object, wherein the candidate text fragment appears in the text fragment sets of at least two target objects.
[0163] In this embodiment of the disclosure, each text fragment in the text fragment set of each target object can be compared to determine at least one candidate text fragment from the text fragment set of each target object, wherein each candidate text fragment appears in the text fragment sets of at least two target objects.
[0164] Step S506: Determine the target weight of the candidate text fragment based on its weight in the text fragment set of at least two target objects.
[0165] In this embodiment of the disclosure, the target weight of each candidate text segment can be determined based on the weight of each candidate text segment in the text segment sets of at least two target objects. For example, the weights of the candidate text segment in the text segment sets of at least two target objects can be fused to obtain the target weight of the candidate text segment.
[0166] As an example, the average weight of a candidate text fragment in the text fragment sets of at least two target objects can be used as the target weight of that candidate text fragment.
[0167] As another example, the target weight of a candidate text fragment can be the sum of the weights of the candidate text fragments in the text fragment sets of at least two target objects.
[0168] As another example, the weights of the candidate text fragments in the text fragment sets of at least two target objects can be weighted and summed to obtain the target weight of the candidate text fragment.
[0169] Step S507: Based on the weights of the remaining text fragments (excluding candidate text fragments) in the text fragment set of each target object and the target weight of the candidate text fragments, determine the target text fragments associated with the specified long-tail intent from the remaining text fragments and candidate text fragments.
[0170] In this embodiment of the disclosure, a target text segment associated with a specified long-tail intent can be determined from the remaining text segments and the candidate text segments based on the weights of the remaining text segments in the text segment set of each target object, excluding the candidate text segments, and based on the target weights of the candidate text segments.
[0171] In one possible implementation of this disclosure, the target text segment is determined as follows: the remaining text segments and the candidate text segments are sorted according to the weights of the remaining text segments and the target weights of the candidate text segments to obtain a sorted sequence; a set number of text segments that are sorted first in the sorted sequence are selected as the target text segments.
[0172] The set quantity is a pre-defined threshold quantity, and this set quantity is marked as N.
[0173] For example, the remaining text fragments and candidate text fragments can be sorted from largest to smallest according to their corresponding weights or target weights to obtain a sorted sequence, and the top N text fragments in the sorted sequence can be selected as the target text fragments.
[0174] In another possible implementation of the present disclosure, the target text segment is determined as follows: the remaining text segments and the candidate text segments are sorted according to the weights of the remaining text segments and the target weights of the candidate text segments to obtain a sorted sequence, and the text segments with a set proportion of the sorted sequence are selected as the target text segments.
[0175] The set ratio is a pre-set ratio threshold.
[0176] In another possible implementation of the present disclosure, the target text segment is determined, for example, by selecting the target text segment from the remaining text segments and the candidate text segments according to the weights of the remaining text segments and the target weight of the candidate text segments, wherein the weight of the target text segment or the target weight is greater than a set threshold.
[0177] The threshold value is a pre-set threshold value.
[0178] In this disclosure, for any one of the remaining text fragments and candidate text fragments, the weight or target weight of the text fragment can be compared with a set threshold. If the weight or target weight of the text fragment is greater than the set threshold, the text fragment can be used as the target text fragment. If the weight or target weight of the text fragment is less than or equal to the set threshold, the text fragment does not need to be used as the target text fragment.
[0179] Therefore, it is possible to determine the target text fragment associated with a specified long-tail intent based on different methods, which can improve the flexibility and applicability of the method.
[0180] The method for mining text fragments associated with long-tail intentions in this embodiment of the present disclosure improves the rationality of weight calculation by fusing the weights (i.e., importance) of the same text fragments in text fragment sets of different target objects. Furthermore, by mining target text fragments associated with a specified long-tail intention from each text fragment according to the weights or target weights of each text fragment, the quality of mining target text fragments (i.e., clue information) associated with a specified long-tail intention can be improved.
[0181] To clearly illustrate how network behavior text data of at least one target object is obtained in the above embodiments, this disclosure also proposes a method for mining text fragments associated with long-tail intentions.
[0182] Figure 6 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment Six of this disclosure.
[0183] like Figure 6 As shown, the method for mining text fragments associated with long-tail intents may include the following steps:
[0184] Step S601: Obtain the specified text fragment corresponding to the specified long-tail intent.
[0185] In this embodiment of the disclosure, the text fragment is set to a text fragment (such as a keyword) that is pre-defined for a specified long-tail intent. The number of text fragments set can be one or more, and this disclosure does not limit this.
[0186] Step S602: Obtain network behavior text data of multiple candidate objects.
[0187] In this embodiment of the disclosure, the candidate object can be any user or internet user. The network behavior text data of the candidate object may or may not be associated with a specified long-tail intent, and this embodiment of the disclosure does not impose any limitations on this.
[0188] In this embodiment of the disclosure, network behavior text data of multiple candidate objects can be obtained from massive user network behavior text data. For example, multiple candidate objects can be massive users, or multiple candidate objects can be a subset of users among massive users. For instance, massive users can be filtered according to set filtering conditions (such as age, gender, occupation, etc.) to determine multiple candidate objects.
[0189] Step S603: Based on the set text fragment, determine the network behavior text data of the target object from the network behavior text data of multiple candidate objects, wherein the network behavior text data of the target object contains the set text fragment.
[0190] In this embodiment of the disclosure, the network behavior text data of multiple candidate objects can be filtered according to a set text fragment to retain the network behavior text data of the target object, wherein the retained network behavior text data of the target object includes the set text fragment.
[0191] Step S604: Segment at least one piece of text data in the network behavior text data of any target object to obtain a set of text fragments of any target object.
[0192] Step S605: Determine the number of times any text fragment appears in the text fragment set of any target object, and determine the first number of text fragment sets containing any text fragment.
[0193] Step S606: Based on the first quantity and the number of occurrences, determine the weight of any text fragment in the text fragment set of any target object, and based on the weight of each text fragment in the text fragment set of at least one target object, determine the target text fragment associated with the specified long-tail intent.
[0194] The explanation of steps S604 to S606 can be found in the relevant description in any embodiment of this disclosure, and will not be repeated here.
[0195] The method for mining text fragments associated with long-tail intentions in this disclosure can filter massive amounts of online behavior text data to retain online behavior text data of target objects that may be suspected of having specified long-tail intentions, thereby improving the efficiency of mining target text fragments (i.e. clue information) associated with specified long-tail intentions.
[0196] To clearly illustrate how network behavior text data of at least one target object is obtained in the above embodiments, this disclosure also proposes a method for mining text fragments associated with long-tail intentions.
[0197] Figure 7 This is a flowchart illustrating the method for mining text fragments associated with long-tail intentions provided in Embodiment 7 of this disclosure.
[0198] like Figure 7 As shown, the method for mining text fragments associated with long-tail intents may include the following steps:
[0199] Step S701: Obtain the identification information of at least one target object, wherein the target object is associated with a specified long-tail intent.
[0200] It should be noted that the explanation of the specified long-tail intent in the foregoing embodiments also applies to this embodiment, and will not be repeated here.
[0201] The identification information is used to uniquely identify the target object.
[0202] In this embodiment of the disclosure, the identification information of at least one target object can be obtained through relevant platforms, paths, or departments.
[0203] For example, taking the designation of a long-tail intent as illegal or criminal intent as an example, the target can be a user who has had such a long-tail intent, or a user who may have such a long-tail intent. It can cooperate with relevant departments, which can provide some of the identification information of the target users who have already been dealt with for such a long-tail intent.
[0204] Step S702: Obtain network behavior text data of at least one target object based on the identification information of at least one target object.
[0205] In this embodiment of the disclosure, network behavior text data of at least one target object can be obtained based on the identification information of at least one target object. For example, for any target object, network behavior text data matching the identification information can be determined from a large amount of network behavior text data based on the identification information of the target object, and used as the network behavior text data of the target object.
[0206] Step S703: Segment at least one piece of text data in the network behavior text data of any target object to obtain a set of text fragments of any target object.
[0207] Step S704: Determine the number of times any text fragment appears in the text fragment set of any target object, and determine the first number of text fragment sets containing any text fragment.
[0208] Step S705: Based on the first quantity and the number of occurrences, determine the weight of any text fragment in the text fragment set of any target object, and based on the weight of each text fragment in the text fragment set of at least one target object, determine the target text fragment associated with the specified long-tail intent.
[0209] The method for mining text fragments associated with long-tail intentions in this disclosure can accurately acquire or query the network behavior text data of the target object based on the target object's identification information, thereby improving the accuracy and comprehensiveness of subsequent mining of target text fragments (i.e. clue information) associated with specified long-tail intentions.
[0210] In any embodiment of this disclosure, text fragments are used as word segments, and a set of text fragments is used as a word segment set for illustrative purposes. The term frequency (TF) and individual word frequency (IDF) information of each target object can be calculated. Based on TF, IDF, and TF / IDF, the weight of each word segment is comprehensively determined. Based on the weight of each word segment, keyword clues associated with a specified long-tail intent are determined. For example, keyword clues can be determined through the following steps:
[0211] 1. To Each piece of text data in the dataset is segmented into words, such as q_ij={w_ij1,w_ij2,w_ij3,...,w_ijm};
[0212] 2. Calculate TF: For each target object p_i, summarize the word segmentation results of all text data in the network behavior text data Q_i of that target object to obtain the word segmentation set of that target object, and calculate the frequency of each word w_ijh in Q_i in the word segmentation set of that target object:
[0213]
[0214] 3. Calculate IDF:
[0215]
[0216] 4. Calculate TF / IDF;
[0217] 5. Use the values of TF, IDF, and TF / IDF to determine the importance of word segmentation and provide keyword clues.
[0218] Understandably, TF can reflect the importance of a word in the network behavior of a single target object, while IDF can reflect the importance of a word in the network behavior of all target objects.
[0219] From the perspective of the IDF (Indexed Fibonacci retrieval factor), we can identify word segments that are of interest to all target audiences. These word segments can be used as clues connecting all target audiences. Specifying long-tail intents also serves as a clue connecting all target audiences; therefore, these word segments belong to the candidate set of keyword clues for specifying long-tail intents. The smaller the IDF, the greater the importance of the word segment.
[0220] The TF / IDF metric represents the importance of a word segment to a single user or all users. A higher TF / IDF indicates greater importance of the word segment, and this metric can also serve as an aid in finding keyword clues at the word level (a situation that traditional TF-IDF values cannot address).
[0221] Based on the above method, the term frequency information of TD and IDF for each target object can be obtained, that is, the TD, IDF, and TF / IDF values of each word on each target object. The weight of each word can be calculated based on its TD, IDF, and TF / IDF values on each target object. Then, based on the weights of each word, all words in the network behavior text data of a target object are sorted, and the top N words are selected to obtain the TopN_I = {w_i1,...,wiN} word segmentation.
[0222] Performing the above operations on M target objects with specified long-tail intentions yields M top-N word segmentation sets TopN_1,...,TopN_M (referred to as text fragment subsets in this disclosure). Finding the intersection of these M subsets' word segments, which can be considered as the common focus of all target objects suspected of having specified long-tail intentions, allows us to use these intersection word segments as keyword clues corresponding to the specified long-tail intentions.
[0223] In summary, when given a subset of online behavioral text data of a group suspected of having a specific long-tail intent, word-level clues related to the specified long-tail intent can be mined from the large amount of online behavioral text data of this group, which can achieve more efficient and higher-quality mining of effective word-level clues.
[0224] With the above Figures 1 to 7 Corresponding to the method for mining text fragments associated with long-tail intentions provided in the embodiments, this disclosure also provides an apparatus for mining text fragments associated with long-tail intentions. Because the apparatus for mining text fragments associated with long-tail intentions provided in the embodiments of this disclosure is similar to the one described above... Figures 1 to 7 The method for mining text fragments associated with long-tail intentions provided in the embodiments corresponds to the implementation of the method for mining text fragments associated with long-tail intentions. Therefore, the implementation of the method for mining text fragments associated with long-tail intentions provided in the embodiments of this disclosure is also applicable to the device for mining text fragments associated with long-tail intentions provided in the embodiments of this disclosure, and will not be described in detail in the embodiments of this disclosure.
[0225] Figure 8 This is a schematic diagram of the structure of the text fragment mining device associated with long-tail intent provided in Embodiment 8 of this disclosure.
[0226] like Figure 8 As shown, the text fragment mining device 800 associated with long-tail intent may include: an acquisition module 801, a segmentation module 802, a first determination module 803, a second determination module 804, and a third determination module 805.
[0227] The acquisition module 801 is used to acquire network behavior text data of at least one target object; wherein the network behavior text data is associated with a specified long-tail intent.
[0228] The segmentation module 802 is used to segment at least one piece of text data in the network behavior text data of any target object to obtain a set of text fragments of any target object.
[0229] The first determining module 803 is used to determine the number of times any text segment appears in the text segment set of any target object, and to determine the first quantity of the text segment set containing any text segment.
[0230] The second determining module 804 is used to determine the weight of any text fragment in the text fragment set of any target object based on the first quantity and the number of occurrences.
[0231] The third determining module 805 is used to determine the target text segment associated with the specified long-tail intent based on the weight of each text segment in the text segment set of at least one target object.
[0232] In one possible implementation of this disclosure, the second determining module 804 is configured to: obtain the total number of text segments contained in the text segment set of any target object; determine a first index value of any text segment based on the total number and the number of occurrences; determine a second index value of any text segment based on the total number and the first number; and determine the weight of any text segment in the text segment set of any target object based on the first index value and the second index value.
[0233] In one possible implementation of this disclosure, the second determining module 804 is configured to: obtain a first ratio of the number of occurrences to the total number; determine a first index value for any text segment based on the first ratio; wherein the first index value is positively correlated with the first ratio.
[0234] In one possible implementation of this disclosure, the second determining module 804 is configured to: determine a second quantity based on the sum of the total number of text segments contained in the text segment set of each target object; determine an intermediate coefficient based on the sum of the first quantity and a set value; obtain a second ratio between the second quantity and the intermediate coefficient; and determine a second index value for any text segment based on the second ratio; wherein the second index value and the second ratio are positively correlated.
[0235] In one possible implementation of this disclosure, the second determining module 804 is configured to: obtain a third ratio between the first indicator value and the second indicator value; determine a third indicator value for any text segment based on the third ratio; wherein the third indicator value and the third ratio are positively correlated; and determine the weight of any text segment in the text segment set of any target object based on the first indicator value, the second indicator value, and the third indicator value.
[0236] In one possible implementation of this disclosure, the third determining module 805 is configured to: for any target object among at least one target object, determine a subset of text segments from the set of text segments of any target object based on the weights of each text segment in the set of text segments of the arbitrary target object; and determine a target text segment associated with a specified long-tail intent based on the intersection of the subsets of text segments corresponding to at least one target object.
[0237] In one possible implementation of this disclosure, the third determining module 805 is configured to: determine at least one candidate text segment from the text segment sets of each target object, wherein the candidate text segment appears in the text segment sets of at least two target objects; determine the target weight of the candidate text segment based on the weight of the candidate text segment in the text segment sets of at least two target objects; and determine the target text segment associated with the specified long-tail intent from the remaining text segments and the candidate text segments based on the weights of the remaining text segments in the text segment sets of each target object other than the candidate text segment and the target weight of the candidate text segment.
[0238] In one possible implementation of this disclosure, the third determining module 805 is configured to: sort the remaining text segments and candidate text segments according to the weights of the remaining text segments and the target weights of the candidate text segments to obtain a sorted sequence; select a set number or a set proportion of text segments that are ranked first from the sorted sequence as target text segments; or, select target text segments from the remaining text segments and candidate text segments according to the weights of the remaining text segments and the target weights of the candidate text segments, wherein the weight or target weight of the target text segment is greater than a set threshold.
[0239] In one possible implementation of this disclosure, the acquisition module 801 is configured to: acquire a set text fragment corresponding to a specified long-tail intent; acquire network behavior text data of multiple candidate objects; and determine the network behavior text data of a target object from the network behavior text data of multiple candidate objects based on the set text fragment; wherein the network behavior text data of the target object includes the set text fragment.
[0240] In one possible implementation of this disclosure, the acquisition module 801 is configured to: acquire identification information of at least one target object, wherein the target object is associated with a specified long-tail intent; and acquire network behavior text data of at least one target object based on the identification information of at least one target object.
[0241] The text fragment mining apparatus associated with long-tail intentions according to this embodiment of the present disclosure acquires network behavior text data associated with a specified long-tail intention for each target object; segments each text data in the network behavior text data of any target object to obtain a text fragment set for any target object; determines the frequency of occurrence of any text fragment in the text fragment set of any target object, and determines a first quantity of text fragment sets containing any text fragment; determines the weight of any text fragment in the text fragment set of any target object based on the first quantity and the frequency of occurrence, and determines the target text fragment associated with the specified long-tail intention based on the weight of each text fragment in the text fragment set of at least one target object. In summary, since the network behavior text data of the same target object (such as a user) is continuous and logical, by taking the target object (such as a user) as the dimension, comprehensively considering all text data belonging to the target object, determining the weight of each text fragment belonging to the target object, and thus determining the target text fragment (i.e., clue information) associated with the specified long-tail intention based on the weight of each text fragment, the accuracy of the determination result can be improved, so as to achieve efficient and high-quality mining of clue information related to the specified long-tail intention.
[0242] To implement the above embodiments, this disclosure also provides an electronic device, which may include at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method for mining text fragments associated with long-tail intentions proposed in any of the above embodiments of this disclosure.
[0243] To implement the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method for mining text fragments associated with long-tail intentions proposed in any of the above embodiments of this disclosure.
[0244] To implement the above embodiments, this disclosure also provides a computer program product, which includes a computer program that, when executed by a processor, implements the method for mining text fragments associated with long-tail intentions proposed in any of the above embodiments of this disclosure.
[0245] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0246] Figure 9 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown.
[0247] The electronic device may include the server and client components described in the above embodiments. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0248] like Figure 9 As shown, device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 902 or a computer program loaded from storage unit 909 into RAM (Random Access Memory) 903. RAM 903 can also store various programs and data required for the operation of device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. I / O (Input / Output) interface 905 is also connected to bus 904.
[0249] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0250] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, CPUs (Central Processing Units), GPUs (Graphics Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the above-described method for mining text fragments associated with long-tail intentions. For example, in some embodiments, the above-described method for mining text fragments associated with long-tail intentions can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by computing unit 901, one or more steps of the text fragment mining method associated with long-tail intentions described above can be performed. Alternatively, in other embodiments, computing unit 901 can be configured to perform the text fragment mining method associated with long-tail intentions described above by any other suitable means (e.g., by means of firmware).
[0251] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System-on-Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0252] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0253] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0254] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0255] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include LANs (Local Area Networks), WANs (Wide Area Networks), the Internet, and blockchain networks.
[0256] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers integrated with blockchain technology.
[0257] It's important to note that artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0258] According to the technical solution of this disclosure, network behavior text data associated with a specified long-tail intent corresponding to each target object is obtained; each text data in the network behavior text data of any target object is segmented to obtain a set of text fragments of any target object; the frequency of occurrence of any text fragment in the set of text fragments of any target object is determined, and a first quantity of text fragment sets containing any text fragment is determined; based on the first quantity and the frequency of occurrence, the weight of any text fragment in the set of text fragments of any target object is determined, and based on the weight of each text fragment in the set of text fragments of at least one target object, the target text fragment associated with the specified long-tail intent is determined. In summary, since the network behavior text data of the same target object (such as a user) is continuous and logical, by taking the target object (such as a user) as the dimension, comprehensively considering all text data belonging to the target object, determining the weight of each text fragment belonging to the target object, and thus determining the target text fragment (i.e., clue information) associated with the specified long-tail intent based on the weight of each text fragment, the accuracy of the determination result can be improved, so as to achieve efficient and high-quality mining of clue information related to the specified long-tail intent.
[0259] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0260] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for mining text fragments associated with long-tail intents, comprising: Obtain network behavior text data of at least one target object; wherein the network behavior text data is associated with a specified long-tail intent; At least one piece of text data in the network behavior text data of any target object is segmented to obtain a set of text fragments of the target object; Determine the number of times any text segment appears in the text segment set of any target object, and determine a first number of text segment sets containing any text segment; Based on the first quantity and the number of occurrences, the weight of any text fragment in the text fragment set of any target object is determined, and the weight is positively correlated with the number of occurrences and the first quantity. Based on the weights of each text fragment in the set of text fragments of the at least one target object, the target text fragments associated with the specified long-tail intent are determined.
2. The method according to claim 1, wherein, Determining the weight of any text fragment in the text fragment set of any target object based on the first quantity and the occurrence frequency includes: Obtain the total number of text fragments contained in the text fragment set of any target object; Based on the total quantity and the number of occurrences, a first index value is determined for any text fragment; Based on the total quantity and the first quantity, determine the second index value of any text fragment; The weight of any text fragment in the text fragment set of any target object is determined based on the first indicator value and the second indicator value.
3. The method according to claim 2, wherein, The step of determining the first index value of any text segment based on the total quantity and the number of occurrences includes: Obtain a first ratio of the number of occurrences to the total number; A first index value is determined for any text segment based on the first ratio; wherein the first index value is positively correlated with the first ratio.
4. The method according to claim 2, wherein, Determining the second index value of any text segment based on the total quantity and the first quantity includes: The second quantity is determined based on the sum of the total number of text fragments contained in the text fragment sets of each target object; The intermediate coefficient is determined based on the sum of the first quantity and the set value; Obtain the second ratio between the second quantity and the intermediate coefficient; A second index value is determined for any text segment based on the second ratio; wherein the second index value is positively correlated with the second ratio.
5. The method according to claim 2, wherein, The step of determining the weight of any text segment in the text segment set of any target object based on the first indicator value and the second indicator value includes: Obtain the third ratio between the first indicator value and the second indicator value; Based on the third ratio, a third index value is determined for any text fragment; wherein the third index value is positively correlated with the third ratio. The weight of any text fragment in the text fragment set of any target object is determined based on the first indicator value, the second indicator value, and the third indicator value.
6. The method according to any one of claims 1-5, wherein, The step of determining the target text segment associated with the specified long-tail intent based on the weight of each text segment in the text segment set of the at least one target object includes: For any target object among the at least one target object, a subset of text fragments is determined from the text fragment set of the arbitrary target object according to the weight of each text fragment in the text fragment set of the arbitrary target object; The target text segment associated with the specified long-tail intent is determined based on the intersection of the subsets of text segments corresponding to the at least one target object.
7. The method according to any one of claims 1-5, wherein, The step of determining the target text segment associated with the specified long-tail intent based on the weight of each text segment in the text segment set of the at least one target object includes: At least one candidate text segment is determined from the text segment sets of each of the target objects, wherein the candidate text segment appears in the text segment sets of at least two target objects; The target weight of the candidate text fragment is determined based on its weight in the text fragment set of the at least two target objects; Based on the weights of the remaining text fragments in the text fragment set of each target object, excluding the candidate text fragments, and the target weight of the candidate text fragments, a target text fragment associated with the specified long-tail intent is determined from the remaining text fragments and the candidate text fragments.
8. The method according to claim 7, wherein, The step of determining the target text segment associated with the specified long-tail intent from the remaining text segments and the candidate text segments in the text segment set of each target object, based on the weights of the remaining text segments excluding the candidate text segments and the target weights of the candidate text segments, includes: Based on the weights of the remaining text segments and the target weights of the candidate text segments, the remaining text segments and candidate text segments are sorted to obtain a sorted sequence; Select a set number or a set proportion of text fragments that are ranked first in the sorted sequence, and use them as the target text fragments; or, The target text segment is selected from the remaining text segments and the candidate text segments based on the weights of the remaining text segments and the target weight of the candidate text segments, wherein the weight or target weight of the target text segment is greater than a set threshold.
9. The method according to any one of claims 1-5, wherein, The acquisition of network behavior text data of at least one target object includes: Obtain the specified text fragment corresponding to the specified long-tail intent; Obtain textual data of network behavior from multiple candidate objects; Based on the defined text fragment, determine the network behavior text data of the target object from the network behavior text data of the plurality of candidate objects; The target object's network behavior text data includes the specified text fragment.
10. The method according to any one of claims 1-5, wherein, The acquisition of network behavior text data of at least one target object includes: Obtain the identification information of at least one target object; wherein the target object is associated with the specified long-tail intent; Based on the identification information of the at least one target object, obtain the network behavior text data of the at least one target object.
11. An apparatus for mining text fragments associated with long-tail intentions, comprising: An acquisition module is used to acquire network behavior text data of at least one target object; wherein the network behavior text data is associated with a specified long-tail intent; The segmentation module is used to segment at least one piece of text data in the network behavior text data of any target object to obtain a set of text fragments of the target object; The first determining module is used to determine the number of times any text segment appears in the text segment set of any target object, and to determine a first number of text segment sets containing the any text segment; The second determining module is used to determine the weight of any text fragment in the text fragment set of any target object based on the first quantity and the number of occurrences, wherein the weight is positively correlated with the number of occurrences and the first quantity; The third determining module is used to determine the target text segment associated with the specified long-tail intent based on the weight of each text segment in the text segment set of the at least one target object.
12. The apparatus according to claim 11, wherein, The second determining module is used for: Obtain the total number of text fragments contained in the text fragment set of any target object; Based on the total quantity and the number of occurrences, a first index value is determined for any text fragment; Based on the total quantity and the first quantity, determine the second index value of any text fragment; The weight of any text fragment in the text fragment set of any target object is determined based on the first indicator value and the second indicator value.
13. The apparatus according to claim 12, wherein, The second determining module is used for: Obtain a first ratio of the number of occurrences to the total number; A first index value is determined for any text segment based on the first ratio; wherein the first index value is positively correlated with the first ratio.
14. The apparatus according to claim 12, wherein, The second determining module is used for: The second quantity is determined based on the sum of the total number of text fragments contained in the text fragment sets of each target object; The intermediate coefficient is determined based on the sum of the first quantity and the set value; Obtain the second ratio between the second quantity and the intermediate coefficient; A second index value is determined for any text segment based on the second ratio; wherein the second index value is positively correlated with the second ratio.
15. The apparatus according to claim 12, wherein, The second determining module is used for: Obtain the third ratio between the first indicator value and the second indicator value; Based on the third ratio, a third index value is determined for any text fragment; wherein the third index value is positively correlated with the third ratio. The weight of any text fragment in the text fragment set of any target object is determined based on the first indicator value, the second indicator value, and the third indicator value.
16. The apparatus according to any one of claims 11-15, wherein, The third determining module is used for: For any target object among the at least one target object, a subset of text fragments is determined from the text fragment set of the arbitrary target object according to the weight of each text fragment in the text fragment set of the arbitrary target object; The target text segment associated with the specified long-tail intent is determined based on the intersection of the subsets of text segments corresponding to the at least one target object.
17. The apparatus according to any one of claims 11-15, wherein, The third determining module is used for: At least one candidate text segment is determined from the text segment sets of each of the target objects, wherein the candidate text segment appears in the text segment sets of at least two target objects; The target weight of the candidate text fragment is determined based on its weight in the text fragment set of the at least two target objects; Based on the weights of the remaining text fragments in the text fragment set of each target object, excluding the candidate text fragments, and the target weight of the candidate text fragments, a target text fragment associated with the specified long-tail intent is determined from the remaining text fragments and the candidate text fragments.
18. The apparatus according to claim 17, wherein, The third determining module is used for: Based on the weights of the remaining text segments and the target weights of the candidate text segments, the remaining text segments and candidate text segments are sorted to obtain a sorted sequence; Select a set number or a set proportion of text fragments that are ranked first in the sorted sequence, and use them as the target text fragments; or, The target text segment is selected from the remaining text segments and the candidate text segments based on the weights of the remaining text segments and the target weight of the candidate text segments, wherein the weight or target weight of the target text segment is greater than a set threshold.
19. The apparatus according to any one of claims 11-15, wherein, The acquisition module is used for: Obtain the specified text fragment corresponding to the specified long-tail intent; Obtain textual data of network behavior from multiple candidate objects; Based on the defined text fragment, determine the network behavior text data of the target object from the network behavior text data of the plurality of candidate objects; The target object's network behavior text data includes the specified text fragment.
20. The apparatus according to any one of claims 11-15, wherein, The acquisition module is used for: Obtain the identification information of at least one target object, wherein the target object is associated with the specified long-tail intent; Based on the identification information of the at least one target object, obtain the network behavior text data of the at least one target object.
21. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method for mining text fragments associated with long-tail intent as described in any one of claims 1-10.
22. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method for mining text fragments associated with long-tail intentions according to any one of claims 1-10.
23. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method for mining text fragments associated with long-tail intentions according to any one of claims 1-10.