Classification methods, devices, electronic equipment and readable media for national standard industries of enterprises

By merging and cleaning enterprise data, generating word packages and word vectors, and using the national standard industry classification model to predict small class classification results, the problem of insufficient accuracy of the Chinese standard industry classification in the existing technology has been solved, and the effect of automatically improving classification accuracy has been achieved.

CN113762420BActive Publication Date: 2024-09-13AISINO CREDIT INFORMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111220837.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-20
Publication Date
2024-09-13
Estimated Expiration
2041-10-20

AI Technical Summary

Technical Problem

It is difficult for existing technology to automatically and effectively improve the classification accuracy of enterprises in national standard industries, making it difficult to meet customer needs with medium-level classification accuracy.

Method used

By merging and cleaning the company name and business scope data, word packages and word vectors are generated, and the national standard industry classification model is used to predict the sub-class classification results and determine the company's national standard industry sub-class classification results.

Benefits of technology

Automation has been realized to improve the accuracy of enterprise national standard industry classification, meet customer needs for small categories, and avoid the complexity and lack of accuracy of manual annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113762420B
    Figure CN113762420B
Patent Text Reader

Abstract

The embodiment of the present application provides a classification method, device, electronic device and readable medium for the national standard industry of an enterprise. The method includes: merging the enterprise name and enterprise business scope data of the enterprise, and cleaning the merged enterprise name and enterprise business scope data; based on the middle category classification name of the enterprise's national standard industry, combining the cleaned enterprise name and enterprise business scope data; generating a word bag of the enterprise data combination and a word vector of the words in the word bag of the enterprise data combination; through the enterprise national standard industry classification model, based on the word bag of the enterprise data combination and the word vector of the words in the word bag of the enterprise data combination, predicting the sub-category classification result of the national standard industry corresponding to the enterprise data combination; based on the sub-category classification result of the national standard industry corresponding to the enterprise data combination, determining the sub-category classification result of the national standard industry of the enterprise. This solution can automatically and effectively improve the classification accuracy of the national standard industry of the enterprise.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a classification method, device, electronic device and computer-readable medium for a national standard industry of an enterprise. Background Art

[0002] In the national standard industry classification rules for enterprises, one middle category contains multiple subcategories, and the business scope of most enterprises is limited to a certain subcategory. For example, there are five subcategories in the category-manufacturing, the major category-agricultural and sideline products processing industry, and the middle category-grain milling, namely rice processing, wheat processing, corn processing, grain processing, and other grain milling. These five subcategories cover a variety of crops, but in real life, enterprises may only produce one or two or three products. At present, the classification accuracy of most enterprise industry information that can be obtained only supports the middle category level, which is a relatively broad classification of enterprises, and the corresponding middle category description is also relatively vague. In actual application scenarios, the industry classification accuracy at the middle category level is often difficult to meet customer needs, and customers hope to obtain the closest industry subcategory of the enterprise. In actual projects, the number of enterprises involved is huge (millions of levels), and there are multiple subcategories under one middle category in the national standard industry classification rules. Therefore, it is difficult to meet customer needs through manual labeling, that is, it is difficult to improve the classification accuracy of the national standard industry of enterprises through manual labeling.

[0003] It can be seen that how to automatically and effectively improve the classification accuracy of the national standard industry of enterprises has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of this application is to propose a classification method, device, electronic device and computer-readable medium for the national standard industry of an enterprise, so as to solve the technical problem existing in the prior art of how to automatically and effectively improve the classification accuracy of the national standard industry of an enterprise.

[0005] According to a first aspect of an embodiment of the present application, a method for classifying an enterprise's national standard industry is provided, the method comprising: merging the enterprise name and enterprise business scope data of the enterprise to be classified, and cleaning the merged enterprise name and enterprise business scope data to obtain the cleaned enterprise name and enterprise business scope data; based on the middle-class classification name of the national standard industry of the enterprise to be classified, combining the cleaned enterprise name and enterprise business scope data to obtain an enterprise data combination corresponding to the enterprise to be classified; using a pre-generated word bag and word vectors of the words in the word bag to generate a word bag of the enterprise data combination and word vectors of the words in the word bag of the enterprise data combination; using a classification model of the enterprise's national standard industry, based on the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination, predicting a sub-category classification result of the national standard industry corresponding to the enterprise data combination; based on the sub-category classification result of the national standard industry corresponding to the enterprise data combination, determining the sub-category classification result of the national standard industry of the enterprise to be classified.

[0006] According to a second aspect of an embodiment of the present application, a classification device for a national standard industry of an enterprise is provided, the device comprising: a data cleaning module, used to merge the enterprise name and enterprise business scope data of the enterprise to be classified, and clean the merged enterprise name and enterprise business scope data to obtain the cleaned enterprise name and enterprise business scope data; a data combination module, used to combine the cleaned enterprise name and enterprise business scope data based on the middle-class classification name of the national standard industry of the enterprise to be classified, so as to obtain an enterprise data combination corresponding to the enterprise to be classified; a generation module, used to use a pre-generated word bag and the word vectors of the words in the word bag to generate a word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination; a prediction module, used to predict the sub-category classification result of the national standard industry corresponding to the enterprise data combination based on the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination through the classification model of the national standard industry of the enterprise; a determination module, used to determine the sub-category classification result of the national standard industry of the enterprise to be classified based on the sub-category classification result of the national standard industry corresponding to the enterprise data combination.

