Field annotation generation, string understanding method, device and storage medium

By performing pinyin segmentation and mapping relationship processing on database field names, field annotations are generated, which solves the problem of low efficiency of manual completion and realizes efficient and accurate field annotation generation.

CN113688613BActive Publication Date: 2025-09-12ALIBABA GROUP HOLDING LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010425675.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-19
Publication Date
2025-09-12
Estimated Expiration
2040-05-19

AI Technical Summary

Technical Problem

In the prior art, annotation completion of database field names mainly relies on manual methods, which has low efficiency and accuracy.

Method used

By performing pinyin segmentation on field names and utilizing the mapping relationship between full pinyin spelling, pinyin abbreviations and Chinese characters, field annotations can be generated to reduce manual intervention.

Benefits of technology

Improved the efficiency and accuracy of field annotation generation, ensuring more accurate understanding of field names.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113688613B_ABST
    Figure CN113688613B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method, device and storage medium for field annotation generation and string understanding. In the embodiment of the present application, for field names that lack field annotations, the field names can be segmented in pinyin to obtain a pinyin sequence corresponding to the field name; by understanding the pinyin sequence, a Chinese sequence corresponding to the pinyin sequence can be generated, and then a field annotation corresponding to the field name can be generated based on the Chinese sequence. Accordingly, in the embodiment of the present application, the supplementary work of field annotations no longer relies on manual methods, which can effectively improve the generation efficiency of field annotations. Moreover, through reasonable segmentation and accurate understanding of field names, the accuracy of field annotations can be guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, and storage medium for generating field annotations and understanding character strings. Background Art

[0002] As the amount of user data continues to grow, more and more users are demanding data standardization, hoping to obtain high-quality data assets. A crucial part of the data standardization process is the annotation completion of field names in the database.

[0003] Currently, manual annotation is required to complete the field names in the database, which is inefficient and inaccurate. Summary of the Invention

[0004] Various aspects of the present application provide a method, device, and storage medium for generating field annotations and understanding character strings, for improving the efficiency and accuracy of generating field annotations.

[0005] This embodiment of the present application provides a method for generating field annotations, including:

[0006] Get the name of the field to be processed;

[0007] Performing pinyin segmentation on the field name to obtain a pinyin sequence;

[0008] Determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters;

[0009] Generate a field annotation corresponding to the field name according to the Chinese sequence.

[0010] This embodiment of the application also provides a string understanding method, including:

[0011] Get the string to be understood;

[0012] Performing pinyin segmentation on the character string to be understood to obtain a pinyin sequence;

[0013] Determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters;

[0014] According to the Chinese sequence, an understanding result corresponding to the character string to be understood is generated.

[0015] An embodiment of the present application further provides a computing device, including a memory and a processor;

[0016] The memory is used to store one or more computer instructions;

[0017] The processor is coupled to the memory and configured to execute the one or more computer instructions for:

[0018] Get the name of the field to be processed;

[0019] Performing pinyin segmentation on the field name to obtain a pinyin sequence;

[0020] Determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters;

[0021] Generate a field annotation corresponding to the field name according to the Chinese sequence.

[0022] An embodiment of the present application further provides a computing device, including a memory and a processor;

[0023] The memory is used to store one or more computer instructions;

[0024] The processor is coupled to the memory and configured to execute the one or more computer instructions for:

[0025] Get the string to be understood;

[0026] Performing pinyin segmentation on the character string to be understood to obtain a pinyin sequence;

[0027] Determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters;

[0028] According to the Chinese sequence, an understanding result corresponding to the character string to be understood is generated.

[0029] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the aforementioned field annotation generation method or the aforementioned string understanding method.

[0030] In an embodiment of the present application, for field names that lack field annotations, the field names can be segmented using pinyin to obtain the pinyin sequence corresponding to the field name; by understanding the pinyin sequence, a Chinese sequence corresponding to the pinyin sequence can be generated, and then a field annotation corresponding to the field name can be generated based on the Chinese sequence. Accordingly, in an embodiment of the present application, the supplementation of field annotations no longer relies on manual methods, which can effectively improve the efficiency of field annotation generation. Moreover, through reasonable segmentation and accurate understanding of field names, the accuracy of field annotations can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0032] Figure 1 A flowchart of a method for generating field annotations provided by an exemplary embodiment of the present application;

[0033] Figure 2 A logic block diagram of a field annotation generation method provided by an exemplary embodiment of the present application;

[0034] Figure 3 A flowchart of a string understanding method provided by another exemplary embodiment of the present application;

[0035] Figure 4 A schematic structural diagram of a computing device provided as another exemplary embodiment of the present application;

[0036] Figure 5 A schematic structural diagram of another computing device provided as yet another exemplary embodiment of the present application. DETAILED DESCRIPTION

[0037] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0038] At present, it is necessary to use manual methods to complete the annotations of field names in the database, and this method has relatively low efficiency and accuracy. In response to these technical problems, the embodiment of the present application provides a solution. One of the basic ideas is: for field names that are missing field annotations, the field names can be segmented by pinyin to obtain the pinyin sequence corresponding to the field name; by understanding the pinyin sequence, a Chinese sequence corresponding to the pinyin sequence can be generated, and then the field annotation corresponding to the field name can be generated according to the Chinese sequence. Accordingly, in the embodiment of the present application, the supplementary work of field annotations no longer relies on manual methods, which can effectively improve the generation efficiency of field annotations. Moreover, the accuracy of field annotations can be guaranteed by reasonable segmentation and accurate understanding of field names.

[0039] The following describes in detail the technical solutions provided by various embodiments of the present application in conjunction with the accompanying drawings.

[0040] Figure 1 A flowchart of a method for generating field annotations provided as an exemplary embodiment of the present application. Figure 2 This is a logic block diagram of a field annotation generation method provided by an exemplary embodiment of the present application. The field annotation generation method provided in this embodiment can be executed by a field annotation generation device, which can be implemented as software or a combination of software and hardware. The field annotation generation device can be integrated into a computing device. Figure 1 and Figure 2 As shown, the method includes:

[0041] Step 100: Get the field name to be processed;

[0042] Step 101: perform pinyin segmentation on the field name to obtain a pinyin sequence;

[0043] Step 102: determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin and / or pinyin abbreviation and Chinese characters;

[0044] Step 103: Generate a field annotation corresponding to the field name according to the Chinese sequence.

