A government affairs dialogue recommendation method based on multi-dimensional vector fusion

Through multi-dimensional vector fusion technology, combined with multi-modal data feature extraction and deep learning modeling, the problem of low accuracy in understanding user intentions in the government service dialogue system is solved, and more efficient government affairs recommendation is achieved.

CN118227894BActive Publication Date: 2024-09-24北京长河数智科技有限责任公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410413490.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-08
Publication Date
2024-09-24
Estimated Expiration
2044-04-08

AI Technical Summary

Technical Problem

The existing government service dialogue system has low accuracy in understanding user intentions, limited single feature extraction methods, and failure to fully consider users' multi-dimensional behaviors and expressions, resulting in low accuracy of recommendation results.

Method used

Adopt a government affairs dialogue recommendation method based on multi-dimensional vector fusion, collect users' multi-modal data (text, behavior logs, images, audio), perform feature extraction and normalization processing, and use multi-view representation learning algorithms and deep learning to construct model and fuse feature vectors to recommend government affairs items.

Benefits of technology

It improves the accuracy of understanding user intentions and the accuracy of government affairs recommendation, and can capture user needs more comprehensively and provide personalized and accurate government services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118227894B
    Figure CN118227894B
Patent Text Reader

Abstract

The present application discloses a method for recommending government affairs dialogues based on multidimensional vector fusion, which relates to the field of government affairs recommendation technology, including: collecting multimodal data including user text, user behavior logs, images and audio signals; extracting text features using natural language processing methods; extracting user behavior features using statistical methods; extracting image features using computer vision methods; extracting audio features using digital signal processing methods; normalizing the extracted features; using a multi-view representation learning algorithm, taking normalized different types of features as different views, and obtaining weight coefficients of different views through an objective function; obtaining a fused multimodal feature representation based on the weight coefficients; constructing a neural network model, and outputting government affairs recommendation results. In view of the problem of low accuracy in understanding user intent in government service dialogue systems in the prior art, the present application improves the accuracy of government affairs recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of government affairs recommendation, and in particular to a government affairs dialogue recommendation method based on multi-dimensional vector fusion. Background Art

[0002] With the development of the Internet, various government service portals are gradually realizing "one-stop service" and "one-window acceptance", providing convenient services through online platforms, so that the general public can avoid tedious offline running around, which greatly improves the efficiency of obtaining government services. At the same time, the rise of intelligent dialogue robots has created new possibilities for government service dialogues. However, current dialogue robots are still unable to accurately understand users' service needs, which directly affects the quality of government consulting services. Therefore, improving the dialogue system's ability to understand user intentions and realizing personalized government service recommendations is the current direction of technical development.

[0003] The main problem with understanding user intent in existing government service dialogue systems is the limitations of single feature extraction methods, which fail to fully consider user behavior and expression in multiple dimensions. For example, text-based methods may ignore the user's visual and voice features, thereby limiting the understanding of the user's true intent. In addition, due to the lack of a comprehensive feature fusion mechanism, existing systems may not be able to fully explore the potential relevance of information when processing multimodal data, resulting in low accuracy of recommendation results.

[0004] In the related art, for example, Chinese patent document CN116595161A provides a method, device, equipment and storage medium for recommending digital government affairs scenarios, wherein the method includes: obtaining a search text for government affairs scenarios; determining a first recommended scenario from each candidate government affairs scenario based on the semantic similarity between the subject words in the search text and the subject words of each candidate government affairs scenario; determining each hit scenario matching the search text from each candidate government affairs scenario, and based on the item handling records of the target handling subject of each hit scenario, counting the handling subject frequency of each candidate government affairs scenario, and determining a second recommended scenario from each candidate government affairs scenario based on the handling subject frequency; determining the recommended government affairs scenario corresponding to the search text based on the first recommended scenario and the second recommended scenario. However, this solution mainly relies on text matching, resulting in an inaccurate and incomplete understanding of user intent. Summary of the invention

[0005] 1. Technical issues to be solved

[0006] In response to the problem of low accuracy in understanding user intentions in government service dialogue systems in the prior art, the present application provides a government affairs dialogue recommendation method based on multi-dimensional vector fusion, which accurately captures user intentions and improves the accuracy of government affairs recommendation by comprehensively analyzing users' various interactive behaviors and content.

[0007] 2. Technical solution

[0008] The purpose of this application is achieved through the following technical solutions.

[0009] The embodiment of this specification provides a method for recommending government affairs dialogues based on multi-dimensional vector fusion. Data input: collect multimodal data including user text, user behavior log, image and audio signal as the original input of the system. Data preprocessing: perform preprocessing operations such as word segmentation and part-of-speech tagging on user text to obtain structured text data; perform preprocessing operations such as denoising and direction correction on images to obtain standardized image data; perform preprocessing operations such as denoising, endpoint detection, and framing on audio signals to obtain standardized audio data. Feature extraction: extract text features from preprocessed text data using methods such as named entity recognition and keyword extraction; extract image features from preprocessed image data using methods such as optical character recognition and word vector representation; extract audio features from preprocessed audio data using methods such as MFCC and topological graph clustering; extract user behavior features from user behavior logs using methods such as statistical analysis and intention adjustment. Feature normalization: use different normalization strategies to process the extracted text features, image features, audio features and user behavior features, respectively, to make their scale and distribution more consistent. Multi-view fusion: normalize different types of features into a multi-view feature matrix; learn the weight coefficient of each view through the multi-view representation learning algorithm and alternating optimization strategy; use the learned weight coefficient to weightedly fuse the features of different views to obtain the final fused feature vector. Deep learning modeling: input the fused feature vector into the predefined neural network model; learn the nonlinear mapping relationship between features and government affairs through forward propagation and back propagation; use the trained neural network model to predict government affairs recommendations for new input data. Recommendation result output: post-process and visualize the output results of the neural network model to generate the final government affairs recommendation list and present it to the user. The entire data flow can be summarized as: multi-modal data input → data preprocessing → feature extraction → feature normalization → multi-view fusion → deep learning modeling → recommendation result output. Among them, the data flows and interacts between different modules, and after layer-by-layer processing and refinement, it finally forms a feature representation with stronger relevance and semantics to drive downstream recommendation tasks.

[0010] The embodiments of the present specification provide a method for recommending government affairs dialogues based on multi-dimensional vector fusion, including: collecting multimodal data including user text, user behavior logs, images and audio signals; extracting text features from user texts using natural language processing methods; extracting user behavior features from user behavior logs using statistical methods; extracting image features from images using computer vision methods; extracting audio features from audio signals using digital signal processing methods; normalizing the extracted text features, user behavior features, image features and audio features respectively; using a multi-view representation learning algorithm, taking different types of normalized features as different views, and obtaining weight coefficients of different views through an objective function; multiplying feature vectors of different views by corresponding weight coefficients to obtain a fused multimodal feature representation; constructing a neural network model, taking the fused multimodal feature representation as input, and outputting government affairs recommendation results.

[0011] Among them, natural language processing is an important branch of artificial intelligence, which aims to enable computers to understand, generate and process human language. The NLP method uses the theories of computer science and linguistics to develop a series of algorithms and models for analyzing and representing information at multiple levels such as grammar, semantics, and emotions of natural language texts. In this application, natural language processing methods are used to extract key features from user texts. The specific technical routes that can be adopted are: first pre-process the text with methods such as word segmentation and part-of-speech tagging, and then extract the multi-granularity features of the text such as word bags, TF-IDF, topic distribution, named entities, etc., and then reduce the dimension of the features through semantic representation methods such as word vectors and sentence vectors, and finally generate a structured low-dimensional text feature vector to facilitate subsequent feature fusion.

[0012] Among them, computer vision is a discipline that uses computers to simulate human visual functions, allowing machines to "see" and understand the world from images or videos. It integrates theories and technologies from multiple fields such as image processing, pattern recognition, and machine learning, and is committed to giving computers the intelligence to analyze, identify, and track visual objects. In this application, computer vision is used to extract key features from image data. A feasible technical path is to first perform preprocessing such as size normalization and denoising on the image, and then use classic manual features (such as SIFT, HOG) or pre-trained CNN models (such as VGG16, ResNet50) to perform multi-scale and multi-granular feature extraction on the image to obtain a high-dimensional image description vector. In order to highlight the semantic information related to government affairs scenarios, it is also possible to fine-tune and enhance the extracted CNN features in combination with tasks such as scene classification and OCR. Finally, the high-dimensional image features are reduced in dimension and normalized to generate a compact image feature representation.

[0013] Among them, digital signal processing is a discipline that uses digital computers or special devices to represent, transform, extract, enhance, filter, estimate, and other processing of various forms of information. Its processing objects can be various digitized signals such as speech, images, videos, radars, etc. The DSP method uses mathematical tools such as signals and systems, probability theory, and optimization theory to design efficient and practical signal processing algorithms for analyzing the time-frequency domain characteristics of signals, removing noise interference from signals, and restoring the essential content of signals. In this application, digital signal processing is used to extract speech and speaker features from audio data. The technical path can be: first pre-process the original audio by noise reduction, endpoint detection, etc. to obtain a pure speech segment. Then, classic speech features such as MFCC, PLP, Fbank, or speech deep learning models (such as Deep Speaker) are used for feature extraction to capture the acoustic properties of the speech signal such as spectrum, pitch, and formant. Then, voiceprint recognition and other technologies are used to separate the speaker's identity features from the speech. Finally, these speech and speaker features are subjected to feature selection, dimensionality reduction, and normalization to output a standard audio feature vector.

