Web interaction method based on machine training model and server

By using the machine training model of OpenNLP and MacBERT in the Java Web Management System, user operation statements are analyzed intently and named entities are extracted, which solves the limitations of natural language processing and compound operations in the system and achieves more efficient operation intelligence.

CN119719437AInactive Publication Date: 2025-03-28FUJIAN SHITONG INFORMATION IND DEV CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411878460.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to achieve user-friendly operation intelligence in Java Web management systems, especially in natural language processing and composite operations.

Method used

Using a machine training model based on OpenNLP and MacBERT, the user's operation statements are analyzed intently, the slot corresponding to the user's intention is determined, and the named entity is obtained through the slot dictionary to generate operation commands.

Benefits of technology

It realizes semantic understanding and intent determination of user statements, can accurately extract and identify named entities in user operation statements, complete the operations that users want to perform, and improves the intelligent operation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719437A_ABST
    Figure CN119719437A_ABST
Patent Text Reader

Abstract

The invention discloses a Web interaction method based on a machine training model and a server. The Web interaction method comprises the following steps: acquiring a user operation statement; performing intention analysis on the user operation statement through a machine training model based on OpenNLP and MacBERT, and determining a slot position corresponding to the user intention according to an analysis result; obtaining a named entity in the user operation statement according to a slot dictionary corresponding to a slot, and determining an operation command; executing the operation command, and returning an operation result; according to the method, intention analysis is carried out on the user operation statement through the machine training model based on OpenNLP and MacBERT, semantic understanding can be more accurately carried out on the user statement, the user intention is determined, and the user operation statement can be more accurately obtained by obtaining the slot position corresponding to the user intention and the slot position dictionary corresponding to the slot position. The named entity in the user operation statement can be extracted and recognized more accurately, then the corresponding operation command is generated for specific operation, and a more ideal operation intelligent effect can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Web system interaction, and in particular to a Web interaction method and a server based on a machine training model. Background Art

[0002] In today's Java Web management systems, simplicity, aesthetics, and ease of use have become essential elements to provide a better user experience. However, as functions continue to increase, the complexity of user operations also increases. For example, when a user needs to quickly find dictionary information related to "admin", it may take multiple steps: enter system management from the main menu, select configuration management, further enter the data dictionary, and finally enter "admin" in the search box to search. This undoubtedly increases the learning cost and difficulty of use for novice users.

[0003] To solve this problem, Lucene was introduced. Lucene is a Java-based full-text information retrieval toolkit that can provide users with a more convenient search experience. With the integration of Lucene, users only need to enter "data dictionary" in the search box to quickly locate the target tab without going through a lengthy operation link. Such optimization not only simplifies the operation process, but also greatly improves the user's work efficiency.

[0004] However, although Lucene has solved search-related problems to a certain extent, it still has some limitations, which prevents it from fully achieving the ideal intelligent operation effect: 1. Lucene is mainly aimed at text content retrieval, not natural language processing. This means that for some common natural language expressions, Lucene may not be able to accurately identify and match. For example, if the user inputs "dictionary information", and the content exists in the index as "data dictionary", then Lucene cannot perform effective matching. In order to solve this problem, it is usually necessary to maintain a mapping table to map different expressions to the same target content. However, this not only increases the workload, but also makes it difficult to achieve complete coverage matching, because natural language expressions are very rich and diverse. For example, "dictionary information", "data dictionary information" and "dictionary".

[0005] 2. Lucene can only locate a certain tab. There are obstacles to further combining with other operations to achieve better intelligence. It is difficult to accurately respond to common system operations such as opening, closing, and minimizing. For example, for "open the data dictionary", the user may not necessarily say "open". If it is "show me the data dictionary", it is difficult to recognize. Even through Lucene's FuzzyQuery, it cannot be achieved. Although the FuzzyQuery model has made significant progress in lexical analysis and syntactic analysis, it still has difficulties in semantic understanding.

[0006] 3. At the same time, complex operations such as "opening the data dictionary menu and querying the field information related to the keyword admin" cannot be achieved only through Lucene. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a Web interaction method and a server based on a machine training model to achieve a more ideal operation intelligent effect.

