Material name and material code matching method and device

Through the dimensionality reduction mapping and similarity calculation methods, the problems of low accuracy and poor robustness of matching material names and material codes are solved, the matching efficiency and accuracy are improved, and the efficiency of the use of material management system is enhanced.

CN119579070APending Publication Date: 2025-03-07NANJING HUADUN ELECTRIC POWER INFORMATION SAFETY EVALUATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411614392.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

There are problems with low accuracy and poor robustness in matching material names and material codes.

Method used

By determining the similarity between the target material name and the candidate material code, the first vector and the second vector are generated using the dimensionality reduction mapping, and the similarity between them is calculated, thereby determining the target material code.

Benefits of technology

The matching efficiency between material names and material codes is improved, the accuracy of matching results is ensured, and the efficiency of the system's use of materials is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579070A_ABST
    Figure CN119579070A_ABST
Patent Text Reader

Abstract

The invention discloses a material name and material code matching method and device. According to the technical scheme, the target material name and at least one candidate material code are determined, and the material code is composed of the pipeline code and the text corresponding to the material type and the material parameter; and determining the first vector and the at least one second vector, so that the problem that the possibility of matching errors is too high due to the fact that the target material name is directly matched with each candidate material code according to characters can be avoided; obtaining a candidate similarity by determining the similarity between the first vector and the second vector; the target material code is determined from the at least one candidate material code according to the at least one candidate similarity, and the candidate material code corresponding to the target material name can be found out from the plurality of candidate material codes to serve as the target material code, so that the accuracy of the determination result is ensured; and the matching efficiency of the target material name and the target material code is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of material management, and in particular to a method and device for matching material names and material codes. Background Art

[0002] Material management is an important measure that many companies need to adopt when operating, which can achieve the good use of materials. In today's material management, materials are coded and resources are managed according to the material codes. In actual use, the matching of material names and material codes has problems such as low accuracy and poor robustness. Summary of the invention

[0003] The present invention provides a method and device for matching material names and material codes, so as to solve the problems of low accuracy and poor robustness in matching material names and material codes.

[0004] According to one aspect of the present invention, a method for matching material names and material codes is provided, the method comprising:

[0005] Determine the target material name and at least one candidate material code, where the material code is composed of a serial code and text corresponding to the material type and material parameters;

[0006] Determine a first vector and at least one second vector, wherein the first vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the target material name, and the second vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the candidate material code;

[0007] Determine the similarity between the first vector and the second vector to obtain a candidate similarity;

[0008] According to at least one candidate similarity, a target material code is determined from at least one candidate material code, and the candidate similarity of the target material code is greater than a preset similarity threshold.

[0009] According to another aspect of the present invention, a device for matching material names and material codes is provided, the device comprising:

[0010] A data determination module, used to determine the target material name and at least one candidate material code, where the material code is composed of a serial code and a text corresponding to the material type and material parameters;

[0011] A vector determination module, used to determine a first vector and at least one second vector, wherein the first vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the target material name, and the second vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the candidate material code;

[0012] A similarity determination module, used to determine the similarity between the first vector and the second vector to obtain a candidate similarity;

[0013] The target code determination module is used to determine a target material code from at least one candidate material code according to at least one candidate similarity, wherein the candidate similarity of the target material code is greater than a preset similarity threshold.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] At least one processor; and a memory in communication with the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the material name and material code matching method of any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement the material name and material code matching method of any embodiment of the present invention when executed.

[0017] The technical solution of the embodiment of the present invention determines the target material name and at least one candidate material code, the material code is composed of a serial code and a text corresponding to the material type and material parameters; determines the first vector and at least one second vector, which can avoid the problem of directly matching the target material name with each candidate material code according to the characters, which has a high possibility of matching errors and thus affects the matching efficiency. By determining the similarity between the first vector and the second vector, the candidate similarity is obtained; by determining the target material code from at least one candidate material code according to at least one candidate similarity, the candidate material code that is most likely to correspond to the target material name can be found from multiple candidate material codes as the target material code, thereby ensuring the accuracy of the determination result. By using the above steps in combination, the matching efficiency of the target material name and the target material code can be improved, thereby improving the efficiency of the system in using materials.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 is a flow chart of a method for matching material names and material codes provided according to the first embodiment of the present invention;