[0014] Furthermore, the text features are extracted from the user text using a natural language processing method, including: performing word segmentation on the input user text to obtain a word sequence {W i}; the word sequence after word segmentation {W i} to perform part-of-speech tagging and obtain the part-of-speech sequence {t i}; Build a named entity recognition model based on conditional random field CRF; transform the word sequence {W i} and the corresponding part-of-speech sequence {t i} as the observation sequence, and input it into the constructed CRF named entity recognition model; take the words and phrases in the government domain dictionary as input features to construct feature templates; use the labeled government text dataset to train the CRF named entity recognition model; input the observation sequence into the trained CRF named entity recognition model, and use the Viterbi algorithm for sequence labeling; obtain the words marked as department entities and article entities from the labeling results, and obtain the named entity features as the first category text features.

[0015] Among them, conditional random fields are a commonly used sequence labeling model in the field of natural language processing. The so-called sequence labeling is to predict the corresponding label sequence (such as part of speech, named entity category) given an observation sequence (such as a word sequence). CRF is a discriminant undirected graph model, which can be regarded as an extension of the maximum entropy Markov model. Unlike generative models (such as hidden Markov models), discriminant models directly model the conditional probability P(y|x), where x is the observation sequence and y is the label sequence. In this application, CRF is used to identify named entities related to departments and articles from user texts. The input observation sequence is the word sequence and its part of speech after word segmentation, and the output label sequence is a named entity label in BMEO format (B means the beginning of the entity, M means the middle of the entity, E means the end of the entity, and O means non-entity). In order to improve the accuracy of recognition, dictionary features in the government affairs field are also incorporated. These prior knowledge can guide the CRF model to pay more attention to domain-related key words and reduce the interference of irrelevant words.

[0016] Among them, the Viterbi algorithm is a dynamic programming algorithm for Hidden Markov Model (HMM) decoding, the purpose of which is to solve the optimal state sequence, that is, to infer the most likely hidden state sequence given the model parameters and observation sequence. The Viterbi algorithm is essentially a heuristic search algorithm based on the maximum a posteriori probability criterion, which uses the idea of ​​dynamic programming to avoid exhaustive search. In this application, the state set of the HMM model is Q = {q1, q2, ..., q N}, the observation set is V = {v1,v2,......,v M}, the state transition probability matrix is ​​A, the observation probability matrix is ​​B, and the initial state probability vector is π.

[0017] Given an observation sequence O={o1,o2,......,o T}, the Viterbi algorithm is to find the optimal state sequence Satisfies I*=argmaxP(I|O)=argmaxP(O,I)=argmaxP(O|I)P(I). Bayesian formula and Markov are used here. P(O|I) represents the likelihood probability of generating an observation sequence given a state sequence, and P(I) represents the prior probability of the state sequence itself. In order to efficiently solve this maximization problem, the Viterbi algorithm defines two auxiliary variables: δ(t,i)=maxP(o1,o2,......,o t ,i1,i2,......,i t =q i ). ψ(t,i) means the state at time t is q i The t-1th node of the path with the highest probability among all single paths, where δ(t,i) represents the node in state q at time t. iThe probability of the local optimal path at the end, ψ(t,i) is the optimal predecessor state of the path at time t-1.

[0018] Using the principle of dynamic programming, these two variables can be recursively calculated: δ(1,i)=πibi(o1), δ(t,i)=max[δ(t-1,j)a ji ]bi(o t ), ψ(t,i)=argmax[δ(t-1,j)a ji ]. Calculate δ and ψ recursively from left to right until the last position T of the observation sequence. At this time, δ(T,i) is the probability of the optimal path ending in state i, and ψ(T,i) is the second to last node of the path. Then, starting from ψ(T,i), by backtracking from right to left, we can get all the nodes of the optimal state sequence I*. This backtracking process is: iT*=argmaxδ[T,i], iT*=ψ(t+1,it+1*), t=T-1, T-2,......,1.

[0019] Furthermore, extracting text features from user text using natural language processing methods also includes: obtaining text data in the government affairs field, performing word segmentation processing, and obtaining word sequences {C i}; Take the government domain dictionary as the candidate feature vocabulary, and count the number of words in the candidate feature vocabulary in the word sequence {C i}, calculate the word frequency TF; count the number of documents containing each word, calculate the inverse document frequency IDF; multiply TF and IDF to get the TF-IDF value of each word as the word weight; build a TF-IDF model based on the word weight, and train the built TF-IDF model; for the word sequence {W corresponding to the input user text i}, use the trained TF-IDF model to calculate the weight value of each word; set the weight threshold, select words with weight values ​​greater than the threshold, and obtain keyword features as the second type of text features; concatenate the first type of text features and the second type of text features as the final text feature vector tf.

[0020] Among them, the government affairs domain dictionary is a vocabulary collection specifically for government affairs field texts, which contains key words such as professional terms, institution names, policies and regulations commonly used in this field. These words usually have clear business semantics and can reflect the subject content of the text. Compared with general dictionaries, the coverage of domain dictionaries is more focused and precise, which helps to improve the effect of text feature extraction and information extraction. In this application, the government affairs domain dictionary is mainly used in two aspects: one is as a feature template for CRF named entity recognition, guiding the model to focus on domain-related entities; the other is as a candidate feature vocabulary for the TF-IDF model to screen out domain-related keywords. It can be seen that the domain dictionary plays a focusing and guiding role, making the text features closer to the government affairs theme and reducing the interference of irrelevant words. Of course, the quality of the domain dictionary largely determines the expressiveness of the text features, so it is necessary to invest a lot of manpower and material resources in the construction and updating of the dictionary.

[0021] Among them, inverse document frequency is a statistical indicator to measure the importance of vocabulary, which is often used in combination with term frequency (TF) to form TF-IDF weight. The basic idea of ​​IDF is that if a word appears in many documents, its discrimination is lower; conversely, if a word only appears in a few documents, its discrimination is higher. In this application, IDF is multiplied by TF to obtain the TF-IDF weight of the word, which is used as the basis for screening keyword features. This weight calculation method combines the local importance (TF) and global importance (IDF) of the word, and can more accurately reflect the contribution of the word to the semantics of the text.

[0022] Among them, TF-IDF is a simple but effective text representation model, which is widely used in information retrieval, text mining and other fields. As the name implies, TF-IDF consists of two parts: term frequency (TF) and inverse document frequency (IDF), which are used to evaluate the importance of vocabulary to the text. The higher the frequency of a word in a document, and the lower the frequency of its appearance in all documents in the entire corpus, the more this word can represent the theme of this document. In this application, the TF and IDF values ​​of each word are first counted in the government affairs corpus to construct a TF-IDF model. Then, the model is used to vectorize the user input text, and keywords with weights greater than the threshold are screened out as text features. It can be seen that the TF-IDF model plays a role in feature selection. By weighting the original vocabulary, the importance of domain-related vocabulary is highlighted, and a large number of redundant and noise vocabulary are filtered out, making the text features more concise and efficient.