[0007] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a computer-readable medium configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the national standard industry classification method for enterprises as described in the first aspect of the above embodiment.

[0008] According to a fourth aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the national standard industry classification method for enterprises as described in the first aspect of the above embodiment is implemented.

[0009] According to the classification scheme of the national standard industry of the enterprise provided in the embodiment of the present application, the enterprise name and business scope data of the enterprise to be classified are merged, and the merged enterprise name and business scope data are cleaned, and then based on the middle category classification name of the national standard industry of the enterprise to be classified, the cleaned enterprise name and business scope data are combined, and then the pre-generated word bag and the word vectors of the words in the word bag are used to generate the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination, and then through the classification model of the national standard industry of the enterprise, based on the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination, the sub-category classification result of the national standard industry corresponding to the enterprise data combination is predicted, and then based on the sub-category classification result of the national standard industry corresponding to the enterprise data combination, the sub-category classification result of the national standard industry of the enterprise to be classified is determined, which can automatically and effectively improve the classification accuracy of the national standard industry of the enterprise. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0011] Figure 1A This is a flowchart of the steps of the classification method of the national standard industry of the enterprise in the first embodiment;

[0012] Figure 1B A schematic diagram of the classification method of national standard industries provided according to the first embodiment;

[0013] Figure 1C A schematic diagram of the change of the loss function provided according to the first embodiment;

[0014] Figure 1D A schematic diagram of the change of classification accuracy provided according to the first embodiment;

[0015] Figure 2 This is a schematic diagram of the structure of the classification device of the national standard industry of the enterprise in the second embodiment;

[0016] Figure 3 This is a schematic diagram of the structure of the electronic device in the third embodiment;

[0017] Figure 4 This is the hardware structure of the electronic device in the fourth embodiment. DETAILED DESCRIPTION

[0018] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only configured to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0019] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0020] Reference Figure 1A , shows a step flow chart of the classification method of the national standard industry of an enterprise in the first embodiment.

[0021] Specifically, the classification method of the national standard industry of an enterprise provided in this embodiment includes the following steps:

[0022] In step S101, the enterprise names and business scope data of the enterprises to be classified are merged, and the merged enterprise names and business scope data are cleaned to obtain the cleaned enterprise names and business scope data.

[0023] In this embodiment, the enterprise name and business scope data of the enterprise to be classified can be obtained from the enterprise data document, and the enterprise data document may include the enterprise's unified social credit code, enterprise name and business scope. It can be understood that the above description is only exemplary and this embodiment does not make any limitation to this.

[0024] In some optional embodiments, when the enterprise name and enterprise business scope data of the enterprise to be classified are merged, the enterprise business scope data of the enterprise to be classified is placed after the enterprise name of the enterprise to be classified to obtain the merged enterprise name and enterprise business scope data, that is, the enterprise description data. It can be understood that the above description is only exemplary and this embodiment does not make any limitation to this.

[0025] In some optional embodiments, when the merged enterprise name and enterprise business scope data are cleaned, the merged enterprise name and enterprise business scope data are segmented by a Chinese word segmentation tool to obtain the segmentation results of the merged enterprise name and enterprise business scope data; a pre-configured stop word document is used to remove the stop words in the segmentation results of the merged enterprise name and enterprise business scope data to obtain the segmentation results after removing the stop words. Among them, the Chinese word segmentation tool can be a jieba tool. Thereby, the merged enterprise name and enterprise business scope data can be effectively segmented by the Chinese word segmentation tool. In addition, the stop words in the segmentation results of the merged enterprise name and enterprise business scope data can be effectively removed by using a pre-configured stop word document. It can be understood that the above description is only exemplary, and this embodiment does not impose any limitation on this.

[0026] In step S102, based on the middle category classification name of the national standard industry of the enterprise to be classified, the cleaned enterprise name and enterprise business scope data are combined to obtain the enterprise data combination corresponding to the enterprise to be classified.

[0027] In this embodiment, the middle classification name of the national standard industry of the enterprise to be classified may be grain planting, fruit planting, livestock breeding, Chinese medicinal material planting, etc. It can be understood that the above description is only exemplary, and this embodiment does not make any limitation to this.

[0028] In some optional embodiments, when the cleaned enterprise name and enterprise business scope data are combined based on the middle category classification name of the national standard industry of the enterprise to be classified, the words in the word segmentation result after removing the stop words are placed after the middle category classification name of the national standard industry of the enterprise to be classified, so as to obtain the enterprise data combination corresponding to the enterprise to be classified. Thereby, the enterprise data combination corresponding to the enterprise to be classified can be effectively obtained, and then used to predict the sub-category classification result of the national standard industry of the enterprise. In addition, it also avoids the conflict that the predicted sub-category classification result of the national standard industry of the enterprise does not belong to the middle category classification of the national standard industry of the enterprise. It can be understood that the above description is only exemplary, and this embodiment does not make any limitation to this.

[0029] In step S103, the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination are generated using the pre-generated word bag and the word vectors of the words in the word bag.

