Data processing method and device, electronic equipment and computer readable storage medium

By combining a thesaurus and a knowledge graph, the problem of difficulty in expanding thesaurus in traditional methods is solved, the diversity and accuracy of thesaurus mining are realized, and the quality of thesaurus recall and retrieval efficiency of intelligent text customer service system are improved.

CN116150396BActive Publication Date: 2026-07-21MASHANG CONSUMER FINANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MASHANG CONSUMER FINANCE CO LTD
Filing Date
2023-01-03
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional synonym mining methods struggle to quickly expand synonyms in niche areas, especially for store names and airport/aviation entity terms, as they fail to accurately reflect actual user input.

Method used

By acquiring standard words and phrases and candidate word and phrase sets, and utilizing a thesaurus and a pre-built knowledge graph, various thesaurus expansion processes are performed, including a homophone and homograph graph and a homophone and synonym graph, to optimize the retrieval of homophones, similar-looking characters, homophones, and synonyms.

Benefits of technology

It improves the diversity and accuracy of synonym mining, enhances the quality of synonym recall, reduces maintenance costs, and improves retrieval efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116150396B_ABST
    Figure CN116150396B_ABST
Patent Text Reader

Abstract

The disclosure provides a data processing method and device, electronic equipment and readable storage medium, the method comprising: obtaining a standard word sentence to be mined and a candidate word sentence set; obtaining a candidate word sentence matched with the standard word sentence from the candidate word sentence set, and adding the matched candidate word sentence to a synonym set of the standard word sentence; performing first synonym expansion processing on the standard word sentence and the matched candidate word sentence by using a synonym dictionary to obtain a first expanded word sentence, and adding the first expanded word sentence to the synonym set; performing second synonym expansion processing on the standard word sentence and the matched candidate word sentence by using a pre-constructed knowledge graph to obtain a second expanded word sentence, and adding the second expanded word sentence to the synonym set; the knowledge graph comprises a homophone and homograph graph and a homophone and synonym graph, the homophone and homograph graph comprises a corresponding relationship among word pinyin, homophone and homograph, and the homophone and synonym graph comprises a corresponding relationship among word pinyin, homophone and synonym.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a data processing method and apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] In the field of intelligent text-based customer service, to effectively match non-standard business terms in user input text, entity recall needs to be achieved by constructing entity synonyms. However, traditional synonym mining methods struggle to quickly expand synonyms in specific domains, such as store names and airport / aviation entity terms, as the descriptions in the text are relatively fixed and difficult to match with the user's actual input. Summary of the Invention

[0003] This disclosure provides a data processing method and apparatus, an electronic device, and a computer-readable storage medium.

[0004] In a first aspect, this disclosure provides a data processing method, which includes:

[0005] Obtain the standard words and phrases to be mined and the candidate word and phrase set, wherein the candidate word and phrase set includes multiple candidate words and phrases;

[0006] Obtain candidate words and phrases that match the standard words and phrases from the candidate word and phrase set, and add the matching candidate words and phrases to the synonym set of the standard words and phrases;

[0007] The standard phrase and the matching candidate phrase are expanded using a thesaurus to obtain a first expanded phrase, and the first expanded phrase is added to the thesaurus set.

[0008] The standard phrase and the matching candidate phrase are expanded using a pre-constructed knowledge graph to obtain a second expanded phrase, and the second expanded phrase is added to the synonym set.

[0009] The knowledge graph includes a homophone graph and a homophone and synonym graph. The homophone graph includes the correspondence between the pinyin of characters, homophones, and similar-looking characters. The homophone and synonym graph includes the correspondence between the pinyin of words, homophones, and synonyms.

[0010] Secondly, this disclosure provides a data processing apparatus, which includes:

[0011] The acquisition unit is configured to acquire standard words and phrases to be mined and a set of candidate words and phrases, wherein the set of candidate words and phrases includes multiple candidate words and phrases;

[0012] The matching unit is configured to obtain candidate words that match the standard word from the candidate word set, and add the matching candidate words to the synonym set of the standard word;

[0013] The first expansion unit is configured to perform a first synonym expansion process on the standard phrase and the matching candidate phrase using a thesaurus to obtain a first expanded phrase, and add the first expanded phrase to the thesaurus set;

[0014] The second expansion unit is configured to use a pre-built knowledge graph to perform second synonym expansion processing on the standard phrase and the matching candidate phrase to obtain a second expanded phrase, and add the second expanded phrase to the synonym set;

[0015] The knowledge graph includes a homophone graph and a homophone and synonym graph. The homophone graph includes the correspondence between the pinyin of characters, homophones, and similar-looking characters. The homophone and synonym graph includes the correspondence between the pinyin of words, homophones, and synonyms.

[0016] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the data processing method described above.

[0017] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described data processing method.

[0018] According to the data processing methods, apparatus, electronic devices, and computer-readable storage media provided in this disclosure, on the one hand, by expanding the synonym mining through various methods, the diversity of the mined synonyms is ensured, the synonym mining effect is improved, and the mined synonyms are made more closely aligned with the user's actual input, thereby improving the quality of synonym recall. On the other hand, by optimizing the retrieval of homophones, similar-looking characters, homonyms, and synonyms through knowledge graph storage, the retrieval and maintenance methods are facilitated. Multiple searches are eliminated during retrieval, improving retrieval efficiency, and the elimination of the need to maintain multiple dictionaries reduces maintenance costs.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0020] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:

[0021] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this disclosure;

[0022] Figure 2 This is a flowchart illustrating a specific implementation method for obtaining a candidate word / phrase set;