[0021] Figure 2 is a flow chart of another material name and material code matching method provided according to the second embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram of the structure of a device for matching material names and material codes provided according to Embodiment 3 of the present invention;

[0023] Figure 4 The present invention is a schematic diagram of the structure of an electronic device for implementing the material name and material code matching method of an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] Embodiment 1

[0027] Figure 1A flowchart of a material name and material code matching method is provided for the first embodiment of the present invention. This embodiment is applicable to situations where material names and material codes need to be matched when managing materials. The method can be performed by a material name and material code matching device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:

[0028] S110: Determine the name of the target material and at least one candidate material code, where the material code is composed of a serial code and text corresponding to the material type and material parameters.

[0029] The target material can be the material for which the corresponding material code needs to be determined. The target material can be composed of the name and attributes of the target material, such as laptop computer + computer configuration and drinking water + volume, etc., or it can be the material data in the SAP system. The material code can be composed of a serial code and a text corresponding to the material type and material parameters for the convenience of management when managing materials, for example, 600-computer-235-256G-232-32g.

[0030] When determining the material code corresponding to the target material name, it is necessary to first obtain each candidate material code in the system, and screen each candidate material code to obtain the material code corresponding to the target material name. Therefore, it is necessary to first obtain the target material name to be matched and each candidate material code.

[0031] S120. Determine a first vector and at least one second vector, wherein the first vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the target material name, and the second vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the candidate material code.

[0032] Since not every character of the target material name and the candidate material code is the same, directly matching the target material name with each candidate material code by character will result in a high possibility of matching errors, which will affect the matching efficiency.

[0033] To avoid this problem, the target material name can be processed by dimensionality reduction to obtain a first vector of a preset dimension, and each candidate material code can be mapped by dimensionality reduction to obtain at least one second vector, thereby avoiding the problem of excessive possibility of matching errors due to overly strict matching in the character matching process, which in turn affects the matching efficiency.

[0034] When determining the first vector and the second vector, to ensure that the first vector and the second vector can be compared for similarity subsequently, it is necessary to ensure that the first vector and the second vector are in the same vector dimension. Therefore, it is necessary to ensure that the preset dimension of the first vector is the same as the preset dimension of the second vector.

[0035] In an alternative solution, after determining the target material name and at least one candidate material code, it further includes steps A1 - A2:

[0036] Step A1: Based on a preset text table, rewrite the target material name to obtain a target text.

[0037] Step A2: Segment the target text to obtain at least one target word.

[0038] The preset text table can be composed of pre - set rewriting rules and rewriting results when standardizing and rewriting each material name.

[0039] Since the target material name is often non - standard, and the material names corresponding to the same material may be different. Therefore, to ensure the standardization of the target material name, the target material name will be rewritten through the preset text table to obtain the target text, and then the target text will be segmented to obtain at least one target word.

[0040] Since some texts may be changed when generating the corresponding material code for the material name, for example, changing "laptop" to "computer", or changing "short - sleeved top" to "short - sleeved", etc. In addition, there may be some special characters, punctuation marks, and irrelevant characters such as spaces, as well as common but meaningless words, such as "of", etc. Therefore, these texts need to be deleted. However, because these words are complex and there is a large amount of data, directly deleting these characters may cause problems such as incomplete deletion.

[0041] To avoid this problem, the texts that need to be retained can be determined in advance, and a preset text table can be generated based on these texts. When processing the target material name subsequently, the target material name can be retained through the preset text table.

[0042] For example, the preset text table contains "computer" and "water", etc. When the material name is "mineral water", "mineral water" will be saved as "water". When the material name is "laptop", "laptop" will be saved as "computer".

[0043] In addition, the preset text table can also rewrite the material name. For example, the preset text table can include "water - drinking water". When the material name is "purified water", "purified water" will be rewritten as "drinking water".

[0044] After obtaining the target text, in order to ensure the accuracy of generating the first vector, the target text is segmented to obtain at least one target word.

[0045] When segmenting words, word segmentation can be performed using a pre-trained neural network model or a word segmentation tool.

[0046] For example, "blue T-shirt" can be divided into "blue" and "T-shirt".

[0047] In an optional solution, determining the first vector includes steps B1-B2:

[0048] Step B1: Perform dimensionality reduction mapping on at least one target word to obtain at least one word vector. The at least one target word is obtained by segmenting the name of the target material.

