Intelligent form content filling method and system based on natural language processing
Through multimodal text analysis and intent recognition technology, voice and text data are collected and processed in real time to generate form content that meets user needs, solving the problem of low form filling accuracy in existing technologies and improving user experience and filling efficiency.
Patent Information
- Application Number
- CN202510698584.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-09
AI Technical Summary
Existing form filling technologies cannot effectively handle semantically ambiguous or unstructured text, cannot understand the context in long conversations or multi-round interactions, and do not integrate multimodal information, resulting in low filling accuracy and poor user experience.
By collecting user voice data and text conversation data in real time, converting them into a time-aligned text sequence matrix, using a multimodal text analysis model to calculate contextual tendency values, extracting intent keywords, and combining the intent recognition model to generate form filling content, considering the multimodal fusion and conflict resolution of voice and text.
It improves the accuracy and efficiency of form filling, enhances user experience, can more comprehensively understand user expressions, reduce the impact of poor quality of single modal data, and optimize user experience.
Smart Images

Figure CN120611705A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of report generation, and in particular to a method and system for intelligent form content filling based on natural language processing. Background Art
[0002] With the popularization of digital office, forms (such as application forms, registration forms, questionnaires, etc.) serve as the core carriers of information collection. Their filling efficiency directly affects user experience and business process efficiency. The current mainstream form filling technologies are mainly divided into two categories:
[0003] 1. Fill-in based on rule matching: By mapping preset keywords (such as "name" and "ID number") with form fields, it extracts fixed-format information from user input text (such as the ID number must meet the 18-digit rule);
[0004] 2. Filling based on traditional NLP models: Automatically fill in forms through text classification, entity recognition and other technologies (such as the BERT model to identify entities such as "date of birth" and "contact number").
[0005] However, the filling method based on rule matching relies on manual rule design, cannot handle semantically ambiguous or unstructured text, and has poor generalization ability. The filling method based on traditional NLP model can only handle single-round, short text input, cannot understand the context in long conversations or multi-round interactions, and does not integrate multimodal information (such as contract images in form attachments, historical filling records, etc.), resulting in limited filling accuracy, which in turn leads to reduced form filling efficiency and poor user experience. Therefore, there is room for improvement. Summary of the Invention
[0006] In order to improve the efficiency of filling out form content and enhance user experience, the present application provides an intelligent form content filling method and system based on natural language processing.
[0007] In the first aspect, the above-mentioned invention object of the present application is achieved through the following technical solutions:
[0008] A method for filling in smart form content based on natural language processing, the method comprising the steps of:
[0009] Collecting user voice data and text conversation data in real time, and converting the user voice data and text conversation data into a time-aligned text sequence matrix;
[0010] Inputting the time-aligned text sequence matrix into a preset multimodal text analysis model to calculate the contextual tendency value;
[0011] Extracting intent keywords based on the time-aligned text sequence matrix, inputting the intent keywords into a preset intent recognition model, and outputting user intent;
[0012] According to the contextual tendency value and user intention, form filling content is generated and output to the user end.
[0013] By adopting the above technical solution, during the form generation process, user voice data (including intonation, speaking speed, pauses, etc.) and text conversation content are collected in real time, ensuring the immediacy and accuracy of the data, providing a reliable foundation for subsequent context association analysis and user input intention recognition, and converting it into a time-aligned text sequence matrix through speech recognition technology. The time-aligned text sequence matrix makes the voice and text data consistent in time, which is convenient for subsequent model processing and ensures the precise matching of semantics and voice rhythm. The obtained time-aligned text sequence matrix is input into the preset multimodal text analysis model. The multimodal text analysis model refers to a model used to judge and analyze context relevance, which can comprehensively consider the multi-round conversations in voice and text data. Temporal sequence and semantic association, using multimodal text analysis model to calculate the contextual tendency value, and then analyze the association between the context and the content. By extracting keywords from the time-aligned text sequence matrix and extracting the intent keywords, it is possible to more effectively capture the key information in the user's expression, input the extracted intent keywords into the preset intent recognition model, use the intent recognition model to accurately judge the user's intention to fill in the form content, output the user's intention, combine the contextual tendency value and user intention, generate more user-friendly and logical form filling content, fill it into the preset form, and feedback to the user end, achieving accurate grasp and efficient development of user needs, improving the efficiency of filling in form content, and improving user experience.
[0014] In a preferred example, the present application may be further configured as follows: the real-time collection of user voice data and text conversation data, and the conversion of the user voice data and text conversation data into a time-aligned text sequence matrix specifically include:
[0015] Performing Mel-spectrogram feature extraction on the user voice data to generate a spectrogram matrix;
[0016] Generate word vector sequences after segmenting text conversation data;
[0017] The speech spectrum features are matched with the text word vector sequence through the timestamp alignment algorithm, and the fused time-aligned text sequence matrix is output.
[0018] By adopting the above technical solution, Mel spectrum feature extraction is performed on the collected user voice data, voice signal processing is performed, and frequency features in the voice data are extracted, which can reflect the spectral structure of the voice signal, including the intensity distribution of different frequency components and their changes over time, and a spectrogram matrix is generated. The spectrogram matrix contains information about the voice signal in both time and frequency dimensions, providing a rich feature basis for subsequent alignment and fusion of text and voice features. The corresponding voice features are extracted using the spectrogram matrix, and the voice features in the spectrogram matrix are aligned with the text conversation data. The aligned voice features are output, which can dynamically adjust the correspondence between the text and voice features, making the two more semantically consistent, thereby improving the efficiency and effect of feature fusion. The aligned voice features and text conversation data are jointly fused to generate a time-aligned text sequence matrix. The time-aligned text sequence matrix not only contains information in the time dimension, but also integrates semantic features, providing strong support for context relevance and intent recognition.
[0019] In a preferred example, the present application may be further configured as follows: inputting the time-aligned text sequence matrix into a preset multimodal text analysis model to calculate the contextual tendency value, specifically including:
[0020] Acquire speech segment features based on the user speech data, wherein the speech segment features include a speech segment fundamental frequency mean, a background noise fundamental frequency, and an amplitude fluctuation coefficient;
[0021] A speech content calibration formula is constructed based on the speech segment features to output the keyword strength used in the speech data:
[0022] where μ p is the fundamental frequency mean of the speech segment, μ b is the fundamental frequency of background noise, A(υ j ) is the amplitude fluctuation coefficient;
[0023] Acquire text keywords based on the time-aligned text sequence matrix, and acquire word frequency weights and text keyword strengths according to the text keywords;
[0024] The keyword strength, word frequency weight and text keyword strength in the voice data are input into a preset multimodal text analysis model to calculate the contextual tendency value:
[0025] Among them, s(t i ) is the text keyword strength, ω i is the frequency weight of the keyword, I(υ j ) is the keyword intensity in the speech data, and α is the modal fusion coefficient.
[0026] By adopting the above technical solution and combining information from both voice and text modalities to perform relevance analysis on form input content, the accuracy of content recognition can be significantly improved and robustness can be enhanced. By capturing voice features such as fundamental frequency, amplitude fluctuations, etc., as well as text keywords and their emotional intensity, the multimodal fusion method can more comprehensively understand the user's expression of the input form content, reduce the impact of poor quality of single modality data on the results, and thus improve the analysis effect of context relevance.
[0027] In a preferred example, the present application may be further configured as follows: after inputting the keyword strength, word frequency weight, and text keyword strength in the voice data into a preset multimodal text analysis model and calculating the contextual tendency value, the intelligent form content filling method based on natural language processing further includes:
[0028] Based on the preset content conflict detection rules, it is determined whether the text keyword strength and the keyword strength in the voice data have opposite signs. If so, modal reweighting is triggered and the second modal fusion coefficient is output:
[0029] α'=α-γ·|s(t i )-sign(I(υ i ))|, where γ is the weight coefficient;
[0030] When the second modal fusion coefficient is less than the coefficient threshold, a speech-text-dominated strategy is adopted to generate a second contextual tendency value.
[0031] By adopting the above technical solution, in the process of analyzing the content to be filled in the form input by the user, the keywords used in the voice data and the keywords in the text data are taken into consideration. There will be obvious differences in expression between the two. That is, when the keyword intensity in the text data is opposite to the keyword intensity in the voice data, the modal reweighting mechanism is triggered at this time. By adjusting the modal fusion coefficient, it is possible to more flexibly deal with the conflict of form content. When the reweighted second modal fusion coefficient is less than the coefficient threshold, the voice-text dominant strategy is adopted first. This setting is based on the fact that voice text can often reflect the user's real content more directly and truly. It can not only improve the accuracy of form content analysis, but also avoid incorrect filling of content due to text ambiguity or misunderstanding, which helps to improve user experience.
[0032] In a preferred example, the present application may be further configured as follows: extracting intent keywords based on the time-aligned text sequence matrix, inputting the intent keywords into a preset intent recognition model, and outputting user intent, specifically including:
[0033] Extracting intent keywords based on the time-aligned text sequence matrix to form a dynamic keyword vocabulary;
[0034] The keyword group weight is calculated based on the dynamic keyword vocabulary, and the keywords with keyword group weights higher than a threshold are input into a preset intention recognition model to output the user intention.
[0035] By adopting the above technical solution and dynamically building a keyword vocabulary, the core intentions in user expressions can be captured in real time, improving the accuracy and timeliness of intent recognition. At the same time, combined with the calculation of keyword group weights, the expression of user intentions is further refined, enabling the intent recognition model to more finely understand the user's needs for filling in form content. This not only helps to improve the intelligent filling effect of the form, but also optimizes the user experience and improves user satisfaction and loyalty.
[0036] In a preferred example, the present application may be further configured as follows: generating form filling content according to the contextual tendency value and user intention, and outputting the content to the user terminal, specifically including:
[0037] Classifying the text relevance level according to the contextual tendency value, inputting the user intention and the text relevance level into a preset strategy matching rule table, and mapping out a form template;
[0038] LLM is called to generate form filling content based on the form template, and the illegal content is blocked by the compliance filter and then output to the user end.
[0039] By adopting the above technical solution, by comprehensively considering the contextual tendency value and user intention, and inputting them into the preset policy matching rule table, accurate mapping of the form template is achieved. This not only greatly improves the matching degree between the words and the actual needs of users, and enhances the personalization and pertinence of the interaction, but also through the division of text relevance levels, the form filling content can be more in line with the user's needs, effectively improving the user's form filling experience. Furthermore, the large language model (LLM) is used to generate form filling content based on the selected form template, which not only enriches the expression of the content, but also ensures the natural flow and logical coherence of the content. At the same time, the built-in compliance filter can screen and block illegal content in real time to ensure that the output form complies with business regulations and respects user feelings, laying a solid foundation for building a safe, healthy and efficient interactive environment.
[0040] In a preferred example, the present application may be further configured as follows: after generating form filling content according to the contextual tendency value and user intention and outputting it to a preset form, the intelligent form content filling method based on natural language processing further includes:
[0041] Real-time monitoring of user feedback signals during form completion, including response time, frequency of affirmative words, and duration of silence;
[0042] Calculate the form filling effect score based on the feedback signal and output the form filling score value:
[0043]
[0044] Comparing the form filling score with a preset score threshold, and generating a form switching strategy when the form filling score is less than the score threshold;
[0045] Update the intent recognition model parameters based on the form switching strategy.
[0046] By adopting the above technical solution, after the filled-in form is output to the user's dialog box, the user's feedback signal is monitored in real time. The feedback signal includes key indicators such as response time, frequency of affirmative words and silence duration, and the form filling is instantly evaluated and quantitatively scored, which enhances the sensitivity and response speed of the form filling system. It can also accurately capture subtle changes in the user's form filling process. When the form filling score value is lower than the preset score threshold, a form switching strategy is automatically generated, the form switching strategy is responded to, and the parameters of the intent recognition model are automatically updated, thereby enhancing the intelligence of form filling and making it more in line with user intentions.
[0047] In the second aspect, the above-mentioned invention object of this application is achieved through the following technical solutions:
[0048] A system for filling in smart form content based on natural language processing, the system comprising:
[0049] A conversation data collection module is used to collect user voice data and text conversation data in real time, and convert the user voice data and text conversation data into a time-aligned text sequence matrix;
[0050] A text analysis module, configured to input the time-aligned text sequence matrix into a preset multimodal text analysis model to calculate a contextual tendency value;
[0051] A user intent analysis module is configured to extract intent keywords based on the time-aligned text sequence matrix, input the intent keywords into a preset intent recognition model, and output user intent;
[0052] The form generation module is used to generate form filling content according to the context tendency value and user intention, and output it to the user end.
[0053] By adopting the above technical solution, during the form generation process, user voice data (including intonation, speaking speed, pauses, etc.) and text conversation content are collected in real time, ensuring the immediacy and accuracy of the data, providing a reliable foundation for subsequent context association analysis and user input intention recognition, and converting it into a time-aligned text sequence matrix through speech recognition technology. The time-aligned text sequence matrix makes the voice and text data consistent in time, which is convenient for subsequent model processing and ensures the precise matching of semantics and voice rhythm. The obtained time-aligned text sequence matrix is input into the preset multimodal text analysis model. The multimodal text analysis model refers to a model used to judge and analyze context relevance, which can comprehensively consider the multi-round conversations in voice and text data. Temporal sequence and semantic association, using multimodal text analysis model to calculate the contextual tendency value, and then analyze the association between the context and the content. By extracting keywords from the time-aligned text sequence matrix and extracting the intent keywords, it is possible to more effectively capture the key information in the user's expression, input the extracted intent keywords into the preset intent recognition model, use the intent recognition model to accurately judge the user's intention to fill in the form content, output the user's intention, combine the contextual tendency value and user intention, generate more user-friendly and logical form filling content, fill it into the preset form, and feedback to the user end, achieving accurate grasp and efficient development of user needs, improving the efficiency of filling in form content, and improving user experience.
[0054] Thirdly, the above-mentioned purpose of this application is achieved through the following technical solutions:
[0055] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for intelligent form content filling based on natural language processing are implemented.
[0056] Fourthly, the above-mentioned purpose of the present application is achieved through the following technical solutions:
[0057] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned intelligent form content filling method based on natural language processing.
[0058] In summary, this application includes at least one of the following beneficial technical effects:
[0059] 1. During the form generation process, user voice data (including intonation, speaking speed, pauses, etc.) and text conversation content are collected in real time to ensure the immediacy and accuracy of the data, providing a reliable foundation for subsequent context association analysis and user input intention recognition. The data is converted into a time-aligned text sequence matrix through speech recognition technology. The time-aligned text sequence matrix keeps the voice and text data consistent in time, which is convenient for subsequent model processing and ensures the precise matching of semantics and voice rhythm. The obtained time-aligned text sequence matrix is input into the preset multimodal text analysis model. The multimodal text analysis model refers to a model used to judge and analyze context relevance, which can comprehensively consider the time sequence of multiple rounds of conversations in voice and text data. With semantic association, the multimodal text analysis model is used to calculate the contextual tendency value, and then the correlation between the context and the content is analyzed. By extracting keywords from the time-aligned text sequence matrix and extracting the intention keywords, the key information in the user's expression can be captured more effectively. The extracted intention keywords are input into the preset intention recognition model, and the intention recognition model is used to accurately judge the user's intention to fill in the form content, output the user's intention, and combine the contextual tendency value and user intention to generate more logical form filling content that is more in line with user needs. The content is filled into the preset form and fed back to the user end, achieving accurate grasp and efficient development of user needs, improving the efficiency of form content filling, and improving user experience;
[0060] 2. Combining information from both voice and text modalities to analyze the relevance of form input content can significantly improve the accuracy and robustness of content recognition. By capturing voice features such as fundamental frequency and amplitude fluctuations, as well as text keywords and their emotional intensity, multimodal fusion methods can more comprehensively understand users' expressions of form input content, reduce the impact of poor single-modal data quality on the results, and thus improve the analysis of contextual relevance.
[0061] 3. When analyzing the content to be filled out in user-entered forms, we consider the keywords used in voice data and the keywords in text data. There may be significant differences in expression between the two. That is, when the keyword strength in the text data has an opposite sign to that in the voice data, the modal reweighting mechanism is triggered. By adjusting the modal fusion coefficient, we can more flexibly deal with form content conflicts. When the reweighted second modal fusion coefficient is less than the coefficient threshold, the voice-text-dominant strategy is prioritized. This setting is based on the fact that voice and text can often more directly and truly reflect the user's actual content. This not only improves the accuracy of form content analysis, but also avoids incorrect content filled out due to text ambiguity or misunderstanding, helping to improve the user experience.
[0062] 4. By dynamically constructing a keyword vocabulary, the core intent of user expressions can be captured in real time, improving the accuracy and timeliness of intent recognition. At the same time, combined with the calculation of keyword group weights, the expression of user intent is further refined, enabling the intent recognition model to more precisely understand the user's needs for filling in form content. This not only helps to improve the intelligent filling effect of the form, but also optimizes the user experience and improves user satisfaction and loyalty. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a flow chart of a method for filling in smart form content based on natural language processing in one embodiment of the present application;
[0064] Figure 2 This is a flowchart for implementing step S10 in the method for filling in smart form content based on natural language processing in one embodiment of the present application;
[0065] Figure 3 This is a flowchart for implementing step S20 in the method for filling in smart form content based on natural language processing in one embodiment of the present application;
[0066] Figure 4 This is another implementation flowchart of the method for filling in smart form content based on natural language processing in one embodiment of the present application;
[0067] Figure 5 This is a flowchart for implementing step S30 in the method for filling in smart form content based on natural language processing in one embodiment of the present application;
[0068] Figure 6 This is a flowchart for implementing step S40 in the method for filling in smart form content based on natural language processing in one embodiment of the present application;
[0069] Figure 7 This is another implementation flowchart of the method for filling in smart form content based on natural language processing in one embodiment of the present application;
[0070] Figure 8 This is a principle block diagram of an intelligent form content filling system based on natural language processing in one embodiment of the present application;
[0071] Figure 9 It is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0072] The present application is further described in detail below with reference to the accompanying drawings.
[0073] In one embodiment, if Figure 1 As shown, the present application discloses a method for intelligent form content filling based on natural language processing, which specifically includes the following steps:
[0074] S10: Collect user voice data and text conversation data in real time, and convert the user voice data and text conversation data into a time-aligned text sequence matrix.
[0075] Specifically, during the form generation process, user voice data (including intonation, speaking speed, pauses, etc.) and text conversation content are collected in real time to ensure the immediacy and accuracy of the data, providing a reliable foundation for subsequent contextual association analysis and user input intention recognition. Through speech recognition technology, it is converted into a time-aligned text sequence matrix. The time-aligned text sequence matrix keeps the voice and text data consistent in time, facilitating subsequent model processing and ensuring accurate matching of semantics and speech rhythm.
[0076] S20: Inputting the time-aligned text sequence matrix into a preset multimodal text analysis model to calculate a contextual tendency value.
[0077] Specifically, a multimodal text analysis model refers to a model used to judge and analyze the relevance of context. The obtained time-aligned text sequence matrix is input into the multimodal text analysis model, and the multimodal text analysis model is used to calculate the context tendency value in combination with the speech features and the sentiment value of the text keywords, thereby analyzing the relevance between the context and the content.
[0078] S30: extracting intent keywords based on the time-aligned text sequence matrix, inputting the intent keywords into a preset intent recognition model, and outputting user intent.
[0079] Specifically, keyword extraction is performed on the time-aligned text sequence matrix to extract intent keywords, which can more effectively capture the key information in the user's expression. The extracted intent keywords are input into the preset intent recognition model, and the intent recognition model is used to accurately judge the user's intention in filling out the form content and output the user's intent.
[0080] S40: Generate form filling content according to the context tendency value and user intention, and output it to the user end.
[0081] Specifically, by combining contextual propensity values and user intent, LLM will adjust the form filling content based on the user's contextual propensity values to generate a form filling strategy that is more in line with user needs and more complete and logical.
[0082] In this embodiment, during the form generation process, user voice data (including intonation, speaking speed, pauses, etc.) and text conversation content are collected in real time to ensure the immediacy and accuracy of the data, providing a reliable basis for subsequent context association analysis and user input intention recognition, and converted into a time-aligned text sequence matrix through speech recognition technology. The time-aligned text sequence matrix makes the voice and text data consistent in time, which is convenient for subsequent model processing and ensures the precise matching of semantics and voice rhythm. The obtained time-aligned text sequence matrix is input into a preset multimodal text analysis model. The multimodal text analysis model refers to a model used to judge and analyze context relevance, which can comprehensively consider the time in multiple rounds of conversations in voice and text data. Sequence and semantic association, use the multimodal text analysis model to calculate the contextual tendency value, and then analyze the association between the context and the content. By extracting keywords from the time-aligned text sequence matrix and extracting the intent keywords, it can more effectively capture the key information in the user's expression, input the extracted intent keywords into the preset intent recognition model, use the intent recognition model to accurately judge the user's form content filling intention, output the user's intention, combine the contextual tendency value and user intention, generate more user-friendly and logical form filling content, fill it into the preset form, and feedback to the user end, realizing the accurate grasp and efficient development of user needs, improving the efficiency of form content filling, and improving user experience.
[0083] In one embodiment, if Figure 2 As shown, in step S10, user voice data and text conversation data are collected in real time, and converted into a time-aligned text sequence matrix based on the user voice data and text conversation data, specifically including:
[0084] S11: Performing Mel-spectrogram feature extraction on the user voice data to generate a spectrogram matrix.
[0085] Specifically, the collected user voice data is subjected to Mel spectrum feature extraction and voice signal processing to extract the frequency features in the voice data, which can reflect the spectral structure of the voice signal, including the intensity distribution of different frequency components and their changes over time, and generate a spectrogram matrix. The spectrogram matrix contains information on the voice signal in both time and frequency dimensions.
[0086] S12: Generate word vector sequences after segmenting the text conversation data.
[0087] Specifically, for text conversation data, word segmentation technology is used to break it down into independent vocabulary units, and a word embedding model is used to convert these vocabulary units into word vector sequences in a high-dimensional space to facilitate subsequent numerical calculations and analysis.
[0088] S13: Match the speech spectrum features with the text word vector sequence through the timestamp alignment algorithm, and output the fused time-aligned text sequence matrix.
[0089] Specifically, the timestamp alignment algorithm is used to accurately match the speech spectrum features with the text word vector sequence in time according to the time stamps in the speech and text data, ensuring that the speech features at each moment strictly correspond to the corresponding text content, thereby generating a fused time-aligned text sequence matrix that contains both speech information and text semantics, providing reliable basic data for subsequent multimodal analysis and intent analysis.
[0090] In one embodiment, if Figure 3 As shown, in step S20, the time-aligned text sequence matrix is input into a preset multimodal text analysis model to calculate the contextual tendency value, which specifically includes:
[0091] S21: Acquire speech segment features based on the user speech data, wherein the speech segment features include a speech segment fundamental frequency mean, a background noise fundamental frequency, and an amplitude fluctuation coefficient.
[0092] Specifically, the user's voice data is analyzed through advanced voice processing technology, and the fundamental frequency mean of the voice segment is accurately extracted to reflect the speaker's average pitch level. At the same time, the fundamental frequency characteristics of the background noise are separated and calculated to measure the degree of interference of environmental noise on the voice signal. In addition, the amplitude stability of the voice segment is quantitatively evaluated by calculating the fluctuation coefficient of the amplitude over time.
[0093] S22: Constructing a speech content calibration formula according to the speech segment features, and outputting the keyword strength used in the speech data.
[0094] Specifically, the keyword strength in the voice data is calculated according to the following formula:
[0095]
[0096] where μ p is the fundamental frequency mean of the speech segment, μ b is the fundamental frequency of background noise, A(υ j ) is the amplitude fluctuation coefficient.
[0097] S23: Acquire text keywords based on the time-aligned text sequence matrix, and acquire word frequency weights and text keyword strengths according to the text keywords.
[0098] Specifically, each text fragment is extracted from the time-aligned text sequence matrix, and the TF-IDF algorithm combined with text mining technology is used to identify text keywords with significant discrimination. The frequency of occurrence of each keyword in the text is counted, and the word frequency weight is calculated based on the frequency distribution to quantify the importance of the keyword. At the same time, each keyword is assigned a corresponding strength value, thereby fully revealing the key information and importance of the text content.
[0099] S24: Inputting the keyword strength, word frequency weight and text keyword strength in the voice data into a preset multimodal text analysis model to calculate the contextual tendency value.
[0100] Specifically, the contextual tendency value is calculated according to the following formula, combining the keyword strength, word frequency weight, and text keyword strength in the voice data:
[0101] Among them, s(t i ) is the text keyword strength, ω i is the frequency weight of the keyword, I(υ j ) is the keyword intensity in the speech data, and α is the modal fusion coefficient (0.6≤α≤0.8).
[0102] In one embodiment, if Figure 4 As shown, after step S24, that is, after inputting the keyword strength, word frequency weight and text keyword strength in the voice data into a preset multimodal text analysis model and calculating the contextual tendency value, the intelligent form content filling method based on natural language processing further includes:
[0103] S25: Based on the preset content conflict detection rules, determine whether the text keyword strength and the keyword strength in the voice data have opposite signs. If so, trigger modal reweighting and output the second modal fusion coefficient.
[0104] Specifically, during the analysis of the content to be filled out in the user's form, the keywords used in the voice data and the keywords in the text data are taken into account. There will be obvious differences in the expressions of the two. That is, when the keyword intensity in the text data and the keyword intensity in the voice data have opposite signs, the modal reweighting mechanism is triggered. The modal fusion coefficient is adjusted using the following formula:
[0105] α'=α-γ·|s(t i )-sign(I(υ i ))|, where γ is the weight coefficient.
[0106] S26: When the second modal fusion coefficient is less than the coefficient threshold, a speech-text-dominated strategy is adopted to generate a second contextual tendency value.
[0107] Specifically, when the reweighted second modal fusion coefficient is less than the coefficient threshold, that is, α<0.5, the voice-text-based approach can often more directly and truly reflect the user's real content. The voice-text-dominated strategy is preferably adopted, and the second modal fusion coefficient is updated to the calculation formula of step S24, and a new contextual tendency value is output to avoid incorrect content filling due to text ambiguity or misunderstanding, which helps to improve the user experience and ensure that the content filled in by the user in the form can be understood more accurately.
[0108] In one embodiment, if Figure 5 As shown, in step S30, the intention keywords are extracted based on the time-aligned text sequence matrix, the intention keywords are input into the preset intention recognition model, and the user intention is output, which specifically includes:
[0109] S31: extracting intent keywords according to the time-aligned text sequence matrix to form a dynamic keyword vocabulary.
[0110] Specifically, a dynamic keyword library is built to dynamically load domain keywords according to industry types, capturing the core intent of user expressions in real time, thereby improving the accuracy and timeliness of intent recognition.
[0111] S32: Calculate keyword group weights based on the dynamic keyword thesaurus, input keywords whose keyword group weights are higher than a threshold into a preset intent recognition model, and output user intent.
[0112] Specifically, the weight of the keyword combination is calculated according to the weight calculation formula, which further refines the user's intention expression, enabling the intent recognition model to more precisely understand the user's needs for filling in the form content:
[0113]
[0114] Among them, TF(k) is the term frequency, IDF(k) is the inverse document frequency;
[0115] Furthermore, keywords with weights higher than the threshold are input into the preset intent recognition model to output the user intent:
[0116] P intent =σ(W h ·h t +b), where h t is the temporal hidden state, W h Keywords with weights higher than the threshold can improve the intelligent filling effect of forms, optimize user experience, and increase user satisfaction and loyalty.
[0117] In one embodiment, if Figure 6As shown, in step S40, form filling content is generated according to the contextual tendency value and user intention, and output to the user terminal, specifically including:
[0118] S41: Dividing the text relevance level according to the context tendency value, inputting the user intention and the text relevance level into a preset strategy matching rule table, and mapping out a form template.
[0119] Specifically, the text relevance level is divided according to the contextual tendency value, and it and the user intention are input into the preset strategy matching rule table to map out the form template, thereby achieving accurate mapping of the form template. This not only greatly improves the matching degree between the words and the actual needs of users, and enhances the personalization and targeting of the interaction, but also through the division of text relevance levels, the form filling content can be more in line with the user's needs, effectively improving the user's form filling experience.
[0120] S42: Calling LLM to generate form filling content based on the form template, and outputting it to the user end after shielding the illegal content through the compliance filter.
[0121] Specifically, the large language model (LLM) is used to generate form filling content based on the selected form template, which not only enriches the expression of the content, but also ensures the natural fluency and logical coherence of the content.
[0122] Furthermore, the built-in compliance filter can screen and block illegal content in real time. During the compliance filtering period, a sensitive word library and compliance regular expressions are set. Based on the form filling content generated by LLM, the form filling content risk value is calculated. Based on the form filling content risk value, it is judged whether the generated form filling content complies with regulations. This ensures that the output form filling content not only meets business regulations but also respects user experience, laying a solid foundation for building a safe, healthy, and efficient interactive environment. For example:
[0123] Sensitive word weight i +0.5·Number of illegal pattern matching words. When R is less than 1, it means that the generated form filling content complies with the regulations.
[0124] In one embodiment, if Figure 7 As shown, after step S40, that is, after generating form filling content according to the contextual tendency value and user intention and outputting it to the preset form, the intelligent form content filling method based on natural language processing further includes:
[0125] S50: Real-time monitoring of feedback signals from users filling out forms, including response time, frequency of affirmative words, and duration of silence.
[0126] S60: Calculate the form filling effect score based on the feedback signal, output the form filling score value, compare the form filling score value with a preset score threshold, and generate a form switching strategy when the form filling score value is less than the score threshold.
[0127] Specifically, after the completed form is output to the user's dialog box, the user's feedback signals are monitored in real time. The feedback signals include key indicators such as response time, frequency of affirmative words, and silence duration, and the form filling effect is instantly evaluated and quantitatively scored:
[0128] When the form filling score is lower than the preset score threshold, a form switching strategy is automatically generated. Generally, the score threshold is 0.3, that is, when S is less than 0.3, a form switching strategy is automatically generated.
[0129] S70: Update the intent recognition model parameters based on the form switching strategy.
[0130] Specifically, it responds to form switching strategies, automatically updates the parameters of the intent recognition model, enhances the intelligence of form filling, and makes it more in line with user intentions.
[0131] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0132] In one embodiment, a system for filling in smart form content based on natural language processing is provided. The system for filling in smart form content based on natural language processing corresponds to the method for filling in smart form content based on natural language processing in the above embodiment. Figure 8 As shown, the intelligent form content filling system based on natural language processing includes a conversation data collection module, a text analysis module, a user intent analysis module, and a form generation module. The functional modules are described in detail as follows:
[0133] A conversation data collection module is used to collect user voice data and text conversation data in real time, and convert the user voice data and text conversation data into a time-aligned text sequence matrix;
[0134] A text analysis module, configured to input the time-aligned text sequence matrix into a preset multimodal text analysis model to calculate a contextual tendency value;
[0135] A user intent analysis module is configured to extract intent keywords based on the time-aligned text sequence matrix, input the intent keywords into a preset intent recognition model, and output user intent;
[0136] The form generation module is used to generate form filling content according to the context tendency value and user intention, and output it to the user end.
[0137] For the specific definition of the intelligent form content filling system based on natural language processing, please refer to the definition of the intelligent form content filling method based on natural language processing above, which will not be repeated here. The various modules in the above-mentioned intelligent form content filling system based on natural language processing can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0138] In one embodiment, an electronic device is provided. The electronic device may be a server, and its internal structure diagram may be as follows: Figure 9 As shown. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store a database. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a method for filling in intelligent form content based on natural language processing.
[0139] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed:
[0140] Collecting user voice data and text conversation data in real time, and converting the user voice data and text conversation data into a time-aligned text sequence matrix;
[0141] Inputting the time-aligned text sequence matrix into a preset multimodal text analysis model to calculate the contextual tendency value;
[0142] Extracting intent keywords based on the time-aligned text sequence matrix, inputting the intent keywords into a preset intent recognition model, and outputting user intent;
[0143] According to the contextual tendency value and user intention, form filling content is generated and output to the user end.
[0144] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0145] Collecting user voice data and text conversation data in real time, and converting the user voice data and text conversation data into a time-aligned text sequence matrix;
[0146] Inputting the time-aligned text sequence matrix into a preset multimodal text analysis model to calculate the contextual tendency value;
[0147] Extracting intent keywords based on the time-aligned text sequence matrix, inputting the intent keywords into a preset intent recognition model, and outputting user intent;
[0148] According to the contextual tendency value and user intention, form filling content is generated and output to the user end.
[0149] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0150] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0151] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for filling in intelligent form content based on natural language processing, characterized in that: The method for filling in intelligent form content based on natural language processing comprises the following steps: Collecting user voice data and text conversation data in real time, and converting the user voice data and text conversation data into a time-aligned text sequence matrix; Inputting the time-aligned text sequence matrix into a preset multimodal text analysis model to calculate the contextual tendency value; Extracting intent keywords based on the time-aligned text sequence matrix, inputting the intent keywords into a preset intent recognition model, and outputting user intent; According to the contextual tendency value and user intention, form filling content is generated and output to the user end.
2. The method for filling in intelligent form content based on natural language processing according to claim 1, characterized in that: The real-time collection of user voice data and text conversation data, and conversion of the user voice data and text conversation data into a time-aligned text sequence matrix, specifically includes: Performing Mel-spectrogram feature extraction on the user voice data to generate a spectrogram matrix; Generate word vector sequences after segmenting text conversation data; The speech spectrum features are matched with the text word vector sequence through the timestamp alignment algorithm, and the fused time-aligned text sequence matrix is output.
3. The method for filling in intelligent form content based on natural language processing according to claim 1, characterized in that: Inputting the time-aligned text sequence matrix into a preset multimodal text analysis model to calculate the contextual tendency value specifically includes: Acquire speech segment features based on the user speech data, wherein the speech segment features include a speech segment fundamental frequency mean, a background noise fundamental frequency, and an amplitude fluctuation coefficient; A speech content calibration formula is constructed based on the speech segment features to output the keyword strength used in the speech data: where μ p is the fundamental frequency mean of the speech segment, μ b is the fundamental frequency of background noise, A(υ j ) is the amplitude fluctuation coefficient; Acquire text keywords based on the time-aligned text sequence matrix, and acquire word frequency weights and text keyword strengths according to the text keywords; The keyword strength, word frequency weight and text keyword strength in the voice data are input into a preset multimodal text analysis model to calculate the contextual tendency value: Among them, s(t i ) is the text keyword strength, ω i is the frequency weight of the keyword, I(υ j ) is the keyword intensity in the speech data, and α is the modal fusion coefficient.
4. The method for filling in intelligent form content based on natural language processing according to claim 3, characterized in that: After inputting the keyword strength, word frequency weight, and text keyword strength in the voice data into a preset multimodal text analysis model and calculating the contextual tendency value, the natural language processing-based intelligent form content filling method further includes: Based on the preset content conflict detection rules, it is determined whether the text keyword strength and the keyword strength in the voice data have opposite signs. If so, modal reweighting is triggered and the second modal fusion coefficient is output: α′=α-γ·|s(t i )-sign(I(υ i ))|, where γ is the weight coefficient; When the second modal fusion coefficient is less than the coefficient threshold, a speech-text-dominated strategy is adopted to generate a second contextual tendency value.
5. The method for filling in intelligent form content based on natural language processing according to claim 1, characterized in that: The extracting of intent keywords based on the time-aligned text sequence matrix, inputting the intent keywords into a preset intent recognition model, and outputting user intent specifically includes: Extracting intent keywords based on the time-aligned text sequence matrix to form a dynamic keyword vocabulary; The keyword group weight is calculated based on the dynamic keyword vocabulary, the keyword group weight is input into a preset intention recognition model, and the user intention is output.
6. The method for filling in intelligent form content based on natural language processing according to claim 1, characterized in that: Generating form filling content according to the contextual tendency value and user intention and outputting it to the user terminal specifically includes: Classifying the text relevance level according to the contextual tendency value, inputting the user intention and the text relevance level into a preset strategy matching rule table, and mapping out a form template; LLM is called to generate form filling content based on the form template, and the illegal content is blocked by the compliance filter and then output to the user end.
7. The method for filling in intelligent form content based on natural language processing according to claim 1, characterized in that: After generating form filling content according to the contextual tendency value and user intention and outputting it into a preset form, the intelligent form content filling method based on natural language processing further includes: Real-time monitoring of user feedback signals during form completion, including response time, frequency of affirmative words, and duration of silence; Calculate the form filling effect score based on the feedback signal and output the form filling score value: Comparing the form filling score with a preset score threshold, and generating a form switching strategy when the form filling score is less than the score threshold; Update the intent recognition model parameters based on the form switching strategy.
8. An intelligent form content filling system based on natural language processing, characterized in that: The intelligent form content filling system based on natural language processing includes: A conversation data collection module is used to collect user voice data and text conversation data in real time, and convert the user voice data and text conversation data into a time-aligned text sequence matrix; A text analysis module, configured to input the time-aligned text sequence matrix into a preset multimodal text analysis model to calculate a contextual tendency value; A user intent analysis module is configured to extract intent keywords based on the time-aligned text sequence matrix, input the intent keywords into a preset intent recognition model, and output user intent; The form generation module is used to generate form filling content according to the context tendency value and user intention, and output it to the user end.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for filling in intelligent form content based on natural language processing as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for filling in intelligent form content based on natural language processing as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Implementation method and device of intelligent business circulation engine, and storage medium
CN119359252A
Bank financing product recommendation method and system
CN119963296A
Intelligent form filling method based on voice interaction
CN119993140A
Vision-based generation of navigation workflow for automatically filling application forms using large language models
EP4542439A1
Cited By
Information approval method and device
CN121565161A