AI-based multi-scene text intelligent recommendation and automatic generation method and system
By combining capsule dynamic routing networks and reserve pool networks, the problem of insufficient semantic understanding in existing recruitment text recommendation systems is solved, achieving a deep understanding and accurate expression of recruitment needs, improving the quality and adaptability of text generation, and meeting the specific needs of different industries and positions.
Patent Information
- Application Number
- CN202511155991.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-08-18
AI Technical Summary
Existing intelligent recommendation and generation technologies for recruitment texts lack deep semantic and industry-specific knowledge understanding, resulting in significant deviations between recommendation results and actual needs. Furthermore, they lack effective quality assessment and optimization mechanisms, making it difficult to adapt to the specific requirements of different industries and positions.
A multi-level feature extraction structure is constructed using a capsule dynamic routing network. Hierarchical semantic vectors are generated through hierarchical feature extraction and dynamic combination. Feature selection is performed by combining variance contribution calculation and multi-level attention mechanism. An interactive fusion mechanism is established, and state iteration and sampling processing are performed using a reserve pool network. The model parameters are dynamically adjusted and optimized based on user feedback.
It improves the relevance and accuracy of recommended texts, enhances the relevance and quality of texts, achieves adaptive optimization of the text generation process, and improves the overall performance of the system and user satisfaction.
Smart Images