[0023] Figure 3 for Figure 1 A flowchart illustrating a specific implementation of step S12;

[0024] Figure 4 for Figure 1 A flowchart illustrating a specific implementation of step S13;

[0025] Figure 5 for Figure 1 A flowchart illustrating a specific implementation of step S14;

[0026] Figure 6 for Figure 1 A flowchart illustrating another specific implementation of step S14;

[0027] Figure 7 for Figure 1 A flowchart illustrating another specific implementation of step S14;

[0028] Figure 8 This is a flowchart illustrating a specific implementation method for constructing a knowledge graph;

[0029] Figure 9 This is a schematic diagram of some homophones in a homophone character set;

[0030] Figure 10 This is a schematic diagram of some homographs in a homograph font library;

[0031] Figure 11 This is a schematic diagram of some homophones in a homophone dictionary;

[0032] Figure 12 This is a diagram illustrating a portion of the synonyms in a thesaurus.

[0033] Figure 13 This is a partial schematic diagram of a knowledge graph.

[0034] Figure 14 A block diagram of a data processing apparatus provided in an embodiment of this disclosure;

[0035] Figure 15 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0036] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0037] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0038] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0039] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0040] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0041] According to the data processing method provided in this disclosure, on the one hand, by expanding the synonym mining through various expansion methods, the diversity of the mined synonyms is ensured, the synonym mining effect is improved, and the mined synonyms are more closely related to the user's actual input, thereby improving the quality of synonym recall. On the other hand, by optimizing the retrieval of homophones, similar-looking characters, homonyms, and synonyms through knowledge graph storage, the retrieval and maintenance methods are facilitated. Multiple searches are not required during retrieval, which improves retrieval efficiency, and multiple dictionaries do not need to be maintained separately, thus reducing maintenance costs.

[0042] According to the data processing method of this disclosure, the data processing method can be applied to any scenario that requires text entity recall. Accordingly, the data processing method can be applied to products corresponding to these scenarios, such as intelligent text customer service systems, search systems, etc.

[0043] The data processing method according to embodiments of this disclosure can be executed by an electronic device. This electronic device can be a terminal device, such as an in-vehicle device, user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, wearable device, etc. The electronic device can also be a server, which can be a standalone physical server, a server cluster, or a cloud server capable of cloud computing. Specifically, the data processing method can be implemented by a processor in the electronic device calling computer-readable program instructions stored in its memory.

[0044] Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of the present disclosure, with reference to... Figure 1 The data processing method includes:

[0045] Step S11: Obtain the standard words and phrases to be mined and the candidate word and phrase set. The candidate word and phrase set includes multiple candidate words and phrases.

[0046] In step S11, the standard terms to be mined can be determined according to the specific business scenario. Standard terms are entity words or entity phrases defined in the business scenario. For example, in the intelligent airport reception business scenario, in order to effectively match non-standard business vocabulary involved in the user input text, the intelligent text customer service system in this business scenario needs to perform entity synonym mining generalization. The entity synonym mining generalization can be completed by algorithm engineers. When performing synonym mining, it is first necessary to obtain one or more standard terms to be mined in this business scenario. For example, in this business scenario, the multiple standard terms to be mined are "Sichuan Airlines", "China Southern Airlines", "Hainan Airlines", "Thai Lion Air", "Qatar Airways", etc.

[0047] In step S11, standard phrases can be searched through a search engine, and candidate phrases can be extracted from the search results to obtain a set of candidate phrases to be matched.

[0048] Step S12: Obtain candidate words and phrases that match the standard words and phrases from the candidate word and phrase set, and add the matching candidate words and phrases to the synonym set of the standard words and phrases.

[0049] In this embodiment of the disclosure, candidate words that match the standard words are determined by calculating the similarity between the target words and candidate words. Candidate words that match the standard words refer to candidate words that have a similarity greater than a preset threshold with the standard words. Candidate words that match the standard words are added to the synonym set of the standard words as synonyms of the standard words.

[0050] Step S13: Use a thesaurus to perform first synonym expansion on the standard phrase and the matched candidate phrase to obtain the first expanded phrase, and add the first expanded phrase to the thesaurus set.

[0051] In this embodiment of the disclosure, the synonyms of each word in each phrase are retrieved by a thesaurus, and the synonyms of each phrase are expanded by synonym replacement to obtain at least one first expanded phrase. The first expanded phrase is then added to the synonym set of the standard phrase as a synonym of the standard phrase.

[0052] Among them, the thesaurus is a pre-acquired thesaurus, which can contain the synonyms for each of multiple words.

[0053] Step S14: Use the pre-constructed knowledge graph to perform second synonym expansion processing on the standard words and matching candidate words to obtain the second expanded words and add the second expanded words and add them to the synonym set.

[0054] The pre-constructed knowledge graph includes a homophone graph and a homophone and synonym graph. The homophone graph includes the correspondence between the pinyin of characters, homophones, and similar-looking characters. The homophone and synonym graph includes the correspondence between the pinyin of words, homophones, and synonyms.

[0055] In this embodiment of the disclosure, homophones and homographs of each character in each word and phrase are retrieved by a pre-constructed knowledge graph, as well as homophones and synonyms of each word. The synonyms of each word and phrase are expanded by replacing homophones, homographs, homographs, and synonyms to obtain at least one second expanded word and phrase. The second expanded word and phrase is then added to the synonym set of the standard word and phrase as a synonym of the standard word and phrase.