[0023] Furthermore, the user behavior characteristics are extracted from the user behavior log using statistical methods, including: analyzing the input user behavior log, obtaining the number of various materials submitted by the user in the process of handling various government affairs, and forming a quantity sequence {m i}, where the number sequence {m i Each element in} corresponds to the number of submitted materials; and obtains the number of times n that users stop handling various government affairs; counts the total number of all materials submitted by users; for the number sequence {m i Each element r in i , calculate the element r i The proportion of submission times of corresponding materials p i =r i / sum; the proportion of submission times of materials p i Sort in descending order to obtain the initial intention sorting sequence q of the user's handling of various government affairs; adjust the initial intention sorting sequence q according to the number of suspension times n to obtain the final user behavior feature sequence r: when n = 0, r = q; when n > 0, move the top K elements in q backward by K places to form the adjusted sequence r; use the user behavior feature sequence r as the user behavior feature uf extracted from the user behavior log.

[0024] Specifically, q is a business intention ranking generated based on the various behaviors of users in the process of handling government affairs (such as querying, clicking, filling out forms, submitting applications, etc.), which reflects the user's preference for different services. The higher the ranking of a business, the more interested the user is in it. However, the user's true intention is not only reflected in explicit behavior, but also implied in random behavior. The so-called random behavior means that the user terminates the current business for some reason during the process of handling the business and turns to handle other businesses. Random behavior usually indicates that the user is not very interested in the current business, or there are some obstacles that prevent the user from completing the current business. Therefore, random behavior itself also contains important information about the user's intention. The core of the above adjustment plan is to correct the user's intention through the number of random behaviors n to obtain more accurate user behavior characteristics.

[0025] Specifically, two situations are set: when n=0, that is, the user does not have any random behavior, q is equivalent to the user's true intention and does not need to be adjusted; when n>0, that is, the user has random behavior. At this time, we must first identify the potential causes of random behavior. Usually, popular services at the front of the sorting are more likely to cause random behavior because they attract a large number of users to try, but users may encounter certain problems and terminate in the actual process. In order to reveal these hidden problems, the scheme adopts a smoothing strategy, that is, the first K elements of q are shifted back K places to obtain an adjusted sequence r. This is equivalent to punishing those services with high random behavior rates, reducing their weights in the intention sorting, and at the same time increasing the weights of services with low random behavior rates. This smoothing method can correct the intention deviation caused by random behavior on the one hand, and on the other hand, it will not over-punish services with high random behavior rates, because they represent the basic preferences of users after all. The smoothed sequence r can more comprehensively and objectively reflect the true attitude of users towards various services.

[0026] Furthermore, image features are extracted from the image using computer vision methods, including: using a Gaussian filtering method to denoise the input image I to obtain a denoised image I'; using a Hough transform method to correct the direction of the image I' to obtain a preprocessed image I"; using the preprocessed image I" as input and inputting it into a pre-trained optical character recognition model OCR; using the OCR model to locate and recognize the text area in the image I" to obtain the text content texts; using a word segmentation algorithm to segment the text content texts to obtain a word sequence words; obtaining the position information of each word in the text content texts to obtain a word position sequence positions; converting the word sequence words into a word vector sequence wv; converting the word position sequence positions into a position vector sequence pv; concatenating the word vector sequence wv and the position vector sequence pv to obtain an image feature vector imf, imf = [wv, pv]; and using the image feature vector imf as the image feature extracted from the input image I.

[0027] Among them, Gaussian filtering is a commonly used image smoothing and denoising method. The Gaussian kernel is slid on the image, and each element in the kernel is multiplied by the pixel value covered by it, and then all the products are added and divided by the sum of the kernel elements to obtain the new value of the center pixel. This process is called convolution. The physical meaning of convolution is to replace the original pixel value with a weighted local average, and the role of the Gaussian kernel is to determine the weights of different neighborhood positions. In this application, Gaussian filtering is used as the first step in image preprocessing to remove noise interference in the input image and provide cleaner and more stable input for subsequent tasks such as direction correction and character recognition. This reflects a basic principle of computer vision tasks, that is, denoising first and then recognition. Gaussian filtering has been widely used in the field of image processing with its simple, efficient and adjustable characteristics.

[0028] Among them, the Hough transform is a classic algorithm for detecting regular shapes (such as straight lines, circles, etc.) in images, and has important applications in tasks such as object recognition and image registration. First, perform edge detection on the image (such as the Canny operator) to obtain a binary edge map; then, for each edge point (x, y), transform it to the parameter space (ρ, θ), and add 1 at the corresponding position (ρ, θ) in the parameter space; in this way, the collinear points in the image space will converge to the same (ρ, θ) point in the parameter space; finally, find the (ρ, θ) point with the highest cumulative value in the parameter space, which corresponds to the most likely straight line in the image space. In this application, the Hough transform is used to correct the direction of the image. This is because, during the shooting or scanning process, the image may be tilted or rotated to a certain extent, which will cause inconvenience to the subsequent character recognition. Using the Hough transform, we can detect the main straight lines in the image (such as the border of the table), calculate their deviation angles from the horizontal direction, and then perform rotation correction on the entire image to make it as horizontal as possible. This preprocessing can reduce the difficulty of character recognition and improve the recognition accuracy.

[0029] Among them, OCR is a type of model used to convert text content in an image into computer-encodable text, such as extracting text from scans and screenshots and converting them into text files. Deep OCR models that can be used include Google's CRNN, Stanford's AttentionOCR, Baidu's RARE, etc. In this application, the OCR model is the core of extracting image features. Its function is to identify all text content from the image, thereby providing a basis for subsequent NLP analysis. In order to ensure the accuracy of OCR, the image is pre-processed by denoising and direction correction. At the same time, considering that the images uploaded by users may be diverse (such as from different scenes and devices), this embodiment uses a pre-trained OCR model, which is trained on large-scale multi-source data and has good generalization performance. Of course, if you want to further improve the pertinence, you can also fine-tune the OCR model on the image data of government affairs scenes.

[0030] Among them, word segmentation is one of the basic tasks of natural language processing, which refers to dividing a continuous text sequence into a series of meaningful vocabulary units. Due to the different ways of vocabulary formation in different languages, word segmentation algorithms are also different. Methods based on string matching, methods based on statistical models, and methods based on deep learning can be used. In this application, word segmentation is an intermediate step in extracting image feature vectors. Its purpose is to further granularize the text content extracted by OCR, converting it from a character sequence to a word sequence, in preparation for subsequent vectorized representation.

[0031] Furthermore, the audio features are extracted from the audio signal using a digital signal processing method, including: using spectral subtraction to perform noise reduction on the input audio signal a to obtain a noise-reduced audio signal a'; performing endpoint detection on the audio signal a' to remove the silent interval to obtain a preprocessed audio signal a"; using a Hamming window method to perform equally spaced frame segmentation on the audio signal a" to obtain an audio signal frame sequence F = {f[1], f[2], ..., f[n]}, where n is the number of frames; using a Mel-frequency cepstral coefficient MFCC algorithm to perform feature extraction on frame f[i] to obtain an audio feature vector v[i] of the corresponding frame; combining the audio feature vectors v[i] of all frames into an audio feature matrix V; calculating the Euclidean distance between vectors in the audio feature matrix V to generate a distance matrix D: Where D[i,j] represents the Euclidean distance between the audio feature vectors of the i-th frame and the j-th frame; the multidimensional scaling algorithm MDS is used to reduce the dimension of the distance matrix D to obtain the reduced-dimensional audio signal symbol graph matrix G, where each row of G corresponds to the coordinate of an audio signal in the reduced-dimensional space.

[0032] Among them, spectral subtraction is a classic single-channel speech denoising algorithm, and its basic idea is to subtract the estimated spectrum of noise from the noise-contaminated speech spectrum to obtain the spectrum estimate of pure speech. In this application, a short-time Fourier transform (STFT) is performed on the noisy speech signal to obtain its spectrum; the noise is estimated. Usually the noise is additive, stable, and unrelated to the speech. Then the spectrum of the noise is estimated in the non-speech segment of the speech (i.e., the silent segment or background segment); the estimated noise spectrum is subtracted from the spectrum of the noisy speech to obtain the spectrum estimate of the pure speech; the spectrum after subtraction is post-processed, such as introducing a gain factor, correcting negative values, etc., to reduce the music noise after spectral subtraction; the corrected spectrum is inverse Fourier transformed to obtain the denoised time domain speech signal. Spectral subtraction is the first step in audio preprocessing, and its purpose is to eliminate the impact of environmental noise on speech quality. This helps to improve the performance of subsequent feature extraction and pattern recognition.

[0033] Among them, endpoint detection is one of the preprocessing steps of speech recognition, and its purpose is to accurately detect the starting point and ending point of speech from a continuous speech stream, and then separate speech from non-speech (i.e., silence or background noise). In this application, the short-time energy of the speech signal is calculated, and when the energy exceeds a certain threshold, it is judged as speech, otherwise it is non-speech; the zero-crossing rate of the speech signal is calculated, and when the zero-crossing rate is lower than a certain threshold, it is judged as speech, otherwise it is non-speech; combining energy and zero-crossing rate, a double threshold decision rule is designed to improve the reliability of detection; the preliminary decision results are smoothed to eliminate short-term mutations and obtain the final speech endpoint. Endpoint detection is used to remove silent segments in audio signals and only retain speech segments that may contain keywords. This preprocessing can greatly reduce the amount of data for subsequent feature extraction and speed up processing. At the same time, removing silent segments is equivalent to further reducing noise, so it helps to extract more reliable audio features.

[0034] Among them, the Hamming window is a commonly used time domain windowing function, which is often used for short-time analysis of non-stationary signals such as speech. The so-called short-time analysis is to divide a long time domain signal into a series of short time segments (i.e. frames), and then perform frequency domain transformation on each frame signal to obtain its spectrum or inverse spectrum, and then perform subsequent feature extraction and pattern recognition. The window function can use rectangular window, triangular window, Hamming window, Hening window, etc. In this application, the Hamming window is used to frame the audio signal, on the one hand, to facilitate the extraction of short-time features of speech and to characterize its local frequency change pattern; on the other hand, it is also to cooperate with the subsequent MFCC feature extraction. The MFCC feature characterizes the spectral envelope of speech and is more sensitive to stability. Windowing can enhance the stability of speech in the frame and provide a better premise for spectrum analysis. At the same time, the continuity between frames is maintained through a certain overlap to reduce the loss of information.

[0035] Among them, MFCC is a commonly used method for representing speech features. In this application, since the high-frequency part of the speech signal is usually small in amplitude and easily submerged by noise, it is necessary to compensate the high-frequency part to improve the signal-to-noise ratio. Pre-emphasis can be achieved with a first-order high-pass filter: H(z) = 1-az -1 ,0.9<a<1, where a is the pre-emphasis coefficient, usually around 0.97. Frame windowing. Divide the speech signal into a series of short frames and multiply each frame by a Hamming window to enhance the intra-frame stationarity. Short-time Fourier transform. Perform a fast Fourier transform (FFT) on each frame of the windowed signal to obtain its spectrum. Mel filtering. Pass the spectrum through a set of Mel-scale triangular bandpass filters to obtain a Mel spectrum. The Mel scale is a nonlinear frequency scale that matches the auditory characteristics of the human ear and is defined as: m=2595×log10(1+f / 700), where f is the Hz frequency and m is the corresponding Mel frequency. Logarithm. Take the logarithm of the Mel spectrum to obtain the logarithmic Mel spectrum. The purpose of taking the logarithm is to convert the multiplicative spectrum of the speech signal into an additive spectrum, which is convenient for subsequent cepstrum analysis. Discrete cosine transform. Perform a discrete cosine transform (DCT) on the logarithmic Mel spectrum to obtain the Mel-frequency cepstrum coefficients. The function of DCT is to compress the spectrum energy to low-order coefficients and highlight the most important spectrum features. Dynamic features. In order to characterize the dynamic changes of speech parameters, the first-order difference (△MFCC) and second-order difference (△△MFCC) of MFCC are usually calculated and spliced ​​together with the static MFCC to form a complete feature vector. MFCC is used to extract compact and effective feature representations from audio signals, which is the basis for the subsequent construction of acoustic models and speech recognition. Through clustering analysis and dimensionality reduction mapping of MFCC features, the distribution relationship of different audio samples in the feature space can be intuitively characterized. This symbolic representation of audio signals helps to discover speech patterns hidden under the waveform.

[0036] Among them, multidimensional scaling is a classic data dimensionality reduction and visualization method, which aims to map high-dimensional data to a low-dimensional space (usually two-dimensional or three-dimensional) while maintaining the similarity or dissimilarity relationship between samples, so as to reveal the intrinsic structure and association pattern of the data. In this application, the input of the MDS algorithm is a distance matrix D, where D[i, j] represents the dissimilarity between the i-th sample and the j-th sample, which can be any metric such as Euclidean distance or Manhattan distance. The goal of MDS is to find a set of low-dimensional coordinates X so that the Euclidean distance of the samples in the low-dimensional space is as close as possible to the dissimilarity in the original space. To describe it in mathematical language is to minimize the stress function: Stress(X) = sum(dist(X[i],X[j])-D[i,j]) 2, where dist(X) represents the Euclidean distance in low-dimensional space. In order to solve the above optimization problem, the MDS algorithm usually adopts an iterative strategy, which is mainly divided into two categories: metric MDS and non-metric MDS: metric MDS. If the distance matrix D satisfies all the properties of Euclidean distance (such as non-negativity, symmetry, triangle inequality, etc.), it can be directly solved by eigenvalue decomposition. The specific steps are: convert the distance matrix D into an inner product matrix B; perform eigenvalue decomposition on B to obtain eigenvalues ​​and eigenvectors; take the eigenvectors corresponding to the first d largest eigenvalues ​​to form the coordinates of the sample in the d-dimensional space. Among them, the choice of d can be determined according to the size of the eigenvalue and the cumulative contribution rate. The solution obtained by metric MDS is globally optimal and unique. Non-metric MDS. When the distance matrix D does not satisfy the properties of Euclidean distance, non-metric MDS needs to be used to deal with it. Non-metric MDS does not require the elements of D to satisfy any metric properties, but only requires that their order relationship is consistent with the order of sample dissimilarity. Therefore, non-metric MDS is actually an optimization problem of order scale. Commonly used solution algorithms include Shepard-Kruskal algorithm and SMACOF algorithm, whose basic process is: randomly initialize low-dimensional coordinates X; calculate the Euclidean distance matrix dist(X) of the sample in low-dimensional space according to X; adjust the elements of dist(X) to be consistent with the order relationship of D to obtain d-hat; minimize the stress function Stress(X) = (dist(X)-d-hat) 2 , update X; repeat until Stress(X) converges or the maximum number of iterations is reached. The solution obtained by non-metric MDS is usually only a local optimum and is greatly affected by the initial value. MDS is used to learn a two-dimensional audio signal symbol graph from the inter-frame distance matrix of MFCC features. Each audio frame is represented by a point on the symbol graph, and the geometric distance between the points corresponds to the acoustic dissimilarity between frames. Intuitively, points clustered together on the symbol graph belong to acoustically similar frames and are likely to come from the same phoneme or syllable; while scattered points belong to frames with large acoustic differences and may come from different speech segments. Therefore, by analyzing the shape and distribution of the symbol graph, we can gain insight into the intrinsic structure of the audio sequence and explore the occurrence patterns of speech events or keywords.

[0037] Furthermore, extracting audio features from audio signals using digital signal processing methods also includes: taking each row in the matrix G as a point in the low-dimensional space, each point corresponding to an audio signal frame f[i]; constructing a topological graph T, in which the nodes are audio signal frames f[i]; calculating the Euclidean distance d[i, j] between any two points in the low-dimensional space as the weight of the edge between the corresponding audio signal frame nodes in the topological graph T; using a depth-first search algorithm to search for connected subgraphs on the topological graph T to obtain a connected subgraph set C = {c[1], c[2], ..., c[m]}, where m is the number of connected subgraphs; for each connected subgraph c[k], extract the feature vector s[k], and obtain the voiceprint feature vector set S = {s[1], s[2], ..., s[m]}; use the k-means clustering algorithm to cluster the voiceprint feature vector set S, and obtain the clustering result K = {k[1], k[2], ..., k[p]}, where p is the number of clustering categories; calculate the center vector c[i] of each category k[i] as the candidate voiceprint feature vector; select the vector with the largest inter-class distance from the candidate voiceprint feature vectors as the final voiceprint feature vector v; use the voiceprint feature vector v as the audio feature af extracted from the input audio signal a.

[0038] In this application, low-dimensional space refers to a two-dimensional or three-dimensional Euclidean space mapped from a high-dimensional MFCC feature space by an MDS algorithm. Each audio signal frame is represented by a high-dimensional vector in the MFCC feature space, and corresponds to a two-dimensional or three-dimensional coordinate point in the low-dimensional space. Among them, a topological graph is a commonly used data structure used to represent the adjacency and connectivity between samples. In this application, the topological graph T uses audio signal frames as nodes and acoustic similarities between frames as edges to depict the evolution trajectory of the audio stream in time and acoustic space. Each node in the topological graph T corresponds to a low-dimensional coordinate point, representing an audio signal frame; the edge between the nodes represents the Euclidean distance between the two frames in the low-dimensional space, reflecting their acoustic dissimilarity. The larger the weight of the edge, the more obvious the difference between the two frames; conversely, the smaller the weight of the edge, the closer the two frames are.

[0039] Among them, depth-first search is a commonly used graph traversal algorithm. Its basic idea is to start from a certain starting node of the graph and continuously explore forward along a path until it can no longer continue; then backtrack to the nearest fork in the road, and choose another path to continue exploring, and repeat this process until the entire graph is traversed. In this application, the depth-first search DFS algorithm maintains a stack to record the visited nodes, and uses a marker array (visited) to identify whether each node has been visited. Each time a node is taken out from the top of the stack, it is marked as visited, and then all its unvisited adjacent nodes are pushed into the stack. When the stack is empty, the search process ends. First, arbitrarily select an unvisited node as the starting point, call the DFS function, and find all the nodes reachable from the node, which constitute a connected subgraph. Then, select another unvisited node and repeat the above process until all nodes have been visited. Finally, we get the segmentation of a connected subgraph of the topological graph T.

[0040] Among them, in graph theory, a connected subgraph refers to a subgraph H of an undirected graph G, in which there is a path between any two nodes of H. In other words, a connected subgraph is an internal "connected" part of the original graph, its node set is a subset of the node set of the original graph, and its edge set contains all the edges connecting these nodes in the original graph. In this application, a connected subgraph on the topological graph T represents a group of frames with similar acoustic features and close time positions in the audio signal. Since the speech signal is composed of a series of speech events (such as phonemes, words, sentences, etc.) in sequence, it is often displayed as a series of non-intersecting "chains" on the topological graph. These chains correspond to different structural components of the speech signal. Through the DFS algorithm, we can automatically find all connected subgraphs in the topological graph T, that is, obtain a preliminary structural segmentation of the speech signal.

[0041] Among them, k-means is a classic unsupervised learning algorithm, which is used to divide the sample set into a pre-specified number (k) of clusters. In this application, k samples are randomly selected as the initial centroids; for each sample, its distance to each centroid is calculated and assigned to the cluster with the nearest distance; for each cluster, its centroid (that is, the mean vector of all samples in the cluster) is recalculated; the two steps are repeated until the centroid no longer changes or the maximum number of iterations is reached. Through k-means clustering, we can automatically classify similar voiceprint feature vectors into one category, forming a voiceprint-level segmentation of the audio signal. K-means is used to cluster the voiceprint feature vectors of connected subgraphs to discover the main speakers or voiceprint patterns in the audio signal. The sample here is a feature vector of a fixed dimension extracted from each connected subgraph, which characterizes the acoustic statistics of all frames in the subgraph.

[0042] Further, the government affairs recommendation results are output, including: obtaining the text feature vector tf, the user behavior feature vector uf, the image feature vector imf and the audio feature vector af; calculating the L2 norm ||tf||2 of the text feature vector tf; according to the norm ||tf||2, obtaining the normalized text feature vector tf'=tf / ||tf||2; calculating the minimum value minuf and the maximum value maxuf of the elements in the user behavior feature vector uf; according to the minimum value minuf and the maximum value maxuf, obtaining the normalized user behavior feature vector u f'=(uf-minuf) / (maxuf-minuf); calculate the mean meanimf and standard deviation stdimf of the elements in the image feature vector imf; according to the mean meanimf and standard deviation stdimf, obtain the normalized image feature vector imf'=(imf-meanimf) / stdimf; calculate the euclidean norm ||af||E of the audio feature vector af; according to the norm ||tf||E, obtain the normalized audio feature vector af'=af / ||af||E.

[0043] The L2 norm, also known as the Euclidean norm or the second-order norm, is a measure of the length or size of a vector. For an n-dimensional real vector x = (x1, x2, ..., x n ), whose L2 norm is defined as: In this application, the L2 norm is used to normalize the text feature vector tf. The purpose of normalization is to unify the feature values ​​of different dimensions into a similar dimension for subsequent feature fusion and similarity calculation. By dividing by the L2 norm, we transform tf into a unit vector, that is, its L2 norm is 1, while the direction remains unchanged.

[0044] Among them, the Euclidean norm, also known as the Euclidean norm or L2 norm, is the same as the L2 norm mentioned above, but the notation is slightly different. It measures the length or size of a vector in Euclidean space. In this application, the Euclidean norm is used to normalize the audio feature vector af, similar to the way text feature vectors are processed. By dividing by the Euclidean norm, we transform af into a unit vector, eliminating the scale differences between different audios so that they can be compared and fused in a unified metric space.

[0045] Furthermore, according to the normalized text feature vector tf', user behavior feature vector uf', image feature vector imf' and audio feature vector af', a multi-view feature matrix MF is constructed, MF = [tf', uf', imf', af']; and an objective function L(W) = MF-MF×||W||F is constructed. 2+λW||1, where W is the weight matrix and λ is the regularization parameter; ||W||F represents the Frobenius norm; ||W||1 represents the L1 norm, where W is the weight matrix and λ is the regularization parameter; the alternating optimization algorithm is used to solve the objective function L(W) to obtain the optimal weight matrix W*; the weight vectors wtf, wuf, wimf and waf of different feature views are obtained from the optimal weight matrix W*; ||W||F represents the Frobenius norm. For a matrix A, its Frobenius norm is defined as the square root of the sum of the squares of the matrix elements, that is, where a ij is the element in the i-th row and j-th column of matrix A. ∑(i,j) represents the sum operation of all elements of the matrix. Here (i,j) represents the row index and column index of the matrix. By traversing all rows and columns, the square values ​​of each element are accumulated. ||W||1 represents the L1 norm. For a matrix A, its L1 norm is defined as the sum of the absolute values ​​of the matrix elements, that is, where a ij is the element in the i-th row and j-th column of matrix A. ||MF-MF×W||F 2 This term represents the difference between the multi-view feature matrix MF and its reconstruction matrix MF×W, measured using the Frobenius norm. The goal is to learn a weight matrix W so that the reconstructed matrix MF×W is as close to the original matrix MF as possible. The term λ||W||1 is the L1 norm regularization term, which is used to promote the sparsity of the weight matrix W. The L1 norm helps to compress some elements in the weight matrix to 0, thereby achieving the effect of feature selection. The regularization parameter λ controls the strength of sparsity. The larger λ is, the sparser the weight matrix W is. By minimizing the objective function L(W), we can learn an optimal weight matrix W* that minimizes the reconstruction error and makes the weight matrix sparse enough. In this way, we can use W* to perform weighted fusion of features from different views to obtain the final fused feature vector.

[0046] The text feature vector tf', the user behavior feature vector uf', the image feature vector imf' and the audio feature vector af' are weightedly fused with the corresponding weight vectors respectively; the weighted fused text feature vector tfweighted = tf'×wtf is calculated; the weighted fused user behavior feature vector ufweighted = uf'×wuf is calculated; the weighted fused image feature vector imfweighted = imf'×wimf is calculated; the weighted fused audio feature vector afweighted = af'×waf is calculated; the weighted fused feature vectors are concatenated to obtain the final fused feature vector vfused; vfused = [tfweighted; ufweighted; imfweighted; afweighted]; the fused feature vector vfused is input into the pre-trained government affairs recommendation model to obtain the government affairs recommendation result.

[0047] Furthermore, the alternating optimization algorithm adopts the linear search algorithm PGD, constructs a first-order Taylor of the weight matrix W, and uses the gradient descent method for iterative optimization. Among them, alternating optimization is a commonly used strategy for solving complex optimization problems, especially for situations where the objective function contains multiple variable groups or blocks. The basic idea is to decompose the original problem into several sub-problems, each sub-problem contains only one variable group, and the other variable groups are fixed. Then, by repeatedly and in turn solving each sub-problem, the variable groups are continuously updated and optimized until the global optimum is reached or the convergence conditions are met. Specifically, initialize all variable groups x1, x2, ..., x n ; Fixed x2,x3,......,x n , optimize x1, get x1*; fix x1*, x3, ..., x n , optimize x2, and get x2*,x4,......,x n Fixed x1*,x2*,......,x n-1 , optimize xn, and get x n ; Repeat until convergence or the maximum number of iterations is reached.

[0048] Among them, the linear search algorithm PGD is a method for solving optimization problems with non-smooth regularization terms, such as Lasso regression, sparse coding, etc. The objective function is decomposed into two parts: a smooth loss function and a non-smooth regularization function. Then, by constructing a first-order Taylor of the loss function and combining the proximal operator of the regularization function, the variables are iteratively updated until convergence. In this application, the weight matrix W is initialized as a random matrix, the number of iterations T and the learning rate η are set; for t=1, 2,..., T, the following steps are repeated: Calculate the gradient of the loss function L(W) with respect to W Construct a first-order Taylor of W: Solve the approximation problem: Update the weight matrix: Output the final weight matrix W t .in,<X,Y> represents the inner product of the matrix, and ||X||F represents the Frobenius norm of the matrix.

[0049] 3. Beneficial effects

[0050] Compared with the prior art, the advantages of this application are:

[0051] Comprehensively utilize multimodal data to fully characterize user intentions. By collecting multi-source heterogeneous data including user texts, behavior logs, images, and audio, we can mine users' potential needs and preferences from different dimensions.

[0052] Aiming at the heterogeneity and redundancy of multimodal data, a multi-view representation learning algorithm is used to jointly optimize different types of features. By constructing a multi-view feature matrix, designing a regularized objective function, and using an alternating optimization strategy to adaptively learn the weight coefficient of each view.

[0053] When extracting text features, the CRF named entity recognition model is constructed using the government affairs dictionary to effectively identify key entity information such as departments and articles. At the same time, the TF-IDF algorithm is introduced to calculate vocabulary weights to highlight the importance of government affairs-related keywords. When processing user behavior data, factors such as material submission and suspension of processing are comprehensively considered to dynamically adjust user intentions, which is more in line with the actual scenarios of government services.

[0054] When processing complex data such as images and audio, a hierarchical feature extraction strategy from coarse to fine and from low to high level is adopted. For example, images are first preprocessed and character recognition is performed, and then word vectors and position vectors are extracted; audio is first denoised and framed, and then MFCC coefficients and voiceprint features are extracted. This staged and granular processing method can reduce data redundancy, reduce computational complexity, and improve the efficiency and accuracy of feature extraction.

[0055] The fused multimodal feature representation is input into the neural network model, and the deep learning method is used to perform end-to-end government affairs recommendation. The deep neural network can learn the complex nonlinear relationship between features and mine the deep semantic association between user intentions and affairs. At the same time, the deep learning model also has powerful representation and self-learning capabilities, and can continuously optimize the recommendation strategy based on massive user portrait data to achieve personalized and accurate affairs matching.

[0056] When extracting audio features, we first use MDS dimensionality reduction to obtain a low-dimensional embedding of the audio signal, and then build a topology graph based on the embedding to mine the correlation between different signal frames. We extract connected subgraphs on the topology graph and cluster them, and select voiceprint features from the cluster with the largest inter-class difference.

[0057] When fusing features from different views, an alternating optimization strategy is used to solve the weight matrix and fusion features respectively, decomposing the original problem into multiple single-variable optimization sub-problems, reducing the difficulty of solving. At the same time, the linear search algorithm PGD is introduced to iteratively optimize the weight matrix, and the gradient descent direction is constructed through the first-order Taylor expansion, achieving efficient linear approximation of the optimization process. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:

[0059] Figure 1 is an exemplary flow chart of a method for recommending government affairs dialogue based on multi-dimensional vector fusion according to some embodiments of this specification;

[0060] Figure 2 is an exemplary flow chart of obtaining text features according to some embodiments of this specification;

[0061] Figure 3 is an exemplary flow chart of obtaining image features according to some embodiments of this specification;

[0062] Figure 4 is an exemplary flow chart of obtaining audio features according to some embodiments of this specification;

[0063] Figure 5 This is an exemplary flowchart for obtaining user behavior characteristics according to some embodiments of this specification. DETAILED DESCRIPTION

[0064] The method and system provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0065] Figure 1This is an exemplary flow chart of a method for recommending government affairs dialogues based on multi-dimensional vector fusion according to some embodiments of this specification. In this embodiment, there is a government affairs dialogue recommendation system. When a user makes a government affairs inquiry in the system, the system automatically recommends the government affairs that are most likely to meet the user's needs based on the multimodal information such as text, images, and audio input by the user. First, the system receives input data from the user end. A user's inquiry may include text descriptions, uploaded pictures, and voice input, etc. The system stores text data, image data, audio data, etc. in corresponding data buffers respectively. At the same time, the system also reads the user's historical behavior log data from the background database. User XX made an inquiry in the government affairs dialogue recommendation system. He wanted to know the relevant procedures for enterprise registration.

