Method, system and equipment for judging matching between user and data product in combination with multi-scale text semantics and medium

By constructing a multi-scale text semantic method, combining soft and hard cue templates, and utilizing multi-scale convolution and attention mechanisms, the noise interference and imbalance problems in user-data product matching judgment are solved, thereby improving the accuracy and robustness of matching judgment.

CN120929913APending Publication Date: 2025-11-11GUANGXI POWER GRID CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511038762.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing methods for determining the matching of users and data products are susceptible to text noise interference and performance degradation caused by data imbalance.

Method used

By combining multi-scale text semantics, a hybrid prompt template that integrates soft and hard prompts is constructed to encode user demand descriptions and data product descriptions. Semantic features are extracted using multi-scale convolution and attention mechanisms, and a classification model is trained using the joint loss function of masked word prediction and classification tasks.

Benefits of technology

It improves the accuracy of matching in class imbalance scenarios, reduces text noise interference, and enhances the richness of semantic features and the accuracy of matching decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929913A_ABST
    Figure CN120929913A_ABST
Patent Text Reader

Abstract

The invention discloses a user and data product matching judgment method, system and equipment in combination with multi-scale text semanteme and a medium, and belongs to the technical field of data security management.The method comprises the steps that user demand description and data product description are obtained, and a text input template is constructed; coding the user demand description and the data product description based on the text input template to obtain text representation; performing multi-scale feature extraction on the text representation to obtain multi-scale text semantic features; and based on the multi-scale text semantic features, judging the matching between the user and the data product through the classification model. According to the method, the problem that the matching discrimination performance is reduced due to the fact that an existing model is susceptible to text noise interference and data imbalance is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data security management technology, specifically to a method, system, device, and medium for determining the matching of users and data products by combining multi-scale text semantics. Background Technology

[0002] With the advent of the big data era, data resources are experiencing explosive growth, and data has become a crucial production factor in the digital economy. However, the widespread circulation and trading of data has also brought severe security challenges, including data leakage, misuse, tampering, and illegal transactions. To ensure the security and compliance of data during circulation, data trading platforms have emerged, aiming to build an efficient and reliable security management system to protect the legitimate rights and interests of both data supply and demand sides. During data transactions, both parties often have differing perceptions regarding data quality, content, compliance, and applicable scenarios, potentially leading to data misuse, compliance risks, and trust crises. User-data product matching assessment utilizes user needs descriptions and data product descriptions to determine whether users and data products are a good match, thereby reducing trust issues and transaction risks arising from information asymmetry. Existing methods can be categorized into two types:

[0003] 1. Text Representation Learning-Based Methods

[0004] Text representation learning methods utilize neural networks such as LSTM, CNN, and attention mechanisms to construct encoders that extract semantic features from user requirement descriptions and data product descriptions. These methods, by designing different encoder architectures, can extract fine-grained semantic features from user requirement descriptions and data product text information. For example, LSTM networks excel at capturing temporal dependencies in text sequences, effectively modeling the dynamic evolution of implicit intents in user requirements; CNNs extract multi-level phrase-level features through local convolutional kernels, suitable for identifying key attribute labels in data product descriptions; and attention mechanisms can focus on the semantic correlation between user requirements and data product descriptions. By jointly optimizing the encoders on the user side and the data product side, both can be mapped to the same vector space, thereby achieving accurate matching through similarity calculation.

[0005] However, in data trading scenarios, there is an imbalance in the matching relationship between "users and data products". The sample size of mismatched instances is often dozens of times larger than that of matched instances. The classification model overfits to high-frequency instances, resulting in low classification accuracy.

[0006] 2. Methods based on pre-trained language models

[0007] In the user-data product matching task of data trading platforms, methods based on pre-trained language models construct an end-to-end semantic understanding framework by leveraging the language representation capabilities pre-trained on large-scale unlabeled corpora. These methods typically employ a "pre-training + fine-tuning" paradigm: first, self-supervised tasks such as masked language modeling and next-sentence prediction are used to enable the model to learn general semantic rules; then, for specific matching scenarios, the model parameters are fine-tuned on labeled datasets to adapt them to the decision boundaries of the target task.

[0008] However, pre-trained language models tend to capture statistical co-occurrence patterns at the surface level of text, rather than strict task-oriented semantics. For example, generic marketing terms that frequently appear in data product descriptions may be overemphasized by the model, even though they are not directly related to the user's actual needs, thus reducing the accuracy of matching.

[0009] In summary, the existing methods for judging the matching of users and data products mainly have the following problems: (1) The classification model overfits high-frequency instances, resulting in low accuracy in scenarios where the matching relationship between users and data products is unbalanced; (2) Methods based on pre-trained language models are susceptible to statistical noise on the surface of the text, causing the semantic features of the samples to deviate from the true semantic features and reducing the accuracy of matching decisions. Summary of the Invention

[0010] In view of the above-mentioned problems, the present invention is proposed.

[0011] Therefore, the technical problem solved by this invention is: how to solve the problem of declining matching discrimination performance caused by the susceptibility of existing models to text noise interference and data imbalance.

[0012] To solve the above technical problems, the present invention provides the following technical solution: a user and data product matching discrimination method combining multi-scale text semantics, which includes: obtaining user demand description and data product description, and constructing a hybrid prompt template that integrates soft prompts and hard prompts;

[0013] The user requirement description and data product description are encoded based on the hybrid prompt template to obtain a text representation of the user-data product pair;

[0014] The text representation is subjected to multi-scale convolution processing to obtain multiple semantic features at different scales. The semantic features are then weighted and fused through an attention mechanism to obtain multi-scale text semantic features.

[0015] Based on the multi-scale text semantic features, a classification model is trained by combining the joint loss function of mask word prediction and classification tasks, and the trained classification model is used to determine the matching degree between users and data products.

[0016] As a preferred embodiment of the user-data product matching discrimination method combining multi-scale text semantics described in this invention, wherein: the construction of a hybrid prompt template integrating soft and hard prompts includes:

[0017] Pseudo-cue words are extracted from the vocabulary of a pre-trained language model to construct soft cue templates;

[0018] Extract the co-occurring word set from the user demand description and data product description pair, and calculate the term frequency-inverse document frequency value of each co-occurring word;

[0019] The co-occurring words are sorted according to the term frequency-inverse document frequency value, and the sorted co-occurring words are combined with placeholders to construct a hard cue template;