[0045] The field annotation generation method provided in this embodiment can be applied to other scenarios where fields exist, such as databases and spreadsheets. This embodiment does not limit the application scenario. Taking a database as an example, in most cases, the columns in a data table can be called fields, and each field contains information on a specific topic. Taking a spreadsheet as an example, a column in the spreadsheet can also be considered a field.

[0046] Each field has a field name, which serves as the name of the information it contains. For example, in a database scenario, a field name can be the name of attribute information, such as ID card, gender, etc.

[0047] In real-world applications, field names are typically composed of characters to adapt to software code requirements. Furthermore, different technicians may choose to write field names in different ways, making them difficult to read. Therefore, field names are often accompanied by field comments to explain their meaning. For example, if the field name is yhsj, a technician might add the field comment "User Data" to the field name.

[0048] However, it seems that there are still a large number of field names that are missing field annotations. For field names without field annotations, they can only be understood manually by technical personnel, which is particularly inefficient and inaccurate for technical personnel who were not involved in the original development process.

[0049] In this embodiment, the field name of the missing field annotation can be used as the field name to be processed. As mentioned above, in this embodiment, the source of the field name to be processed is not limited.

[0050] In this embodiment, the field name may be segmented by phonetic characters to obtain a phonetic sequence.

[0051] Pinyin segmentation refers to segmenting the field name into character groups with pinyin meaning. In this embodiment, the pinyin sequence may include at least one character group. Preferably, the pinyin segmentation can segment the field name into the smallest unit with pinyin meaning, and the smallest unit serves as a character group. In this case, a single character group includes the full pinyin or pinyin abbreviation.

[0052] For a field name, it may be entirely pinyin, entirely pinyin abbreviation, or a mixture of pinyin and abbreviation. In this embodiment, when the field name contains pinyin abbreviation, the pinyin sequence may contain a character group containing a single character (i.e., the pinyin abbreviation); and when the field name contains pinyin, the pinyin sequence may contain a character group corresponding to the pinyin of a Chinese character.

[0053] In addition, pinyin word segmentation maintains the original order of the characters in the field name. Based on this order, the pinyin sequence corresponding to the field name can be generated through pinyin word segmentation.

[0054] For example, the field name is wm, and after pinyin word segmentation, the pinyin sequence can be obtained [w, m]; the field name is jiaotong, and after pinyin word segmentation, the pinyin sequence can be obtained [jiao, tong]; the field name is ddan, and after pinyin word segmentation, the pinyin sequence can be obtained [d, dan].

[0055] Based on the spelling sequence obtained by performing pinyin segmentation on the field name, in this embodiment, the Chinese sequence corresponding to the pinyin sequence can be determined according to the mapping relationship between the full pinyin and / or pinyin abbreviation and Chinese.

[0056] It should be understood that in this embodiment, the mapping relationship between the full spelling of Pinyin and Chinese, as well as the mapping relationship between the abbreviation of Pinyin and Chinese, can be preset at the same time. In the process of determining the Chinese sequence corresponding to the Pinyin sequence, the mapping relationship required can be flexibly determined based on the actual content contained in the Pinyin sequence.

[0057] For example, if the pinyin sequence only contains full pinyin, then only the mapping relationship between full pinyin and Chinese can be enabled; if the pinyin sequence only contains pinyin abbreviations, then only the mapping relationship between pinyin abbreviations and Chinese can be enabled; if the pinyin sequence contains both full pinyin and pinyin abbreviations, then both the mapping relationship between full pinyin and Chinese and the mapping relationship between pinyin abbreviations and Chinese can be enabled.

[0058] Among them, the mapping relationship between the full pinyin spelling and / or pinyin abbreviation and Chinese in different industry fields may not be exactly the same. In this embodiment, the Chinese sequence corresponding to the pinyin sequence of the field name can be determined based on the target industry field to which the field name belongs and the mapping relationship between the full pinyin spelling and / or pinyin abbreviation and Chinese in the target industry field.

[0059] On this basis, field annotations corresponding to the field names can be generated based on the Chinese sequence. Usually, the Chinese characters in the Chinese sequence are concatenated to generate field annotations corresponding to the field names.

[0060] In this embodiment, the field name can be segmented into the smallest units with pinyin meaning to generate the pinyin sequence of the field, and the smallest units can be understood to determine the Chinese characters corresponding to the smallest units, thereby generating a Chinese sequence corresponding to the pinyin sequence. Based on the Chinese sequence, a field annotation corresponding to the field name can be generated, thereby making the understanding of the field name more accurate.

[0061] In the above or following embodiments, in order to realize pinyin segmentation of field names, the field names can be input into a pinyin segmentation model; in the pinyin segmentation model, at least one string of continuous characters that conform to the full pinyin characteristics and at least one single character that does not conform to the full pinyin characteristics in the field name are identified as character groups, respectively, to generate a pinyin sequence corresponding to the field name.

[0062] In the Pinyin word segmentation model, you can perform Pinyin recognition on field names to determine the full Pinyin and Pinyin abbreviations contained in the field name. For example, you can determine that a single character that does not belong to the full Pinyin is a Pinyin abbreviation.

[0063] The pinyin full spelling feature may refer to the probability requirement that a string of consecutive characters can constitute the pinyin full spelling. Meeting the pinyin full spelling feature may refer to the probability requirement that a string of consecutive characters meets the probability requirement that they can constitute the pinyin full spelling.

[0064] In the present embodiment, in order to determine at least one string of continuous characters that meet the Pinyin and Full Phonetic Alphabet feature and at least one single character that does not meet the Pinyin and Full Phonetic Alphabet feature, it is possible to determine, for each character in the field name, the probability that the character meets the state characteristics of each spelling position under the Pinyin and Full Phonetic Alphabet according to the context of the character and the character itself. Wherein, the state characteristics of each spelling position under each Pinyin and Full Phonetic Alphabet can be used as the aforementioned Pinyin and Full Phonetic Alphabet feature. Of course, in the present embodiment, the Pinyin and Full Phonetic Alphabet feature is not limited to this, and the Pinyin and Full Phonetic Alphabet feature can also be characterized from other angles.

[0065] For a pinyin full spelling, it includes multiple spelling positions, which can be the starting position, the middle position, or the ending position, etc. For example, in the pinyin "jiao", the character "j" is at the starting position, the characters "i" and "a" are at the middle position, and "o" is at the ending position.

[0066] In this embodiment, the probability that each character in the field name conforms to the state characteristics of each spelling position under the full pinyin spelling can be determined. This probability is affected by the context of the character and the character itself.

