Information generation method, device, electronic device and computer readable medium
By using pre-constructed dictionary tree and word sequence split by sentences, the information generation method is optimized, and the high complexity and delay problems when extracting keywords in the prior art are solved, and accurate and effective target word recognition is achieved.
Patent Information
- Application Number
- CN202110315432.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-24
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-03-24
AI Technical Summary
When extracting keywords in user communication records, the algorithm has high time complexity and large matching calculations, resulting in delay in recognition and poor overall experience, especially when the number of vocabulary databases and text word segmentation increases, the recognition of sensitive words Poor performance.
The pre-constructed dictionary tree and word sequence split by sentences are used to determine whether the target subword sequence in the word sequence can be combined into target words through the node relationship in the dictionary tree, and characterization information is generated and the information generation process is optimized.
Accurate and effective determination of target words in word sequences through dictionary trees improves recognition efficiency, reduces computational complexity, and improves the overall experience.
Smart Images

Figure CN113761896B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to an information generation method, device, electronic device, and computer-readable medium. Background Art
[0002] At present, various businesses often need to communicate with users, and various business parties usually hope to extract key words from the communication records with users to understand the content information associated with the users. Then, according to the content information associated with the users, the above-mentioned business parties perform corresponding operations in a targeted manner. For example, if the target drug appears in the user communication record, the business party can recommend the relevant introduction of the above-mentioned target drug to the user. For the extraction of keywords, the usual method is: first, build an item vocabulary library. Then, through text segmentation, each word is compared with the item vocabulary library in turn to determine whether it is a word in the vocabulary library. However, the algorithm time complexity of the whole process is high, the matching calculation amount is large, and the number of iterations will double with the growth of the vocabulary library and the number of text segmentations. The performance of identifying sensitive words is poor, which may cause recognition delays and poor overall experience. Summary of the invention
[0003] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0004] Some embodiments of the present disclosure propose information generation methods, devices, equipment, and computer-readable media to solve the technical problems mentioned in the above background technology section.
[0005] In a first aspect, some embodiments of the present disclosure provide an information generation method, the method comprising: obtaining a pre-constructed dictionary tree and a word sequence after sentence decomposition, wherein each node in the above dictionary tree corresponds to a word and / or a word corresponding to a next-level node of the above node in the above dictionary tree; in response to the existence of a node corresponding to the word at the current position in the above word sequence in the above dictionary tree, performing the following information generation steps for the word at the above current position: in response to the existence of a next-level node corresponding to the node at the above current position in the above dictionary tree, determining whether the word at the next position of the above current position in the above word sequence exists in a word set corresponding to a target node set in the above dictionary tree, wherein the target node The target node in the concentration is the next-level node of the node corresponding to the character at the current position in the above-mentioned dictionary tree; in response to the character at the next position of the above-mentioned current position in the above-mentioned word sequence not existing in the character set corresponding to the target node set in the above-mentioned dictionary tree and determining that the character at the above-mentioned current position is a word-ending character, information representing whether the target sub-word sequence in the above-mentioned word sequence can be combined into a target word is generated, wherein the two nodes corresponding to each two adjacent characters in the above-mentioned target sub-word sequence are in a node relationship of superior and subordinate in the above-mentioned dictionary tree and the last character in the above-mentioned target sub-word sequence is the above-mentioned word-ending character; in response to the determination of existence, the character at the above-mentioned next position is determined as the character at the current position and the above-mentioned information generation step is executed.
[0006] Optionally, before determining whether the character at the next position of the current position in the character sequence exists in the character set corresponding to the target node set in the dictionary tree in response to the existence of a next-level node corresponding to the node at the current position in the dictionary tree, the method further includes: determining whether the next-level node exists in the node corresponding to the character at the current position in the dictionary tree; in response to determining that the next-level node does not exist for the node corresponding to the current position in the dictionary tree, determining the number of characters in the target sub-character sequence in the character sequence; in response to determining that the number of characters is greater than a predetermined first threshold, determining whether the last character in the target sub-character sequence is the final character; in response to determining that the last character in the target sub-character sequence is not the final character, determining the character at the next position as the character at the current position and executing the information generation step.
[0007] Optionally, the method further includes: in response to determining that the last character in the target sub-character sequence is the word-ending character, generating information representing that the target sub-character sequence in the character sequence is combined into a target word.
[0008] Optionally, in response to the existence of a next-level node corresponding to the node of the character at the current position in the dictionary tree, determining whether the character at the next position of the current position in the character sequence exists in the character set corresponding to the target node set in the dictionary tree includes: in response to the existence of a next-level node corresponding to the node of the current position in the dictionary tree, determining whether the node corresponding to the character at the next position of the current position in the character sequence exists in the dictionary tree; in response to determining that it exists, determining whether the node corresponding to the character at the next position of the current position in the dictionary tree is the next-level node of the node corresponding to the character at the current position; in response to determining that it is, determining that the character at the next position of the current position in the character sequence exists in the character set corresponding to the target node set in the dictionary tree.
[0009] Optionally, the method further includes: in response to determining that it is not, determining that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree.
[0010] Optionally, in response to the fact that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree and the character at the current position is determined to be a word-ending character, generating information representing whether the target sub-character sequence in the character sequence can be combined into a target word, includes: in response to the fact that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree, determining whether the character at the next position is a word-ending character; in response to determining that the character at the next position is the word-ending character, determining the number of characters in the target sub-character sequence; in response to determining that the number of characters is greater than a predetermined second threshold, generating information representing that the target sub-character sequence in the character sequence is combined with the target word and recording the target sub-character sequence.
[0011] Optionally, after the above-mentioned information characterizing whether the target sub-word sequence in the above-mentioned word sequence can be combined into a target word is generated in response to the fact that the word at the next position of the above-mentioned current position in the above-mentioned word sequence does not exist in the word set corresponding to the target node set in the above-mentioned dictionary tree and the word at the above-mentioned current position is determined to be the ending word, the above-mentioned method further includes: in response to the fact that the word at the next position of the above-mentioned current position in the above-mentioned word sequence does not exist in the word set corresponding to the target node set in the above-mentioned dictionary tree and the word at the above-mentioned current position is not the ending word, determining the word at the above-mentioned next position as the word at the target position and executing the above-mentioned information generation step.
[0012] Optionally, the word sequence after the above-mentioned sentence splitting is generated by the following steps: sentence splitting of the target text to obtain individual sentences; splitting each of the above-mentioned sentences at the granularity of words to generate the word sequence corresponding to the above-mentioned sentence.
[0013] Optionally, the above-mentioned dictionary tree is stored in the memory, and each node in the above-mentioned dictionary tree corresponds to information on whether a character is a word-ending character and / or information on whether a character corresponding to a next-level node of the above-mentioned node in the above-mentioned dictionary tree is the above-mentioned word-ending character.
[0014] In a second aspect, some embodiments of the present disclosure provide an information generating device, the device comprising: an acquiring unit, configured to acquire a pre-constructed dictionary tree and a word sequence after sentence decomposition, wherein each node in the above dictionary tree corresponds to a word and / or a word corresponding to a next-level node of the above node in the above dictionary tree; an information generating unit, configured to, in response to the existence of a node corresponding to the word at the current position in the above word sequence in the above dictionary tree, perform the following information generating steps on the word at the above current position: in response to the existence of a next-level node corresponding to the node at the above current position in the above dictionary tree, determine whether the word at the next position of the above current position in the above word sequence exists in the word set corresponding to the target node set in the above dictionary tree, wherein the above The target node in the target node set is a node at the next level of the node corresponding to the character at the current position in the dictionary tree; in response to the character at the next position of the current position in the character sequence not existing in the character set corresponding to the target node set in the dictionary tree and determining that the character at the current position is a word-ending character, information representing whether a target sub-character sequence in the character sequence can be combined into a target word is generated, wherein the two nodes corresponding to each two adjacent characters in the target sub-character sequence are in a node relationship of superior and subordinate in the dictionary tree and the last character in the target sub-character sequence is the word-ending character; a determination unit is configured to determine the character at the next position as the character at the current position in response to determining the existence and to execute the information generation step.
[0015] Optionally, the device further includes: determining whether there is a next-level node corresponding to the node of the character at the current position in the dictionary tree; in response to determining that there is no next-level node corresponding to the node of the character at the current position in the dictionary tree, determining the number of characters in the target sub-character sequence in the character sequence; in response to determining that the number of characters is greater than a predetermined first threshold, determining whether the last character in the target sub-character sequence is the final character; in response to determining that the last character in the target sub-character sequence is not the final character, determining the character at the next position as the character at the current position and executing the information generation step.
[0016] Optionally, the apparatus further comprises: in response to determining that the last character in the target sub-character sequence is the word-ending character, generating information representing that the target sub-character sequence in the character sequence is combined into a target word.
[0017] Optionally, the information generation unit is further configured to: in response to the existence of a next-level node corresponding to the node corresponding to the character at the current position in the dictionary tree, determine whether the node corresponding to the character at the next position of the current position in the character sequence exists in the dictionary tree; in response to determining that it exists, determine whether the node corresponding to the character at the next position of the current position in the dictionary tree is the next-level node of the node corresponding to the character at the current position; in response to determining that it is, determine that the character at the next position of the current position in the character sequence exists in the character set corresponding to the target node set in the dictionary tree.
[0018] Optionally, the information generating unit is further configured to: in response to determining that it is not, determine that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree.
[0019] Optionally, the information generation unit is further configured to: in response to the character at the next position of the above-mentioned current position in the above-mentioned character sequence not existing in the character set corresponding to the target node set in the above-mentioned dictionary tree, determine whether the character at the above-mentioned next position is a word-ending character; in response to determining that the character at the above-mentioned next position is the word-ending character, determine the number of characters in the above-mentioned target sub-character sequence; in response to determining that the above-mentioned number of characters is greater than a predetermined second threshold, generate information representing the target sub-character sequence in the above-mentioned character sequence combining the above-mentioned target word and record the above-mentioned target sub-character sequence.
[0020] Optionally, the above-mentioned device also includes: in response to determining that the word does not exist and the word at the above-mentioned current position is not the above-mentioned word-ending word, determining the word at the above-mentioned next position as the word at the target position and executing the above-mentioned information generation step.
[0021] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any method as described in the first aspect.
[0022] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, any method in the first aspect is implemented.
[0023] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: the information generation method of some embodiments of the present disclosure can use a dictionary tree to accurately and effectively determine each target word in the word sequence. Specifically, the algorithm time complexity of the determination process through the item vocabulary library is high, the matching calculation amount is large, and the number of iterations will double with the growth of the vocabulary library and the number of text segmentation words. The performance of identifying sensitive words is poor, which may cause recognition delays and poor overall experience. Based on this, the information generation method of some embodiments of the present disclosure can first obtain a pre-constructed dictionary tree and a word sequence after the sentence is split. Among them, each node in the above-mentioned dictionary tree corresponds to a word and / or a word corresponding to the next-level node of the above-mentioned node in the above-mentioned dictionary tree. Here, the above-mentioned dictionary tree is used for the generation of subsequent target sub-word sequences and the generation of information representing whether the target sub-word sequence in the above-mentioned word sequence can be combined into a target word. Then, in response to the existence of a node corresponding to the character at the current position in the character sequence in the above-mentioned dictionary tree, the following information generation steps are performed for the character at the above-mentioned current position: in response to the existence of a next-level node corresponding to the node at the above-mentioned current position in the above-mentioned dictionary tree, determine whether the character at the next position of the above-mentioned current position in the above-mentioned character sequence exists in the character set corresponding to the target node set in the above-mentioned dictionary tree, wherein the target node in the above-mentioned target node set is the next-level node of the node corresponding to the character at the above-mentioned current position in the above-mentioned dictionary tree; in response to the fact that the character at the next position of the above-mentioned current position in the above-mentioned character sequence does not exist in the character set corresponding to the target node set in the above-mentioned dictionary tree and it is determined that the character at the above-mentioned current position is a word-ending character, generate information representing whether the target sub-character sequence in the above-mentioned character sequence can be combined into a target word, wherein the two nodes corresponding to each two adjacent characters in the above-mentioned target sub-character sequence are in a node relationship of superior and subordinate in the above-mentioned dictionary tree and the last character in the above-mentioned target sub-character sequence is the above-mentioned word-ending character. Here, the above-mentioned information generation step can accurately and effectively determine the target word from the character sequence by generating information representing whether the target sub-character sequence in the above-mentioned character sequence can be combined into a target word. Finally, in response to the determination of existence, the character at the next position is determined as the character at the current position and the information generation step is performed. It can be seen that the information generation method can use the dictionary tree to accurately and effectively determine each target word in the character sequence. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0025] Figure 1 is a schematic diagram of an application scenario diagram of the information generation method of some embodiments of the present disclosure;
[0026] Figure 2 is a flow chart of some embodiments of the information generation method according to the present disclosure;
[0027] Figure 3 is a schematic diagram of a storage structure of words corresponding to each node of a dictionary tree in an information generation method according to some embodiments of the present disclosure;
[0028] Figure 4 are flow charts of other embodiments of the information generating method according to the present disclosure;
[0029] Figure 5 is a schematic diagram of the structure of some embodiments of the information generating device according to the present disclosure;
[0030] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0031] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0032] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0036] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0037] Figure 1It is a schematic diagram of an application scenario diagram of the information generation method of some embodiments of the present disclosure.
[0038] like Figure 1 As shown, the electronic device 101 can first obtain the pre-constructed dictionary tree 102 and the word sequence 103 after the sentence is split. Among them, each node in the above dictionary tree 102 corresponds to a word and / or a word corresponding to the next level node of the above node in the above dictionary tree 102. In this application scenario, the above dictionary tree 102 may include: "Start->Cervical->Rehabilitation->Kang, Start->Cervical->Vertebra->Instrument, Start->Blood->Pressure->Instrument, Start->Blood->Sugar->Reagent, Start->Blood->Sugar->Test->Paper". The above word sequence 103 can be: "Today, you use a blood pressure instrument to measure your blood pressure". In response to the existence of a node corresponding to the word at the current position in the above word sequence 103 in the above dictionary tree 102, the following information generation step is performed for the word at the above current position: In response to the existence of a next level node for the word corresponding to the above current position in the above dictionary tree 102, determine whether the word at the next position of the above current position in the above word sequence 103 exists in the word set corresponding to the target node set in the above dictionary tree 102. Wherein, the target node in the target node set is the next level node of the node corresponding to the word at the current position in the dictionary tree; in response to the word at the next position of the current position in the word sequence 103 not existing in the word set corresponding to the target node set in the dictionary tree 102 and determining that the word at the current position is a word ending word, information representing whether the target sub-word sequence in the word sequence 103 can be combined into a target word is generated. In this application scenario, after multiple cycles, information representing that "blood, pressure, instrument" can be combined into a target word and information representing that "blood, pressure" can be combined into a target word can be generated. Wherein, the two nodes corresponding to each adjacent two words in the target sub-word sequence are in a node relationship of superior and subordinate in the dictionary tree 102 and the last word in the target sub-word sequence is the word ending word. In response to the determination of existence, the word at the next position is determined as the word at the current position and the above information generation step is performed.
[0039] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0040] It should be understood that Figure 1 The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.
[0041] Continue to refer to Figure 2 , which shows the flowchart 200 of some embodiments of the information generation method according to the present disclosure. The information generation method includes the following steps:
[0042] Step 201, obtain the pre-constructed trie tree and the character sequence obtained by splitting the sentence.
[0043] In some embodiments, the execution subject of the above information generation method (such as Figure 1 the electronic device 101 shown) can obtain the pre-constructed trie tree and the character sequence obtained by splitting the sentence through a wired connection method or a wireless connection method. Among them, each node in the above trie tree corresponds to a character and / or the character corresponding to the next-level node of the above node in the above trie tree. The above sentence can be user chat record information. The above character sequence can be obtained by splitting the sentence according to the character granularity.
[0044] It should be noted that the above wireless connection method can include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other currently known or future-developed wireless connection methods.
[0045] In some alternative implementation manners of some embodiments, the character sequence obtained by splitting the above sentence is generated through the following steps:
[0046] The first step is to split the target text into sentences. Among them, the above target text can be user communication records. As an example, the target text can be split into sentences through punctuation marks.
[0047] The second step, the above execution subject can split each sentence in the above sentences according to the character granularity to generate the character sequence corresponding to the above sentence.
[0048] In some alternative implementation manners of some embodiments, the trie tree is stored in the memory, and each node in the above trie tree corresponds to the information of whether the character is the end character of the word and / or the information of whether the character corresponding to the next-level node of the above node in the above trie tree is the above end character of the word.
[0049] It should be noted that the nodes in the trie tree can be implemented in the form of <key (key): value (value)>. Among them, the key of the node can include the character corresponding to the current node, and the value of the node can be the <key: value> of the next node of the current node. It should be noted that the above value of the node can be empty, indicating that there is no next node for the current node.
[0050] Here, the key of the node can be a structure of {word, isEnd, Type, Id}. Among them, word can be the current word. isEnd can be used to determine whether the current word is the ending word. Type can be expressed as: identifying the type of the current word. Among them, Type will only be determined when the current word is the ending word of a word. As an example, when the word is an instrument item, type=1. When the word is a drug item, type=2. When the word is a disease-related word, type=3. The Type in the key of the node can be used for business expansion. Id (Identity document) can be the identifier of the current word. Here. The Id in the key is mainly used for other retrieval needs to query detailed information after word matching. The Id value will only be determined when the current word is the ending word of a word.
[0051] As an example, the storage structure of the words corresponding to each node of the dictionary tree can be as follows Figure 3 As shown, the key of node 301 can be: {word = "blood"}. The key of the next level node 302 of node 301 can be: {word = "pressure", isEnd = true, type = 3, id = 4}. The key of the next level node 303 of node 301 can be: {word = "sugar", isEnd = true, type = 3, id = 4}. The key of the next level node 304 of node 302 can be: {word = "instrument", isEnd = true, type = 1, id = 5}. The key of the next level node 305 of node 303 can be: {word = "test"}. The key of the next level node 306 of node 305 can be: {word = "drug", isEnd = true, type = 1, id = 7}. The key of the next level node 307 of node 305 can be: {word = "paper", isEnd = true, type = 1, id = 8}. Among them, when the word is an instrument item, type = 1. If the word is a medicine, type = 2. If the word is a disease, type = 3. isEnd = true can indicate that the current word is the end of the word.
[0052] Step 202, in response to the existence of a node corresponding to the character at the current position in the character sequence in the dictionary tree, the following information generation steps are performed for the character at the current position:
[0053] Step 2021, in response to the existence of a next-level node corresponding to the node of the character at the current position in the dictionary tree, determine whether the character at the next position of the current position in the character sequence exists in the character set corresponding to the target node set in the dictionary tree.
[0054] In some embodiments, in response to the existence of a next-level node for the node corresponding to the character at the current position in the dictionary tree, the execution subject may determine whether the character at the next position of the current position in the character sequence exists in the character set corresponding to the target node set in the dictionary tree by traversing the dictionary data. The target node in the target node set is the next-level node of the node corresponding to the character at the current position in the dictionary tree. The current position may be any position in the character sequence. Since there may be at least one next-level node for the node corresponding to the character at the current position in the dictionary tree, it corresponds to at least one character.
[0055] As an example, there are node branches in the dictionary tree: "node corresponding to north" -> node corresponding to "Beijing" -> node corresponding to "sky" -> node corresponding to "sky" -> node corresponding to "door"". The above character sequence can be: "I, in, north, Beijing, sit, ground, iron". The character at the current position may be: "North". Furthermore, there is a node corresponding to the character at the current position in the above character sequence in the above dictionary tree, that is, the node corresponding to "North". In addition, there is a next-level node corresponding to the node at the current position in the above dictionary tree. Among them, the next-level node is: the node corresponding to "Beijing". Therefore, it is determined that the character at the next position of the above current position in the above character sequence exists in the character set corresponding to the target node set in the above dictionary tree. That is, the character at the next position of the position of "North" in "I, in, north, Beijing, sit, ground, iron" is "Beijing", which is the same as the "Beijing" corresponding to the node corresponding to "Beijing".
[0056] In some optional implementations of some embodiments, in response to the existence of a next-level node in the dictionary tree corresponding to the word at the current position, determining whether the word at the next position of the current position in the word sequence exists in the word set corresponding to the target node set in the dictionary tree may include the following steps:
[0057] In the first step, in response to the existence of a next-level node in the dictionary tree corresponding to the word at the current position, the execution subject may determine by querying and traversing whether a node corresponding to the word at the next position of the current position in the word sequence exists in the dictionary tree.
[0058] In the second step, in response to determining that the node corresponding to the character at the next position of the above-mentioned current position in the above-mentioned character sequence exists in the above-mentioned dictionary tree, the above-mentioned execution subject can determine whether the node corresponding to the character at the next position of the above-mentioned current position in the above-mentioned dictionary tree is the next-level node of the node corresponding to the character at the above-mentioned current position by query traversal.
[0059] In the third step, in response to determining that the word corresponding node at the next position of the current position in the dictionary tree is the next level node of the word corresponding node at the current position, the execution subject can determine by querying and traversing the word sequence that the word at the next position of the current position exists in the word set corresponding to the target node set in the dictionary tree. The target node in the target node set is the next level node of the word corresponding node at the current position in the dictionary tree.
[0060] Optionally, in response to determining that the node corresponding to the word at the next position of the current position in the dictionary tree is not the next-level node of the node corresponding to the word at the current position, the execution entity may determine by query traversal that the word at the next position of the current position in the word sequence does not exist in the word set corresponding to the target node set in the dictionary tree.
[0061] In some optional implementations of some embodiments, before step 2021, the steps further include:
[0062] In the first step, the execution subject can determine whether there is a next-level node in the word corresponding to the current position in the dictionary tree through various node query methods.
[0063] In a second step, in response to determining that there is no next-level node corresponding to the word node at the current position in the dictionary tree, the execution subject may determine the number of words in the target sub-word sequence in the word sequence;
[0064] Step 3: In response to determining that the number of characters is greater than a predetermined first threshold, the execution subject may determine whether the last character in the target sub-character sequence is the final character by a query method;
[0065] In the fourth step, in response to determining that the last character in the target sub-character sequence is not the final character, the execution subject may determine the character at the next position as the character at the current position and execute the information generation step.
[0066] Optionally, in response to determining that the last character in the target sub-character sequence is the word-ending character, the execution subject may generate information representing that the target sub-character sequence in the character sequence is combined into a target word.
[0067] Step 2022, in response to the character at the next position of the current position in the character sequence not existing in the character set corresponding to the target node set in the dictionary tree and determining that the character at the current position is a word ending character, generates information representing whether the target sub-character sequence in the character sequence can be combined into a target word.
[0068] In some embodiments, in response to the fact that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree and the character at the current position is determined to be a suffix character, the execution subject can generate information representing whether the target sub-character sequence in the character sequence can be combined into a target word. Among them, the two nodes corresponding to each two adjacent characters in the target sub-character sequence are in a superior-subordinate node relationship in the dictionary tree and the last character in the target sub-character sequence is the suffix character. The target word can be a continuous set of characters in the character sequence that can form a word. In addition, the target word can be a word in a predetermined word set.
[0069] As an example, there are node branches in the dictionary tree: "node corresponding to north" -> node corresponding to "Beijing" -> node corresponding to "sky" -> node corresponding to "sky" -> node corresponding to "door"". The above word sequence can be: "I, in, north, Beijing, sit, ground, iron". The word at the current position can be: "Beijing". Furthermore, there is a node corresponding to the word at the current position in the above word sequence in the above dictionary tree, that is, the node corresponding to "Beijing". In addition, there is a next-level node corresponding to the node at the current position in the above dictionary tree. However, the next-level node is: the node corresponding to "sky". The word after "Beijing" in the word sequence is "sit". That is, the above "sit" in the above word sequence is different from the "sky" of the node corresponding to "sky" in the above dictionary tree. Since "Beijing" is the end of a word. It should be noted that before "Beijing" was the word at the current position, "North" was the word at the current position in the previous cycle. Therefore, the target sub-word sequence can be: "North, Beijing". Furthermore, information that "North, Beijing" can be combined into a target word can be generated.
[0070] In some optional implementations of some embodiments, in response to the fact that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree and the character at the current position is determined to be a word-ending character, generating information representing whether the target sub-character sequence in the character sequence can be combined into a target word may include the following steps:
[0071] In the first step, in response to the fact that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree, the execution subject can determine whether the character at the next position is a word ending character by querying;
[0072] In a second step, in response to determining that the character at the next position is the final character, the execution subject may determine the number of characters in the target sub-character sequence;
[0073] In the third step, in response to determining that the number of characters is greater than a predetermined second threshold, the execution subject may generate information representing the target sub-character sequence in the character sequence combining the target word and record the target sub-character sequence. As an example, the target sub-character sequence may be stored in a related database.
[0074] Step 203, in response to determining existence, determining the word at the next position as the word at the current position and executing the above information generation step.
[0075] In some embodiments, in response to determining that the word at the next position of the current position in the word sequence exists in the word set corresponding to the target node set in the dictionary tree, the execution entity may determine the word at the next position as the word at the current position and execute the information generation step.
[0076] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: the information generation method of some embodiments of the present disclosure can use a dictionary tree to accurately and effectively determine each target word in the word sequence. Specifically, the algorithm time complexity of the determination process through the item vocabulary library is high, the matching calculation amount is large, and the number of iterations will double with the growth of the vocabulary library and the number of text segmentation words. The performance of identifying sensitive words is poor, which may cause recognition delays and poor overall experience. Based on this, the information generation method of some embodiments of the present disclosure can first obtain a pre-constructed dictionary tree and a word sequence after the sentence is split. Among them, each node in the above-mentioned dictionary tree corresponds to a word and / or a word corresponding to the next-level node of the above-mentioned node in the above-mentioned dictionary tree. Here, the above-mentioned dictionary tree is used for the generation of subsequent target sub-word sequences and the generation of information representing whether the target sub-word sequence in the above-mentioned word sequence can be combined into a target word. Then, in response to the existence of a node corresponding to the character at the current position in the character sequence in the above-mentioned dictionary tree, the following information generation steps are performed for the character at the above-mentioned current position: in response to the existence of a next-level node corresponding to the node at the above-mentioned current position in the above-mentioned dictionary tree, determine whether the character at the next position of the above-mentioned current position in the above-mentioned character sequence exists in the character set corresponding to the target node set in the above-mentioned dictionary tree, wherein the target node in the above-mentioned target node set is the next-level node of the node corresponding to the character at the above-mentioned current position in the above-mentioned dictionary tree; in response to the fact that the character at the next position of the above-mentioned current position in the above-mentioned character sequence does not exist in the character set corresponding to the target node set in the above-mentioned dictionary tree and it is determined that the character at the above-mentioned current position is a word-ending character, generate information representing whether the target sub-character sequence in the above-mentioned character sequence can be combined into a target word, wherein the two nodes corresponding to each two adjacent characters in the above-mentioned target sub-character sequence are in a node relationship of superior and subordinate in the above-mentioned dictionary tree and the last character in the above-mentioned target sub-character sequence is the above-mentioned word-ending character. Here, the above-mentioned information generation step can accurately and effectively determine the target word from the character sequence by generating information representing whether the target sub-character sequence in the above-mentioned character sequence can be combined into a target word. Finally, in response to the determination of existence, the character at the next position is determined as the character at the current position and the information generation step is performed. It can be seen that the information generation method can use the dictionary tree to accurately and effectively determine each target word in the character sequence.
[0077] Continue to refer Figure 4 , shows a process 400 of another embodiment of the information generation method according to the present disclosure. The information generation method comprises the following steps:
[0078] Step 401, obtain the pre-built dictionary tree and the word sequence after the sentence is split.
[0079] Step 402, in response to the existence of a node corresponding to the character at the current position in the character sequence in the dictionary tree, the following information generation steps are performed for the character at the current position:
[0080] Step 4021, in response to the existence of a next-level node corresponding to the word at the current position in the above trie, determine whether the word at the next position in the above word sequence exists in the word set corresponding to the target node set in the above trie.
[0081] Step 4022, in response to the word at the next position in the above word sequence not existing in the word set corresponding to the target node set in the above trie and determining that the word at the current position is the end word of a word, generate information indicating whether the target sub-word sequence in the above word sequence can be combined into a target word.
[0082] Step 4023, in response to determining non-existence and the word at the current position not being the end word of a word, determine the word at the next position as the word at the target position and execute the above information generation step.
[0083] In some embodiments, in response to determining non-existence and the word at the current position not being the end word of a word, the execution subject (such as Figure 1 the electronic device 101 shown) may determine the word at the next position as the word at the target position and execute the above information generation step.
[0084] As an example, there is a node branch in the trie: the node corresponding to "pull" -> the node corresponding to "noodles". The above word sequence may be: "I, am, in, Beijing, pull, goods". The word at the current position may be: "pull". Furthermore, there is no node corresponding to the word at the current position in the above word sequence in the above trie, that is, the node corresponding to "goods". Moreover, "pull" is not the end word of a word. Then, determine "goods" as the word at the target position and execute the above information generation step.
[0085] Step 403, in response to determining existence, determine the word at the next position as the word at the current position and execute the above information generation step.
[0086] In some embodiments, the specific implementations and the technical effects brought about by 4021, 4022, and 403 in steps 401 and 402 may refer to Figure 2 steps 201 - 203 in the corresponding embodiments, which will not be elaborated here.
[0087] From Figure 4 it can be seen that compared with the description of Figure 2 the corresponding embodiments, Figure 4The process 400 of the information generation method in some corresponding embodiments reflects the specific steps of information generation in response to the character at the next position of the current position in the character sequence not existing in the character set corresponding to the target node set in the dictionary tree and the character at the current position is not the word ending character. Therefore, the schemes described in these embodiments can more comprehensively and accurately utilize the dictionary tree to determine each target word from the character sequence.
[0088] Continue to refer Figure 5 As an implementation of the above methods in the above figures, the present disclosure provides some embodiments of an information generating device, and these device embodiments are Figure 2 Corresponding to the above method embodiments, the device can be specifically applied to various electronic devices.
[0089] like Figure 5 As shown, the information generating device 500 of some embodiments includes: an acquisition unit 501, an information generating unit 502 and a determining unit 503. The acquisition unit 501 is configured to acquire a pre-built dictionary tree and a word sequence after the sentence is split, wherein each node in the above dictionary tree corresponds to a word and / or a word corresponding to the next level node of the above node in the above dictionary tree. The information generating unit 502 is configured to, in response to the existence of a node corresponding to the character at the current position in the character sequence in the dictionary tree, perform the following information generating steps for the character at the current position: in response to the existence of a next-level node corresponding to the node at the current position in the dictionary tree, determine whether the character at the next position of the current position in the character sequence exists in the character set corresponding to the target node set in the dictionary tree, wherein the target node in the target node set is the next-level node of the node corresponding to the character at the current position in the dictionary tree; in response to the fact that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree and the character at the current position is determined to be a word ending character, generate information representing whether the target sub-character sequence in the character sequence can be combined into a target word, wherein the two nodes corresponding to each adjacent two characters in the target sub-character sequence are in a node relationship of upper and lower levels in the dictionary tree and the last character in the target sub-character sequence is the word ending character. The determining unit 503 is configured to, in response to the determination of existence, determine the character at the next position as the character at the current position and perform the above information generating steps.
[0090] In some optional implementations of some embodiments, the information generating device 500 further includes: a node determination unit, a word number determination unit, a word ending word determination unit and a first word determination unit (not shown in the figure). Among them, the node determination unit is configured to: determine whether there is a next-level node for the word corresponding node at the current position in the dictionary tree. The word number determination unit is configured to: in response to determining that there is no next-level node for the word corresponding node at the current position in the dictionary tree, determine the number of words in the target sub-word sequence in the word sequence. The word ending word determination unit is configured to: in response to determining that the number of words is greater than a predetermined first threshold, determine whether the last word in the target sub-word sequence is the word ending word. The first word determination unit is configured to: in response to determining that the last word in the target sub-word sequence is not the word ending word, determine the word at the next position as the word at the current position and perform the information generating step.
[0091] In some optional implementations of some embodiments, the information generating device 500 further includes: an information generating unit. The information generating unit is configured to: in response to determining that the last character in the target sub-character sequence is the word-ending character, generate information representing that the target sub-character sequence in the character sequence is combined into a target word.
[0092] In some optional implementations of some embodiments, the information generation unit 502 of the above-mentioned information generation device 500 can be further configured to: in response to the existence of a next-level node in the node corresponding to the character at the above-mentioned current position in the above-mentioned dictionary tree, determine whether the node corresponding to the character at the next position of the above-mentioned current position in the above-mentioned word sequence exists in the above-mentioned dictionary tree; in response to determining that it exists, determine whether the node corresponding to the character at the next position of the above-mentioned current position in the above-mentioned dictionary tree is the next-level node of the node corresponding to the character at the above-mentioned current position; in response to determining that it is, determine that the character at the next position of the above-mentioned current position in the above-mentioned word sequence exists in the character set corresponding to the target node set in the above-mentioned dictionary tree.
[0093] In some optional implementations of some embodiments, the information generation unit 502 of the above-mentioned information generation device 500 can be further configured to: in response to determining that it is not, determine that the word at the next position of the above-mentioned current position in the above-mentioned word sequence does not exist in the word set corresponding to the target node set in the above-mentioned dictionary tree.
[0094] In some optional implementations of some embodiments, the information generation unit 502 of the above-mentioned information generation device 500 can be further configured to: in response to the fact that the character at the next position of the above-mentioned current position in the above-mentioned character sequence does not exist in the character set corresponding to the target node set in the above-mentioned dictionary tree, determine whether the character at the above-mentioned next position is a word-ending character; in response to determining that the character at the above-mentioned next position is the above-mentioned word-ending character, determine the number of characters in the above-mentioned target sub-character sequence; in response to determining that the above-mentioned number of characters is greater than a predetermined second threshold, generate information representing the target sub-character sequence in the above-mentioned character sequence combining the above-mentioned target word and record the above-mentioned target sub-character sequence.
[0095] In some optional implementations of some embodiments, the information generating device 500 further includes: a second character determining unit. The second character determining unit is configured to: in response to the character at the next position of the current position in the character sequence not existing in the character set corresponding to the target node set in the dictionary tree and the character at the current position is not the word-ending character, determine the character at the next position as the character at the target position and perform the information generating step.
[0096] It is understood that the units described in the device 500 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 500 and the units included therein, and will not be described in detail here.
[0097] Reference below Figure 6 , which shows a structural schematic diagram of an electronic device 600 suitable for implementing some embodiments of the present disclosure. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0098] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0099] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0100] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0101] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0102] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with 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"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0103] The computer-readable medium may be included in the device; or it may exist independently and not be installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a pre-constructed dictionary tree and a word sequence after the sentence is split, wherein each node in the dictionary tree corresponds to a word and / or a word corresponding to the next level node of the node in the dictionary tree; in response to the existence of a node corresponding to the word at the current position in the word sequence in the dictionary tree, the following information generation step is performed for the word at the current position: in response to the existence of a next level node corresponding to the node at the current position in the dictionary tree, determine whether the word at the next position of the current position in the word sequence exists in the word set corresponding to the target node set in the dictionary tree, Among them, the target node in the above-mentioned target node set is the next-level node of the node corresponding to the word at the above-mentioned current position in the above-mentioned dictionary tree; in response to the word at the next position of the above-mentioned current position in the above-mentioned word sequence not existing in the word set corresponding to the target node set in the above-mentioned dictionary tree and determining that the word at the above-mentioned current position is a word-ending word, generate information representing whether the target sub-word sequence in the above-mentioned word sequence can be combined into a target word, wherein the two nodes corresponding to each two adjacent words in the above-mentioned target sub-word sequence are in a node relationship of superior and subordinate in the above-mentioned dictionary tree and the last word in the above-mentioned target sub-word sequence is the above-mentioned word-ending word; in response to the determination of existence, the word at the above-mentioned next position is determined as the word at the current position and the above-mentioned information generation step is executed.
[0104] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0105] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0106] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The described units may also be arranged in a processor, for example, may be described as: a processor comprising: an acquisition unit, an information generation unit, and a determination unit. The names of these units do not constitute a limitation on the units themselves in certain cases, for example, the acquisition unit may be described as "a unit for acquiring a pre-built dictionary tree and a word sequence after the sentence is split".
[0107] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0108] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for generating information, comprising: Obtaining a pre-constructed dictionary tree and a word sequence after the sentence is split, wherein each node in the dictionary tree corresponds to a word and / or a word corresponding to a node at a lower level of the node in the dictionary tree; In response to the existence of a node corresponding to the word at the current position in the word sequence in the dictionary tree, the following information generation steps are performed for the word at the current position: In response to the existence of a next-level node of the node corresponding to the word at the current position in the dictionary tree, determining whether the word at the next position of the current position in the word sequence exists in a word set corresponding to a target node set in the dictionary tree, wherein the target node in the target node set is a next-level node of the node corresponding to the word at the current position in the dictionary tree; In response to the fact that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree and the character at the current position is determined to be a word-ending character, information representing whether a target sub-character sequence in the character sequence can be combined into a target word is generated, wherein two nodes corresponding to each two adjacent characters in the target sub-character sequence are in a superior-subordinate node relationship in the dictionary tree and the last character in the target sub-character sequence is the word-ending character; In response to determining that it exists, the word at the next position is determined to be the word at the current position and the information generating step is performed.
2. The method according to claim 1, wherein: Before determining whether the word at the next position of the current position in the word sequence exists in the word set corresponding to the target node set in the word tree in response to the existence of a next-level node corresponding to the word at the current position in the word tree, the method further includes: Determine whether there is a next-level node corresponding to the word at the current position in the dictionary tree; In response to determining that there is no next-level node corresponding to the word node at the current position in the dictionary tree, determining the number of words in the target sub-word sequence in the word sequence; In response to determining that the word number is greater than a predetermined first threshold, determining whether the last word in the target subword sequence is the word-ending word; In response to determining that the last word in the target sub-word sequence is not the word-ending word, the word at the next position is determined to be the word at the current position and the information generating step is performed.
3. The method according to claim 2, wherein: The method further comprises: In response to determining that the last word in the target sub-word sequence is the word-ending word, information representing that the target sub-word sequence in the word sequence is combined into a target word is generated.
4. The method according to claim 1, wherein: In response to the existence of a next-level node for the node corresponding to the word at the current position in the dictionary tree, determining whether the word at the next position of the current position in the word sequence exists in a word set corresponding to a target node set in the dictionary tree, comprises: In response to the existence of a next-level node in the dictionary tree corresponding to the word at the current position, determining whether a node corresponding to the word at the next position of the current position in the word sequence exists in the dictionary tree; In response to determining that it exists, determining whether the word corresponding node at the next position of the current position in the dictionary tree is a next-level node of the word corresponding node at the current position; In response to the determination being yes, it is determined that the word at the next position of the current position in the word sequence exists in the word set corresponding to the target node set in the dictionary tree.
5. The method according to claim 4, wherein: The method further comprises: In response to determining that it is not, it is determined that the word at the next position of the current position in the word sequence does not exist in the word set corresponding to the target node set in the dictionary tree.
6. The method according to claim 1, wherein: In response to the fact that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree and the character at the current position is determined to be a word ending character, generating information indicating whether the target sub-character sequence in the character sequence can be combined into a target word, comprises: In response to the word at the next position of the current position in the word sequence not existing in the word set corresponding to the target node set in the dictionary tree, determining whether the word at the next position is a word ending word; In response to determining that the character at the next position is the word-ending character, determining the number of characters in the target sub-character sequence; In response to determining that the word number is greater than a predetermined second threshold, information characterizing a target sub-word sequence in the word sequence combining the target word is generated and the target sub-word sequence is recorded.
7. The method according to claim 1, wherein: After the step of generating information indicating whether a target sub-word sequence in the word sequence can be combined into a target word in response to the word at the next position of the current position in the word sequence not existing in the word set corresponding to the target node set in the dictionary tree and determining that the word at the current position is a word ending word, the method further comprises: In response to the fact that the character at the next position of the current position in the character sequence does not exist in the character set corresponding to the target node set in the dictionary tree and the character at the current position is not the word-ending character, the character at the next position is determined as the character at the target position and the information generation step is performed.
8. The method according to claim 1, wherein: The word sequence after the sentence is split is generated by the following steps: Split the target text into sentences to obtain individual sentences; Each of the sentences is split into word granularities to generate a word sequence corresponding to the sentence.
9. The method according to claim 1, wherein: The dictionary tree is stored in the memory, and each node in the dictionary tree corresponds to information on whether a character is a final character and / or information on whether a character corresponding to a next-level node of the node in the dictionary tree is the final character.
10. An information generating device, comprising: An acquisition unit is configured to acquire a pre-built dictionary tree and a word sequence after the sentence is split, wherein each node in the dictionary tree corresponds to a word and / or a word corresponding to a node at a lower level of the node in the dictionary tree; The information generating unit is configured to, in response to the existence of a node corresponding to the word at the current position in the word sequence in the dictionary tree, perform the following information generating steps for the word at the current position: in response to the existence of a next-level node for the node corresponding to the word at the current position in the dictionary tree, determine whether the word at the next position of the current position in the word sequence exists in the word set corresponding to the target node set in the dictionary tree, wherein the target node in the target node set is the next-level node of the node corresponding to the word at the current position in the dictionary tree; in response to the word at the next position of the current position in the word sequence not existing in the word set corresponding to the target node set in the dictionary tree and determining that the word at the current position is a word-ending word, generate information representing whether a target sub-word sequence in the word sequence can be combined into a target word, wherein the two nodes corresponding to each two adjacent words in the target sub-word sequence are in a node relationship of superior and subordinate in the dictionary tree and the last word in the target sub-word sequence is the word-ending word; A determination unit is configured to, in response to determining the existence, determine the word at the next position as the word at the current position and execute the information generation step.
11. An electronic device, comprising: one or more processors; A storage device 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 are enabled to implement the method according to any one of claims 1 to 9.
12. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
