Middle station service recommendation method and device and electronic equipment
Through a middle-end business recommendation model based on preset technical fields and small sample data, combined with semantic completion and feature extraction, the problem of low accuracy of middle-end business recommendation is solved, efficient middle-end business recommendation is achieved, and learning costs are reduced. and improved reuse rate.
Patent Information
- Application Number
- CN202311306664.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-09
- Publication Date
- 2024-10-18
AI Technical Summary
Due to the small amount of historical data in the middle office business, the existing recommendation methods cannot make accurate recommendations, resulting in a low reuse rate, high learning costs for product managers, and low efficiency, resulting in no one available in the middle office or little use.
A mid-stage business recommendation model trained based on corpus data in preset technical fields and small-sample mid-stage data is used, including a semantic completion module, a semantic parsing module and a business matching module. Through the mask language model, low-level and high-level semantic feature extraction, Combined with the self-attention mechanism, it identifies user needs and recommends target mid-end services.
There is no need to analyze user historical behavior data, which improves recommendation accuracy, reduces learning costs, improves middle-end business reuse rate and efficiency, and meets user needs.
Smart Images

Figure CN118797327A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of business support technology, and in particular to a middle-office business recommendation method, device and electronic device. Background Art
[0002] In recent years, the concept of middle platform strategy has prevailed. With the development of the Internet industry and technology, each enterprise has created its own middle platform model, empowered output through its own practice, and quickly built scenario-based applications, digital assets and other forms to form differentiated competition, becoming an important soft power in industry competition. In order to meet the actual needs of applications and businesses, exploring and integrating the best solutions from the large amount of precipitation of the middle platform to form rapid delivery is the ultimate value embodiment of the current middle platform empowerment, that is, how much reconstruction costs are reduced, how much new value is created by reuse, and the overall efficiency of the accompanying process is improved. However, in actual operations, business personnel value value, product managers focus on solutions, and technical personnel immerse themselves in technology. There are barriers in different fields in information understanding, resulting in the value of middle platform empowerment is still at a low level, and the reuse rate is extremely low. In order to solve the information understanding barrier, product managers often have to spend a lot of energy to learn the existing precipitation of the middle platform, with high learning costs and low efficiency. It is better to design and develop from 0 to 1 with high efficiency, which leads to the situation where no one is available or rarely used in the middle platform. To this end, there is an urgent need for a method and tool that can quickly recommend middle-office capabilities to product managers so that product managers can directly adopt and form solutions to balance efficiency requirements and middle-office value.
[0003] The existing recommendation methods are mainly divided into two categories, as follows:
[0004] (1) Collaborative filtering recommendation: It mainly matches similar items and user preferences based on a large amount of data to ensure consistency, such as the principle of "birds of a feather flock together", and provides filtering results as recommendations.
[0005] (2) Sequential recommendation based on deep learning: It mainly uses the user's historical behavior sequence to predict the user's next interaction. This method is widely used in information flow systems (such as news, video, advertising, etc.).
[0006] However, the middle platform is an emerging business with less relevant historical data. The above recommendation method requires a large amount of historical accumulated data such as similar items and users before horizontal matching and recommendations can be made. When it is difficult to obtain historical data, accurate recommendations cannot be made. Summary of the invention
[0007] The embodiments of the present application provide a middle-office business recommendation method, device and electronic device to address the defect that the middle-office is an emerging business with less relevant historical data, and the recommendation model trained using the existing recommendation method has large errors and cannot perform accurate recommendations.
[0008] In a first aspect, an embodiment of the present application provides a middle platform service recommendation method, including:
[0009] Obtain user needs;
[0010] Input the user demand into the middle platform service recommendation model, obtain the target middle platform service output by the middle platform service recommendation model, and recommend the target middle platform service to the user;
[0011] Among them, the middle platform business recommendation model is determined based on corpus data in a preset technical field and a small sample of middle platform data.
[0012] In one embodiment, the middle platform business recommendation model includes a semantic completion module, a semantic parsing module and a business matching module;
[0013] The semantic completion module is determined based on corpus data in a preset technical field and a small sample of middle platform data, and is used to semantically complete the user needs in order to identify the user needs;
[0014] The semantic parsing module is used to extract features of the user requirements after semantic completion to obtain semantic features;
[0015] The business matching module is used to determine the target middle platform business according to the semantic features.
[0016] In one embodiment, the semantically completing the user requirement includes:
[0017] Performing semantic completion on the user demand based on a pre-trained masked language model;
[0018] The training step of the masked language model includes:
[0019] Based on the corpus data in the preset technical field and the preset mask adjustment rules, a pre-trained quasi-masked language model is obtained;
[0020] The quasi-masked language model is trained based on the middle station data of a small sample to obtain the masked language model.
[0021] In one embodiment, extracting features from the semantically completed user requirements to obtain semantic features includes:
[0022] Extracting the completed low-level semantic features of the user's needs based on the pre-trained low-level semantic model;
[0023] Extracting high-level semantic features corresponding to the user's needs from the low-level semantic features based on a pre-trained high-level semantic model;
[0024] The low-level semantic features and the high-level semantic features are fused based on a pre-trained semantic fusion model to obtain the semantic features.
[0025] In one embodiment, the low-level semantic model includes a word embedding layer, a context encoding layer, and a low-level semantic information layer;
[0026] The word embedding layer is used to convert the user demand into a user demand vector based on a preset word vector model;
[0027] The context encoding layer is used to determine the first context representation feature and the second context representation feature corresponding to the user demand vector based on a bidirectional neural network;
[0028] The low-level semantic information layer is used to obtain the low-level semantic features according to the first context representation features and the second context representation features.
[0029] In one embodiment, the high-level semantic model includes a bidirectional attention layer and a high-level semantic information layer;
[0030] The bidirectional attention layer is used to fuse the first context representation feature and the second context representation feature to obtain a concatenated context representation feature;
[0031] The high-level semantic information layer is used to extract the high-level semantic features from the context representation features based on a self-attention mechanism.
[0032] In one embodiment, the semantic fusion model includes an activation function and a gating unit;
[0033] The activation function is used to process the low-level semantic features and the high-level semantic features respectively based on a preset weight matrix to obtain initial semantic features;
[0034] The gating unit is used to adjust the initial semantic feature based on a preset weight to obtain the semantic feature.
[0035] In one embodiment, determining the target middle platform service according to the semantic feature includes:
[0036] Performing a convolution operation on the semantic features to obtain a semantic feature map;
[0037] Performing a pooling operation on the semantic feature map to obtain a final semantic feature;
[0038] Classifying the final semantic features to obtain the target middle platform business;
[0039] Among them, the target middle platform services are sorted according to their relevance to the final semantic features.
[0040] In a second aspect, the embodiment of the present application further provides a middle platform service recommendation device, including:
[0041] Acquisition module, used to obtain user needs;
[0042] A recommendation module is used to input the user demand into the middle platform service recommendation model, obtain the target middle platform service output by the middle platform service recommendation model, and recommend the target middle platform service to the user;
[0043] Among them, the middle platform business recommendation model is determined based on corpus data in a preset technical field and a small sample of middle platform data.
[0044] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a middle-office service recommendation method as described above is implemented.
[0045] The middle-office business recommendation method, device and electronic device provided in the embodiments of the present application obtain user needs; input the user needs into the middle-office business recommendation model, obtain the target middle-office business output by the middle-office business recommendation model, and recommend the target middle-office business to the user; wherein the middle-office business recommendation model is determined based on corpus data in a preset technical field and a small sample of middle-office data. The embodiments of the present application obtain the middle-office business recommendation model through training with corpus data in a preset technical field and a small sample of middle-office data. The model has domain characteristics and can effectively identify user needs without analyzing user historical behavior data and preferences, thereby improving the recommendation accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 It is a flowchart of the middle platform business recommendation method provided in the embodiment of the present application;
[0048] Figure 2 It is a structural diagram of the middle platform business recommendation model provided in the embodiment of the present application;
[0049] Figure 3 This is a schematic diagram of the workflow of the semantic completion module provided in the embodiment of the present application;
[0050] Figure 4It is a schematic diagram of the pre-training process of the pre-training model provided in the embodiment of the present application;
[0051] Figure 5 is a schematic diagram of the structure of the masked language model provided in an embodiment of the present application;
[0052] Figure 6 It is a flowchart of semantic feature extraction provided by an embodiment of the present application;
[0053] Figure 7 It is a structural diagram of a low-level semantic model provided in an embodiment of the present application;
[0054] Figure 8 It is a flowchart of a high-level semantic model provided in an embodiment of the present application;
[0055] Fig. 9 It is a flowchart of the self-attention mechanism provided in the embodiment of the present application;
[0056] Fig.10 It is a flowchart of the semantic fusion model provided in the embodiment of the present application;
[0057] Fig.11 It is a flowchart of the business matching module provided in the embodiment of the present application;
[0058] Fig.12 It is a principle block diagram of the middle platform business recommendation device provided in an embodiment of the present application;
[0059] Fig.13 It is a structural diagram of the middle platform business recommendation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0061] Figure 1 is a flow chart of the middle platform service recommendation method provided in the embodiment of the present application, such as Figure 1 As shown, the embodiment of the present application provides a middle platform service recommendation method, including:
[0062] S110, obtaining user needs; the user needs may be in text form or voice form, and if in voice form, the voice is converted into text.
[0063] S120, input the user demand into the middle platform business recommendation model, obtain the target middle platform business output by the middle platform business recommendation model, and recommend the target middle platform business to the user; the middle platform business recommendation model is determined based on corpus data in a preset technical field and a small sample of middle platform data.
[0064] Specifically, the embodiment of the present application constructs a data set by using corpus data in a preset technical field and a small sample of middle platform data to train the deep learning model. Middle platform data refers to data information corresponding to various middle platform services, such as the name of the middle platform service, the function of the middle platform service, the technical field to which the middle platform service belongs, and so on.
[0065] This application does not need to analyze user historical behavior data and preferences. It only needs to identify user needs, determine the technical field to which the user needs belong and the technical effects that need to be achieved, and match the user with a target middle-office business that has a relevance to the needs and reaches a set threshold.
[0066] It can be understood that the embodiment of the present application obtains the middle-office business recommendation model through training of corpus data in a preset technical field and a small sample of middle-office data. The model has domain characteristics and can effectively identify user needs without analyzing user historical behavior data and preferences, thereby improving the recommendation accuracy of the model.
[0067] Figure 2 is a schematic diagram of the structure of the middle platform business recommendation model provided in the embodiment of the present application, such as Figure 2 As shown, in one embodiment, the middle platform business recommendation model includes a semantic completion module, a semantic parsing module and a business matching module;
[0068] The semantic completion module is determined based on the corpus data in the preset technical field and the middle platform data of a small sample, and is used to perform semantic completion on the user needs in order to identify the user needs; a data set is constructed through the corpus data in the preset technical field for pre-training, so that the trained model can achieve domain adaptation, and then the middle platform data of a small sample is used to perform small sample learning on the pre-trained model to improve the training memory of the model, thereby making it easier to identify user needs after semantic completion.
[0069] The semantic parsing module is used to extract features from the user requirements after semantic completion to obtain semantic features; the semantic features may include single-layer semantic features and fused double-layer semantic features.
[0070] The business matching module is used to determine the target middle platform business according to the semantic features. Optionally, the business matching model includes a mapping relationship between various semantic features and various middle platform businesses, and the target middle platform business can be obtained by screening through the mapping relationship.
[0071] It can be understood that the embodiment of the present application constructs a data set by using corpus data in a preset technical field so that the model has domain characteristics, and then uses a small sample of middle-office data for small sample learning, which can effectively identify user needs at the input end, continuously strengthen user intentions, and match users with middle-office services with higher accuracy to meet user needs.
[0072] Figure 3 is a schematic diagram of the workflow of the semantic completion module provided in the embodiment of the present application, such as Figure 3 As shown, in one embodiment, the semantic completion of the user demand includes:
[0073] Performing semantic completion on the user demand based on a pre-trained masked language model;
[0074] The training step of the masked language model includes:
[0075] Based on the corpus data in the preset technical field and the preset mask adjustment rules, a pre-trained quasi-masked language model is obtained;
[0076] The quasi-masked language model is trained based on the middle station data of a small sample to obtain the masked language model.
[0077] Optionally, the semantic completion module includes a pre-trained model, a masked language model and an API call interface. The pre-trained model pre-trains the masked language model based on the corpus data in the preset technical field and the preset mask adjustment rules, so that the masked language model has the characteristics of the middle platform data. The masked language model mainly realizes the text completion function; the API interface includes ModelCall(input) and ModelCall(output), which respectively realize the calling of the model and the return of the completion result.
[0078] Figure 4 is a schematic diagram of the pre-training process of the pre-training model provided in the embodiment of the present application, such as Figure 4 As shown, the pre-training process includes:
[0079] Load a data set consisting of corpus data in a preset technical field;
[0080] Determine the token data in the data set, select a preset proportion of the token data for masking, and adjust the token data based on a preset mask adjustment rule; wherein the mask adjustment rule may be that 10% of the token data remains unchanged, 10% of the token data is randomly replaced, and 80% of the token data is masked;
[0081] Update token data;
[0082] Determine whether the updated token data is a mask. If so, input it into the cross entropy loss function to obtain a pre-trained quasi-masked language model. Otherwise, set the label of the token data to a preset value.
[0083] Optionally, the pre-trained model is also used to perform fusion training on different patterns in PET mode to improve the training effect of the masked language model. PET mode is a semi-supervised training process: the input samples are redesigned into cloze phrases to help the language model understand the given task, and then pseudo labels are generated for a large number of unlabeled examples. Finally, standard supervised training is performed on the pseudo-label training set. The core idea is to add a combination of task prompts and MLM.
[0084] The following table shows the pre-training effect of the masked language model (MLM).
[0085]
[0086]
[0087] The result value corresponding to the above P1-P3 is ACC / F1, where ACC is the accuracy and F1 is the harmonic mean of precision and recall.
[0088] Figure 5 is a schematic diagram of the structure of the masked language model provided in the embodiment of the present application, such as Figure 5 As shown, optionally, after the masked language model is pre-trained with a large amount of corpus data, it has a deeper memory of the language description and language logic in the field, and can complete the input text according to the relevant content and narrow the search scope.
[0089] Optionally, the API call interface mainly implements the call to the masked language model and the return of the text completion result. The code example is as follows:
[0090] The ModelCall interface mainly implements the call to the masked language model and the return of text completion results.
[0091]
[0092] It can be understood that the embodiment of the present application provides a composition scheme of the semantic completion module, which can effectively identify user needs at the input end, continuously strengthen user intentions, and match users with middle-end services with higher accuracy to meet user needs.
[0093] Figure 6 is a flowchart of semantic feature extraction provided by an embodiment of the present application, such as Figure 6 As shown, in one embodiment, the feature extraction of the user demand after semantic completion to obtain the semantic feature includes:
[0094] The low-level semantic features of the completed user needs are extracted based on the pre-trained low-level semantic model; specifically, the low-level semantic features of the user needs are extracted based on the word embedding layer, the encoding layer and the low-level semantic information layer.
[0095] Based on the pre-trained high-level semantic model, high-level semantic features relevant to the user's needs are extracted from the low-level semantic features; specifically, high-level semantic features are extracted through a bidirectional attention layer and a high-level semantic information layer.
[0096] The low-level semantic features and the high-level semantic features are fused based on a pre-trained semantic fusion model to obtain the semantic features.
[0097] Optionally, the low-level semantic model, high-level semantic model and semantic fusion model are all trained by constructing a data set using corpus data in a preset technical field and a small sample of middle-end data.
[0098] It can be understood that the semantic parsing module mainly implements text encoding and semantic parsing functions, obtains low-level semantic features and high-level semantic features, and improves feature description and attribute information.
[0099] Figure 7 is a schematic diagram of the structure of the low-level semantic model provided in the embodiment of the present application, such as Figure 7 As shown, in one embodiment, the low-level semantic model includes a word embedding layer, a context encoding layer, and a low-level semantic information layer;
[0100] The word embedding layer is used to convert the user demand into a user demand vector based on a preset word vector model; specifically, according to the characteristics of the middle platform data, in order to fully vectorize it, the word embedding layer uses the Word2vec model to add a paragraph vector as part of the input to participate in the training, so that the vectorization of the module is more accurate, and PV_DM can be used to train sentence vectors.
[0101] Word2Vec is a natural language processing technique for converting words into vector representations based on the distribution assumption that words in the same context have similar meanings.
[0102] PV_DM stands for Paragraph Vector Distributed Memory, which is a vector representation model based on text paragraphs. It is an extension of the Word2Vec model and is used to convert entire text paragraphs (such as sentences, paragraphs, or documents) into vector representations of fixed dimensions.
[0103] In the PV_DM model, each text paragraph is considered as an independent entity, rather than just the words in it. The model is trained to learn the vector representation of each paragraph to capture the semantic and contextual information of the paragraph. The vector representation can be used to measure the similarity between paragraphs, perform text classification, generate summaries, and other tasks.
[0104] The context encoding layer is used to determine the first context representation feature and the second context representation feature corresponding to the user demand vector based on a bidirectional neural network; the context encoding layer obtains the context representation of the two paragraphs of text based on the word embedding matrix obtained in the upper layer through a bidirectional neural network, and fully explores the context relationship features of the capability description segment. For example, the first context representation feature refers to the context representation H of the business description segment A, and the second context representation feature refers to the context representation P obtained by matching the scenario demand segment B through the encoding layer.
[0105] The low-level semantic information layer is used to obtain the low-level semantic features according to the first context representation features and the second context representation features. The low-level semantic information layer is to initially integrate the two sentences of the business description segment A and the matching scenario requirement segment B to obtain the low-level semantic features. The calculation formula is:
[0106] V = P softmax(S T );
[0107] Among them, S is the similarity matrix of the context encoding information of the two sentences, and P is the context obtained by matching the scenario-based demand segment B through the encoding layer.
[0108] It can be understood that the embodiment of the present application provides a scheme for constructing a low-level semantic model, which uses the word2vec algorithm to construct a weight graph and additionally adds paragraph vectors to describe the overall attributes of the business, thereby being able to accurately obtain low-level semantic features.
[0109] Figure 8 is a flow chart of a high-level semantic model provided in an embodiment of the present application, such as Figure 8 As shown, in one embodiment, the high-level semantic model includes a bidirectional attention layer and a high-level semantic information layer;
[0110] The bidirectional attention layer is used to fuse the first context representation feature and the second context representation feature to obtain a concatenated context representation feature;
[0111] Specifically, the bidirectional attention layer fuses the attention information of the first context representation feature and the second context representation feature in two directions, so that the attention information is sufficiently accurate and fits, and the attention weight is adjusted using bidirectional attention, and a new text representation is obtained after splicing, thereby achieving the basic fusion of the bidirectional semantic information of the AB text.
[0112] A→B:∝ t =softmax(S t: )∈R m ,q :t =∑ j ∝ tj P :j ;
[0113] B→A:γ=softmax(max col (S))∈R n ,c=∑ t b t A t: ∈R 2d ;
[0114] Among them, m represents the word embedding dimension, R represents the vector dimension, and α t Normalize each row of S to get the attention weight of each row, and then perform weighted summation with each column of B to get q :t , after concatenation, we get a new text representation Q; γ is the normalized processing of the column with the largest value in S, and the weighted summation of A is extended to n time steps to get c.
[0115] By concatenating the attention in the above two directions, we get the concatenated context representation G = R 8d×n , calculated as follows:
[0116] G :t =β(C :t ,A :t ,Q :t ),β(c,h,q)=[h;q;h⊙q;h⊙c]∈R 8d ;
[0117] Wherein, β is an attention concatenation function, and the high-level semantic information layer is used to extract the high-level semantic features from the context representation features based on the self-attention mechanism.
[0118] Fig. 9 is a flow chart of the self-attention mechanism provided in the embodiment of the present application, such as Fig. 9As shown in the figure, in order to fully mine the characteristic information of business data, V1 and V2 fully consider their own internal information, set high-level semantics to deeply understand the text, and generate high-level semantic information. Therefore, in this layer, the self-attention mechanism is used to capture the deep semantic information of the text. This solves the problem of weak semantic expression ability. The calculation formula is as follows:
[0119] E=G T G, Z=G·softamx(E),U=BiLSTM(Z);
[0120] First, the similarity matrix E∈R between texts is calculated n×n ; Secondly, normalization is performed to obtain the attention weight; after weighted summation, the self-attention representation Z∈R of the text is obtained 8d×n , high-level semantic information U∈R is obtained through bidirectional LSTM 2d×n .
[0121] It can be understood that the embodiment of the present application provides a technical solution of a high-level semantic model, which can fully express the deep feature information of the text, thereby further enhancing the recommendation hit rate.
[0122] Fig.10 is a schematic diagram of the structure of the semantic fusion model provided in the embodiment of the present application, such as Fig.10 As shown, in one embodiment, the semantic fusion model includes an activation function and a gating unit;
[0123] The activation function is used to process the low-level semantic features and the high-level semantic features respectively based on a preset weight matrix to obtain initial semantic features;
[0124] The gating unit is used to adjust the initial semantic feature based on a preset weight to obtain the semantic feature.
[0125] In order to fully express the feature information of business data and avoid deviation in semantic extraction, the semantic information is combined with the weight matrix for preliminary processing through the activation function, and then the gating unit g is designed to adjust the weight information. Finally, the fused semantic information L is obtained by summing up the proportions, so as to improve the accuracy of feature extraction and achieve high-quality recommendations.
[0126] The calculation formula of the fusion function z=fusion(x,y) is as follows:
[0127]
[0128]
[0129] Among them, W1 and W2 are weight matrices; g is a gating mechanism used to control the proportion of the intermediate vector in the output vector, fuse the high-level semantic information U and the low-level semantic information V, and obtain the fused semantic information L∈R n×2d , which is calculated as:
[0130] L=(fusion(U,V)) T .
[0131] The calculation part of the fusion function is the function definition, L is obtained by substituting x=U, y=V into the fusion function, tanh is the function, and ⊙ is the Hadamard product.
[0132] Fig.11 is a flow chart of the business matching module provided in the embodiment of the present application, such as Fig.11 As shown, in one embodiment, determining the target middle platform service according to the semantic feature includes:
[0133] Performing a convolution operation on the semantic features to obtain a semantic feature map;
[0134] Performing a pooling operation on the semantic feature map to obtain a final semantic feature;
[0135] Classifying the final semantic features to obtain the target middle platform business;
[0136] Among them, the target middle platform services are sorted according to their relevance to the final semantic features.
[0137] Specifically, the business matching module uses a convolutional neural network to extract features, performs maximum pooling on the feature map, and then performs matching and classification through SoftMax, and finally outputs the recommendation results in sequence.
[0138] ① Perform convolution operation on the fused semantic information L, and the convolution kernel is ω∈R h×2d , where h is the number of words in the sliding window. After the convolution operation, a new feature μ is generated, which is calculated as:
[0139] μ i =f(ω·Z i,i+h-1 + b);
[0140] Among them, f is a nonlinear function; b is a bias term, and the feature map μ is obtained after a series of convolution operations.
[0141] ②Perform the maximum pooling operation on the feature map to obtain e, and the final semantic feature is:
[0142] t=[e 1 ,e 2 ,…,e m ];
[0143] ③ The extracted semantic features are classified through the fully connected layer and the SoftMax function, and finally the recommended business is output in the order of the degree of relevance of the implied relationship.
[0144] y=softmax(W·t+b).
[0145] It can be understood that the embodiment of the present application provides a composition scheme of a business matching module, which sorts the target middle-end businesses in order to improve the accuracy of recommendations.
[0146] The embodiment of the present application proposes a method of adding domain corpus data to perform small sample learning on the masked language model when training it, so that the model has domain characteristics. In this way, the text completion module can be fully utilized, and user needs can be effectively identified from the input end, user intentions can be continuously strengthened, and the capabilities of the middle platform can be close.
[0147] Semantic analysis and feature extraction are the core of the implementation of the embodiment of the present application. The embodiment of the present application designs a fusion function to fuse the text features extracted by the self-attention mechanism. The semantic feature information is fully expressed through activation functions and gating units, which can improve the recommendation quality.
[0148] The embodiment of the present application does not need to generate a model based on user historical behavior data and preference analysis. Through the designed fusion semantic method, the text information and business features contain sufficient semantic information to fully extract and analyze the contained semantic information, thereby achieving the generation of a high-precision model and no longer relying on more relevant data as precipitation.
[0149] The embodiment of the present application continuously strengthens the analysis and recognition of user intentions starting from the input end, and continuously adapts to the user's intention to use the middle-stage capabilities through methods such as text completion. On this basis, a high-level semantic information layer is added based on the self-attention model to fully express the deep feature information of the text, thereby further enhancing the recommendation hit rate, and the recommendation quality in the emerging business of middle-stage capability recommendation is high.
[0150] The middle-station business recommendation device provided in the present application is described below. The middle-station business recommendation device described below and the middle-station business recommendation method described above can be referenced to each other.
[0151] Fig.12 This is a principle block diagram of the middle platform business recommendation device provided by this application, such as Fig.12 As shown, the embodiment of the present application also provides a middle platform service recommendation device, including:
[0152] An acquisition module 1210 is used to acquire user requirements;
[0153] The recommendation module 1220 is used to input the user demand into the middle platform service recommendation model, obtain the target middle platform service output by the middle platform service recommendation model, and recommend the target middle platform service to the user;
[0154] Among them, the middle platform business recommendation model is determined based on corpus data in a preset technical field and a small sample of middle platform data.
[0155] In one embodiment, the middle platform business recommendation model includes a semantic completion module, a semantic parsing module and a business matching module;
[0156] The semantic completion module is determined based on corpus data in a preset technical field and a small sample of middle platform data, and is used to semantically complete the user needs in order to identify the user needs;
[0157] The semantic parsing module is used to extract features of the user requirements after semantic completion to obtain semantic features;
[0158] The business matching module is used to determine the target middle platform business according to the semantic features.
[0159] In one embodiment, the semantic completion module is further used to:
[0160] Performing semantic completion on the user demand based on a pre-trained masked language model;
[0161] The training step of the masked language model includes:
[0162] Based on the corpus data in the preset technical field and the preset mask adjustment rules, a pre-trained quasi-masked language model is obtained;
[0163] The quasi-masked language model is trained based on the middle station data of a small sample to obtain the masked language model.
[0164] In one embodiment, the semantic parsing module is further used to:
[0165] Extracting the completed low-level semantic features of the user's needs based on the pre-trained low-level semantic model;
[0166] Extracting high-level semantic features corresponding to the user's needs from the low-level semantic features based on a pre-trained high-level semantic model;
[0167] The low-level semantic features and the high-level semantic features are fused based on a pre-trained semantic fusion model to obtain the semantic features.
[0168] In one embodiment, the low-level semantic model includes a word embedding layer, a context encoding layer, and a low-level semantic information layer;
[0169] The word embedding layer is used to convert the user demand into a user demand vector based on a preset word vector model;
[0170] The context encoding layer is used to determine the first context representation feature and the second context representation feature corresponding to the user demand vector based on a bidirectional neural network;
[0171] The low-level semantic information layer is used to obtain the low-level semantic features according to the first context representation features and the second context representation features.
[0172] In one embodiment, the high-level semantic model includes a bidirectional attention layer and a high-level semantic information layer;
[0173] The bidirectional attention layer is used to fuse the first context representation feature and the second context representation feature to obtain a concatenated context representation feature;
[0174] The high-level semantic information layer is used to extract the high-level semantic features from the context representation features based on a self-attention mechanism.
[0175] In one embodiment, the semantic fusion model includes an activation function and a gating unit;
[0176] The activation function is used to process the low-level semantic features and the high-level semantic features respectively based on a preset weight matrix to obtain initial semantic features;
[0177] The gating unit is used to adjust the initial semantic feature based on a preset weight to obtain the semantic feature.
[0178] In one embodiment, the business matching module is further used to:
[0179] Performing a convolution operation on the semantic features to obtain a semantic feature map;
[0180] Performing a pooling operation on the semantic feature map to obtain a final semantic feature;
[0181] Classifying the final semantic features to obtain the target middle platform business;
[0182] Among them, the target middle platform services are sorted according to their relevance to the final semantic features.
[0183] Fig.13 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.13As shown, the electronic device may include: a processor 1310, a communication interface 1320, a memory 1330 and a communication bus 1340, wherein the processor 1310, the communication interface 1320, and the memory 1330 communicate with each other through the communication bus 1340. The processor 1310 may call the logic instructions in the memory 1330 to execute the middle station service recommendation method, which includes:
[0184] Obtain user needs;
[0185] Input the user demand into the middle platform service recommendation model, obtain the target middle platform service output by the middle platform service recommendation model, and recommend the target middle platform service to the user;
[0186] Among them, the middle platform business recommendation model is determined based on corpus data in a preset technical field and a small sample of middle platform data.
[0187] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0188] On the other hand, the present application also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the middle platform business recommendation method provided by the above methods, the method including:
[0189] Obtain user needs;
[0190] Input the user demand into the middle platform service recommendation model, obtain the target middle platform service output by the middle platform service recommendation model, and recommend the target middle platform service to the user;
[0191] Among them, the middle platform business recommendation model is determined based on corpus data in a preset technical field and a small sample of middle platform data.
[0192] On the other hand, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by the processor to execute the middle platform service recommendation method provided by the above methods, the method comprising:
[0193] Obtain user needs;
[0194] Input the user demand into the middle platform service recommendation model, obtain the target middle platform service output by the middle platform service recommendation model, and recommend the target middle platform service to the user;
[0195] Among them, the middle platform business recommendation model is determined based on corpus data in a preset technical field and a small sample of middle platform data.
[0196] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0197] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0198] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A middle platform service recommendation method, characterized in that: include: Obtain user needs; Input the user demand into the middle platform service recommendation model, obtain the target middle platform service output by the middle platform service recommendation model, and recommend the target middle platform service to the user; Among them, the middle platform business recommendation model is determined based on corpus data in a preset technical field and a small sample of middle platform data.
2. The middle platform service recommendation method according to claim 1, characterized in that: The middle platform business recommendation model includes a semantic completion module, a semantic parsing module and a business matching module; The semantic completion module is determined based on corpus data in a preset technical field and a small sample of middle platform data, and is used to semantically complete the user needs in order to identify the user needs; The semantic parsing module is used to extract features of the user requirements after semantic completion to obtain semantic features; The business matching module is used to determine the target middle platform business according to the semantic features.
3. The middle platform service recommendation method according to claim 2, characterized in that: The semantically completing the user requirement includes: Performing semantic completion on the user demand based on a pre-trained masked language model; The training step of the masked language model includes: Based on the corpus data in the preset technical field and the preset mask adjustment rules, a pre-trained quasi-masked language model is obtained; The quasi-masked language model is trained based on the middle station data of a small sample to obtain the masked language model.
4. The middle platform service recommendation method according to claim 2, characterized in that: The extracting features of the semantically completed user requirements to obtain semantic features includes: Extracting the completed low-level semantic features of the user's needs based on the pre-trained low-level semantic model; Extracting high-level semantic features corresponding to the user's needs from the low-level semantic features based on a pre-trained high-level semantic model; The low-level semantic features and the high-level semantic features are fused based on a pre-trained semantic fusion model to obtain the semantic features.
5. The middle platform service recommendation method according to claim 4, characterized in that: The low-level semantic model includes a word embedding layer, a context encoding layer and a low-level semantic information layer; The word embedding layer is used to convert the user demand into a user demand vector based on a preset word vector model; The context encoding layer is used to determine the first context representation feature and the second context representation feature corresponding to the user demand vector based on a bidirectional neural network; The low-level semantic information layer is used to obtain the low-level semantic features according to the first context representation features and the second context representation features.
6. The middle platform service recommendation method according to claim 5, characterized in that: The high-level semantic model includes a bidirectional attention layer and a high-level semantic information layer; The bidirectional attention layer is used to fuse the first context representation feature and the second context representation feature to obtain a concatenated context representation feature; The high-level semantic information layer is used to extract the high-level semantic features from the context representation features based on a self-attention mechanism.
7. The middle platform service recommendation method according to claim 4, characterized in that: The semantic fusion model includes an activation function and a gating unit; The activation function is used to process the low-level semantic features and the high-level semantic features respectively based on a preset weight matrix to obtain initial semantic features; The gating unit is used to adjust the initial semantic feature based on a preset weight to obtain the semantic feature.
8. The middle platform service recommendation method according to claim 2, characterized in that: The determining the target middle platform service according to the semantic feature includes: Performing a convolution operation on the semantic features to obtain a semantic feature map; Performing a pooling operation on the semantic feature map to obtain a final semantic feature; Classifying the final semantic features to obtain the target middle platform business; Among them, the target middle platform services are sorted according to their relevance to the final semantic features.
9. A mid-stage service recommendation device, characterized in that: include: Acquisition module, used to obtain user needs; A recommendation module is used to input the user demand into the middle platform service recommendation model, obtain the target middle platform service output by the middle platform service recommendation model, and recommend the target middle platform service to the user; Among them, the middle platform business recommendation model is determined based on corpus data in a preset technical field and a small sample of middle platform data.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the middle platform service recommendation method as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Text implication recognition method fusing high-level semantic information and low-level semantic information
CN113901215A
Insurance product recommendation method and device, computer equipment and storage medium
CN114399396A
Language model pre-training method, result recommendation method and related device
CN114565104A
Treatment scheme recommendation method, device and system and storage medium
CN116189843A