[0067] If the probability of a character meeting the state characteristics of any spelling position under Pinyin Full Spelling meets the preset conditions, the character is determined to meet the Pinyin Full Spelling characteristics and the character will be segmented into a character group corresponding to Pinyin Full Spelling.

[0068] If the probability of a character meeting the state characteristics of each spelling position under the full pinyin spelling does not meet the preset conditions, the character is determined to be a single character that does not meet the full pinyin spelling characteristics. This character will constitute a single character group.

[0069] In order to make the Pinyin segmentation model learn the Pinyin full spelling feature, in this embodiment, the Pinyin segmentation model can be trained using training text. Taking the Pinyin full spelling feature as the state feature of each spelling position as an example, during the model training process:

[0070] A training text can be obtained and converted into a full pinyin spelling to obtain a training sequence; the spelling positions of the characters in the training sequence are marked; and the marked training sequence is input into a pinyin word segmentation model so that the pinyin word segmentation model can learn the state features of each spelling position under the full pinyin spelling as pinyin spelling features.

[0071] Among them, texts from the Internet can be obtained through crawler technology, etc. In addition, the obtained training texts can be classified according to industry fields, and the parameters of the pinyin word segmentation model can be trained separately for different industry fields. In this way, the pinyin word segmentation model will learn different pinyin and full spelling features in different industry fields.

[0072] In practical applications, the Pinyin word segmentation model can adopt the HMM model. Based on the HMM model, the labeled training sequence can be input into the HMM model so that the HMM model can learn model parameters such as the state transition matrix that characterize the full Pinyin spelling features.

[0073] When performing pinyin segmentation on field names, in the HMM model, the probability that a character meets the state characteristics of each spelling position can be calculated based on the hidden state of a certain character and the previous character of the character. That is, based on the context of a character and the character itself, the probability of the character being at the starting position, middle position and / or ending position of the full pinyin spelling is calculated.

[0074] For example, if the probability that the character is at the beginning of the Pinyin Quanpin is higher than a preset probability threshold, the character can be determined to be at the beginning of the Pinyin Quanpin. Recognition of the next character can then continue. Generally, the probability that the next character meets the state characteristics of the middle position or the end position is relatively high, and the spelling position of the next character can be determined based on the actual situation.

[0075] For another example, if the probability of the character being in all spelling positions of the full pinyin spelling is lower than a preset probability threshold, it can be determined that the character is a pinyin abbreviation, that is, it does not belong to any full pinyin spelling.

[0076] As mentioned above, the state features of each spelling position in Pinyin full spelling are only an exemplary implementation form of Pinyin full spelling features. In this embodiment, Pinyin full spelling features can also be represented from other angles. For different Pinyin full spelling features, the training text can be annotated from different angles so that the Pinyin word segmentation model can learn Pinyin full spelling features from the training text.

[0077] In this embodiment, based on the pinyin word segmentation model, the pinyin full spelling features can be learned, and the pinyin full spelling and pinyin abbreviation contained in the field name can be distinguished based on the pinyin full spelling features, so that the field name can be divided into the smallest unit with pinyin meaning, which ensures the accuracy and rationality of the pinyin word segmentation, and thus makes the understanding results of the subsequent pinyin understanding stage more accurate.

[0078] In the above or following embodiments, a pinyin sequence includes at least one character group. In order to determine the Chinese sequence corresponding to the pinyin sequence, in this embodiment, the pinyin sequence can be input into a pinyin understanding model. The pinyin understanding model determines the Chinese character corresponding to each of the at least one character group in the pinyin sequence based on the mapping relationship between the full pinyin and / or pinyin abbreviation and the Chinese character; and a Chinese sequence is formed based on the Chinese character corresponding to each of the at least one character group.

[0079] Specifically, in the Pinyin understanding model, different mapping relationships between Pinyin full spellings and / or Pinyin abbreviations and Chinese characters can be learned for different industry fields. Here, the target industry field can be input into the Pinyin understanding model. In the Pinyin understanding model, based on the mapping relationship between Pinyin full spellings and / or Pinyin abbreviations and Chinese characters in the target industry field described in the field name, the corresponding Chinese characters for at least one character group in the Pinyin sequence can be determined.

[0080] In order to enable the Pinyin understanding model to learn the mapping relationship between Pinyin and / or Pinyin abbreviations and Chinese in different industry fields, the Pinyin understanding model can be trained. The training process can be:

[0081] Get the training text and split it into word sequences;

[0082] Convert single-word sequences into full-length pinyin sequences and pinyin abbreviation sequences;

[0083] The pinyin understanding model is trained with a pinyin full spelling sequence and a pinyin abbreviation sequence as input and a training text as output, so that the pinyin understanding model learns the mapping relationship between the pinyin full spelling and pinyin abbreviation and Chinese.

[0084] Among them, crawler technology can be used to obtain training texts from the Internet. Moreover, the training texts can be classified according to industry fields. For different industry fields, different training texts can be used to train the pinyin comprehension model.

[0085] In this embodiment, the training text can be segmented into single-word sequences, which ensures that the pinyin understanding model can learn the mapping relationship between the full pinyin spelling and pinyin abbreviations and Chinese characters, and further ensures that in the process of using the pinyin understanding model to understand the field name, the Chinese corresponding to each character group in the pinyin sequence of the field name can be determined, where each character group corresponds to a Chinese character.

[0086] In practical applications, the phonetic understanding model can adopt a seq2seq model. Of course, the phonetic understanding model can also adopt other types of algorithm models, and this embodiment is not limited thereto.

[0087] In this embodiment, based on the Pinyin understanding model, the mapping relationship between Pinyin full spelling and Pinyin abbreviations and Chinese characters can be learned simultaneously, so that the Pinyin understanding model can process field names using full Pinyin spelling, full Pinyin abbreviations, or a mixture of full Pinyin spelling and abbreviations. Moreover, because the training process of the Pinyin understanding model uses training text that has been segmented into individual characters, the adaptability of the Pinyin understanding model to Pinyin sequences can be guaranteed, thereby improving the accuracy of Pinyin understanding.

[0088] In the above or below embodiments, field names may contain separator characters.

[0089] In this embodiment, if the field name contains a separator character, the field name can be divided into multiple character segments according to the separator character; for the multiple character segments, the aforementioned pinyin word segmentation and pinyin understanding operations are performed respectively to obtain the Chinese sequences of the multiple character segments.

[0090] In most cases, the separator character in a field name serves as a semantic segmentation function. For example, the separator character "_" in the field name jggj / dqdm serves as a semantic segmentation function, dividing the field name into the country and region codes of origin.