[0056] According to the technical solution of the data processing method provided in this disclosure, on the one hand, by expanding the synonym mining through various expansion methods, the diversity of the mined synonyms is ensured, the synonym mining effect is improved, and the mined synonyms are more closely related to the user's actual input, thereby improving the quality of synonym recall. On the other hand, by optimizing the retrieval of homophones, similar-looking characters, homonyms, and synonyms through knowledge graph storage, the retrieval of homophones, homonyms, and synonyms is facilitated, and maintenance is made easier. Multiple searches are not required during retrieval, which improves retrieval efficiency, and multiple dictionaries do not need to be maintained separately, thus reducing maintenance costs.

[0057] Figure 2 This is a flowchart illustrating a specific implementation method for obtaining a candidate word / phrase set. In some embodiments, such as... Figure 2 As shown, the candidate word and phrase set can be obtained in the following ways:

[0058] Step S21: Input the standard phrase as a search term into the search engine to obtain the search results page, which contains multiple search results web pages.

[0059] The search results page is the page where the search engine retrieves the corresponding search results for the input search term and displays the results. The search results webpage is the webpage link of the search results corresponding to the search term retrieved by the search engine. The search engine can be any search engine, and this embodiment of the disclosure does not impose any special restrictions on it.

[0060] Step S22: Extract the webpage text content from the specified search results webpage in the search results page.

[0061] Before conducting a standard term search, analyze the characteristics of the standard terms and determine the scope of web page content to be extracted. For example, each retrieved search result web page, encyclopedia page, official website page, etc. in the first page of search results for the standard terms can be used as a specified search result web page, and the web page text content can be extracted from the specified search result web page.

[0062] Step S23: Extract candidate phrases and sentences from the web page text content to obtain a set of candidate phrases and sentences to be matched.

[0063] After obtaining the web page text content, perform data preprocessing on the web page text content. Data preprocessing includes data cleaning, data processing, etc. Data cleaning includes deleting duplicate data, error data, illegal character data, spaces and other "dirty" data. Data processing includes operations such as sentence splitting and stop word removal on the web page text content. Stop word removal means removing words that have no contribution to the text features, such as punctuation marks, modal particles, words like "de" (的 in Chinese).

[0064] Exemplarily, taking the standard phrase "Sichuan Airlines" as an example for searching, the web page text content extracted from the encyclopedia web page on the search result page is "Sichuan Airlines Co., Ltd., Legal representative: xxx, Registered capital: 1xxxx million yuan, Address: Aviation Building, Shuangliu International Airport, Chengdu, Business scope: Domestic (including Hong Kong, Macao and Taiwan), international air passenger and cargo transportation services; General cargo transportation; Aircraft / airframe, aircraft components, special operation maintenance; Accommodation; Class II motor vehicle maintenance (small vehicle maintenance) (only for branches); Sichuan Airlines Bar - Baidu Tieba". After splitting the web page text content according to punctuation marks and performing the above data preprocessing on the web page text content, multiple candidate phrases and sentences are obtained, such as "Sichuan Airlines Co., Ltd.", "Legal representative", "Registered capital", etc. The multiple candidate phrases and sentences form a set of candidate phrases and sentences to be matched.

[0065] In some embodiments, it is possible to simulate human operation of the browser page based on the python + selenium tool to achieve automatic input of the standard phrase, automatic click on the search, and automatic extraction of the web page text content.

[0066] By obtaining the data of the candidate phrases and sentences to be matched through the above-mentioned method of obtaining candidate phrases and sentences, a large amount of candidate corpus for synonym mining can be obtained, making the data acquisition more flexible. And the candidate phrase and sentence data is obtained by searching the standard phrases in the business scenario. Therefore, the above-mentioned method of obtaining candidate phrases and sentences can be applied to the synonym expansion of standard phrases in different scenarios.

[0067] Figure 3 For Figure 1 a schematic flow diagram of a specific implementation manner of step S12 in Figure 3 As shown, the step of obtaining the candidate phrase and sentence that matches the standard phrase from the set of candidate phrases and sentences, that is, step S12, may further include:

[0068] Step S31: For each candidate phrase and sentence in the set of candidate phrases and sentences, calculate the similarity between the standard phrase and the candidate phrase and sentence.

[0069] In this embodiment of the disclosure, similarity represents the edit distance between the standard phrase and the candidate phrase. The higher the similarity, the higher the probability that the standard phrase and the candidate phrase are synonymous.

[0070] In some embodiments, the Jaro-WinklerDistance algorithm integrated in the TextDistance third-party library can be invoked to calculate the edit distance, i.e., similarity, between the standard word phrase and the candidate word phrase. The Jaro-WinklerDistance algorithm is a string metric that measures the edit distance between two character sequences.

[0071] Step S32: Select candidate words and phrases with a similarity greater than a preset threshold as candidate words and phrases to match the standard words and phrases.

[0072] The preset threshold can be configured according to actual needs. For example, the preset threshold can be configured to 0.6. After calculating the similarity between the standard sentence and the candidate sentence, when the similarity between the standard sentence and the candidate sentence is greater than 0.6, the candidate sentence will be used as the candidate sentence to match the standard sentence.

[0073] Figure 4 for Figure 1 A flowchart illustrating a specific implementation of step S13 is shown in some embodiments, such as... Figure 4 As shown, the step of using a thesaurus to expand the standard phrase and the matched candidate phrases to obtain the first expanded phrase, i.e., step S13, may further include:

[0074] Step S41: For each word in the standard word and the matched candidate word, perform word segmentation.

[0075] For example, taking the standard phrase "Sichuan Airlines" as an example, word segmentation of "Sichuan Airlines" can yield three words: "Sichuan", "aviation", and "Sichuan Airlines".