[0020] The soft suggestion template is concatenated with the hard suggestion template to form the hybrid suggestion template. The beneficial effects of this preferred technical solution are as follows: when extracting pseudo-suggestion words from the pre-trained language model lexicon to construct the soft suggestion template, the semantic knowledge of the pre-trained model can be fully utilized. Furthermore, by calculating the term frequency-inverse document frequency (IF-IVF) values ​​of co-occurring words and ranking them accordingly, keywords with discriminative power in user needs and data product descriptions can be automatically identified. Therefore, after concatenating the soft and hard suggestion templates to form the hybrid template, not only is the general semantic representation capability of the pre-trained model obtained, but also the domain vocabulary characteristics in the data transaction scenario are preserved. Even when there are differences in expression between user need descriptions and data product descriptions, semantic connections can be established through the bridging effect of co-occurring words, thereby avoiding the limitations of simply relying on the pre-trained model and ignoring domain features. Moreover, the automatic integration of domain knowledge can be achieved without manually designing a domain lexicon.

[0021] As a preferred embodiment of the user-data product matching discrimination method combining multi-scale textual semantics described in this invention, the step of encoding the user demand description and data product description based on the hybrid prompt template includes:

[0022] The soft cue portion of the hybrid cue template is encoded using a bidirectional long short-term memory network and a feedforward neural network to obtain a soft cue representation;

[0023] The hard cue portion of the hybrid cue template is encoded using a pre-trained language model to obtain a hard cue representation;

[0024] Gating weights are generated by a gating unit, and the soft cue representation and the hard cue representation are weighted and fused using the gating weights to obtain a fused representation.

[0025] The fused representation is subjected to Transformer-based feature extraction to generate the text representation. The beneficial effects of this preferred technical solution are as follows: When using a bidirectional long short-term memory network to encode soft cues, the bidirectional contextual dependencies of the cue word sequence can be captured. Then, a nonlinear transformation is performed through a feedforward neural network, giving the soft cue representation flexible semantic adaptability. Simultaneously, when using a pre-trained language model to encode hard cues, its semantic understanding capabilities learned on large-scale corpora can be fully utilized. Therefore, when the two representations are weighted and fused using weights generated by gating units, the contribution ratio of soft and hard cues can be automatically adjusted according to the semantic features of the input sample. Even when facing semantically complex or domain-terminally dense texts, the gating mechanism can dynamically adjust and achieve semantic information complementarity. Furthermore, subsequent feature extraction based on Transformer further enhances the semantic richness of the fused representation, thereby overcoming the rigidity of the fixed-weight fusion method and achieving collaborative optimization of soft and hard cues.

[0026] As a preferred embodiment of the user and data product matching discrimination method combining multi-scale text semantics described in this invention, wherein: the multi-scale convolution processing of the text representation includes:

[0027] The text representation is convolved using multiple convolution kernels of different sizes to obtain multiple feature maps;

[0028] Zero-padding is performed on the multiple feature maps to make all feature maps have the same dimension;

[0029] The dimension-aligned feature maps are fused element-wise to obtain a fused feature map.

[0030] As a preferred embodiment of the user and data product matching discrimination method combining multi-scale textual semantics described in this invention, wherein: the weighted fusion of the semantic features through an attention mechanism includes:

[0031] The fused feature map is subjected to global average pooling to obtain a feature vector;

[0032] The feature vectors are then dimensionality-reduced using a fully connected layer to obtain a compressed representation.

[0033] Based on the compressed representation and the learnable parameter matrix, the attention weights of each convolutional branch are calculated.

[0034] The attention weights are used to weight and combine feature maps of different scales to obtain the multi-scale text semantic features.

[0035] As a preferred embodiment of the user and data product matching discrimination method combining multi-scale text semantics described in this invention, wherein: training the classification model by combining a joint loss function of mask word prediction task and classification task includes:

[0036] Extract the semantic features of the mask position from the multi-scale text semantic features;

[0037] Based on the semantic features of the mask position, predict the mask word and calculate the mask word prediction loss;

[0038] Based on the multi-scale text semantic features, predict the matching category between users and data products, and use the focus loss function to calculate the classification loss.

[0039] The mask word prediction loss and the classification loss are combined using weighted coefficients to obtain a joint loss function.

[0040] The beneficial effects of this preferred technical solution are as follows: When global average pooling is performed on the fused feature map, statistical features at each spatial location can be extracted, eliminating the interference of local noise. Furthermore, a compact compressed representation is obtained through dimensionality reduction operations of the fully connected layer, preserving key semantic information while reducing computational complexity. Therefore, when calculating attention weights based on the compressed representation and the learnable parameter matrix, differentiated weighting can be applied according to the contribution of features at different scales to the current sample. Even when feature maps at different scales contain redundant or contradictory information, the selective focusing of the attention mechanism can highlight semantic features that play a crucial role in matching and discrimination. Moreover, fusing multi-scale features through weighted combination not only achieves an organic combination of fine-grained local features and global semantic features but also avoids information loss caused by simple concatenation or average pooling, thereby improving discrimination accuracy in class imbalance scenarios.

[0041] As a preferred embodiment of the user-data product matching discrimination method combining multi-scale text semantics described in this invention, the focus loss function controls the weight allocation of easy and difficult samples by adjusting parameters, wherein:

[0042] For easily classified samples, reduce their contribution to the total loss;

[0043] For hard-to-classify samples, increase their contribution to the total loss;

[0044] By balancing the class weight parameters, the contribution of different class samples to the loss can be adjusted.

[0045] This invention provides a user and data product matching system that combines multi-scale textual semantics.

[0046] To address the aforementioned technical problems, the present invention further provides the following technical solution: a user and data product matching discrimination system combining multi-scale text semantics, comprising: a prompt template construction module, used to obtain user demand descriptions and data product descriptions, and construct a hybrid prompt template that integrates soft prompts and hard prompts;

[0047] The text encoding module is used to encode the user requirement description and data product description based on the hybrid prompt template to obtain a text representation of the user-data product pair;

[0048] The multi-scale feature extraction module is used to perform multi-scale convolution processing on the text representation to obtain multiple semantic features at different scales, and to perform weighted fusion of the semantic features through an attention mechanism to obtain multi-scale text semantic features.

[0049] The matching and discrimination module is used to train a classification model based on the multi-scale text semantic features by combining the joint loss function of the mask word prediction task and the classification task, and to use the trained classification model to determine the matching degree between users and data products.

[0050] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the user and data product matching discrimination method combining multi-scale text semantics.

[0051] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the user and data product matching discrimination method combining multi-scale text semantics.

[0052] The beneficial effects of this invention are as follows: Compared with previous methods for determining user-data product matching, this invention designs a multi-scale key semantic feature extraction method. A multi-scale attention convolutional network extracts local and global semantic features hierarchically through convolutional kernels of different sizes, and the attention mechanism dynamically enhances the weight of key information and suppresses irrelevant text noise. Furthermore, a joint objective function integrating masked word prediction loss and classification loss is designed. The masked word prediction loss provides category-independent semantic supervision, mitigating long-tail bias. Attached Figure Description

