A recommendation method based on hybrid supervision and dual-layer matching encoding mapping

Through the hybrid supervision double-layer matching coding mapping recommendation method, the problems of inconsistency in coding rules and insufficient manpower and material resources are solved, the unification of coding rules and the improvement of system stability are achieved, and the accuracy of coding mapping is improved by generating standard coding mapping tables and efficiency.

CN113673202BActive Publication Date: 2024-12-06浙江浙能数字科技有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110905914.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-09
Publication Date
2024-12-06
Estimated Expiration
2041-08-09

AI Technical Summary

Technical Problem

The existing technology has inconsistent coding rules and insufficient manpower and material resources in coding mapping, which makes it difficult for old factories to unify the identification system, affecting system stability and data sharing.

Method used

The recommended method of hybrid supervised double-layer matching coding mapping is adopted, and the original KKS encoding list and the new KKS encoding list are obtained through the acquisition device, manual matching and supervised training are performed, similarity matching is used using the minimum editing distance, and a standard encoding mapping table is generated.

Benefits of technology

The coding rules are unified, the standardization workload is reduced, the system operation stability is improved, and the accuracy and efficiency of coding mapping are improved through the combination of unsupervised matching and supervised matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113673202B_ABST
    Figure CN113673202B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for recommending coding mapping based on hybrid supervised double-layer matching, comprising the steps of: using a collection device to collect the original KKS coding list and the new KKS coding list; performing manual matching; training a supervised matching model with a data set; D The beneficial effect of the present invention is: an intelligent KKS code mapping task is proposed, the original KKS code list and the new KKS code list are first collected by using a collection device, and then artificial matching is performed to train the supervised matching model data set. D Perform supervised training using the Chinese descriptions in the original KKS encoding list 、 Unsupervised matching is performed on the Chinese descriptions in the new KKS coding list, and supervised matching is performed on the data that fails the unsupervised matching. The mapping table of the standard coding can be directly obtained, which greatly reduces the workload of standardization work, improves the stability of system operation, realizes the generalization of the underlying data, and unifies the coding rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of power plant information technology, and in particular relates to a method for recommending coding mapping based on hybrid supervision and double-layer matching. Background Art

[0002] Power generation enterprises are prone to information confusion, low data quality, and data application silos due to complex asset structures, various types, and large data volumes, which seriously hinder data sharing and application. To solve the above problems, the KKS coding system was introduced. This system clearly identifies the coding system of systems, equipment, components, and structures in power plants according to function, model, and installation location, and has become the most widely used identification system in power plants. It has been 50 years since its introduction.

[0003] However, with the advancement of information technology in power generation production, the number of information assets and virtualization activities has increased, and the characteristics of weak standard rules of KKS coding have become more and more obvious. At present, the original identification coding system has been improved according to the needs of intelligent production, and many internal coding standards of enterprises have been proposed. The improved standard coding is easy to implement in newly built power generation enterprises, but in old plants that have been in operation for many years, it is difficult to organize corresponding forces to solve the coding problems of the entire plant, firstly because the coding rules adopted by the operating system are inconsistent, and secondly because of the lack of manpower and material resources. The invention patent CN201310367698.6 Internet of Things unified identification coding multi-mode recognition method decomposes the unified identification code into a single-mode coding information, and then performs matching analysis to parse out the coding content carried by each single-mode coding information. The invention patent CN201310289939.X proposes a KKS intelligent batch coding method for substation three-dimensional design, which uses busbar naming to sequentially encode two-dimensional symbols. The above patents all consider the mapping problem between different codes and only innovate in coding processing. Therefore, in order to further reduce the coding workload, improve the stability of system operation, and unify the coding rules, a set of coding matching methods is urgently needed for coding mapping tasks. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a method for recommending coding mapping based on hybrid supervision and dual-layer matching.

[0005] This hybrid supervised two-layer matching encoding mapping recommendation method includes the following steps:

[0006] Step 1: Use the collection device to collect the original KKS code list and the new KKS code list stored in the database through the interface provided by the database, and store the original KKS code list and the new KKS code list;

[0007] The original KKS code list is:

[0008]