[0076] Step S42: Use a thesaurus to retrieve the synonyms for each word segment of the sentence.

[0077] For example, taking the standard phrase "Sichuan Airlines" as an example, the synonym dictionary records synonyms for "Sichuan" including "Sichuan", "Rongcheng", "Tianfu", etc., and synonyms for "aviation" including "aviation", etc., and synonyms for "Sichuan Airlines" including "3U", "SiChuan Airlines", "SiChuan Airlines Co., Ltd", "Sichuan Airlines", etc.

[0078] Step S43: Replace at least one segmented word in the sentence with its corresponding synonym to obtain at least one first expanded sentence.

[0079] In the embodiments of the present disclosure, any segmented word in the sentence can be replaced with its corresponding synonym to obtain a first expanded word, or multiple segmented words in the sentence can be separately replaced with their corresponding synonyms to obtain a first expanded word. The embodiments of the present disclosure do not impose special restrictions on the replacement method, as long as a new sentence is obtained after the synonym replacement.

[0080] For example, taking the standard sentence as "Sichuan Airlines", by replacing "Sichuan" in "Sichuan Airlines" with the synonym "Chengdu", a new sentence "Chengdu Airlines" is obtained as the first expanded sentence.

[0081] Another example is to replace "Sichuan Airlines" in "Sichuan Airlines" with the synonym "Chuanhang" to obtain a new sentence "Chuanhang" as the first expanded sentence.

[0082] Figure 5 For Figure 1 is a flowchart of a specific implementation manner of step S14 in the middle. In some embodiments, as Figure 5 shown, the step of performing second synonym expansion processing on the standard sentence and the matching candidate sentences using the pre-constructed knowledge graph to obtain the second expanded sentence, that is, step S14, may further include:

[0083] Step S51: For each sentence in the standard sentence and the matching candidate sentences, input the pinyin of each character in the sentence into the knowledge graph for homophone and near-form character retrieval to obtain the homophones and near-form characters corresponding to each character in the sentence.

[0084] In some embodiments, the third-party library pypinyin based on python can be used to obtain the pinyin of each character in the sentence, and input the pinyin of each character in the sentence into the knowledge graph for homophone and near-form character retrieval.

[0085] Step S52: Replace at least one character in the sentence with its corresponding homophone or near-form character to obtain at least one second expanded sentence.

[0086] In the embodiments of the present disclosure, any character in the sentence can be replaced with its corresponding homophone to obtain a second expanded word, or any character in the sentence can be replaced with its corresponding near-form character to obtain a second expanded word. It is also possible to separately replace multiple characters in the sentence with their corresponding homophones or near-form characters to obtain a second expanded word. The embodiments of the present disclosure do not impose special restrictions on the replacement method, as long as a new sentence is obtained after the homophone or near-form character replacement.

[0087] For example, taking the standard phrase "Sichuan Airlines" as an example, one of the homophones of "four" is "tear". Replacing "four" with "tear" in "Sichuan Airlines" yields the new phrase "Tear Sichuan Airlines", which can be used as the second expanded phrase.

[0088] For example, taking the standard phrase "Sichuan Airlines" as an example, one of the similar-looking characters for "air" is "anti". Replacing "air" with "anti" in "Sichuan Airlines" yields the new phrase "Sichuan Anti-Air", which can be used as the second expanded phrase.

[0089] Figure 6 for Figure 1 A flowchart illustrating another specific implementation of step S14 is shown in some embodiments, such as... Figure 6 As shown, the step of using a pre-constructed knowledge graph to perform second synonym expansion processing on the standard phrase and the matched candidate phrases to obtain the second expanded phrase, i.e., step S14, can further include:

[0090] Step S61: Input the pinyin of each word in the sentence into the knowledge graph to search for homophones and synonyms, and obtain the homophones and synonyms corresponding to each word in the sentence.

[0091] In some embodiments, the third-party Python library pypinyin can be used to obtain the pinyin of each word in the sentence, and the pinyin of each word in the sentence can be input into a knowledge graph for homophone and homograph retrieval.

[0092] Step S62: Replace at least one word in the phrase with a corresponding homophone or synonym to obtain at least one second expanded phrase.

[0093] In this embodiment of the disclosure, any word in the phrase can be replaced with a corresponding homophone to obtain a second extended word, or any word in the phrase can be replaced with a corresponding synonym to obtain a second extended word, or multiple words in the phrase can be replaced with corresponding homophones or synonyms to obtain a second extended word. This embodiment of the disclosure does not impose any special restrictions on the replacement method, as long as a new phrase is obtained after replacing with homophones or synonyms.

[0094] For example, taking the standard phrase "Sichuan Airlines" as an example, a homonym of "Sichuan" is "Sichuan". Replacing "Sichuan" with "Sichuan Airlines" results in the new phrase "Sichuan Airlines", which can be used as the second expanded phrase.

[0095] For example, taking the standard phrase "Sichuan Airlines" as an example, a synonym for "Sichuan" is "Rongcheng". Replacing "Sichuan" with "Rongcheng" in "Sichuan Airlines" results in the new phrase "Rongcheng Airlines", which can be used as the second expanded phrase.

[0096] Figure 7 for Figure 1 A flowchart illustrating another specific implementation of step S14 is shown in some embodiments, such as... Figure 7 As shown, the step of using a pre-constructed knowledge graph to perform second synonym expansion processing on the standard phrase and the matched candidate phrases to obtain the second expanded phrase, i.e., step S14, can further include:

[0097] Step S71: For each word in the standard word and the matching candidate word, input the pinyin of each character in the word into the knowledge graph to search for homophones and homographs, and obtain the homophones and similar-looking characters corresponding to each character in the word.

[0098] Step S72: Replace at least one character in the phrase with a corresponding homophone or similar-looking character to obtain at least one second expanded phrase.

[0099] Step S73: Input the pinyin of each word in the sentence into the knowledge graph to search for homophones and synonyms, and obtain the homophones and synonyms corresponding to each word in the sentence.

[0100] Step S74: Replace at least one word in the phrase with a corresponding homophone or synonym to obtain at least one second expanded phrase.

[0101] Figure 8 This is a flowchart illustrating a specific implementation method for constructing a knowledge graph. In some embodiments, such as... Figure 8 As shown, before obtaining the standard words and phrases and candidate word and phrase sets to be mined, this data processing method also includes the step of constructing a knowledge graph, which includes:

[0102] Step S81: Obtain the correspondence between the pinyin, homophones, and similar-looking characters by using the pre-acquired homophone and homograph character databases.

[0103] Figure 9 This is a schematic diagram of some homophones in a homophone character database. In this embodiment, the homophone character database is a pre-acquired database that categorizes Chinese characters according to their pinyin pronunciation. Homophones refer to a group of characters with the same pinyin. This embodiment does not impose special restrictions on the method of obtaining the homophone character database, as long as it can achieve the goal of categorizing Chinese characters according to their pinyin pronunciation to obtain the homophone character database. The homophone character database contains the correspondence between the pinyin of each character and its homophones. For example, as shown... Figure 9As shown, the homophonic characters corresponding to the Chinese character pinyin "wen" include: "问", "文", "闻", "纹", "温", etc.

[0104] Figure 10 It is a partial schematic diagram of homographic Chinese characters in a homographic Chinese character library. In the embodiments of the present disclosure, the homographic Chinese character library is a pre-acquired database that classifies Chinese characters according to their shapes into similar-shaped Chinese characters. Homographic Chinese characters refer to a group of Chinese characters with similar shapes. The embodiments of the present disclosure do not impose special restrictions on the acquisition method of the homographic Chinese character library, as long as it can classify Chinese characters according to their shapes into homographic Chinese character libraries. Among them, the homographic Chinese character library contains the corresponding relationships between each Chinese character and its similar-shaped Chinese characters. Exemplarily, as Figure 10 shown, the similar-shaped Chinese characters of the Chinese character "成" include "城", "诚", "盛", etc.

[0105] In step S8, the corresponding relationship between the Chinese character pinyin and its homophonic characters can be obtained through the pre-acquired homophonic Chinese character library, and the similar-shaped Chinese characters corresponding to each Chinese character can be obtained through the homographic Chinese character library, so as to establish the corresponding relationships among the Chinese character pinyin, homophonic characters, and similar-shaped Chinese characters. Among them, the corresponding relationships among the Chinese character pinyin, homophonic characters, and similar-shaped Chinese characters can include the corresponding relationship between the Chinese character pinyin and its homophonic characters, the corresponding relationship between the Chinese character pinyin and its similar-shaped Chinese characters, the corresponding relationship between the homophonic characters and the similar-shaped Chinese characters, and the corresponding relationship among the Chinese character pinyin, homophonic characters, and similar-shaped Chinese characters.

[0106] Step S82: Generate a homophonic and homographic Chinese character atlas according to the corresponding relationships among the Chinese character pinyin, homophonic characters, and similar-shaped Chinese characters.

[0107] The triples required for constructing the atlas can be represented as <entity, relationship, entity>. According to the corresponding relationships among the Chinese character pinyin, homophonic characters, and similar-shaped Chinese characters, the triples <Chinese character pinyin, contains, homophonic characters> and <Chinese character pinyin, contains, similar-shaped Chinese characters> required for constructing the atlas are obtained. Taking the Chinese character pinyin, homophonic characters, and similar-shaped Chinese characters as nodes, and the relationships between the Chinese character pinyin and its homophonic characters as edges, and the relationships between the Chinese character pinyin and its similar-shaped Chinese characters as edges, the nodes are connected by edges to generate a homophonic and homographic Chinese character atlas.

[0108] The order of Chinese characters in the homophonic Chinese character library represents the frequency of occurrence. Therefore, in the atlas, the position index of the homophonic characters in the homophonic Chinese character library is stored as a node attribute in the atlas. The node attribute of the homophonic characters represents the priority of the homophonic characters. The purpose of adding the priority attribute is to control the number of results returned according to the priority when retrieving in the atlas. Similarly, the node attribute of the similar-shaped Chinese characters is determined according to the position index of the similar-shaped Chinese characters in the homographic Chinese character library and stored in the atlas. The node attribute of the similar-shaped Chinese characters represents the priority of the similar-shaped Chinese characters.

[0109] In some embodiments, a homophone and homograph atlas is generated according to the corresponding relationships among Chinese character pinyin, homophones, and characters with similar shapes, including: obtaining first triple information required for constructing the homophone and homograph atlas according to the corresponding relationships among Chinese character pinyin, homophones, and characters with similar shapes. The first triple information includes a first element, a second element, and a third element. The first element is the Chinese character pinyin, the third element is a homophone or a character with a similar shape, and the second element represents the relationship between the first element and the third element; taking the Chinese character pinyin, homophones, and characters with similar shapes in the first triple information as nodes respectively; taking the relationship between the Chinese character pinyin and the homophone in the first triple information as an edge, and taking the relationship between the Chinese character pinyin and the character with a similar shape in the first triple information as an edge; connecting any two nodes through the corresponding edges, thereby generating a homophone and homograph atlas.