[0049] Step B2: Generate a first vector based on at least one word vector.

[0050] After the target text is split into at least one target word, each target word may be subjected to dimensionality reduction mapping, each target word may be reduced to a word vector under a preset dimension, and each word vector may be concatenated to generate a first vector.

[0051] Optionally, concatenating the word vectors to generate a first vector includes:

[0052] According to the order of each target word in the target text, determine the concatenation order of each word vector;

[0053] According to the concatenation order of each word vector, each word vector is concatenated to obtain a first vector.

[0054] Optionally, concatenating the word vectors to generate a first vector includes:

[0055] Obtaining a preset splicing template, where the splicing template is used to represent the arrangement relationship between different word vectors;

[0056] According to the concatenation template, the word vectors are connected to obtain the first vector.

[0057] The splicing template may be used to represent the arrangement relationship between word vectors, for example, the color word vector is located before the product type word vector, or the model word vector is located before the product type word vector, etc.

[0058] In addition, the splicing template can also be an arrangement relationship in a fixed order. For example, the fixed order in the splicing template is the fixed order of color category-model category-product type. After the word vectors are obtained as the word vector of "black", the word vector of "T-shirt" and the word vector of "large size", these word vectors are adjusted in sequence according to the fixed order to obtain the first vector of "black"-"large size"-"T-shirt".

[0059] In an optional solution, determining the first vector and at least one second vector comprises steps C1-C2:

[0060] Step C1: Based on the word-to-vector model, perform dimensionality reduction mapping on the target material name to obtain a first vector under a preset dimension.

[0061] Step C2: Based on the fast text model, a candidate material code is low-dimensionally mapped to obtain at least one second vector.

[0062] Word2Vec is a technique for representing words as vectors, trained using CBOW (Continuous Bag of Words) or Skip-gram architectures to capture semantic relationships between words, such as "white work clothes - white + blue = blue work clothes".

[0063] The FastText model has the ability to consider the sub-word information of words, better handle rare words and OOV words, decompose words into sub-words (such as roots, prefixes, and suffixes), and represent them in vectors.

[0064] Since there are many candidate material codes, in order to improve the conversion efficiency of the candidate material codes into the second vector while still having a certain accuracy, a neural network model can be used to achieve fast conversion of the second vector. In this regard, a fast text model can be selected to achieve fast mapping of the candidate material codes.

[0065] Similarly, for the first vector, the word-to-vector model can be used to quickly map the target material name.

[0066] S130: Determine the similarity between the first vector and the second vector to obtain a candidate similarity.

[0067] After obtaining the first vector and each second vector, similarity calculation may be performed on the first vector and each second vector respectively, thereby determining the similarity between the first vector and different second vectors, and determining whether the two are similar based on the similarity.

[0068] The similarity can be calculated by Pearson correlation coefficient, Euclidean distance, cosine similarity, etc., and this application does not limit this.

[0069] S140. Determine a target material code from at least one candidate material code according to at least one candidate similarity, wherein the candidate similarity of the target material code is greater than a preset similarity threshold.

[0070] After determining the candidate similarities between the first vector and each second vector, the degree of similarity between the first vector and each second vector can be determined, and then the similarity between the target material name and each candidate material code can be obtained. At this time, the candidate material code with a similarity greater than the preset similarity threshold can be determined as the target material code corresponding to the target material name based on the preset similarity threshold.

[0071] Among them, the preset similarity threshold can be determined according to work experience or according to the material category to which the target material belongs corresponding to the name of the target material.

[0072] By determining the target material code from at least one candidate material code according to at least one candidate similarity, the candidate material code most likely corresponding to the target material name can be found as the target material code from multiple candidate material codes, thereby ensuring the accuracy of the determination result.

[0073] Optionally, determining the target material code from at least one candidate material code according to at least one candidate similarity includes:

[0074] If at least one candidate similarity includes only one candidate similarity greater than a preset similarity threshold, the candidate material code corresponding to the candidate similarity greater than the preset similarity threshold is determined as the target material code.

[0075] Optionally, determining the target material code from at least one candidate material code according to at least one candidate similarity includes:

[0076] If at least one candidate similarity includes at least two candidate similarities greater than a preset similarity threshold, each candidate similarity and the candidate material code corresponding to each candidate similarity is used to generate a candidate material code sequence, and based on the usage frequency of each material word corresponding to the candidate material code, each candidate material code in the candidate material code sequence is reordered.