[0009] In the above formula, to It is the English code in the original KKS code list. to It is the Chinese description in the original KKS coding list;

[0010] The new KKS code list is:

[0011]

[0012] In the above formula, to For English codes in the new KKS code list, to It is the Chinese description in the new KKS code list;

[0013] Step 2: Manually match the original KKS code list obtained in step 1 with the new KKS code list:

[0014]

[0015] Get the supervised matching model training data set D ;

[0016] Step 3: Train the supervised matching model training data set obtained in step 2 D Perform supervised training to obtain a supervised matching model Model ;

[0017] Step 4: Use the Chinese description in the original KKS code list obtained in step 1 d 1 、 Chinese description in the new KKS code list d 2 Perform unsupervised matching;

[0018] Step 5: Extract the supervised matching model obtained in step 3 from the storage device Model , perform supervised matching on the data that failed unsupervised matching in step 4;

[0019] Step 5.1: According to the supervised matching model Model Get the generated result;

[0020] Step 5.2: Use the minimum edit distance to perform similarity matching between the generated result and the new code, and store the result in a storage device.

[0021] Preferably, the database in step 1 is a PI database; the acquisition device writes a python script to extract data according to the access rules provided by the PI database, and obtains the data coding list through the interface provided by the database, and stores the original KKS coding list and the new KKS coding list in CSV format; the original KKS coding list adopts the coding rules of the design institute or the coding rules of the DCS manufacturer, and the coding situations of different power plants are inconsistent; the new KKS coding is a new coding rule redesigned according to the situation of each power plant; although both coding rules are encoded in terms of units, systems, equipment, components, etc., the specific coding forms and construction rules are completely different.

[0022] Preferably, the amount of data manually matched in step 2 is 5,000.

[0023] Preferably, step 3 specifically comprises the following steps:

[0024] Step 3.1: Train the supervised matching model dataset D The data in the text is segmented using Jieba (Python Chinese word segmentation component) to obtain the segmentation results, and then vectorized using N-Gram to obtain the vectorized training data set. ;

[0025] Step 3.2: Vectorize the training dataset Input to supervised matching model Model ; First, sparse features are generated by a two-layer MLP encoding network, where the first layer of the MLP encoding network is , the second-layer MLP encoding network is ; The reconstruction features are then generated by a two-layer MLP decoding network, where the first layer of the MLP decoding network is , the second-layer MLP decoding network is :

[0026]

[0027]

[0028] In the above formula, The sparse features generated by the first layer MLP encoding network, The sparse features generated by the second-layer MLP encoding network, The reconstructed features generated by the first layer MLP decoding network, Reconstructed features generated by the second-layer MLP decoding network;

[0029] Step 3.3: Reconstruct features generated by the second-layer MLP decoding network Calculate the cross entropy with the label vector to get the loss function Loss Function:

[0030]

[0031] In the above formula, n It means that a batch has n reconstruction features; the above formula converts n The cross entropy sum of the reconstructed features is used as the loss function value of the batch of training data;

[0032] Step 3.4: Loss function obtained according to step 3.3 Loss Function Perform model iteration, when the loss function Loss Function When convergence is reached, a supervised matching model is obtained Model and stored in a storage device.

[0033] Preferably, step 3.1 also expands the word segmentation results according to the coded word segmentation quantity, and fills the insufficient results with spaces.

[0034] As a preference, the number of coded segmentations in step 3.1 is 20, and the number of Chinese description segmentations is also 20; in step 3.2, there is a supervised matching model Model The input of the first-layer MLP encoding network is 256*40 data, where 256 is the batch data size and 40 is the coded word segmentation and Chinese word segmentation data size; the output of the first-layer MLP encoding network is 256*20 data; the output of the second-layer MLP encoding network is 256*10 data; the output of the first-layer MLP decoding network is 256*20 data; the output of the second-layer MLP decoding network is 256*40 data.

[0035] As a preference, the loss function in step 3.4 Loss Function When convergence is approaching, the loss function value converges to 0.17, and the preset value of the number of iterations is 10,000 steps.

[0036] Preferably, step 4 specifically comprises the following steps:

[0037] Step 4.1: Get the description segmentation of the original KKS code and the new KKS code through segmentation ,in w For subparticiples, i is the number of participles;

[0038] Step 4.2: The description word segmentation of the original KKS code and the new KKS code obtained in step 4.1 is performed using the minimum edit distance ( Eidt distance ) Calculate the similarity of the word segmentation results to obtain the similarity score of the edit distance between the original KKS code and the new KKS code Score ;

[0039] Step 4.3: Similarity score obtained from step 4.2 ScoreBased on the similarity threshold Filter, if the similarity score Score Lower than , then the matching fails and proceed to step 5 for supervised matching; if the similarity score Score Higher than , the match is successful and the matching result is output directly.

[0040] Preferably, the similarity threshold in step 4.3 is 85.

[0041] As a preference, in step 5.1, according to the supervised matching model Model The specific way to get the generated result is: supervised matching model Model The service is provided through the computing unit and data interface of the storage device to obtain the encoding and Chinese description of the corresponding rules; the computing unit is a computing hardware device, including CPU, storage, GPU; general computing units are mainly single-chip microcomputers, small computers, and ordinary computers. The present invention only abstracts these devices as computing units; step 5.2 obtains the recommendation results after 5 similarity matches.

[0042] The beneficial effect of the present invention is that the present invention proposes the task of intelligent KKS code mapping, firstly uses the acquisition device to collect the original KKS code list and the new KKS code list, then performs manual matching, and then uses the obtained supervised matching model training data set D Perform supervised training using the Chinese descriptions in the original KKS encoding list 、 Unsupervised matching is performed on the Chinese descriptions in the new KKS coding list, and supervised matching is performed on the data that fails the unsupervised matching. The mapping table of the standard coding can be directly obtained, which greatly reduces the workload of standardization work, improves the stability of system operation, realizes the generalization of the underlying data, and unifies the coding rules. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 Flowchart of the proposed method for encoding mapping based on hybrid supervision dual-layer matching;

[0044] Figure 2 It is a structural diagram of the storage device;

[0045] Figure 3 It is the structure diagram of the acquisition equipment;

[0046] Figure 4 This is a flow chart of the hybrid supervised coding matching method;

[0047] Figure 5 Graph for supervised matching network. DETAILED DESCRIPTION

[0048] The present invention is further described below in conjunction with embodiments. The description of the following embodiments is only used to help understand the present invention. It should be noted that for ordinary persons in the art, without departing from the principle of the present invention, the present invention can also be modified in some ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

[0049] With the advancement of information technology in power generation production, the number of information assets and virtualization activities has increased, and the characteristics of weak standard rules of KKS coding have become more and more obvious. At present, the original identification coding system has been improved according to the needs of intelligent production, and many internal coding standards have been proposed. The improved standard coding is easy to implement in newly built power generation enterprises, but in old plants that have been in operation for many years, it is difficult to organize corresponding forces to solve the coding problems of the whole plant, firstly because the coding rules adopted by the running system are inconsistent, and secondly because of the lack of manpower and material resources.

[0050] Embodiment 1

[0051] Embodiment 1 of the present application provides a Figure 1 and Figure 4 The recommended method based on hybrid supervised two-layer matching encoding mapping is shown:

[0052] Step 1: Use the collection device to collect the original KKS code list and the new KKS code list stored in the database through the interface provided by the database, and store the original KKS code list and the new KKS code list;

[0053] The original KKS code list is:

[0054]

[0055] In the above formula, to It is the English code in the original KKS code list. to It is the Chinese description in the original KKS coding list;

[0056] The new KKS code list is:

[0057]

[0058] In the above formula, to For English codes in the new KKS code list, to It is the Chinese description in the new KKS code list;

[0059] Step 2: Manually match the original KKS code list obtained in step 1 with the new KKS code list:

[0060]

[0061] Get the supervised matching model training data set D ;

[0062] Step 3: Train the supervised matching model training data set obtained in step 2 D Perform supervised training to obtain a supervised matching model Model ;

[0063] Step 4: Use the Chinese description in the original KKS code list obtained in step 1 d 1 、 Chinese description in the new KKS code list d 2 Perform unsupervised matching;