[0091] In this embodiment, the field name can be segmented according to the separator character, and the understanding results are generated for each of the multiple character segments obtained after the segmentation. On this basis, the Chinese sequences of the multiple character segments can be spliced ​​to generate the field annotation corresponding to the field name.

[0092] In addition, in this embodiment, the separator characters in the field name can be retained in the field annotation of the field name, or they can be directly deleted and no longer appear in the field annotation. This can be flexibly set according to actual needs or user instructions, and this embodiment does not limit this.

[0093] In this embodiment, segmented understanding of field names can be achieved, which makes the understanding of field names more accurate, especially for field names containing multiple semantics. The mutual influence between different semantics can be avoided, thereby effectively ensuring that the multiple semantics contained therein obtain the most accurate understanding results, effectively improving the accuracy of the final generated field annotations.

[0094] In the above or below embodiments, based on the field annotation generated for the field name, the field annotation corresponding to the field name can be supplemented to the database where the field name is located.

[0095] Based on this, the generated field annotations can be applied to the database to add field annotations to the field names in the database.

[0096] In this embodiment, an association relationship between a field name and a field annotation in a database may also be constructed based on the field annotation corresponding to the field name and the field annotations corresponding to other field names in the database where the field name is located.

[0097] Based on this, the association between field names and field annotations can be used as an intermediate medium in the process of accessing the database to ensure that visitors correctly understand the meaning of each field name in the database.

[0098] In practical applications, the association between field names and field annotations can be configured in relevant data access protocols so that the communicating parties can process data based on the same understanding.

[0099] Of course, the application of field annotations is by no means limited to this. In this embodiment, the generated field annotations can also be applied to other processing matters, which will not be listed here.

[0100] Figure 3 This is a flow chart of a string understanding method provided by another exemplary embodiment of the present application. The string understanding method provided by this embodiment can be executed by a string understanding device, which can be implemented as software or a combination of software and hardware. The string understanding device can be integrated into a computing device. Figure 3 As shown, the method includes:

[0101] Step 300: Obtain the character string to be understood;

[0102] Step 301: performing pinyin segmentation on the character string to be understood to obtain a pinyin sequence;

[0103] Step 302: Determine a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin and / or pinyin abbreviation and Chinese characters;

[0104] Step 303: Generate an understanding result corresponding to the character string to be understood according to the Chinese sequence.

[0105] The string understanding method provided in this embodiment can be applied to scenarios where strings of unknown meanings need to be understood, such as database scenarios, spreadsheet scenarios, chat scenarios, journal translation or reading scenarios, search engine scenarios, e-commerce scenarios, etc. This embodiment does not limit the application scenarios.

[0106] The types of strings to be understood may vary across different application scenarios. These strings can include one or more of the following: field names in a database, strings in chat content, technical terms, and search keywords. For example, in a database scenario, the string to be understood could be a field name, while in a spreadsheet scenario, the string could be the content of any cell. In other scenarios, the string to be understood could be a string of characters in a text file, a line of code in a code file, and so on.

[0107] Accordingly, in this embodiment, the character string to be understood may be any character string with unknown meaning, and this embodiment does not limit the source, specification, type, etc. of the character string to be understood.

[0108] The string understanding method provided in this embodiment can restore strings with unknown meanings. For example, it can restore abbreviated strings in chat content in IM tools; restore abbreviations of professional terms in academic or professional journals, such as hospital journals; and restore keyword abbreviations in search scenarios, such as product keywords in e-commerce scenarios or search keywords in search engines.

[0109] This embodiment and Figure 1 The difference of the illustrated embodiment is that the character string to be understood in this embodiment is not limited to the field name in the aforementioned embodiment.

[0110] Based on similar inventive concepts, the technical details in this embodiment can refer to the relevant descriptions in the aforementioned embodiments of the final understanding result generation method. In order to save space, the technical details will not be elaborated in detail, but this should not cause loss of the protection scope of this application.

[0111] The following only describes several representative embodiments by way of example.

[0112] In an optional embodiment, the pinyin sequence includes at least one character group, and the character group includes the full pinyin or the pinyin abbreviation.

[0113] In an optional embodiment, the step of performing pinyin segmentation on the character string to be understood to obtain a pinyin sequence includes:

[0114] Input the string to be understood into the pinyin word segmentation model;

[0115] In the pinyin word segmentation model, at least one string of continuous characters that meets the pinyin full spelling feature and at least one single character that does not meet the pinyin full spelling feature in the character string to be understood are identified as character groups to generate a pinyin sequence corresponding to the character string to be understood.

[0116] In an optional embodiment, the step of identifying at least one continuous string of characters that conform to the pinyin and full spelling features and at least one single character that does not conform to the pinyin and full spelling features in the character string to be understood includes:

[0117] For each character in the string to be understood, determine the probability that the character meets the state characteristics of each spelling position under the full pinyin spelling based on the character's context and the character itself;

[0118] If the probability of the character meeting the state feature of any spelling position under the full pinyin spelling meets the preset conditions, it is determined that the character meets the full pinyin spelling feature;

[0119] If the probability that the character meets the state characteristics of each spelling position under the full pinyin spelling does not meet the preset conditions, the character is determined to be a single character that does not meet the full pinyin spelling characteristics.

[0120] In an optional embodiment, before inputting the character string to be understood into the pinyin segmentation model, the steps further include:

[0121] Obtain training text and convert the training text into full pinyin to obtain a training sequence;

[0122] Label the spelling positions of the characters in the training sequence;

[0123] The labeled training sequence is input into the pinyin word segmentation model so that the pinyin word segmentation model can learn the state features of each spelling position under the pinyin full spelling as the pinyin full spelling features.

[0124] In an optional embodiment, the pinyin word segmentation model adopts a Hidden Markov Model (HMM).

[0125] In an optional embodiment, the step of determining the Chinese sequence corresponding to the pinyin sequence based on the mapping relationship between the full pinyin and / or pinyin abbreviation and Chinese characters includes:

[0126] Input the pinyin sequence into the pinyin understanding model;

[0127] In the pinyin understanding model, based on the mapping relationship between the full pinyin and / or pinyin abbreviation and Chinese, the Chinese corresponding to at least one character group in the pinyin sequence is determined; and a Chinese sequence is composed according to the Chinese corresponding to at least one character group.

[0128] In an optional embodiment, the step of inputting the pinyin sequence into the pinyin understanding model includes:

[0129] Determine the target industry sector for the string to be understood;

[0130] Input the pinyin sequence and target industry domain into the pinyin understanding model;

