Capability classification method and device and electronic equipment
By adopting a two-way LSTM capsule network structure based on attention mechanism in AI capability classification, the problem of inaccurate AI capability classification in the prior art is solved, and higher text vector accuracy and feature capture capabilities are achieved.
Patent Information
- Application Number
- CN202310974480.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-03
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the classification of AI capabilities is inaccurate, which is mainly due to the large data volatility, resulting in unstable classification results.
Using a two-way LSTM capsule network structure based on attention mechanism, the distance between the ability submitted by the target organization and the reference ability among all capabilities is obtained, feature fusion and multi-dimensional feature extraction are performed, and the text vector is fitted through the capsule network to determine The ability category and probability to which it belongs.
It improves the accuracy and comprehensiveness of text vectors, enhances the ability to capture features, reduces the number of model training iterations, and optimizes the local information and global information extraction capabilities of text data by convolutional neural networks.
Smart Images

Figure CN119441932A_ABST
Abstract
Description
Background Art
[0002] Cloud network operations can collect the AI capabilities of each subsidiary, and then classify all reported AI capabilities into 5 domains, 12 scenarios and 46 capabilities.
[0003] In the related technology, K-Means algorithm or hierarchical clustering method can be used for classification. These algorithms usually adopt a method of setting a certain rule for classification, and the data volatility is large, so the classification is inaccurate. Summary of the invention
[0004] The purpose of the present disclosure is to provide a capability classification method, a capability classification device, an electronic device, and a computer-readable storage medium, thereby overcoming the problem of inaccurate capability classification caused by the limitations and defects of related technologies at least to a certain extent.
[0005] According to a first aspect of the present disclosure, a capability classification method is provided, comprising: obtaining a text to be processed and obtaining a text sentence vector corresponding to the text to be processed, wherein the text to be processed contains the capabilities submitted by a target organization; based on the distance between the capabilities submitted by the target organization and the reference capabilities among all capabilities, performing feature fusion on the text sentence vector to determine a text vector of the text to be processed; fitting the text vector through a capsule network to determine the capability category to which the text vector belongs and the probability corresponding to the capability category.
[0006] In an exemplary embodiment of the present disclosure, the text sentence vector is feature-fused based on the distance between the capability submitted by the target organization and a reference capability among all capabilities to determine the text vector of the text to be processed, including: determining a first distance between the capability submitted by the target organization and a first capability among all capabilities; determining a second distance between the capability submitted by the target organization and a second capability among all capabilities, and determining a third distance between the first capability and the second capability; and the text sentence vector is fused based on the first distance, the second distance, and the third distance to determine the text vector of the text to be processed.
[0007] In an exemplary embodiment of the present disclosure, the text sentence vectors are fused based on the first distance, the second distance and the third distance to determine the text vector of the text to be processed, including: mapping the first distance, the second distance and the third distance based on a Gaussian function to obtain a first intermediate distance and a second intermediate distance; normalizing the first intermediate distance and the second intermediate distance to obtain a normalization coefficient; based on the normalization coefficient, all text sentence vectors of the text to be processed are fused to determine an updated text sentence vector; and multi-dimensional feature extraction is performed on the updated text sentence vector to determine the text vector.
[0008] In an exemplary embodiment of the present disclosure, performing multi-dimensional feature extraction on the updated text sentence vector to determine the text vector includes: performing forward feature extraction on the updated text sentence vector to obtain a first intermediate text vector; performing reverse feature extraction on the updated text sentence vector to obtain a second intermediate text vector; and concatenating the first intermediate text vector and the second intermediate text vector to obtain the text vector.
[0009] In an exemplary embodiment of the present disclosure, the text vector is fitted by a capsule network to determine the ability category to which the text vector belongs and the probability corresponding to the ability category, including: spatially transforming the text vector based on an affine matrix to obtain a prediction vector; fusing the prediction vector to obtain a direction vector; wherein the length of the direction vector is used to represent the probability of the ability category to which the text vector belongs, and the direction of the direction vector is used to represent the characteristics of the ability category to which the text vector belongs.
[0010] In an exemplary embodiment of the present disclosure, the fusing of the prediction vectors to obtain the direction vector includes: performing weighted summation of the prediction vectors based on a coupling coefficient to determine an intermediate vector; and dynamically compressing the intermediate vector using a nonlinear activation function to normalize the intermediate vector to determine the direction vector.
[0011] In an exemplary embodiment of the present disclosure, the method further includes: updating the coupling coefficient using a dynamic routing algorithm to determine an updated coupling coefficient; and performing weighted summation on the prediction vectors according to the updated coupling coefficient to determine the intermediate vector.
[0012] In an exemplary embodiment of the present disclosure, the use of a dynamic routing algorithm to update the coupling coefficient includes: updating the logarithmic prior probability in combination with the direction vector, the logarithmic prior probability and the prediction vector; updating the coupling coefficient according to the updated logarithmic prior probability to obtain an updated coupling coefficient.
[0013] According to a second aspect of the present disclosure, a capability classification device is provided, including: a text acquisition module, used to acquire a text to be processed, wherein the text to be processed contains the capabilities submitted by a target organization; a vector extraction module, used to determine a text vector of the text to be processed based on the distance between the capabilities submitted by the target organization and a reference capability among all capabilities; and a capability category determination module, used to fit the text vector through a capsule network to determine the capability category to which the text vector belongs and the probability corresponding to the capability category.
[0014] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the capability classification methods described above by executing the executable instructions.
[0015] In the technical solution provided in the embodiments of the present disclosure, on the one hand, the text sentence vectors of the text to be processed can be fused according to the distance between the capabilities submitted by the target organization and the reference capabilities among all capabilities. Since the most relevant features can be captured based on the attention mechanism and the feature expression of invalid information can be suppressed, an accurate text vector can be obtained, thereby improving the accuracy and comprehensiveness of the text vector. On the other hand, since the text vector can be fitted through the capsule network to determine the capability category and probability to which the capability submitted by each target organization belongs, the accuracy and authenticity of the prediction results can be improved.
[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0018] Figure 1 A flowchart of a capability classification method in an embodiment of the present disclosure is schematically shown.
[0019] Figure 2A schematic diagram schematically illustrates capability classification in an embodiment of the present disclosure.
[0020] Figure 3 A schematic diagram schematically illustrates a network architecture in an embodiment of the present disclosure.
[0021] Figure 4 A schematic diagram schematically illustrates the Bi-LSTM network structure in an embodiment of the present disclosure.
[0022] Figure 5 A schematic diagram schematically illustrates a dynamic routing algorithm according to an embodiment of the present disclosure.
[0023] Figure 6 A schematic diagram schematically illustrates the description of the AI capabilities of each target organization in an embodiment of the present disclosure.
[0024] Figure 7 The block diagram of the capability classification device in the embodiment of the present disclosure is schematically shown.
[0025] Figure 8 The block diagram of the electronic device according to the embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0026] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0027] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0028] In some embodiments, the automation and intelligence of cloud network operations are the key points for thoroughly implementing the strategy of building a cyber power, building a high-speed, ubiquitous, space-ground integrated, cloud-network integrated, intelligent and agile, green and low-carbon, safe and controllable intelligent comprehensive digital information infrastructure, and practicing the digital transformation of cloud network operations lines.
[0029] Cloud network operation self-intelligence summarizes the needs of cloud network operation self-intelligence capability construction based on processes and scenarios. Unified AI capability management is the AI capability base for cloud network operation, supporting AI capability management, sedimentation and sharing, and supporting the construction of a cloud network AI big model with full professions and scenarios, covering networks, businesses, and customers, and realizing a multi-dimensional intention-driven self-intelligence closed loop. The intention self-intelligence center is a part of the cloud network operating system. The new construction target is completely consistent with the cloud network operating system, but the strategies, algorithms, models, etc. are scattered in individual systems, with low reusability, high operation and maintenance costs, and lack of unified AI capability views and unified evaluation standards. However, the AI needs of self-intelligence capabilities of various institutions are basically the same, and they need to be able to sediment AI capabilities as assets so that the entire network can quickly share and reuse them. The AI needs of digital cloud network operation self-intelligence, implementation blueprint, and three engineering implementation plans of service digitization, maintenance digitization, and cost digitization are mainly concentrated in 5 domains, 12 scenarios, and 46 capabilities of cloud network operation self-intelligence. Based on this, the AI capabilities of the 18 institutions collected can be classified into 5 domains, 12 scenarios, and 46 capabilities.
[0030] In some embodiments, the classification method may include: K-Means algorithm, hierarchical clustering method, etc. Among these classification methods, classification is usually performed by setting a certain rule, which has the defects of large data volatility and inaccurate classification. Although neural networks can extract features, traditional neural networks lack deep extraction and enhancement of feature data, and features cannot be reused at multiple levels.
[0031] In order to solve the above technical problems, a capability classification method is provided in the disclosed embodiment. In order to classify the AI capabilities provided by each target organization into 46 capabilities, a bidirectional LSTM capsule network structure based on the attention mechanism is proposed. This architecture improves the accuracy of classification, reduces the time of model training iteration, and optimizes the ability of ordinary convolutional neural networks to extract local and global information of text data, laying a strong foundation for the subsequent formulation of a unified capability assessment method to screen high-quality capabilities.
[0032] Next, refer to Figure 1 The capability classification method in the embodiment of the present disclosure is specifically described in detail as shown in FIG.
[0033] In step S110, the text to be processed is obtained, wherein the text to be processed includes the capabilities submitted by the target organization.
[0034] In the disclosed embodiments, the collected AI capabilities of multiple target organizations can be managed and classified. They can be processed by the voluntary self-intelligence center in the system kernel in the cloud network operating system. Specifically, an intelligent asset warehouse can be established in the voluntary self-intelligence center to provide a unified AI capability view for the entire network, record information such as AI capability functions, applicable scenarios, and application requirements, quickly match AI capability requirements, solve the problem of AI capability fragmentation, improve the reuse rate of AI capabilities, and reduce development costs. The text to be processed can be a descriptive text set composed of the capabilities submitted by each target organization, which is used to express the capabilities in the form of text descriptions. For example, based on deep learning technology, it supports automatic recognition of pictures of different scenes and returns the results of human portrait detection.
[0035] There can be multiple target organizations, which can be used to represent subsidiaries or departments, etc., and are limited according to actual needs. The target organizations can submit their corresponding capabilities, where the capabilities refer to AI capabilities. The AI capabilities in the embodiments of this disclosure can be divided into 5 domains, 12 scenarios, and 46 capabilities for cloud network operation and self-intelligence. Figure 2 As shown in the , the 5 domains include planning and construction, performance payment, operation and maintenance guarantee, network optimization and cost management. The 12 scenarios can include cloud network planning, cloud network construction, product launch, business marketing, business activation, perception improvement, monitoring and troubleshooting, routine inspection, cutover maintenance, cloud network data governance, network and business quality optimization, and four-cost management. Among them, cloud network planning can include demand forecasting and evaluation, solution planning and evaluation. Other capabilities can refer to Figure 3 As shown in , no further description is given here.
[0036] Each target organization can submit text data including the capabilities of the target organization, and the text data of all target structures can be integrated into a text data set as the text to be processed. The text to be processed can include relevant content of the asset description of each target organization, such as but not limited to the asset name, asset scenario description, and asset solution description.
[0037] In step S120, the text vector of the text to be processed is determined based on the distance between the capability submitted by the target institution and the reference capability among all the capabilities.
[0038] In the disclosed embodiment, all capabilities refer to 46 capabilities, and the reference capability may be the first capability and the second capability among the 46 capabilities, and the first capability and the second capability are different. The first capability may be any one of the 46 capabilities, and the second capability may be any capability different from the first capability. Exemplarily, the text vector of the text to be processed may be determined based on the first distance between the capability submitted by the target organization and the first capability, and the second distance between the capability submitted by the target organization and the second capability. Among them, firstly, the word embedding vector corresponding to the text to be processed may be generated as the text sentence vector Wi by using the Word2Vec word embedding model through the text embedding layer. In addition, the text sentence vector w1 corresponding to the first capability may be obtained, and the text sentence vector w2 corresponding to the second capability may be obtained.
[0039] Next, you can refer to Figure 3 The schematic diagram of the network architecture shown in the figure, the text sentence vector can be input into the attention layer Attention, so that the text sentence vector can be processed by the attention layer using the attention mechanism. The attention mechanism can adaptively capture the most relevant features based on the input text and suppress the feature expression of invalid information, so as to achieve different allocations of attention weights to the convolution channel. Exemplarily, the text sentence vector can first be input into the attention layer, and the first distance d1 between the capability submitted by the target organization and the first capability among all capabilities can be calculated based on the text sentence vector corresponding to the text to be processed and the text sentence vector of the first capability. Similarly, the second distance d2 between the capability submitted by the target organization and the second capability among all capabilities is calculated based on the text sentence vector corresponding to the text to be processed and the text sentence vector of the second capability. Among them, the first distance d1 and the second distance d2 are the distances between discrete elements. In addition, the third distance d3 between the first capability and the second capability can also be calculated.
[0040] Next, the text vector of the text to be processed can be determined based on the first distance, the second distance and the third distance. Specifically, the first distance, the second distance and the third distance can be mapped to obtain the first intermediate distance and the second intermediate distance. Specifically, a Gaussian function can be used to construct the distance between texts, and the first distance, the second distance and the third distance are logically combined and mapped to the Gaussian function to obtain the first intermediate distance G1 and the second intermediate distance G2. When obtaining the first intermediate distance and the second intermediate distance, the logical processing method of the first distance, the second distance and the third distance can be different. Mapping the first distance, the second distance and the third distance to the Gaussian function can be achieved by formula (1):
[0041]
[0042] Furthermore, the first intermediate vector and the second intermediate vector may be normalized to obtain a normalization coefficient. The normalization coefficient may be obtained by normalizing the sum of the first intermediate vector and the second intermediate vector using a softmax function, as shown in formula (2):
[0043] α=softmax(G1+G2) Formula (2)
[0044] On this basis, all text vectors of the processed text can be fused based on the normalization coefficient to obtain an updated text sentence vector. The fusion here can be a weighted summation to realize the attention layer to process the processed text, obtain an updated text sentence vector, and use the updated text sentence vector as the output of the attention layer. Specifically, the updated text sentence vector can be obtained by formula (3):
[0045] X' i =X i α Formula (3)
[0046] Among them, X i is the text sentence vector, X' i is the updated text sentence vector.
[0047] In the embodiment of the present disclosure, the text sentence features of the text to be processed are processed through the attention layer, and by introducing the attention mechanism, time series data with variable length can be better constructed, the ability of the network to capture features can be increased, and the accuracy of the features can be improved. The introduction of the attention mechanism can better construct time series data with variable length and increase the ability of the network to capture features.
[0048] Furthermore, after the attention layer outputs the updated text sentence vector, the updated text sentence vector can be input into the feature fusion layer Bi-LSTM (Bi-directional Long Short-Term Memory) to perform multi-dimensional feature extraction. Figure 4 As shown in the figure, the Bi-LSTM network is composed of two completely identical LSTM structures. The input text vector is used for multi-dimensional feature capture and learning in "forward order" and "reverse order". The network structure uses different parameters when extracting features in the forward and reverse directions. Finally, the forward extracted features and the reverse extracted features are concatenated, and the final data is output as input to the capsule network.
[0049] In some embodiments, forward feature extraction can be performed on the updated text sentence vector to obtain a first intermediate text vector; reverse feature extraction can be performed on the updated text sentence vector to obtain a second intermediate text vector; the first intermediate text vector and the second intermediate text vector are spliced to obtain a text vector. Exemplarily, the text vectors belonging to the same text in the first intermediate text vector and the second intermediate text vector can be spliced to obtain the text vector output by the Bi-LSTM network. For example, the forward LSTM is sequentially input with "A1", "A2", and "A3", and the first intermediate text vector obtained is {H1, H2, H3}; the reverse LSTM is sequentially input with "A3", "A2", and "A1", and the second intermediate text vector obtained is {H4, H5, H6}. After splicing the first intermediate text vector and the second intermediate text vector, {[H1, H6], [H2, H5], [H3, H4]} can be obtained.
[0050] Next, continue to refer to Figure 1 As shown in , in step S130, the text vector is fitted by a capsule network to determine the capability category to which the text vector belongs and the probability corresponding to the capability category.
[0051] In the disclosed embodiment, the text vector output by the Bi-LSTM network can be further input into the capsule network to fit the text vector through the capsule network to obtain the output result corresponding to the text vector. The text vector output by the Bi-LSTM network can be processed as the underlying capsule of the capsule network.
[0052] A capsule is a set of neuron vectors that use the capsule's length (norm) to represent the probability of the entity's existence, and use its direction to represent other instantiation parameters besides length, such as position, angle, size, etc.
[0053] refer to Figure 3 As shown in , the capsule network can include a main capsule and multiple digital capsules. The text vector output by the Bi-LSTM network can be used as the input of the main capsule, and the main capsule can be used to perform feature processing to obtain an output vector; the output vector can be further used as the input of multiple digital capsules, and the output vector can be processed by the digital capsules to convert the low-level feature vector into a high-level feature vector, and the processing result is normalized by a nonlinear activation function to obtain the prediction result of the text vector corresponding to the text to be processed. The prediction result can be a direction vector, wherein the length of the direction vector is used to indicate the ability category to which the text to be processed belongs, and the ability category can be one or more of the 46 abilities. The direction of the direction vector can be used to indicate the probability of each ability category.
[0054] In some embodiments, the text vector can be spatially transformed by the capsule network to obtain the prediction vector u j|i Furthermore, the prediction vectors are weighted and summed based on the coupling coefficient to determine the intermediate vector s j . Use the nonlinear activation function squash to transform the intermediate vector s j Dynamic compression is performed to normalize the intermediate vectors and determine the direction vector v j .
[0055] After obtaining the direction vector of the capability submitted by each target organization, the direction vectors of the capabilities submitted by all target organizations can be counted to determine the domain types corresponding to the capability categories to which all capabilities belong and the probabilities of the domain types. Figure 3 As shown in, among the capabilities submitted by the 18 target agencies, the probability that the domain category is planning and construction is 12%, the probability that the domain category is performance payment is 21%, the probability that the domain category is operation and maintenance guarantee is 58%, and the probability that the domain category is network optimization is 14%.
[0056] In some embodiments, in the process of sending the output of the bottom-level capsule to the high-level capsule, the correspondence between different capsules can be established by increasing the dimension in the process of converting the bottom-level capsule into the high-level capsule. Specifically, the bottom-level capsule needs to decide how to send its output vector to the high-level capsule. The bottom-level capsule can change the coupling coefficient, and the output vector of the bottom-level capsule is multiplied by the coupling coefficient and sent to the high-level capsule as the input of the high-level capsule. For the coupling coefficient, the weight represented by the coupling coefficient can be updated by a dynamic routing algorithm.
[0057] In some embodiments, reference Figure 5 The schematic diagram of the dynamic routing algorithm in Figure 1 shows that the process of updating the weights of the capsule network is mainly divided into four stages, including:
[0058] The first stage: the text vector is spatially transformed to obtain a prediction vector. For example, the text vector can be spatially transformed based on an affine matrix to determine the prediction vector u j|i Specifically, referring to formula (4), the text vector can be multiplied by the affine matrix to obtain the prediction vector:
[0059] u j|i =W ij u i Formula (4)
[0060] Among them, u i represents the bottom-level capsule (i=1,2,…,n)W ij Affine matrix representing positional relationship, u j|i Represents the prediction vector of the output.
[0061] Next, the predicted vectors can be fused to obtain the direction vector output by the capsule network. This process may include the following:
[0062] The second stage: weighted summing of the prediction vectors to determine the intermediate vector. For example, the prediction vectors may be weighted summed based on the coupling coefficient to determine the intermediate vector s j , refer to formula (5) for details:
[0063] s j =∑ i c ij u j|i Formula (5)
[0064] Among them, c ij is the coupling coefficient, satisfying ∑ i c ij = 1, the coupling coefficient can be updated according to the logarithmic prior probability b ij The coupling coefficient c ij represents the probability distribution of capsule i activating capsule j. The coupling coefficient is calculated as shown in formula (6):
[0065]
[0066] The third stage: the intermediate vector can be normalized to obtain the direction vector output by the capsule network. The capsule network converts the scalar form of each neuron into a direction vector for spatial position storage. The length of the vector represents the probability of the target's existence, and the direction of the vector represents the characteristics of the target. Finally, the information is encapsulated in the form of a capsule and output.
[0067] Exemplarily, the intermediate vector may be dynamically compressed using a nonlinear activation function to normalize the intermediate vector and determine the direction vector. The nonlinear activation function may be squash, and the intermediate vector may be dynamically compressed into a preset interval based on the nonlinear activation function, and the preset interval may be a (0,1) interval. The direction vector may be calculated as shown in formula (7):
[0068]
[0069] Phase 4: It should be noted that the coupling coefficient can be updated using a dynamic routing algorithm based on the current output direction vector, thereby re-determining the intermediate vector based on the updated coupling coefficient, further obtaining a new direction vector, and continuing to update the coupling coefficient based on the new direction vector until the update end condition is met. The update end condition can be the minimum loss function or the number of updates reaching the number threshold, which is not specifically limited here.
[0070] When updating the coupling coefficient, the direction vector, the logarithmic prior probability and the prediction vector can be combined to update the logarithmic prior probability; the coupling coefficient is updated according to the updated logarithmic prior probability to obtain the updated coupling coefficient. The updating process can be shown in formula (8):
[0071] b ij =b ij +v j u j|i Formula (8)
[0072] Among them, b ij Represents the logarithmic prior probability, and the initial value can be set to 0.
[0073] On this basis, a text set describing the AI capabilities of some target organizations can be selected to verify the prediction results in the disclosed embodiment according to the evaluation parameters. The evaluation parameters may include any one or more of accuracy (A), precision (P), recall (R), and F1 value.
[0074] refer to Figure 6 As shown in , the description text set can include asset description text. The asset description text can include asset scenario description and asset solution description. Text feature extraction can be performed on the asset description in the processed text to obtain a text sentence vector. The content extraction feature terms in the asset description are further mapped to 46 capability categories, and a total of 227 AI capabilities from 17 provinces are collected.
[0075] Text classification mainly uses the following four evaluation methods, and the calculation formulas are shown in formulas (9) to (11):
[0076]
[0077]
[0078]
[0079]
[0080] Among them, TP represents the number of samples that are both predicted and actual as positive, TN represents the number of samples that are both predicted and actual as negative; FN represents the number of samples that are actually positive and predicted as negative, FP represents the number of samples that are actually negative and predicted as positive, and F1 is an indicator that comprehensively considers precision and recall, as shown in Table 1.
[0081] Table 1
[0082] Same cluster Different clusters similar True positive (TP) False negative (FN) Different categories False positive (FP) True negative (TN)
[0083] Based on the above evaluation parameters, different methods are used to test on the data set. The experimental results are shown in Table 2:
[0084] Table 2
[0085] Classification Algorithms A P R F1 Bert 86.4% 79.3% 79.4% 0.82 RNN 85.3% 70% 80.4% 0.75 LSTM 88.9% 87.4% 81.5% 0.83 Our Proposed 90.5% 88.4% 87.3% 0.94
[0086] As can be seen from Table 2, the technical solution provided in the embodiment of the present disclosure achieves the highest F1 value on the data set, which is 14.6%, 25.3% and 13.3% higher than Bert, RNN and LSTM respectively. After analysis, when Bert is used for fine-tuning of downstream tasks, the [MASK] tag will not appear. It only appears in the pre-training task, which causes a mismatch between pre-training and fine-tuning. Due to the vanishing gradient of RNN, the time series of the RNN network cannot be too long. The RNN network can only have short-term memory and cannot support the memory of regular sequences. Its classification effect is not ideal. The LSTM network has a strong dependence on time and a relatively weak feature construction capability. The method provided in the embodiment of the present disclosure has the best text classification effect.
[0087] In the disclosed embodiment, the bidirectional LSTM capsule network structure based on the attention mechanism adaptively captures the most relevant features and suppresses the feature expression of invalid information according to the input text to be processed through the attention mechanism, realizes different distribution of attention weights for convolution channels, and further completes the centralized management and classification of the AI capabilities of the entire group through the capsule network. The introduction of the attention mechanism can better construct time series data with variable length, increase the ability of the network to capture features, and improve the accuracy and comprehensiveness of the updated text sentence vector. Further, by bidirectionally utilizing the features of the data through the bidirectional LSTM network, using memory units to increase the association between neurons in different layers, increasing the ability to predict and classify data, the accuracy of the text vector can be improved. Since the traditional convolutional neural network cannot retain the spatial features between data, and the pooling layer of the convolutional neural network will filter out some useful parameters, the capsule network in the disclosed embodiment uses the probability of the existence of the vector to encode the information output data to predict the probability of the existence of data features, which can improve the accuracy and comprehensiveness of the prediction results, and improve the accuracy and authenticity of the classification results.
[0088] The present disclosure also provides a capability classification device. Figure 7 As shown, the capability classification device 700 mainly includes the following modules:
[0089] A text acquisition module 701 is used to acquire a text to be processed, wherein the text to be processed includes the capabilities submitted by the target organization;
[0090] A vector extraction module 702, used to determine the text vector of the text to be processed based on the distance between the capability submitted by the target institution and the reference capability among all the capabilities;
[0091] The capability category determination module 703 is used to fit the text vector through a capsule network to determine the capability category to which the text vector belongs and the probability corresponding to the capability category.
[0092] In an exemplary embodiment of the present disclosure, the determining of the text vector of the text to be processed based on the distance between the capability submitted by the target organization and a reference capability among all capabilities includes: determining a first distance between the capability submitted by the target organization and a first capability among all capabilities; determining a second distance between the capability submitted by the target organization and a second capability among all capabilities, and determining a third distance between the first capability and the second capability; and determining the text vector of the text to be processed based on the first distance, the second distance and the third distance.
[0093] In an exemplary embodiment of the present disclosure, the text vector of the text to be processed is determined based on the first distance, the second distance and the third distance, including: mapping the first distance, the second distance and the third distance based on a Gaussian function to obtain a first intermediate distance and a second intermediate distance; normalizing the first intermediate distance and the second intermediate distance to obtain a normalization coefficient; based on the normalization coefficient, fusing all text sentence vectors of the text to be processed to determine an updated text sentence vector; performing multi-dimensional feature extraction on the updated text sentence vector to determine the text vector.
[0094] In an exemplary embodiment of the present disclosure, performing multi-dimensional feature extraction on the updated text sentence vector to determine the text vector includes: performing forward feature extraction on the updated text sentence vector to obtain a first intermediate text vector; performing reverse feature extraction on the updated text sentence vector to obtain a second intermediate text vector; and concatenating the first intermediate text vector and the second intermediate text vector to obtain the text vector.
[0095] In an exemplary embodiment of the present disclosure, the text vector is fitted by a capsule network to determine the ability category to which the text vector belongs and the probability corresponding to the ability category, including: spatially transforming the text vector based on an affine matrix to obtain a prediction vector; fusing the prediction vector to obtain a direction vector; wherein the length of the direction vector is used to represent the probability of the ability category to which the text vector belongs, and the direction of the direction vector is used to represent the characteristics of the ability category to which the text vector belongs.
[0096] In an exemplary embodiment of the present disclosure, the fusing of the prediction vectors to obtain the direction vector includes: performing weighted summation of the prediction vectors based on a coupling coefficient to determine an intermediate vector; and dynamically compressing the intermediate vector using a nonlinear activation function to normalize the intermediate vector to determine the direction vector.
[0097] In an exemplary embodiment of the present disclosure, the device further includes: updating the coupling coefficient using a dynamic routing algorithm to determine an updated coupling coefficient; and performing weighted summation on the prediction vectors according to the updated coupling coefficient to determine the intermediate vector.
[0098] In an exemplary embodiment of the present disclosure, the use of a dynamic routing algorithm to update the coupling coefficient includes: updating the logarithmic prior probability in combination with the direction vector, the logarithmic prior probability and the prediction vector; updating the coupling coefficient according to the updated logarithmic prior probability to obtain an updated coupling coefficient.
[0099] It should be noted that the specific details of each module in the above-mentioned capability classification device have been described in detail in the corresponding capability classification method, so they will not be repeated here.
[0100] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0101] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0102] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0103] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0104] Refer to the following Figure 8 The electronic device 800 according to this embodiment of the present disclosure is described. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0105] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
[0106] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 810 can perform the following steps: Figure 1 Follow the steps shown in .
[0107] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .
[0108] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0109] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0110] The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0111] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or an electronic device, etc.) to execute the method according to the implementation of the present disclosure.
[0112] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0113] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0114] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0115] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which 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. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0116] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0117] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0118] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0119] Other embodiments of the present disclosure will be readily apparent to those skilled in the art after considering the specification and practicing the inventions invented herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not invented by the present disclosure. The specification and examples are to be considered merely exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A capability classification method, characterized in that: include: Obtaining a text to be processed and a text sentence vector corresponding to the text to be processed, wherein the text to be processed includes the capabilities submitted by the target organization; Based on the distance between the capability submitted by the target institution and the reference capability among all the capabilities, feature fusion is performed on the text sentence vector to determine the text vector of the text to be processed; The text vector is fitted through a capsule network to determine the capability category to which the text vector belongs and the probability corresponding to the capability category.
2. The capability classification method according to claim 1, characterized in that: The step of performing feature fusion on the text sentence vector based on the distance between the capability submitted by the target organization and the reference capability among all the capabilities to determine the text vector of the text to be processed includes: determining a first distance between the capability submitted by the target institution and a first capability among all capabilities; determining a second distance between the capability submitted by the target institution and a second capability among all the capabilities, and determining a third distance between the first capability and the second capability; The text sentence vectors are fused based on the first distance, the second distance, and the third distance to determine the text vector of the text to be processed.
3. The capability classification method according to claim 2, characterized in that: The fusing the text sentence vector based on the first distance, the second distance, and the third distance to determine the text vector of the text to be processed includes: Mapping the first distance, the second distance, and the third distance based on a Gaussian function to obtain a first intermediate distance and a second intermediate distance; Normalizing the first intermediate distance and the second intermediate distance to obtain a normalization coefficient; Based on the normalization coefficient, all text sentence vectors of the text to be processed are merged to determine an updated text sentence vector; The updated text sentence vector is subjected to multi-dimensional feature extraction to determine the text vector.
4. The capability classification method according to claim 3, characterized in that: The step of performing multi-dimensional feature extraction on the updated text sentence vector to determine the text vector includes: Performing forward feature extraction on the updated text sentence vector to obtain a first intermediate text vector; Performing reverse feature extraction on the updated text sentence vector to obtain a second intermediate text vector; The first intermediate text vector and the second intermediate text vector are concatenated to obtain the text vector.
5. The capability classification method according to claim 1, characterized in that: The step of fitting the text vector by using a capsule network to determine the capability category to which the text vector belongs and the probability corresponding to the capability category includes: Performing spatial transformation on the text vector based on an affine matrix to obtain a prediction vector; The prediction vectors are fused to obtain a direction vector, wherein the length of the direction vector is used to represent the probability of the capability category to which the text vector belongs, and the direction of the direction vector is used to represent the characteristics of the capability category to which the text vector belongs.
6. The capability classification method according to claim 5, characterized in that: The step of fusing the prediction vectors to obtain a direction vector includes: Performing weighted summation on the prediction vectors based on the coupling coefficient to determine an intermediate vector; The intermediate vector is dynamically compressed by using a nonlinear activation function to normalize the intermediate vector and determine the direction vector.
7. The capability classification method according to claim 6, characterized in that: The method further comprises: The coupling coefficient is updated by using a dynamic routing algorithm to determine an updated coupling coefficient; The prediction vectors are weighted summed according to the updated coupling coefficients to determine the intermediate vector.
8. The capability classification method according to claim 7, characterized in that: The updating of the coupling coefficient by using a dynamic routing algorithm includes: In combination with the direction vector, the logarithmic prior probability and the prediction vector, the logarithmic prior probability is updated; The coupling coefficient is updated according to the updated logarithmic prior probability to obtain an updated coupling coefficient.
9. A capability classification device, characterized in that: include: A text acquisition module, used to acquire a text to be processed and a text sentence vector corresponding to the text to be processed, wherein the text to be processed includes the capabilities submitted by the target organization; A vector extraction module, used for performing feature fusion on the text sentence vector based on the distance between the capability submitted by the target organization and the reference capability among all the capabilities, and determining the text vector of the text to be processed; The capability category determination module is used to fit the text vector through a capsule network to determine the capability category to which the text vector belongs and the probability corresponding to the capability category.
10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the capability classification method according to any one of claims 1 to 8 by executing the executable instructions.