[0053] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a schematic diagram of a user and data product matching method that combines multi-scale text semantics, provided in one embodiment of the present invention. Detailed Implementation

[0055] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0056] Example 1, referring to Figure 1 This is the first embodiment of the present invention, which provides a method for determining the matching of users and data products by combining multi-scale textual semantics, including:

[0057] S100: Obtain user requirement descriptions and data product descriptions, and construct text input templates;

[0058] S200: Encode user requirement descriptions and data product descriptions based on text input templates to obtain text representations;

[0059] S300: Multi-scale feature extraction is performed on the text representation to obtain multi-scale text semantic features;

[0060] S400: Based on multi-scale text semantic features, it uses a classification model to determine the matching between users and data products.

[0061] It should be noted that there are fundamental differences in expression between user requirement descriptions and data product descriptions in data transaction scenarios. User requirement descriptions typically use problem-oriented natural language, while data product descriptions use standardized technical explanatory text. Due to the differences in vocabulary selection, syntactic structure, and semantic expression between the two types of text, direct text matching can lead to semantic comprehension biases. Therefore, this invention constructs a hybrid prompt template, combining pseudo-prompt words from a pre-trained language model vocabulary with co-occurring words of user-data product pairs, thus achieving the fusion of general semantic knowledge and domain semantic features. Because soft prompts can capture implicit semantic patterns through learnable parameters, while hard prompts can explicitly introduce domain-related lexical information, the combination of the two provides a richer context for subsequent semantic understanding.

[0062] Therefore, to address the aforementioned semantic gap and matching bias issues, a text semantic understanding and matching discrimination framework is constructed through steps S100 to S400. This framework yields feature representations and fusion mechanisms at different semantic granularities, enabling accurate semantic alignment between user needs and data products. Furthermore, it achieves multi-scale extraction of text features, calculates the importance weights of features at each scale, and effectively supplements missing semantic information. Simultaneously, based on a multi-task learning framework and a sample difficulty awareness mechanism, it enables accurate discrimination of matching relationships in class imbalance scenarios.

[0063] Example 2, refer to Figure 1 This is the second embodiment of the present invention. Based on the above embodiment 1, a specific implementation of the user and data product matching discrimination method combining multi-scale text semantics is provided.

[0064] In this embodiment of the invention, step S100, which involves constructing a text input template, includes the following steps A1-A4:

[0065] Step A1: Select prompt words from the preset word list to construct the first type of prompt template;

[0066] Step A2: Extract a keyword set from the user needs description and data product description, and sort the keywords according to their importance.

[0067] Step A3: Construct a second type of suggestion template based on the sorted keywords;

[0068] Step A4: Combine the first type of prompt template with the second type of prompt template to form a text input template.

[0069] Specifically, in step A1, the first type of cue template refers to a learnable cue sequence constructed based on the vocabulary of a pre-trained language model. m cue words are extracted from the BERT vocabulary to construct the first type of cue template, where m ranges from 10 to 50. Because the cue words are randomly initialized from the complete vocabulary of the pre-trained language model, the semantic distribution characteristics learned during the model's pre-training phase are preserved. Each cue word corresponds to a word vector in the vocabulary, and its parameters are updated during training using gradient descent, enabling the cue words to automatically learn implicit semantic patterns related to the matching task.

[0070] In step A2, the keyword set refers to the set of semantically valuable words that appear simultaneously in both the user requirement description and the data product description. Importance refers to the contribution of keywords to the text matching task, quantified using the term frequency-inverse document frequency (TNF) method. Term frequency is obtained by dividing the number of times a word appears in a document by the total number of words in the document, reflecting the importance of the word in a single document. Inverse document frequency is obtained by calculating the logarithm of the ratio of the total number of documents to the number of documents containing the word, reflecting the word's discriminative power. The importance value is the product of term frequency and inverse document frequency.

[0071] In step A3, the second type of cue template refers to an explicit cue sequence constructed based on domain keywords. Keywords are sorted in descending order according to their calculated importance values, and the top c keywords with the highest scores are selected, where c ranges from 5 to 20. The sorted keywords are then combined with special markers from the BERT model to construct the second type of cue template. The template structure is arranged in the order of special markers, keyword sequence, mask markers, and text placeholders.

[0072] In step A4, the combination of text input templates follows a specific order rule. First, the start marker and keyword portion from the second type of prompt are placed, then the prompt word sequence from the first type of prompt is inserted, and finally, the mask marker and text content are added. Because the learnable parameters of the first type of prompt can adaptively adjust the semantic representation, while the keywords of the second type of prompt provide clear domain knowledge anchors, the combination of the two achieves an organic fusion of general semantics and domain semantics.

[0073] In an optional implementation, the construction of the first type of prompt template in step A1 can also employ a word vector clustering-based method. First, all word vectors in the BERT vocabulary are subjected to K-means clustering, with the number of clusters K set to one-thousandth of the vocabulary size. The word vector closest to each cluster center is selected as a representative prompt word. Because the cluster centers represent typical semantic regions in the word vector space, the selected prompt words can cover a more comprehensive semantic space. Specifically, the Euclidean distance from each word vector to its respective cluster center is calculated, and the word vector with the smallest distance is selected.

[0074] In another optional implementation, the construction of the first type of prompt template in step A1 can also employ a mutual information-based method. The dotted mutual information value between each word in the vocabulary and the task label is calculated. Dotted mutual information reflects the degree to which the co-occurrence of words and labels exceeds random co-occurrence. The m words with the highest dotted mutual information values ​​are selected as prompt words. Because high mutual information values ​​indicate a strong correlation between the word and the task label, the selected prompt words are inherently related to the matching task. In actual calculations, mutual information is calculated by statistically analyzing the frequency of co-occurrence of words and labels in the training set as well as their independent occurrence frequencies.

[0075] In an alternative implementation, the keyword importance calculation in step A2 can also employ a graph-based method. A word co-occurrence graph is constructed, where nodes represent words, edges represent co-occurrence relationships, and the weight of each edge is its co-occurrence frequency. The PageRank algorithm is used to calculate the importance of each node. The algorithm iteratively propagates node importance, and the importance of each node is obtained by weighted summing the importance of the nodes pointing to it. Because the PageRank algorithm considers the structural importance of words in the entire co-occurrence network, the calculated importance more accurately reflects the global influence of words. The iterative process continues until the importance values ​​converge.

[0076] In another optional implementation, the keyword importance calculation in step A2 can also employ a semantic similarity-based method. First, each candidate word is represented using pre-trained word vectors. Then, the cosine similarity between the candidate word and the overall semantic vector of the user's needs description, and the cosine similarity between the candidate word and the overall semantic vector of the data product description, are calculated separately. The overall semantic vector of the text is obtained by averaging all word vectors. The overall importance is a weighted average of the two similarities, with each weight set to 0.5. Because semantic similarity reflects the degree of semantic association between words and text content, importance calculation based on semantic similarity can identify keywords at the semantic level.