[0066] First, a certain user enters in the text input box of the system: "I want to register a company. What procedures and materials are required?" After clicking the send button, the system receives this text query and stores it in the text data buffer for subsequent processing. Then, a certain user clicks the image upload button, selects a business license photo he took before, and uploads it to the system. After receiving this image data, the system stores it in the image data buffer, waiting for further analysis and extraction. Finally, a certain user also clicks the voice input button and says in Mandarin: "My boss asked me to register a company as soon as possible. Can it be done in about a week?" The system converts the audio into text through the voice recognition module and stores it in the audio data buffer.

[0067] At this point, the system has obtained a complete inquiry data of a certain user, which are: text data: "I want to register a company. What procedures and materials are required?" Image data: a photo of a business license. Audio data: "My boss asked me to register a company as soon as possible. Can it be done in about a week?" At the same time, the system also reads the previous relevant operation records of a certain user from the user behavior log database in the background, including: two months ago, a certain user browsed the article page of "How to register a one-person limited company" and stayed for 2 minutes. A month ago, a certain user searched for "company registration process" in the system and clicked to view the first 3 search results. A week ago, a certain user also downloaded the document "Enterprise Startup Application Form" in the system. All these multi-source heterogeneous data, including the text, image, audio of this inquiry, and historical behavior logs, will be saved by the system for subsequent feature extraction, semantic analysis, intent recognition and other links, so as to accurately portray user portraits and deeply understand the real needs of users. This is the data basis for realizing intelligent and personalized government dialogue recommendation services. After obtaining these raw data, the system will then perform a fusion analysis of multimodal data. First, semantic features are extracted from text, images, and audio respectively, and then the multi-view feature weighting method of the present invention is used to fuse features to obtain a unified user intent representation. Finally, combined with the user portrait, the deep learning model is used to give the final government affairs recommendation results, such as "enterprise registration", "industrial and commercial registration", "seal engraving" and other related matters may be recommended to a certain user.