[0131] Determining the Chinese characters corresponding to at least one character group in the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and the Chinese characters includes:

[0132] Based on the mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters in the target industry field, the Chinese characters corresponding to at least one character group in the pinyin sequence are determined.

[0133] In an optional embodiment, the steps before inputting the pinyin sequence into the pinyin understanding model further include:

[0134] Get the training text and split it into word sequences;

[0135] Convert single-word sequences into full-length pinyin sequences and pinyin abbreviation sequences;

[0136] The pinyin understanding model is trained with a pinyin full spelling sequence and a pinyin abbreviation sequence as input and a training text as output, so that the pinyin understanding model learns the mapping relationship between the pinyin full spelling and pinyin abbreviation and Chinese.

[0137] In an optional embodiment, the pinyin understanding model adopts a sequence-to-sequence seq2seq model.

[0138] In an optional embodiment, the method further comprises:

[0139] Add the understanding result corresponding to the character string to be understood to the database where the character string to be understood is located; or

[0140] Based on the understanding result corresponding to the character string to be understood and the understanding results corresponding to other character strings to be understood in the database where the character string to be understood is located, an association relationship between the character string to be understood and the understanding results in the database is constructed.

[0141] In an optional embodiment, before performing pinyin segmentation on the character string to be understood to obtain a pinyin sequence, the step further includes:

[0142] If the string to be understood contains a separator character, the string to be understood can be divided into multiple character segments according to the separator character;

[0143] For each of the plurality of character segments, performing pinyin segmentation on the character string to be understood to obtain a pinyin sequence and determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters, thereby obtaining Chinese sequences for each of the plurality of character segments;

[0144] Generate field annotations corresponding to the string to be understood based on the Chinese sequence, including:

[0145] The Chinese sequences of multiple character segments are concatenated to generate field annotations corresponding to the character strings to be understood.

[0146] It should be noted that the execution entity of each step of the string understanding method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution entity of steps 100 to 102 can be device A; for another example, the execution entity of steps 100 and 101 can be device A, and the execution entity of step 102 can be device B; and so on.

[0147] In addition, some of the processes described in the above embodiments and the accompanying drawings include multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The sequence numbers of the operations, such as 100, 102, etc., are merely used to distinguish between different operations and do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.

[0148] Figure 4 A schematic diagram of a computing device provided as another exemplary embodiment of the present application is shown in FIG. Figure 4 As shown, the computing device includes a memory 40 and a processor 41 .

[0149] The processor 41 is coupled to the memory 40 and is configured to execute the computer program in the memory 40 to:

[0150] Get the name of the field to be processed;

[0151] Perform pinyin segmentation on the field name to obtain the pinyin sequence;

[0152] Determine a Chinese sequence corresponding to a pinyin sequence based on a mapping relationship between the full pinyin and / or pinyin abbreviation and Chinese characters;

[0153] Generate field annotations corresponding to field names based on Chinese sequences.

[0154] In an optional embodiment, the pinyin sequence includes at least one character group, and the character group includes the full pinyin or the pinyin abbreviation.

[0155] In an optional embodiment, when the processor 41 performs pinyin segmentation on the field name to obtain a pinyin sequence, it is configured to:

[0156] Input the field name into the pinyin word segmentation model;

[0157] In the pinyin word segmentation model, at least one string of continuous characters that conforms to the pinyin full spelling feature and at least one single character that does not conform to the pinyin full spelling feature in the field name are identified as character groups to generate a pinyin sequence corresponding to the field name.

[0158] In an optional embodiment, when the processor 41 identifies at least one continuous string of characters that conform to the pinyin and full spelling features and at least one single character that does not conform to the pinyin and full spelling features in the field name, it is configured to:

[0159] For each character in the field name, determine the probability that the character meets the state characteristics of each spelling position under the full pinyin spelling based on the character's context and the character itself;

[0160] If the probability of the character meeting the state feature of any spelling position under the full pinyin spelling meets the preset conditions, it is determined that the character meets the full pinyin spelling feature;

[0161] If the probability that the character meets the state characteristics of each spelling position under the full pinyin spelling does not meet the preset conditions, the character is determined to be a single character that does not meet the full pinyin spelling characteristics.

[0162] In an optional embodiment, before inputting the field name into the pinyin word segmentation model, the processor 41 is further configured to:

[0163] Obtain training text and convert the training text into full pinyin to obtain a training sequence;

[0164] Label the spelling positions of the characters in the training sequence;

[0165] The labeled training sequence is input into the pinyin word segmentation model so that the pinyin word segmentation model can learn the state features of each spelling position under the pinyin full spelling as the pinyin full spelling features.

[0166] In an optional embodiment, the pinyin word segmentation model adopts a Hidden Markov Model (HMM).

[0167] In an optional embodiment, when determining the Chinese sequence corresponding to the pinyin sequence based on the mapping relationship between the full pinyin and / or pinyin abbreviations and Chinese characters, the processor 41 is configured to:

[0168] Input the pinyin sequence into the pinyin understanding model;

[0169] In the pinyin understanding model, based on the mapping relationship between the full pinyin and / or pinyin abbreviation and Chinese, the Chinese corresponding to at least one character group in the pinyin sequence is determined; and a Chinese sequence is composed according to the Chinese corresponding to at least one character group.

[0170] In an optional embodiment, when the pinyin sequence is input into the pinyin understanding model, the processor 41 is configured to:

[0171] Determine the target industry field of the field name;

[0172] Input the pinyin sequence and target industry domain into the pinyin understanding model;

[0173] When determining the Chinese corresponding to at least one character group in a pinyin sequence based on the mapping relationship between the full pinyin and / or pinyin abbreviations and Chinese characters, it is used to:

[0174] Based on the mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters in the target industry field, the Chinese characters corresponding to at least one character group in the pinyin sequence are determined.

[0175] In an optional embodiment, the processor 41 is further configured to: before inputting the pinyin sequence into the pinyin understanding model;

[0176] Get the training text and split it into word sequences;

[0177] Convert single-word sequences into full-length pinyin sequences and pinyin abbreviation sequences;

[0178] The pinyin understanding model is trained with a pinyin full spelling sequence and a pinyin abbreviation sequence as input and a training text as output, so that the pinyin understanding model learns the mapping relationship between the pinyin full spelling and pinyin abbreviation and Chinese.

[0179] In an optional embodiment, the pinyin understanding model adopts a sequence-to-sequence seq2seq model.

[0180] In an optional embodiment, the processor 41 is further configured to:

[0181] Add the field annotation corresponding to the field name to the database where the field name is located; or

[0182] Based on the field annotation corresponding to the field name and the field annotations corresponding to other field names in the database where the field name is located, an association relationship between the field name and the field annotation in the database is constructed.

[0183] In an optional embodiment, before performing pinyin segmentation on the field name to obtain a pinyin sequence, the processor 41 is further configured to:

[0184] If the field name contains a separator character, the field name can be divided into multiple character segments based on the separator character;

[0185] For each of the multiple character segments, performing pinyin segmentation on the field name to obtain a pinyin sequence and determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters, thereby obtaining Chinese sequences for each of the multiple character segments;

[0186] Generate field annotations corresponding to field names based on Chinese sequences, including:

[0187] The Chinese sequences of multiple character segments are concatenated to generate field annotations corresponding to the field names.

[0188] It is worth noting that the technical details in the above-mentioned embodiments of the computing device can be referred to the relevant descriptions in the above-mentioned embodiments of the field annotation generation method. In order to save space, they will not be repeated here, but this should not cause any loss of the scope of protection of this application.

[0189] Further, if Figure 4 As shown, the computing device also includes: a communication component 42, a power supply component 43 and other components. Figure 4 Only some components are shown schematically, and it does not mean that the computing device only includes Figure 4 Components shown.

[0190] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be executed by a computing device in the above method embodiment.

[0191] Figure 5 This is a structural diagram of another computing device provided in another embodiment of the present application. Figure 5 As shown, the computing device includes a memory 50 and a processor 51 .

[0192] The processor 51 is coupled to the memory 50 and is configured to execute the computer program in the memory 50 to:

[0193] Get the string to be understood;

[0194] Perform pinyin segmentation on the character string to be understood to obtain a pinyin sequence;

[0195] Determine a Chinese sequence corresponding to a pinyin sequence based on a mapping relationship between the full pinyin and / or pinyin abbreviation and Chinese characters;

[0196] Generate the understanding result corresponding to the character string to be understood according to the Chinese sequence.

[0197] In an optional embodiment, the pinyin sequence includes at least one character group, and the character group includes the full pinyin or the pinyin abbreviation.

[0198] In an optional embodiment, when performing pinyin segmentation on the character string to be understood to obtain a pinyin sequence, the processor 51 is configured to:

[0199] Input the string to be understood into the pinyin word segmentation model;

[0200] In the pinyin word segmentation model, at least one string of continuous characters that meets the pinyin full spelling feature and at least one single character that does not meet the pinyin full spelling feature in the character string to be understood are identified as character groups to generate a pinyin sequence corresponding to the character string to be understood.

[0201] In an optional embodiment, when the processor 51 identifies at least one continuous string of characters that conform to the pinyin and full spelling features and at least one single character that does not conform to the pinyin and full spelling features in the character string to be understood, it is configured to:

[0202] For each character in the string to be understood, determine the probability that the character meets the state characteristics of each spelling position under the full pinyin spelling based on the character's context and the character itself;

[0203] If the probability of the character meeting the state feature of any spelling position under the full pinyin spelling meets the preset conditions, it is determined that the character meets the full pinyin spelling feature;

[0204] If the probability that the character meets the state characteristics of each spelling position under the full pinyin spelling does not meet the preset conditions, the character is determined to be a single character that does not meet the full pinyin spelling characteristics.

[0205] In an optional embodiment, before inputting the character string to be understood into the pinyin segmentation model, the processor 51 is further configured to:

[0206] Obtain training text and convert the training text into full pinyin to obtain a training sequence;

[0207] Label the spelling positions of the characters in the training sequence;

[0208] The labeled training sequence is input into the pinyin word segmentation model so that the pinyin word segmentation model can learn the state features of each spelling position under the pinyin full spelling as the pinyin full spelling features.

[0209] In an optional embodiment, the pinyin word segmentation model adopts a Hidden Markov Model (HMM).

[0210] In an optional embodiment, when determining the Chinese sequence corresponding to the pinyin sequence based on the mapping relationship between the full pinyin and / or pinyin abbreviations and Chinese characters, the processor 51 is configured to:

[0211] Input the pinyin sequence into the pinyin understanding model;

[0212] In the pinyin understanding model, based on the mapping relationship between the full pinyin and / or pinyin abbreviation and Chinese, the Chinese corresponding to at least one character group in the pinyin sequence is determined; and a Chinese sequence is composed according to the Chinese corresponding to at least one character group.

[0213] In an optional embodiment, when the pinyin sequence is input into the pinyin understanding model, the processor 51 is configured to:

[0214] Determine the target industry sector for the string to be understood;

[0215] Input the pinyin sequence and target industry domain into the pinyin understanding model;

[0216] When determining the Chinese corresponding to at least one character group in a pinyin sequence based on the mapping relationship between the full pinyin and / or pinyin abbreviations and Chinese characters, it is used to:

[0217] Based on the mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters in the target industry field, the Chinese characters corresponding to at least one character group in the pinyin sequence are determined.

[0218] In an optional embodiment, the processor 51 is further configured to: before inputting the pinyin sequence into the pinyin understanding model;

[0219] Get the training text and split it into word sequences;

[0220] Convert single-word sequences into full-length pinyin sequences and pinyin abbreviation sequences;

[0221] The pinyin understanding model is trained with a pinyin full spelling sequence and a pinyin abbreviation sequence as input and a training text as output, so that the pinyin understanding model learns the mapping relationship between the pinyin full spelling and pinyin abbreviation and Chinese.

[0222] In an optional embodiment, the pinyin understanding model adopts a sequence-to-sequence seq2seq model.

[0223] In an optional embodiment, the method is further used to:

[0224] Add the understanding result corresponding to the character string to be understood to the database where the character string to be understood is located; or

[0225] Based on the understanding result corresponding to the character string to be understood and the understanding results corresponding to other character strings to be understood in the database where the character string to be understood is located, an association relationship between the character string to be understood and the understanding results in the database is constructed.

[0226] In an optional embodiment, before performing pinyin segmentation on the character string to be understood to obtain a pinyin sequence, the processor 51 is further configured to:

[0227] If the string to be understood contains a separator character, the string to be understood can be divided into multiple character segments according to the separator character;

[0228] For each of the plurality of character segments, performing pinyin segmentation on the character string to be understood to obtain a pinyin sequence and determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters, thereby obtaining Chinese sequences for each of the plurality of character segments;

[0229] Generate field annotations corresponding to the string to be understood based on the Chinese sequence, including:

[0230] The Chinese sequences of multiple character segments are concatenated to generate field annotations corresponding to the character strings to be understood.

[0231] It is worth noting that the technical details in the above-mentioned embodiments of the computing device can be referred to the relevant descriptions in the above-mentioned embodiments of the string understanding method. To save space, they will not be repeated here, but this should not cause any loss of the scope of protection of this application.

[0232] Further, if Figure 5 As shown, the computing device also includes: a communication component 52, a power supply component 53 and other components. Figure 5 Only some components are shown schematically, and it does not mean that the computing device only includes Figure 5 Components shown.

[0233] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be executed by a computing device in the above method embodiment.

[0234] in, Figure 4 and Figure 5 The memory in the computing platform is used to store computer programs and can be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc. The memory can be implemented by any type of volatile or non-volatile storage device or a combination of them, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0235] in, Figure 4 and Figure 5The communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0236] in, Figure 4 and Figure 5 The power supply component in a device provides power to various components of the device in which the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.

[0237] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0238] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0239] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0240] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0241] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0242] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0243] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0244] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0245] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A method for generating field annotations, characterized in that: include: Get the name of the field to be processed; Input the field name into the pinyin word segmentation model; In the pinyin word segmentation model, at least one string of continuous characters that conforms to the full pinyin feature and at least one single character that does not conform to the full pinyin feature in the field name are identified as character groups, respectively, to generate a pinyin sequence corresponding to the field name, wherein the pinyin sequence contains at least one character group, and the character group contains the full pinyin or the pinyin abbreviation; The identifying of at least one string of continuous characters that meet the pinyin full spelling feature and at least one single character that does not meet the pinyin full spelling feature in the field name includes: for each character in the field name, according to the context of the character and the character itself, determining the probability that the character meets the state feature of each spelling position under the pinyin full spelling; if the probability that the character meets the state feature of any spelling position under the pinyin full spelling meets a preset condition, determining that the character meets the pinyin full spelling feature; if the probability that the character meets the state feature of each spelling position under the pinyin full spelling does not meet the preset condition, determining that the character is a single character that does not meet the pinyin full spelling feature; the pinyin full spelling feature includes the state feature of each spelling position under the pinyin full spelling used to train the pinyin word segmentation model; Determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters; Generate a field annotation corresponding to the field name according to the Chinese sequence.

2. The method according to claim 1, characterized in that Before inputting the field name into the pinyin word segmentation model, it also includes: Acquire a training text, and convert the training text into full pinyin spelling to obtain a training sequence; Marking the spelling positions of the characters in the training sequence; The labeled training sequence is input into the pinyin word segmentation model so that the pinyin word segmentation model can learn the state features of each spelling position under the pinyin full spelling as the pinyin full spelling features.

3. The method according to claim 1, characterized in that The pinyin word segmentation model adopts the Hidden Markov Model (HMM).

4. The method according to claim 1, wherein The determining of the Chinese sequence corresponding to the pinyin sequence based on the mapping relationship between the full pinyin and / or pinyin abbreviation and Chinese characters includes: Inputting the pinyin sequence into a pinyin understanding model; In the pinyin understanding model, based on the mapping relationship between pinyin full spelling and / or pinyin abbreviation and Chinese, the Chinese corresponding to at least one character group in the pinyin sequence is determined; and the Chinese sequence is composed according to the Chinese corresponding to at least one character group.

5. The method according to claim 4, characterized in that The step of inputting the pinyin sequence into a pinyin understanding model comprises: Determine the target industry field to which the field name belongs; Inputting the pinyin sequence and the target industry field into the pinyin understanding model; The determining, based on the mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and the Chinese characters, the Chinese characters corresponding to at least one character group in the pinyin sequence includes: Based on the mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters in the target industry field, the Chinese characters corresponding to at least one character group in the pinyin sequence are determined.

6. The method according to claim 4, characterized in that Before inputting the pinyin sequence into the pinyin understanding model, the method further includes: Obtaining a training text, and segmenting the training text into single-word sequences; Convert the single word sequence into a full phonetic spelling sequence and a phonetic abbreviation sequence; The pinyin understanding model is trained with the pinyin full spelling sequence and the pinyin abbreviation sequence as input and the training text as output, so that the pinyin understanding model learns the mapping relationship between pinyin full spelling, pinyin abbreviation and Chinese.

7. The method according to claim 4, characterized in that The pinyin understanding model adopts a sequence-to-sequence seq2seq model.

8. The method according to claim 1, characterized in that Also includes: Add the field annotation corresponding to the field name to the database where the field name is located; or Based on the field annotation corresponding to the field name and the field annotations corresponding to other field names in the database where the field name is located, an association relationship between the field name and the field annotation in the database is constructed.

9. The method according to claim 1, characterized in that Before performing pinyin segmentation on the field name to obtain a pinyin sequence, the method further includes: If the field name contains a separator character, the field name can be divided into multiple character segments based on the separator character; For each of the plurality of character segments, performing the operations of performing pinyin segmentation on the field name to obtain a pinyin sequence and determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters, respectively, to obtain Chinese sequences for each of the plurality of character segments; Generating a field annotation corresponding to the field name according to the Chinese sequence includes: The Chinese character sequences of the plurality of character segments are concatenated to generate a field annotation corresponding to the field name.

10. A computing device, characterized in that When used for memory and processor; The memory is used to store one or more computer instructions; The processor is coupled to the memory and configured to execute the one or more computer instructions for: Get the name of the field to be processed; Input the field name into the pinyin word segmentation model; In the pinyin word segmentation model, at least one string of continuous characters that conforms to the full pinyin feature and at least one single character that does not conform to the full pinyin feature in the field name are identified as character groups, respectively, to generate a pinyin sequence corresponding to the field name, wherein the pinyin sequence contains at least one character group, and the character group contains the full pinyin or the pinyin abbreviation; The identifying of at least one string of continuous characters that meet the pinyin full spelling feature and at least one single character that does not meet the pinyin full spelling feature in the field name includes: for each character in the field name, according to the context of the character and the character itself, determining the probability that the character meets the state feature of each spelling position under the pinyin full spelling; if the probability that the character meets the state feature of any spelling position under the pinyin full spelling meets a preset condition, determining that the character meets the pinyin full spelling feature; if the probability that the character meets the state feature of each spelling position under the pinyin full spelling does not meet the preset condition, determining that the character is a single character that does not meet the pinyin full spelling feature; the pinyin full spelling feature includes the state feature of each spelling position under the pinyin full spelling used to train the pinyin word segmentation model; Determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters; Generate a field annotation corresponding to the field name according to the Chinese sequence.