[0077] In an optional implementation, the construction of the second type of prompt template in step A3 can also employ a dependency parsing-based approach. Dependency parsing is performed on the keywords to identify syntactic components such as subject, predicate, and object. The keywords are then arranged in the order of subject, predicate, object, modifier, and adverbial. Because this syntactic order conforms to the expression habits of natural language, the constructed template exhibits better fluency. Specifically, a Stanford parser is used to identify the syntactic roles of words and determine the arrangement order based on the dependency relation type.

[0078] In another optional implementation, the construction of the second type of prompt template in step A3 can also employ a semantic field-based approach. Keywords are grouped according to semantic fields: the data type field includes words such as text, image, and audio, while the processing method field includes words such as analysis, mining, and statistics. The words are arranged in the template according to the logical order of the semantic fields, first arranging data type words, then processing method words. Because words within the same semantic field have similar semantic attributes, grouping and arranging them enhances the semantic coherence of the template.

[0079] In this embodiment of the invention, step S200, which encodes the user requirement description and data product description based on the text input template, includes the following steps B1-B4:

[0080] Step B1: Perform sequence encoding on the first type of prompt in the text input template to obtain the first encoded representation;

[0081] Step B2: Perform language model encoding on the second type of prompt in the text input template to obtain the second encoded representation;

[0082] Step B3: Generate a fusion weight based on the correlation between the first and second encoding representations, and then perform a weighted combination of the first and second encoding representations based on the fusion weights to obtain the fusion representation;

[0083] Step B4: Perform feature transformation on the fused representation to generate a text representation.

[0084] Specifically, in step B1, sequence encoding refers to an encoding method that performs temporal modeling on the input sequence. The first encoded representation refers to the vector representation obtained after sequence encoding of the first type of prompt. A bidirectional long short-term memory network is used for sequence encoding, and the network includes two processing directions: forward and backward. Forward processing encodes the sequence progressively from the beginning to the end. At each time step, a forget gate determines how much historical information to discard, an input gate determines how much new information to receive, and an output gate determines how much current information to output. Backward processing performs the same encoding process from the end to the beginning of the sequence. The encoding results from both directions are concatenated to obtain the complete sequence representation.

[0085] In step B2, language model encoding refers to the method of deep semantic encoding using a pre-trained language model. The second encoded representation refers to the vector representation obtained after the second type of cue is encoded by the language model. Encoding is performed using the BERT model, which contains a 12-layer Transformer encoder. Each encoder layer calculates the association strength between different positions in the sequence through a multi-head self-attention mechanism, ensuring that each position can pay attention to all other positions in the sequence. After attention calculation, a non-linear transformation is performed through a feedforward network, and residual connections and layer normalization are used to ensure training stability.

[0086] In step B3, the fusion weights refer to the scalar weights used to combine the two encoding representations. The fusion representation is the vector representation resulting from the weighted combination of the two encoding representations. The generation process of the fusion weights includes: concatenating the first and second encoding representations into a vector, reducing the dimensionality through a linear transformation layer, and then mapping the output to between 0 and 1 using the sigmoid activation function. Due to the S-curve characteristic of the sigmoid function, the output value can smoothly represent the weight ratio of the first encoding representation. The fusion representation is obtained by multiplying the first encoding representation by the fusion weights, multiplying the second encoding representation by 1 and subtracting the fusion weights, and then adding the two together.

[0087] In step B4, feature transformation refers to the process of performing a nonlinear transformation on the fused representation. The text representation refers to the feature vector ultimately used for subsequent processing. The feature transformation uses a 6-layer Transformer encoder, with the processing flow of each layer being the same as described in step B2. After multiple transformations, the output vector at the starting position is extracted as the text representation. Because the starting position is designed during pre-training to capture the semantic information of the entire sequence, its corresponding output vector can serve as a comprehensive representation of the entire text.

[0088] In an alternative implementation, the sequence encoding in step B1 can also employ a gated recurrent unit (GRU) network. The GRU simplifies the structure of the Long Short-Term Memory (LSTM) network through two gating mechanisms: a reset gate and an update gate. The reset gate controls the influence of the previous hidden state on the current candidate hidden state, while the update gate controls the mixing ratio of the previous hidden state and the current candidate hidden state. Because the GRU simplifies three gates to two, reducing the number of parameters by approximately one-quarter, it reduces computational complexity and memory usage while maintaining sequence modeling capabilities.

[0089] In another alternative implementation, the sequence encoding in step B1 can also employ a temporal convolutional network. Temporal convolutional networks use causal convolutions to ensure that the output at the current time step depends only on historical inputs, and increase the receptive field by dilating the convolutions. The network contains multiple layers of one-dimensional convolutions, with each layer dilating exponentially; the first layer dilates by 1, the second by 2, the third by 4, and so on. Because convolutional operations can process the entire sequence in parallel, while recurrent networks must process it step-by-step, temporal convolutional networks are trained 3 to 5 times faster than recurrent networks.

[0090] In an alternative implementation, the language model encoding in step B2 can also employ the ELECTRA model. ELECTRA uses a generator-discriminator architecture, where the generator produces replacement words, and the discriminator determines whether a word at each position in the sequence has been replaced. The discriminator performs binary classification at all positions, unlike BERT which only predicts at masked positions. Because ELECTRA learns to discriminate at all positions, its sample utilization efficiency is approximately 6 times higher than BERT, thus enabling it to learn better language representations with the same computational resources.

[0091] In another alternative implementation, the language model encoding in step B2 can also employ the RoBERTa model. RoBERTa makes several optimizations to BERT: removing the next-sentence prediction task to focus on masked language modeling, using dynamic masks to generate different mask patterns in each training epoch, increasing the batch size to 8192 samples, and increasing the number of training steps to 500,000. Because these optimizations enable the model to learn from more diverse contexts, RoBERTa outperforms BERT by 2 to 5 percentage points on multiple natural language understanding tasks.

[0092] In an optional implementation, the generation of fusion weights in step B3 can also employ an attention mechanism. An attention score is calculated between the first and second encoded representations. The first encoded representation is mapped to a query vector, and the second encoded representation to a key vector, using a learnable attention matrix. The dot product of the query vector and the key vector is calculated to obtain the attention score, which is then normalized using softmax to obtain the attention weights. Because the attention mechanism can capture the semantic relevance between the two representations, the generated weights can more accurately reflect the contribution of each representation to the current sample.