[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is: A Web interaction method based on a machine training model comprises the following steps: S1. Obtain user operation statements; S2. Perform intent analysis on the user operation statement through a machine training model based on OpenNLP and MacBERT, and determine the slot corresponding to the user intent according to the analysis result; S3, obtaining the named entity in the user operation statement according to the slot dictionary corresponding to the slot, and determining the operation command; S4. Execute the operation command and return the operation result.

[0009] In order to solve the above technical problems, another technical solution adopted by the present invention is: A Web interaction server based on a machine training model comprises a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the Web interaction method based on the machine training model described above are implemented.

[0010] The beneficial effects of the present invention are as follows: a Web interaction method and a server based on a machine training model of the present invention can perform intent analysis on the user operation statements through a machine training model based on OpenNLP and MacBERT, so as to more accurately understand the semantics of the user statements and determine the user intentions. By obtaining the slots corresponding to the user intentions and the slot dictionaries corresponding to the slots, the named entities in the user operation statements can be more accurately extracted and identified, and then the corresponding operation commands can be generated to perform specific operations, so as to more accurately complete the operations to be performed by the user and achieve a more ideal intelligent operation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 This is a flowchart of a Web interaction method based on a machine training model according to an embodiment of the present invention; Figure 2 This is a structural example diagram of a Web interactive server based on a machine training model according to an embodiment of the present invention; Figure 3 This is a specific flow chart of a Web interaction method based on a machine training model according to an embodiment of the present invention; Description of labels: 1. A Web interactive server based on a machine training model; 2. Processor; 3. Memory. DETAILED DESCRIPTION

[0012] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.

[0013] Please refer to Figure 1 as well as Figure 3 , a Web interaction method based on a machine training model, comprising the steps of: S1. Obtain user operation statements; S2. Perform intent analysis on the user operation statement through a machine training model based on OpenNLP and MacBERT, and determine the slot corresponding to the user intent according to the analysis result; S3, obtaining the named entity in the user operation statement according to the slot dictionary corresponding to the slot, and determining the operation command; S4. Execute the operation command and return the operation result.

[0014] From the above description, it can be seen that the beneficial effects of the present invention are: a Web interaction method based on a machine training model of the present invention, by performing intent analysis on the user operation statements based on a machine training model based on OpenNLP and MacBERT, can more accurately understand the semantics of the user statements and determine the user intentions, and by obtaining the slots corresponding to the user intentions and the slot dictionaries corresponding to the slots, can more accurately extract and identify the named entities in the user operation statements, and then generate corresponding operation commands to perform specific operations, which can more accurately complete the operations to be performed by the user and achieve a more ideal intelligent operation effect.

[0015] Further, step S2 comprises the steps of: S21, obtaining a slot corresponding to the user intention and a slot dictionary corresponding to the slot; S22, acquiring a named entity included in the user operation statement according to the words in the slot dictionary, and acquiring context information of the named entity; S23. Fill the named entity in the corresponding slot according to the context information to obtain an operation command.

[0016] From the above description, it can be seen that the relevant information units representing the user's intention are expressed in the form of slots, and the specific data is extracted in combination with the slot dictionary. That is, through the above steps, the user's operation statements are extracted and reorganized to realize the construction of operation commands.

[0017] Further, the slot includes time, location information, menu, function point, indicator parameter, function parameter and data operation; Among them, the named entities corresponding to the time and the indicator parameters are obtained through regular tree judgment, the named entities corresponding to the location information are extracted through geographic location semantics and obtained in combination with the city conversion algorithm, and the data operation is extracted through data operation semantics and obtained in combination with the operation conversion algorithm.

[0018] It can be seen from the above description that the information unit represented by the slot includes but is not limited to the above items, and the time, indicator parameters, location information and data operations therein can be obtained in a specific way.

[0019] Furthermore, in step S22, it is necessary to determine whether the indicator parameter is in a preset mapping library. If so, the standard indicator is returned as the named entity. Otherwise, the following steps are performed: Re-segment the words through the preset custom word segmenter, and then perform pan-parse to generate a vocabulary set; Determine whether the intersection of the vocabulary set and the mapping library is empty. If the intersection is not empty, update the mapping library according to the intersection. If the intersection is empty, take the union of the vocabulary set and the mapping library, calculate the similarity between the union and the mapping library, and feedback update the OpenNLP model and the mapping library according to the similarity.

[0020] From the above description, it can be seen that based on the above steps, it is possible to continuously capture key information from user interactions, and based on these valuable data feedback, gradually optimize and improve model performance through machine learning algorithms.

[0021] Furthermore, during the training of the machine training model, during the sequence labeling task, the text data is segmented and labeled through the OpenNLP model.

[0022] From the above description, we can see that through the above steps, the deep learning ability of MacBERT and the annotation ability of OpenNLP can be combined to improve the performance of the model.

[0023] Furthermore, in the training and use of the machine training model, in the feature extraction step, feature extraction is performed through MacBERT, the input data is converted into a feature vector, and the feature vector is further processed and analyzed using the OpenNLP model.

[0024] From the above description, we can see that by using MacBERT as a feature extractor for feature extraction and further processing and analyzing the feature vector through the OpenNLP model, we can use the semantic information learned by MacBERT to improve the accuracy of feature representation.

[0025] Furthermore, in the training of the machine training model, OpenNLP is used for preliminary annotation, and then the annotation result is used as one of the input features and input into MacBERT together with the original text data for training.

[0026] From the above description, we can see that by using OpenNLP for preliminary annotation and then using the annotation results as one of the input features together with the original text data into MacBERT for training, more contextual information and linguistic features can be considered during the training process to further improve the performance of the model.

[0027] Furthermore, the machine training model is trained using a SIFT algorithm.

[0028] From the above description, it can be seen that compared with MacBert's default use of FGM adversarial training, the present invention uses the SIFT algorithm to train the model. SIFT can enhance the robustness of the model at a higher level of abstraction by attacking the layer normalization layer instead of directly attacking the word embedding.

[0029] Furthermore, step S4 is specifically as follows: Identify an operation type according to the operation command, where the operation type includes SQL query and service call; If the operation type is the SQL query, perform data query according to the operation command and return the query result; If the operation type is the service call, the service call is organized according to the operation command, and the call result is generated and returned.

[0030] It can be seen from the above description that the operation types include at least two types: SQL query and service call.

[0031] Please refer to Figure 2 A Web interaction server based on a machine training model comprises a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned Web interaction method based on a machine training model are implemented.

[0032] From the above description, it can be seen that the beneficial effects of the present invention are: a Web interactive server based on a machine training model of the present invention, by performing intent analysis on the user operation statements based on a machine training model based on OpenNLP and MacBERT, can more accurately understand the semantics of the user statements and determine the user intentions, and by obtaining the slots corresponding to the user intentions and the slot dictionaries corresponding to the slots, can more accurately extract and identify the named entities in the user operation statements, and then generate corresponding operation commands to perform specific operations, which can more accurately complete the operations to be performed by the user and achieve a more ideal intelligent operation effect.

[0033] The present invention discloses a Web interaction method and a server based on a machine training model, which are suitable for optimizing the operation process of a Web system.

[0034] Please refer to Figure 1 and Figure 3 , Embodiment 1 of the present invention is: A Web interaction method based on a machine training model comprises the following steps: S1. Obtain user operation statements; S2. Perform intent analysis on the user operation statement through a machine training model based on OpenNLP and MacBERT, and determine the slot corresponding to the user intent according to the analysis result.

[0035] In this embodiment, in the training of the machine training model, in the sequence labeling task, the text data is segmented and labeled by the OpenNLP model. The labeling results are input into MacBERT for training or prediction. In this way, the deep learning ability of MacBERT and the labeling ability of OpenNLP can be combined to improve the performance of the model.

[0036] In this embodiment, in some cases, during the training and use of the machine training model, in the feature extraction step, feature extraction is performed through MacBERT, the input data is converted into a feature vector, and the feature vector is further processed and analyzed using the OpenNLP model. In this way, the semantic information learned by MacBERT can be used to improve the accuracy of feature representation.

[0037] In this embodiment, it is also possible to consider joint training of MacBERT and OpenNLP. In the training of the machine training model, OpenNLP is used for preliminary annotation, and then the annotation result is used as one of the input features and input into MacBERT together with the original text data for training. In this way, more contextual information and linguistic features can be considered in the training process, further improving the performance of the model.

[0038] In addition, in this embodiment, the machine training model is trained using the SIFT algorithm.

[0039] MacBert uses FGM adversarial training by default to improve the performance of the model. In this embodiment, it is improved to use the SIFT algorithm for pre-training. The SIFT algorithm is more complicated than FGM, and the target of the attack is not the word embedding, but the layer normalization layer after the embedding. Layer normalization is a commonly used normalization technique used to stabilize the training process of the neural network and reduce the problem of internal covariate shift. In SIFT, the robustness of the model can be further improved by applying perturbations to the embedding vector after layernormalization processing.

[0040] Compared with the traditional MacBert model, the MacBert model (macBert-large+SIFT) pre-trained with SIFT algorithm has better performance. Please refer to the following Table 1: Table 1

[0041] Among them, MNLI-m / mm, SST-2, QNLI, CoLA, RTE, MRPC, QQP, STS-B: These are different tasks in natural language processing, including multilingual reasoning (MNLI-m / mm), sentiment analysis (SST-2), question answering natural language reasoning (QNLI), grammatical acceptability judgment (CoLA), textual entailment (RTE), Microsoft Research Sentence Pair Matching (MRPC), Quora Question Pair Matching (QQP), and semantic text similarity (STS-B).

[0042] Most tasks use accuracy (Acc) as the evaluation metric, but CoLA uses the Matthews correlation coefficient (MCC), MRPC and QQP use accuracy / F1 score (Acc / F1), and STS-B uses the Pearson / Spearman correlation coefficient (P / S) to evaluate model performance.

[0043] Please refer to Figure 3 , the slot includes time, location information, menu, function point, indicator parameter, function parameter and data operation; Among them, the named entities corresponding to the time and the indicator parameters are obtained through regular tree judgment, the named entities corresponding to the location information are extracted through geographic location semantics and obtained in combination with the city conversion algorithm, and the data operation is extracted through data operation semantics and obtained in combination with the operation conversion algorithm.

[0044] Step S2 comprises the steps of: S21, obtaining a slot corresponding to the user intention and a slot dictionary corresponding to the slot; S22, acquiring a named entity included in the user operation statement according to the words in the slot dictionary, and acquiring context information of the named entity; S23. Fill the named entity in the corresponding slot according to the context information to obtain an operation command.

[0045] In this embodiment, a slot is an information unit related to a specific intent or goal in a natural language dialogue system, and is used to represent specific attributes of a user's needs or intent.

[0046] By identifying and filling slots, the conversational system is able to better understand the user's needs and provide accurate responses.

[0047] The slot can be of various types such as date, time, place, name, product name, etc., depending on the application scenario of the dialogue system and user needs. In this embodiment, the slot includes but is not limited to time, location information, menu, function point, indicator parameter, function parameter and data operation.

[0048] Slot filling refers to the process of completing information in order to convert user intent into clear user instructions.

[0049] S3. Acquire the named entity in the user operation statement according to the slot dictionary corresponding to the slot, and determine the operation command.

[0050] In this embodiment, the operation command that the user needs to execute is clarified by filling the slot.

[0051] S4. Execute the operation command and return the operation result.

[0052] In this embodiment, once the sentence is recognized and parsed, the corresponding Services can be called according to the parsing results to obtain data and organize the view. For example, if the parsing result shows that the user wants to view the sales data of last month, the sales-related Services can be called to obtain the data, and then the organized view is returned to the front end.

[0053] Please refer to Figure 3 , Embodiment 2 of the present invention is: A Web interaction method based on a machine training model, which differs from the first embodiment in that in step S22, it is necessary to determine whether the indicator parameter is located in a preset mapping library, and if so, the standard indicator is returned as the named entity, otherwise the following steps are performed: Re-segment the words through the preset custom word segmenter, and then perform pan-parse to generate a vocabulary set; Determine whether the intersection of the vocabulary set and the mapping library is empty. If the intersection is not empty, update the mapping library according to the intersection. If the intersection is empty, take the union of the vocabulary set and the mapping library, calculate the similarity between the union and the mapping library, and feedback update the OpenNLP model and the mapping library according to the similarity.

[0054] In this embodiment 1, not only all the functions of embodiment 1 are included, but also a data collection and analysis module is integrated, which can continuously capture key information from user interactions, and based on these valuable data feedback, gradually optimize and improve model performance through machine learning algorithms. This dynamic learning and self-improvement ability enables the solution of embodiment 2 to show stronger adaptability and competitiveness when facing complex and changing user needs and market environments.

[0055] Please refer to Figure 2 , Embodiment 3 of the present invention is: A Web interaction server 1 based on a machine training model comprises a processor 2, a memory 3, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, the steps of a Web interaction method based on a machine training model described in the first or second embodiment above are implemented.

[0056] In summary, the Web interaction method and server based on the machine training model provided by the present invention can perform intent analysis on the user operation statements through a machine training model based on OpenNLP and MacBERT, so as to more accurately understand the semantics of the user statements and determine the user intent. By obtaining the slots corresponding to the user intent and the slot dictionaries corresponding to the slots, the named entities in the user operation statements can be more accurately extracted and identified, and then the corresponding operation commands can be generated to perform specific operations, so as to more accurately complete the operations to be performed by the user and achieve a more ideal intelligent operation effect.

[0057] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A Web interaction method based on a machine training model, characterized in that: Includes steps: S1. Obtain user operation statements; S2. Perform intent analysis on the user operation statement through a machine training model based on OpenNLP and MacBERT, and determine the slot corresponding to the user intent according to the analysis result; S3, obtaining the named entity in the user operation statement according to the slot dictionary corresponding to the slot, and determining the operation command; S4. Execute the operation command and return the operation result.

2. A Web interaction method based on a machine training model according to claim 1, characterized in that: Step S2 comprises the steps of: S21, obtaining a slot corresponding to the user intention and a slot dictionary corresponding to the slot; S22, acquiring a named entity included in the user operation statement according to the words in the slot dictionary, and acquiring context information of the named entity; S23. Fill the named entity in the corresponding slot according to the context information to obtain an operation command.

3. A Web interaction method based on a machine training model according to claim 2, characterized in that: The slot includes time, location information, menu, function point, indicator parameter, function parameter and data operation; Among them, the named entities corresponding to the time and the indicator parameters are obtained through regular tree judgment, the named entities corresponding to the location information are extracted through geographic location semantics and obtained in combination with the city conversion algorithm, and the data operation is extracted through data operation semantics and obtained in combination with the operation conversion algorithm.

4. A Web interaction method based on a machine training model according to claim 3, characterized in that: In step S22, it is necessary to determine whether the indicator parameter is in a preset mapping library. If so, the standard indicator is returned as the named entity. Otherwise, the following steps are performed: Re-segment the words through the preset custom word segmenter, and then perform pan-parse to generate a vocabulary set; Determine whether the intersection of the vocabulary set and the mapping library is empty. If the intersection is not empty, update the mapping library according to the intersection. If the intersection is empty, take the union of the vocabulary set and the mapping library, calculate the similarity between the union and the mapping library, and feedback update the OpenNLP model and the mapping library according to the similarity.

5. The Web interaction method based on a machine training model according to claim 1, characterized in that: In the training of the machine training model, during the sequence labeling task, the text data is segmented and labeled through the OpenNLP model.

6. A Web interaction method based on a machine training model according to claim 1, characterized in that: During the training and use of the machine training model, in the feature extraction step, feature extraction is performed through MacBERT, the input data is converted into a feature vector, and the feature vector is further processed and analyzed using the OpenNLP model.

7. A Web interaction method based on a machine training model according to claim 1, characterized in that: In the training of the machine training model, OpenNLP is used for preliminary annotation, and then the annotation result is used as one of the input features and input into MacBERT for training together with the original text data.

8. The Web interaction method based on a machine training model according to claim 1, characterized in that: The machine training model is trained using the SIFT algorithm.

9. A Web interaction method based on a machine training model according to claim 1, characterized in that: Step S4 is specifically as follows: Identify an operation type according to the operation command, where the operation type includes SQL query and service call; If the operation type is the SQL query, perform data query according to the operation command and return the query result; If the operation type is the service call, the service call is organized according to the operation command, and the call result is generated and returned.

10. A Web interactive server based on a machine training model, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps in the Web interaction method based on a machine training model described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Slot filling method and device

    CN111274368A

  • Retrieval method and device based on user requirements and electronic equipment

    CN116244344A

  • Reading understanding question-answering method and system based on semantic space fusion of part-of-speech tagging information

    CN118193703A

  • ML using n-gram induced input representation

    US20210232753A1