[0030] In some optional embodiments, before predicting the subcategory classification result of the national standard industry corresponding to the enterprise data combination, the method also includes: using a Chinese word segmentation tool to segment the subcategory classification description data in the national standard industry classification document to obtain the word segmentation result of the subcategory classification description data; using a pre-configured stop word document to remove the stop words in the word segmentation result of the subcategory classification description data to obtain the word segmentation result after removing the stop words; placing the words in the word segmentation result after removing the stop words after the middle category classification name of the national standard industry to which the subcategory classification description data belongs to obtain a training sample of the classification model of the national standard industry of the enterprise; using the number of the subcategory classification name of the national standard industry to which the subcategory classification description data belongs as the subcategory classification annotation data for training the classification model of the national standard industry of the enterprise, and associating the training sample with the subcategory classification annotation data to construct a training set of the classification model of the national standard industry of the enterprise. Thus, by placing the words in the word segmentation result after removing the stop words after the middle category name of the national standard industry to which the subcategory classification description data belongs, the training samples of the classification model of the national standard industry of the enterprise can be effectively obtained. In addition, by associating the training samples with the subcategory classification annotation data, the training set of the classification model of the national standard industry of the enterprise can be effectively constructed. It can be understood that the above description is only exemplary and this embodiment does not make any limitation to this.

[0031] In a specific example, the Chinese word segmentation tool can be the jieba tool, and the subcategory description data can be understood as data that describes the subcategory classification, for example, rice planting, hybrid indica rice, conventional rice, single-season rice, planting japonica rice, indica rice, japonica rice, early indica rice, and seasonal rice; wheat planting, wheat, buckwheat, and oats; soybeans, soybeans, mung beans, red beans, soybeans, peas, broad beans, mung beans, lentils, adzuki beans, kidney beans, cowpeas, and beans, etc. For another example, when the subcategory description data is “rice planting, hybrid indica rice, conventional rice, single-season rice, planting japonica rice, indica rice, japonica rice, early indica rice, and seasonal rice”, the middle category classification name of the national standard industry to which the subcategory classification description data belongs is “cereal planting”; when the subcategory description data is “wheat planting, wheat, buckwheat, and oats”, the middle category classification name of the national standard industry to which the subcategory classification description data belongs is “cereal planting”; when the subcategory description data is “soybeans, soybeans, mung beans, red beans, soybeans, peas, broad beans, mung beans, lentils, red beans, kidney beans, cowpeas, and beans”, the middle category classification name of the national standard industry to which the subcategory classification description data belongs is “beans, oilseeds, and potato planting”. For another example, when the subcategory description data is “rice planting, hybrid indica rice, conventional rice, single-season rice, planting japonica rice, indica rice, japonica rice, early indica rice, and seasonal rice”, the subcategory classification name of the national standard industry to which the subcategory classification description data belongs is “rice planting”; when the subcategory description data is “wheat planting, wheat, buckwheat, and oats”, the subcategory classification name of the national standard industry to which the subcategory classification description data belongs is “wheat planting”; when the subcategory description data is “soybeans, soybeans, mung beans, red beans, soybeans, peas, broad beans, mung beans, lentils, adzuki beans, kidney beans, cowpeas, and string beans”, the subcategory classification name of the national standard industry to which the subcategory classification description data belongs is “bean planting”. For another example, when the sub-category classification name of the national standard industry to which the sub-category classification description data belongs is "rice planting", the sub-category classification name of the national standard industry to which the sub-category classification description data belongs is numbered "111"; when the sub-category classification name of the national standard industry to which the sub-category classification description data belongs is "wheat planting", the sub-category classification name of the national standard industry to which the sub-category classification description data belongs is numbered "112"; when the sub-category classification name of the national standard industry to which the sub-category classification description data belongs is "bean planting", the sub-category classification name of the national standard industry to which the sub-category classification description data belongs is numbered "121". It can be understood that the above description is only exemplary and this embodiment does not impose any limitation on this.

[0032] In some optional embodiments, after constructing the training set of the classification model of the national standard industry of the enterprise, the method further includes: obtaining the sub-category classification prediction data of the national standard industry of the training sample based on the word bag of the training sample and the word vector of the words in the word bag of the training sample through the classification model of the national standard industry of the enterprise to be trained; based on the sub-category classification prediction data of the national standard industry of the training sample and the sub-category classification annotation data, training the classification model of the national standard industry of the enterprise to be trained. Thereby, the classification model of the national standard industry of the enterprise to be trained can be effectively trained. It can be understood that the above description is only exemplary and this embodiment does not impose any limitation on this.

[0033] In a specific example, the classification model of the national standard industry of the enterprise can be any appropriate neural network model that can realize feature extraction or target object detection, including but not limited to convolutional neural network model, reinforcement learning neural network model, generation network model in adversarial neural network model, etc. The specific structure setting in the neural network model can be appropriately set by those skilled in the art according to actual needs, such as the number of convolution layers, the size of convolution kernel, the number of channels, etc. For example, the classification model of the national standard industry of the enterprise can be a long short-term memory network model for the classification of the national standard industry of the enterprise. The sub-class classification prediction data can be a sub-class classification prediction number, and the sub-class classification labeling data can be a sub-class classification labeling number. When the classification model of the national standard industry of the enterprise to be trained is trained based on the sub-class classification prediction data of the national standard industry of the training sample and the sub-class classification labeling data, the difference value of the sub-class classification prediction data and the sub-class classification labeling data is determined by the target loss function; based on the difference value, the model parameters of the classification model of the national standard industry of the enterprise are adjusted. Among them, the target loss function can be any loss function such as cross entropy loss function, softmax loss function, L1 loss function, L2 loss function, etc. When adjusting the model parameters of the classification model of the national standard industry of the enterprise, a back propagation algorithm or a stochastic gradient descent algorithm may be used to adjust the model parameters of the classification model of the national standard industry of the enterprise. It is understood that the above description is only exemplary and the embodiments of the present application do not make any limitation to this.