[0064] Step 5: Extract the supervised matching model obtained in step 3 from the storage device Model , perform supervised matching on the data that failed unsupervised matching in step 4;

[0065] Step 5.1: According to the supervised matching model Model Get the generated result;

[0066] Step 5.2: Use the minimum edit distance to perform similarity matching between the generated result and the new code, and store the result in a storage device.

[0067] Embodiment 2

[0068] Based on the first embodiment, the second embodiment of the present application provides the following Figure 5 The specific implementation process of step 3 is shown as follows:

[0069] Step 3.1: Train the supervised matching model dataset D The data in the text is segmented using Jieba (Python Chinese word segmentation component) to obtain the segmentation results, and then vectorized using N-Gram to obtain the vectorized training data set. ;

[0070] Step 3.2: Vectorize the training dataset Input to supervised matching model Model ; First, sparse features are generated by a two-layer MLP encoding network, where the first layer of the MLP encoding network is , the second-layer MLP encoding network is ; The reconstruction features are then generated by a two-layer MLP decoding network, where the first layer of the MLP decoding network is , the second-layer MLP decoding network is :

[0071]

[0072]

[0073] In the above formula, The sparse features generated by the first layer MLP encoding network, The sparse features generated by the second-layer MLP encoding network, The reconstructed features generated by the first layer MLP decoding network, Reconstructed features generated by the second-layer MLP decoding network;

[0074] Step 3.3: Reconstruct features generated by the second-layer MLP decoding network Calculate the cross entropy with the label vector to get the loss function Loss Function:

[0075]

[0076] In the above formula, n It means that a batch has n reconstruction features; the above formula converts n The cross entropy sum of the reconstructed features is used as the loss function value of the batch;

[0077] Step 3.4: Loss function obtained according to step 3.3 Loss Function Perform model iteration, when the loss function Loss Function When convergence is reached, a supervised matching model is obtained Model and stored in a storage device.

[0078] Embodiment 3

[0079] Based on the first and second embodiments, the third embodiment of the present application provides the following Figure 4 The specific implementation process of step 4 is shown as follows:

[0080] Step 4.1: Get the description segmentation of the original KKS code and the new KKS code through segmentation ,in w For subparticiples, i is the number of participles;

[0081] Step 4.2: The description word segmentation of the original KKS code and the new KKS code obtained in step 4.1 is performed using the minimum edit distance ( Eidt distance ) Calculate the similarity of the word segmentation results to obtain the similarity score of the edit distance between the original KKS code and the new KKS code Score ;

[0082] Step 4.3: Similarity score obtained from step 4.2 Score Based on the similarity threshold Filter, if the similarity score Score Lower than , then the matching fails and proceed to step 5 for supervised matching; if the similarity score Score Higher than , the match is successful and the matching result is output directly.

[0083] Embodiment 4

[0084] On the basis of Embodiments 1 to 3, Embodiment 4 of the present application provides an application of a hybrid supervised dual-layer matching coding mapping recommendation method in a power plant:

[0085] Step 1: Use acquisition equipment, such as Figure 3 Collect and construct the original KKS encoding list as shown in, c 1 For English encoding, d 1 Chinese description and new KKS code list in, c 2 For English encoding, d 2 It is described in Chinese. The ERP system that the power plant has built stores the existing coding data and transmits it to the group side through the group's industrial Internet and stores it in CSV format.

[0086] Step 2: Manually match the KKS code list obtained in step 1 , get the supervised matching model training data set D .

[0087] Step 3: The training data set obtained from step 2 D Perform supervised training to obtain a supervised matching model Model :

[0088] Step 3.1: Train the dataset D The data in the text is segmented by Jieba to obtain the segmentation result, and then vectorized by N-Gram to obtain ;

[0089] Step 3.2: Vectorize the training data Input to the supervised matching model, such as Figure 5 As shown, first, a two-layer MLP encoding network generates sparse features. , where the first layer is , the second layer is , and then the reconstruction features are generated by a two-layer MLP decoding network, where the first layer is , the second layer is , the encoding layer input is 256*40 data, 256 is the batch data size, 40 is the encoding word segmentation and Chinese word segmentation data size, the first layer is The output of is 256*20, and the second layer is The output of is 256*10, and the third layer is The output of is 256*20, and the fourth layer is The output is 256*40:

[0090]

[0091]

[0092] Step 3.3: Reconstruct the features Calculate the cross entropy with the label vector to get the loss function Loss Function ;

[0093] Step 3.4: According to the loss function Loss Function Perform model iteration, loss function value loss It converges to 0.1724 and obtains the supervised matching model. Model The model is stored in a storage device for model reuse. The device is equipped with a computing unit with at least 8G graphics card and uses the Flask framework to provide API interface services, such as Figure 2 As shown, a solid state drive and a mechanical hard disk are used as storage units;

[0094] Step 4: KKS encoding description obtained from step 1 d 1 ,d 2 The specific steps of unsupervised matching include:

[0095] Step 4.1: Get by word segmentation ,in w For subparticiples, i is the number of participles, i The maximum value of is 20;

[0096] Step 4.2: The two types of coded descriptions obtained in step 4.1 are segmented using the minimum edit distance ( Eidt distance ) Calculate the similarity of the word segmentation results to obtain the similarity scores of the two edit distances Score ;

[0097] Step 4.3: The similarity score obtained in step 4.2 is calculated based on the similarity threshold. =85.0 for filtering. If it is lower than the threshold, it means the match fails and supervised matching needs to be performed in step 5. If it is higher than the threshold, it means the match is successful and the result can be directly stored in the storage device.

[0098] Step 5: extract the supervised matching model obtained in step 3 from the storage device, and perform supervised matching on the data that failed to match in step 4.3. The specific steps include:

[0099] Step 5.1, using the model obtained in step 3 to obtain the coding and Chinese description of the corresponding rules;

[0100] Step 5.2: Use the minimum edit distance to perform similarity matching between the generated result and the new encoding to obtain 5 recommendation results, which are stored in CSV format on the storage device for system call.

[0101] Through the above steps, the mapping table of standard codes can be directly obtained, which greatly reduces the workload of standardization work. The standardization work is carried out on the production codes of a petroleum enterprise under a certain group, and the final result is shown in Table 1 below:

[0102] Table 1. Results of production code standardization of a petroleum enterprise under a certain group

[0103]

[0104] After statistics, the accuracy of 1,316 coding results was around 89.9%, which met the needs of factory personnel and shortened the time for standardized coding.

[0105] The final results of the coding standardization work for a photovoltaic power plant under a certain group are shown in Table 2 below:

[0106] Table 2 Coding standardization results of photovoltaic power plants under a certain group

[0107]

[0108] After statistics of 580 coding results, the accuracy rate is about 91.2%, and after manual inspection, it meets the requirements of standardization work.

Claims

1. A method for recommending double-layer matching coding mapping based on hybrid supervision, characterized in that: The following steps are involved: Step 1: Use the acquisition device to collect the original KKS code list and the new KKS code list stored in the database through the interface provided by the database, and store the original KKS code list and the new KKS code list; the original KKS code list adopts the coding rules of the design institute or the coding rules of the DCS manufacturer; the new KKS code is a new coding rule redesigned according to the conditions of each power plant; The original KKS code list is: In the above formula, c 1 1 to It is the English code in the original KKS code list. d 1 1 to It is the Chinese description in the original KKS coding list; The new KKS code list is: In the above formula, c 1 2 to For English codes in the new KKS code list, d 1 2 to It is the Chinese description in the new KKS code list; Step 2: Manually match the original KKS code list obtained in step 1 with the new KKS code list: Get the supervised matching model training data set D ; Step 3: Train the supervised matching model training data set obtained in step 2 D Perform supervised training to obtain a supervised matching model Model ; Step 3 specifically includes the following steps: Step 3.1: Train the supervised matching model dataset D The data in the text is segmented by Jieba to obtain the segmentation results, and then vectorized by N-Gram to obtain the vectorized training data set. ; Step 3.2: Input the vectorized training dataset To supervised matching model Model ; First, sparse features are generated by a two-layer MLP encoding network, where the first layer of the MLP encoding network is , the second-layer MLP encoding network is ; The reconstruction features are then generated by a two-layer MLP decoding network, where the first layer of the MLP decoding network is , the second-layer MLP decoding network is : In the above formula, The sparse features generated by the first layer MLP encoding network, The sparse features generated by the second-layer MLP encoding network, The reconstructed features generated by the first layer MLP decoding network, Reconstructed features generated by the second-layer MLP decoding network; Step 3.3: Reconstruct features generated by the second-layer MLP decoding network Calculate the cross entropy with the label vector to get the loss function Loss Function: In the above formula, n It means that a batch has n reconstruction features; The above formula will n The cross entropy sum of the reconstructed features is used as the loss function value of the batch of training data; Step 3.4: Loss function obtained according to step 3.3 Loss Function Perform model iteration, when the loss function Loss Function When convergence is reached, a supervised matching model is obtained Model and stored in a storage device; Step 4: Use the Chinese description in the original KKS code list obtained in step 1 d 1 、 Chinese description in the new KKS code list d 2 Perform unsupervised matching; Step 5: Extract the supervised matching model obtained in step 3 from the storage device Model , perform supervised matching on the data that failed unsupervised matching in step 4; Step 5.1: According to the supervised matching model Model Get the generated result; Step 5.2: Use the minimum edit distance to perform similarity matching between the generated result and the new code, and store the result in a storage device.