[0110] Exemplarily, the homophones corresponding to the Chinese character pinyin "cheng" include "成", "城", "称", "呈", "诚", etc. Among them, the character with a similar shape to "成" includes "盛", etc. Thus, multiple first triple information can be established, which are <cheng, contains, 成>, <cheng, contains, 城>, <cheng, contains, 称>, <cheng, contains, 呈>, <cheng, contains, 诚>, <cheng, contains, 盛>, etc. Based on the multiple first triple information, taking the Chinese character pinyin, homophones, and characters with similar shapes in the multiple first triple information as nodes of the atlas respectively, and taking the relationship between the Chinese character pinyin and the homophone, and the relationship between the Chinese character pinyin and the character with a similar shape as edges respectively, connecting the nodes with each other through the corresponding edges, a homophone and homograph atlas is obtained.

[0111] Step S83: Obtain the corresponding relationships among word pinyin, homophonic words, and synonyms through a pre-acquired homophonic word library and synonym library.

[0112] Figure 11 As a partial schematic diagram of homophonic words in a homophonic word library. In the embodiments of the present disclosure, the homophonic word library is a pre-acquired database that classifies words into homophonic words according to word pinyin. Homophonic words refer to a group of words with the same word pinyin. The embodiments of the present disclosure do not impose special restrictions on the acquisition method of the homophonic word library, as long as it can classify words into homophonic words according to word pinyin to obtain a homophonic word library. Among them, the homophonic word library contains the corresponding relationships between each word pinyin and homophonic words. Exemplarily, as Figure 11 shown, the homophonic words corresponding to the word pinyin "chengdu" include: "成都", "程度", "成度", "诚笃", etc.

[0113] Figure 12This is a schematic diagram of a partial synonym list for a thesaurus. In this embodiment, the thesaurus is a pre-acquired database that categorizes words according to their meanings. Synonyms refer to a group of words with the same meaning. This embodiment does not impose special restrictions on the method of acquiring the thesaurus, as long as it can achieve the goal of categorizing words according to their meanings to obtain the thesaurus. The thesaurus contains the correspondence between each word and its synonyms. For example, such as... Figure 12 As shown, synonyms for the word "Chengdu" include: "Land of Abundance", "City of Brocade", "City of Hibiscus", "Chengdu City", "Rongcheng", "Jincheng", etc.

[0114] In step S83, the correspondence between word pinyin and homophones can be obtained through the pre-acquired homophone dictionary, and the corresponding synonyms for each word can be obtained through the synonym dictionary, thereby establishing the correspondence between word pinyin, homophones, and synonyms. The correspondence between word pinyin, homophones, and synonyms can include the correspondence between word pinyin and homophones, the correspondence between word pinyin and synonyms, the correspondence between homophones and synonyms, and the correspondence between word pinyin, homophones, and synonyms.

[0115] Step S84: Generate a homonym and synonym map based on the correspondence between word pinyin, homophones, and synonyms.

[0116] The triples required to construct the graph can be represented as <entity, relation, entity>. Based on the correspondence between word pinyin, homophones, and synonyms, the triples <word pinyin, contain, homophones> and <word pinyin, contain, synonyms> required to construct the graph are obtained. Word pinyin, homophones, and synonyms are used as nodes, the relationship between word pinyin and homophones is used as an edge, and the relationship between word pinyin and synonyms is used as an edge. The nodes are connected to each other through the edges, thereby generating a homophone and synonym graph.

[0117] In a homonym dictionary, the order of words indicates their frequency of occurrence. Therefore, the position index of homophones in the homonym dictionary can be stored as a node attribute in the graph, and the node attribute of a homophone represents its priority. Similarly, the node attributes of synonyms are determined based on their position index in the synonym dictionary and stored in the graph, and the node attributes of synonyms represent their priority.

[0118] In some embodiments, a homophone and synonym graph is generated according to the correspondence relationships among word pinyin, homophones, and synonyms, including: obtaining second triple information required for constructing the homophone and synonym graph according to the correspondence relationships among word pinyin, homophones, and synonyms, where the second triple information includes a fourth element, a fifth element, and a sixth element, the fourth element is the word pinyin, the sixth element is a homophone or a synonym, and the fifth element represents the relationship between the fourth element and the sixth element; using the word pinyin, homophones, and synonyms in the second triple information as nodes respectively; using the relationships between the word pinyin and homophones in the second triple information as edges, and using the relationships between the word pinyin and synonyms in the second triple information as edges; connecting any two nodes through the corresponding edges to generate the homophone and synonym graph.

[0119] Exemplarily, the homophones corresponding to the word pinyin "chengdu" include "成都" (Chengdu), "程度" (degree), etc. Among them, the synonyms of "成都" (Chengdu) include "成都市" (Chengdu City), "天府之国" (Land of Abundance), "蓉城" (City of Hibiscus), etc. Thus, multiple second triple information can be established, such as <chengdu, contains, 成都> (chengdu, contains, Chengdu), <chengdu, contains, 程度> (chengdu, contains, degree), <chengdu, contains, 成都市> (chengdu, contains, Chengdu City), <chengdu, contains, 天府之国> (chengdu, contains, Land of Abundance), <chengdu, contains, 蓉城> (chengdu, contains, City of Hibiscus), etc. Based on the multiple second triple information, using the word pinyin, homophones, and synonyms in the multiple second triple information as nodes of the graph respectively, and using the relationships between the word pinyin and homophones, and the relationships between the word pinyin and synonyms as edges respectively, connecting the nodes with each other through the corresponding edges to obtain the homophone and synonym graph.