11. The device according to claim 10, characterized in that Before inputting the field name into the pinyin word segmentation model, the processor is further configured to: Acquire a training text, and convert the training text into full pinyin spelling to obtain a training sequence; Marking the spelling positions of the characters in the training sequence; The labeled training sequence is input into the pinyin word segmentation model so that the pinyin word segmentation model can learn the state features of each spelling position under the pinyin full spelling as the pinyin full spelling features.

12. The device according to claim 10, characterized in that The pinyin word segmentation model adopts the Hidden Markov Model (HMM).

13. The device according to claim 10, characterized in that When determining the Chinese sequence corresponding to the pinyin sequence based on the mapping relationship between the full pinyin and / or pinyin abbreviations and Chinese characters, the processor is configured to: Inputting the pinyin sequence into a pinyin understanding model; In the pinyin understanding model, based on the mapping relationship between pinyin full spelling and / or pinyin abbreviation and Chinese, the Chinese corresponding to at least one character group in the pinyin sequence is determined; and the Chinese sequence is composed according to the Chinese corresponding to at least one character group.

14. The device according to claim 13, characterized in that When the processor inputs the pinyin sequence into the pinyin understanding model, it is configured to: Determine the target industry field to which the field name belongs; Inputting the pinyin sequence and the target industry field into the pinyin understanding model; When determining the Chinese corresponding to at least one character group in the pinyin sequence based on the mapping relationship between the full pinyin and / or pinyin abbreviation and the Chinese character, it is used to: Based on the mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters in the target industry field, the Chinese characters corresponding to at least one character group in the pinyin sequence are determined.

15. The device according to claim 13, characterized in that Before inputting the pinyin sequence into the pinyin understanding model, the processor is further configured to: Obtaining a training text, and segmenting the training text into single-word sequences; Convert the single word sequence into a full phonetic spelling sequence and a phonetic abbreviation sequence; The pinyin understanding model is trained with the pinyin full spelling sequence and the pinyin abbreviation sequence as input and the training text as output, so that the pinyin understanding model learns the mapping relationship between pinyin full spelling, pinyin abbreviation and Chinese.

16. The device according to claim 13, characterized in that The pinyin understanding model adopts a sequence-to-sequence seq2seq model.

17. The device according to claim 10, characterized in that The processor is further configured to: Add the field annotation corresponding to the field name to the database where the field name is located; or Based on the field annotation corresponding to the field name and the field annotations corresponding to other field names in the database where the field name is located, an association relationship between the field name and the field annotation in the database is constructed.

18. The device according to claim 10, characterized in that Before performing pinyin segmentation on the field name to obtain a pinyin sequence, the processor is further configured to: If the field name contains a separator character, the field name can be divided into multiple character segments based on the separator character; For each of the plurality of character segments, performing the operations of performing pinyin segmentation on the field name to obtain a pinyin sequence and determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters, respectively, to obtain Chinese sequences for each of the plurality of character segments; Generating a field annotation corresponding to the field name according to the Chinese sequence includes: The Chinese character sequences of the plurality of character segments are concatenated to generate a field annotation corresponding to the field name.

19. A method for understanding a character string, characterized in that: include: Get the string to be understood; Inputting the character string to be understood into a pinyin word segmentation model; In the pinyin word segmentation model, at least one string of continuous characters that conforms to the full pinyin feature and at least one single character that does not conform to the full pinyin feature in the character string to be understood are identified and used as character groups to generate a pinyin sequence corresponding to the character string to be understood, wherein the pinyin sequence includes at least one character group, and the character group includes the full pinyin or the pinyin abbreviation; The identifying of at least one string of continuous characters that meet the pinyin full spelling feature and at least one single character that does not meet the pinyin full spelling feature in the character string to be understood includes: for each character in the character string to be understood, according to the context of the character and the character itself, determining the probability that the character meets the state feature of each spelling position under the pinyin full spelling; if the probability that the character meets the state feature of any spelling position under the pinyin full spelling meets a preset condition, determining that the character meets the pinyin full spelling feature; if the probability that the character meets the state feature of each spelling position under the pinyin full spelling does not meet the preset condition, determining that the character is a single character that does not meet the pinyin full spelling feature; the pinyin full spelling feature includes the state feature of each spelling position under the pinyin full spelling used to train the pinyin word segmentation model; Determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters; According to the Chinese sequence, an understanding result corresponding to the character string to be understood is generated.

20. The method according to claim 19, characterized in that The character string to be understood includes: one or more of: a field name in a database, a character string in a chat content, a professional term, and a search keyword.

21. A computing device, characterized in that including memory and processor; The memory is used to store one or more computer instructions; The processor is coupled to the memory and configured to execute the one or more computer instructions for: Get the string to be understood; Inputting the character string to be understood into a pinyin word segmentation model; In the pinyin word segmentation model, at least one string of continuous characters that conforms to the full pinyin feature and at least one single character that does not conform to the full pinyin feature in the character string to be understood are identified and used as character groups to generate a pinyin sequence corresponding to the character string to be understood, wherein the pinyin sequence includes at least one character group, and the character group includes the full pinyin or the pinyin abbreviation; The identifying of at least one string of continuous characters that meet the pinyin full spelling feature and at least one single character that does not meet the pinyin full spelling feature in the character string to be understood includes: for each character in the character string to be understood, according to the context of the character and the character itself, determining the probability that the character meets the state feature of each spelling position under the pinyin full spelling; if the probability that the character meets the state feature of any spelling position under the pinyin full spelling meets a preset condition, determining that the character meets the pinyin full spelling feature; if the probability that the character meets the state feature of each spelling position under the pinyin full spelling does not meet the preset condition, determining that the character is a single character that does not meet the pinyin full spelling feature; the pinyin full spelling feature includes the state feature of each spelling position under the pinyin full spelling used to train the pinyin word segmentation model; Determining a Chinese sequence corresponding to the pinyin sequence based on a mapping relationship between the full pinyin spelling and / or the pinyin abbreviation and Chinese characters; According to the Chinese sequence, an understanding result corresponding to the character string to be understood is generated.

22. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the field annotation generating method according to any one of claims 1 to 8 or the string understanding method according to any one of claims 19 to 20.

Citation Information

Patent Citations

  • Word segmentation method and server

    CN110162794A

  • Table name and field name intelligent completion method based on NLP technology

    CN110413972A

  • Text input method and device

    CN110569505A