[0077] The material terms may be the terms corresponding to the material codes in the system database and used to describe the materials.

[0078] Since the target material code is determined by a preset similarity threshold, there may be multiple situations.

[0079] Case 1: Only one candidate material code is greater than the preset similarity threshold, in which case it can be directly determined as the target material code.

[0080] Case 2: There are at least two candidate material codes that are greater than the preset similarity threshold. At this time, if the candidate material code with the greatest similarity is directly used as the target material code, it may cause errors in the determination result.

[0081] At this time, each candidate similarity and the candidate material code corresponding to each candidate similarity can be used to generate a candidate material code sequence according to the size of the candidate similarity, and the candidate material code sequence can be adjusted according to the usage frequency of each material word corresponding to the candidate material code, and finally determined based on work experience to obtain the target material code.

[0082] By dividing the determination of the target material code into multiple situations, the problem of errors in the determination result caused by directly determining the target material code based on similarity can be effectively avoided.

[0083] In an optional solution, the process of determining the usage frequency of each material word includes steps D1-D3:

[0084] Step D1: determine the frequency of each material word corresponding to each material code.

[0085] Step D2: determine the inverse document frequency of each material word.

[0086] Step D3: Determine the usage frequency of each material word based on the word frequency and inverse document frequency of the material words.

[0087] When determining the usage frequency of each material word, two aspects of each material word need to be considered, one is the word frequency of the material word in the database, and the other is the inverse document frequency of each material word.

[0088] The frequency of each material word can be determined by counting the frequency of each material word appearing in the database, and is represented by TF.

[0089] The inverse document frequency for each material word is used to indicate the importance of each material word in the entire database.

[0090] It can be determined by the following formula:

[0091] IDF(t)=log(N1+DF(t ) )

[0092] Where IDF represents the inverse document frequency of word t, N is the total number of documents, and DF(t) is the number of documents containing word t.

[0093] The word frequency of the material words and the inverse document frequency of the material words are combined to determine the usage frequency of each material word.

[0094] By determining the usage frequency of each material word based on the word frequency and inverse document frequency of the material words, the determination process of the usage frequency of each material word can be clarified, thereby ensuring the clarity of the determination process and the accuracy of the determination result of the usage frequency of each material word.

[0095] According to the technical solution of the embodiment of the present invention, by determining the target material name and at least one candidate material code, the material code is composed of a serial code and a text corresponding to the material type and material parameters; determining the first vector and at least one second vector, it is possible to avoid directly matching the target material name with each candidate material code according to the characters, which may cause a high possibility of matching errors and thus affect the matching efficiency. By determining the similarity between the first vector and the second vector, the candidate similarity is obtained; by determining the target material code from at least one candidate material code based on at least one candidate similarity, the candidate material code that is most likely to correspond to the target material name can be found from multiple candidate material codes as the target material code, thereby ensuring the accuracy of the determination result. By using the above steps in combination, the matching efficiency of the target material name and the target material code can be improved, thereby improving the efficiency of the system in using materials.

[0096] Embodiment 2

[0097] Figure 2 The present invention provides a flowchart of another material name and material code matching method. Based on the above embodiment, this embodiment further optimizes the process of determining the similarity between the first vector and the second vector in the above embodiment and obtaining the candidate similarity. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the material name and material code matching method of this embodiment may include the following steps:

[0098] S210: Determine the target material name and at least one candidate material code, where the material code is composed of a serial code, a material type, and a text corresponding to material parameters.

[0099] S220. Determine a first vector and at least one second vector, wherein the first vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the target material name, and the second vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the candidate material code.

[0100] S230, determining a first similarity, a second similarity, and a third similarity, wherein the first similarity is described by the cosine similarity between the first vector and the second vector, the second similarity is described by the Euclidean distance between the first vector and the second vector, and the third similarity is described by the Manhattan distance between the first vector and the second vector.

[0101] S240: Determine candidate similarities based on the first similarity, the second similarity, and the third similarity.

[0102] In order to accurately determine the similarity between the first vector and the second vector, the similarity can be determined separately by cosine similarity, Euclidean distance and Manhattan distance, and then the results of the three determinations are combined to obtain a more accurate similarity result.

