Knowledge tag recommendation method and device, electronic equipment and storage medium
By constructing first and second tag lists associated with knowledge tags, identifying and recommending differentiated tags, the problem of users having difficulty accurately selecting tags in the knowledge base is solved, thus improving retrieval efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2026-04-07
AI Technical Summary
Users often struggle to accurately select the tag that best matches their needs from a large number of knowledge tags in the knowledge base, resulting in low retrieval efficiency.
By constructing a first tag list corresponding to each knowledge tag, including the first knowledge tag and its associated second knowledge tag, a second tag list is constructed to identify differential knowledge tags, and tags are recommended based on the differential knowledge tags.
It improves the accuracy and efficiency of knowledge tag filtering, helping users quickly locate the knowledge data they need.
Smart Images

Figure CN116127154B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of Internet, and in particular, to a knowledge label recommendation method and device, an electronic device, and a storage medium. BACKGROUND
[0002] With the rapid development of Internet technology, the number of business-related knowledge gradually becomes large, and the information in the knowledge base becomes more and more complex. When a user searches for knowledge with a target, the user often cannot directly hit the search results required. At this time, in order to further narrow the scope in the search results, the user usually filters the search results according to the knowledge labels.
[0003] In the related art, the user needs to select the label closest to the required content from a large number of knowledge labels corresponding to the search results, which is low in efficiency and difficult to accurately hit the knowledge label required by the user. SUMMARY
[0004] Therefore, the present disclosure provides a knowledge label recommendation method and device, an electronic device, and a storage medium.
[0005] In a first aspect, a knowledge label recommendation method is provided, including: in response to a search instruction for a knowledge base, obtaining a plurality of first knowledge labels corresponding to search results; for each of the plurality of first knowledge labels, constructing a first label list corresponding to the first knowledge label, the first label list including the first knowledge label and a second knowledge label associated with the first knowledge label; constructing a second label list, the second label list including knowledge labels that are different between the first label lists corresponding to the plurality of first knowledge labels respectively; and obtaining a recommended knowledge label corresponding to the search results according to the second label list.
[0006] In a second aspect, a knowledge label recommendation device is provided, including: an obtaining module configured to, in response to a search instruction for a knowledge base, obtain a plurality of first knowledge labels corresponding to search results; a first constructing module configured to, for each of the plurality of first knowledge labels, construct a first label list corresponding to the first knowledge label, the first label list including the first knowledge label and a second knowledge label associated with the first knowledge label; a second constructing module configured to construct a second label list, the second label list including knowledge labels that are different between the first label lists corresponding to the plurality of first knowledge labels respectively; and a recommendation module configured to obtain a recommended knowledge label corresponding to the search results according to the second label list.
[0007] In a third aspect, an electronic device is provided, including: a processor; and a memory configured to store executable instructions of the processor; wherein the processor is configured to execute the method of the first aspect by executing the executable instructions.
[0008] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the method of the first aspect.
[0009] The knowledge tag recommendation method provided by the embodiments of the present disclosure can obtain the knowledge tags with differences in the plurality of first tag lists by combining each first knowledge tag corresponding to the search result and the second knowledge tag associated therewith, comparing the differences between the plurality of first tag lists, and obtaining the recommended knowledge tags according to the knowledge tags with differences. The embodiments of the present disclosure can accurately obtain the knowledge tags with differences corresponding to the search result, and provide the knowledge tags with differences as recommended tags for the user to filter the search result, thereby helping the user to accurately search for the required knowledge data from the knowledge base, optimizing the filtering process of the search result, and improving the search efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 A system architecture schematic diagram of a tag recommendation method in the embodiments of the present disclosure is shown.
[0011] Figure 2 A flowchart of a tag recommendation method in the embodiments of the present disclosure is shown.
[0012] Figure 3 A relationship diagram of knowledge data and knowledge tags in the embodiments of the present disclosure is shown.
[0013] Figure 4 A diagram showing the sub-labels and parent link tags in the tag tree in the embodiments of the present disclosure is shown.
[0014] Figure 5 A flowchart of a first tag list construction method in the embodiments of the present disclosure is shown.
[0015] Figure 6 A flowchart of a second tag list construction method in the embodiments of the present disclosure is shown.
[0016] Figure 7 A flowchart of a tag tree construction method in the embodiments of the present disclosure is shown.
[0017] Figure 8 A structure schematic diagram of a tag recommendation device in the embodiments of the present disclosure is shown.
[0018] Figure 9 A structure schematic diagram of an electronic device in the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0019] Example implementations are now described with reference to the drawings. Example implementations can, however, be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these implementations are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example implementations to those skilled in the art. The described features, structures, or characteristics can be combined in one or more implementations.
[0020] In addition, the accompanying drawings are included to provide a thorough understanding of the present disclosure and are not intended to be exhaustive or to limit the present disclosure to the precise outlines described herein. The same or similar components have the same or similar reference numbers in the drawings, and thus repeated description thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities, which do not necessarily have to correspond to physically or logically independent entities. These functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0021] With the development of Internet technology, it is an urgent need for users to accurately and quickly obtain knowledge data from a huge knowledge base. In order to shorten the retrieval time of the user for the knowledge data, the knowledge data in the knowledge base is usually marked with a knowledge label, which is used to distinguish different knowledge applications in different problem scenarios. In the related technology, although there are knowledge labels in the knowledge base, the user needs to select the label closest to the required content from a large number of knowledge labels corresponding to the retrieval result, which is low in efficiency and difficult to accurately hit the knowledge label needed by the user.
[0022] The scheme provided by the present disclosure can obtain a plurality of first knowledge labels corresponding to the retrieval result in response to a retrieval instruction for the knowledge base. For each of the plurality of first knowledge labels, a first label list corresponding to the first knowledge label is constructed, and the first label list includes the first knowledge label and a second knowledge label associated with the first knowledge label. A second label list is constructed, and the second label list includes knowledge labels that are different between the first label lists corresponding to the plurality of first knowledge labels respectively. According to the second label list, a recommended knowledge label corresponding to the retrieval result is obtained. The embodiments of the present disclosure enable the user to accurately obtain the knowledge labels that are different between a plurality of knowledge data when performing knowledge label screening, thereby improving the efficiency and accuracy of the user's screening.
[0023] It should be understood that the device for performing the label recommendation method in the embodiments of the present disclosure can be referred to as a label recommendation device, which is a device for automatically comparing and discovering related labels. It can be a piece of code logic running inside a computer server.
[0024] Specifically, please refer to Figure 1 , Figure 1An exemplary system architecture diagram of a label recommendation method or a label recommendation device applied to the embodiments of the present disclosure is shown. As shown in Figure 1 The system architecture 100 includes a processor 101 and a memory 102.
[0025] The processor 101 is configured to execute program instructions, for example, to execute the label recommendation method provided by the present disclosure. The memory 102 in the system architecture 100 can exist in different forms of program storage units or data storage units, such as hard disks, read-only memories (ROMs), random access memories (RAMs), which can be used to store various data files used in the process of processing and / or executing the label recommendation method by the processor, and possible program instructions executed by the processor. Although not shown in the figure, the system architecture 100 can also include an input / output component to support the input / output data flow between the label recommendation device applying the system architecture 100 and its downstream equipment. In addition, the label recommendation device applying the system architecture 100 can also send and receive information and data from the network through the communication port.
[0026] Although in Figure 1 the processor 101 and the memory 102 are shown as separate modules, those skilled in the art can understand that the above device modules can be implemented as separate hardware devices, or integrated into one or more hardware devices, such as integrated into a smart watch or other smart device. As long as the principles described in the present disclosure can be implemented, the specific implementation of different hardware devices should not be considered as a limitation on the protection scope of the present disclosure.
[0027] The present exemplary embodiment will be described in detail below with reference to the accompanying drawings and embodiments.
[0028] First, a knowledge label recommendation method is provided in the embodiments of the present disclosure, which can be executed by any electronic device with computing processing capability.
[0029] Figure 2 A flowchart of a knowledge label recommendation method in the embodiments of the present disclosure is shown. As shown in Figure 2 The knowledge label recommendation method provided in the embodiments of the present disclosure includes the following steps.
[0030] S201, in response to a retrieval instruction for a knowledge base, a plurality of first knowledge labels corresponding to the retrieval result are obtained.
[0031] It should be noted that the knowledge base can be a structured and operable knowledge cluster, that is, a set of interrelated knowledge data stored, organized, managed and used in a computer memory by using a number of knowledge representation methods to solve problems in a certain field. These knowledge data include theoretical knowledge, factual data, heuristic knowledge obtained from expert experience, and the like related to the field. In order to facilitate user review and retrieval, the knowledge data in the knowledge base is usually pre-labeled by one or more knowledge tags.
[0032] In some embodiments, the knowledge tags in the knowledge base can be associated in a tree structure. That is, each knowledge tag in the knowledge base has at least one parent tag and / or at least one subordinate tag.
[0033] It should be noted that the user can obtain a plurality of knowledge data in the knowledge base by targeted retrieval in the knowledge base. The knowledge tags corresponding to each of these knowledge data are the first knowledge tags.
[0034] Figure 3 The relationship between the knowledge data and the knowledge tags in the embodiments of the present disclosure is shown in the schematic diagram. As shown in Figure 3 , one knowledge data can correspond to a plurality of knowledge tags, and different knowledge data can correspond to the same knowledge tag. For example, knowledge data 1 can correspond to knowledge tag 1 and knowledge tag 2, and knowledge data 2 can also correspond to knowledge tag 1 and knowledge tag 2, and the like, which will not be listed one by one here.
[0035] Exemplarily, since there can be a one-to-many relationship between the knowledge data and the knowledge tags. Therefore, in the case that a knowledge data has a plurality of knowledge tags, the first knowledge tag can be a set of the plurality of knowledge tags.
[0036] It should be understood that the first knowledge tag in the embodiments of the present disclosure is not used to limit the number of tags, that is, the first knowledge tag can be one knowledge tag or a plurality of knowledge tags. That is, the plurality of first knowledge tags corresponding to the retrieval results in the embodiments of the present disclosure can be the first knowledge tags corresponding to the plurality of knowledge data retrieved, and the first knowledge tag can be one knowledge tag corresponding to one knowledge data or a plurality of knowledge tags corresponding to one knowledge data.
[0037] S202, for each of the plurality of first knowledge tags, a first tag list corresponding to the first knowledge tag is constructed.
[0038] It should be noted that the first tag list can be a tag list composed of the first knowledge tag and the second knowledge tag associated with the first knowledge tag.
[0039] In some embodiments, the first label list can be constructed in the following manner: for each first knowledge label in the plurality of first knowledge labels, a label tree in which the first knowledge label is located is obtained. Then, each knowledge label in the label tree is traversed to determine a second knowledge label associated with the first knowledge label. According to the second knowledge label, a first label list corresponding to the first knowledge label is constructed. The second knowledge label can be a parent label of the first knowledge label in the label tree, or a subordinate label of the first knowledge label in the label tree.
[0040] The embodiments of the present disclosure determine other knowledge labels associated with a knowledge label through a label tree in which the knowledge label is located, thereby avoiding omission of other knowledge labels and enriching the result of recommended labels.
[0041] In some embodiments, the second knowledge label in the embodiments of the present disclosure can be a subordinate label of the first knowledge label in the label data, and / or a parent link label of the first knowledge label in the label tree. Specifically, the subordinate label can be all child node labels of the first knowledge label in the label tree. The parent link label can be a parent label of the first knowledge label, a parent label of the parent label, and so on, until the root node is reached, i.e., all knowledge labels (including the root node label) on the path from the first knowledge label to the root node label in the label tree.
[0042] Exemplarily, Figure 4 A diagram showing subordinate labels and parent link labels in a label tree is shown. In Figure 4 , the parent link labels of knowledge label B1 include knowledge label A and the root node label, and the subordinate labels of knowledge label B1 include knowledge label C1 and knowledge label C2. The parent link labels of knowledge label B2 also include knowledge label A and the root node label, and knowledge label B2 has no subordinate label.
[0043] For ease of understanding, the construction method of the first label list in the embodiments of the present disclosure will be described in detail below. Figure 5 As shown in Figure 5 , the method includes the following steps.
[0044] S501, a label tree in which a first knowledge label is located is obtained.
[0045] S502, knowledge labels in the label tree are traversed.
[0046] S503, it is determined whether the traversed knowledge label belongs to a parent link label of the first knowledge label, and if so, S504 is executed.
[0047] It should be noted that the identification set of the parent link label of the first knowledge label can be obtained in advance according to the label path of the first knowledge label. If the identification of the knowledge label traversed exists in the identification set, the knowledge label traversed is the parent link label of the first knowledge label.
[0048] S504, the parent link label of the first knowledge label is obtained.
[0049] It should be noted that the parent link label obtained is the knowledge label currently traversed.
[0050] S505, it is judged whether the ID of the knowledge label traversed is the same as the ID of the first knowledge label, if yes, S506 is executed.
[0051] S506, according to the position of the knowledge label traversed in the label tree, the subordinate label of the first knowledge label is determined.
[0052] It should be noted that after the position of the knowledge label traversed in the label tree is determined, the label associated with the knowledge label is found downwards, that is, the subordinate label of the first knowledge label.
[0053] S507, the parent link label and the subordinate label obtained are added to the first label list.
[0054] The embodiment of the present disclosure considers the subordinate label and the parent link label of the knowledge label at the same time before comparing the knowledge labels, which can enrich the difference knowledge label results compared subsequently, provide more optional labels for the user when filtering the search results, and thus refine the search results, so as to accurately hit the required knowledge data of the user.
[0055] S203, the second label list is constructed.
[0056] It should be noted that the second label list includes the knowledge labels different from the first label lists corresponding to the plurality of first knowledge labels respectively. That is, the knowledge labels in the second label list can be in any first label list, and do not exist in the knowledge labels of all first label lists at the same time. For example, it is assumed that the first label lists corresponding to three first knowledge labels are {label A, label B, label C}, {label A, label B, label D}, and {label A, label C, label D} respectively. Since only label A exists in each first label list, the knowledge labels different between the above three first label lists are {label B, label C, and label D}.
[0057] In some application scenarios, the specified knowledge tags can be excluded in advance in the construction of the second tag list according to the retrieval requirements of the user, and the embodiments of the present disclosure do not limit this. For example, after obtaining the second tag list {tag B, tag C, tag D} in the above example, if it is determined that the retrieval result of the user is irrelevant to tag B, tag B can be excluded from {tag B, tag C, tag D}, that is, {tag C, tag D} is taken as the second tag list.
[0058] It should be understood that, since the same knowledge tags between the respective first tag lists (i.e., the knowledge tags existing in the respective first tag lists at the same time) have no filtering effect on the retrieval result, the core idea of the embodiments of the present disclosure is to exclude the same knowledge tags between the respective first tag lists, and the processing manner of the remaining knowledge tags is not limited.
[0059] In some embodiments, by constructing the first tag set and the second tag set, the above-mentioned knowledge tags with differences can be quickly compared and obtained, thereby completing the construction of the second tag list, and the knowledge tags with differences are taken as recommended tags for the user to filter the retrieval result, helping the user to accurately retrieve the required knowledge data from the knowledge base.
[0060] Specifically, the first tag set contains the same knowledge tags in the first tag list corresponding to the plurality of first knowledge tags respectively, and the second tag set contains all the knowledge tags in the first tag list corresponding to the plurality of first knowledge tags respectively. That is, the first tag set is the intersection of the plurality of first tag lists, and the second tag set is the union of the plurality of first tag lists.
[0061] At this time, if the first tag set is a non-empty set, the difference set between the second tag set and the first tag set (i.e., the result set obtained by subtracting between the second tag set and the first tag set), that is, the second tag list. If the first tag set is an empty set, the second tag set is the second tag list.
[0062] For ease of understanding, the following will be combined with Figure 6 The construction method of the second tag list in the embodiments of the present disclosure will be described in detail. As shown in the figure, Figure 6 The method comprises the following steps.
[0063] S601, taking the intersection of the plurality of first tag lists as the first tag set.
[0064] S602, taking the union of the plurality of first tag lists as the second tag set.
[0065] S603, judging whether the first tag set is an empty set, if yes, executing S604; if no, executing S605.
[0066] S604, taking the second label set as a second label list.
[0067] S605, taking a difference set between the second label set and the first label set as the second label list.
[0068] Exemplarily, assuming two first knowledge labels {securities} and {funds}, the first label lists corresponding to the two first knowledge labels respectively can be {securities, risk control, financial services} and {funds, risk control, financial services}. At this time, by comparing the two first label lists, it can be known that the first label set is the same label (intersection) in the two first label lists, that is, {risk control, financial services}; the second label set is all labels (union) in the two first label lists, that is, {securities, funds, risk control, financial services}. At this time, the difference set {securities, funds} between the second label set and the first label set is the second label list.
[0069] Similarly, assuming two first knowledge labels {securities} and {pension}, the first label lists corresponding to the two first knowledge labels respectively can be {securities, risk control, financial services} and {pension, asset management}. At this time, by comparing the two first label lists, it can be known that there is no same label in the two first label lists, that is, the first label set is empty set, and the second label set {securities, risk control, financial services, pension, asset management} is the second label list.
[0070] S204, obtaining a recommended knowledge label corresponding to the search result according to the second label list.
[0071] It should be noted that the recommended knowledge label is a knowledge label that can accurately divide the search result of the user and is used to show the user. The user can filter the search result according to the recommended knowledge label, so as to accurately hit the knowledge data required by the user in the knowledge base.
[0072] In some embodiments, the recommended knowledge label can be obtained by constructing a third label list. Specifically, the third label list includes all knowledge labels in the second label list and parent link labels of all knowledge labels in the second label list in the respective label trees. By analyzing the knowledge labels contained in the third label list, the recommended knowledge label corresponding to the search result can be obtained.
[0073] When the embodiments of the present disclosure show the knowledge labels with differences to the user, the parent link labels of the knowledge labels are considered at the same time, so that the user can fully understand the association between the different knowledge labels, and the user can confirm the knowledge label with the highest relevance to the search result.
[0074] In some embodiments, in order to intuitively present the relationship between the plurality of recommended knowledge tags to the user, so that the user can quickly and accurately locate the knowledge tags closely related to the retrieved content from the plurality of recommended knowledge tags. The recommended knowledge tags can be presented to the user in the form of a tag tree.
[0075] Exemplarily, according to the tag tree to which each knowledge tag in the third tag list belongs, all the knowledge tags in the third tag list are grouped to obtain a plurality of knowledge tag groups. Specifically, the knowledge tags in each knowledge tag group belong to the same tag tree. Wherein, the tag tree to which the knowledge tag belongs can be determined by the root node identifier (ROOT ID) of the knowledge tag, that is, the knowledge tags with the same root node identifier belong to the same tag tree.
[0076] After the plurality of knowledge tag groups are divided, the recommended tags can be displayed to the user in the form of a tag tree by reorganizing the knowledge tags in each knowledge tag group into a new tag tree, so that the user obtains the recommended tags corresponding to the retrieval results.
[0077] In some embodiments, based on the plurality of knowledge tag groups, the recommended tag tree can be constructed in the following manner: for each knowledge tag group in the plurality of knowledge tag groups, the association relationship between the knowledge tags in the knowledge tag group can be determined according to the parent tags of the knowledge tags in the knowledge tag group. According to the association relationship between the knowledge tags in the knowledge tag group, the recommended tag tree can be constructed. It should be noted that the final number of recommended tag trees is consistent with the number of knowledge tag groups, that is, each knowledge tag group can be constructed into an independent recommended tag tree.
[0078] Exemplarily, by the parent tags of the knowledge tags in each knowledge tag group, the association relationship between the knowledge tags can be analyzed, that is, a new tag tree can be formed by the knowledge tags in each knowledge tag group. Wherein, the association relationship between the knowledge tags can show the relationship between the knowledge tags in the same tag tree. For example, if the parent tags of the plurality of knowledge tags are the same, these knowledge tags can be regarded as sibling tags and are connected to the same parent tag in the tag tree, and if the parent tag of a knowledge tag is another knowledge tag, there is a superior-subordinate relationship between the two knowledge tags.
[0079] In some embodiments, after the first tag list, the second tag list and the third tag list are constructed, the duplicate tags in the above-mentioned tag lists can be first removed to prevent duplicate and redundant knowledge tags in the later use of the above-mentioned tag lists.
[0080] For the sake of understanding, the following will combine Figure 7 The construction method of the tag tree in the embodiments of the present disclosure will be described in detail. As shown in FIG. 1, the construction method of the tag tree in the embodiments of the present disclosure includes the following steps. Figure 7As shown, the method comprises the following steps.
[0081] S701, traversing the knowledge tags in the knowledge tag group.
[0082] In some embodiments, before traversing the knowledge tag group, a map type data collection with knowledge tag ID as key (key) and knowledge tag as value (value) can be constructed in advance according to the knowledge tags in the knowledge tag group, i.e. map (ID, knowledge tag), so as to form a tree structure of the recommended tag tree.
[0083] S702, obtaining the parent tag ID of the currently traversed knowledge tag.
[0084] In some embodiments, since the parent tag ID is an inherent attribute of the knowledge tag, the parent tag ID of the currently traversed knowledge tag can be obtained from the knowledge tag group.
[0085] S703, judging whether the parent tag ID is empty, if yes, executing S704; if no, executing S705.
[0086] S704, taking the currently traversed knowledge tag as the root node of the recommended tag tree, and then repeatedly executing the above S701-S703.
[0087] S705, obtaining the parent tag of the current node according to the parent tag ID.
[0088] In some embodiments, the knowledge tag corresponding to the parent tag ID can be obtained from the pre-constructed map type data collection according to the parent tag ID.
[0089] S706, adding the currently traversed knowledge tag under its parent tag, and then repeatedly executing the above S701-S703.
[0090] In some embodiments, the map type data corresponding to the currently traversed knowledge tag can be added to the map type data corresponding to its parent tag in the pre-constructed map type data collection, so as to form a tree structure.
[0091] S707, after the traversal of all knowledge tags in the knowledge tag group is completed, the recommended tag tree corresponding to the knowledge tag group is constructed.
[0092] The knowledge tag recommendation method provided in the embodiments of the present disclosure can obtain a plurality of first tag lists by combining each first knowledge tag corresponding to the search result and the second knowledge tag associated therewith, then compare the differences between the plurality of first tag lists, and obtain the knowledge tags with differences in the plurality of first tag lists, and then obtain the recommended knowledge tags according to the knowledge tags with differences. The embodiments of the present disclosure can accurately obtain the knowledge tags with differences corresponding to the search result, and provide the knowledge tags with differences as recommended tags for the user to filter the search result, thereby helping the user to accurately retrieve the required knowledge data from the knowledge base, optimizing the filtering process of the search result, and improving the search efficiency.
[0093] In some embodiments, taking the consumer finance field as an example, the user can retrieve business-related knowledge in the business knowledge base. For example, when the user retrieves "how to improve the limit", the search result can include knowledge items such as "what are the conditions for improving the loan limit" (knowledge tag "loan limit change"), "how to modify the cash withdrawal amount" (knowledge tag "cash withdrawal limit change"), "how to query the cash withdrawal limit" (knowledge tag "cash withdrawal limit query"), and the like. The embodiments of the present disclosure will not be repeated one by one here. Taking the above three knowledge items as an example, assuming that the parent tags of "cash withdrawal limit change" and "cash withdrawal limit query" are both "cash withdrawal", and the parent tag of "loan limit change" is "loan". In the search result of the knowledge, the above different tags will be recommended to the user, so that the user can quickly filter and locate the knowledge item expected by the user.
[0094] Due to the knowledge tag recommendation method provided in the embodiments of the present disclosure, the associated tags of each knowledge tag are considered. Therefore, in the above example, the user can directly locate the business the user wants through the recommended knowledge tags "cash withdrawal" and "loan", i.e., the parent tags of the knowledge tags, for example, to locate the cash withdrawal business through "cash withdrawal". If the search result is still too many at this time and is inconvenient to view, the user can further filter the result according to the next level knowledge tags, such as "cash withdrawal limit change" and "cash withdrawal limit query" in the above example. Accordingly, the embodiments of the present disclosure can improve the search efficiency of the user for business knowledge and enhance the user experience.
[0095] Figure 8 A structure schematic diagram of a tag recommendation device in the embodiments of the present disclosure is shown, as shown in FIG. 8, the tag recommendation device 800 includes an acquisition module 801, a first construction module 802, a second construction module 803, and a recommendation module 804. Figure 8
[0096] Specifically, the acquisition module 801 is configured to acquire a plurality of first knowledge tags corresponding to a search result in response to a search instruction for a knowledge base. The first construction module 802 is configured to, for each of the plurality of first knowledge tags, construct a first tag list corresponding to the first knowledge tag, the first tag list including the first knowledge tag and a second knowledge tag associated with the first knowledge tag. The second construction module 803 is configured to construct a second tag list including knowledge tags that are different between the first tag lists corresponding to the plurality of first knowledge tags respectively. The recommendation module 804 is configured to obtain a recommended knowledge tag corresponding to the search result according to the second tag list.
[0097] In some embodiments, the first construction module 802 is further configured to, for each of the plurality of first knowledge tags, acquire a tag tree in which the first knowledge tag is located; traverse each knowledge tag in the tag tree to determine the second knowledge tag associated with the first knowledge tag; and construct the first tag list corresponding to the first knowledge tag according to the second knowledge tag.
[0098] In some embodiments, the second knowledge tag associated with the first knowledge tag includes a lower-level tag of the first knowledge tag in the tag tree and / or a parent link tag of the first knowledge tag in the tag tree.
[0099] In some embodiments, the second construction module 803 is further configured to respectively construct a first tag set and a second tag set, the first tag set containing the same knowledge tags in the first tag lists corresponding to the plurality of first knowledge tags respectively, and the second tag set containing all the knowledge tags in the first tag lists corresponding to the plurality of first knowledge tags respectively; and if the first tag set is a non-empty set, taking a difference set between the second tag set and the first tag set as the second tag list.
[0100] In some embodiments, the second construction module 803 is further configured to, if the first tag set is an empty set, take the second tag set as the second tag list.
[0101] In some embodiments, the recommendation module 804 is further configured to construct a third tag list including all the knowledge tags in the second tag list and parent link tags of all the knowledge tags in the second tag list in respective tag trees; and obtain a recommended tag corresponding to the search result according to the third tag list.
[0102] In some embodiments, the recommendation module 804 is further configured to group all the knowledge tags in the third tag list according to the tag trees to which the knowledge tags belong, to obtain a plurality of knowledge tag groups; and construct a recommended tag tree based on the plurality of knowledge tag groups, to obtain the recommended tag corresponding to the search result.
[0103] In some embodiments, the recommendation module 804 is further configured to, for each of the multiple knowledge tag groups, determine the association relationship of each knowledge tag in the knowledge tag group based on the parent tag of each knowledge tag in the knowledge tag group; and construct a recommendation tag tree based on the association relationship of each knowledge tag in the knowledge tag group.
[0104] It should be noted that the label recommendation device provided in the above embodiments is only illustrated by the division of the above functional modules when used for label recommendation. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the label recommendation device and the label recommendation method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0105] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0106] The following reference Figure 9 To describe an electronic device 900 according to such an embodiment of the present disclosure. Figure 9 The electronic device 900 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0107] like Figure 9 As shown, the electronic device 900 is manifested in the form of a general-purpose computing device. The components of the electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, and a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910).
[0108] The storage unit stores program code, which can be executed by the processing unit 910, causing the processing unit 910 to perform the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of this disclosure.
[0109] In some embodiments, the processing unit 910 may perform the following steps of the above-described text processing method embodiment: in response to a retrieval instruction for a knowledge base, obtaining a plurality of first knowledge tags corresponding to the retrieval result; for each of the plurality of first knowledge tags, constructing a first tag list corresponding to the first knowledge tag, the first tag list including the first knowledge tag and second knowledge tags associated with the first knowledge tag; constructing a second tag list, the second tag list including knowledge tags that differ from the first tag lists corresponding to the plurality of first knowledge tags respectively; and obtaining recommended knowledge tags corresponding to the retrieval result based on the second tag list.
[0110] Storage unit 920 may include readable media in the form of volatile storage units, such as random access memory (RAM) 9201 and / or cache memory 9202, and may further include read-only memory (ROM) 9203.
[0111] Storage unit 920 may also include a program / utility 9204 having a set (at least one) program module 9205, such program module 9205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0112] Bus 930 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0113] Electronic device 900 can also communicate with one or more external devices 940 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 900, and / or with any device that enables electronic device 900 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 950. Furthermore, electronic device 900 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 960. As shown, network adapter 960 communicates with other modules of electronic device 900 via bus 930. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0114] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0115] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the methods described above is stored thereon. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code, which, when run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.
[0116] More specific examples of computer-readable storage media in this disclosure may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0117] In this disclosure, a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device.
[0118] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0119] In practical implementation, program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0120] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0121] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0122] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0123] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.
Claims
1. A knowledge tag recommendation method, characterized in that, include: In response to a search command for the knowledge base, retrieve multiple primary knowledge tags corresponding to the search results; For each of the plurality of first knowledge tags, a first tag list corresponding to the first knowledge tag is constructed. The first tag list includes the first knowledge tag and a second knowledge tag associated with the first knowledge tag. Construct a second tag list, which includes knowledge tags that differ from the first tag lists corresponding to the plurality of first knowledge tags; Based on the second tag list, recommended knowledge tags corresponding to the search results are obtained.
2. The method according to claim 1, characterized in that, The step of constructing a first tag list corresponding to each of the plurality of first knowledge tags includes: For each of the plurality of first knowledge tags, obtain the tag tree in which the first knowledge tag is located; Traverse each knowledge tag in the tag tree to determine the second knowledge tag associated with the first knowledge tag; Based on the second knowledge tag, construct a first tag list corresponding to the first knowledge tag.
3. The method according to claim 2, characterized in that, The second knowledge tag associated with the first knowledge tag includes: a lower-level tag of the first knowledge tag in the tag tree, and / or, a parent link tag of the first knowledge tag in the tag tree.
4. The method according to any one of claims 1 to 3, characterized in that, The construction of the second tag list includes: A first tag set and a second tag set are constructed respectively. The first tag set contains the same knowledge tags as those in the first tag lists corresponding to the plurality of first knowledge tags respectively. The second tag set contains all the knowledge tags in the first tag lists corresponding to the plurality of first knowledge tags respectively. If the first tag set is not empty, then the difference between the second tag set and the first tag set is used as the second tag list.
5. The method according to claim 4, characterized in that, After constructing the first tag set and the second tag set respectively, the process further includes: If the first tag set is empty, then the second tag set is used as the second tag list.
6. The method according to any one of claims 1 to 3, characterized in that, The step of obtaining recommended tags corresponding to the search results based on the second tag list includes: Construct a third tag list, which includes all knowledge tags in the second tag list and the parent link tags of all knowledge tags in the second tag list in their respective tag trees; Based on the third tag list, recommended tags corresponding to the search results are obtained.
7. The method according to claim 6, characterized in that, The step of obtaining recommended tags corresponding to the search results based on the third tag list includes: Based on the tag tree to which the knowledge tags belong, all knowledge tags in the third tag list are grouped to obtain multiple knowledge tag groups; Based on the multiple knowledge tag groups, a recommendation tag tree is constructed to obtain the recommendation tags corresponding to the search results.
8. The method according to claim 7, characterized in that, The construction of a recommendation tag tree based on the multiple knowledge tag groups includes: For each of the multiple knowledge tag groups, the association relationship between each knowledge tag in the knowledge tag group is determined based on the parent tag of each knowledge tag in the knowledge tag group. The recommendation tag tree is constructed based on the relationships between the various knowledge tags in the knowledge tag group.
9. A knowledge tag recommendation device, characterized in that, include: The acquisition module is used to respond to retrieval commands for the knowledge base and acquire multiple first knowledge tags corresponding to the retrieval results; The first construction module is configured to construct a first tag list corresponding to each of the plurality of first knowledge tags, wherein the first tag list includes the first knowledge tag and a second knowledge tag associated with the first knowledge tag; The second construction module is used to construct a second tag list, the second tag list including knowledge tags that differ from the first tag lists corresponding to the plurality of first knowledge tags respectively; The recommendation module is used to obtain recommended knowledge tags corresponding to the search results based on the second tag list.
10. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 8 by executing the executable instructions.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Label storage method and device based on tree structure
CN111026753A
Knowledge base management method and device, electronic equipment and storage medium
CN112035440A