[0068] Figure 2This is an exemplary flow chart for obtaining text features according to some embodiments of this specification. For text data, the system first performs word segmentation and part-of-speech tagging. Then, the pre-trained CRF-based named entity recognition model is used to extract key information such as department entities and article entities in the text. Next, the system also uses the TF-IDF-based keyword extraction model to obtain keyword features in the text. Finally, the named entity features and keyword features are spliced ​​into a text feature vector. First, the system performs word segmentation on this text and obtains the word sequence: ["I", "want", "register", "one", "company", "," "please ask", "need", "which", "process", "and", "material", "?"]; then, the system performs part-of-speech tagging on the word sequence and obtains the part-of-speech sequence: [r (pronoun), v (verb), v (verb), m (numeral), n (noun), w (punctuation), v (verb), v (verb), r (pronoun), n (noun), c (conjunction), n (noun), w (punctuation)]; then, the system uses the pre-built conditional random field (CRF)-based named entity recognition model to extract entities from the text. The CRF model uses the part-of-speech tag sequence as the observation sequence and the words and phrases in the government domain dictionary as the input features to construct the feature template. The CRF model is trained using the annotated government text dataset to learn the weight parameters of different feature functions.

[0069] In this example, the system inputs the word sequence ["I", "want", "register", "one", "company", "," "please ask", "need", "which", "process", "and", "material", "?"] and the corresponding part-of-speech sequence into the trained CRF model, and uses the Viterbi algorithm for sequence annotation to obtain the named entity recognition result: ["I" / O, "want" / O, "register" / O, "one" / O, "company" / ORG, "," / O, "please ask" / O, "need" / O, "which" / O, "process" / O, "and" / O, "material" / O, "?" / O]; among them, "company" marked as "ORG" is identified as an institutional entity. The system takes this type of named entity as the first type of text feature. Then, the system uses the TF-IDF-based keyword extraction model to extract keyword features from the text. First, the system counts the term frequency TF and inverse document frequency IDF of each candidate word from the government affairs text corpus, calculates the TF-IDF value as the word weight, and constructs the TF-IDF model. Then, the system applies the TF-IDF model to the word sequence input by the user and calculates the weight value of each word. Set a weight threshold (such as 0.1) and select words with weights greater than the threshold as keyword features. In this example, keywords such as ["registration", "company", "process", "material"] may be extracted as the second type of text features. Finally, the system concatenates the first type of named entity features and the second type of keyword features to form a text feature vector, such as: tf = [0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0], where 1 indicates that the corresponding word is a named entity or keyword, and 0 indicates that it is not. In this way, a compact and semantically rich text feature representation is obtained, which integrates named entity information and keyword information.