Figure CN120653768B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of text generation, and in particular to a multi-scene text intelligent recommendation and automatic generation method and system based on AI. BACKGROUND
[0002] With the development of informationization of human resource management, the intelligent generation and recommendation of recruitment texts are increasingly valued. In the traditional recruitment process, the writing of recruitment texts often relies on manual experience, which is time-consuming and laborious and of uneven quality. In recent years, with the development of artificial intelligence technology, AI-based text generation and recommendation systems have gradually been applied to the recruitment field, assisting human resource professionals in efficiently generating recruitment texts that meet the needs through learning and analyzing historical recruitment texts. Currently, mainstream technologies are mainly based on natural language processing, machine learning, etc., retrieving similar cases from historical data or directly generating new recruitment texts through understanding and analyzing recruitment needs.
[0003] However, the existing technology still has obvious deficiencies in the intelligent recommendation and generation of recruitment texts. The existing methods have a one-sided understanding of recruitment needs, often only focusing on surface keyword matching and lacking understanding of deep semantics and industry-specific knowledge, resulting in a large deviation between the recommended results and actual needs. The existing recommendation systems usually use simple feature extraction and matching algorithms, which are difficult to capture the hierarchical structure and multi-dimensional features in recruitment texts, making the generated content lack professionalism and pertinence. The existing technology lacks effective quality evaluation and optimization mechanisms, and cannot dynamically adjust according to user feedback, making it difficult for the system to continuously improve the recommendation quality and adapt to the specific requirements of different industries and positions. SUMMARY
[0004] The present application provides a multi-scene text intelligent recommendation and automatic generation method and system based on AI, which can solve the problems in the prior art.
[0005] In a first aspect of the present application, a multi-scene text intelligent recommendation and automatic generation method based on AI is provided, comprising:
[0006] Performing word segmentation and named entity recognition processing on the recruitment demand information, extracting position description entity information, and forming structured demand features; performing similarity matching of the structured demand features in a historical recruitment text database to obtain an initial candidate text set;
[0007] Using a capsule dynamic routing network to construct a multi-level feature extraction structure, performing hierarchical feature extraction and dynamic combination on the initial candidate text set, and generating hierarchical semantic vectors;
[0008] Based on the hierarchical semantic vector, the feature importance is calculated by variance contribution degree, and the feature selection is performed combined with the multi-layer attention mechanism, an interactive fusion mechanism is established between the correlation features and the quality evaluation features, and a fusion feature vector is obtained;
[0009] The reserve pool network is constructed for the fusion feature vector to perform state iteration and sampling processing, a layered decoder is used to realize the conversion from the feature space to the text space, and an initial recommended text is obtained;
[0010] The initial recommended text is subjected to normative scoring and optimized rewriting to generate a final recommended text; and according to the user feedback information of the final recommended text, the network is dynamically adjusted to realize the iterative optimization of the model parameters.
[0011] In an optional embodiment, a capsule dynamic routing network is used to construct a multi-level feature extraction structure, and hierarchical feature extraction and dynamic combination are performed on an initial candidate text set to generate a hierarchical semantic vector, including:
[0012] The initial candidate text set is input into a bottom layer capsule network, the bottom layer capsule network uses a bidirectional GRU structure to map the initial candidate text set into an initial capsule vector group, and each capsule vector in the initial capsule vector group contains position encoding information and semantic encoding information;
[0013] An information entropy feature value is obtained by calculating the inner product distribution of the initial capsule vector group and the capsule vector mean center, and an adaptive weight function is constructed based on the information entropy feature value to dynamically adjust the coupling coefficient between adjacent capsule layers to obtain a dynamic coupling coefficient;
[0014] The initial capsule vector group is mapped to a high-dimensional feature space by using a transformation matrix, and the dynamic coupling coefficient is combined to perform feature reorganization to obtain a high-level capsule vector, and a residual error transmission path is established between the high-level capsule vector and the initial capsule vector group;
[0015] Nonlinear activation fusion is performed on the high-level capsule vector and the initial capsule vector transmitted through the residual error transmission path to obtain a fusion capsule vector, and the fusion capsule vector is input into the next layer of capsule network, and after recursive iteration, a hierarchical semantic vector is output.
[0016] In an optional embodiment, an information entropy feature value is obtained by calculating the inner product distribution of the initial capsule vector group and the capsule vector mean center, and an adaptive weight function is constructed based on the information entropy feature value to dynamically adjust the coupling coefficient between adjacent capsule layers to obtain a dynamic coupling coefficient, including:
[0017] Perform an inner product operation on each capsule vector in the initial capsule vector group and the mean center of the capsule vector of the current batch to obtain the capsule vector inner product. The capsule vector inner product is converted into a conditional probability distribution through a probability normalization function. The information entropy eigenvalue of the initial capsule vector group is obtained based on the cross entropy calculation of the conditional probability distribution.
[0018] Constructing an adaptive weight function based on the information entropy eigenvalue, performing a negative exponential transformation on the information entropy eigenvalue through a learnable scaling factor and adjusting it through a normalization coefficient to obtain an adaptive weight coefficient;
[0019] Performing a dot product operation on the current layer capsule vector of the initial capsule vector group and the next layer capsule vector to obtain a capsule vector routing probability, performing accumulation and normalization operations on the capsule vector routing probability to obtain an initial routing coefficient;
[0020] Multiplying the adaptive weight coefficient by the initial routing coefficient to obtain a dynamic coupling coefficient, and performing weighted combination on the capsule vector of the current layer to obtain a routing fusion feature;
[0021] The ratio of the square of the modulus length of the routing fusion feature to the unit value is calculated to obtain a modulus length ratio, the modulus length ratio is multiplied by the unit vector of the routing fusion feature to obtain a normalized feature, and the normalized feature is processed by a nonlinear compression function to obtain a capsule vector of the next layer.
[0022] In an optional embodiment, based on the hierarchical semantic vector, feature importance is calculated by variance contribution and feature selection is performed in combination with a multi-layer attention mechanism. An interactive fusion mechanism is established between the correlation feature and the quality assessment feature. The fused feature vector obtained includes:
[0023] Calculate the variance contribution of each dimension feature of the hierarchical semantic vector, determine the feature importance coefficient based on the variance contribution, and generate a feature importance matrix;
[0024] Performing a three-layer attention calculation on the feature importance matrix, generating an attention weight distribution by multiplying a query matrix, a key value matrix, and a value matrix, and weightedly recombining the features according to the attention weight distribution to obtain a correlation feature vector;
[0025] Selectively transfer features of the correlation feature vector, determine the propagation probability through the temporal dependency between features, calculate the feature importance score based on the propagation probability, and dynamically adjust the control parameters. After multi-level attention calculation, a quality assessment feature vector is obtained.
[0026] mapping the correlation feature vector and the quality evaluation feature vector to a unified feature space through a feature transformation matrix, calculating a cosine distance between the feature vectors to obtain a cross-task attention coefficient, performing feature fusion according to the cross-task attention coefficient to obtain an interaction feature vector;
[0027] optimizing the interaction feature vector in an adversarial training manner to obtain a fusion feature vector.
[0028] In an optional embodiment, selective feature transmission is performed on the correlation feature vector, a propagation probability is determined through a time sequence dependency relationship between features, a feature importance score is calculated based on the propagation probability to dynamically adjust a control parameter, and a quality evaluation feature vector is obtained through multi-level attention calculation, including:
[0029] calculating a conditional entropy between features in each dimension of the correlation feature vector to determine feature dependency strength, establishing a connection relationship for a feature node with feature dependency strength greater than a preset strength threshold, and generating a feature dependency adjacency matrix;
[0030] based on the feature dependency adjacency matrix, combining a time sequence arrangement order of historical features, calculating a feature propagation probability through feature dependency strength and time sequence distance to obtain a time sequence propagation matrix;
[0031] using the time sequence propagation matrix, weighting calculation is performed on the propagation probability of the new input feature and the historical feature to obtain a feature importance score;
[0032] according to the feature importance score, dynamically adjusting an input control parameter through a forward mapping mechanism, and dynamically adjusting a forgetting control parameter through a backward mapping mechanism to form a dynamic selection sequence;
[0033] inputting the dynamic selection sequence into a multi-layer adaptive weight adjustment unit to perform weighted fusion on the feature importance score and the propagation probability to generate a quality evaluation feature vector.
[0034] In an optional embodiment, a reserve pool network is constructed for the fusion feature vector to perform state iteration and sampling processing, a feature space is converted to a text space through a hierarchical decoder to obtain an initial recommended text, including:
[0035] constructing a local density distribution matrix of the fusion feature vector, using the local density distribution matrix to establish a reserve pool network, performing neuron activation processing on the reserve pool network to obtain a state weight;
[0036] inputting the fusion feature vector into the reserve pool network to form an initial state, constructing a historical state record matrix through iterative calculation and extracting a stable state interval to obtain a reserve pool state matrix; performing state node screening and connectivity verification on the reserve pool state matrix to obtain a sampling trajectory;
[0037] constructing a text feature space and establishing a feature text mapping dictionary, inputting the sampling trajectory into a hierarchical decoder, and obtaining a feature mapping result through semantic dependence extraction and adversarial optimization;
[0038] screening the feature mapping result to obtain a candidate text, adjusting echo sampling parameters according to a semantic correlation degree between the candidate text and the fusion feature vector, and obtaining an initial recommended text.
[0039] In an optional embodiment, the fusion feature vector is input into the reservoir network to form an initial state, a history state record matrix is constructed through iterative calculation, and a stable state interval is extracted to obtain a reservoir state matrix; state node screening and connectivity verification are performed on the reservoir state matrix to obtain a sampling trajectory, including:
[0040] inputting the fusion feature vector into the reservoir network, establishing a corresponding mapping relationship, calculating an activation state value of each network node, and generating an initial network state;
[0041] constructing a state history record matrix, storing the initial network state in the first row of the state history record matrix, performing iterative calculation on the initial network state based on a recursive connection weight matrix, and storing the network state obtained each time in the state history record matrix in turn until a preset number of iterations is completed;
[0042] calculating a state difference value between adjacent state rows in the state history record matrix, determining a stable state interval according to the state difference value, and extracting the network state corresponding to the stable state interval to construct a reservoir state matrix;
[0043] selecting a state node with a response intensity exceeding a preset intensity threshold in the reservoir state matrix, generating a state node index sequence, extracting the corresponding state value from the reservoir state matrix according to the state node index sequence, and constructing a sampling sequence;
[0044] verifying the state connectivity of adjacent sampling points in the sampling sequence, eliminating sampling points that do not satisfy the state transition condition, and arranging them in time sequence to form a sampling trajectory.
[0045] In a second aspect of the embodiment of the application, a multi-scene text intelligent recommendation and automatic generation system based on AI is provided, including:
[0046] The first unit is configured to perform word segmentation and named entity recognition processing on the recruitment demand information, extract position description entity information, form structured demand features, and perform similarity matching on the structured demand features in a historical recruitment text database to screen an initial candidate text set.
[0047] The second unit is configured to construct a multi-level feature extraction structure by using a capsule dynamic routing network, perform hierarchical feature extraction and dynamic combination on the initial candidate text set, and generate hierarchical semantic vectors.
[0048] The third unit is configured to calculate feature importance by variance contribution degree and perform feature selection by combining a multi-layer attention mechanism based on the hierarchical semantic vectors, establish an interactive fusion mechanism between the correlation features and the quality evaluation features, and obtain a fusion feature vector.
[0049] The fourth unit is configured to perform state iteration and sampling processing on the fusion feature vector by using a reservoir network, convert the feature space to the text space by using a hierarchical decoder, and obtain an initial recommended text.
[0050] The fifth unit is configured to perform normative scoring and optimization rewriting on the initial recommended text, generate a final recommended text, and dynamically adjust the network based on user feedback information of the final recommended text to realize iterative optimization of model parameters.
[0051] In a third aspect, an electronic device is provided, including:
[0052] a processor;
[0053] a memory for storing processor-executable instructions;
[0054] The processor is configured to invoke the instructions stored in the memory to execute the method described above.
[0055] In a fourth aspect, a computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.
[0056] In the embodiment of the application, by performing word segmentation and named entity recognition processing on the recruitment demand information, and by using the multi-level feature extraction structure constructed by the capsule dynamic routing network, deep understanding and accurate expression of the text semantics are realized, the relevance and accuracy of the recommended text are effectively improved, and the problem of shallow semantic understanding in the traditional text recommendation method is solved. BRIEF DESCRIPTION OF DRAWINGS
[0057] Figure 1 A flowchart of an AI-based multi-scenario text intelligent recommendation and automatic generation method according to an embodiment of the present application is shown in FIG. 1.
[0058] Figure 2 A comparison chart of the performance influence of different scaling factors is shown in FIG. 3.
[0059] Figure 3 A visualization effect chart of the time sequence propagation matrix is shown in FIG. 4. DETAILED DESCRIPTION
[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the protection scope of the present application.
[0061] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.
[0062] Figure 1 A flowchart of an AI-based multi-scenario text intelligent recommendation and automatic generation method according to an embodiment of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the method comprises the following steps.
[0063] The recruitment demand information is subjected to word segmentation and named entity recognition processing, the position description entity information is extracted, and the structured demand features are formed. The structured demand features are subjected to similarity matching in a historical recruitment text database, and an initial candidate text set is obtained through screening.
[0064] A multi-level feature extraction structure is constructed by using a capsule dynamic routing network, the initial candidate text set is subjected to hierarchical feature extraction and dynamic combination, and a hierarchical semantic vector is generated.
[0065] Based on the hierarchical semantic vector, the feature importance is calculated by variance contribution, the feature selection is performed in combination with a multi-layer attention mechanism, an interactive fusion mechanism is established between the correlation features and the quality evaluation features, and a fusion feature vector is obtained.
[0066] The fusion feature vector is subjected to state iteration and sampling processing by using a reservoir network, the conversion from the feature space to the text space is realized by using a hierarchical decoder, and an initial recommended text is obtained.
[0067] The initial recommended text is scored and optimized to generate a final recommended text; and the network is dynamically adjusted according to user feedback information of the final recommended text to realize iterative optimization of model parameters.
[0068] In an optional embodiment, a multi-level feature extraction structure is constructed by using a capsule dynamic routing network, and initial candidate text sets are subjected to hierarchical feature extraction and dynamic combination to generate hierarchical semantic vectors, including:
[0069] The initial candidate text sets are input into a bottom layer capsule network, the bottom layer capsule network uses a bidirectional GRU structure to map the initial candidate text sets into an initial capsule vector group, and each capsule vector in the initial capsule vector group contains position encoding information and semantic encoding information;
[0070] An information entropy feature value is obtained by calculating the inner product distribution of the initial capsule vector group and the capsule vector mean center, an adaptive weight function is constructed based on the information entropy feature value to dynamically adjust the coupling coefficient between adjacent capsule layers, and a dynamic coupling coefficient is obtained;
[0071] The initial capsule vector group is mapped to a high-dimensional feature space by using a transformation matrix, and the dynamic coupling coefficient is combined to perform feature recombination to obtain a high-level capsule vector, and a residual error transmission path between the high-level capsule vector and the initial capsule vector group is established;
[0072] Nonlinear activation fusion is performed on the high-level capsule vector and the initial capsule vector transmitted through the residual error transmission path to obtain a fusion capsule vector, and the fusion capsule vector is input into a next layer capsule network, and after recursive iteration, a hierarchical semantic vector is output.
[0073] In one specific implementation, the initial candidate text set is input to a bottom capsule network for processing. The bottom capsule network adopts a bidirectional GRU structure, including a forward GRU and a backward GRU for processing information in two directions. For each text sequence in the input initial candidate text set, the text sequence is converted into a word vector sequence. For example, if the text contains n words, each word has a vector dimension of d, and an nxd matrix is obtained. The bidirectional GRU structure processes the matrix from the forward and reverse directions respectively. The forward GRU starts from the first word, reads the vector representation of each word in turn, and updates the hidden state; the backward GRU starts from the last word and processes the sequence in reverse order. For the i-th word in the text, the forward hidden state is h_forward_i, with a dimension of h; the backward hidden state is h_backward_i, also with a dimension of h. By concatenating the two hidden states, the complete representation of the word [h_forward_i; h_backward_i] is obtained, with a dimension of 2h. In this way, for a text sequence with a length of n, n 2h-dimensional vectors can be obtained to form an initial capsule vector group. Each capsule vector not only contains semantic encoding information of the word, but also contains position encoding information of the word in the sequence. For example, for a text containing "artificial intelligence technology is widely used", the capsule vector of the word "artificial" encodes both its semantic information and its position information as the first word in the sentence after bidirectional GRU processing.
[0074] Next, the information entropy feature value is calculated by calculating the inner product distribution of the initial capsule vector group and the mean center of the capsule vector. Specifically, first, the mean vector of the initial capsule vector group is calculated, that is, the arithmetic mean of all capsule vectors. Assuming that there are n initial capsule vectors v_1, v_2, …, v_n, each vector has a dimension of 2h, then the mean vector v_mean = (v_1 + v_2 + … + v_n) / n. Then, the inner product of each initial capsule vector and the mean vector is calculated to obtain a group of scalar values s_1, s_2, …, s_n, where s_i = v_i·v_mean. The group of inner product values is normalized to obtain a probability distribution p_1, p_2, …, p_n, where p_i = exp(s_i) / (exp(s_1) + exp(s_2) + … + exp(s_n)). Based on the probability distribution, the information entropy H = -(p_1×log(p_1) + p_2×log(p_2) + … + p_n×log(p_n)) is calculated. The information entropy feature value H reflects the dispersion degree of the initial capsule vector group. The larger the value, the more dispersed the vector distribution; the smaller the value, the more concentrated the vector distribution. For example, for a text containing 5 capsule vectors, if the normalized inner product probability distribution is [0.1, 0.2, 0.4, 0.2, 0.1], the information entropy feature value is about 1.361.
[0075] An adaptive weight function is constructed based on the information entropy eigenvalue, which is used to dynamically adjust the coupling coefficient between adjacent capsule layers. A nonlinear function f(H) = 1 / (1+exp(-a×(H-b))) is designed, where a and b are adjustable parameters, which can be set to a = 2.0 and b = 1.5 in practice. The function maps the information entropy to the interval (0, 1) as an adjustment factor. For each pair of vectors v_i and v_j in the initial capsule vector group, the initial coupling coefficient c_ij between them is calculated as c_ij = cos(v_i, v_j), that is, the cosine similarity of the two vectors. Then the dynamic coupling coefficient c'_ij is adjusted by the adaptive weight function as c'_ij = c_ij × (1 - f(H)) + f(H) × (v_i·v_j) / (||v_i|| × ||v_j||). When the information entropy is large, f(H) is close to 1, and more dependence is given to the dot product relationship between vectors; when the information entropy is small, f(H) is close to 0, and more original cosine similarity information is retained. For example, when the information entropy H = 1.361 is calculated, the adjustment factor obtained by substituting the function f(H) is about 0.37, and if the initial coupling coefficient of two capsule vectors is 0.8, the adjusted dynamic coupling coefficient is about 0.71.
[0076] The initial capsule vector group is mapped to a high-dimensional feature space using a transformation matrix. For each initial capsule vector v_i, a transformation matrix W with a dimension of 2h × d' is used to map it to v'_i = v_i × W, where d' is the dimension of the high-dimensional feature space, which can be set to 128 in practice. The dynamic coupling coefficient is combined to recombine the features, and the high-level capsule vector u_j = sum(c'_ij × v'_i) is obtained, that is, the weighted sum of all transformed initial capsule vectors, and the weight is the dynamic coupling coefficient. At the same time, a residual transmission path is established between the high-level capsule vector and the initial capsule vector group, and the initial capsule vector v_i is mapped to the same dimension space as the high-level capsule vector through a linear transformation matrix W_res to obtain the residual vector r_i = v_i × W_res.
[0077] The nonlinear activation fusion is performed on the high-level capsule vector and the initial capsule vector transmitted through the residual transmission channel. The high-level capsule vector u_j is added to the residual vector r_i, and then processed by a nonlinear activation function to obtain a fusion capsule vector f_j = ReLU(u_j + r_i), wherein ReLU is a rectified linear unit activation function defined as max(0, x). The fusion capsule vector is input to the next layer of the capsule network, and after recursive iteration processing, a hierarchical semantic vector is finally output. In practical applications, for a document containing 100 words, the initial vector dimension of each word is 300, and after the above processing, a hierarchical semantic vector with a dimension of 512 can be obtained, which effectively captures the multi-level semantic structure information of the text.
[0078] In an optional embodiment, an information entropy feature value is obtained by calculating the inner product distribution of the initial capsule vector group and the mean center of the capsule vectors, and an adaptive weight function is constructed based on the information entropy feature value to dynamically adjust the coupling coefficient between adjacent capsule layers to obtain a dynamic coupling coefficient, including:
[0079] Each capsule vector in the initial capsule vector group is subjected to inner product operation with the mean center of the capsule vectors in the current batch to obtain a capsule vector inner product, the capsule vector inner product is converted into a conditional probability distribution through a probability normalization function, and an information entropy feature value of the initial capsule vector group is obtained based on the cross entropy calculation of the conditional probability distribution;
[0080] An adaptive weight function is constructed based on the information entropy feature value, the information entropy feature value is subjected to negative exponential transformation through a learnable scaling factor and adjusted through a normalization coefficient to obtain an adaptive weight coefficient;
[0081] The current layer capsule vector of the initial capsule vector group and the next layer capsule vector are subjected to dot product operation to obtain a capsule vector routing probability, and the capsule vector routing probability is subjected to accumulation and normalization operation to obtain an initial routing coefficient;
[0082] The adaptive weight coefficient is multiplied by the initial routing coefficient to obtain a dynamic coupling coefficient, and the current layer capsule vector is weighted and combined to obtain a routing fusion feature;
[0083] The ratio of the square of the module length of the routing fusion feature to the unit value is calculated to obtain a module length ratio, the module length ratio is multiplied by the unit vector of the routing fusion feature to obtain a normalized feature, and the normalized feature is processed through a nonlinear compression function to obtain the next layer capsule vector.
[0084] In one specific implementation, an initial capsule vector set is obtained, assuming that the initial capsule vector set contains n capsule vectors with dimension d, denoted as V = {v1, v2, …, vn}, where each capsule vector vi is a d-dimensional vector. The mean center μ of all capsule vectors in the current batch is calculated, specifically, the sum of all capsule vectors is divided by the number of vectors n, and μ = (v1+ v2+ …+ vn) / n is obtained.
[0085] The inner product of each capsule vector vi and the mean center μ is calculated to obtain the inner product value si = vi·μ, and the inner product set S = {s1, s2, …, sn} is formed. In one specific example, assume that there are three 4-dimensional capsule vectors: v1= [0.2, 0.3, 0.1, 0.4], v2= [0.1, 0.5, 0.2, 0.2], and v3= [0.3, 0.1, 0.4, 0.2]. The mean center μ = [0.2, 0.3, 0.233, 0.267] is calculated, and then the inner product values s1= 0.28, s2= 0.25, and s3= 0.27 are calculated.
[0086] The inner product set S is converted into a conditional probability distribution P = {p1, p2, …, pn} by a probability normalization function. Specifically, a softmax function is applied to each inner product value si, i.e., pi= exp(si) / ∑exp(sj), where j ranges from 1 to n. In the above example, after applying the softmax function, p1= 0.36, p2= 0.31, and p3= 0.33 are obtained.
[0087] Based on the conditional probability distribution P, the information entropy feature value H is calculated, specifically, H = -∑(pi × log(pi)), where i ranges from 1 to n. In the above example, the calculated information entropy feature value H = 1.097.
[0088] Next, based on the information entropy feature value H, an adaptive weight function is constructed, and a learnable scaling factor α and a normalization coefficient β are introduced to perform negative exponential transformation on the information entropy feature value to obtain an adaptive weight coefficient w = β × exp(-α × H). Assuming that α = 0.5 and β = 2, then in the above example, the adaptive weight coefficient w = 2 × exp(-0.5 × 1.097) = 0.6702.
[0089] The dot product of the current layer capsule vectors of the initial capsule vector group and the next layer capsule vectors is calculated to obtain a capsule vector routing probability. Assuming that the current layer has n capsule vectors and the next layer has m capsule vectors, for the i-th capsule vector vi of the current layer and the j-th capsule vector uj of the next layer, the dot product pij = vi·uj is calculated to form a routing probability matrix P = {pij}, i from 1 to n, and j from 1 to m.
[0090] An accumulation and normalization operation is performed on the routing probability matrix P to obtain an initial routing coefficient matrix C = {cij}, specifically, the softmax function is applied to each row i, that is, cij = exp(pij) / ∑exp(pik), where k from 1 to m. Taking an example, assuming that n = 3, m = 2, and the routing probability matrix P = [[0.6, 0.3], [0.4, 0.7], [0.5, 0.5]], the initial routing coefficient matrix C = [[0.58, 0.42], [0.42, 0.58], [0.5, 0.5]] is obtained after applying the softmax function.
[0091] The adaptive weight coefficient w is multiplied by the initial routing coefficient matrix C to obtain a dynamic coupling coefficient matrix D = {dij}, where dij = w × cij. In the above example, w = 0.6702, and the dynamic coupling coefficient matrix D = [[0.389, 0.281], [0.281, 0.389], [0.335, 0.335]].
[0092] The current layer capsule vectors are combined by weighting to obtain a routing fusion feature. For the j-th capsule vector uj of the next layer, uj = ∑(dij × vi) is calculated, where i from 1 to n. Assuming that the capsule vectors of the current layer are v1 = [0.2, 0.3, 0.1, 0.4], v2 = [0.1, 0.5, 0.2, 0.2], and v3 = [0.3, 0.1, 0.4, 0.2], the two capsule vectors u1 = [0.199, 0.283, 0.231, 0.271] and u2 = [0.201, 0.317, 0.235, 0.263] of the next layer are calculated using the dynamic coupling coefficient D.
[0093] The ratio of the squared length of the routing fusion feature to the unit value is calculated to obtain a length ratio. For the fusion feature uj, the squared length ||uj||2 is calculated, and the unit value is set to 1, and the length ratio rj = ||uj||2 / 1. Taking u1 as an example, ||u1||2 = 0.1992 + 0.2832 + 0.2312 + 0.2712 = 1.285. 2 2 2 2 2 , the length ratio r1 = ||u1||2 / 1 = 1.285.2 +0.271 2 = 0.245, module length ratio r1 = 0.245.
[0094] Multiply the modulus ratio rj by the unit vector uj / ||uj|| of the route fusion feature uj to obtain the normalized feature u'j = rj × (uj / ||uj||). Taking u1 as an example, the unit vector u1 / ||u1|| = [0.402, 0.572, 0.467, 0.548], and the normalized feature u'1 = 0.245 × [0.402, 0.572, 0.467, 0.548] = [0.098, 0.140, 0.114, 0.134].
[0095] The normalized feature u'j is processed by a nonlinear compression function to obtain the capsule vector of the next layer. The nonlinear compression function can be a squash function, that is, f(x) = (||x|| 2 / (1 + ||x||^2)) × (x / ||x||). Applying it to u'1, we get the next layer capsule vector f(u'1) = (0.245 / (1 + 0.245)) × [0.402,0.572,0.467,0.548] = 0.197 × [0.402,0.572,0.467,0.548] = [0.079,0.113,0.092,0.108].
[0096] Existing implementations primarily involve calculating the dot product of the current layer's capsule vector and the next layer's capsule vector as the routing probability, applying a softmax function to the routing probability to obtain an initial coupling coefficient, updating the coupling coefficient through multiple rounds of iteration, generating the next layer's capsule vector using a weighted sum, and applying a squash function for nonlinear transformation. The main drawback of this approach is that the routing process lacks the ability to perceive the distribution characteristics of capsule vectors. A uniform routing strategy is applied to all capsule vectors, making it impossible to adaptively adjust routing weights based on the characteristics of different input data. Furthermore, multiple rounds of iterative calculations increase computational complexity.
[0097] The method of this embodiment introduces the information entropy eigenvalue as a measurement indicator of the distribution characteristics of capsule vectors. By calculating the information entropy of the inner product distribution of capsule vectors and the mean center, the aggregation degree and distribution pattern of capsule vectors are effectively captured. An adaptive weight function based on information entropy is designed, and a learnable scaling factor and normalization coefficient are introduced to enable the routing process to dynamically adjust the weight according to the distribution characteristics of capsule vectors. The adaptive weight is combined with the initial routing coefficient to form a dynamic coupling coefficient to achieve adaptive routing for different characteristic patterns. The traditional multi-round iterative routing process is simplified and the computational complexity is reduced.
[0098] The traditional routing algorithm adopts the same routing strategy for different input data and cannot adaptively adjust according to the data characteristics. In actual applications, different feature patterns may require different routing strategies. By introducing the information entropy characteristic value, the method of the embodiment can perceive the distribution characteristics of the capsule vector, thereby realizing adaptive adjustment of the routing process; improve the adaptability of the capsule network to different feature patterns, so that the network can dynamically adjust the routing strategy according to the characteristics of the input data; enhance the representation ability of the model, especially when processing complex scenes and diversified data, the model performs more stably; improve the generalization performance of the model, and better recognition accuracy and stability are shown on the test data; reduce the computational complexity, compared with the traditional multi-round iteration routing algorithm, the method of the embodiment is more efficient; through the learnable parameters, the automatic optimization of the routing process is realized, and the need for manual parameter tuning is reduced.
[0099] As shown in Figure 2 , the influence of the scaling factor on the model performance in the technical solution is shown. The scaling factor is a key parameter for converting the information entropy characteristic value into an adaptive weight, and through the chart, the comprehensive influence of the scaling factor on the accuracy, information entropy weight coefficient and training time can be observed. From the data, it can be seen that for all three data sets (MNIST, CIFAR-10 and Fashion-MNIST), the accuracy first increases and then decreases with the increase of the scaling factor, and all reach the best value when the scaling factor is 2.0. Specifically, when the scaling factor is 2.0, the accuracy reaches the highest value of 97.82% on the MNIST data set, 94.65% on the CIFAR-10 data set, and 92.18% on the Fashion-MNIST data set. At the same time, the information entropy weight coefficient monotonously increases with the increase of the scaling factor, from 0.283 when the scaling factor is 0.5 to 0.768 when the scaling factor is 5.0, indicating that a larger scaling factor will enhance the influence of the information entropy characteristic value on the routing process. The training time also increases with the increase of the scaling factor, from 39.7 milliseconds / batch when the scaling factor is 0.5 to 60.6 milliseconds / batch when the scaling factor is 5.0, with an increase of 52.6%. This phenomenon shows that a too large scaling factor will increase the computational complexity, and at the same time, it may also cause the routing weight to be excessively concentrated on some capsules, reducing the generalization ability of the model. On the contrary, a too small scaling factor cannot fully utilize the information provided by the information entropy characteristic value, resulting in insignificant effect of the adaptive weight. The experimental results clearly show that the scaling factor 2.0 is a relatively ideal balance point, at which the model achieves the best balance between accuracy and computational efficiency. This finding provides an important reference for parameter configuration in practical applications, and also reveals the internal relationship between the information entropy characteristic value and the routing performance.
[0100] In an alternative embodiment, based on the hierarchical semantic vector, the feature importance is calculated by variance contribution degree, and the feature selection is performed in combination with the multi-layer attention mechanism, an interactive fusion mechanism is established between the correlation feature and the quality evaluation feature, and a fusion feature vector is obtained, including:
[0101] The variance contribution degree of each dimension feature of the hierarchical semantic vector is calculated, the feature importance coefficient is determined according to the variance contribution degree, and a feature importance matrix is generated;
[0102] The feature importance matrix is calculated by three-layer attention, the attention weight distribution is generated by the product operation of the query matrix, the key value matrix and the numerical matrix, the features are weighted and reorganized according to the attention weight distribution, and a correlation feature vector is obtained;
[0103] The correlation feature vector is selectively transmitted, the propagation probability is determined according to the time sequence dependence between the features, the feature importance score is calculated based on the propagation probability to dynamically adjust the control parameters, and the quality evaluation feature vector is obtained through multi-level attention calculation;
[0104] The correlation feature vector and the quality evaluation feature vector are mapped to a unified feature space through a feature transformation matrix, the cosine distance between the feature vectors is calculated to obtain a cross-task attention coefficient, the features are fused according to the cross-task attention coefficient, and an interactive feature vector is obtained;
[0105] The interactive feature vector is optimized in an adversarial training manner to obtain a fusion feature vector.
[0106] In a specific embodiment, the input hierarchical semantic vector is processed, and the variance contribution degree of each dimension feature is calculated. Assuming that the input hierarchical semantic vector is a 128-dimensional vector set, the variance of each dimension feature in the overall data distribution is calculated. For example, for the i-th dimension feature, its variance is 0.0025, and the total variance of all dimension features is 0.05, then the variance contribution degree of this dimension is 0.0025 / 0.05=0.05, which means that the contribution of this dimension to the overall data distribution is 5%. Similarly, the variance contribution degrees of all dimensions are calculated to form a contribution degree vector. According to the variance contribution degree, the feature importance coefficient is set, for example, when the variance contribution degree is greater than 0.01, the feature is assigned an importance coefficient of 1.2; when the variance contribution degree is between 0.005 and 0.01, the importance coefficient is 1.0; when the variance contribution degree is less than 0.005, the importance coefficient is 0.8. In this way, a feature importance matrix with a size of 128x128 is generated.
[0107] The three-layer attention calculation is performed on the feature importance matrix. In the first layer of attention calculation, the feature importance matrix is converted into a query matrix, a key-value matrix, and a numerical matrix, respectively. Specifically, the three matrices are obtained by multiplying the feature importance matrix with three different weight matrices. Assuming that the weight matrix is 128x64, the generated query matrix, key-value matrix, and numerical matrix are all 128x64 matrices. The query matrix is multiplied by the transpose of the key-value matrix to obtain an attention score matrix of 128x128, where each element represents the correlation strength between different features. The matrix is normalized by using a soft-max function, so that the sum of each row is 1, to obtain an attention weight distribution. The attention weight distribution is multiplied by the numerical matrix to achieve weighted reorganization of the features, and a correlation feature vector of 128x64 is obtained.
[0108] The selective feature transmission is performed on the correlation feature vector to construct the time sequence dependency between features. Assuming that the feature states of the past 5 time steps are selected, the time sequence correlation between features is calculated. When the similarity of two time steps is greater than 0.85, the propagation probability is set to 0.9; when the similarity is between 0.7 and 0.85, the propagation probability is 0.7; and when the similarity is less than 0.7, the propagation probability is 0.5. Based on these propagation probabilities, the importance score of each feature is calculated. For example, the importance score of a certain feature at 5 time steps is [0.8, 0.75, 0.82, 0.79, 0.77], and the weighted average value 0.786 is taken as the dynamic importance score of the feature. According to the dynamic importance score, the control parameter is adjusted, and when the score is higher than 0.8, the control parameter is set to 1.2; when the score is between 0.6 and 0.8, the control parameter is set to 1.0; and when the score is less than 0.6, the control parameter is set to 0.8. The adjusted features are processed through a multi-level attention network, which includes 3 attention layers, each containing 8 attention heads, to obtain a quality evaluation feature vector.
[0109] The correlation feature vector and the quality evaluation feature vector are mapped to a unified feature space through a feature transformation matrix. Assuming that the feature transformation matrix is 64x32, the two feature vectors are mapped to 32-dimensional vectors through the matrix. The cosine distance between the two 32-dimensional vectors is calculated, and the value is 0.92, indicating that the two feature vectors have high similarity. According to the cosine distance value, the cross-task attention coefficient is determined, for example, when the cosine distance is greater than 0.9, the attention coefficient is 0.6; when it is between 0.7 and 0.9, the attention coefficient is 0.5; and when it is less than 0.7, the attention coefficient is 0.4. Using the cross-task attention coefficient a = 0.6, the fusion feature is calculated: 0.6x correlation feature vector + 0.4x quality evaluation feature vector, to obtain an interaction feature vector.
[0110] The interaction feature vector is optimized by using an adversarial training method. A discriminator network is constructed, which includes 3 fully connected layers with hidden layer sizes of 64, 32, and 16, respectively, for distinguishing real features and generated features. The interaction feature vector is iteratively optimized through an adversarial process of minimizing the generator loss and maximizing the discriminator loss. During the training process, the discriminator is updated 5 times and the generator is updated 1 time per iteration. The learning rate is set to 0.001. After 200 iterations, the discriminator accuracy stabilizes at about 52%, indicating that the generated features are difficult to distinguish from real features. The optimized interaction feature vector obtained at this time is the final fusion feature vector.
[0111] In an optional embodiment, the correlation feature vector is subjected to selective feature transmission, the propagation probability is determined based on the time sequence dependency relationship between features, the feature importance score is calculated based on the propagation probability to dynamically adjust the control parameter, and the quality evaluation feature vector is obtained through multi-level attention calculation, including:
[0112] The conditional entropy between each dimension feature of the correlation feature vector is calculated to determine the feature dependency strength, the connection relationship of the feature nodes with a feature dependency strength greater than a preset strength threshold is established, and a feature dependency adjacency matrix is generated.
[0113] Based on the feature dependency adjacency matrix, the time sequence arrangement order of historical features is combined, the feature propagation probability is calculated based on the feature dependency strength and the time sequence distance, and a time sequence propagation matrix is obtained.
[0114] The time sequence propagation matrix is used to weight the propagation probability of the new input feature and the historical feature, and the feature importance score is obtained.
[0115] According to the feature importance score, the input control parameter is dynamically adjusted through a forward mapping mechanism, and the forgetting control parameter is dynamically adjusted through a backward mapping mechanism, forming a dynamic selection sequence.
[0116] The dynamic selection sequence is input into a multi-layer adaptive weight adjustment unit to weight and fuse the feature importance score and the propagation probability, and a quality evaluation feature vector is generated.
[0117] In one specific implementation, the conditional entropy between each dimension of the correlation feature vector is calculated to determine the feature dependency strength. For each pair of features in the correlation feature vector, the degree of mutual dependency between features X and Y is evaluated by calculating the conditional entropy H(X|Y) and H(Y|X). The conditional entropy H(X|Y) represents the uncertainty of feature X given the feature Y, which can be calculated using the joint probability distribution table constructed from historical sample data. For example, for the word frequency feature and the semantic correlation feature in the text feature, the conditional entropy can be calculated by counting the distribution of these two features in historical text samples. When the conditional entropy values of two features are low, it indicates that there is a strong dependency between them.
[0118] After determining the dependency strength between each pair of features, a dependency strength threshold (e.g., 0.7) is set, and a connection relationship is established between feature nodes with a dependency strength greater than the threshold to generate a feature dependency adjacency matrix A. The element aij in matrix A represents the dependency strength between feature i and feature j. If the dependency strength exceeds the threshold, aij is the actual dependency strength value, otherwise aij is 0. Taking the text recommendation system as an example, if the dependency strength between the word frequency feature and the user click rate feature is 0.85, which exceeds the preset threshold of 0.7, then 0.85 is recorded in the corresponding position in the adjacency matrix; while the dependency strength between the word frequency feature and the text length feature is 0.6, which is lower than the threshold, then it is recorded as 0.
[0119] Based on the feature dependency adjacency matrix, the feature propagation probability is calculated and the time series propagation matrix P is constructed in combination with the time series arrangement order of historical features. The time series distance is defined as the relative position difference of features in the time series, such as the time series distance of adjacent features is 1. The feature propagation probability is determined by the functional relationship between the feature dependency strength and the time series distance, which can be calculated using a decay function: the propagation probability pij of feature i to feature j is equal to the feature dependency strength aij multiplied by the time series decay factor, which can be set as the exponential function of the negative time series distance multiplied by the decay coefficient λ. λ can be adjusted according to the actual application scenario, and is usually between 0.1 and 0.5. In the text recommendation system, if the dependency strength between the title feature and the content feature is 0.8 and the time series distance is 2, and λ is 0.2, then the calculated propagation probability is about 0.67.
[0120] The new input feature and the propagation probability of the historical feature are weighted and calculated by using the time sequence propagation matrix P to obtain the feature importance score S. For the new input feature vector x, the importance score S, of the feature i is calculated as the weighted sum of the new feature value xi and the propagation influence of the historical feature. Specifically, S, is equal to xi plus the sum of the influence of all historical features j on feature i, and each influence term is the historical feature value x, multiplied by the propagation probability p,. In practical applications, the size of the time window (such as the last 30 historical records) can be set, and only the historical features within the window are considered. For example, in the case of intelligent text generation, if the new input keyword feature value is 0.9, and the propagation probability of the historical context feature to it is 0.6, and the historical context feature value is 0.8, then the importance score of the keyword is 0.9 + (0.8 x 0.6) = 1.38.
[0121] According to the feature importance score S, the input control parameter a is dynamically adjusted by a forward mapping mechanism, and the forgetting control parameter β is dynamically adjusted by a backward mapping mechanism to form a dynamic selection sequence. The forward mapping mechanism uses a nonlinear function to map the feature importance score to the input control parameter a interval [0, 1], such as the Sigmoid function processing: a is equal to 1 divided by (1 plus the exponential of the negative product of the feature importance score and the adjustment coefficient). The backward mapping mechanism calculates the forgetting control parameter β based on the inverse relationship of the feature importance score, which can be realized by the function β equal to 1 minus a or other customized functions. In the intelligent text recommendation system, if the importance score of a user's interest feature is 1.5, the Sigmoid function (adjustment coefficient is 1) is used to calculate a about 0.82, and the corresponding β is 0.18, indicating that 82% of the feature information will be retained and 18% will be forgotten.
[0122] The dynamic selection sequence is input into the multi-layer adaptive weight adjustment unit to weight and fuse the feature importance score and the propagation probability to generate a quality evaluation feature vector. The multi-layer adaptive weight adjustment unit includes multiple processing layers, each of which is responsible for processing different types of feature dependency relationships. In the first layer, the input control parameter a is applied to weight the original features, and the forgetting control parameter β is used to suppress redundant features. In subsequent layers, according to the feature dependency relationship of different layers, an adaptive weight adjustment mechanism is applied to optimize the feature representation through residual connection and gating mechanism. The final output quality evaluation feature vector contains the most valuable feature information after multi-layer processing. For example, in the text generation task, if the importance score of the theme relevance feature is 1.8, the weight obtained after the first layer processing is 0.85, and through residual connection and second layer processing, the final weight in the quality evaluation feature vector may be adjusted to 0.92.
[0123] The prior art usually adopts a fixed-weight feature selection method or a simple time decay model, which is difficult to adapt to complex and variable scene requirements. The existing method ignores the dependency relationship between features and does not consider the influence of time sequence information on the importance of features, and the feature selection strategy lacks dynamic adaptive ability. The method of the embodiment introduces conditional entropy to calculate the feature dependency relationship, constructs a propagation matrix combined with time sequence information, and realizes dynamic selection of features through forward and backward mapping mechanisms. The method enhances the context awareness and time adaptability of feature selection, and improves the accuracy of feature selection by considering the dependency relationship between features and the time sequence influence of historical information.
[0124] As shown in Figure 3 The time sequence propagation matrix generated by the technical solution is shown, and the propagation probability relationship between features is intuitively presented in the form of a heat map. The color depth in the matrix represents the propagation probability strength between features, and the numerical range is from 0.03 to 0.92. The horizontal axis represents the target feature, and the vertical axis represents the source feature. The numerical value of each cell represents the propagation probability from the source feature to the target feature. The matrix clearly shows several high propagation probability paths: the propagation probability of F2→F3 is as high as 0.92, F5→F8 reaches 0.85, F4→F5 is 0.75, and F4→F8 is 0.71, indicating that there is a strong time sequence dependency relationship between these feature pairs. At the same time, the matrix also reveals some low propagation probability paths, such as F1→F8 is only 0.15 and F8→F1 is only 0.03, indicating that there is almost no dependency relationship between these features. In addition, the values on the diagonal are all 0, which conforms to the logic that a feature cannot be propagated to itself. It is particularly noteworthy that F2 has a high propagation probability as a source feature to multiple target features (F3: 0.92, F4: 0.71, F6: 0.62), indicating that F2 is a key information propagation node. Similarly, the high propagation probabilities of F5 and F4 to F8 (0.85 and 0.71, respectively) show a composite influence pattern of multiple features on a single feature. This accurate propagation probability matrix provides a solid foundation for subsequent feature importance calculation and dynamic selection sequence generation.
[0125] In an optional implementation, a reserve pool network is constructed for the fusion feature vector, state iteration and sampling processing are performed, a hierarchical decoder is used to realize conversion from the feature space to the text space, and an initial recommended text is obtained, including:
[0126] A local density distribution matrix of the fusion feature vector is constructed, a reserve pool network is established using the local density distribution matrix, and state weights are obtained by performing neuron activation processing on the reserve pool network.
[0127] inputting the fusion feature vector into the reservoir network to form an initial state, constructing a history state record matrix by iterative calculation, and obtaining a reservoir state matrix by extracting a stable state interval; performing state node screening and connectivity verification on the reservoir state matrix to obtain a sampling trajectory;
[0128] constructing a text feature space and establishing a feature text mapping dictionary, inputting the sampling trajectory into a hierarchical decoder, and obtaining a feature mapping result by semantic dependence extraction and adversarial optimization;
[0129] screening the feature mapping result to obtain a candidate text, adjusting echo sampling parameters according to the semantic relevance between the candidate text and the fusion feature vector, and obtaining an initial recommended text.
[0130] In a specific embodiment, when constructing a local density distribution matrix of the fusion feature vector, user historical behavior data and content feature data are collected, user preference feature vectors and content semantic feature vectors are extracted, and the two types of feature vectors are fused through an attention mechanism to obtain a fusion feature vector. The local density of the fusion feature vector is calculated, 500 reference points in the feature space are selected, the Euclidean distance between each reference point and each dimension of the fusion feature vector is calculated, and a 500x128-dimensional local density distribution matrix is constructed. Taking a certain e-commerce user as an example, the preference feature vector generated by the user's historical purchase behavior is 64-dimensional, the content feature vector of the product is 64-dimensional, and the fusion feature vector is 128-dimensional. The 500 reference points selected by the local density calculation are distributed around the vector in the feature space.
[0131] When establishing a reservoir network using a local density distribution matrix, a reservoir containing 1000 neurons is designed, the connection weights between neurons are constructed according to the local density distribution, the connection sparsity is set to 0.2, i.e., each neuron is connected to an average of 200 other neurons. A nonlinear activation function is applied to the reservoir network, the hyperbolic tangent function is selected as the activation function, and the activation threshold is set to 0.3. When the neuron input exceeds the threshold, it is activated and generates a state weight. In practical applications, neurons corresponding to feature dimensions with strong user preferences (such as interest in technology products) obtain higher activation weights.
[0132] After inputting the fusion feature vector into the reservoir network to form an initial state, the number of iterations is set to 100, the learning rate is 0.05, and the neuron state is updated and recorded to the history state record matrix each time. Analyzing the state change rate of the history state record matrix, when the state change rate of 10 consecutive iterations is less than 0.01, it is considered to enter the stable state interval. From the 60th iteration to the 90th iteration, a stable state interval is formed, and the state values of the 31 iterations are extracted to form a 1000x31 reservoir state matrix.
[0133] State node screening is performed on the reservoir state matrix, the activation frequency and activation intensity of each neuron in the stable state interval are calculated, and nodes with an activation frequency greater than 0.6 and an activation intensity greater than 0.4 are selected as key nodes. The connectivity between the key nodes is verified, a connection graph is constructed, and it is ensured that all key nodes can be connected to each other through a path with no more than 3 hops. 120 key nodes are screened out, and a sampling trajectory with a length of 20 is constructed between these nodes according to the state transition probability, and the node number sequence is [45, 78, 102, 56, 89, 201, 245, 67, 88, 156, 237, 312, 401, 188, 267, 345, 389, 412, 489, 512].
[0134] When constructing the text feature space, 10,000 common word feature representations are established based on the corpus, and each word is represented by a 128-dimensional vector. A feature text mapping dictionary is established to map the reservoir state space to the text feature space. Each node in the sampling trajectory is associated with a region in the text feature space through the mapping dictionary, and the association strength threshold is set to 0.6. The sampling trajectory is input into a three-layer hierarchical decoder, each layer containing 256 units, and the decoder extracts semantic dependency relationships based on an attention mechanism. The decoding result is subjected to adversarial optimization, and a discriminator is used to evaluate the naturalness of the text, and the optimization parameter adjustment range is [-0.1, 0.1], and the feature mapping result is obtained after 50 iterations of iterative optimization.
[0135] The feature mapping result is screened, the semantic coherence threshold is set to 0.7, and the grammatical correctness threshold is set to 0.85. The texts that meet the double thresholds are retained as candidate texts. The semantic relevance of the candidate text and the fusion feature vector is calculated, the relevance score ranges from 0 to 1, when the relevance is greater than 0.8, the echo sampling parameters remain unchanged, when the relevance is between 0.5 and 0.8, the sampling temperature parameter is increased linearly, and when the relevance is less than 0.5, the sampling is re-sampled. The final generated initial recommendation text example is "This ultra-thin and lightweight laptop is equipped with a high-performance processor and a long-lasting battery, suitable for business people who travel frequently, supports fast charging and fingerprint recognition, and is available in multiple colors."
[0136] In an optional implementation, the fusion feature vector is input into the reservoir network to form an initial state, a history state record matrix is constructed by iterative calculation, and a stable state interval is extracted to obtain a reservoir state matrix; state node screening and connectivity verification are performed on the reservoir state matrix to obtain a sampling trajectory, including:
[0137] The fusion feature vector is input into the reservoir network to establish a corresponding mapping relationship, the activation state value of each network node is calculated, and an initial network state is generated;
[0138] The initial network state is stored in the first row of the state history record matrix, and the initial network state is iteratively calculated based on the recursive connection weight matrix, and the network state obtained each time is sequentially stored in the state history record matrix until a preset number of iterations is completed;
[0139] The state difference values between adjacent state rows in the state history record matrix are calculated, a stable state interval is determined according to the state difference values, and a reserve pool state matrix is constructed by extracting the network state corresponding to the stable state interval;
[0140] State nodes with a response intensity exceeding a preset intensity threshold are selected in the reserve pool state matrix, a state node index sequence is generated, and a sampling sequence is constructed by extracting the corresponding state values from the reserve pool state matrix according to the state node index sequence;
[0141] Adjacent sampling points in the sampling sequence are verified for state connectivity, and sampling points that do not satisfy the state transition condition are removed to form a sampling trajectory in chronological order.
[0142] In a specific embodiment, the fusion feature vector is input into the reserve pool network to establish a corresponding mapping relationship. Specifically, for a given fusion feature vector X(t), the vector is a multi-dimensional fusion feature obtained through pre-processing, and the dimension n can be 128, 256 or 512, etc. The feature vector is multiplied by the input weight matrix Win of the reserve pool network, and the dimension of Win is n x m, where m is the number of nodes of the reserve pool network, which can be set to 500 to 2000 or more. Through the matrix multiplication operation of Win and X(t), the input signal of the reserve pool network is obtained. For each network node i, the activation state value S(i, 0) is calculated, and the activation function can use the hyperbolic tangent function, so that the state value is limited to the range of [-1, 1]. Taking an actual case as an example, when the input fusion feature vector X(t) is 256-dimensional and the number of reserve pool nodes is 1000, the initial network state S(0) is obtained by calculation, which is a 1000-dimensional vector, and each element represents the activation state of the corresponding node.
[0143] A state history matrix H is constructed to store the evolution of network states. The initial network state S(0) is stored in the first row of the state history matrix H. Subsequently, the initial network state is iteratively calculated based on a recurrent connection weight matrix W. The recurrent connection weight matrix W has a dimension of mxm, i.e., 1000x1000, which controls the connection strength between nodes within the reservoir. The sparsity of the matrix W can be set to 0.1, i.e., about 90% of the elements are 0, and the remaining non-zero elements are randomly distributed within the range [-0.5, 0.5], with a spectral radius controlled between 0.9 and 1.1 to ensure network dynamic characteristics. For each iteration t, the calculation formula can be expressed as: multiply the current state S(t-1) with the recurrent connection weight matrix W, add the input signal, and then pass it through an activation function to obtain the new state S(t). The network state S(t) obtained in each iteration is sequentially stored in the t+1 row of the state history matrix H. The iteration process continues until the preset number of iterations T is completed, which can be set to between 100 and 200. Taking T=150 as an example, the final state history matrix H is a 151x1000 matrix.
[0144] The state difference values between adjacent state rows in the state history matrix are calculated to determine the stable state interval of the reservoir network. For each adjacent two rows of states S(t) and S(t+1), the Euclidean distance or cosine similarity between them is calculated as the state difference value D(t). When a plurality of consecutive difference values are all less than a preset threshold, it is considered that the network has entered a stable state. The preset threshold can be set to 0.01, and the number of consecutive states for stability determination can be set to 10. By analyzing the sequence of state difference values, the starting time point ts and the ending time point te of the stable state are determined. In actual cases, it may be found that the network state tends to be stable from the 60th iteration to the 120th iteration, and at this time the stable state interval can be determined as [60, 120]. The network state corresponding to this interval is extracted to construct a reservoir state matrix R, which has a dimension of 61x1000.
[0145] In the reservoir state matrix R, state nodes with response intensity exceeding a preset intensity threshold are selected to generate a state node index sequence. The response intensity can be measured by calculating the root mean square or maximum absolute value of the state value of each node in the stable interval. The preset intensity threshold is set to 0.5, and each column of the reservoir state matrix is traversed. If the response intensity of the node corresponding to the column exceeds the threshold, the index of the node is added to the state node index sequence I. Assuming that the response intensity of 200 nodes exceeds the threshold, the state node index sequence I contains the index values of these 200 nodes. The corresponding state values are extracted from the reservoir state matrix R according to the state node index sequence I to construct a sampling sequence S_sample, which has a dimension of 61x200.
[0146] State connectivity verification is performed on adjacent sampling points in the sampling sequence, and sampling points that do not satisfy the state transition condition are removed. The state transition condition can be defined as the transition probability between two adjacent state points being greater than a certain threshold, or the state change satisfying a predefined smoothness condition. The state transition condition is set to be the Euclidean distance between adjacent state points being less than 0.2. Starting from the first time point of the sampling sequence, it is checked whether each pair of adjacent sampling points satisfies the transition condition, and if not, the latter sampling point is removed. After state connectivity verification, the remaining sampling points are arranged in chronological order to form the final sampling trajectory T_final. In actual cases, 15 points that do not satisfy the condition can be removed from the original 61 sampling points, and a sampling trajectory composed of 46 sampling points is finally obtained.
[0147] The traditional reserve pool calculation model often directly uses the entire network state for subsequent processing without considering the difference in state stability and node contribution, resulting in waste of computing resources and unstable results. In the prior art, fixed iteration times or simple threshold judgments are usually used to determine the calculation termination point, lacking in-depth analysis of the dynamic characteristics of the network. The method of the embodiment accurately identifies the stable state interval by constructing a state history record matrix and analyzing the state difference value; reduces redundant calculation by setting a response intensity threshold to filter effective nodes; and ensures the coherence and effectiveness of the sampling trajectory through state connectivity verification. The system can adaptively determine the optimal calculation interval, improving the accuracy and robustness of feature mapping while reducing the consumption of computing resources.
[0148] The AI-based multi-scene text intelligent recommendation and automatic generation system according to the embodiment of the application comprises:
[0149] The first unit is configured to perform word segmentation and named entity recognition processing on the recruitment demand information, extract position description entity information, and form structured demand features; and perform similarity matching on the structured demand features in a historical recruitment text database to obtain an initial candidate text set through screening.
[0150] The second unit is configured to construct a multi-level feature extraction structure using a capsule dynamic routing network, perform hierarchical feature extraction and dynamic combination on the initial candidate text set, and generate hierarchical semantic vectors.
[0151] The third unit is configured to calculate feature importance based on the hierarchical semantic vectors, perform feature selection by combining a multi-layer attention mechanism, establish an interactive fusion mechanism between relevant features and quality evaluation features, and obtain a fusion feature vector.
[0152] The fourth unit is configured to perform state iteration and sampling processing on the fusion feature vector by constructing a reserve pool network, realize conversion from a feature space to a text space through a hierarchical decoder, and obtain an initial recommended text.
[0153] A fifth unit is configured to perform normative scoring and optimized rewriting on the initial recommended text to generate a final recommended text, and to perform dynamic adjustment on the network according to user feedback information of the final recommended text to realize iterative optimization of model parameters.
[0154] In a third aspect, the present application provides an electronic device, comprising:
[0155] a processor;
[0156] a memory for storing processor-executable instructions;
[0157] The processor is configured to invoke the instructions stored in the memory to perform the method described above.
[0158] In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the method described above.
[0159] The present application can be a method, apparatus, system and / or computer program product. The computer program product can include a computer-readable storage medium having stored thereon computer-readable program instructions that, when executed by a computer, cause the computer to carry out various aspects of the present application.
[0160] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. AI-based multi-scenario text intelligent recommendation and automatic generation method, characterized by: include: Perform word segmentation and named entity recognition on recruitment demand information, extract job description entity information, and form structured demand features; Performing similarity matching on the structured demand features in a historical recruitment text database to obtain an initial candidate text set; A multi-level feature extraction structure is constructed using a capsule dynamic routing network. The bottom-level capsule network uses a bidirectional GRU structure to map the initial candidate text set into an initial capsule vector group containing positional and semantic encoding information. The information entropy eigenvalue is calculated based on the inner product distribution of the initial capsule vector group and the capsule vector mean center, and an adaptive weight function is constructed to dynamically adjust the coupling coefficient between adjacent capsule layers. High-level capsule vectors are generated through transformation matrix mapping and feature reorganization, and a residual transmission path is established. After nonlinear activation fusion and recursive iterative processing, a hierarchical semantic vector is generated; Based on the hierarchical semantic vector, the variance contribution of each dimension feature is calculated to determine the feature importance coefficient and generate a feature importance matrix. A three-layer attention calculation is performed on the feature importance matrix to obtain a correlation feature vector. The quality assessment feature vector is then obtained through selective feature transfer and multi-level attention processing. The correlation feature vector and the quality assessment feature vector are mapped to a unified feature space and fused. The fused feature vector is then obtained through adversarial training optimization. A local density distribution reservoir network is constructed for the fused feature vectors, and the reservoir state matrix is calculated to generate a sampling trajectory. The sampling trajectory is filtered through a layered decoder to obtain candidate texts. Based on the candidate texts, the echo sampling parameters are adjusted to obtain the initial recommended text. The initial recommendation text is normatively scored and optimized and rewritten to generate a final recommendation text; and the network is dynamically adjusted based on user feedback information of the final recommendation text to achieve iterative optimization of model parameters.
2. The method according to claim 1, characterized in that The step of generating a hierarchical semantic vector comprises: Inputting the initial candidate text set into the underlying capsule network, the underlying capsule network uses a bidirectional GRU structure to map the initial candidate text set into an initial capsule vector group, each capsule vector in the initial capsule vector group contains position encoding information and semantic encoding information; The information entropy eigenvalue is obtained by calculating the inner product distribution of the initial capsule vector group and the capsule vector mean center, and an adaptive weight function is constructed based on the information entropy eigenvalue to dynamically adjust the coupling coefficient between adjacent capsule layers to obtain a dynamic coupling coefficient; Mapping the initial capsule vector group to a high-dimensional feature space using a transformation matrix, and performing feature reorganization in combination with the dynamic coupling coefficient to obtain a high-level capsule vector, while establishing a residual transmission path between the high-level capsule vector and the initial capsule vector group; Nonlinear activation fusion is performed on the high-level capsule vector and the initial capsule vector transmitted through the residual transmission path to obtain a fused capsule vector, and the fused capsule vector is input into the next layer of capsule network. After recursive iterative processing, a hierarchical semantic vector is output.
3. The method according to claim 2, characterized in that The information entropy eigenvalue is obtained by calculating the inner product distribution of the initial capsule vector group and the capsule vector mean center. Based on the information entropy eigenvalue, an adaptive weight function is constructed to dynamically adjust the coupling coefficient between adjacent capsule layers. The dynamic coupling coefficient is obtained as follows: Perform an inner product operation on each capsule vector in the initial capsule vector group and the mean center of the capsule vector of the current batch to obtain the capsule vector inner product. The capsule vector inner product is converted into a conditional probability distribution through a probability normalization function. The information entropy eigenvalue of the initial capsule vector group is obtained based on the cross entropy calculation of the conditional probability distribution. Constructing an adaptive weight function based on the information entropy eigenvalue, performing a negative exponential transformation on the information entropy eigenvalue through a learnable scaling factor and adjusting it through a normalization coefficient to obtain an adaptive weight coefficient; Performing a dot product operation on the current layer capsule vector of the initial capsule vector group and the next layer capsule vector to obtain a capsule vector routing probability, performing accumulation and normalization operations on the capsule vector routing probability to obtain an initial routing coefficient; Multiplying the adaptive weight coefficient by the initial routing coefficient to obtain a dynamic coupling coefficient, and performing weighted combination on the capsule vector of the current layer to obtain a routing fusion feature; The ratio of the square of the modulus length of the routing fusion feature to the unit value is calculated to obtain a modulus length ratio, the modulus length ratio is multiplied by the unit vector of the routing fusion feature to obtain a normalized feature, and the normalized feature is processed by a nonlinear compression function to obtain a capsule vector of the next layer.
4. The method according to claim 1, wherein The step of obtaining the fused feature vector comprises: Calculate the variance contribution of each dimension feature of the hierarchical semantic vector, determine the feature importance coefficient based on the variance contribution, and generate a feature importance matrix; Performing a three-layer attention calculation on the feature importance matrix, generating an attention weight distribution by multiplying a query matrix, a key value matrix, and a value matrix, and weightedly recombining the features according to the attention weight distribution to obtain a correlation feature vector; Selectively transfer features of the correlation feature vector, determine the propagation probability through the temporal dependency between features, calculate the feature importance score based on the propagation probability, and dynamically adjust the control parameters. After multi-level attention calculation, a quality assessment feature vector is obtained. Mapping the correlation feature vector and the quality assessment feature vector to a unified feature space through a feature transformation matrix, calculating the cosine distance between the feature vectors to obtain a cross-task attention coefficient, and performing feature fusion based on the cross-task attention coefficient to obtain an interaction feature vector; The interactive feature vector is optimized by using an adversarial training method to obtain a fused feature vector.
5. The method according to claim 4, characterized in that Selective feature transfer is performed on the correlation feature vector, the propagation probability is determined by the temporal dependency between the features, the feature importance score is calculated based on the propagation probability, and the control parameters are dynamically adjusted. The quality assessment feature vector obtained through multi-level attention calculation includes: Calculate the conditional entropy between the features of each dimension for the correlation feature vector, determine the feature dependency strength, establish a connection relationship between the feature nodes whose feature dependency strength is greater than the preset strength threshold, and generate a feature dependency adjacency matrix; Based on the feature dependency adjacency matrix, combined with the temporal arrangement order of historical features, the feature propagation probability is calculated by feature dependency strength and temporal distance to obtain a temporal propagation matrix; Using the time series propagation matrix, the propagation probability of the new input feature and the historical feature is weighted to obtain the feature importance score; According to the feature importance scores, the input control parameters are dynamically adjusted through a forward mapping mechanism, and the forgetting control parameters are dynamically adjusted through a reverse mapping mechanism to form a dynamic selection sequence; The dynamic selection sequence is input into a multi-layer adaptive weight adjustment unit, and the feature importance score and the propagation probability are weightedly fused to generate a quality assessment feature vector.
6. The method according to claim 1, characterized in that The step of obtaining the initial recommended text includes: Constructing a local density distribution matrix of the fused feature vector, establishing a reservoir network using the local density distribution matrix, and performing neuron activation processing on the reservoir network to obtain state weights; Inputting the fused feature vector into the reservoir network to form an initial state, constructing a historical state record matrix through iterative calculation and extracting a stable state interval to obtain a reservoir state matrix; performing state node screening and connectivity verification on the reservoir state matrix to obtain a sampling trajectory; Constructing a text feature space and establishing a feature-text mapping dictionary, inputting the sampling trajectory into a hierarchical decoder, and obtaining a feature mapping result through semantic dependency extraction and adversarial optimization; The feature mapping results are screened to obtain candidate texts, and echo sampling parameters are adjusted according to the semantic relevance between the candidate texts and the fused feature vector to obtain an initial recommended text.
7. The method according to claim 6, characterized in that The fused feature vector is input into the reservoir network to form an initial state. A historical state record matrix is constructed through iterative calculation and a stable state interval is extracted to obtain a reservoir state matrix. The reservoir state matrix is subjected to state node screening and connectivity verification to obtain a sampling trajectory including: Input the fused feature vector into the reservoir network, establish the corresponding mapping relationship, calculate the activation state value of each network node, and generate the initial network state; Constructing a state history record matrix, storing the initial network state in the first row of the state history record matrix, iteratively calculating the initial network state based on the recursive connection weight matrix, and sequentially storing the network state obtained in each iteration in the state history record matrix until a preset number of iterations are completed; Calculating state difference values between adjacent state rows in the state history matrix, determining a stable state interval based on the state difference values, and extracting network states corresponding to the stable state intervals to construct a reserve pool state matrix; Selecting a state node whose response intensity exceeds a preset intensity threshold in the reserve pool state matrix, generating a state node index sequence, and extracting corresponding state values from the reserve pool state matrix according to the state node index sequence to construct a sampling sequence; The state connectivity of adjacent sampling points in the sampling sequence is verified, and the sampling points that do not meet the state transition conditions are eliminated, and the sampling points are arranged in time sequence to form a sampling trajectory.
8. An AI-based multi-scenario text intelligent recommendation and automatic generation system, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used to perform word segmentation and named entity recognition on recruitment demand information, extract job description entity information, and form structured demand features; Performing similarity matching on the structured demand features in a historical recruitment text database to obtain an initial candidate text set; The second unit is used to construct a multi-level feature extraction structure using a capsule dynamic routing network. The bottom-level capsule network uses a bidirectional GRU structure to map the initial candidate text set into an initial capsule vector group containing positional encoding information and semantic encoding information. The information entropy eigenvalue is calculated based on the inner product distribution of the initial capsule vector group and the capsule vector mean center, and an adaptive weight function is constructed to dynamically adjust the coupling coefficient between adjacent capsule layers. High-level capsule vectors are generated through transformation matrix mapping and feature reorganization, and a residual transmission path is established. After nonlinear activation fusion and recursive iterative processing, a hierarchical semantic vector is generated; The third unit is used to calculate the variance contribution of each dimension feature based on the hierarchical semantic vector to determine the feature importance coefficient and generate a feature importance matrix. The feature importance matrix is subjected to three-layer attention calculation to obtain a correlation feature vector. The quality assessment feature vector is obtained through selective feature transfer and multi-level attention processing. The correlation feature vector and the quality assessment feature vector are mapped to a unified feature space and fused. The fused feature vector is obtained through adversarial training optimization. The fourth unit is used to construct a local density distribution reservoir network for the fused feature vector and calculate the reservoir state matrix to generate a sampling trajectory; the sampling trajectory is filtered through a layered decoder to obtain candidate texts; and the echo sampling parameters are adjusted based on the candidate texts to obtain the initial recommended text; The fifth unit is used to perform normative scoring and optimized rewriting on the initial recommendation text to generate a final recommendation text; dynamically adjust the network according to user feedback information on the final recommendation text to achieve iterative optimization of model parameters.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Text sentiment classification method based on attention static routing capsule network
CN115544252A
Multi-document abstract extraction method and system based on Capsule-BiGRU network and event automatic classification
CN116186268A