2. According to claim 1, the method for recommending double-layer matching coding mapping based on hybrid supervision is characterized in that: The database in step 1 is the PI database; the collection device writes a python script to extract data according to the access rules provided by the PI database. The collection device obtains the data coding list through the interface provided by the database, and stores the original KKS coding list and the new KKS coding list in CSV format.

3. According to claim 1, the method for recommending coding mapping based on hybrid supervision and dual-layer matching is characterized in that: The amount of data manually matched in step 2 is 5,000.

4. According to claim 1, the method for recommending double-layer matching coding mapping based on hybrid supervision is characterized in that: Step 3.1 also expands the word segmentation results according to the coded word segmentation quantity, and fills the insufficient words with spaces.

5. According to claim 4, the method for recommending double-layer matching coding mapping based on hybrid supervision is characterized in that: In step 3.1, the number of coded segmentation words is 20, and the number of Chinese description segmentation words is also 20; in step 3.2, there is a supervised matching model Model The input of the first-layer MLP encoding network is data of , where 256 is the batch data size and 40 is the data size of encoded word segmentation and Chinese word segmentation; the output of the first-layer MLP encoding network is data of ; the output of the second-layer MLP encoding network is data of ; the output of the first-layer MLP decoding network is data of ; the output of the second-layer MLP decoding network is data of .

6. According to claim 1, the method for recommending coding mapping based on hybrid supervision and dual-layer matching is characterized in that: The loss function in step 3.4 Loss Function When convergence is approaching, the loss function value converges to 0.17, and the preset value of the number of iterations is 10,000 steps.

7. According to claim 1, the method for recommending coding mapping based on hybrid supervision and double-layer matching is characterized in that: Step 4 specifically includes the following steps: Step 4.1: Get the description segmentation of the original KKS code and the new KKS code through segmentation ,in w For subparticiples, i is the number of participles; Step 4.2: The description segmentation of the original KKS code and the new KKS code obtained in step 4.1 is used to calculate the similarity of the segmentation results using the minimum edit distance to obtain the similarity score of the edit distance of the original KKS code and the new KKS code. Score ; Step 4.3: Similarity score obtained from step 4.2 Score Based on the similarity threshold Filter, if the similarity score Score Lower than , then the matching fails and proceed to step 5 for supervised matching; if the similarity score Score Higher than , the match is successful and the matching result is output directly.

8. According to claim 7, the method for recommending coding mapping based on hybrid supervision and dual-layer matching is characterized in that: Similarity threshold in step 4.3 is 85.

9. According to claim 1, the method for recommending double-layer matching coding mapping based on hybrid supervision is characterized in that: In step 5.1, according to the supervised matching model Model The specific way to get the generated result is: supervised matching model Model The computing unit and data interface of the storage device provide services to obtain the encoding and Chinese description; step 5.2 obtains the recommendation results after 5 similarity matches.