[0034] In a specific example, by determining the difference value between the sub-category classification prediction data and the sub-category classification annotation data, the sub-category classification prediction data currently obtained is evaluated as a basis for subsequent training of the classification model of the national standard industry of the enterprise. Specifically, the difference value can be reversely transmitted to the classification model of the national standard industry of the enterprise, so as to iteratively train the classification model of the national standard industry of the enterprise. The training of the classification model of the national standard industry of the enterprise is an iterative process. This embodiment only describes one of the training processes, but those skilled in the art should understand that each training of the classification model of the national standard industry of the enterprise can adopt this training method until the training of the classification model of the national standard industry of the enterprise is completed. It can be understood that the above description is only exemplary, and the embodiments of the present application do not impose any limitation on this.

[0035] In some optional embodiments, before using the pre-generated word bag and the word vectors of the words in the word bag to generate the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination, the method further includes: segmenting the training sample by the Chinese word segmentation tool to obtain the word segmentation result of the training sample; marking the position of the words in the word segmentation result of the training sample in the training sample by the marker in the deep learning library to obtain the pre-generated word bag; vector encoding the words in the pre-generated word bag by the vector encoder in the data analysis library to obtain the word vector of the words in the word bag. Among them, the Chinese word segmentation tool can be the jieba tool, the marker in the deep learning library can be the Tokenizer package of keras, and the vector encoder in the data analysis library can be get_dummies of pandas. Thereby, by vector encoding the words in the pre-generated word bag by the vector encoder in the data analysis library, the word vector of the words in the word bag can be effectively obtained. It can be understood that the above description is only exemplary, and the embodiments of the present application do not make any limitation to this.

[0036] In some optional embodiments, when using a pre-generated word bag and the word vectors of the words in the word bag to generate the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination, the enterprise data combination is segmented by the Chinese word segmentation tool to obtain the word segmentation result of the enterprise data combination; the position of the words in the word segmentation result of the enterprise data combination in the enterprise data combination is marked by the marker to obtain the word bag of the enterprise data combination; the pre-generated word bag and the word vectors of the words in the pre-generated word bag are used to generate the word vectors of the words in the word bag of the enterprise data combination. Thereby, the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination can be effectively obtained. It can be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0037] In a specific example, when the word vectors of the words in the word bag of the enterprise data combination are generated using the pre-generated word bag and the word vectors of the words in the pre-generated word bag, the words in the word bag of the enterprise data combination are compared with the words in the pre-generated word bag, and if they are the same, the word vectors of the words in the word bag of the enterprise data combination are obtained. It can be understood that the above description is only exemplary and the embodiments of the present application do not make any limitation to this.

[0038] In step S104, the classification model of the national standard industry of the enterprise is used to predict the sub-category classification result of the national standard industry corresponding to the enterprise data combination based on the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination.

[0039] In this embodiment, the sub-category classification result of the national standard industry corresponding to the enterprise data combination may be the sub-category classification number of the national standard industry corresponding to the enterprise data combination. It can be understood that the above description is only exemplary, and the embodiment of the present application does not make any limitation to this.

[0040] In step S105, based on the sub-category classification results of the national standard industries corresponding to the enterprise data combination, the sub-category classification results of the national standard industries of the enterprise to be classified are determined.

[0041] In some optional embodiments, when determining the subcategory classification results of the national standard industry of the enterprise to be classified based on the subcategory classification results of the national standard industry corresponding to the enterprise data combination, the number of identical subcategory classification results in the subcategory classification results of the national standard industry corresponding to the enterprise data combination is determined; and the largest number of identical subcategory classification results is determined as the subcategory classification results of the national standard industry of the enterprise to be classified. Thereby, the subcategory classification results of the national standard industry of the enterprise to be classified can be accurately determined by the number of identical subcategory classification results in the subcategory classification results of the national standard industry corresponding to the enterprise data combination. It can be understood that the above description is only exemplary, and the embodiments of the present application do not impose any limitation on this.

[0042] In practical applications, the best sub-category in the middle category is selected by splitting the training samples in the training set, predicting them, and then voting and merging them. Specifically, based on the huge data provided by the enterprise industry information currently available on the market and the long short-term memory network model, the closest sub-category of the enterprise is predicted by voting after the business scope vocabulary is split. More specifically, the sub-category of the enterprise is predicted by merging and extracting information based on the name of the middle category classification, the name of the enterprise, and the business scope data of the enterprise, ensuring that the predicted sub-category of the enterprise belongs to the best sub-category among the middle category of the enterprise, and avoiding conflicts where the sub-category does not belong to the middle category. It will be understood that the above description is only exemplary, and the embodiments of the present application do not impose any limitation on this.