[0103] Among them, the Euclidean distance is used to calculate the straight-line distance between two vectors, and the calculation formula is:

[0104]

[0105] Where A and B are two vectors, and n is the dimension of the vector.

[0106] Manhattan distance is used to calculate the sum of the absolute differences between two vectors. The calculation formula is:

[0107]

[0108] Where A and B are two vectors, and n is the dimension of the vector.

[0109] Cosine similarity is used to calculate the cosine value of the angle between two vectors. The calculation formula is:

[0110]

[0111] Where A and B are two vectors.

[0112] After obtaining the first similarity, the second similarity, and the third similarity corresponding to the first vector and the second vector, they may be combined according to preset weights to generate candidate similarities.

[0113] By determining the first similarity, the second similarity and the third similarity, and determining the candidate similarity based on the first similarity, the second similarity and the third similarity, the determined candidate similarity can be determined from at least three aspects, thereby ensuring the accuracy of the determination result.

[0114] S250: Determine a target material code from at least one candidate material code according to at least one candidate similarity, wherein the candidate similarity of the target material code is greater than a preset similarity threshold.

[0115] According to the technical solution of the embodiment of the present invention, by determining the first similarity, the second similarity and the third similarity, and based on the first similarity, the second similarity and the third similarity, the candidate similarity is determined, so that the determined candidate similarity can be determined from at least three aspects, thereby ensuring the accuracy of the determination result.

[0116] Embodiment 3

[0117] Figure 3 The present invention provides a structural block diagram of a material name and material code matching device. This embodiment is applicable to situations where material names and material codes need to be matched when managing materials. The material name and material code matching device can be implemented in the form of hardware and / or software, and the material name and material code matching device can be configured in an electronic device with data processing capabilities. Figure 3 As shown, the material name and material code matching device of this embodiment may include: a data determination module 310, a vector determination module 320, a similarity determination module 330 and a target code determination module 340. Among them:

[0118] A data determination module 310 is used to determine a target material name and at least one candidate material code, where the material code is composed of a serial code and text corresponding to a material type and material parameters;

[0119] A vector determination module 320, configured to determine a first vector and at least one second vector, wherein the first vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the target material name, and the second vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the candidate material code;

[0120] A similarity determination module 330 is used to determine the similarity between the first vector and the second vector to obtain a candidate similarity;

[0121] The target code determination module 340 is used to determine a target material code from at least one candidate material code according to at least one candidate similarity, wherein the candidate similarity of the target material code is greater than a preset similarity threshold.

[0122] Based on the above embodiment, optionally, after the data determination module 310, the following is further included:

[0123] Based on the preset text table, the target material name is subjected to text screening to obtain the target text, and the text contained in the target text belongs to the preset text table;

[0124] Segment the target text to obtain at least one target word;

[0125] Accordingly, the vector determination module 320 includes:

[0126] Performing dimensionality reduction mapping on at least one target word to obtain at least one word vector, wherein the at least one target word is obtained by segmenting the name of the target material;

[0127] A first vector is generated according to at least one word vector.

[0128] Based on the above embodiment, optionally, the vector determination module 320 includes:

[0129] Based on the word-to-vector model, the target material name is mapped to a lower dimension to obtain the first vector under the preset dimension;

[0130] Based on the fast text model, a candidate material code is low-dimensionally mapped to obtain at least one second vector.

[0131] Based on the above embodiment, optionally, the similarity determination module 330 includes:

[0132] Determine a first similarity, a second similarity, and a third similarity, the first similarity being described by a cosine similarity between the first vector and the second vector, the second similarity being described by a Euclidean distance between the first vector and the second vector, and the third similarity being described by a Manhattan distance between the first vector and the second vector;

[0133] Based on the first similarity, the second similarity, and the third similarity, a candidate similarity is determined.

[0134] Based on the above embodiment, optionally, the target coding determination module 340 includes:

[0135] If at least one candidate similarity includes only one candidate similarity greater than a preset similarity threshold, the candidate material code corresponding to the candidate similarity greater than the preset similarity threshold is determined as the target material code.

[0136] Based on the above embodiment, optionally, the target coding determination module 340 includes:

[0137] If at least one candidate similarity includes at least one candidate similarity greater than a preset similarity threshold, each candidate similarity and the candidate material code corresponding to each candidate similarity is used to generate a candidate material code sequence, and based on the usage frequency of each material word corresponding to the candidate material code, each candidate material code in the candidate material code sequence is reordered.