[0070] Figure 3This is an exemplary flow chart for obtaining image features according to some embodiments of this specification. For image data, the system first performs denoising and direction correction preprocessing. Then, an OCR model based on deep learning is used for text recognition to extract text information in the image. The system performs word segmentation on the extracted text content to obtain a word sequence and corresponding position information. Then, the word sequence and position information are converted into vector representations respectively and spliced ​​into an image feature vector. First, the system preprocesses this picture. The Gaussian filtering method is used to denoise the image to reduce the noise interference in the image. Specifically, a 5x5 Gaussian filter is used with a standard deviation of 1.5 to perform a convolution operation on the original image I to obtain a denoised image I'. Then, the system performs direction correction on the image I'. Since the user may be tilted when shooting, the image needs to be rotated and adjusted. The system uses the Hough transform algorithm to detect the straight lines in the image, calculates the correction rotation matrix according to the tilt angle of the straight line, performs an affine transformation on the image, and obtains the direction-corrected image I". Then, the system inputs the preprocessed image I" into the pre-trained optical character recognition (OCR) model. The OCR model uses an end-to-end structure based on convolutional neural networks and recurrent neural networks, which can simultaneously complete text positioning and recognition. The OCR model used by the system has been trained on a large number of business license and other certificate data, and can accurately extract the text area and content in the image.

[0071] Through the OCR model, the system recognizes the text content from the image I" and obtains a text, such as: texts = "×× City ×× District ××× Company Unified Social Credit Code: 91330106MA2CFXXX9P Type: Limited Liability Company (Natural Person Investment or Holding) Legal Representative: Zhang San..." Then, the system performs word segmentation on the extracted text content texts. The jieba word segmentation tool is used to segment the text and obtain the word sequence: words = ["×× City", "×× District", "×××", "Company", "Unified", "Social ”, “Credit code”, “:”, “91330106MA2CFXXX9P”, “Type”, “:”, “Limited Liability Company”, (“Natural Person”, “Investment”, “or”, “Holding”) “Legal Representative”, “:”, “Zhang San”, “…”]; At the same time, the system also records the position information of each word in the original text, and obtains the position sequence: positions = [(0, 3), (3, 6), (6, 9), (9, 11), (11, 13), (13, 15), (15, 20), (20, 21), (21, 3 7), (37, 39), (39, 40), (40, 46), (46, 47), (47, 50), (50, 52), (52, 53), (53, 55), (55, 56), (56, 61), (61, 62), (62, 64), (64, 65)]. Here (a, b) means that the word starts from the ath character and ends at the bth character in the original text. Next, the system converts the word sequence words into a word vector sequence wv. For each word, find its vector representation in the pre-trained word vector space and generate a fixed dimension (e.g., 300-dimensional) real vector. In this way, the words sequence is mapped to a word vector sequence, such as: wv = [[0.1, 0.2, ..., -0.1], [0.2, -0.3, ..., 0.5], ..., [0.4, -0.1, ..., -0.2]]; similarly, the system also converts the position sequence positions into a position vector sequence pv. In order to encode the position information into a real vector of fixed length, the system first normalizes the position, and then transforms the normalized position into a high-dimensional space through sine and cosine functions to obtain a position vector.Here, the position vector dimension is 50, so the positions sequence is converted to: pv = [[0.2, -0.4, ..., 0.1], [-0.3, 0.1, ..., -0.4], ..., [0.5, 0.2, ..., -0.1]]; Finally, the system concatenates the word vector sequence wv and the position vector sequence pv to form a complete image feature vector: imf = [wv, pv] = [[0.1, 0.2, ... , -0.1, 0.2, -0.4, ..., 0.1], [0.2, -0.3, ..., 0.5, -0.3, 0.1, ..., -0.4], ..., [0.4, -0.1, ..., -0.2, 0.5, 0.2, ..., -0.1]]; Here imf is a vector sequence with the length of words sequence, each vector is concatenated by word vector (300 dimensions) and position vector (50 dimensions), with a total of 350 dimensions. In this way, the semantic information and position information of each word in the image are comprehensively encoded.