[0043] In a specific example, the programming language is python3.8, MYSQL, the IDE is jupyter notebook, navicat, the python packages involved may be python basic library, pandas, jieba, keras, sklearn, matplotlib, the initial file may be the national standard industry classification and each sub-category description document, the document contains the middle category number, middle category name, sub-category number, sub-category name, sub-category description, etc., stop word document, enterprise data document, the document contains the enterprise's unified social credit code, enterprise name, enterprise business scope. Figure 1BAs shown, the technical solution provided by this embodiment is as follows: Step 1: Construct a training set. Clean data: Use jieba word segmentation to describe the data in small categories and remove the stop words involved in the stop word document. Data combination: Use "middle category name" + "one word segmentation" -> target small category number. For example, if the middle category name is "gold mining and dressing", and the small category description data is "gold mining and dressing, gold ore, gold concentrate", then after jieba word segmentation and removal of stop words [gold mine, mining and dressing, gold, ore, gold, concentrate]. After combination, it is [gold mining and dressing gold ore, gold mining and dressing, gold mining and dressing gold, gold mining and dressing ore, gold mining and dressing gold, gold mining and dressing concentrate]. Step 2: Generate word bags and word vectors. Generate word bags: Use the training samples of the jieba word segmentation training set, and use the keras Tokenizer package to construct the vocabulary involved in the training set samples. The maximum length of the word bag is set to 60,000, and the word bag information is saved. Generate word vectors: Generate word vectors through pandas' get_dummies. Step 3: Build an LSTM model: Based on the Keras package, import Sequential and build a Sequential model by instantiation. Import Embedding to build the first embedding layer of the model, set the number of possible values ​​of the text word vocabulary to 60,000, the output layer to 20, and the input sequence length to 20. Establish a SpatialDropout1D layer and set the disconnection ratio to 0.2. Import LSTM, establish an LSTM layer, set the output spatial dimension to 100, the linear unit dropout ratio to 0.2, and the recurrent unit dropout ratio to 0.2. Import Dense, establish a Dense layer, set the output array size to 692, and use the softmax function as the activation function. Step 4: Train the model. Import EarlyStopping of the Keras package and train according to the model in step 3 with the following code:

[0044] epochs=15

[0045] batch_size=16

[0046] history=model.fit(X_train,Y_train,epochs=epochs,batch_size=batch_size,validation_split=0.1,

[0047] callbacks=[EarlyStopping(monitor='val_loss', patience=3, min_delta=0.0001)]).

[0048] After the model training is completed, the model can be used for testing. Figure 1CAs shown in FIG, the change curve of the loss function of the model during training and the change curve of the loss function of the model during testing are shown. Figure 1D As shown, the curve of the change of the accuracy of the model during training and the curve of the change of the accuracy of the model during testing are shown. It can be seen that based on the test sample data, a model with a prediction accuracy of 70% can be obtained. Step six: Save the model. Save the model through the model saving interface model.save. Step seven: Predict the subcategory to which the enterprise belongs. It will be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0049] In a specific example, the company name and business scope of a company in the corporate data are combined, substituted into step one for word segmentation and stop words are removed to generate a test set. Each test set is brought into step two to generate a word bag and word vector. The word vector and word bag are substituted into the model trained in step four to obtain the prediction result. The subcategory number with the highest proportion in the prediction result is selected as the prediction result for this company. It will be understood that the above description is only exemplary and the embodiments of the present application do not impose any limitation on this.

[0050] In practical applications, a more complex text classification model "LSTM" model is used in terms of model; in terms of data, the middle category name, company name and business scope information of the company in the data are mastered; in terms of classification standards, the national standard industry classification standards are clearer, involving more categories and higher precision requirements. Label each company with the closest subcategory label. Based on the company name and business scope information, an LSTM text classification model is established to label the company with the closest subcategory number. It can be understood that the above description is only exemplary and the embodiments of this application do not limit this in any way.

[0051] According to the classification method of the national standard industry of the enterprise provided in this embodiment, the enterprise name and enterprise business scope data of the enterprise to be classified are merged, and the merged enterprise name and enterprise business scope data are cleaned, and then based on the middle category classification name of the national standard industry of the enterprise to be classified, the cleaned enterprise name and enterprise business scope data are combined, and then the pre-generated word bag and the word vectors of the words in the word bag are used to generate the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination, and then through the classification model of the national standard industry of the enterprise, based on the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination, the sub-category classification result of the national standard industry corresponding to the enterprise data combination is predicted, and then based on the sub-category classification result of the national standard industry corresponding to the enterprise data combination, the sub-category classification result of the national standard industry of the enterprise to be classified is determined, which can automatically and effectively improve the classification accuracy of the national standard industry of the enterprise.

[0052] The classification method for the national standard industry of an enterprise provided in this embodiment can be executed by any appropriate device with data processing capabilities, including but not limited to: cameras, terminals, mobile terminals, PCs, servers, vehicle-mounted equipment, entertainment equipment, advertising equipment, personal digital assistants (PDAs), tablet computers, laptops, handheld game consoles, smart glasses, smart watches, wearable devices, virtual display devices or display enhancement devices, etc.

