Hierarchical label construction method, hierarchical label query method, hierarchical label construction device, hierarchical label query device, equipment and medium
Through hierarchical tag construction and query methods, the tag vocabulary and correlation degree are used to achieve accurate focus on the objects to be processed, solving the problem of dispersed information recommendation content, and improving the accuracy and user experience of query results.
Patent Information
- Application Number
- CN202310828504.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-06
- Publication Date
- 2025-01-07
AI Technical Summary
In the prior art, the content of information recommendations is scattered and cannot be focused, and the user experiences are low, making it difficult to accurately find the required information.
The hierarchical tag construction method obtains the label vocabulary in the description data of the pending object, builds candidate multi-level tags that meet the hierarchical needs, and selects target multi-level tags based on the degree of label correlation to achieve accurate focus on different pending objects and improves data Query accuracy.
It improves the accuracy of the target multi-level tag and the accuracy of query results, ensures that there is a close connection between tag vocabulary, and enhances the user's experience of using it.
Smart Images

Figure CN119271857A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular to a hierarchical label construction and hierarchical label query method, device, equipment and medium. Background Art
[0002] In order to find the required information from the massive amount of information, the existing technology usually chooses the subscription and recommendation methods, so as to classify the information according to the user's needs and provide the classified information that the user is concerned about to the user. However, the above scheme cannot really let the user understand the intention of the recommendation because the recommended content is scattered and unfocused, and the user's usage experience is low. Summary of the invention
[0003] The present invention provides a hierarchical label construction and hierarchical label query method, device, equipment and medium to achieve precise focusing on different objects to be processed through multi-level label construction, thereby improving the accuracy of query results for data query based on the constructed hierarchical labels.
[0004] According to one aspect of the present invention, a hierarchical label construction method is provided, comprising:
[0005] Obtain at least two label words in the description data of the object to be processed;
[0006] According to each of the label words, construct at least one candidate multi-level label that meets the level requirement; wherein the level requirement includes a level quantity requirement;
[0007] Determine the degree of label association of different label words under the same candidate multi-level label in the description data;
[0008] According to the tag association degree corresponding to each of the candidate multi-level tags, a target multi-level tag is selected from each of the candidate multi-level tags.
[0009] According to another aspect of the present invention, a hierarchical label query method is provided, comprising:
[0010] Determine the query tag of the query data corresponding to this query requirement;
[0011] Obtaining target multi-level labels of different candidate points of interest (POIs) in the query library; wherein the target multi-level labels of the candidate POIs are determined based on any one of the hierarchical label construction methods provided in the embodiments of the present invention;
[0012] A target POI is selected from the candidate POIs according to the similarity between the query tag and each of the target multi-level tags.
[0013] According to another aspect of the present invention, there is provided a hierarchical label construction device, comprising:
[0014] A label vocabulary acquisition module, used to acquire at least two label words in the description data of the object to be processed;
[0015] A candidate multi-level label construction module, used to construct at least one candidate multi-level label that meets the level requirement according to each of the label words; wherein the level requirement includes a level quantity requirement;
[0016] A tag association degree determination module, used to determine the tag association degree of different tag words under the same candidate multi-level tag in the description data;
[0017] The target multi-level tag selection module is used to select a target multi-level tag from each of the candidate multi-level tags according to the tag association degree corresponding to each of the candidate multi-level tags.
[0018] According to another aspect of the present invention, a hierarchical label query device is provided, comprising:
[0019] A query tag determination module is used to determine the query tag of the query data corresponding to the current query requirement;
[0020] A target multi-level label acquisition module is used to acquire target multi-level labels of different candidate points of interest (POIs) in the query library; wherein the target multi-level labels of the candidate POIs are determined based on any one of the hierarchical label construction devices provided in the embodiments of the present invention;
[0021] The target POI selection module is used to select a target POI from each of the candidate POIs according to the similarity between the query tag and each of the target multi-level tags.
[0022] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0023] at least one processor; and
[0024] a memory communicatively connected to the at least one processor; wherein,
[0025] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute any one of the hierarchical label construction or hierarchical label query methods provided in the embodiments of the present invention.
[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the hierarchical label construction or hierarchical label query method described in any embodiment of the present invention when executed.
[0027] The embodiment of the present invention provides a hierarchical label construction scheme, which obtains at least two label words in the description data of the object to be processed; constructs at least one candidate multi-level label that meets the hierarchical requirements based on each label word; wherein the hierarchical requirements include hierarchical quantity requirements; determines the label association degree of different label words in the description data under the same candidate multi-level label; and selects the target multi-level label from each candidate multi-level label based on the label association degree corresponding to each candidate multi-level label. The above scheme improves the accuracy of the determined target multi-level label, ensures that there is a close connection between each label word in the target multi-level label, facilitates the precise focusing of different objects to be processed based on the target multi-level label, and improves the accuracy of the query results of data query based on the target multi-level label. At the same time, by introducing the hierarchical requirements and constructing the candidate multi-level labels, the construction of the candidate multi-level labels is restricted, thereby improving the accuracy of the constructed candidate multi-level labels.
[0028] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 is a flowchart of a hierarchical label construction method provided in Embodiment 1 of the present invention;
[0031] Figure 2 is a flowchart of a hierarchical label construction method provided by Embodiment 2 of the present invention;
[0032] Figure 3 is a flowchart of a hierarchical label query method provided by Embodiment 3 of the present invention;
[0033] Figure 4 It is a structural schematic diagram of a hierarchical label construction device provided by a fourth embodiment of the present invention;
[0034] Figure 5 It is a structural diagram of a hierarchical label query device provided by Embodiment 5 of the present invention;
[0035] Figure 6It is a structural diagram of an electronic device that implements a hierarchical label construction method and / or a hierarchical label query method provided in Embodiment 6 of the present invention. DETAILED DESCRIPTION
[0036] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0037] Embodiment 1
[0038] Figure 1 It is a flowchart of a hierarchical label construction method provided in Example 1 of the present invention. This embodiment can be applied to the situation of constructing multiple layers of labels. The method can be executed by a hierarchical label construction device. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device with certain computing capabilities.
[0039] See also Figure 1 The hierarchical label construction method shown includes:
[0040] S110: Obtain at least two label words in the description data of the object to be processed.
[0041] The object to be processed refers to an object for which hierarchical label construction is required. The embodiment of the present invention does not specifically limit the object to be processed, and the technical personnel may set it according to experience or needs. For example, the object to be processed may be a user or a POI (Point of Interest).
[0042] The description data refers to data used to describe the characteristics of the object to be processed. Specifically, different objects to be processed have different description data. For example, if the object to be processed is a user, the description data may be user portrait data; if the object to be processed is a POI, the description data may include at least one of POI basic data, POI depth data, POI dynamic data, and user comment data on the POI.
[0043] Among them, user portrait data can be used to describe user characteristics, such as user's basic data (such as age, gender, etc.), user's interest content classification data, user's family classification data, user's resource holding data, user's occupational category data, user's price sensitivity data, user's membership data, user's brand preference data, user's rest time data, user's activity area data and user's travel tool data, etc.
[0044] Among them, POI basic data refers to data used to describe the basic attribute characteristics of POI, such as the name of POI, address of POI, telephone number of POI and category of POI, etc. POI in-depth data refers to data used to describe POI characteristics in depth, such as POI profile (POI profile can include POI pictures), number of parking spaces at POI, per capita consumption at POI and POI rating, etc.
[0045] It should be noted that the embodiment of the present invention does not impose any limitation on the storage method of the description data, which can be set by technicians based on experience. Exemplarily, the description data can be stored in plain text or rich text (e.g., rich text can include video, audio, pictures, etc.).
[0046] Among them, the label vocabulary refers to a vocabulary that can be used to characterize the description data. Specifically, the label vocabulary can be used to summarize the description data. The embodiment of the present invention does not impose any limitation on the number of label vocabulary, which can be set by technicians based on experience, and it is only necessary to ensure that the number of label vocabulary is at least two. Different description data may have different numbers and / or different categories of label vocabulary.
[0047] The embodiment of the present invention does not impose any limitation on the method of obtaining labels, which can be set by technicians based on experience. For example, if the description data is presented in the form of rich text, the rich text is converted into plain text by existing technology, or the rich text is replaced with plain text by existing technology, and then natural language is applied for processing to convert the text content into several words, and then at least two label words are determined from the several words by statistical methods.
[0048] Specifically, at least two label words are selected from the word segmentation results of the description data of the object to be processed.
[0049] In an optional embodiment, obtaining at least two label words in the description data of the object to be processed includes: obtaining at least two label words in the description data of the object to be processed that exist in a preset dictionary library; eliminating label words whose occurrence frequency in the at least two label words does not meet the standard frequency threshold; wherein the standard frequency threshold of each label word is determined based on the occurrence frequency of the corresponding label word in the at least two label words and the occurrence frequency in the preset dictionary library.
[0050] Among them, the preset dictionary library refers to a database that can be used to store label vocabulary. The embodiment of the present invention does not impose any restrictions on the data categories stored in the preset dictionary library, which can be set by technical personnel based on experience. Among them, the frequency of occurrence of a label vocabulary refers to the ratio of the number of occurrences in a certain field (that is, the label vocabulary) in the currently processed description data to the number of occurrences of the label vocabulary in all fields (that is, all label vocabulary) in the currently processed description data. Correspondingly, the standard frequency threshold is the ratio of the number of occurrences of the label vocabulary in all fields of the currently processed description data to the number of occurrences of the label vocabulary in all fields of all description data.
[0051] Specifically, the obtained label words are matched with the label words in the preset dictionary library, and the label words for subsequent processing are preliminarily screened. For example, for label word A, if label word A does not match the corresponding label word in the preset dictionary library, that is, label word A does not exist in the preset dictionary library, then label word A is deleted; if it exists, it is retained.
[0052] Furthermore, the label words obtained through the preliminary screening are subjected to a secondary screening. Specifically, for any label word obtained through the preliminary screening, the occurrence frequency and the standard frequency threshold of the label word are determined; the occurrence frequency of the label word is compared with the standard frequency threshold; and according to the comparison result, the label words are subjected to a secondary screening. If the occurrence frequency of the label word is less than the standard frequency threshold, the label word is deleted; if not, it is retained.
[0053] It can be understood that by introducing a preset dictionary library and a standard frequency threshold, the acquired label words are screened, which improves the accuracy of subsequent processing based on the label words, avoids the acquisition of a large number of label words, resulting in low efficiency in subsequent processing, and improves the efficiency of subsequent processing; at the same time, by screening the label words twice through the preset dictionary library and the standard frequency threshold, the accuracy of the screened label words is improved, thereby improving the accuracy of the construction results of subsequent hierarchical labels.
[0054] S120: Construct at least one candidate multi-level tag that meets the level requirement according to each tag vocabulary.
[0055] Among them, the hierarchical requirement refers to the conditions that the hierarchical label to be constructed must meet. Specifically, the hierarchical requirement may include a hierarchical quantity requirement. The hierarchical quantity requirement refers to the maximum number of levels in each layer of the hierarchical label to be constructed. The embodiment of the present invention does not impose any limitation on the hierarchical quantity requirement, which can be set by technical personnel based on experience. Among them, the candidate multi-level labels refer to all hierarchical labels that meet the hierarchical requirements.
[0056] For example, if the label vocabulary includes bar, party, band and performance, and the number of levels is required to be 4, then the candidate multi-level labels may include at least one of the following: bar, bar-party, bar-party-band, bar-party-band-performance. Among them, the number of levels of the above candidate multi-level labels is level 1, level 2, level 3 and level 4, respectively. Among them, for the level 2 label "bar-party", the label of the bar is party, and another way of expressing it is that the level 1 label of the bar is party; for the level 3 label "bar-party-band", the label of the bar is party and band, the label of the bar-party is band, the label of the bar-band is party, and the label of the party-band is bar. The level 1 label of the bar is party-band, and the level 2 label is party and band; for the level 4 label "bar-party-band-performance", the label of the bar is party, band and performance, and the label of the bar-party is band and performance. The level 1 label of the bar is party-band-performance, the level 2 labels are party-band, party-performance, band-performance, and the level 3 label of the bar is party, band and performance.
[0057] It should be noted that the arrangement rule of the label level in the embodiment of the present invention may be: if x is an n-level label, if the m-level label of x is calculated, it is a combination of all hierarchical labels constructed by taking nm label words from n-1 label words except x.
[0058] It should be noted that the embodiment of the present invention does not impose any limitation on the method of constructing candidate multi-level labels, which can be set by technicians based on experience or actual needs.
[0059] In an optional embodiment, at least one candidate multi-level tag that meets the hierarchical requirements is constructed based on each tag vocabulary, including: constructing at least one candidate multi-level tag that meets the hierarchical requirements based on tag vocabularies belonging to the same field; and / or constructing at least one candidate multi-level tag that meets the hierarchical requirements based on tag vocabularies that have a binding relationship and belong to different fields.
[0060] In an embodiment of the present invention, the label words generated in one sentence or multiple consecutive sentences are considered to be related. For fields that do not belong to the same or consecutive sentences, it can be defined which fields can generate label words with binding relationships. This binding relationship can be the result of manual intervention, and the binding relationship is manually determined with reference to the usage scenario. For label words with binding relationships, candidate multi-level labels can be constructed.
[0061] In the process of constructing candidate multi-level labels, it is necessary to further determine whether the level number constraint of the multi-level labels is met, so that the number of labels constituting the multi-level labels is less than or equal to the preset level number. The preset level number refers to the maximum number of labels contained in the multi-level labels to be generated during the label generation process.
[0062] Specifically, at least one candidate multi-level label that meets the hierarchical requirements is constructed based on label words belonging to the same category. For example, if the label words are location A and location B, since location A and location B belong to the same field (both are location names), location A and location B can be directly constructed into a multi-level label, and the multi-level label "location A-location B" meets the hierarchical requirements, then "location A-location B" is a candidate multi-level label.
[0063] Specifically, if the label words belong to different categories, candidate multi-level labels that meet the hierarchical requirements are constructed based on the binding relationship between the label words. For example, if the label words are location A and event C, since location A and event C belong to different fields, but there is a binding relationship between location A and event C (such as event C can occur in location A), a multi-level label of "location A-event C" can be constructed. If the multi-level label meets the hierarchical requirements, "location A-event C" is a candidate multi-level label; if not, no other cross-field candidate multi-level labels will be constructed.
[0064] It can be understood that by constructing candidate multi-level tags based on whether the fields to which the tag vocabulary belongs are the same, the diversity of ways of constructing candidate multi-level tags is improved, omissions are avoided when constructing candidate multi-level tags according to a single method, and the comprehensiveness of the constructed candidate multi-level tags is improved.
[0065] In an optional embodiment, at least one candidate multi-level label that meets the level number requirement is constructed based on each label vocabulary, including: selecting label vocabulary that meets the level number requirement respectively to obtain at least one vocabulary group; and constructing the label vocabulary in the same vocabulary group to obtain the candidate multi-level label of the corresponding vocabulary group.
[0066] Among them, the vocabulary group refers to a vocabulary set consisting of the required number of label words at the level.
[0067] Specifically, from the obtained label words, randomly select the required number of levels of label words to construct a vocabulary group, wherein the number of the vocabulary group is at least one. For any vocabulary group, the candidate multi-level labels of the corresponding vocabulary group can be constructed according to the label words in the vocabulary group.
[0068] It should be noted that if there are at least two vocabulary groups with the same label vocabulary, then any one of the vocabulary groups is selected to construct the candidate multi-level labels of the vocabulary group. It is worth noting that the present invention does not impose any limitation on the construction order of candidate multi-level labels between different vocabulary groups.
[0069] It can be understood that by introducing vocabulary groups, the situation of missing label vocabulary when constructing candidate multi-level labels is avoided, and the comprehensiveness of the constructed candidate multi-level labels is improved.
[0070] It should be noted that when constructing candidate multi-level labels in the embodiments of the present invention, too many levels should not be constructed to avoid increasing the difficulty of subsequent use.
[0071] In the embodiments of the present invention, the construction method of the corresponding candidate multi-level labels can be selected according to the number of level requirements and the number of label vocabulary. Specifically, if the number of level requirements is greater than the number of label vocabulary, the candidate multi-level labels can be determined by introducing vocabulary groups. For example, if the number of level requirements is Y and the number of label vocabulary is y, assuming y ≤ Y, then the candidate multi-level labels composed of y label vocabulary are y-level labels (for example, Y = 3, y = 2, and the candidate multi-level labels composed of y labels (bar, party) are y = 2-level labels).
[0072] Specifically, if the number of level requirements is less than or equal to the number of label vocabulary, the candidate multi-level labels can be determined by introducing vocabulary groups. For example, if y > Y, Y label vocabulary need to be selected from y label vocabulary to form Y-level labels. One implementation method is to select all combinations to obtain vocabulary groups; according to the vocabulary groups, the corresponding candidate multi-level labels are determined. Another implementation method is to construct Y-level labels according to the order in which the label vocabulary appears in the sentence or field, or according to the preset order of different label vocabulary.
[0073] In the embodiments of the present invention, during the process of constructing candidate multi-level labels, at least some label vocabulary can also be reused in different candidate multi-level labels to improve the richness and diversity of the candidate multi-level labels. In an optional embodiment, the number requirement of overlapping labels can be introduced to construct candidate multi-level labels. Specifically, if the level requirement also includes the number requirement of overlapping labels, the number of overlapping labels in different candidate multi-level labels meets the number requirement of overlapping labels.
[0074] Among them, the number requirement of overlapping labels refers to the condition that the number of overlapping labels in each candidate multi-level label meets.
[0075] Continuing the previous example, if the number of level requirements is Y and the number of label vocabulary is y, if y > Y, then according to the number requirement of overlapping labels s, and s < Y, [(y - Y) / (Y - s)] + 1 vocabulary groups will be generated, and based on these vocabulary groups, Y-level labels will be constructed respectively.
[0076] For example, if the label vocabulary includes A, B, C, D, E, F, the number of overlapping labels is 2, and the number of levels required is 3, then the candidate multi-level labels constructed can include at least one of the following: ABC, BCD, CDE, DEF. Specifically, because it is a 3-level label (that is, the number of levels required is 3), ABC can be selected first in order. Because the number of overlapping labels is 2, when selecting again, BCD is selected (BC corresponds to the repeated 2), and so on.
[0077] For example, if the label vocabulary includes A, B, C, D, E, F, the number of overlapping labels is 1, and the number of levels required is 3, then the candidate multi-level labels constructed are 3 ((6-3) / (3-1)=2, rounded up, plus 1 is 3) including: ABC, CDE, EF.
[0078] It can be understood that by introducing the number of overlapping labels, the situation where the constructed candidate multi-level labels completely overlap is avoided, thereby improving the effectiveness of the constructed candidate multi-level labels.
[0079] S130: Determine the degree of label association between different label words under the same candidate multi-level label in the description data.
[0080] The tag association degree refers to the closeness between different tag words under the same candidate multi-level tag. The embodiment of the present invention does not impose any limitation on the method for determining the tag association degree, which can be set by technicians based on experience.
[0081] S140 . Select a target multi-level tag from each candidate multi-level tag according to the tag association degree corresponding to each candidate multi-level tag.
[0082] The target multi-level label refers to the candidate multi-level label that is finally screened out.
[0083] The embodiment of the present invention provides a hierarchical label construction scheme, which obtains at least two label words in the description data of the object to be processed; constructs at least one candidate multi-level label that meets the hierarchical requirements based on each label word; wherein the hierarchical requirements include hierarchical quantity requirements; determines the label association degree of different label words in the description data under the same candidate multi-level label; and selects the target multi-level label from each candidate multi-level label based on the label association degree corresponding to each candidate multi-level label. The above scheme improves the accuracy of the determined target multi-level label, ensures that there is a close connection between each label word in the target multi-level label, facilitates the precise focusing of different objects to be processed based on the target multi-level label, and improves the accuracy of the query results of data query based on the target multi-level label. At the same time, by introducing the hierarchical requirements and constructing the candidate multi-level labels, the construction of the candidate multi-level labels is restricted, thereby improving the accuracy of the constructed candidate multi-level labels.
[0084] On the basis of the above-mentioned technical solutions, at least one candidate multi-level label that meets the hierarchical requirements is constructed according to each label vocabulary, which may include: taking a label vocabulary whose appearance frequency in at least two label vocabularies is greater than a preset frequency threshold as a key label; removing the key label from at least two label vocabularies, and constructing at least one candidate multi-level label that meets the hierarchical requirements based on the removal result; accordingly, the method also includes: establishing an associative query relationship between the key label and the target multi-level label; wherein the associative query relationship is used to indicate the associative display of the query results.
[0085] Among them, the key tag refers to a tag word that is relatively important in the acquired tag vocabulary, that is, a tag word that appears more frequently in the tag vocabulary. In an optional embodiment, since the key tag and other tag words do not constitute a multi-level tag, but the frequency of occurrence is relatively high and needs to be retained, the key tag can also be called an independent tag. The embodiment of the present invention does not impose any restrictions on the preset frequency threshold, which can be set by technicians based on experience.
[0086] Among them, the associated query relationship can be used to connect the key tag and the target multi-level tag. It should be noted that the key tag does not support the expression of multiple levels of tags.
[0087] For example, if the label vocabulary is ST, A, B, C, D, E, F, G, the key label is ST, and the three-level labels can include ABC, CDE, EFG; among them, the labels of ST are A, B, C, D, E, F and G; the labels of ST-A are B and C; the label of ST-AC is B, and ST cannot be expressed using several levels of labels.
[0088] It is understandable that by introducing key tags, it is possible to focus on presenting tag words that appear more frequently, highlighting the importance of key tags, improving subsequent presentation effects, and thus improving the user experience.
[0089] On the basis of the above technical scheme, an embodiment of the present invention also includes: storing target multi-level labels of different objects to be processed in a hierarchical label library; merging target multi-level labels with the same label vocabulary but different label vocabulary orders contained in the hierarchical label library into target multi-level labels with a standard label vocabulary order.
[0090] The hierarchical tag library refers to a database for storing target multi-level tags. The standard order is used to specify the order between the tag words in the target multi-level tags. Specifically, in the target multi-level tags containing the same tag words, there is only one standard order. The embodiment of the present invention does not impose any limitation on the method for determining the standard order, which can be set by technicians based on experience.
[0091] Specifically, since the target multi-level labels may contain the same label words but in different orders, in order to reduce unnecessary label duplication, a standard order can be introduced to screen the target multi-level labels to obtain the final target multi-level labels.
[0092] Optionally, for the target multi-level tags containing the same tag vocabulary, the standard order of the target multi-level tags of the aforementioned categories can be determined according to the order of the first stored target multi-level tags containing the same tag vocabulary. Or optionally, the target multi-level tags with a standard order can be manually specified from the target multi-level tag vocabulary containing the same tag vocabulary.
[0093] For example, if the target multi-level tag is a Y-level tag, a Y-level tag pool / library (that is, the aforementioned hierarchical tag library) needs to be established to manage the Y-level tags. The Y-level tag pool / library does not mean that all target multi-level tags in it are Y-level. It will also contain target multi-level tags that are less than Y-level, but the highest level is Y-level. Each Y-level tag will point to the place where the content is generated through the content ID (identity). For example: if the Y-level tag is generated by a POI, then the content ID is the POI ID, or the POI ID and the POI field ID. Each target multi-level tag stored in the Y-level tag pool / library needs to meet the following rules: If the order is inconsistent, it will be considered as a multi-level tag, that is, the multi-level tags are considered to be repeated, so the repeated multi-level tags need to be removed. For example: ABC and CBA are the same, and one will be retained next. Usually, the form of the first multi-level tag that appears is retained according to the order of entry into the library, that is, the order of the first target multi-level tag entered into the library can be used as the standard order of each tag vocabulary in the target multi-level tag.
[0094] It should be noted that when a key tag exists, the relationship with the common target multi-level tag can be retained, so as to facilitate the associated search between the key tag and the target multi-level tag having an associated query relationship.
[0095] It can be understood that by introducing the standard order, the target multi-level tags are screened, the number of unnecessary target multi-level tags is reduced, the storage performance of the hierarchical tag library is improved, and the waste of resources is reduced.
[0096] Embodiment 2
[0097] Figure 2 This is a flowchart of a hierarchical label construction method provided by the second embodiment of the present invention. Based on the above embodiments, this embodiment further refines the operation of "determining the degree of label association of different label words under the same candidate multi-level label in the description data" into "for each candidate multi-level label, according to the difference of each label word under the candidate multi-level label, determine the degree of label association corresponding to the candidate multi-level label" to improve the mechanism for determining the degree of label association. It should be noted that for the part not described in detail in the embodiment of the present invention, please refer to the description of other embodiments.
[0098] See also Figure 2 The hierarchical label construction method shown includes:
[0099] S210: Obtain at least two label words in the description data of the object to be processed.
[0100] S220: Construct at least one candidate multi-level tag that meets the level requirements according to each tag vocabulary.
[0101] Among them, the level requirements include the level quantity requirements.
[0102] S230 : For each candidate multi-level tag, determine the tag association degree corresponding to the candidate multi-level tag according to the difference of each tag vocabulary under the candidate multi-level tag.
[0103] The difference refers to the difference in the frequency of occurrence of each label word under the same candidate multi-level label.
[0104] Exemplarily, the tag association degree corresponding to any candidate multi-level tag may be determined according to the difference between the occurrence frequencies of different tag words under the candidate multi-level tag.
[0105] In an optional embodiment, determining the degree of label association corresponding to the candidate multi-level label based on the differences between the label words under the candidate multi-level label may include: determining the maximum difference data between the occurrence frequencies of different label words under the candidate multi-level label; and using the maximum difference data as the degree of label association corresponding to the candidate multi-level label.
[0106] The maximum difference data refers to the maximum difference in the frequency of occurrence of different label words under the same candidate multi-level label.
[0107] For example, if the difference between the label word with the highest frequency and the label word with the lowest frequency in a candidate multi-level label is f, then the maximum difference in the frequency of occurrence of different label words under the candidate multi-level label is f, that is, the label association degree corresponding to the candidate multi-level label is f.
[0108] It can be understood that by introducing the maximum difference data and taking the maximum difference data as the tag association degree corresponding to the candidate multi-level tags, the tag association degree is quantified and the accuracy of the determined tag association degree is improved.
[0109] S240 . Select a target multi-level tag from each candidate multi-level tag according to the tag association degree corresponding to each candidate multi-level tag.
[0110] In an optional embodiment, a target multi-level tag is selected from each candidate multi-level tag based on the tag association degree corresponding to each candidate multi-level tag, including: from each candidate multi-level tag, eliminating candidate multi-level tags with a smaller tag association degree to obtain the target multi-level tag.
[0111] Optionally, from each candidate multi-level tag, the candidate multi-level tags with a smaller tag association degree are eliminated to obtain a target multi-level tag, including: for any candidate multi-level tag, if the tag association degree of the candidate multi-level tag is less than a preset tag association threshold, the candidate multi-level tag is used as the target multi-level tag; if the tag association degree of the candidate multi-level tag is greater than or equal to the preset tag association threshold, the candidate multi-level tag is eliminated. The embodiment of the present invention does not impose any limitation on the size of the preset tag association threshold, which can be set by a technician based on experience.
[0112] Or optionally, from each candidate multi-level tag, remove the candidate multi-level tags with a smaller tag association degree to obtain the target multi-level tag, including: for any candidate multi-level tag, if the tag association degree of the candidate multi-level tag belongs to a preset tag association interval, use the candidate multi-level tag as the target multi-level tag; if the tag association degree of the candidate multi-level tag does not belong to the preset tag association interval, remove the candidate multi-level tag. The embodiment of the present invention does not impose any limitation on the preset tag association interval, which can be set by technicians based on experience.
[0113] It should be noted that in the embodiment of the present invention, various different label association intervals can be pre-set, and a corresponding processing method (i.e., retention or elimination) is set for each label association interval. According to the degree of label association, the label association interval to which each candidate multi-level label belongs is determined; and each candidate multi-level label is processed according to the processing method corresponding to the label association interval (retention or elimination).
[0114] Alternatively, from each candidate multi-level tag, the candidate multi-level tags with a smaller tag association degree are eliminated to obtain the target multi-level tag, including: sorting each candidate multi-level tag according to the tag association degree; and selecting a preset retention threshold number of target multi-level tags from each candidate multi-level tag according to the sorting result and the preset retention threshold. The embodiment of the present invention does not impose any limitation on the size of the preset retention threshold, which can be set by a technician based on experience.
[0115] It should be noted that, in the embodiment of the present invention, the target multi-level tag can be selected from the sorted candidate multi-level tags by setting a preset retention ratio. The embodiment of the present invention does not impose any limitation on the size of the preset retention ratio, which can be set by technicians based on experience.
[0116] It can be understood that by eliminating candidate multi-level labels with less label correlation, the target multi-level label is obtained, which effectively reduces the number of unnecessary labels and improves the closeness between the label words under the determined target multi-level label, so that the determined target multi-level label can be accurately focused, thereby improving the practicality of the determined target multi-level label.
[0117] The embodiment of the present invention provides a hierarchical label construction scheme, which refines the operation of determining the label association degree of different label words under the same candidate multi-level label in the description data into determining the label association degree corresponding to each candidate multi-level label according to the difference of each label word under the candidate multi-level label, thereby improving the label association degree determination mechanism. The above scheme improves the accuracy of the determined label association degree by introducing differences to determine the label association degree, thereby improving the accuracy of the target multi-level label selected based on the label association degree.
[0118] Embodiment 3
[0119] Figure 3 This is a flowchart of a hierarchical label query method provided in the third embodiment of the present invention. This embodiment is applicable to the case of querying constructed hierarchical labels. The method can be executed by a hierarchical label query device, which can be implemented in the form of hardware and / or software. The device can be configured in an electronic device with certain computing capabilities. It should be noted that the device that executes the hierarchical label query method and the device that executes the hierarchical label construction method mentioned above can be the same or different, and the present invention does not impose any limitation on this.
[0120] See also Figure 3 The hierarchical label query method shown includes:
[0121] S310: Determine the query tag of the query data corresponding to the current query requirement.
[0122] The query demand refers to the demand for data that is desired to be obtained by the query. The query data refers to the data used to describe the query demand. Exemplarily, the query data may be determined based on the query demand. In an optional embodiment, the query data may include input data of the user to be queried in the query scenario, and / or location description data of the location of the user to be recommended in the recommendation scenario. The query tag refers to a tag used to summarize the query data.
[0123] Among them, the user to be queried refers to a user with a query demand. The input data refers to the data input by the user to be queried. The user to be recommended refers to the user who needs to be recommended. The location description data refers to the data used to describe the location of the user to be recommended. Specifically, the location description data can be description data within a preset range of the location of the user to be recommended, or the location description data can be description data within a specified administrative area, or the location description data can be POI description data with certain attributes. The embodiment of the present invention does not impose any limitation on the size of the preset range, which can be set by a technician based on experience.
[0124] Specifically, in different application scenarios, the query data is different due to the different initiators; matching query data is determined according to the corresponding application scenarios, which improves the comprehensiveness of the query data and thereby improves the applicability of the hierarchical label query solution in different scenarios.
[0125] In an optional embodiment, determining the query tag of the query data corresponding to the current query demand includes: obtaining query demand words related to the query data; wherein the query demand words are determined based on the word segmentation results of the query data; and combining query demand words of different categories to obtain the query tag.
[0126] Specifically, at least one query requirement word is determined according to the word segmentation result of the query data; and different query requirement words are combined to obtain a query tag.
[0127] The query demand vocabulary refers to the vocabulary used to represent at least part of the query demand. It should be noted that the method of segmenting query data in the present invention is not limited in any way and can be set by technicians based on experience.
[0128] It can be understood that by introducing query requirement words, the query data is labeled so as to determine the query tags later; at the same time, by combining query requirement words of different categories to obtain query tags, the comprehensiveness of the determined query tags is improved.
[0129] In the implementation of the present invention, in a query scenario or a recommendation scenario, it is assumed that the input data of the user to be queried or the location description data of the user to be recommended contains implicit query tags, and the query tags are extracted for query, that is, the input data or location description data is labeled to fully express the query requirements of the user to be queried or the user to be recommended.
[0130] Exemplarily, the embodiment of the present invention takes the input data in the query scenario as an example, and the labeling process of the input data is defined as follows:
[0131] For any input, we can split the input data into words according to the natural language processing capability. Each word represents a different semantic unit. Assuming that the input data is split into n segments, there will be t k (referring to the split result), and 1≤k≤n, t k ∈T (T is the set of input split words).
[0132] For the above t k , define the classification function / process, classify T, and get several sets T1, T2, ..., T n , so that T1 = {t1, t2, t i}, T2={t i +1, t i+2, t j}, ..., T n ={t k +1, t k +2, ..., t n},i <j<k<n。
[0133] At the same time, corresponding word representation generation functions / processes WF are provided for the above sets. Each set has a corresponding word representation generation function, so that WF(t i )=w j , for any t i , there will be w j , and w j ∈W, W is the result set of all word representation generation functions.
[0134] From the above, we can see that for any t, after classification and WF conversion, we can finally get w, which is the unique and definite expression of t. Then we can use w to query in the tag library.
[0135] The above scheme can also be understood as: any input data is split into words, and then classified (each category is a set), and then each set will correspond to a word representation function (this function can be the same or different), so that each word t i Each will correspond to a w j , then use w j Perform label matching in the dictionary library to obtain the target multi-level labels.
[0136] In the embodiment of the present invention, in the query scenario, the input data of the user to be queried is segmented using the ability of natural language to obtain the query demand vocabulary; then each query demand vocabulary is analyzed, which is essentially a classification process. Each query demand vocabulary has the characteristic of appearing frequently in some fields. Based on this characteristic, it can be divided according to the field where the query demand vocabulary appears. Here, it can be divided based on the existing application field dictionary to determine whether the selected query demand vocabulary appears in the application field dictionary. For example, the application field dictionary can be divided into name, category, address, and portrait label. Then, for the result, the word representation is generated in its own domain. WF, this step can use the word embedding technology to convert the input word (i.e., input data) into a word representation (i.e., query demand vocabulary), for example: word2vec can be used to convert it into a vector form, or other word encoding methods can be used to generate word representation. The word encoding system can be represented as a tree structure, and each layer belongs to two different systems. Having a common upper layer has similar attribute relationships, for example: they have similar meanings and are synonyms. In short, no matter which word representation is used, it is necessary to support word similarity calculation. That is, similar words have similar word representations.
[0137] It should be noted that the above process of labeling the input data in the query scenario can also be applied to the recommendation scenario. However, in the recommendation scenario, the above labeling process can be used as a preprocessing, that is, the location description data can be labeled in advance in the preprocessing in the recommendation scenario, and the labeled query demand vocabulary can be stored in the label database, so that when the query label is determined according to the query demand vocabulary, the query demand vocabulary related to the query data can be directly obtained from the label database. Among them, the label database can be used to store the query demand vocabulary in the recommendation scenario.
[0138] S320: Obtain target multi-level labels of different candidate POIs in the to-be-queried database.
[0139] The query library refers to a database for storing target multi-level labels of candidate POIs. The target multi-level labels of candidate POIs are determined based on a hierarchical label construction method. Candidate POIs refer to points of interest that may meet the query requirements of the query user or the recommended user.
[0140] The embodiment of the present invention does not specifically limit the method for determining candidate POIs, which can be set by technicians based on experience. For example, one hot encoding can be used to determine the labeling results of each dimension of the query tag. If the corresponding dimension is satisfied, mark 1 on the dimension of the corresponding POI, and if it is not satisfied, mark 0. If the query tag is an n-dimensional vector, then each POI is also an n-dimensional vector (for example, the query tag is a 2-dimensional vector, and there are two marks on each POI). POIs that satisfy the query tag in each dimension are taken as candidate POIs.
[0141] S330 : Select a target POI from each candidate POI according to the similarity between the query tag and each target multi-level tag.
[0142] The target POI refers to a point of interest that meets the requirements of this query.
[0143] Specifically, the target POI is selected from each candidate POI according to the similarity between the word vectors of the query tag and each target multi-level tag.
[0144] In an optional embodiment, in a recommendation scenario, the method further includes: determining the degree of match between the target POI and the user to be recommended based on the audience description data of the target POI and the user description data of the user to be recommended; and feeding back the target POI with a higher degree of match to the user to be recommended.
[0145] Among them, audience description data refers to data used to describe the audience group of the target POI. User description data refers to data used to describe the user. Optionally, the user description data can be a target multi-level label of the recommended user generated based on the hierarchical label construction method. Exemplarily, the user description data may include age stage-gender-interest content classification, age stage-circle classification, income class-occupational classification-price sensitivity, income class-price sensitivity-member information-brand preference, occupational classification-commuting time interval-activity area-choice of travel tools, etc. It can be understood that by determining the user description data based on the target multi-level label of the recommended user generated by the hierarchical label construction method, the accuracy of the user description data is improved.
[0146] The matching degree refers to the suitability between the target POI and the user to be recommended.
[0147] It can be understood that in the recommendation scenario, by introducing audience description data and user description data, the target POI is screened, thereby improving the accuracy of the determined target POI so that the determined target POI can better meet the needs of the recommended users, thereby improving the conversion rate of the target POI in the recommendation scenario and improving the user experience of the recommended users.
[0148] The embodiment of the present invention provides a hierarchical label query solution, which determines the query label of the query data corresponding to the query demand; obtains each target multi-level label of different candidate POIs in the query library; and selects the target POI from each candidate POI according to the similarity between the query label and each target multi-level label. The above solution improves the accuracy of the determined target POI by selecting the target POI from each candidate POI according to the similarity between the query label and each target multi-level label, so that the target POI can better meet the needs of the user and improve the user's experience.
[0149] On the basis of the above technical solution, in order to improve the controllability of the recommendation scenario, the embodiment of the present invention can set the triggering method of the recommended action in the recommendation scenario. The embodiment of the present invention does not impose any limitation on the triggering method of the recommended action, which can be set by the technician according to experience or needs. For example, the recommended action can be triggered in real time, periodically, or under specific conditions (such as when the location of the recommended user changes).
[0150] In an optional embodiment, the recommendation scenario can be divided into two stages, the first stage is the POI query under the recommendation scenario, and the second stage is the triggering of the recommendation action. The recommended action can be triggered only after the target POI is selected. After the target POI is selected, it is determined whether the triggering condition of the recommended action is met.
[0151] Exemplarily, the matching degree between the target POI and the user to be recommended can be determined based on the audience description data of the target POI and the user description data of the user to be recommended; when there is a target POI with a high matching degree, the target POI recommendation operation to the user to be recommended is triggered.
[0152] Specifically, the similarity between the n-dimensional vector result of each target POI and the n-dimensional vector result of the user to be recommended is calculated; the number of target POIs whose similarity is greater than a preset similarity threshold is counted and compared with the preset similarity threshold number; if the number of target POIs whose similarity is greater than the preset similarity threshold is greater than the preset similarity threshold number, the recommendation action is triggered; if not, the triggering is prohibited. It should be noted that the embodiment of the present invention does not impose any limitation on the size of the preset similarity threshold and / or the preset similarity threshold number, which can be set by technicians based on experience.
[0153] After the triggering conditions of the recommendation action are met, the recommended content is generated. The implementation of the present invention also includes: taking the target multi-level tags whose intersection number in different target POIs is greater than a preset number threshold as recommended multi-level tags; and generating recommended content according to the tag vocabulary intersection between the recommended multi-level tags.
[0154] The embodiment of the present invention does not impose any limitation on the size of the preset quantity threshold, which can be set by a technician based on experience. The recommended multi-level tags refer to the target multi-level tags that can be recommended to the user. The tag vocabulary intersection refers to the set of the same tag vocabulary in the recommended multi-level tags. The recommended content refers to the content recommended to the user.
[0155] For example, the target multi-level label may include at least one label vocabulary including name, address, latitude and longitude reference location, category, merchant description, positive / neutral evaluation in user comments, description of the official website homepage and information provided by a trusted third-party information provider platform. Based on these label vocabulary, find the target multi-level label whose intersection of label vocabulary is greater than a preset quantity threshold as the recommended multi-level label; if not, discard it.
[0156] Specifically, the recommended multi-level tags are generated through the tag sentence method to generate recommended topics, summarize the common themes and styles of these recommended level tags, and then generate recommended content from these recommended level tags; finally, they are displayed in the form of cards or other forms. Among them, the recommended content can include at least one of the following: summarized topics, descriptions, one or more groups of points of interest, event content associated with points of interest, and guide information, etc.
[0157] It is understandable that by introducing the recommended multi-level tags to generate recommended content, users can quickly understand the recommended content, which is the result of background selection, saving users' time; at the same time, the generated recommended content can also allow users to truly understand their own travel intentions, so that they can choose from a limited set of points of interest, thereby improving planning efficiency. In addition, by introducing recommended content, the embodiment of the present invention summarizes the content provided to users, making the recommended content more organized and logical, making it easier for users to accept information and grasp the theme, so that users can quickly obtain the required data.
[0158] It should be noted that if there are no target multi-level tags with an intersection number greater than a preset number threshold in each target POI, there are no recommended multi-level tags, that is, no recommended content can be generated. In this case, the recommended content will no longer be generated and pushed.
[0159] It should be noted that, in the embodiment of the present invention, a preset number threshold may be introduced, and the recommended multi-level tags may be sorted according to the preset sorting rules, and the recommended multi-level tags exceeding the preset number threshold may be eliminated. The embodiment of the present invention does not impose any limitation on the size of the preset number threshold, and it may be set by a technician based on experience. The embodiment of the present invention does not impose any limitation on the preset sorting rules, and it may be set by a technician based on experience. Exemplarily, the preset sorting rules may include the distance between the target POI and the user to be recommended, the order of appearance of the target POI, and the information appearing on the left and right sides of the planned path. The advantage of doing this is that the number of recommended multi-level tags is reduced, and the problem of generating more recommended content due to a large number of recommended multi-level tags is avoided, thereby improving the focus of the recommended content and improving the user's experience.
[0160] In an embodiment of the present invention, when performing a hierarchical tag query, the target multi-level tag query can be implemented based on only part of the query tags of the query data, and there is no need to consider the position of the query tag vocabulary in the target multi-level tag. That is, the characteristics of the library to be queried can be utilized. When the query tag is only partial, the library to be queried can use the existing query tags to associate and obtain all target multi-level tags including the query tag to improve the user experience.
[0161] For example, there is a 4-level tag ABCD, which can support the following retrieval situations: A (single); A and B (multiple, continuous); B and A (multiple, ignoring order, discontinuous); A, C and D (multiple, ignoring order); C and D (multiple, starting at any position); through the above input, this 4-level tag ABCD can be retrieved.
[0162] For example, for the 4-level tag "bar-party-band-performance", the tags of the bar are party, band and performance, and the tags of the bar-party are band and performance. The 1-level tag of the bar is party-band-performance, and the 2-level tags are party-band, party-performance, and band-performance. The 3-level tags of the bar are party, band and performance. For the input "bar", the candidate query tags that can be provided include party, band, and performance. When "party" is selected, the query tags of "bar-party" can continue to be obtained: band and performance. In this way, users can easily find results by selection. Similarly, word combinations of candidate query tags can also be provided, and the functions of several levels of query tags are used to obtain candidate query tags, and the obtained candidate query tags are combined into phrases. For example: input "bar", and the 2-level tags obtained are party-band, party-performance, and band-performance. The combined phrases of the candidate query tags may include: the party has a band performance, a performance venue suitable for the party, a live band performance, etc., and these combined phrases of the candidate query tags can be searched and obtained in a large amount of corpus. Among them, the candidate query tag refers to the query tag that matches the query tag in the query data.
[0163] Embodiment 4
[0164] Figure 4 It is a structural diagram of a hierarchical label construction device provided in Example 4 of the present invention. This embodiment can be applicable to the situation of constructing multiple layers of labels. The method can be executed by a hierarchical label construction device. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device with certain computing capabilities.
[0165] like Figure 4 As shown, the device includes: a tag vocabulary acquisition module 410, a candidate multi-level tag construction module 420, a tag association degree determination module 430 and a target multi-level tag selection module 440.
[0166] The label vocabulary acquisition module 410 is used to acquire at least two label vocabulary in the description data of the object to be processed;
[0167] The candidate multi-level label construction module 420 is used to construct at least one candidate multi-level label that meets the level requirement according to each label vocabulary; wherein the level requirement includes the level quantity requirement;
[0168] The tag association degree determination module 430 is used to determine the tag association degree of different tag words under the same candidate multi-level tag in the description data;
[0169] The target multi-level tag selection module 440 is used to select a target multi-level tag from each candidate multi-level tag according to the tag association degree corresponding to each candidate multi-level tag.
[0170] The embodiment of the present invention provides a hierarchical label construction scheme, which obtains at least two label words in the description data of the object to be processed through a label vocabulary acquisition module; constructs at least one candidate multi-level label that meets the hierarchical requirements according to each label word through a candidate multi-level label construction module; wherein the hierarchical requirements include hierarchical quantity requirements; determines the label association degree of different label words in the description data under the same candidate multi-level label through a label association degree determination module; and selects a target multi-level label from each candidate multi-level label according to the label association degree corresponding to each candidate multi-level label through a target multi-level label selection module. The above scheme improves the accuracy of the determined target multi-level label, ensures that there is a close connection between each label word in the target multi-level label, facilitates the precise focusing of different objects to be processed based on the target multi-level label, and improves the accuracy of the query results of data query based on the target multi-level label. At the same time, by introducing the hierarchical requirements and constructing the candidate multi-level labels, the construction of the candidate multi-level labels is restricted, thereby improving the accuracy of the constructed candidate multi-level labels.
[0171] Optionally, the tag association degree determination module 430 includes:
[0172] The tag association degree determination unit is used to determine the tag association degree corresponding to each candidate multi-level tag according to the difference of each tag vocabulary under the candidate multi-level tag.
[0173] Optionally, the tag association degree determination unit includes:
[0174] A maximum difference data determination subunit is used to determine the maximum difference data between the occurrence frequencies of different label words under the candidate multi-level label;
[0175] The label association degree determination subunit is used to use the maximum difference data as the label association degree corresponding to the candidate multi-level label.
[0176] Optionally, the target multi-level label selection module 440 includes:
[0177] The target multi-level label determination unit is used to eliminate candidate multi-level labels with a smaller label correlation degree from each candidate multi-level label to obtain a target multi-level label.
[0178] Optionally, the candidate multi-level label construction module 420 includes:
[0179] A first candidate multi-level label construction unit is used to construct at least one candidate multi-level label that meets the level requirement based on label words belonging to the same field; and / or,
[0180] The second candidate multi-level label construction unit is used to construct at least one candidate multi-level label that meets the hierarchical requirements according to label words that have a binding relationship and belong to different fields.
[0181] Optionally, the candidate multi-level label construction module 420 includes:
[0182] A vocabulary group determination unit, used to respectively select label words that meet the level quantity requirement to obtain at least one vocabulary group;
[0183] The candidate multi-level label construction unit is used to construct the label words in the same vocabulary group to obtain the candidate multi-level labels of the corresponding vocabulary group.
[0184] Optionally, if the level requirement also includes a requirement for the number of overlapping labels, the number of overlapping labels in different candidate multi-level labels satisfies the requirement for the number of overlapping labels.
[0185] Optionally, the tag vocabulary acquisition module 410 includes:
[0186] A label vocabulary acquisition unit, used to acquire at least two label vocabulary existing in a preset dictionary library from the description data of the object to be processed;
[0187] A label word elimination unit, used to eliminate label words whose occurrence frequency in at least two label words does not meet a standard frequency threshold;
[0188] The standard frequency threshold of each tag word is determined based on the appearance frequency of the corresponding tag word in at least two tag words and the appearance frequency in a preset dictionary library.
[0189] Optionally, the device further comprises:
[0190] A target multi-level label storage module is used to store target multi-level labels of different objects to be processed in a level label library;
[0191] The tag vocabulary merging module is used to merge the target multi-level tags with the same tag vocabulary but different tag vocabulary orders contained in the hierarchical tag library into a target multi-level tag with a tag vocabulary order in a standard order.
[0192] Optionally, the candidate multi-level label construction module 420 includes:
[0193] A key tag determining unit, configured to use a tag word whose appearance frequency in at least two tag words is greater than a preset frequency threshold as a key tag;
[0194] A candidate multi-level label construction unit, used to remove key labels from at least two label vocabularies, and construct at least one candidate multi-level label that meets the hierarchical requirements based on the removal results;
[0195] Accordingly, the device further comprises:
[0196] The associated query relationship establishment module is used to establish an associated query relationship between the key tag and the target level tag; wherein the associated query relationship is used to indicate the associated display of the query result.
[0197] The hierarchical label construction device provided in the embodiment of the present invention can execute the hierarchical label construction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each hierarchical label construction method.
[0198] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of the objects to be processed, description data and label vocabulary involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0199] Embodiment 5
[0200] Figure 5 It is a structural diagram of a hierarchical label query device provided in Example 5 of the present invention. This embodiment can be applied to the situation of querying constructed hierarchical labels. The method can be executed by a hierarchical label query device. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device with certain computing capabilities.
[0201] like Figure 5 As shown, the device includes: a query tag determination module 510, a target multi-level tag acquisition module 520 and a target POI selection module 530.
[0202] A query tag determination module 510 is used to determine the query tag of the query data corresponding to the current query requirement;
[0203] The target multi-level label acquisition module 520 is used to acquire target multi-level labels of different candidate points of interest POIs in the query library; wherein the target multi-level labels of the candidate POIs are determined based on the level label construction device of the fourth embodiment;
[0204] The target POI selection module 530 is used to select a target POI from each candidate POI according to the similarity between the query tag and each target multi-level tag.
[0205] An embodiment of the present invention provides a hierarchical label query solution, which determines the query label of the query data corresponding to the current query demand through a query label determination module; obtains each target multi-level label of different candidate points of interest POIs in the to-be-queried library through a target multi-level label acquisition module; wherein the target multi-level label of the candidate POI is determined based on the hierarchical label construction device of embodiment 4; and selects the target POI from each candidate POI according to the similarity between the query label and each target multi-level label through a target POI selection module. The above scheme improves the accuracy of the determined target POI by selecting the target POI from each candidate POI according to the similarity between the query label and each target multi-level label, so that the target POI can better meet the needs of the user and improve the user's experience.
[0206] Optionally, the query data includes input data of a user to be queried in a query scenario, and / or location description data of a location of a user to be recommended in a recommendation scenario.
[0207] Optionally, the query tag determination module 510 includes:
[0208] A query demand vocabulary acquisition unit, used to acquire query demand vocabulary related to the query data; wherein the query demand vocabulary is determined based on the segmentation result of the query data;
[0209] The query label determination unit is used to combine query demand words of different categories to obtain query labels.
[0210] Optionally, in the recommended scenario, the device further includes:
[0211] A matching degree determination module, used to determine the matching degree between the target POI and the user to be recommended based on the audience description data of the target POI and the user description data of the user to be recommended;
[0212] The target POI recommendation module is used to feed back target POIs with a high matching degree to the user to be recommended.
[0213] Optionally, the user description data is a target multi-level label generated for the user to be recommended.
[0214] Optionally, the device further comprises:
[0215] A recommended multi-level tag determination module is used to take target multi-level tags whose intersection quantity among different target POIs is greater than a preset quantity threshold as recommended multi-level tags;
[0216] The recommendation content generation module is used to generate recommendation content according to the intersection of label vocabulary between the recommended multi-level labels.
[0217] The hierarchical label query device provided in the embodiment of the present invention can execute the hierarchical label query method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each hierarchical label query method.
[0218] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of query tags, input data and location description data involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0219] Embodiment 6
[0220] Figure 6 It is a structural diagram of an electronic device that implements a hierarchical label construction method and / or a hierarchical label query method provided by Embodiment 6 of the present invention. The electronic device 610 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, 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 processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present invention described and / or required herein.
[0221] like Figure 6 As shown, the electronic device 610 includes at least one processor 611, and a memory connected to the at least one processor 611 in communication, such as a read-only memory (ROM) 612, a random access memory (RAM) 613, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 611 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 612 or the computer program loaded from the storage unit 618 to the random access memory (RAM) 613. In the RAM 613, various programs and data required for the operation of the electronic device 610 can also be stored. The processor 611, the ROM 612, and the RAM 613 are connected to each other via a bus 614. An input / output (I / O) interface 615 is also connected to the bus 614.
[0222] A number of components in the electronic device 610 are connected to the I / O interface 615, including: an input unit 616, such as a keyboard, a mouse, etc.; an output unit 617, such as various types of displays, speakers, etc.; a storage unit 618, such as a disk, an optical disk, etc.; and a communication unit 619, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 619 allows the electronic device 610 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0223] The processor 611 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 611 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 611 executes the various methods and processes described above, such as the hierarchical label construction method and / or the hierarchical label query method.
[0224] In some embodiments, the hierarchical label construction method and / or the hierarchical label query method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 618. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 610 via the ROM 612 and / or the communication unit 619. When the computer program is loaded into the RAM 613 and executed by the processor 611, one or more steps of the hierarchical label construction method and / or the hierarchical label query method described above may be performed. Alternatively, in other embodiments, the processor 611 may be configured to execute the hierarchical label construction method and / or the hierarchical label query method in any other appropriate manner (e.g., by means of firmware).
[0225] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0226] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0227] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0228] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0229] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0230] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0231] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0232] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A hierarchical label construction method, characterized in that: include: Obtain at least two label words in the description data of the object to be processed; According to each of the label words, construct at least one candidate multi-level label that meets the level requirement; wherein the level requirement includes a level quantity requirement; Determine the degree of label association of different label words under the same candidate multi-level label in the description data; According to the tag association degree corresponding to each of the candidate multi-level tags, a target multi-level tag is selected from each of the candidate multi-level tags.
2. The method according to claim 1, characterized in that The determining of the degree of label association of different label words under the same candidate multi-level label in the description data includes: For each of the candidate multi-level tags, the tag association degree corresponding to the candidate multi-level tag is determined according to the difference of each tag vocabulary under the candidate multi-level tag.
3. The method according to claim 2, characterized in that The step of determining the tag association degree corresponding to the candidate multi-level tag according to the difference of each tag vocabulary under the candidate multi-level tag includes: Determine the maximum difference data between the occurrence frequencies of different label words under the candidate multi-level label; The maximum difference data is used as the label association degree corresponding to the candidate multi-level label.
4. The method according to any one of claims 1 to 3, characterized in that: The step of selecting a target multi-level tag from each of the candidate multi-level tags according to the tag association degree corresponding to each of the candidate multi-level tags includes: From the candidate multi-level tags, the candidate multi-level tags with a smaller tag correlation degree are eliminated to obtain the target multi-level tag.
5. The method according to any one of claims 1 to 3, characterized in that: The step of constructing at least one candidate multi-level tag that meets the hierarchical requirements according to each of the tag vocabularies includes: Constructing at least one candidate multi-level tag that meets the hierarchical requirements based on the tag vocabulary belonging to the same field; and / or, At least one candidate multi-level label that meets the hierarchical requirements is constructed based on label vocabularies that have a binding relationship and belong to different fields.
6. The method according to any one of claims 1 to 3, characterized in that: The step of constructing at least one candidate multi-level label that meets the level quantity requirement according to each of the label vocabularies includes: Selecting label words that meet the number requirement of the levels respectively to obtain at least one word group; The label words in the same vocabulary group are constructed to obtain candidate multi-level labels for the corresponding vocabulary group.
7. The method according to any one of claims 1 to 3, characterized in that: If the level requirement also includes a requirement for the number of overlapping labels, then the number of overlapping labels in different candidate multi-level labels satisfies the requirement for the number of overlapping labels.
8. The method according to any one of claims 1 to 3, characterized in that: The step of obtaining at least two label words in the description data of the object to be processed includes: Acquire at least two label words existing in a preset dictionary library from the description data of the object to be processed; Eliminate label words whose occurrence frequencies in the at least two label words do not meet the standard frequency threshold; The standard frequency threshold of each label word is determined based on the appearance frequency of the corresponding label word in the at least two label words and the appearance frequency in the preset dictionary library.
9. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Storing target multi-level labels of different objects to be processed in a level label library; The target multi-level tags with the same tag vocabulary but different tag vocabulary orders contained in the hierarchical tag library are merged into a target multi-level tag with the tag vocabulary order being a standard order.
10. The method according to any one of claims 1 to 3, characterized in that: The step of constructing at least one candidate multi-level tag that meets the hierarchical requirements according to each of the tag vocabularies includes: Using a tag word whose appearance frequency in the at least two tag words is greater than a preset frequency threshold as a key tag; Eliminating the key tag from the at least two tag vocabularies, and constructing at least one candidate multi-level tag that meets the hierarchical requirements according to the elimination result; Accordingly, the method further includes: An associated query relationship is established between the key tag and the target multi-level tag; wherein the associated query relationship is used to indicate an associated display of query results.
11. A hierarchical tag query method, characterized in that: include: Determine the query tag of the query data corresponding to this query requirement; Obtaining target multi-level labels of different candidate points of interest (POIs) in the query library; wherein the target multi-level labels of the candidate POIs are determined based on the method described in any one of claims 1 to 10; A target POI is selected from the candidate POIs according to the similarity between the query tag and each of the target multi-level tags.
12. The method according to claim 11, characterized in that The query data includes input data of a user to be queried in a query scenario, and / or location description data of a location of a user to be recommended in a recommendation scenario.
13. The method according to claim 12, characterized in that Determining the query tag of the query data corresponding to the query demand includes: Acquire query requirement words related to the query data; wherein the query requirement words are determined based on the word segmentation result of the query data; The query tags are obtained by combining query demand words of different categories.
14. The method according to claim 12, characterized in that In the recommendation scenario, the method further includes: Determining the matching degree between the target POI and the user to be recommended according to the audience description data of the target POI and the user description data of the user to be recommended; Feedback the target POI with a higher matching degree to the user to be recommended.
15. The method according to claim 14, characterized in that The user description data is a target multi-level label of the user to be recommended generated based on any one of claims 1-10.
16. The method according to any one of claims 12 to 15, characterized in that: The method further comprises: The target multi-level labels whose intersection number among different target POIs is greater than a preset number threshold are used as recommended multi-level labels; Generate recommended content according to the tag vocabulary intersection between the recommended multi-level tags.
17. A hierarchical label construction device, characterized in that: include: A label vocabulary acquisition module, used to acquire at least two label words in the description data of the object to be processed; A candidate multi-level label construction module, used to construct at least one candidate multi-level label that meets the level requirement according to each of the label words; wherein the level requirement includes a level quantity requirement; A tag association degree determination module, used to determine the tag association degree of different tag words under the same candidate multi-level tag in the description data; The target multi-level tag selection module is used to select a target multi-level tag from each of the candidate multi-level tags according to the tag association degree corresponding to each of the candidate multi-level tags.
18. A hierarchical label query device, characterized in that: include: A query tag determination module is used to determine the query tag of the query data corresponding to the current query requirement; A target multi-level label acquisition module, used to acquire target multi-level labels of different candidate points of interest (POIs) in the to-be-queried library; wherein the target multi-level labels of the candidate POIs are determined based on the device of claim 17; The target POI selection module is used to select a target POI from each of the candidate POIs according to the similarity between the query tag and each of the target multi-level tags.
19. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a hierarchical label construction method as described in any one of claims 1-10, and / or a hierarchical label query method as described in any one of claims 11-16.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements a hierarchical label construction method as described in any one of claims 1-10, and / or a hierarchical label query method as described in any one of claims 11-16.
Citation Information
Cited By
A hierarchical tag management method and system based on Spring Boot
CN120407559B