Object name standardization processing method and device, equipment and medium
A semantic similarity model trained on bond names improves bond search efficiency by accurately matching arbitrary names to standard names, addressing inefficiencies in existing methods.
Patent Information
- Application Number
- CN202411417945.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-03
AI Technical Summary
Existing methods for bond name standardization, such as dictionary matching and rule-based fuzzy matching, are inefficient and difficult to cover all possible situations, leading to complexity and inaccuracy in bond name searches.
A method and device using a pre-training model to create a semantic similarity model that associates arbitrary bond names with standard names, enabling accurate matching through a trained corpus and a semantic similarity model.
Enhances the convenience and efficiency of bond name searches by allowing users to input rough information, accurately hitting the target bond name without adhering to strict standards.
Smart Images

Figure CN119250079A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence technology and financial technology, and in particular to a method, device, equipment and medium for standardizing object names. Background Art
[0002] Name standardization refers to the process of unifying different forms of names into a standard format. Common applications of name standardization include: address standardization in the logistics industry, equipment name standardization in the manufacturing industry, product name standardization in the e-commerce industry, and search engine search term standardization.
[0003] Similarly, bond name standardization means unifying different bond names into one name through technical means, so as to achieve the regularization and unification of bond document information. Unified names will facilitate management and analysis, and improve production efficiency.
[0004] The standardization of bond names is mainly used in two places: the first is the standardization of manual business ledgers, such as the ledgers formed by bond lead underwriters or participating merchants during the bond sales process. Different sales personnel will inevitably have different standards when recording. If the team wants to review and analyze, they need to manually match the names to standard names one by one, which consumes a lot of manpower and time. The second is the retrieval standardization of bond-related information systems. For example, when a user wants to search for "Shanghai Pudong Development Bank's 2023 No. 016 Interbank Deposit Certificate", if you enter "Shanghai Pudong Development Bank...", you cannot effectively find the corresponding deposit certificate.
[0005] There are two main methods to achieve bond name standardization. The first is the dictionary matching method, which matches non-standardized names with standardized names by building a dictionary. The disadvantage is that a large dictionary library needs to be maintained, and the dictionary library is difficult to cover all possible situations. The second is the rule matching method, which converts non-standardized names into standardized names by building rules, such as fuzzy matching rules. The disadvantage is that a large number of rules need to be summarized, and the rules are difficult to cover all possible situations. Summary of the invention
[0006] The present invention provides a method, device, computer equipment and medium for standardizing object names to solve the technical problems of complexity, inaccuracy and low efficiency in object name search.
[0007] In a first aspect, a method for standardizing an object name is provided, comprising:
[0008] Acquire a corpus to be trained, the corpus including a plurality of arbitrary names, a plurality of corresponding standard names, and information on whether the plurality of arbitrary names are consistent with the plurality of standard names;
[0009] The acquired corpus is trained by a pre-training model to obtain a semantic similarity model that associates the consistency of any name in the corpus with the corresponding standard name;
[0010] The semantic similarity model is used to determine whether any name of the new corpus is consistent with the standard name.
[0011] In a second aspect, a device for standardizing object names is provided, comprising:
[0012] An acquisition module, used for acquiring corpus to be trained, wherein the corpus includes a plurality of arbitrary names, a plurality of corresponding standard names, and information on whether the plurality of arbitrary names are consistent with the plurality of standard names;
[0013] A training module, used to train the acquired corpus through a pre-training model to obtain a semantic similarity model associated with the consistency of any name in the corpus and its corresponding standard name;
[0014] The judgment module is used to judge whether any name of the new corpus is consistent with the standard name through the semantic similarity model.
[0015] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned object name standardization processing method when executing the computer program.
[0016] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned object name standardization processing method are implemented.
[0017] In the scheme implemented by the above-mentioned object name standardization processing method, device, computer equipment and storage medium, a corpus to be trained is obtained, the corpus includes multiple arbitrary names, corresponding multiple standard names, and information on whether the multiple arbitrary names are consistent with the multiple standard names; the obtained corpus is then trained through a pre-training model to obtain a semantic similarity model that associates the consistency of the arbitrary names of the corpus with the corresponding standard names; finally, the semantic similarity model can be used to judge whether the arbitrary names and standard names of the new corpus are consistent. Applying the present invention in the field of bond names will greatly enhance the convenience of bond name searches and improve work efficiency. Users do not have to deliberately follow the standard name search for bonds, they only need to roughly enter some information according to their ideas to hit the target bond name more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0019] Figure 1 is a flow chart of a method for standardizing object names in one embodiment of the present invention;
[0020] Figure 2 yes Figure 1 A flow chart of a specific implementation of step S1;
[0021] Figure 3 This is a flow chart of the model training process of the present invention;
[0022] Figure 4 yes Figure 1 A schematic flow chart of a specific implementation of step S2;
[0023] Figure 5 yes Figure 1 A schematic flow chart of a specific implementation of step S3;
[0024] Figure 6 is a structural schematic diagram of an object name standardization processing device in one embodiment of the present invention;
[0025] Figure 7 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0026] Figure 8 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] like Figure 1 As shown, an object name standardization processing method provided by an embodiment of the present invention includes:
[0029] S1, obtaining a corpus to be trained, wherein the corpus includes a plurality of arbitrary names, a plurality of corresponding standard names, and information on whether the plurality of arbitrary names are consistent with the plurality of standard names;
[0030] S2, training the acquired corpus through a pre-training model to obtain a semantic similarity model that associates the consistency of any name in the corpus with its corresponding standard name;
[0031] S3, judging whether any name of the new corpus is consistent with the standard name through the semantic similarity model.
[0032] The above embodiment is mainly divided into three steps. The first step is to prepare the corpus, the second step is model training, through these two steps a model weight file with predictive ability is obtained, and the third step is application, by inputting a name pair (any name and standard name) into the model, the model returns whether the label is consistent.
[0033] In the scheme implemented by the object name standardization processing method, device, computer equipment and storage medium of this embodiment, a corpus to be trained is obtained, and the corpus includes multiple arbitrary names, corresponding multiple standard names, and information on whether the multiple arbitrary names are consistent with the multiple standard names; the obtained corpus is then trained by a pre-training model to obtain a semantic similarity model that associates the arbitrary names of the corpus with the consistency of the corresponding standard names; finally, the semantic similarity model can be used to judge whether the arbitrary names and standard names of the new corpus are consistent. Applying the present invention in the field of bond names will greatly improve the convenience of bond name searches and improve work efficiency. Users do not have to deliberately follow the standard name search for bonds, they only need to roughly enter some information according to their ideas to hit the target bond name more accurately.
[0034] After the semantic similarity model obtained by model training is put online, it can be used. The method of use is relatively simple. The input format is: arbitrary name, standard name, and the output format is: arbitrary name, standard name, whether it is consistent. If the above method is applied to the field of bond names, it will greatly improve the convenience of bond name search and improve work efficiency. Users do not have to deliberately follow the standard name search of bonds. They only need to roughly enter some information according to their ideas to hit the target bond name more accurately.
[0035] The present invention is described in detail below through specific embodiments.
[0036] The pre-trained model of this embodiment can be implemented based on BERT, where BERT is a pre-trained language model released by Google in 2018, and its full name is Bidirectional Encoder Representations from Transformers. It has reached the best level at that time in processing various NLP downstream tasks. The network architecture of BERT is a multi-layer bidirectional Transformer encoder. The structure of the Transformer encoder includes several parts. The first layer: the input vector in units of words, represented by b; the second layer: the vector of each word is calculated by the self-attention mechanism for the input, represented by a; the third layer: residual operation is performed through a+b; the fourth layer: the residual layer is normalized; the fifth layer: the standardized result is fully connected; the sixth layer: the residual calculation is performed again for the fully connected result; the seventh layer: finally, a normalization operation is performed again, and a result vector is output.
[0037] See also Figure 2 As shown, Figure 2 A flowchart of a method for standardizing object names provided by an embodiment of the present invention includes the following steps:
[0038] S10: Acquire multiple corpora, each of which includes an arbitrary name of the corpus, a corresponding standard name, and information on whether the two names are consistent;
[0039] Corpus preparation is mainly for model training and / or testing. The form of corpus is "arbitrary name, standard name, whether it is consistent". Table 1 below shows a sample of corpus. For example, bonds include all bond types such as treasury bonds, local government bonds, central bank bills, interbank deposits, financial bonds, corporate bonds, corporate bonds, convertible bonds, exchangeable bonds, asset-backed securities, medium-term notes, short-term financing bills, non-public directional bond financing instruments, government-supported agency bonds, project revenue notes, and international agency bonds. The standard name information of bonds can be derived from wind, and part of the arbitrary name comes from wind's bond abbreviations, and the other part can come from manual construction. Wind bond abbreviations, in simple terms, are a way to classify and identify bonds. In this way, you can quickly understand key information such as the type, issuer, and maturity date of the bond. The emergence of this abbreviation has brought great convenience to financial life. Each bond has its own unique attributes and characteristics, such as type, issuer, maturity date, etc. Then, based on these attributes and characteristics, each bond is given a unique abbreviation. In this way, when you see this abbreviation, you can immediately know all the key information of this bond. This is just an example, and the origin of the bond name is not limited to the above.
[0040] Table 1 Corpus sample
[0041]
[0042]
[0043] S11: Unify the input format of all corpora to obtain corpus training samples with a unified format.
[0044] Before the obtained corpus is trained by the pre-training model to obtain a semantic similarity model associated with the consistency of any name of the corpus and its corresponding standard name, the method further includes:
[0045] The unified input format for all corpora includes:
[0046] The corpus is classified according to its nature, i.e., it belongs to the class of arbitrary names or the class of standard names;
[0047] Then annotate the corresponding relationships of the classified corpus;
[0048] The corpus after classification and annotating the corresponding relationship is divided into the following formats: <cls>, any name, separator <sep>, standard name, end character <sep>.
[0049] It is crucial to obtain training samples of corpus in a uniform format. This usually requires preprocessing the corpus through data preprocessing steps to ensure that all data follows the same format and structure. The following are some common data preprocessing steps:
[0050] Text cleaning:
[0051] Remove irrelevant characters (such as HTML tags, special symbols, etc.).
[0052] Remove or replace non-standard characters (e.g. emojis, non-ASCII characters, etc.).
[0053] Remove extra spaces and line breaks.
[0054] standardization:
[0055] Convert all text to lowercase (or uppercase) to reduce vocabulary diversity.
[0056] Unify the way of expressing numbers (such as converting Arabic numerals into Chinese numerals).
[0057] Participle:
[0058] Perform word segmentation on Chinese text to ensure that each word or phrase is segmented correctly.
[0059] Balanced Dataset:
[0060] If the dataset has imbalanced classes, you can balance the data by oversampling, undersampling, or using synthetic data generation techniques.
[0061] Save and Load:
[0062] Save the processed data as files or database records for subsequent use.
[0063] like Figure 3 As shown, the sample format is: start character <cls>, any name, separator <sep>, standard name, end character <sep>.
[0064] This format is often used in sequence labeling or text classification tasks in natural language processing tasks, where different entities or categories need to be distinguished. Among them, the text classification task is to classify the entire text as a whole.
[0065] The start symbol is the entry point of the compilation process, pointing to the first symbol node, usually represented by a special symbol. The following will introduce the relevant information of the start symbol:
[0066] The start symbol is a non-terminal symbol. It is used as the starting point of the grammar and is used at the beginning of the derivation process. Its main function is to guide the parser (such as LL(1), LR(1), etc.) to perform parsing.
[0067] In addition, the method of selecting the start character
[0068] Explicitly specified: A grammar definition usually explicitly specifies a starting production rule, whose left side is the start symbol.
[0069] Observational selection: If the grammar does not explicitly specify the start symbol, it can be determined by observing the grammar's production rules. Usually, the non-terminal symbol that appears more often is selected as the start symbol.
[0070] Applications of start characters include:
[0071] Attribute computation: In attribute grammars, the start symbol usually has a special attribute, such as "initial", whose value is the entire input string or an empty value.
[0072] Compiler Design: In compiler design, the start symbol is used to initiate the syntax analysis process and generate a syntax tree or abstract syntax tree.
[0073] The start symbol plays a vital role in grammatical analysis. It determines the starting point and path of parsing. Through the start symbol, sentences that conform to specific grammar rules can be generated, which is very important for natural language processing and programming language design. The start symbol is usually represented by a special symbol, such as S, [start], etc.
[0074] Example: In a specific grammar, such as S->AaB|aB, S is the start symbol. <cls>,Start symbols play an important role in compiler theory and natural language processing.,They are the starting point of grammar analysis and determine the process of language generation and parsing.,The correct selection and use of start symbols is crucial to building effective compilers and language processing systems.
[0075] A delimiter is a special character or symbol sequence used to distinguish different parts of data or text. A delimiter is a special character or symbol sequence used to separate different parts of data or text. It can help organize and parse data so that complex information can be clearly divided and processed.
[0076] Common types include:
[0077] Comma: In CSV files, commas are often used as delimiters to separate different columns.
[0078] Tab characters: In some text files, tab characters are used to separate different fields.
[0079] Delimiters are mainly used in databases and spreadsheets to separate different records and fields. In addition, in programming languages, delimiters are used to distinguish different parts of the code, such as function parameters, variable declarations, etc. Delimiters are crucial for data parsing, ensuring that data is read and processed correctly. In text processing, delimiters help to separate sentences, paragraphs, or different blocks of text. Delimiters are usually represented by special characters, such as commas, semicolons, colons, etc. In regular expressions, delimiters can be used to match specific patterns, such as using \s+ to match one or more whitespace characters as delimiters. The delimiter representation in this embodiment <sep>.
[0080] Steps:
[0081] Select delimiter: Select an appropriate delimiter based on the characteristics and requirements of the data.
[0082] Apply Delimiter: Apply the selected delimiter during data entry, storage, and processing.
[0083] Delimiters can be part of punctuation, such as commas, periods, etc. In some cases, delimiters may need to be escaped to avoid conflicts or confusion.
[0084] The use of delimiters has evolved with the development of data processing technology, from simple text files to complex database systems. For example:
[0085] CSV File Processing: When processing CSV files, delimiters are used to distinguish different columns and rows.
[0086] JSON data parsing: When parsing JSON data, delimiters such as colons and commas are used to distinguish key-value pairs and array elements.
[0087] Delimiters play an important role in data processing and text organization and are a key tool for distinguishing different parts of data. Proper selection and use of delimiters is essential to ensure data accuracy and ease of use.
[0088] Terminators play an important role in programming and data processing. They are used to mark the end of a code block, statement, or expression. A terminator is a specific symbol or character sequence that is used to mark the end of a code block, statement, or expression, helping the compiler or interpreter identify the structure of the code and ensure that the program can be compiled and executed correctly.
[0089] Common types include:
[0090] Semicolon: In many programming languages, such as C, C++, and Java, semicolons are used to end statements.
[0091] Curly braces: In brace languages (such as the C family of languages), curly braces are used to delimit the start and end of a code block.
[0092] Almost all programming languages use terminators to delimit different sections of code. In some data formats, such as JSON, terminators are used to mark the end of an object. Terminators are part of the syntax rules of a programming language and are essential for writing correct code. Missing or incorrect use of terminators can result in compilation errors or runtime errors.
[0093] The terminator is usually represented by special characters, such as semicolons, curly brackets, parentheses, etc. <sep>.
[0094] In C language, {} is used to delimit the function body, and ; is used to end the statement.
[0095] The start and end symbols usually appear in pairs to define the scope of a code block or statement. In some cases, operators can also be used as end symbols, such as the plus sign and minus sign.
[0096] In daily programming practice, the correct use of terminators is the basis for writing high-quality code. In the code review process, checking the use of terminators is an important part of ensuring code quality.
[0097] In short, terminators play a vital role in programming and data processing and are an important part of the grammatical rules of programming languages. Correctly understanding and using terminators is essential for writing clear and maintainable code.
[0098] like Figure 4 As shown, in some embodiments, the specific implementation method of training the acquired corpus through the pre-training model to obtain the semantic similarity model associated with the consistency of any name of the corpus and its corresponding standard name includes:
[0099] S21, obtaining the multi-dimensional vector of the start symbol in each corpus through the pre-training model;
[0100] In some embodiments, the start symbol is obtained by BERT network calculation. <cls>The output vector O∈R 1×512 , where R 1×512 Represents a 1×512 dimensional vector.
[0101] A vector is a quantity with magnitude and direction that can be represented as an ordered set of numbers representing the components of the vector in each dimension.
[0102] For example, a 3-dimensional vector can be represented as (x, y, z), where x, y, and z are the components of the vector in three dimensions. Similarly, a 512-dimensional vector can be represented as (x1, x2, ..., x512)(x1, x2, ..., x512), where x1 to x512 are the components of the vector in 512 dimensions.
[0103] In practical applications, 512-dimensional vectors are used to represent high-dimensional data. For example, a sentence can be represented as a 512-dimensional word vector.
[0104] The start character <cls>The output vector of is connected to a linear classifier, the function of the linear classifier is to perform linear classification transformation on the start symbol.
[0105] It needs to be explained that a linear classifier is a model that makes classification decisions through a linear combination of features, and is mainly used to solve binary and multi-classification problems.
[0106] A linear classifier is an algorithm used in supervised learning that aims to assign input data to different categories based on its characteristics.
[0107] How it works: A linear classifier computes a weighted sum (i.e., linear combination) of the input features and then applies a decision rule (such as a threshold) to determine the class of a data point.
[0108] Application scenarios: Linear classifiers are widely used in various fields, such as text classification, image recognition, medical diagnosis, etc., especially when processing large-scale data sets, they show high efficiency and good interpretability.
[0109] Key components include:
[0110] Scoring function: The scoring function maps input features to scores for each category, which reflects the likelihood that the input belongs to each category. The scoring function is usually expressed as the dot product of the input features and the weight vector plus a bias term.
[0111] Loss function: The loss function is used to measure the difference between the model prediction results and the actual labels. Commonly used loss functions include mean square error loss and cross entropy loss.
[0112] Optimization methods: In order to minimize the loss function, the model parameters (weights and biases) need to be updated through optimization algorithms such as gradient descent.
[0113] Specific types include:
[0114] Logistic regression: Logistic regression is one of the most common linear classifiers, especially suitable for binary classification problems. It uses a logistic function (such as the Sigmoid function) to convert the linear output into a probability to make a classification decision.
[0115] Perceptron: Perceptron is one of the earliest artificial neural network models and can be seen as the simplest linear classifier. It responds to training samples by adjusting weights until it finds a suitable classification hyperplane.
[0116] Support vector machine: Support vector machine is a powerful linear classifier that performs classification by finding a hyperplane that maximizes the margin between categories. It is particularly suitable for classification problems in high-dimensional space.
[0117] In short, linear classifiers play an important role in the field of machine learning due to their simplicity and high efficiency. Whether in theoretical research or practical applications, linear classifiers have demonstrated their unique value and broad application prospects.
[0118] S22, processing the multidimensional vector of the start symbol through the linear classifier to obtain a vector
[0119] In some embodiments, the multidimensional vector of the start symbol is processed by the linear classifier to obtain a vector include:
[0120] S221, obtain a 2-dimensional vector matrix W∈R with the same dimension as the vector of the start symbol 512×2 , the vector matrix is the function to be implemented by the linear classifier;
[0121] S222, multiplying the multidimensional vector of the start symbol by the 2-dimensional vector parameter matrix Get vector
[0122] S23, for the vector Perform normalization to obtain the probability of whether any name is consistent with the standard name
[0123] Among them, during the normalization process, by Perform Softmax transformation The probability of getting the consistency between any name and the standard name is:
[0124] in, The multidimensional vector representing the start symbol and the vector obtained after processing by the linear classifier, Represents a vector The normalized probability that an arbitrary name is consistent with the standard name.
[0125] The probability of obtaining a consistent The label y that is consistent with the actual condition is used as an input to the pre-training model, and a cross entropy loss function model including a weight parameter indicating whether the condition is consistent is obtained through the pre-training model, wherein the weight parameter is a variable of the cross entropy loss function model;
[0126] Specifically, the probability of obtaining consistency The label y that is consistent with the actual situation is used as input to obtain the cross entropy loss function model Among them, y represents the label of whether the actual consistency is consistent. represents the cross entropy loss function model, y i Indicates whether the actual label of the i-th corpus is consistent. A vector representing the multidimensional vector of the start symbol of the i-th corpus after being processed by the linear classifier. In addition, the variable of the cross entropy loss function model is the weight of the network structure;
[0127] S25, obtaining a semantic similarity model according to the cross entropy loss function model.
[0128] In some implementations, the obtained probability of consistency and the actual consistency label y are used as input to obtain a cross entropy loss function model The process also includes: S25, using the gradient descent method to optimize the weight of the model and generate the optimal weight function. After the model converges, a final semantic similarity model will be obtained, which specifically includes:
[0129] S251, obtaining a negative gradient function of the function model;
[0130] S252, starting from any point of the negative gradient function, iterate along the negative gradient direction of the negative gradient function according to a convergence condition to obtain an optimal value.
[0131] Gradient descent is a commonly used method to solve optimization problems in machine learning and deep learning models, which minimizes the loss function by continuously adjusting model parameters.
[0132] The working principle is to calculate the gradient (i.e. derivative) of the objective function at the current point, and then update the parameters in the direction of the negative gradient to reduce the function value. This process is repeated until it converges to a local minimum or meets the stopping criteria.
[0133] Key components include:
[0134] Learning rate: The learning rate determines the pace of each parameter update. If it is too large, it may cause oscillation or even divergence, while if it is too small, the convergence speed will be slow.
[0135] Termination conditions: Common termination conditions include reaching the preset maximum number of iterations, the norm of the gradient is less than a certain threshold, the change in the loss function value is less than a certain threshold, etc.
[0136] Specific types include:
[0137] Batch gradient descent: All data are used to calculate the gradient in each iteration. It is suitable for smaller data sets, but the calculation efficiency is low for large data sets.
[0138] Stochastic gradient descent: Each iteration uses only one sample's data to calculate the gradient. It is suitable for large-scale data sets, but the convergence may be slow and unstable.
[0139] Mini-batch gradient descent: It combines the advantages of batch gradient descent and stochastic gradient descent. It uses a small batch of data to calculate the gradient in each iteration, balancing computational efficiency and stability.
[0140] Gradient descent is mainly used in machine learning and deep learning: when training various machine learning models, especially neural networks, gradient descent is one of the most commonly used optimization algorithms. In addition to machine learning, gradient descent is also widely used in solving optimization problems in fields such as operations research and statistics.
[0141] It should also be noted that the cross-entropy loss function is a commonly used loss function in machine learning, especially in classification problems. It is used to measure the difference between the probability distribution predicted by the model and the true label.
[0142] The cross entropy loss function is derived from the concept of entropy in information theory and is used to measure the difference between two probability distributions. In classification tasks, the target distribution is usually defined by the true label, while the predicted distribution is represented by the probability value output by the model.
[0143] In the binary classification problem, the cross entropy loss function can be simplified to the form of a logarithmic loss function, which is expressed as: L = -(ylog(p)+(1-y)log(1-p)), where y is the true label and p is the probability that the model predicts the positive class.
[0144] In multi-classification problems, the cross entropy loss function is expanded to: L = -∑(yi*log(pi)), where yi is the true label of the i-th category and pi is the probability of the model predicting the i-th category.
[0145] The cross entropy loss function is widely used in deep learning and neural networks, especially in image recognition, text classification and other fields.
[0146] During the training process, by minimizing the cross entropy loss function, the model parameters can be optimized so that the predicted probability distribution of the model is as close to the true distribution as possible.
[0147] In practical applications, the cross entropy loss function is used in conjunction with the softmax layer to convert the network's output into a probability distribution. Then, the cross entropy loss is calculated based on the true label, and the gradient is calculated through the network back-propagation algorithm to update the model parameters.
[0148] In general, the cross entropy loss function can evaluate the model performance in classification problems, and help the model better learn the inherent laws of the data by quantifying the difference between the predicted probability distribution and the true label distribution. In practical applications, choosing a suitable loss function is crucial to improving the accuracy of the model.
[0149] like Figure 5 As shown, in some embodiments, after the acquired corpus is trained by the training model and a semantic similarity model associating the consistency of any name in the corpus with its corresponding standard name is obtained, the similarity model needs to be tested.
[0150] Model testing is an important part of evaluating the performance of machine learning models, and aims to ensure the effectiveness and reliability of the model in practical applications. Model testing refers to the use of a series of methods and techniques to verify and evaluate the performance, accuracy, and generalization ability of machine learning models. The main purpose of model testing is to ensure that the model can perform well on unseen data and avoid overfitting or underfitting.
[0151] Key components include
[0152] Test dataset: An independent dataset used to evaluate model performance, usually divided into training set, validation set, and test set. The training set is used for model learning, the validation set is used to adjust hyperparameters, and the test set is used for final evaluation.
[0153] Evaluation metrics: Standards for measuring model performance, such as accuracy, precision, recall, F1 score, etc.
[0154] Specific types include:
[0155] Unit testing: Testing individual components or modules in a model to ensure that each part works properly.
[0156] Integration testing: After unit testing, all modules are integrated together for testing to check whether they can work together.
[0157] System testing: Testing performed at the entire system level, including functional testing and non-functional testing (such as performance testing).
[0158] Machine Learning and Deep Learning: Model testing is one of the most commonly used optimization algorithms when training various machine learning models, especially neural networks.
[0159] In addition to machine learning, model testing is also widely used in solving optimization problems in fields such as operations research and statistics.
[0160] Model testing plays an important role in optimization problems due to its simplicity and high efficiency. Whether in theoretical research or practical application, model testing has demonstrated its unique value and broad application prospects.
[0161] The model test in this embodiment specifically includes:
[0162] S31, inputting a number of corpus samples into a semantic similarity model, wherein the input corpus samples include arbitrary names, standard names, and consistency information;
[0163] S32, obtaining output results of a number of the corpus samples output by the semantic similarity model, wherein the output results include arbitrary names, standard names, consistency information, and predicted consistency information;
[0164] S33, obtain the prediction accuracy, where the accuracy is calculated as:
[0165] The number of consistent data samples in the "Is it consistent" and "Is it predicted to be consistent" lists is divided by the total number of data sample tests. Model testing is an important means to test the effect of the semantic similarity model. Now let's take an example. For example, the input is: any name, standard name, is it consistent, and the output is: any name, standard name, is it consistent, and is it predicted to be consistent. The accuracy index is used to evaluate the effect of the model. Assuming that the "Is it consistent" column is represented by S_ACT and the "Is it predicted to be consistent" column is represented by S_PRE, the accuracy is expressed as NUM(S_ACT&S_PRE) / NUM(S_PRE), where & represents intersection, NUM represents the number of list elements, the numerator NUM(S_ACT&S_PRE) represents the number of elements with equal values in the "Is it consistent" and "Is it predicted to be consistent", and the denominator NUM(S_PRE) represents the total number of test data set samples. After experimental data testing, the accuracy is above 95%, which meets the usage standards.
[0166] Through these three steps, the accuracy of the semantic similarity model in dealing with the name consistency problem can be effectively evaluated. First, a corpus sample containing arbitrary names and standard names needs to be prepared and input into the model. Then, the output results of the model are collected, which include not only the input name information but also the model's prediction results. Finally, the accuracy is calculated by comparing the model's prediction with the actual information to evaluate the performance of the model. This process is crucial for optimizing model parameters and improving the reliability of the model in practical applications.
[0167] The embodiment of the present invention will greatly improve the convenience of bond name search and improve work efficiency. Users do not have to deliberately follow the standard bond name search, but only need to roughly enter some information according to their ideas to accurately hit the target bond name.
[0168] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0169] In one embodiment, a device for standardizing object names is provided, and the device for standardizing object names corresponds to the method for standardizing object names in the above embodiment. Figure 6 As shown, the object name standardization processing device includes an acquisition module 101, a training module 102, and a judgment module 103.
[0170] The acquisition module 101 is responsible for collecting and preprocessing data from various sources to provide input for subsequent model training.
[0171] In some examples, the steps include data collection, data cleaning, feature extraction, etc.
[0172] The training module 102 mainly trains the model using the data provided by the acquisition module and optimizes the model parameters to improve performance. This can be done by executing machine learning algorithms, such as neural network training, support vector machine learning, etc., and may involve hyperparameter adjustment and model selection.
[0173] The judgment module 103 evaluates the performance of the trained model on the test data set and judges its accuracy and reliability. This may include calculating evaluation indicators such as accuracy, recall, F1 score, and generating reports for analysis and decision-making.
[0174] These modules together constitute a complete data processing and analysis process. From data acquisition to model training to final result evaluation, each module plays a key role. In actual system design, these modules may be more complex and need to be customized and optimized according to specific application scenarios.
[0175] In this embodiment, each functional module is described in detail as follows:
[0176] An acquisition module 101 is used to acquire a corpus that needs to be trained, wherein the corpus includes a plurality of arbitrary names, a plurality of corresponding standard names, and information on whether the plurality of arbitrary names are consistent with the plurality of standard names;
[0177] The training module 102 is used to train the acquired corpus through a pre-training model to obtain a semantic similarity model that associates the consistency of any name in the corpus with its corresponding standard name;
[0178] The judgment module 103 is used to judge whether any name of the new corpus is consistent with the standard name through the semantic similarity model.
[0179] In one embodiment, the acquisition module 101 is specifically configured to:
[0180] The corpus is formatted, including: obtaining multiple corpora, each of which includes an arbitrary name of the corpus, a corresponding standard name, and information on whether the two names are consistent; dividing and unifying the input format of all corpora to obtain corpus training samples with a unified format.
[0181] In some embodiments, the acquisition module 101 is further specifically used for:
[0182] The step of dividing and unifying the input format of all corpora includes dividing the corpora into the format of: a start symbol, an arbitrary name, a separator, a standard name, and an end symbol.
[0183] In one embodiment, the training module 102 is specifically configured to:
[0184] Obtain the multi-dimensional vector of the start symbol in each corpus through the pre-trained model;
[0185] Get a linear classifier;
[0186] The multidimensional vector of the start symbol is processed by the linear classifier to obtain a vector
[0187] For the vector Perform normalization to obtain the probability of whether any name is consistent with the standard name
[0188] The obtained probability of consistency y^ and the actual label y of consistency are input into the pre-training model, and a cross entropy loss function model including a weight parameter indicating consistency is obtained through the pre-training model, wherein the weight parameter is a variable of the cross entropy loss function model;
[0189] Specifically, the probability of obtaining consistency The label y that is consistent with the actual situation is used as input to obtain the cross entropy loss function model in, The multidimensional vector representing the start symbol and the vector obtained after processing by the linear classifier, Represents a vector The probability of whether the arbitrary name and the standard name are consistent after normalization processing, y represents the label of whether they are actually consistent, represents the cross entropy loss function model, y i Indicates whether the actual label of the i-th corpus is consistent. A vector representing the multidimensional vector of the start symbol of the i-th corpus after being processed by the linear classifier;
[0190] A semantic similarity model is obtained according to the cross entropy loss function model.
[0191] In one embodiment, the training module 102 is further specifically configured to:
[0192] Obtain a 2-dimensional vector matrix with the same dimension as the vector of the start symbol;
[0193] Multiply the multidimensional vector of each start symbol by the 2-dimensional vector parameter matrix to obtain a vector
[0194] In one embodiment, the training module 102 is further specifically configured to:
[0195] Take the obtained probability of consistency and the actual consistency label y as input to obtain the cross entropy loss function model The latter also includes using the gradient descent method to optimize the model weights, including:
[0196] Obtaining a negative gradient function of the function model;
[0197] Starting from any point of the negative gradient function, according to the convergence condition, iterate along the negative gradient direction of the negative gradient function to obtain the optimal value.
[0198] In one embodiment, a testing module 104 is further included, which is specifically used to:
[0199] The obtained corpus is trained by a training model, and a semantic similarity model associated with the consistency of any name of the corpus and its corresponding standard name is obtained, and then the similarity model is tested, including:
[0200] Input a number of corpus samples into the semantic similarity model, the input corpus samples include arbitrary names, standard names, and consistency information;
[0201] Obtaining output results of a number of the corpus samples output by the semantic similarity model, wherein the output results include arbitrary names, standard names, consistency information, and predicted consistency information;
[0202] Get the prediction accuracy, where the accuracy is calculated as:
[0203] The number of consistent data samples in the "Is it consistent" and "Is it predicted to be consistent" lists is divided by the total number of data sample tests. The object name standardization processing device provided by the present invention obtains a corpus that needs to be trained, and the corpus includes multiple arbitrary names, corresponding multiple standard names, and also includes information on whether the multiple arbitrary names are consistent with the multiple standard names; then the acquired corpus is trained through a pre-training model to obtain a semantic similarity model that associates the arbitrary names of the corpus with the consistency of the corresponding standard names; finally, the semantic similarity model can be used to judge whether the arbitrary names and standard names of the new corpus are consistent. Applying the present invention in the field of bond names will greatly enhance the convenience of bond name searches and improve work efficiency. Users do not have to deliberately follow the standard name search for bonds, but only need to roughly input some information according to their ideas to hit the target bond name more accurately.
[0204] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side method for standardizing object names.
[0205] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it realizes the functions or steps of the client side of a method for standardizing object names
[0206] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0207] Acquire a corpus to be trained, the corpus including a plurality of arbitrary names, a plurality of corresponding standard names, and information on whether the plurality of arbitrary names are consistent with the plurality of standard names;
[0208] The acquired corpus is trained by a pre-training model to obtain a semantic similarity model that associates the consistency of any name in the corpus with the corresponding standard name;
[0209] The semantic similarity model is used to determine whether any name in the new corpus is consistent with the standard name.
[0210] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0211] Acquire a corpus to be trained, the corpus including a plurality of arbitrary names, a plurality of corresponding standard names, and information on whether the plurality of arbitrary names are consistent with the plurality of standard names;
[0212] The acquired corpus is trained by a pre-training model to obtain a semantic similarity model that associates the consistency of any name in the corpus with the corresponding standard name;
[0213] The semantic similarity model is used to determine whether any name in the new corpus is consistent with the standard name.
[0214] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0215] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0216] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0217] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
[0218] It should be noted that if software tools or components other than those of our company appear in the embodiments of the present application, they are only used for illustrative purposes and do not represent actual use.< / cls> < / cls> < / sep> < / sep> < / cls> < / sep> < / sep> < / cls> < / sep> < / sep> < / cls>
Claims
1. A method for standardizing object names, characterized in that: include: Get the corpus that needs to be trained; The acquired corpus is trained by a pre-training model to obtain a semantic similarity model that associates the consistency of any name in the corpus with the corresponding standard name; The semantic similarity model is used to determine whether any name of the new corpus is consistent with the standard name.
2. The object name standardization processing method according to claim 1, characterized in that: Obtaining the corpus required for training includes: Acquire multiple corpora, each of which includes an arbitrary name of the corpus, a corresponding standard name, and information on whether the two names are consistent; Unify the input format of all corpora and generate corpus training samples with unified format.
3. The object name standardization processing method according to claim 2, characterized in that: The unified input format of all corpora includes: The corpus is classified according to its nature, i.e., it belongs to the class of arbitrary names or the class of standard names; Annotate the corresponding relationships of the classified corpus; The corpus after classification and annotating the corresponding relationships is divided into the following formats: start symbol, arbitrary name, separator, standard name, and end symbol.
4. The object name standardization processing method according to claim 1, characterized in that: The method of training the acquired corpus by using a pre-trained model to acquire a semantic similarity model associated with the consistency of any name of the corpus and its corresponding standard name includes: Obtain the multi-dimensional vector of each start symbol through the pre-trained model; The multidimensional vector of the start symbol is processed by a linear classifier to obtain a vector For the vector Perform normalization to obtain the probability of whether any name is consistent with the standard name The probability of obtaining a consistent The label y that is consistent with the actual condition is input into the pre-training model, and a cross entropy loss function model including a weight parameter indicating whether the condition is consistent is obtained through the pre-training model, wherein the weight parameter is a variable of the cross entropy loss function model; A semantic similarity model is obtained according to the cross entropy loss function model.
5. The object name standardization processing method according to claim 4, characterized in that: The multidimensional vector of each character is processed by a linear classifier to obtain a vector include: Obtain a two-dimensional vector matrix having the same dimension as the vector of the start symbol; Multiply the multidimensional vector of the start symbol by the two-dimensional vector parameter matrix to obtain a vector 6. The object name standardization processing method according to claim 4, characterized in that: The method uses the obtained probability of consistency and the actual label y of consistency as input, and after obtaining the cross entropy loss function model, further includes optimizing the weight parameters of the model using the gradient descent method, specifically including: Obtaining a negative gradient function of the cross entropy loss function model; Starting from any point of the negative gradient function, according to the convergence condition, iterate along the negative gradient direction of the negative gradient function to obtain the optimal value.
7. The object name standardization processing method according to claim 1, characterized in that: After training the acquired corpus through the training model and acquiring a semantic similarity model associated with the consistency of any name of the corpus and its corresponding standard name, it is also necessary to perform a model test on the similarity model, which specifically includes: Input a number of corpus samples into the semantic similarity model, the input corpus samples include arbitrary names, standard names, and consistency information; Obtaining output results of a number of the corpus samples output by the semantic similarity model, wherein the output results include arbitrary names, standard names, consistency information, and predicted consistency information; Get the prediction accuracy, where the accuracy is calculated as: The number of consistent data samples in the "Is it consistent" and "Is it predicted consistent" lists divided by the total number of data samples tested.
8. An object name standardization processing device, characterized in that: include: An acquisition module, used for acquiring corpus to be trained, wherein the corpus includes a plurality of arbitrary names, a plurality of corresponding standard names, and information on whether the plurality of arbitrary names are consistent with the plurality of standard names; A training module, used to train the acquired corpus through a pre-training model to obtain a semantic similarity model associated with the consistency of any name in the corpus and its corresponding standard name; The judgment module is used to judge whether any name of the new corpus is consistent with the standard name through the semantic similarity model.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the object name standardization processing method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the object name standardization processing method according to any one of claims 1 to 7 are implemented.