[0053] Reference Figure 2 , shows a schematic diagram of the structure of the classification device of the national standard industry of the enterprise in the second embodiment.

[0054] The classification device of the national standard industry of an enterprise provided in this embodiment includes: a data cleaning module 201, which is used to merge the enterprise name and enterprise business scope data of the enterprise to be classified, and clean the merged enterprise name and enterprise business scope data to obtain the cleaned enterprise name and enterprise business scope data; a data combination module 202, which is used to combine the cleaned enterprise name and enterprise business scope data based on the middle category classification name of the national standard industry of the enterprise to be classified, so as to obtain the enterprise data combination corresponding to the enterprise to be classified; a generation module 203, which is used to use a pre-generated word bag and the word vectors of the words in the word bag to generate the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination; a prediction module 204, which is used to predict the sub-category classification result of the national standard industry corresponding to the enterprise data combination based on the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination through the classification model of the national standard industry of the enterprise; a determination module 205, which is used to determine the sub-category classification result of the national standard industry of the enterprise to be classified based on the sub-category classification result of the national standard industry corresponding to the enterprise data combination.

[0055] Optionally, the data cleaning module 201 includes: a word segmentation submodule, used to perform word segmentation on the merged enterprise name and enterprise business scope data through a Chinese word segmentation tool to obtain the word segmentation result of the merged enterprise name and enterprise business scope data; a removal submodule, used to use a pre-configured stop word document to remove stop words in the word segmentation result of the merged enterprise name and enterprise business scope data to obtain the word segmentation result after removing the stop words.

[0056] Optionally, the data combination module 202 is specifically used to: place the words in the word segmentation result after removing the stop words after the middle category classification name of the national standard industry of the enterprise to be classified, so as to obtain the enterprise data combination corresponding to the enterprise to be classified.

[0057] Optionally, before the prediction module 204, the device also includes: a first word segmentation module, used to perform word segmentation on the subcategory classification description data in the national standard industry classification document through a Chinese word segmentation tool to obtain the word segmentation result of the subcategory classification description data; a removal module, used to use a pre-configured stop word document to remove stop words in the word segmentation result of the subcategory classification description data to obtain the word segmentation result after removing the stop words; a placement module, used to place the words in the word segmentation result after removing the stop words after the middle class classification name of the national standard industry to which the subcategory classification description data belongs, to obtain the training sample of the classification model of the national standard industry of the enterprise; an association module, used to use the number of the subcategory classification name of the national standard industry to which the subcategory classification description data belongs as the subcategory classification annotation data for training the classification model of the national standard industry of the enterprise, and associate the training sample with the subcategory classification annotation data to construct a training set of the classification model of the national standard industry of the enterprise.

[0058] Optionally, before the generation module 203, the device also includes: a second word segmentation module, used to perform word segmentation on the training sample through the Chinese word segmentation tool to obtain the word segmentation result of the training sample; a first marking module, used to mark the position of the words in the word segmentation result of the training sample in the training sample through a marker in a deep learning library to obtain the pre-generated word package; a vector encoding module, used to perform vector encoding on the words in the pre-generated word package through a vector encoder in a data analysis library to obtain the word vectors of the words in the word package.

[0059] Optionally, the generation module 203 is specifically used to: perform word segmentation on the enterprise data combination through the Chinese word segmentation tool to obtain the word segmentation result of the enterprise data combination; mark the positions of the words in the word segmentation result of the enterprise data combination in the enterprise data combination through the marker to obtain the word bag of the enterprise data combination; use the pre-generated word bag and the word vectors of the words in the pre-generated word bag to generate the word vectors of the words in the word bag of the enterprise data combination.

[0060] Optionally, after the association module, the device also includes: an acquisition module, used to obtain the subcategory classification prediction data of the national standard industry of the training sample through the classification model of the national standard industry of the enterprise to be trained, based on the word bag of the training sample and the word vectors of the words in the word bag of the training sample; a training module, used to train the classification model of the national standard industry of the enterprise to be trained based on the subcategory classification prediction data of the national standard industry of the training sample and the subcategory classification annotation data.

[0061] Optionally, the determination module 205 is specifically used to: determine the number of identical subcategory classification results in the subcategory classification results of the national standard industry corresponding to the enterprise data combination; and determine the largest number of identical subcategory classification results as the subcategory classification result of the national standard industry of the enterprise to be classified.

[0062] The device for classifying the national standard industries of enterprises provided in this embodiment is used to implement the corresponding national standard industry classification methods of enterprises in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0063] Figure 3 This is a schematic diagram of the structure of an electronic device in the third embodiment; the electronic device may include:

[0064] One or more processors 301;

[0065] The computer readable medium 302 may be configured to store one or more programs,

[0066] When the one or more programs are executed by the one or more processors, the one or more processors implement the national standard industry classification method for enterprises as described in the first embodiment.

[0067] Figure 4 is the hardware structure of the electronic device in the fourth embodiment; Figure 4 As shown, the hardware structure of the electronic device may include: a processor 401, a communication interface 402, a computer readable medium 403 and a communication bus 404;

[0068] The processor 401, the communication interface 402, and the computer readable medium 403 communicate with each other via a communication bus 404;

[0069] Optionally, the communication interface 402 may be an interface of a communication module, such as an interface of a GSM module;