[0072] Figure 4 This is an exemplary flow chart for obtaining audio features according to some embodiments of this specification. For audio data, the system first performs noise reduction and endpoint detection preprocessing and converts it into a frame sequence. Then, the MFCC algorithm is used to extract the Mel-frequency cepstral coefficients for each frame. Based on the MFCC features, a similarity matrix is ​​constructed through Euclidean distance and the high-dimensional features are mapped to a low-dimensional space using the MDS algorithm. Then, the graph theory algorithm is used to extract the voiceprint features in the audio. Finally, the MFCC features and the voiceprint features are concatenated into an audio feature vector. First, the system preprocesses this audio. The original audio signal a is denoised by spectral subtraction to remove background noise interference and obtain the denoised audio signal a'. Then, the system performs endpoint detection on a', removes the silent intervals before and after the speech through double threshold comparison and energy threshold judgment, and obtains a signal a' containing only valid speech. Then, the system performs frame segmentation on the preprocessed audio signal a". Using the Hamming window function, with a frame length of 20ms and a frame shift of 10ms, a" is divided into equal intervals to obtain a series of audio frames f[1], f[2], ..., f[n], where n is the total number of frames. A total of 200 frames are divided here. Next, the system extracts audio features from each frame. MFCC (Mel-frequency cepstral coefficient) is used as the feature representation. For each frame f[i], the system first calculates its short-time energy spectrum, then filters it through a Mel filter bank, takes its logarithm, and finally performs a DCT transform to obtain a 13-dimensional MFCC feature vector v[i]. In this way, the original speech signal is converted into a series of 13-dimensional MFCC feature vectors.

[0073] Combining the MFCC feature vectors of each frame in sequence, we get a 13200-dimensional audio feature matrix V, where each column is a feature vector of a frame. In order to explore the relationship between different frames, the system calculates the Euclidean distance between the vectors in the matrix V and generates a 200-200 distance matrix D. D[i, j] measures the similarity between the i-th frame and the j-th frame in the feature space. The closer the distance, the closer the two frames are. However, the original distance matrix has a high dimension and is not easy to analyze. Therefore, the system uses the MDS (multidimensional scaling) algorithm to reduce the dimension of the distance matrix. Through MDS, the 200-dimensional matrix can be reduced to a 2-dimensional plane while maintaining the distance relationship between frames, and a reduced-dimensional audio signal mapping G is obtained. Each row of G corresponds to the coordinates of an audio frame in two-dimensional space. Using this two-dimensional coordinate map G, the system further extracts the voiceprint features of the audio. First, each point in G is regarded as a node, and the points with a distance between nodes less than the threshold are connected as edges to construct a topological map T. T reflects the connectivity structure between audio frames. Then the system uses depth-first search to find connected subgraphs on T and obtains several connected segments c[1], c[2], ..., c[m]. Each segment is a group of audio frames that are topologically closely connected. For each connected segment c[i], the system calculates the average value of its 13-dimensional MFCC feature vector as the feature description s[i] of the segment. In this way, the feature vectors of all segments constitute a voiceprint feature set S. In order to select the most representative voiceprint feature from S, the system uses the k-means algorithm to cluster S, where the number of categories is set to 3. After clustering, the center vector c[i] of each segment is used as a candidate voiceprint feature vector. The system calculates the inter-class distance between the three candidate feature vectors and selects the one with the largest distance as the final voiceprint feature v. In summary, the system extracts two types of audio features from the voice input of a certain user: MFCC feature matrix V and voiceprint feature vector v. Finally, the system concatenates the 13-dimensional MFCC features and voiceprint features of each frame to obtain an audio feature sequence af with a length of 200, each element of which is a 14-dimensional vector. This af is the structured feature representation extracted from the input audio.

[0074] Figure 5This is an exemplary flow chart for obtaining user behavior characteristics according to some embodiments of this specification. For user behavior data, the system analyzes the user's historical handling of various government affairs, including the number of submitted materials, the proportion of material types, the number of suspensions, etc. Then, an initial intention ranking of government affairs is constructed, and the ranking is adjusted according to the number of suspensions to form a behavioral feature sequence that reflects the user's true intention. First, the system performs statistical analysis on the behavior log of a certain user. Through log analysis, the system finds that a certain user has handled 10 matters such as company registration, property certification, and tax declaration in this year. For each matter, the system further obtains the situation of the materials submitted by a certain user, including the number of different materials such as identity cards, household registration books, and business licenses. There are a total of 8 types of materials, so a 10*8 quantity matrix is ​​formed for these 10 matters, each row represents an item, each column represents a type of material, and the matrix elements are the corresponding submission quantities. Then, the system summarizes the total submission quantity of each type of material. For example, a certain user submitted 8 identity cards, 5 household registration books, and 7 business licenses in these 10 matters... Adding these totals, the summary submission quantity of all materials is obtained. With the number of submissions of each type of material and the total number, the system can calculate the proportion of material submissions. Taking the ID card as an example, the number of times a certain user submitted an ID card accounts for p1=8 / sum of the total number of materials. Similarly, the proportion of household registration books is p2=5 / sum, and the proportion of business licenses is p3=7 / sum... In this way, the original number of material statistics is converted into a set of submission probability distributions.

[0075] According to the size of these probability values, the system can sort the importance of the materials. The materials with the highest proportion often mean that a certain user is more inclined to use them when handling business, which reflects his true intention from the side. Therefore, the system generates an initial user intention ranking q according to the order of material submission probability from large to small. q tells us that a certain user is most likely to submit an ID card, followed by a business license, and then a household registration booklet... However, there may be deviations if we only look at the number of materials submitted. We also need to consider an important information-the suspension of a certain user's business. The system further discovered through the log that among these 10 items, a certain user had 3 items that were suspended, which means that he may not be very interested in the business he selected in the early stage. At this time, the system needs to adjust the initial intention ranking q according to the number of suspensions n. If a certain user has not suspended any items (n=0), then q is directly used as the final behavior feature sequence r. But if a certain user has suspended behavior (n>0), the system will move the 3 materials in front of q back 3 places to obtain a new sequence r. The logic of the adjustment is that since the user expressed "regret" about the original choice during the process, the materials that he initially highly preferred may not be that important and should give way to the later options. After the correction of the number of suspensions, the system finally determined the user behavior feature sequence uf. This uf combines the number and proportion of materials submitted and the user's regret behavior, and can more comprehensively portray the user's true intentions in the process of government affairs. In this example, uf may be [business license, household registration booklet, ID card, other materials...], reflecting that a certain user is more likely to have actual needs in entrepreneurship and real estate.

[0076] After obtaining the feature vectors of the four modalities, the system normalizes them separately to eliminate the metric differences. The normalized features are then input into the multi-view representation learning model. The model learns the weight coefficients of different views by minimizing the multi-view reconstruction error and weight sparsity constraints. After learning the weights, the system calculates the weighted combination of multi-view features to form a fused multimodal feature representation. The first step is feature normalization. Since the feature distributions of different modalities may vary greatly, direct fusion will affect the accuracy. Therefore, the system first normalizes each feature and maps it to the same scale. For the text feature tf and the audio feature af, the system chooses L2 norm normalization, that is, dividing by the L2 norm of the vector to make it a unit vector. Taking tf as an example, the new text feature is tf'=tf / ||tf||2. Similarly, the audio feature af'=af / ||af||E. The image feature imf is normalized by mean-standard deviation, that is, the mean is subtracted and then divided by the standard deviation, and the transformation is imf'=(imf-meanimf) / stdimf. Here, the mean and standard deviation are calculated on all elements of imf. For the discrete behavioral feature uf, the system uses maximum-minimum value normalization to linearly map each dimension of the feature to the interval [0, 1]. Specifically, uf'=(uf-minuf) / (maxuf-minuf). After these transformations, the originally heterogeneous tf, imf, af, and uf features are unified into a comparable numerical range.

[0077] After normalization, the system juxtaposes the four features to form a multi-view matrix MF = [tf', uf', imf', af']. Each column of the matrix corresponds to a type of feature view. In order to learn the optimal feature combination from MF, the system constructs a weighted reconstruction objective function: L(W) = MF-MF×||W||F 2 +λW||1. Where W is the weight matrix to be learned, ||X||_F represents the Frobenius norm of the matrix, ||X||_1 represents the L1 norm, and λ is the regularization parameter. The significance of this objective function is to use the weighted view combination MF×W to reconstruct the original matrix MF, while minimizing the reconstruction error, and the weight matrix W itself should be as sparse as possible (reflected in the minimum L1 norm). In this way, important view subsets can be automatically selected while fusing features. In order to optimize this objective function, the system adopts an efficient approximate linear algorithm PGD (proximal gradient descent). The idea of ​​PGD is to use the gradient information of the current weight matrix to construct a first-order Taylor of the objective function at each iteration, and then update the weights in this simplified gradient direction. After multiple iterations, the weight matrix can converge to the global optimal point W*. The PGD algorithm takes into account both accuracy and speed and can efficiently process large-scale multi-view data.

[0078] After learning the optimal weight W*, the system obtains the weight of each view from the column vector of the matrix: wtf, wuf, wimf and waf. Then use these weights to perform weighted summation on tf', uf', imf', and af' to obtain the fused view vector. Finally, the weighted view vectors are concatenated to obtain a vector representation vfused that fully describes the user's characteristics. For example, if the original feature dimensions are tf (200 dimensions), uf (50 dimensions), imf (500 dimensions), and af (100 dimensions), and the learned weights are wtf (200 dimensions), wuf (50 dimensions), wimf (500 dimensions), and waf (100 dimensions), then the final vfused is a feature vector of 200+50+500+100=850 dimensions. It integrates user characterization from multiple angles such as text semantics, service intentions, image content, and voice information, which is more comprehensive and accurate than any single perspective. Finally, the system inputs this fused feature vector vfused into the pre-trained deep neural network model. This model is an end-to-end multi-layer perceptron, which has been trained on a large number of user portraits and actual government affairs data, and can learn users' potential interests and service needs from fused features. The output of the model is a probability distribution of government affairs, predicting the probability of the current user's possible demand for each item. The system selects the TopK items with the highest probability, generates a recommendation list, and presents it to the user for reference. For example, in the case of a certain user, the system has insight into his real needs for starting a business and buying a house by fusing multimodal data. Therefore, when recommending government affairs, service items related to topics such as "company registration", "engraving official seals", and "housing filing" will be displayed first. This kind of personalized recommendation with "thousands of faces" can highly match the user's true intentions and improve the accuracy and convenience of government services.