[0120] Step S85: Generate a knowledge graph according to the homograph graph and the homophone and synonym graph.

[0121] Figure 13 It is a partial graph schematic diagram of a knowledge graph, Figure 13 showing the graph schematic diagrams of the character pinyin "cheng" and the word pinyin "chengdu", as Figure 13 [[ID=~14]]shown, the homophones corresponding to the character pinyin "cheng" include "城" (city), "成" (become), "称" (call), "呈" (present), the characters similar in form to the character pinyin "cheng" include "诚" (honest), "盛" (prosperous), "城" (city), the homophones corresponding to the word pinyin "chengdu" include "成都" (Chengdu), "程度" (degree), and the synonyms corresponding to the word pinyin "chengdu" include "成都市" (Chengdu City), "天府之国" (Land of Abundance), "蓉城" (City of Hibiscus).

[0122] In some embodiments, after obtaining the synonym set of the standard sentence through mining, the correctness and usability of each synonym in the output synonym set can also be judged through manual review, the synonyms with poor quality can be removed, and it can be judged whether it is necessary to reconfigure the strategy for obtaining the candidate sentences to be matched.

[0123] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0124] Furthermore, this disclosure also provides a data processing apparatus, an electronic device, and a computer-readable storage medium, all of which can be used to implement any of the data processing methods provided in this disclosure.

[0125] The methods, corresponding technical solutions, and descriptions are detailed in the relevant sections of the Methods section and will not be repeated here.

[0126] Figure 14 This is a block diagram of a data processing apparatus provided in an embodiment of the present disclosure.

[0127] Reference Figure 14 This disclosure provides a data processing apparatus 400, which includes:

[0128] Acquisition unit 401, matching unit 402, first expansion unit 403 and second expansion unit 404.

[0129] 0. Among them, the acquisition unit 401 is configured to acquire the standard words and phrases to be mined and the candidate word and phrase set, the candidate word and phrase set including...

[0130] Multiple candidate words and phrases.

[0131] Matching unit 402 is configured to obtain candidate words that match the standard word from the candidate word set and add the matched candidate words to the synonym set of the standard word.

[0132] The first expansion unit 403 is configured to perform a first synonym expansion process on the standard word and the matched candidate word using a thesaurus to obtain a first expanded word, and to add the first expanded word to the thesaurus set.

[0133] The second expansion unit 404 is configured to use a pre-built knowledge graph to perform second synonym expansion processing on the standard word and the matched candidate word to obtain a second expanded word, and add the second expanded word to the synonym set.

[0134] The pre-constructed knowledge graph includes a homophone graph and a homonym graph.

[0135] It includes the correspondence between the pinyin of characters, homophones, and similar-looking characters. The homophone and synonym map includes the correspondence between the pinyin of words, homophones, and synonyms.

[0136] In some embodiments, the second expansion unit 404 is configured to: for each word in the standard word and the matched candidate word, input the pinyin of each character in the word into the knowledge graph for homophone and homograph retrieval, obtain the homophones and similar-looking characters corresponding to each character in the word, and replace at least one character in the word with a homophone.

[0137] The corresponding homophones or similar-looking characters are used to obtain at least one second expanded phrase; and / or, the pinyin of each word in the phrase is input into a knowledge graph for homophone and synonym retrieval to obtain the homophones and synonyms corresponding to each word in the phrase.

[0138] Furthermore, at least one word in the phrase is replaced with a corresponding homophone or synonym to obtain at least one second expanded phrase.

[0139] The data processing apparatus 400 provided in this embodiment is used to implement the data processing method provided in any of the above embodiments. For specific related descriptions, please refer to the descriptions in the data processing methods of any of the above embodiments, which will not be repeated here.

[0140] 0 Figure 15 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.

[0141] Reference Figure 15 This disclosure provides an electronic device 500, which includes: at least one processor 501; at least one memory 502; and one or more I / O interfaces 503 connected between the processor 501 and the memory 502; wherein the memory 502 stores one or more calculations that can be executed by the at least one processor 501.

[0142] A computer program, one or more computer programs are executed by at least one processor 501 so that at least one processor 501 can perform the above-described data processing method.

[0143] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the data processing method described above. The computer-readable storage medium may be volatile or non-volatile.

[0144] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described data processing method.

[0145] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0146] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0147] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0148] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone 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). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0149] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0150] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0151] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0152] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0153] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0154] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A data processing method, characterized in that, include: Obtain the standard words and phrases to be mined and the candidate words and phrases to be matched, wherein the candidate words and phrases include multiple candidate words and phrases; Obtain candidate words and phrases that match the standard words and phrases from the candidate word and phrase set, and add the matching candidate words and phrases to the synonym set of the standard words and phrases; The standard phrase and the matching candidate phrase are expanded using a thesaurus to obtain a first expanded phrase, and the first expanded phrase is added to the thesaurus set. The standard phrase and the matched candidate phrase are expanded using a pre-constructed knowledge graph to obtain a second expanded phrase, which is then added to the synonym set. The second expanded phrase includes: inputting the pinyin of the characters or words in the phrase into the knowledge graph for retrieval, and replacing at least one character or word in the phrase with the corresponding character or word obtained from the pinyin retrieval. The knowledge graph includes a homophone graph and a homophone and synonym graph. The homophone graph includes the correspondence between the pinyin of characters, homophones, and similar-looking characters. The homophone and synonym graph includes the correspondence between the pinyin of words, homophones, and synonyms.