[0070] Among them, the processor 401 can be specifically configured to: merge the enterprise name and enterprise business scope data of the enterprise to be classified, and clean the merged enterprise name and enterprise business scope data to obtain the cleaned enterprise name and enterprise business scope data; based on the middle category classification name of the national standard industry of the enterprise to be classified, the cleaned enterprise name and enterprise business scope data are combined to obtain the enterprise data combination corresponding to the enterprise to be classified; use the pre-generated word bag and the word vectors of the words in the word bag to generate the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination; through the classification model of the national standard industry of the enterprise, based on the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination, predict the sub-category classification result of the national standard industry corresponding to the enterprise data combination; based on the sub-category classification result of the national standard industry corresponding to the enterprise data combination, determine the sub-category classification result of the national standard industry of the enterprise to be classified.

[0071] The processor 401 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0072] The computer readable medium 403 can be, but is not limited to, a random access memory medium (RAM), a read-only memory medium (ROM), a programmable read-only memory medium (PROM), an erasable programmable read-only memory medium (EPROM), an electrically erasable read-only memory medium (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.

[0073] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code configured to execute the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the above functions defined in the method of the present application are executed. It should be noted that the computer-readable medium described in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program configured to be used by or in combination with an instruction execution system, an apparatus or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0074] Computer program code configured to perform the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0075] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of the code contains one or more executable instructions configured to implement the specified logical function. There are specific sequential relationships in the above-mentioned specific embodiments, but these sequential relationships are only exemplary. When the specific implementation is implemented, these steps may be less, more, or the execution order may be adjusted. That is, in some implementations as replacements, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0076] The modules involved in the embodiments of the present application may be implemented by software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor including a data cleaning module, a data combination module, a generation module, a prediction module, and a determination module. The names of these modules do not constitute a limitation on the modules themselves in certain cases. For example, the data cleaning module may also be described as a "module that merges the enterprise names and business scope data of the enterprises to be classified, cleans the merged enterprise names and business scope data, and obtains the cleaned enterprise names and business scope data".

[0077] As another aspect, the present application further provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the national standard industry classification method for enterprises as described in the above-mentioned embodiment 1.

[0078] As another aspect, the present application further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the device: merges the enterprise names and business scope data of the enterprises to be classified, and cleans the merged enterprise names and business scope data to obtain the cleaned enterprise names and business scope data; based on the middle-class classification name of the national standard industry of the enterprise to be classified, performs data combination on the cleaned enterprise names and business scope data to obtain the enterprise data combination corresponding to the enterprise to be classified; uses a pre-generated word bag and the word vectors of the words in the word bag to generate a word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination; predicts the sub-category classification result of the national standard industry corresponding to the enterprise data combination based on the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination through the classification model of the national standard industry of the enterprise; determines the sub-category classification result of the national standard industry of the enterprise to be classified based on the sub-category classification result of the national standard industry corresponding to the enterprise data combination.

[0079] The expressions "first", "second", "the first" or "the second" used in various embodiments of the present disclosure may modify various components regardless of order and / or importance, but these expressions do not limit the corresponding components. The above expressions are only configured for the purpose of distinguishing an element from other elements. For example, a first user device and a second user device represent different user devices, although both are user devices. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the present disclosure.

[0080] When one element (e.g., a first element) is referred to as being "(operably or communicatively) coupled" or "(operably or communicatively) coupled to" or "connected to" another element (e.g., a second element), it is understood that the one element is directly connected to the other element or the one element is indirectly connected to the other element via yet another element (e.g., a third element). Conversely, it is understood that when an element (e.g., a first element) is referred to as being "directly connected" or "directly coupled" to another element (the second element), no element (e.g., a third element) is interposed between the two.

[0081] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A classification method for the national standard industry of an enterprise, It is characterized in that The method comprises: Merging the enterprise names and enterprise business scope data of the enterprises to be classified, and cleaning the merged enterprise names and enterprise business scope data to obtain cleaned enterprise names and enterprise business scope data; Based on the middle classification name of the national standard industry of the enterprise to be classified, the cleaned enterprise name and enterprise business scope data are combined to obtain the enterprise data combination corresponding to the enterprise to be classified; Using pre-generated word bags and word vectors of words in the word bags, generating word bags of the enterprise data combination and word vectors of words in the word bags of the enterprise data combination; Using the classification model of the national standard industry of the enterprise, based on the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination, predict the sub-category classification result of the national standard industry corresponding to the enterprise data combination; Determine the sub-category classification result of the national standard industry of the enterprise to be classified based on the sub-category classification result of the national standard industry corresponding to the enterprise data combination; Wherein, before predicting the sub-category classification result of the national standard industry corresponding to the enterprise data combination, the method further includes: Using a Chinese word segmentation tool, segmenting the sub-category classification description data in the national standard industry classification document to obtain the word segmentation result of the sub-category classification description data; Using a pre-configured stop word document, the stop words in the word segmentation result of the subcategory classification description data are removed to obtain the word segmentation result after the stop words are removed; Placing the words in the word segmentation result after removing the stop words after the middle category classification name of the national standard industry to which the subcategory classification description data belongs, so as to obtain a training sample of the classification model of the national standard industry of the enterprise; Using the serial number of the sub-category classification name of the national standard industry to which the sub-category classification description data belongs as sub-category classification labeling data for training the classification model of the national standard industry of the enterprise, and associating the training sample with the sub-category classification labeling data to construct a training set of the classification model of the national standard industry of the enterprise; Wherein, after constructing the training set of the classification model of the national standard industry of the enterprise, it also includes: Obtain sub-category classification prediction data of the national standard industry of the training sample through the classification model of the national standard industry of the enterprise to be trained, based on the word bag of the training sample and the word vectors of the words in the word bag of the training sample; Based on the sub-category classification prediction data of the national standard industry of the training sample and the sub-category classification annotation data, a classification model of the national standard industry of the enterprise to be trained is trained.