[0093] In another alternative implementation, the generation of fusion weights in step B3 can also employ a multilayer perceptron. A multilayer perceptron with two hidden layers is constructed: the first hidden layer contains 256 neurons, and the second hidden layer contains 128 neurons. The input consists of two concatenated encoded representations, which undergo linear transformation and ReLU activation in the first hidden layer, then processing in the second hidden layer, and finally the output layer generates the fusion weights. Because a multilayer perceptron can learn non-linear combinations of input features, it can capture more complex feature interaction patterns compared to a single-layer linear mapping.

[0094] In this embodiment of the invention, step S300 involves multi-scale feature extraction of the text representation, including the following steps C1-C3:

[0095] Step C1: Process the text representation using multiple receptive field feature extractors to obtain multiple feature maps;

[0096] Step C2: Perform dimension alignment on multiple feature maps;

[0097] Step C3: Perform feature aggregation on the dimension-aligned feature maps to obtain aggregated feature maps.

[0098] Specifically, in step C1, different receptive field feature extractors refer to one-dimensional convolutional layers with convolutional kernels of different sizes. The feature map refers to the feature matrix obtained after the convolution operation. Three convolutional layers are used, with kernel sizes of 3, 5, and 7, respectively, each containing 128 kernels. The convolution operation involves sliding the kernel across the input sequence, calculating the weighted sum of the kernel and the corresponding vector within the window, adding a bias term, and then applying the ReLU activation function to obtain the output. Because convolutional kernels of different sizes have different receptive fields—a kernel of size 3 captures local patterns between adjacent words, and a kernel of size 7 captures long-range dependencies across multiple words—multiple feature extractors can extract semantic features of different granularities.

[0099] In step C2, dimension alignment refers to the process of adjusting feature maps generated by convolutions of different sizes to the same dimension. Because convolution operations change the sequence length, a convolution kernel of size k will reduce the output sequence length by k-1 positions, thus requiring dimension alignment. Zero-padding is used, symmetrically adding zero vectors to both ends of the feature map sequence, with the padding amount at each end being the convolution kernel size minus 1 divided by 2. After padding, the sequence length of all feature maps is restored to the same as the input. Because the zero vectors do not change the original feature values, but only expand the spatial dimension of the feature map, dimension alignment does not affect the extracted feature information.

[0100] In step C3, feature aggregation refers to the process of combining multiple feature maps into a single feature map. The aggregated feature map is the comprehensive feature representation obtained after aggregation. Aggregation is performed using element-wise addition; for each spatial location and each channel, the values ​​of all feature maps at that location and channel are added together to obtain the aggregated value. Because the addition operation preserves feature information at all scales, while taking the maximum value loses non-maximum features and taking the average value weakens salient features, element-wise addition is the aggregation method that retains the most complete information.

[0101] Step S300 also includes weighted fusion of multi-scale features, including the following steps D1-D3:

[0102] Step D1: Perform global feature summarization on the aggregated feature map to obtain the feature vector;

[0103] Step D2: Calculate the importance weights for each scale based on the feature vectors;

[0104] Step D3: Weighted fusion of feature maps at different scales based on importance weights to obtain multi-scale text semantic features.

[0105] Specifically, in step D1, global feature aggregation is achieved through global average pooling. For each channel of the aggregated feature map, the average value of that channel across all spatial locations is calculated, resulting in a scalar. The average values ​​of all channels form the feature vector. The pooling operation eliminates the spatial dimension of the features, retaining only the statistical information of the channel dimension. Because average pooling can reduce the influence of noise in the feature map and extract stable global features, the resulting feature vector has good robustness.

[0106] In step D2, importance weights are calculated through the interaction of feature vectors and learnable parameters. First, the feature vectors are dimensionality-reduced using a fully connected layer with a reduction ratio of 16, meaning the output dimension is one-sixteenth of the input dimension. The dimensionality reduction process includes three steps: linear transformation, batch normalization, and ReLU activation. Then, attention scores for each scale are calculated using two parameter matrices, where each row of the parameter matrix corresponds to a convolutional scale. The softmax function is used to normalize the scores across all scales, ensuring the weights sum to 1.

[0107] In step D3, the original multiple feature maps are weighted and combined according to their importance. For each spatial location, the vector of each feature map at that location is multiplied by its corresponding scalar weight, and then the weighted vectors are summed to obtain the fused feature at that location. Because the weights are calculated based on global information, they can identify the scale that is most discriminative to the current sample, thus achieving adaptive multi-scale feature fusion.

[0108] In an alternative implementation, the feature extractor in step C1 can also employ dilated convolution. Dilated convolution introduces a dilation rate parameter into standard convolution, expanding the receptive field by inserting holes between the sampling positions of the convolution kernel. Three convolutional layers with dilation rates of 1, 2, and 4 are used, each with a kernel size of 3. A dilation rate of 1 is equivalent to standard convolution, a dilation rate of 2 leaves a gap of one position between every two sampling positions, and a dilation rate of 4 leaves a gap of three positions. Because dilated convolution can expand the receptive field without increasing the number of parameters—the convolutional layer with a dilation rate of 4 actually achieves a receptive field of 9—it can extract long-range dependent features with fewer computational resources.

[0109] In another alternative implementation, the feature extractor in step C1 can also employ deformable convolution. The deformable convolution learns an offset for each sampling location, enabling the convolutional kernel to adaptively adjust the sampling location based on the input content. The offset is predicted from the input features through additional convolutional layers, with each sampling location having an offset in both horizontal and vertical directions. Simultaneously, a modulation scalar is learned for each sampling location to adjust the contribution of the features at that location. Because deformable convolution can adaptively adjust the sampling mode according to the input content, it can better capture semantic structural changes in the text.

[0110] In an alternative implementation, dimension alignment in step C2 can also employ adaptive pooling. Adaptive average pooling is used for each feature map, pooling feature maps of different lengths to a target length. The pooling window size is automatically calculated based on the input and target lengths, ensuring the output sequence has the desired length. Because adaptive pooling can handle variable-length input sequences, it is particularly suitable for batch processing scenarios with inconsistent sequence lengths. Simultaneously, average pooling preserves the statistical information of the features, avoiding the information loss that may occur with max pooling.

[0111] In another alternative implementation, dimension alignment in step C2 can also employ interpolation. Linear interpolation is used to adjust the feature map to the target length. For each position in the target sequence, the interpolation result is calculated using a linear combination of two adjacent positions, based on its corresponding position in the original sequence. The interpolation weights are determined based on the distance from the target position to the original position; the closer the distance, the greater the weight. Because linear interpolation can smoothly adjust the feature map length and maintain feature continuity, it performs well in scenarios where maintaining the smoothness of the feature space is required.

[0112] In this embodiment of the invention, step S400, based on multi-scale text semantic features, uses a classification model to determine the matching degree between users and data products, including the following steps E1-E3:

[0113] Step E1: Extract discriminative features from multi-scale text semantic features;

[0114] Step E2: Predict the matching category between the user and the data product based on discriminative features;