2. The data processing method according to claim 1, characterized in that, The candidate word / phrase set to be matched is obtained in the following way: The standard phrases are entered into a search engine as search terms to obtain a search results page, which includes multiple search results web pages; Extract the text content of a webpage from a specified search results page; Candidate words and phrases are extracted from the text content of the webpage to obtain the candidate word and phrase set.

3. The data processing method according to claim 1, characterized in that, The step of obtaining candidate words and phrases that match the standard words and phrases from the candidate word and phrase set includes: For each candidate word / phrase in the candidate word / phrase set, calculate the similarity between the standard word / phrase and the candidate word / phrase; Candidate words and phrases with a similarity greater than a preset threshold are selected as candidate words and phrases to match the standard words and phrases.

4. The data processing method according to claim 1, characterized in that, The first expanded phrase is obtained by using a thesaurus to expand the standard phrase and the matched candidate phrases with the first thesaurus, including: For each word in the standard word and the matched candidate word, the word is segmented. The synonyms corresponding to each word segment of the given sentence are obtained by using a thesaurus. Replace at least one word in the phrase with a corresponding synonym to obtain at least one first expanded phrase.

5. The data processing method according to claim 1, characterized in that, The process of using a pre-constructed knowledge graph to perform second synonym expansion on the standard phrase and the matched candidate phrase to obtain the second expanded phrase includes: For each word / phrase in the standard word / phrase and the matched candidate word / phrase, the pinyin of each character in the word / phrase is input into the knowledge graph for homophone and homograph retrieval, obtaining the homophones and similar-looking characters corresponding to each character in the word / phrase; and, Replace at least one character in the phrase with a corresponding homophone or similar-looking character to obtain at least one second expanded phrase; And / or, The pinyin of each word in the phrase is input into the knowledge graph for homophone and synonym retrieval, resulting in the homophones and synonyms corresponding to each word in the phrase; and... Replace at least one word in the phrase with a corresponding homophone or synonym to obtain at least one second expanded phrase.

6. The data processing method according to claim 1, characterized in that, Before obtaining the standard words and phrases to be mined and the candidate word and phrase set to be matched, the method further includes the step of constructing the knowledge graph; The steps for constructing the knowledge graph include: The correspondence between the pinyin, homophones, and similar-looking characters is obtained by pre-acquired homophone and homograph character databases; Generate a homophone and homograph map based on the correspondence between the pinyin, homophones, and similar-looking characters; The correspondence between word pinyin, homophones, and synonyms is obtained by pre-acquired homophone and synonym databases; Generate a homonym and synonym map based on the correspondence between word pinyin, homophones, and synonyms; The knowledge graph is generated based on the homophone and homograph graph and the homophone and synonym graph.

7. The data processing method according to claim 6, characterized in that, The process of generating a homophone and homograph map based on the correspondence between pinyin, homophones, and similar-looking characters includes: Based on the correspondence between the pinyin of a character, homophones, and similar-looking characters, the first triplet information required to construct a homophone and homograph map is obtained. The first triplet information includes a first element, a second element, and a third element. The first element is the pinyin of the character, the third element is the homophone or the similar-looking character, and the second element represents the relationship between the first element and the second element. The pinyin of the first triplet information, the homophones, and the similar-looking characters are respectively used as nodes; The relationship between the pinyin of the character in the first triplet information and the homophone is used as an edge, and the relationship between the pinyin of the character in the first triplet information and the similar-looking character is used as an edge; Connect any two nodes with corresponding edges to generate the homophone and homograph graph.

8. The data processing method according to claim 6, characterized in that, The process of generating a homonym and synonym map based on the correspondence between word pinyin, homophones, and synonyms includes: Based on the correspondence between word pinyin, homophones, and synonyms, the second triplet information required to construct the homophone and synonym map is obtained. The second triplet information includes a fourth element, a fifth element, and a sixth element. The fourth element is the word pinyin, the sixth element is the homophone or the synonym, and the fifth element represents the relationship between the fourth element and the sixth element. The word pinyin, homophones, and synonyms in the second triplet information are respectively used as nodes; The relationship between the word pinyin and the homonym in the second triplet information is used as an edge, and the relationship between the word pinyin and the synonym in the second triplet information is used as an edge; Connect any two nodes with corresponding edges to generate the homonym and synonym graph.

9. A data processing apparatus, characterized in that, include: The acquisition unit is configured to acquire standard words and phrases to be mined and a set of candidate words and phrases to be matched, wherein the set of candidate words and phrases includes multiple candidate words and phrases; The matching unit is configured to obtain candidate words that match the standard word from the candidate word set, and add the matching candidate words to the synonym set of the standard word; The first expansion unit is configured to perform a first synonym expansion process on the standard phrase and the matching candidate phrase using a thesaurus to obtain a first expanded phrase, and add the first expanded phrase to the thesaurus set; The second expansion unit is configured to use a pre-constructed knowledge graph to perform a second synonym expansion process on the standard phrase and the matched candidate phrase to obtain a second expanded phrase, and add the second expanded phrase to the synonym set; wherein, the second synonym expansion process includes: inputting the pinyin of the characters or the pinyin of the words in the phrase into the knowledge graph for retrieval, and replacing at least one character or word in the phrase with the corresponding character or word obtained according to the pinyin retrieval; The knowledge graph includes a homophone graph and a homophone and synonym graph. The homophone graph includes the correspondence between the pinyin of characters, homophones, and similar-looking characters. The homophone and synonym graph includes the correspondence between the pinyin of words, homophones, and synonyms.

10. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the data processing method as described in any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the data processing method as described in any one of claims 1-8.