[0138] Based on the above embodiment, optionally, the process of determining the usage frequency of each material word includes:

[0139] Determine the frequency of each material word corresponding to each material code;

[0140] Determine the inverse document frequency of each material term;

[0141] Based on the word frequency and inverse document frequency of the material words, the usage frequency of each material word is determined.

[0142] The material name and material code matching device provided in the embodiment of the present invention can execute the material name and material code matching method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0143] Embodiment 4

[0144] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0145] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0146] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0147] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for matching a material name with a material code.

[0148] In some embodiments, the material name and material code matching method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the material name and material code matching method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the material name and material code matching method in any other appropriate manner (for example, by means of firmware).

[0149] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0150] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0151] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0152] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0153] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0154] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0155] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0156] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for matching material names and material codes, characterized in that: include: Determine the target material name and at least one candidate material code, wherein the material code is composed of a serial code and text corresponding to the material type and material parameters; Determine a first vector and at least one second vector, wherein the first vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the target material name, and the second vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the candidate material code; Determine the similarity between the first vector and the second vector to obtain a candidate similarity; According to at least one candidate similarity, a target material code is determined from the at least one candidate material code, wherein the candidate similarity of the target material code is greater than a preset similarity threshold.

2. The method according to claim 1, characterized in that After determining the target material name and at least one candidate material code, the method further includes: Based on a preset text table, rewriting the target material name to obtain a target text, wherein the text contained in the target text belongs to the preset text table; Segmenting the target text to obtain at least one target word; Accordingly, determining the first vector includes: Performing dimensionality reduction mapping on the at least one target word to obtain at least one word vector, wherein the at least one target word is obtained by segmenting the name of the target material; The first vector is generated according to the at least one word vector.

3. The method according to claim 1, characterized in that Determining a first vector and at least one second vector includes: Based on the word-to-vector model, perform dimensionality reduction mapping on the target material name to obtain the first vector under a preset dimension; Based on the fast text model, a low-dimensional mapping is performed on the candidate material code to obtain at least one second vector.

4. The method according to claim 1, characterized in that: Determining the similarity between the first vector and the second vector to obtain a candidate similarity includes: Determine a first similarity, a second similarity, and a third similarity, wherein the first similarity is described by a cosine similarity between the first vector and the second vector, the second similarity is described by a Euclidean distance between the first vector and the second vector, and the third similarity is described by a Manhattan distance between the first vector and the second vector; Based on the first similarity, the second similarity, and the third similarity, a candidate similarity is determined.

5. The method according to claim 1, characterized in that Determining a target material code from the at least one candidate material code according to at least one candidate similarity includes: If the at least one candidate similarity includes only one candidate similarity greater than the preset similarity threshold, the candidate material code corresponding to the candidate similarity greater than the preset similarity threshold is determined as the target material code.

6. The method according to claim 1, characterized in that Determining a target material code from the at least one candidate material code according to at least one candidate similarity includes: If the at least one candidate similarity includes at least two candidate similarities greater than the preset similarity threshold, each candidate similarity and the candidate material code corresponding to each candidate similarity is used to generate a candidate material code sequence, and based on the usage frequency of each material word corresponding to the candidate material code, each candidate material code in the candidate material code sequence is reordered.

7. The method according to claim 6, characterized in that The process of determining the frequency of use of each material term includes: Determine the frequency of each material word corresponding to each material code; Determine the inverse document frequency of each material term; Based on the word frequency and inverse document frequency of the material words, the usage frequency of each material word is determined.

8. A device for matching material names and material codes, characterized in that: include: A data determination module, used to determine the target material name and at least one candidate material code, wherein the material code is composed of a serial code and a text corresponding to the material type and material parameters; A vector determination module, used to determine a first vector and at least one second vector, wherein the first vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the target material name, and the second vector is a vector of a preset dimension obtained by performing dimensionality reduction mapping on the candidate material code; A similarity determination module, used to determine the similarity between the first vector and the second vector to obtain a candidate similarity; The target code determination module is used to determine the target material code from the at least one candidate material code according to at least one candidate similarity, wherein the candidate similarity of the target material code is greater than a preset similarity threshold.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the material name and material code matching method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the material name and material code matching method described in any one of claims 1 to 7 when executed.