[0115] Step E3: Train the classification model by combining multiple loss functions.

[0116] Specifically, in step E1, discriminative features refer to the feature representations used for the final classification decision. The extraction of discriminative features is achieved through a multilayer perceptron, comprising three processing layers. The first layer maps multi-scale textual semantic features to the hidden space, introducing non-linearity using the GELU activation function. The second layer performs layer normalization, standardizing the features by calculating the mean and variance, and then restoring expressive power through learnable scaling and offset parameters. The third layer maps the standardized features to the discriminative feature space. Because multilayer processing progressively refines features, the resulting discriminative features contain key information for classification.

[0117] In step E2, the matching categories include two categories: matching and non-matching. Based on the discriminative features, a classifier predicts the category probability distribution. The classifier uses a linear layer to map the discriminative features to a two-dimensional output space, with each dimension corresponding to a score for one category. The scores are converted into a probability distribution using a softmax function, ensuring that the sum of the probabilities of the two categories is 1. During the inference phase, the category with the higher probability is selected as the prediction result.

[0118] In step E3, the loss function includes a classification loss function and an auxiliary task loss function. The classification loss function optimizes the matching classification task, while the auxiliary task loss function enhances semantic understanding by predicting the masked words. The classification loss function employs focus loss, and a moderating factor is introduced to alter the loss contribution of samples of different difficulty levels. For easily classified samples with prediction probabilities close to 1, the moderating factor significantly reduces their loss; for difficult-classified samples with prediction probabilities far from 1, the moderating factor maintains their original loss level. The class balance parameter is set inversely proportional to the number of samples in each class in the training set, giving the minority class a higher loss weight.

[0119] The auxiliary task loss function uses masked word prediction loss. Based on the mask positions recorded during template construction, feature vectors for the corresponding positions are extracted from multi-scale text semantic features. A multilayer perceptron maps these feature vectors to an output space the size of the vocabulary, predicting the original word at the masked position. The cross-entropy between the predicted probability distribution and the true word is calculated as the loss. Because the masked prediction task requires the model to infer reasonable vocabulary based on context, it promotes the model's learning of semantic integrity.

[0120] The combined loss is obtained through weighted summation, with the mask prediction loss weighted at 0.3 and the classification loss weighted at 0.7. Because mask prediction typically converges faster than classification, smaller weights are assigned to prevent it from dominating the training process. During training, the weight ratio can be dynamically adjusted based on the performance of the two tasks on the validation set.

[0121] In an optional implementation, the auxiliary task in step E3 can also employ a contrastive learning method. Positive and negative sample pairs are constructed. Positive sample pairs contain semantically similar user needs and data product descriptions, while negative sample pairs contain semantically unrelated description pairs. The positive and negative samples are encoded separately using an encoder, and the similarity between the sample pairs is calculated. A contrastive learning loss maximizes the similarity of positive sample pairs and minimizes the similarity of negative sample pairs. Because contrastive learning can learn discriminative semantic representations, it helps improve the accuracy of matching and discrimination.

[0122] In another alternative implementation, the classification loss in step E3 can also be combined with a curriculum learning strategy. Training samples are sorted from easy to difficult, with difficulty estimated by the model's prediction confidence on the validation set. Initially, only easy samples are used, and more difficult samples are gradually added as training progresses. The pace of curriculum learning is controlled by the number of training epochs, expanding the difficulty range of the training samples after a certain number of epochs. Because curriculum learning simulates the human learning process from simple to complex, it helps the model establish a more stable decision boundary.

[0123] Example 3, the third embodiment of the present invention, provides a user and data product matching discrimination system that combines multi-scale textual semantics, including:

[0124] The prompt template building module is used to obtain user demand descriptions and data product descriptions to build hybrid prompt templates that integrate soft and hard prompts;

[0125] The text encoding module is used to encode user requirement descriptions and data product descriptions based on a hybrid prompt template, resulting in a text representation of the user-data product pair.

[0126] The multi-scale feature extraction module is used to perform multi-scale convolution processing on the text representation to obtain semantic features at multiple different scales. The semantic features are then weighted and fused through an attention mechanism to obtain multi-scale text semantic features.

[0127] The matching and discrimination module is used to train a classification model based on multi-scale text semantic features by combining the joint loss function of mask word prediction and classification tasks, and to use the trained classification model to determine the matching degree between users and data products.

[0128] Example 4, the fourth embodiment of the present invention, differs from the previous three embodiments in that: if the function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0129] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0130] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0131] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0132] Example 5, refer to Figure 1 This is the fifth embodiment of the present invention, which provides a method for judging the matching of users and data products by combining multi-scale text semantics. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.

[0133] Table 1. Experimental Data on User-Data Product Matching Assessment (Items)

[0134]

[0135] The user requirement descriptions and data product descriptions in the experimental data came from a data trading platform. Each user requirement description-data product description pair constituted one sample, resulting in 500 matching samples and 2000 non-matching samples. The training and test sets were split in a 4:1 ratio. Detailed information on the user-data product matching discrimination experimental data is shown in Table 1.

[0136] The experiment uses accuracy to evaluate the matching results between users and data products. The accuracy calculation method is shown in formula (1):

[0137] Accuracy = TP + TN + FP + FN #1

[0138] Where TP is the number of samples that actually match and are predicted to match, FN is the number of samples that actually match but are predicted to not match, FP is the number of samples that actually do not match but are predicted to match, and TN is the number of samples that actually do not match and are predicted to not match.

[0139] This experiment was conducted on one computer and one server. The computer's specific configuration was: Intel i7-6700, CPU 2.40GHz, 4GB RAM, and Windows 7 64-bit operating system; the server's specific configuration was: E7-4820v4, 256GB RAM, and Linux Ubuntu 64-bit operating system.

[0140] The specific procedure for this experiment is as follows:

[0141] Step 1: Build a hardware and software hybrid prompt template for data transaction scenarios.

[0142] Step 1.1: Extract m pseudo-cue words {u1,…um} from the BERT vocabulary S as soft cue templates ST.

[0143] Step 1.2: Extract the co-occurrence word set C = {g1, ... gc} of xi, and then calculate the TF-IDF value of each co-occurrence word in the user-data product pair sample.

[0144] The calculation methods for TF, IDF, and TF-IDF are shown in formulas (2), (3), and (4), respectively.

[0145] TF(gi,xi)=nink#2

[0146] Where gi is the i-th co-occurring word, ni is the number of times word gi appears in user-data product pair xi, nk is the number of words in user-data product pair xi, and TF(gi,xi) is the word frequency of co-occurring word gi.

[0147] IDF(gi,X)=logNgn+1#3

[0148] Where N is the total number of user-data product pairs, gn represents the number of user-data product pairs containing the word gi, and the increment operation is to avoid the denominator being 0. IDF(gi,X) is the inverse document frequency of the co-occurring word gi. TF-IDFgi,xi,X is used to measure the importance of co-occurring words in user-data product pairs.