2. The classification method of the national standard industry of the enterprise according to claim 1, It is characterized in that The data cleaning of the merged enterprise name and enterprise business scope data includes: Using a Chinese word segmentation tool, segmenting the merged enterprise name and enterprise business scope data to obtain a word segmentation result for the merged enterprise name and enterprise business scope data; Use a pre-configured stop word document to remove stop words from the word segmentation result of the merged enterprise name and enterprise business scope data to obtain the word segmentation result after removing the stop words.

3. The classification method of the national standard industry of the enterprise according to claim 2, It is characterized in that The data combination of the cleaned enterprise name and enterprise business scope data based on the middle category classification name of the national standard industry of the enterprise to be classified includes: The words in the word segmentation result after removing the stop words are placed after the middle category classification name of the national standard industry of the enterprise to be classified, so as to obtain the enterprise data combination corresponding to the enterprise to be classified.

4. The classification method of the national standard industry of an enterprise according to claim 1, It is characterized in that Before using the pre-generated word bag and the word vectors of the words in the word bag to generate the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination, the method further includes: Using the Chinese word segmentation tool, segmenting the training sample to obtain a word segmentation result of the training sample; Using a marker in a deep learning library, marking the positions of words in the word segmentation results of the training sample in the training sample to obtain the pre-generated word bag; The words in the pre-generated word bag are vector-encoded by a vector encoder in a data analysis library to obtain word vectors of the words in the word bag.

5. The classification method of the national standard industry of an enterprise according to claim 4, It is characterized in that The using the pre-generated word bag and the word vectors of the words in the word bag to generate the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination includes: Using the Chinese word segmentation tool, segmenting the enterprise data combination to obtain a word segmentation result of the enterprise data combination; Using the tagger, the positions of words in the word segmentation results of the enterprise data combination in the enterprise data combination are marked to obtain a word bag of the enterprise data combination; The word vectors of the words in the word bag of the enterprise data combination are generated using the pre-generated word bag and the word vectors of the words in the pre-generated word bag.

6. A classification device for the national standard industry of an enterprise, It is characterized in that The device comprises: A data cleaning module is used to merge the enterprise name and enterprise business scope data of the enterprise to be classified, and clean the merged enterprise name and enterprise business scope data to obtain the cleaned enterprise name and enterprise business scope data; A data combination module, for combining the cleaned enterprise name and enterprise business scope data based on the middle category classification name of the national standard industry of the enterprise to be classified, so as to obtain an enterprise data combination corresponding to the enterprise to be classified; A generating module, used to generate a word bag of the enterprise data combination and a word vector of the word in the word bag of the enterprise data combination using a pre-generated word bag and a word vector of the word in the word bag; A prediction module, used to predict the sub-category classification result of the national standard industry corresponding to the enterprise data combination based on the word bag of the enterprise data combination and the word vectors of the words in the word bag of the enterprise data combination through the classification model of the national standard industry of the enterprise; A determination module, configured to determine the sub-category classification result of the national standard industry of the enterprise to be classified based on the sub-category classification result of the national standard industry corresponding to the enterprise data combination; Wherein, the device further comprises: The first word segmentation module is used to segment the sub-category classification description data in the national standard industry classification document by using a Chinese word segmentation tool to obtain the word segmentation result of the sub-category classification description data; A removal module, used to remove the stop words in the word segmentation result of the subcategory classification description data using a pre-configured stop word document, so as to obtain the word segmentation result after removing the stop words; A placement module, used for placing the words in the word segmentation result after removing the stop words after the middle category classification name of the national standard industry to which the subcategory classification description data belongs, so as to obtain a training sample of the classification model of the national standard industry of the enterprise; an associating module, used to use the serial number of the subclass classification name of the national standard industry to which the subclass classification description data belongs as subclass classification labeling data for training the classification model of the national standard industry of the enterprise, and associate the training sample with the subclass classification labeling data to construct a training set of the classification model of the national standard industry of the enterprise; An acquisition module, used to obtain sub-category classification prediction data of the national standard industry of the training sample through the classification model of the national standard industry of the enterprise to be trained, based on the word bag of the training sample and the word vectors of the words in the word bag of the training sample; The training module is used to train the classification model of the national standard industry of the enterprise to be trained based on the sub-category classification prediction data of the national standard industry of the training sample and the sub-category classification annotation data.

7. An electronic device, It is characterized in that The device comprises: one or more processors; A computer readable medium configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the classification method for the national standard industry of an enterprise as described in any one of claims 1 to 5.

8. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the national standard industry classification method for an enterprise as described in any one of claims 1 to 5 is implemented.