Claims

1. A method for recommending government affairs dialogues based on multi-dimensional vector fusion, comprising: Collect multimodal data including user texts, user behavior logs, images, and audio signals; Extract text features from user texts using natural language processing methods; extract user behavior features from user behavior logs using statistical methods; Extract image features from images using computer vision methods; extract audio features from audio signals using digital signal processing methods; Normalize the extracted text features, user behavior features, image features, and audio features respectively; Among them, the normalization processing includes: Get the text feature vector tf, the user behavior feature vector uf, the image feature vector imf and the audio feature vector af; Calculate the L2 norm of the text feature vector tf ||tf|| 2 ; According to the norm ||tf|| 2 , get the normalized text feature vector tf'=tf / ||tf|| 2 ; Calculate the minimum value min uf and the maximum value max uf of the elements in the user behavior feature vector uf; According to the minimum value min uf and the maximum value max uf, the normalized user behavior feature vector uf'=(uf-minuf) / (max uf-min uf) is obtained; Calculate the meanimf and standard deviation stdimf of the elements in the image feature vector imf; According to the mean imf and standard deviation stdimf, the normalized image feature vector imf'=(imf-meanimf) / stdimf is obtained; Calculate the euclidean norm of the audio feature vector af ||af|| E ; According to the norm ||af|| E , and obtain the normalized audio feature vector af'=af / ||af|| E ; A multi-view representation learning algorithm is used to take normalized text features, user behavior features, image features, and audio features as different views, and the weight coefficients of different views are obtained through the objective function. Among them, obtaining different view weight coefficients includes: According to the normalized text feature vector tf', user behavior feature vector uf', image feature vector imf' and audio feature vector af', a multi-view feature matrix MF is constructed, MF = [tf', uf', imf', af']; Constructing the objective function Where W is the weight matrix and λ is the regularization parameter; ||W|| F represents the Frobenius norm; ||W|| 1 represents the L1 norm; The alternating optimization algorithm is used to solve the objective function L(W) and obtain the optimal weight matrix W*; Get the weight vectors wtf, wuf, wimf and waf of different feature views from the optimal weight matrix W*; Multiply the feature vectors of different views by the corresponding weight coefficients to obtain the fused multimodal feature representation: The text feature vector tf', the user behavior feature vector uf', the image feature vector imf' and the audio feature vector af' are weightedly fused with the corresponding weight vectors respectively; Concatenate the weighted fused feature vectors to obtain the final fused feature vector vfused; Construct a neural network model, take the fused multimodal feature representation as input, and output the government affairs recommendation results.

2. The method for recommending government affairs dialogue based on multi-dimensional vector fusion according to claim 1 is characterized by: Extract text features from user text using natural language processing methods, including: Perform word segmentation on the input user text to obtain the word sequence {W i }; The word sequence after word segmentation {W i } to perform part-of-speech tagging and obtain the part-of-speech sequence {t i }; Build a named entity recognition model based on conditional random field CRF; The word sequence {W i } and the corresponding part-of-speech sequence {t i } as observation sequence, input into the constructed CRF named entity recognition model; take the words and phrases in the government affairs dictionary as input features, and construct feature templates; Use the labeled government text dataset to train the CRF named entity recognition model; The observation sequence is input into the trained CRF named entity recognition model and the Viterbi algorithm is used for sequence labeling; The words marked as department entities and article entities are obtained from the annotation results, and the named entity features are obtained as the first type of text features.

3. The method for recommending government affairs dialogue based on multi-dimensional vector fusion according to claim 2 is characterized by: Extracting text features from user text using natural language processing methods, including: Get the text data in the government affairs field, perform word segmentation, and obtain the word sequence {C i }; The government affairs dictionary is used as the candidate feature vocabulary, and the number of words in the candidate feature vocabulary in the word sequence {C i }, calculate the frequency of occurrence of word frequency TF; Count the number of documents containing each word and calculate the inverse document frequency IDF; Multiply TF and IDF to get the TF-IDF value of each word as the word weight; According to the vocabulary weights, a TF-IDF model is constructed and the constructed TF-IDF model is trained; The word sequence corresponding to the input user text {W i }, use the trained TF-IDF model to calculate the weight value of each word; Set a weight threshold, select words with weight values ​​greater than the threshold, and obtain keyword features as the second type of text features; The first type of text features and the second type of text features are concatenated as the final text feature vector tf.

4. The method for recommending government affairs dialogue based on multi-dimensional vector fusion according to claim 3 is characterized by: Statistical methods are used to extract user behavior features from user behavior logs, including: Analyze the input user behavior logs to obtain the number of various materials submitted by users in the process of handling various government affairs, and form a quantity sequence {m i }, where the number sequence {m i Each element in} corresponds to the number of submissions of a type of material; and obtains the number of times n that the user stops handling each government matter; Count the total number of all materials submitted by users; For the number sequence {m i Each element r in i , calculate the element r i The proportion of submission times of corresponding materials p i =r i / sum; The proportion of submission times of materials i Sort in descending order to obtain the initial intention sorting sequence q of the user to handle various government affairs; According to the number of suspensions n, the initial intention sorting sequence q is adjusted to obtain the final user behavior feature sequence r: When n=0, r=q; When n>0, the top K elements in q are moved backward by K positions to form the adjusted sequence r; The user behavior feature sequence r is used as the user behavior feature uf extracted from the user behavior log.

5. The method for recommending government affairs dialogue based on multi-dimensional vector fusion according to claim 4 is characterized by: Extract image features from images using computer vision methods, including: The input image I is denoised using the Gaussian filtering method to obtain a denoised image I'; The Hough transform method is used to correct the direction of the image I' to obtain the preprocessed image I"; The preprocessed image I" is used as input to the pre-trained optical character recognition model OCR; Use the OCR model to locate and recognize the text area in image I" and obtain the text content texts; Use the word segmentation algorithm to segment the text content texts to obtain the word sequence words; Get the position information of each word in the text content texts and get the word position sequence positions; Convert the word sequence words into a word vector sequence wv; Convert the word position sequence positions to a position vector sequence pv; The word vector sequence wv and the position vector sequence pv are concatenated to obtain the image feature vector imf. imf=[wv,pv]; The image feature vector imf is taken as the image feature extracted from the input image I.

6. The method for recommending government affairs dialogue based on multi-dimensional vector fusion according to claim 5 is characterized by: Extract audio features from audio signals using digital signal processing methods, including: The input audio signal a is subjected to denoising by using spectral subtraction to obtain a denoised audio signal a'; Perform endpoint detection on the audio signal a', remove the silent interval, and obtain the preprocessed audio signal a". The audio signal a" is segmented into equally spaced frames using the Hamming window method to obtain an audio signal frame sequence F = {f[1], f[2], ..., f[n]}, where n is the number of frames; Mel-frequency cepstral coefficient (MFCC) algorithm is used to extract features of frame f[i], and the audio feature vector v[i] of the corresponding frame is obtained; Combine the audio feature vectors v[i] of all frames into an audio feature matrix V; Calculate the Euclidean distance between vectors in the audio feature matrix V and generate the distance matrix D: Where D[i,j] represents the Euclidean distance between the audio feature vectors of the i-th frame and the j-th frame; The multidimensional scaling algorithm MDS is used to reduce the dimension of the distance matrix D to obtain the reduced-dimensional audio signal symbol graph matrix G, where each row of G corresponds to the coordinate of an audio signal in the reduced-dimensional space.

7. The method for recommending government affairs dialogue based on multi-dimensional vector fusion according to claim 6 is characterized by: Extracting audio features from audio signals using digital signal processing methods, including: Each row in the matrix G is regarded as a point in the low-dimensional space, and each point corresponds to an audio signal frame f[i]; Construct a topological graph T, where the nodes are audio signal frames f[i]; Calculate the Euclidean distance d[i,j] between any two points in the low-dimensional space as the weight of the edge between the corresponding audio signal frame nodes in the topological graph T; A depth-first search algorithm is used to search for connected subgraphs on the topological graph T, and a connected subgraph set C = {c[1], c[2], ..., c[m]} is obtained, where m is the number of connected subgraphs; For each connected subgraph c[k], extract the feature vector s[k] to obtain the voiceprint feature vector set S = {s[1], s[2], ..., s[m]}; The k-means clustering algorithm is used to cluster the voiceprint feature vector set S, and the clustering result K = {k[1], k[2], ..., k[p]} is obtained, where p is the number of cluster categories; Calculate the center vector c[i] of each category k[i] as the candidate voiceprint feature vector; Select the vector with the largest inter-class distance from the candidate voiceprint feature vectors as the final voiceprint feature vector v; The voiceprint feature vector v is used as the audio feature af extracted from the input audio signal a.

8. The method for recommending government affairs dialogue based on multi-dimensional vector fusion according to claim 1, characterized in that: The alternating optimization algorithm uses the linear search algorithm PGD, constructs a first-order Taylor weight matrix W, and uses the gradient descent method for iterative optimization.