[0149] TF-IDFgi,xi,X=TFgi,,xi*IDF(gi,X)#4

[0150] Co-occurring words are sorted according to TF-IDF values. The sorted co-occurring word set C is then concatenated with placeholders such as [CLS], [SEP], and [MASK] to construct hard cues. Finally, the hard cues are used to structure user-data product pairs to obtain HT.

[0151] Step 1.3: Combine the soft prompt template ST and the hard prompt template HT to form a hybrid soft and hard prompt template DT. The template construction method is shown in formula (5).

[0152] DT=CLS,g1,…gc,ST,MASK,p,SEP,q,SEP#5

[0153] In this context, [CLS], [SEP], and [MASK] are placeholder characters, gi is the i-th co-occurring word in the sample, c is the number of co-occurring words, ST is the soft suggestion template, p is the user requirement description, and q is the data product description.

[0154] Step 2: Calculate the vector representation of user requirement description and data product description.

[0155] Step 2.1: The input of each word in the soft prompt is taken as one time step. For each time step t (t = 1, 2, 3...), the forward LSL memory network outputs the hidden state ht, and the backward LSL memory network outputs the hidden state ht. The vectors of the two hidden states are concatenated to obtain the feature vector ht2BLSTM for each character. The soft prompt word vector encoding method is shown in formula (6).

[0156] ht2BLSTM = ht, ht#6

[0157] The soft cue feature vector is obtained by merging the forward and reverse end output vectors of the BiLSTM layer, as shown in Equation (7). l is the soft cue template length.

[0158] Hs=h12BLSTM,h22BLSTM,…hl2BLSTM#7

[0159] Hs is processed through a feedforward neural network to obtain the soft cue representation Es, which is calculated as shown in Equation (8).

[0160] Es=tanhwTHs+b#8

[0161] Where wT is the weight, b is the bias term, and the activation function is the tanh function.

[0162] Step 2.2: Use BERT to encode the HT text sequence to obtain the text sequence representation Eht. Input {ht1,ht2,…,htn}, output {ht1,ht2,…,htn}. The BERT encoding method is shown in formula (9).

[0163] hti=BERThti,i∈[1,…,n]#9

[0164] in, is the sequence hidden state vector of the BERT embedding layer. n is the length of the HT text sequence.

[0165] After encoding the characters in HT sequentially, all character vectors are concatenated to obtain the text sequence representation Eht. The concatenation algorithm is shown in formula (10).

[0166]

[0167] Step 2.3: The soft cue representation Es and the text sequence representation Eht are fused through a gating unit to obtain the representation Eo. Based on the concatenated text representation, the gating weights gs and ght of the soft and hard cues are generated through a fully connected layer, and the calculation method is shown in Equation (11).

[0168]

[0169] Where ⊕ represents the concatenation operation, Es is the representation vector of the soft cue ST, and Eht is the representation vector of the text sequence HT. The calculation method of gating unit fusion is shown in formula (12).

[0170] E o =g s ·E s +g ht ·E ht #(12)

[0171] The sequence representation Eo is further feature-extracted using the Transformer-based BERT model to obtain the user-data product text representation Et.

[0172] Step 3: Extract multi-scale text semantic features.

[0173] Step 3.1: Use convolutional kernels of different scales to extract the feature matrix of the semantic meaning of the user-data product pair text. Perform convolution operations on \(E_t\in\mathbb{R}^{L\times D}\) using \(K\) filters to obtain \(K\) feature matrices, and then use zero-padding to make the scales of the feature matrices consistent. The convolution calculation method is shown in Equation (13).

[0174] U_i = f(w_i*E_t + b_i), i\in\{1,\cdots,K\} \tag{13}

[0175] Where \(U_i\) is the feature matrix obtained through convolution operations, \(f\) is the activation function, \(w_i\) is the weight value, \(b_i\in\mathbb{R}\) is the bias term, \(K\) is the number of convolutional kernels, \(U_i\in\mathbb{R}^{L\times D}\), \(L\) is the length of the text sequence, and \(D\) is the word embedding dimension value.

[0176] Step 3.2: Fuse the \(K\) feature matrices in an element-wise addition manner to obtain a new feature matrix \(U\in\mathbb{R}^{L\times D}\). The feature matrix fusion method is shown in Equation (14).

[0177] U=\sum_{i = 1}^{K}U_i, i\in\{1,\cdots,K\} \tag{14}

[0178] Then perform global average pooling on the feature matrix \(U\) to obtain the vector \(s\). Its purpose is to reduce the dimension of features, reduce noise in feature mapping, and increase the robustness of the model. The global average pooling calculation method is shown in Equation (15).

[0179] s_c=\frac{1}{L}\sum_{i = 1}^{L}\sum_{j = 1}^{L}U_{i,j} \tag{15}

[0180] Where \(s_c\) is the \(c\)-th element of \(s\), \(s\in\mathbb{R}^{D\times1}\), and \(s\) is a column vector with \(D\) elements.

[0181] Input \(s\) into a fully connected layer for dimensionality reduction to obtain the compressed representation \(z\). \(z\in\mathbb{R}^{d\times1}\), \(d < D\). The dimensionality reduction calculation method is shown in Equation (16).

[0182] z=\delta(B(w_z*s + b_z)) \tag{16}

[0183] Where \(\delta\) is a ReLU function, \(B\) is a batch normalization function, \(w_z\) is the weight value, \(b_z\in\mathbb{R}\) is the bias term, and the calculation method of the value of \(d\) is shown in Equation (17).

[0184] d=\max\{L_r,L_d\} \tag{17}

[0185] Where \(r\) is a hyperparameter used to control the scaling ratio, and \(L_d\) represents the minimum value of \(d\), which is generally set to 32.

[0186] Step 3.3: Use the attention mechanism to assign different weight values ​​to the feature matrices, and fuse the weighted feature matrices to obtain the user-product text semantic features. The following algorithm steps take two branches as an example, that is, K=2, and two convolutional kernels can extract two feature matrices. Before model training, initialize A, B∈RL×d, Ac, Bc are the nth row elements of A and B respectively, and Ac, Bc∈R1×d. The attention weight of the first feature matrix is ​​calculated as shown in formula (18). The weight of the second feature matrix is ​​calculated as shown in formula (19).

[0187] ac=eAczeAcz+eBcz#18

[0188] bc = ebczeAcz + eBcz#19

[0189] Where, z∈R d×1 The compressed representation vector is obtained from step 3.2. a, b∈R1×L is the attention weight matrix, ac and bc are the c-th elements of a and b respectively, ac and bc are normalized values, and ac+bc=1.

[0190] Weights are assigned to the feature matrices on different branches using a and b, and the weighted feature matrices are then fused to obtain the textual semantic features of the user-data product pair. The textual semantic feature fusion method is shown in formula (20).

[0191] Ev=ac·Ua+bc·Ub#20

[0192] Where ac is the c-th element of a, Ua∈RL×D is the feature matrix of the first branch, bc is the c-th element of b, and Ub∈RL×D is the feature matrix of the second branch. Finally, the user-data product text semantic feature vector Ev∈RL×D is obtained. The pseudocode for the multi-scale attention convolutional network is shown in Table 1.

[0193] Table 1 Multi-scale attention convolutional network algorithm

[0194]

[0195] Step 4: Optimize the classification model using the joint loss combining mask word prediction loss and classification loss. The specific process of the objective function optimization module is as follows:

[0196] The mask word semantic features Emask are extracted from the text semantic features Ev of the user-data product. Then, the category probabilities are predicted using Emask and Ev respectively. The probability prediction calculation method is shown in formulas (21) and (22).

[0197] pa=σW1Emask+b1#21

[0198] pb=σW2Ev+b2#22

[0199] Where σ is the softmax activation function, W1, W2, b1, b2 are the weight matrices of the fully connected layer, pa is the probability of the [MASK] predicted value in the cue template, and pb is the probability of the predicted value of the user-data product for the relationship category.

[0200] Then, the user-data product matching discrimination model is trained using joint loss. The joint loss consists of two parts: mask word prediction loss and classification loss. The joint loss function is shown in formula (23), the mask word prediction loss function is calculated as shown in formula (24), and the classification loss function is shown in formula (25).

[0201]

[0202] in, This is the joint loss value, where ρs is the weighting coefficient of the mask word prediction loss. ρc is the mask word prediction loss value, and ρc is the classification loss weight coefficient. It is the classification loss value.

[0203]

[0204] Where yia is the sign function, yia = 1 if the mask word [MASK] of the i-th sample is the word represented by a, otherwise yia = 0. pia represents the probability that the mask word [MASK] of the i-th sample is predicted to be the word a. SM is the BERT vocabulary length, and N is the number of samples.

[0205] To address the class imbalance problem in user-data product matching scenarios, Focal Loss is used as the classification loss, adaptively adjusting the contribution of samples to the loss so that the model focuses on hard samples.

[0206]

[0207] Where pib represents the probability that sample i belongs to class b, α is the balancing class weight, γ is the focus factor used to adjust the weights of easy and difficult samples, and M is the number of relation classes, which is set to 2 in this model.

[0208] During the training phase, the loss is continuously calculated and backpropagated through the above process to update the parameters. The network parameters of the three modules—user-data product representation learning, multi-scale text semantic feature extraction, and objective function optimization—are all updated, ultimately resulting in a well-trained user-data product matching discrimination model.

[0209] During the testing phase, the test sample xi is input, and the user-data product pair is first structured using the prompt template before being input into the model. Calculate the probability value of a user-data product pair belonging to each relation category, and output the relation category y corresponding to the highest probability value as the result.

[0210] Test Results: Based on a user-data product matching method that combines multi-scale text semantics, the present invention achieved a user-data product matching accuracy of 91.3% in a self-built dataset of a data trading platform, demonstrating good performance in the user-data product matching task.

[0211] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A user and data product matching method combining multi-scale text semantics, characterized by: include, Obtain user requirement descriptions and data product descriptions, and construct text input templates; The user requirement description and data product description are encoded based on the text input template to obtain a text representation; Multi-scale feature extraction is performed on the text representation to obtain multi-scale text semantic features; Based on the multi-scale text semantic features, a classification model is used to determine the matching degree between users and data products.

2. The user and data product matching method combining multi-scale text semantics as described in claim 1, characterized in that: The construction of the text input template includes: Select prompt words from a preset vocabulary list to construct the first type of prompt template; Extract keyword sets from user demand descriptions and data product descriptions, and sort the keywords according to their importance. A second type of prompt template is constructed based on the sorted keywords; the first type of prompt template and the second type of prompt template are combined to form the text input template.

3. The user and data product matching method combining multi-scale text semantics as described in claim 2, characterized in that: The encoding process for the user requirement description and data product description based on the text input template includes: The first type of prompt portion in the text input template is sequence encoded to obtain a first encoded representation; The second type of prompt portion in the text input template is encoded using a language model to obtain a second encoded representation; A fusion weight is generated based on the correlation between the first encoding representation and the second encoding representation; Based on the fusion weights, the first encoding representation and the second encoding representation are weighted and combined to obtain the fusion representation; The fused representation is subjected to feature transformation to generate the text representation.

4. The user and data product matching method combining multi-scale text semantics as described in claim 3, characterized in that: The multi-scale feature extraction of the text representation includes: The text representation is processed using multiple receptive field feature extractors to obtain multiple feature maps; Perform dimension alignment processing on the multiple feature maps; The dimension-aligned feature maps are then aggregated to obtain aggregated feature maps.

5. The user and data product matching method combining multi-scale textual semantics as described in claim 4, characterized in that: The multi-scale feature extraction also includes: The aggregated feature map is then subjected to global feature summarization to obtain a feature vector; The importance weights for each scale are calculated based on the feature vectors. The feature maps at different scales are weighted and fused according to the importance weights to obtain the multi-scale text semantic features.

6. The user and data product matching method combining multi-scale text semantics as described in claim 5, characterized in that: The process of determining the matching degree between users and data products based on the multi-scale text semantic features and a classification model includes: Extract discriminant features from the multi-scale text semantic features; Based on the discriminative features, predict the matching category between the user and the data product; The classification model is trained by combining multiple loss functions.

7. The user and data product matching method combining multi-scale textual semantics as described in claim 6, characterized in that: The loss function includes a classification loss function and an auxiliary task loss function; the classification loss function achieves differentiated processing of samples of different difficulties by adjusting parameters, including: For easily classified samples, reduce their weight in the total loss; For hard-to-classify samples, increase their weight in the total loss; The loss contribution of different class samples is adjusted by class balancing parameters.

8. A user-data product matching system combining multi-scale textual semantics, employing the user-data product matching method combining multi-scale textual semantics as described in any one of claims 1 to 7, characterized in that, include: The text template building module is used to obtain user requirement descriptions and data product descriptions to build text input templates; The text encoding module is used to encode the user requirement description and data product description based on the text input template to obtain a text representation. The multi-scale feature extraction module is used to extract multi-scale features from the text representation to obtain multi-scale text semantic features. The matching and discrimination module is used to determine the matching degree between users and data products based on the multi-scale text semantic features and through a classification model.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the user and data product matching method combining multi-scale textual semantics as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the user and data product matching method combining multi-scale textual semantics as described in any one of claims 1 to 7.