A demand processing method and device fusing keywords and semantics

By combining a dual-segmentation model with a power industry dictionary, the problem of identifying professional terms in power material procurement bidding scenarios was solved, enabling efficient and accurate processing of user needs and improving the accuracy of retrieved answers and user experience.

CN121189512BActive Publication Date: 2026-02-13JIANGSU ELECTRIC POWER INFORMATION TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511739421.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-13
Estimated Expiration
2045-11-25

AI Technical Summary

Technical Problem

Existing intelligent customer service systems cannot effectively identify technical terms in power material procurement bidding scenarios, resulting in low accuracy of recalled answers, which affects user experience and procurement efficiency.

Method used

A dual-segmentation model is adopted, combining a power industry dictionary and a basic dictionary for word segmentation. Through character-level data cleaning and dual-path parallel computing, the power industry dictionary is dynamically updated to achieve efficient and accurate processing of user-required text.

Benefits of technology

It improves the accuracy and real-time performance of semantic understanding, enhances the accuracy and real-time performance of user demand processing, solves the problem of lagging professional terminology recognition, and adapts to the rapid iteration of terminology in the power industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121189512B_ABST
    Figure CN121189512B_ABST
Patent Text Reader

Abstract

The application discloses a demand processing method and device fusing keywords and semantics, and the method comprises the following steps: collecting user demand text; performing character-level data cleaning on the user demand text to obtain standard demand text; performing word segmentation processing on the standard demand text based on a first word segmentation model and a second word segmentation model to obtain a first word segmentation set and a second word segmentation set, wherein the first word segmentation model performs word segmentation on the standard demand text through a basic dictionary, and the second word segmentation model performs word segmentation on the standard demand text through a power professional dictionary; fusing the first word segmentation set and the second word segmentation set, performing filtering and merging processing, and obtaining a standardized word sequence; and analyzing the frequency and semantics of each word in the standardized word sequence to obtain fusion features, thereby completing the processing of the user demand text. By adjusting the word segmentation logic for the power material procurement bidding scene, accurate identification of professional terms is realized, so that the accuracy of the answer is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of power demand processing, and particularly relates to a demand processing method and device fusing keywords and semantics. BACKGROUND

[0002] In the process of digital transformation of the power industry procurement link, efficient, accurate and transparent information exchange and service experience have become the core demand. At present, intelligent customer service systems and related question and answer technologies have been preliminarily applied in this field. For example, the existing intelligent customer service system can identify the user's question intention through natural language processing technology, and filter the answers from the knowledge base, realizing self-service and intelligent question and answer. However, such existing technical solutions mostly rely on relatively traditional natural language processing processes or single technical paths.

[0003] In the specific and professional scene of power material procurement bidding, user questions (such as consulting bidding terms, technical specifications, bidding requirements, etc.) usually contain a large number of professional terms, complex technical parameters and strict specification requirements. The existing question and answer systems generally have difficulty in identifying professional terms in the face of such queries. Power equipment terms are not only complex, but also iterate rapidly with technological development. Traditional word segmentation tools are mostly based on general corpus training, and their word segmentation models and dictionary updating mechanisms are difficult to adapt to the rapid changes and accurate identification needs of professional terms in the power vertical field, which may introduce errors in the word segmentation stage, and thus seriously affect the accuracy of subsequent semantic understanding and question and answer retrieval.

[0004] Patent application CN118520089A discloses a question and answer method, device and storage medium based on keyword and semantic model, including: obtaining a keyword set based on the user's question text; for each candidate document in the local knowledge base, determining the keyword matching degree of the candidate document and the question text based on the keyword set, determining the semantic similarity of the candidate document and the question text based on the semantic model; determining the comprehensive score of each candidate document based on the keyword matching degree and the semantic similarity; sorting all candidate documents according to the comprehensive score, and determining the recall document based on the sorted candidate documents; generating a question and answer result corresponding to the question text based on the question text and the recall document, which can effectively improve the accuracy and relevance of the question and answer result, and better meet the user's demand text.

[0005] The existing technology does not change the word segmentation logic for the power material procurement bidding scene, and cannot effectively solve the core problem of rapid and accurate identification of professional terms, resulting in low accuracy of the question and answer solution, affecting the user experience and procurement efficiency. How to have self-adaptive learning ability and realize efficient and accurate term identification on the basis of fusing power field knowledge to improve the accuracy of the question and answer solution is a problem to be solved at present. SUMMARY

[0006] In view of the defects in the prior art, the application provides a demand processing method and device fusing keywords and semantics, which comprises the following steps:

[0007] In the first aspect, the application provides a demand processing method fusing keywords and semantics, which specifically comprises the following steps:

[0008] collecting user demand text;

[0009] performing character-level data cleaning on the user demand text to obtain standard demand text;

[0010] performing word segmentation processing on the standard demand text based on a first word segmentation model and a second word segmentation model to obtain a first word segmentation set and a second word segmentation set, wherein the first word segmentation model performs word segmentation on the standard demand text through a basic dictionary, and the second word segmentation model performs word segmentation on the standard demand text through a power professional dictionary;

[0011] fusing the first word segmentation set and the second word segmentation set to perform filtering and merging processing to obtain a standardized word sequence;

[0012] analyzing the frequency and semantics of each word in the standardized word sequence to obtain fusion features, and completing the processing of the user demand text.

[0013] Further, the character-level data cleaning on the user demand text to obtain the standard demand text specifically comprises the following steps:

[0014] performing encoding standardization processing on the user demand text to obtain a first encoded text;

[0015] unifying the standard character width of each code in the first encoded text to obtain a second encoded text;

[0016] performing desensitization processing on the private information in the second encoded text to obtain the standard demand text.

[0017] Further, the privacy information in the second encoded text is desensitized to obtain a standard requirement text, specifically including:

[0018] According to a pre-set regular expression, corresponding privacy information is matched in the second encoded text;

[0019] According to different types of privacy information, different desensitization strategies are adopted to desensitize the privacy information to obtain a standard requirement text, wherein the desensitization strategies include at least one of information replacement, information encryption, information masking, information fuzzing and information generalization.

[0020] Further, the update of the power professional dictionary is determined by the following steps:

[0021] Real-time collection of the latest power professional files;

[0022] Data cleaning and word segmentation processing are performed on the latest power professional files to obtain candidate professional vocabularies;

[0023] Based on the word frequency, inverse document frequency, number of files appearing and appearance time of each candidate professional vocabulary in the latest power professional files, the effectiveness of each candidate professional vocabulary is analyzed and an effectiveness score is given;

[0024] Based on the word frequency of each candidate professional vocabulary in the power professional dictionary and the word frequency in the basic dictionary, the professionalism of each candidate professional vocabulary is analyzed and a professionalism score is given;

[0025] The effectiveness score and the professionalism score of each candidate professional vocabulary are judged in combination with the pre-set effective range and professional range, the target professional vocabulary is screened out and added to the power professional dictionary, and the update of the power professional dictionary is completed.

[0026] Further, based on the word frequency, inverse document frequency, number of files appearing and appearance time of each candidate professional vocabulary in the latest power professional files, the effectiveness of each candidate professional vocabulary is analyzed and an effectiveness score is given, specifically including:

[0027] The appearance time of the candidate professional vocabulary in the latest power professional files is quantified, and a time parameter is obtained in combination with a pre-set logarithmic function;

[0028] The word frequency, inverse document frequency and number of files appearing of the candidate professional vocabulary in the latest power professional files are fused to obtain a space parameter;

[0029] The ratio of the space parameter and the time parameter is calculated to obtain the effectiveness score of the corresponding candidate professional vocabulary.

[0030] Further, the first word segmentation set and the second word segmentation set are fused and filtered and merged to obtain a standardized word sequence, specifically including:

[0031] respectively to the first and second segmented word sets;

[0032] fuse the filtered first and second segmented word sets to obtain a total segmented word set;

[0033] merge synonyms in the total segmented word set to obtain a standardized word sequence.

[0034] Further, analyze the frequency and semantics of each word in the standardized word sequence to obtain fusion features, specifically including:

[0035] analyze the frequency of each word in the standardized word sequence in the user demand text and the inverse document frequency in the historical demand library, and filter the words in the standardized word sequence to obtain candidate demand words;

[0036] Based on the candidate demand words, filter similar professional documents from the pre-constructed professional knowledge base;

[0037] extract keywords from the professional documents and construct a keyword feature matrix according to the co-occurrence number of the keywords;

[0038] According to the semantic understanding model, encode each word in the standardized word sequence in the context, and perform mean pooling operation to obtain a semantic vector;

[0039] According to the type of user demand text, match different fusion strategies, fuse the keyword feature matrix and the semantic vector, and obtain the fusion result.

[0040] Further, extract keywords from the professional documents and construct a keyword feature matrix according to the co-occurrence number of the keywords, specifically including:

[0041] According to the preset window, analyze the co-occurrence number of each keyword in the professional document in the preset window, and establish an edge between each keyword;

[0042] According to the edge between the keywords, calculate the keyword weight corresponding to each keyword, specifically represented as:

[0043]

[0044] wherein, WS(v i ) is the keyword weight of keyword v i , d is the damping coefficient, ln(v i ) is the keyword set pointing to keyword v j , Out(v j ) is the keyword set pointed by node v p ;

[0045] According to the keyword weight, a keyword feature matrix is constructed.

[0046] Further, according to the type of the user demand text, different fusion strategies are matched to fuse the keyword feature matrix and the semantic vector to obtain a fusion result, specifically including:

[0047] If the type of the user demand text is a consultation type, the keyword feature matrix or the semantic vector is selected as the fusion result;

[0048] If the type of the user demand text is a technology type, the keyword feature matrix and the semantic vector are fused based on a graph convolution network model to obtain the fusion result, specifically including:

[0049] The graph-level feature corresponding to the keyword feature matrix is constructed in combination with the keyword feature matrix and the semantic vector of each core keyword;

[0050] Based on the graph-level feature corresponding to the keyword feature matrix, the similarity of the graph feature of each core keyword and the semantic vector of the user demand text is calculated, and the attention weight of each core keyword is given;

[0051] The graph feature of each core keyword and the corresponding attention weight are fused, and the fusion feature is spliced with the semantic vector of the user demand text to give the fusion result.

[0052] Further, the propagation process of the graph convolution network model on the semantic vector of each core keyword specifically includes:

[0053] Based on the edge weight between each core keyword, the standard edge weight is obtained by normalizing each edge weight in combination with the neighbor nodes of each core keyword;

[0054] The standard edge weight and the semantic vector of the corresponding core keyword are fused to obtain the fusion parameter of each core keyword;

[0055] The fusion parameters of each core keyword are summed up to obtain a propagation term in combination with the weight matrix and the bias term corresponding to the current graph convolution network layer;

[0056] Based on an activation function, the propagation term is processed to complete the propagation in the current graph convolution network layer.

[0057] Further, the propagation formula of the current graph convolution network layer is:

[0058]

[0059] wherein, is the core keyword v p the graph feature of the l+1 layer, is the core keyword vq The semantic vector, K(v) p () as the core keyword v p The neighboring nodes (including itself), e pq The core keyword is v p and core keyword v q The corresponding edge weight, W l Let b be the weight matrix of the l-th layer. l σ is the bias term, and σ is the activation function.

[0060] Furthermore, the similarity between the graph features of each core keyword and the semantic vector of the user's request text is calculated and used as the attention weight:

[0061]

[0062] Where, α p The core keyword is v p The attention weights are denoted by s, where s is the semantic vector of the user request text. The core keyword is v p The graph features are defined by V, which is the set of all core keywords, and exp() is the exponential function.

[0063] Furthermore, the graph features of each core keyword are weighted and summed with their corresponding attention weights to obtain the graph-level features of the user demand text, specifically represented as follows:

[0064]

[0065] Among them, H graph For graph-level features of user requirement text, α p The core keyword is v p Attention weights The core keyword is v p The graph features.

[0066] Secondly, the present invention also provides a demand processing apparatus that integrates keywords and semantics, employing a demand processing method that integrates keywords and semantics as described above, including:

[0067] The data acquisition module is used to collect user request text.

[0068] The data cleaning module is used to perform character-level data cleaning on user request text to obtain standard request text;

[0069] The text segmentation module is configured to perform segmentation processing on the standard demand text based on a first segmentation model and a second segmentation model, to obtain a first segmentation set and a second segmentation set, wherein the first segmentation model performs segmentation on the standard demand text by using a basic dictionary, and the second segmentation model performs segmentation on the standard demand text by using a power professional dictionary.

[0070] The segmentation merging module is configured to fuse the first segmentation set and the second segmentation set, and perform filtering and merging processing, to obtain a standardized word sequence.

[0071] The feature output module is configured to analyze the frequency and semantics of each word in the standardized word sequence, to obtain fused features, and to complete processing of the user demand text.

[0072] The present application provides a demand processing method and device fusing keywords and semantics, which at least has the following beneficial effects:

[0073] (1) By performing character-level data cleaning, double-model collaborative segmentation, double-path parallel computing, and multi-strategy feature fusion on the user demand text, and combining a dictionary with a model dynamic iteration mechanism, efficient and accurate processing of user demand in the power bidding scene is realized, the accuracy of semantic understanding is improved, and the accuracy and real-time performance of user demand processing are improved.

[0074] (2) The effectiveness and professionalism of candidate professional words in the latest power professional documents are evaluated, and the power professional dictionary is updated, and at the same time, the second segmentation model is also updated, the newly added professional words in the power professional dictionary are integrated, the rapid iteration of power field terms is adapted in real time, the semantic understanding deviation caused by model lag is avoided, and the core problem of professional term recognition lag in traditional systems is solved.

[0075] (3) By analyzing the frequency and semantics of each word in the standardized word sequence and obtaining fused features, the text understanding ability and feature representation richness of the system are improved, the user demand can be accurately recognized and understood, the data basis for providing related accurate answers for users is provided, and the user experience is improved. BRIEF DESCRIPTION OF DRAWINGS

[0076] Figure 1 The flowchart of the demand processing method fusing keywords and semantics provided by the embodiment of the present application is provided.

[0077] Figure 2 The flowchart of the data cleaning of the user demand text provided by the embodiment of the present application is provided.

[0078] Figure 3 The flowchart of updating the power professional dictionary provided by the embodiment of the present application is provided.

[0079] Figure 4 A flowchart for analyzing candidate professional terms provided in an embodiment of the present invention;

[0080] Figure 5 A flowchart for obtaining a standardized word sequence is provided as an embodiment of the present invention;

[0081] Figure 6 A flowchart for obtaining fusion features provided in an embodiment of the present invention;

[0082] Figure 7 This is an architecture diagram of the graph convolutional network model provided in an embodiment of the present invention;

[0083] Figure 8 This is a structural block diagram of the requirement processing device for fusing keywords and semantics provided in an embodiment of the present invention.

[0084] The modules are as follows: 201. Data acquisition module; 202. Data cleaning module; 203. Text segmentation module; 204. Segmentation merging module; 205. Feature output module. Detailed Implementation

[0085] To better understand the above technical solutions, a detailed description of the solutions will be provided below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0086] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.

[0087] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device that includes said element.

[0088] In the specific and professional scenario of power material procurement bidding, the question text containing user requirements (such as consulting bidding terms, technical specifications, bidding requirements, etc.) usually contains a large number of professional terms, complex technical parameters and strict specification requirements (for example, asking "which insulation test standards does a 35kV oil-immersed transformer need to meet" or "which forms of test reports need to be provided when bidding for 50 units of 10kV vacuum circuit breakers").

[0089] The power equipment terms are not only complex (such as "digital relay protection device" and "intelligent inspection robot"), but also iterate rapidly with the development of technology. Traditional word segmentation tools are difficult to adapt to the rapid changes and accurate identification requirements of professional terms in the power vertical field, which may introduce errors in the word segmentation stage, and then seriously affect the accuracy of subsequent semantic understanding and question and answer retrieval. There are problems such as difficulty in identifying professional terms, insufficient semantic understanding accuracy, and low processing efficiency. How to have self-adaptive learning ability and realize efficient and accurate term identification based on the fusion of power field knowledge to improve the accuracy of the answer is a problem to be solved.

[0090] The present application provides a demand processing method fusing keywords and semantics, comprising: collecting user demand text; performing character-level data cleaning on the user demand text to obtain a standard demand text; performing word segmentation processing on the standard demand text based on a first word segmentation model and a second word segmentation model to obtain a first word segmentation set and a second word segmentation set, wherein the first word segmentation model performs word segmentation on the standard demand text through a basic dictionary, and the second word segmentation model performs word segmentation on the standard demand text through a power professional dictionary; filtering and merging the first word segmentation set and the second word segmentation set to obtain a standardized word sequence; analyzing the frequency and semantics of each word in the standardized word sequence to obtain fusion features, and completing processing of the user demand text.

[0091] Through character-level text purification, double-model collaborative word segmentation, double-path parallel computing, concurrent process control, multi-strategy feature fusion, combined with a dictionary and a model dynamic iteration mechanism, efficient and accurate processing of user requirements in the power bidding scenario is realized, effectively solving the problems of lagging professional term identification, semantic understanding deviation and low response efficiency in traditional systems, improving the accuracy and real-time performance of user requirement processing, fully adapting to the actual application requirements of intelligent question and answer systems in the power material bidding informationization scenario, and having clear technology landing and business value.

[0092] As shown in Figure 1 The present application provides a demand processing method fusing keywords and semantics, comprising the following specific steps:

[0093] S101: Collecting user demand text.

[0094] It can be understood that after the user submits a question request including a user demand text through the front-end interactive interface (including a web page end and a mobile end application) of the information platform, the request first enters the gateway server, and the gateway receiving module executes the request to complete collection of the user demand text.

[0095] In order to avoid server resource exhaustion caused by excessive requests and ensure stable operation of the system, the gateway receiving module uses a token bucket algorithm to realize a flow limiting function. According to the maximum concurrent processing capacity of the background service cluster, the token generation rate and the maximum capacity of the token bucket are set. When the user question request concurrency exceeds the system processing capacity, the gateway automatically rejects the requests exceeding the capacity and returns a prompt message of "current request volume is large, please try again later" to the user.

[0096] S102: Perform character-level data cleaning on the user demand text to obtain a standard demand text.

[0097] Referring to Figure 2 Perform character-level data cleaning on the user demand text to obtain a standard demand text, specifically including:

[0098] Perform encoding standardization processing on the user demand text to obtain a first encoded text;

[0099] Uniform the standard character width of each code in the first encoded text to obtain a second encoded text;

[0100] Perform desensitization processing on the privacy information in the second encoded text to obtain the standard demand text, specifically including:

[0101] According to a pre-set regular expression, match the corresponding privacy information in the second encoded text;

[0102] According to different types of privacy information, different desensitization strategies are used to desensitize the privacy information to obtain the standard demand text, wherein the desensitization strategies include at least one of information replacement, information encryption, information masking, information blurring and information generalization.

[0103] In a specific embodiment, in order to eliminate text noise and format differences in the user demand text, a character-level purification process is performed. First, the user demand text is subjected to encoding standardization processing, i.e., various character encoding formats in the user demand text are converted to Unicode encoding. It should be noted that due to the possible differences in character encoding formats of user input devices (such as different brands of computers, mobile terminals), the same character may appear in different Unicode encoding representations (such as full-width space and half-width space, different encoding Chinese punctuation). Using the NFC (Normalization Form C) normalization form of the Unicode standard, all characters in the user demand text are uniformly converted to standard encoding to obtain a first encoded text, ensuring the consistency of character recognition in subsequent word segmentation processing and avoiding errors in word segmentation caused by encoding differences.

[0104] After that, the standard character width of each encoding in the first encoded text is unified to obtain a second encoded text. It should be noted that full-width characters and half-width characters occupy different widths when displayed. Full-width characters occupy two standard character widths, while half-width characters occupy one standard character width. It can be understood that the user may use the full-width mode of the input method during input, resulting in the presence of full-width numbers, letters or symbols in the user demand text. By character encoding mapping rules, the full-width characters are converted to corresponding half-width characters, eliminating the interference of character format differences on the recognition of the word segmentation engine and ensuring the correct splitting of professional terms (such as "10kV").

[0105] In another embodiment, the user submits a question request through a web page. In order to avoid parsing abnormalities of special characters (such as "&", "<", ">", "quotation marks"), they are converted to HTML entities (such as "&" is converted to , "<" is converted to ). At this time, it is necessary to reverse decode these entities according to the HTML entity encoding specification to restore the original characters and restore the true semantics of the question text (such as "35kV transformer insulation test" is restored to "35kV transformer & insulation test"), avoiding semantic deviations caused by entity encoding.

[0106] After the format of the user demand text is unified, in order to protect the privacy in the user demand text, the privacy information (such as ID number, phone number, email address, etc.) is desensitized. The user demand text may contain personal identity information (such as ID number, enterprise credit code), contact information (such as mobile phone number, email address) and other sensitive data. For example, for ID number, phone number, email address and other series of character information, information replacement can be used to replace part of the characters of the privacy information with other characters such as * or X. The privacy information can also be replaced with randomly generated data. In addition to information replacement, information masking can also be used to replace part of the characters of the privacy information with masking characters. For high-sensitivity content, information encryption methods such as symmetric encryption, asymmetric encryption, and hash encryption can be used. For digital information, information fuzzing can be used for desensitization, that is, the privacy information is fuzzed so that it cannot be accurately identified, for example, amount: 1234.56→1200-1300. For range information, information generalization can be used for desensitization, that is, the privacy information is generalized to a more general category. For example, area: Haidian District, Beijing → Beijing, occupation: software engineer → IT industry.

[0107] While strictly protecting the privacy and security of users, the subsequent processing of the core semantics of the question (such as "35kV transformer bidding requirements") is not affected.

[0108] After the above processing, the user demand text is converted into a standard demand text that is format-unified, has no coding differences, and does not contain privacy information, providing high-quality input data for subsequent word segmentation processing and reducing text noise interference on the processing results from the source.

[0109] S103: Based on the first word segmentation model and the second word segmentation model, the standard demand text is respectively subjected to word segmentation processing to obtain a first word segmentation set and a second word segmentation set.

[0110] Among them, the first word segmentation model performs word segmentation on the standard demand text through the basic dictionary, and the second word segmentation model performs word segmentation on the standard demand text through the power professional dictionary.

[0111] It is to be understood that the first segmentation model and the second segmentation model perform segmentation operations in parallel, dynamically update the dictionary, and perform real-time iteration on the dictionary to ensure timely identification of newly added terms in the power field. The first segmentation model and the second segmentation model allocate independent computing threads to achieve parallel segmentation and improve processing efficiency. Among them, the first segmentation model loads the basic dictionary and uses the forward maximum matching algorithm to perform segmentation operations. It starts from the beginning of the standard requirement text and matches the longest available vocabulary in the basic dictionary to ensure that no general vocabulary and potential professional vocabulary is missed, achieving high recall rate segmentation (e.g., "35kV oil-immersed transformer insulation test" is initially split into "35kV" "oil-immersed" "transformer" "insulation test"). The second segmentation model loads the power professional dictionary and uses the hidden Markov model to perform segmentation operations. It combines the grammar rules of power professional terms (e.g., "kV" is often used as a voltage unit suffix, and "type" is often combined with device type) and the context association relationship to accurately identify professional terms in the standard requirement text, avoiding splitting complete professional terms into scattered words (e.g., "35kV oil-immersed transformer" is identified as a complete term, not split), achieving high accuracy segmentation.

[0112] The update of the power professional dictionary is determined by the following steps: Figure 3

[0113] Real-time collection of the latest power professional files;

[0114] Data cleaning and segmentation processing of the latest power professional files to obtain candidate professional vocabulary;

[0115] Based on the word frequency, inverse document frequency, number of files appearing, and appearance time of each candidate professional vocabulary in the latest power professional files, the effectiveness of each candidate professional vocabulary is analyzed and an effectiveness score is given;

[0116] Based on the word frequency of each candidate professional vocabulary in the power professional dictionary and the word frequency in the basic dictionary, the professionalism of each candidate professional vocabulary is analyzed and a professionalism score is given;

[0117] Combining the pre-set effective range and professional range, the effectiveness score and professionalism score of each candidate professional vocabulary are judged, the target professional vocabulary is screened out and added to the power professional dictionary, and the update of the power professional dictionary is completed.

[0118] ​In a specific embodiment, in order to guarantee the recognition ability of new terms in the field of electric power (such as new equipment models and new technical parameters), the electric power professional dictionary is dynamically updated. First, a stable data connection is established with the electric power related platforms, such as the State Grid e-commerce platform, the Southern Power Grid material procurement platform, the local power enterprise bidding platform, etc. According to the document update frequency of each platform (such as daily update for some platforms and weekly update for some platforms), the corresponding collection frequency is set, and the latest documents such as bidding documents, technical specifications, and answer documents published by the platform are collected as the latest electric power professional documents to obtain the latest data source in time.

[0119] The latest electric power professional documents are subjected to data cleaning and word segmentation processing to obtain candidate professional words. The data cleaning includes encoding standardization, uniform standard character width, and information desensitization processing, etc. Then, a statistical based term extraction algorithm is used to obtain each candidate professional word and calculate the core indicators of the candidate professional word, i.e. the effectiveness score and the professional score.

[0120] Further, referring to Figure 4 , based on the word frequency, inverse document frequency, number of appearing files, and appearing time of each candidate professional word in the latest electric power professional documents, the effectiveness of each candidate professional word is analyzed and the effectiveness score is given, which specifically includes:

[0121] The appearing time of the candidate professional word in the latest electric power professional documents is quantified, and a preset logarithmic function is combined to obtain a time parameter;

[0122] The word frequency, inverse document frequency, and number of appearing files of the candidate professional word in the latest electric power professional documents are fused to obtain a space parameter;

[0123] The ratio of the space parameter and the time parameter is calculated to obtain the effectiveness score of the corresponding candidate professional word.

[0124] The effectiveness score is used to evaluate the "novelty" and "effectiveness" of the candidate professional word, which is specifically represented as:

[0125]

[0126] In the formula, w is a candidate professional vocabulary, TF(w) is the word frequency of the candidate professional vocabulary w in the set including all the latest power professional files, used to reflect the frequency of the candidate professional vocabulary w in the latest power professional files, and the higher the frequency, the more the candidate professional vocabulary w is concerned, IDF(w) is the inverse document frequency of the candidate professional vocabulary w, used to reflect the scarcity of the candidate professional vocabulary w in the set including all the latest power professional files, and the higher the scarcity, the more likely the candidate professional vocabulary w is a newly added term in the field, Spread(w) is the number of documents in which the candidate professional vocabulary w appears, reflecting the popular range of the candidate professional vocabulary, and the candidate professional vocabulary appearing in more documents is more likely to be an effective general term, and Age(w) is the number of days from the first appearance time of the candidate professional vocabulary w in the latest power professional files to the current time, used to reflect the freshness of the candidate professional vocabulary w, and the time parameter log(1+Age(w)) is used to score the candidate professional vocabulary with a long appearance time, to ensure that the algorithm prioritizes the screening of newly added terms in recent years.

[0127] The professional score is used to evaluate the "electric power field relevance" of the candidate professional vocabulary, to ensure that the screened candidate professional vocabulary is specific to the electric power field, rather than a general vocabulary, and is specifically represented as:

[0128]

[0129] wherein Freq power (w) is the word frequency of the candidate professional vocabulary w in the electric power professional dictionary, i.e. the frequency of the candidate professional vocabulary w in the electric power professional dictionary, Freq general (w) is the word frequency of the candidate professional vocabulary w in the basic dictionary, i.e. the frequency of the candidate professional vocabulary w in the basic dictionary, is a smoothing factor, which is extremely small (such as ), used to avoid calculation anomalies caused by the denominator being 0 due to the absence of the candidate professional vocabulary in the basic dictionary, and the higher the smoothing factor, the stronger the association of the candidate professional vocabulary with the electric power field, and the more likely it is a professional term in the electric power field.

[0130] The effectiveness score and the professional score of each candidate professional vocabulary are judged in combination with the pre-set effective range and professional range, to screen out the target professional vocabulary and add it to the electric power professional dictionary. The effective range is the data range for the effectiveness score, and the professional range is the data range for the professional score. The setting of the effective range and the professional range is set according to actual needs, and is not limited.

[0131] When the effectiveness score of the candidate professional vocabulary is within the effective range and the professional score is within the professional range, the corresponding candidate professional vocabulary is added to the power professional dictionary. And according to the context content of the document where the candidate professional vocabulary is located (such as the chapter of "smart inspection robot" corresponding to "transmission line maintenance" in the document), the device type attribute of the candidate professional vocabulary is labeled (such as "smart inspection robot" labeled as "power equipment" and "digital relay protection device" labeled as "relay protection equipment"). At the same time, version management is performed on the power professional dictionary, and the version number, update time, and list of newly added professional vocabularies are recorded for each update. When the newly added professional vocabulary causes a segmentation error (such as misidentifying a non-terminology as a terminology), the previous version dictionary can be quickly rolled back to ensure the stability of the segmentation processing.

[0132] It can be understood that when the power professional dictionary is updated, the second segmentation model will also be updated accordingly, and the newly added professional vocabularies in the power professional dictionary will be integrated. The second segmentation model is incrementally fine-tuned, and the fine-tuning process uses the same field adaptation loss function as the initialization phase to ensure that the model can learn the semantic features of the newly added terminology (such as the function and application scenario of "smart inspection robot") in a timely manner. After fine-tuning, the model parameters are updated to ensure that the second segmentation model always keeps up with the updates of the power professional dictionary and avoids semantic understanding deviation caused by model lag.

[0133] By dynamically updating the power professional dictionary and adaptively updating the second segmentation model, the rapid iteration of power field terminology is adapted in real time, which fundamentally solves the core problem of professional terminology recognition lag in traditional systems.

[0134] S104: Fusion of the first segmentation set and the second segmentation set, filtering and merging processing to obtain a standardized word sequence.

[0135] Referring to Figure 5 , fusion of the first segmentation set and the second segmentation set, filtering and merging processing to obtain a standardized word sequence, specifically including:

[0136] Stop word filtering is performed on the first segmentation set and the second segmentation set respectively;

[0137] The filtered first segmentation set and the second segmentation set are fused to obtain a total segmentation set;

[0138] The same words in the total segmentation set are merged to obtain a standardized word sequence.

[0139] In a specific embodiment, after obtaining the first segmentation set and the second segmentation set, stop word filtering is performed on the first segmentation set and the second segmentation set respectively, and the filtering results of the two routes are fused to remove repeated words, and then a synonym merging operation is performed. In the stop word filtering process, a special stop word table in the power field (containing words such as "of", "in", "about", "carry out" which have no actual semantic contribution) is loaded, and the stop words in the first segmentation set and the second segmentation set are completely removed, reducing the interference of irrelevant information on subsequent keyword extraction and semantic understanding. In the process of merging synonyms in the total segmentation set, a power field synonym dictionary (such as merging "bid document" and "bid" into "bid document", merging "insulation test" and "insulation detection" into "insulation test", and merging "technical specification" and "technical requirement" into "technical specification") is loaded, and the synonyms in the total segmentation set are unified into standard expressions to ensure the consistency of the recognition of the same semantics in the subsequent processing link. Finally, a standardized word sequence with regular structure and clear semantics is output.

[0140] It can be understood that, since the division logic of the second segmentation set is based on the power professional dictionary, the words in the second segmentation set are more in line with the division logic of professional vocabulary, so in the process of merging synonyms in the total segmentation set, the words in the first segmentation set are fused based on the second segmentation set. For example, the word in the second segmentation set is "35kV oil immersed transformer", and the word in the first segmentation set is "35kV", "oil immersed", and "transformer". At this time, the word in the second segmentation set is retained, and according to different actual needs, the word in the first segmentation set can be retained or only the word in the second segmentation set can be retained.

[0141] S105: Analyzing the frequency and semantics of each word in the standardized word sequence to obtain fusion features and complete the processing of the user demand text.

[0142] Referring to Figure 6 Analyzing the frequency and semantics of each word in the standardized word sequence to obtain fusion features, specifically including:

[0143] Analyzing the frequency of each word in the standardized word sequence in the user demand text and the inverse document frequency in the historical demand library, and screening the words in the standardized word sequence to obtain candidate demand words;

[0144] Based on the candidate demand words, similar professional documents are screened from the pre-constructed professional knowledge base;

[0145] Extracting keywords from the professional documents and constructing a keyword feature matrix according to the co-occurrence number of the keywords;

[0146] According to the semantic understanding model, each word in the standardized word sequence is contextually encoded, and a mean pooling operation is performed to obtain a semantic vector;

[0147] According to the type of the user demand text, different fusion strategies are matched to fuse the keyword feature matrix and the semantic vector to obtain a fusion result.

[0148] In the embodiments provided by the application, after obtaining the standardized word sequence, the standardized word sequence is transmitted to the keyword path and the semantic path in parallel, the keyword feature matrix is obtained in the keyword path, and the semantic vector is obtained in the semantic path, so that the processing precision is improved through double-path collaborative calculation.

[0149] In a specific embodiment, in order to realize accurate keyword extraction, first, the frequency of each word in the standardized word sequence in the user demand text and the inverse document frequency of each word in the historical demand library are analyzed, the words in the standardized word sequence are screened, and candidate demand words are obtained. The frequency of each word in the user demand text reflects the importance of each word in the single user demand text; the inverse document frequency of each word in the historical demand library reflects the scarcity of each word in a large number of user demands, and the historical demand library includes all past user demand texts. Then, the product of the frequency of each word in the user demand text and the inverse document frequency of each word in the historical demand library is calculated to obtain the contribution weight of each word, and the higher the value of the contribution weight, the greater the contribution of the word to the semantics of the current user demand text. In combination with a preset contribution threshold, candidate demand words with semantic value are screened from the standardized word sequence. That is, words whose contribution weight reaches the contribution threshold are screened to obtain candidate demand words.

[0150] After obtaining the candidate demand words, similar professional documents are screened from the pre-constructed professional knowledge base, and the similarity of the candidate demand words and the professional documents is specifically represented as:

[0151]

[0152] Wherein, Q is the user demand text, D is the professional document in the professional knowledge base, n is the number of candidate demand words, q i is the i-th candidate demand word, TF(q i ,D) is the word frequency of q i in the professional document D, |D| is the length of the professional document D, avgdl is the average length of all professional documents in the professional knowledge base, IDF(q i ) is the inverse document frequency of q i in the professional knowledge base, and k1 and b are adjustable parameters.

[0153] It can be understood that the professional knowledge base includes all professional documents in the field of electric power, and the use of the vocabulary in the professional field can be judged by the frequency of the appearance of the vocabulary in the professional documents. Through the comprehensive calculation of the word frequency, the document length and the scarcity of the vocabulary, the relevance of the user demand text and the professional documents is accurately reflected, and the reordering of the professional documents is realized.

[0154] It should be understood that in the embodiments provided by the application, the calculation of the similarity is realized based on the BM25 algorithm. In order to improve the accuracy of the similarity calculation, the adjustable parameters are dynamically adjusted according to the characteristics of the user demand text, and specifically include:

[0155] First, the information entropy and length ratio of the user demand text are calculated. The information entropy reflects the complexity of the content of the user demand text, and the higher the complexity (such as containing multiple technical parameters), the more dispersed the distribution of the vocabulary in the user demand text is, and the parameter needs to be increased to enhance the influence of the word frequency on the score. The length ratio is the ratio of the length of the user demand text to the average length of all professional documents in the professional knowledge base, which reflects the degree of deviation of the length of the user demand text from the average level. The greater the length deviation, the more the parameter needs to be adjusted to correct the interference of the length on the score.

[0156] The adjustable parameters k1 and b of the BM25 algorithm are adjusted, and are specifically represented as:

[0157]

[0158] Wherein, k 1base and b base are the reference parameters, α and β are the adjustment coefficients, Entropy(Q) is the information entropy of the user demand text, and LengthRatio(Q) is the length ratio of the user demand text to the average length of all professional documents in the professional knowledge base.

[0159] Further, the keywords in the professional documents are extracted, and a keyword feature matrix is constructed according to the co-occurrence times of the keywords, and specifically includes:

[0160] According to the preset window, the co-occurrence times of each keyword in the professional documents in the preset window are analyzed, and edges are established between each keyword;

[0161] According to the edges between the keywords, the keyword weight corresponding to each keyword is calculated, and is specifically represented as:

[0162]

[0163] Wherein, WS(v i ) is the keyword weight of the keyword v i , d is the damping coefficient, ln(v i ) is the keyword set pointing to the keyword vi, and Out(vj ) is a node v j a set of keywords pointed to;

[0164] According to the keyword weight, a keyword feature matrix is constructed.

[0165] In a specific embodiment, the screened professional documents are subjected to word segmentation processing to obtain each keyword in the professional documents. According to a preset window, any two keywords are judged. If the two keywords co-occur within the preset window, an edge is established between the two keywords, and the weight of the edge is the co-occurrence number of the two keywords within the preset window. For example, the preset window is 20 characters, and the number of times that the two keywords appear in the professional documents within the 20-character preset window is the weight of the edge corresponding to the two keywords. According to the weight of the edge, the keyword weight of each keyword can be calculated.

[0166] After obtaining the keyword weight, the keyword weight is sorted in descending order, the top N keywords are screened as core keywords, and the keyword weight of the core keywords is converted into a sparse feature vector, i.e. the dimension corresponding to the core keywords has a non-zero keyword weight, and the remaining dimensions are 0. The keyword feature matrix is obtained, and the keyword pathway processing is completed.

[0167] In order to accurately capture the overall semantics of the user demand text, the semantic vector generation is performed on the standardized word sequence through the semantic pathway.

[0168] In a specific embodiment, each word in the standardized word sequence is input into a semantic understanding model. The semantic understanding model encodes the context information of each word in the standardized word sequence through a bidirectional attention mechanism. For example, the encoding of “insulation test” in the context of “35kV transformer” is different from the encoding in the context of “low-voltage equipment”. Subsequently, a mean pooling operation is performed on the encoding result, i.e. the average value of all word encoding vectors is calculated, and the sequence encoding is converted into a fixed-dimensional semantic vector. The final obtained semantic vector can comprehensively reflect the overall semantic features of the user demand text, including explicit semantics (such as “bid requirements”) and implicit semantics (such as “required proof documents”), and the semantic pathway processing is completed. The semantic understanding model is a deep learning model for understanding and processing natural language, aiming to capture the semantic information of the text, so as to realize the in-depth understanding and analysis of the content of the text. The semantic understanding model is usually based on neural networks, especially recurrent neural networks, long short-term memory networks, gated recurrent units, etc.

[0169] It should be noted that the length of the standardized word sequence and the maximum input length of the semantic understanding model may not match, and it is necessary to determine the relationship between the length of the standardized word sequence and the maximum input length of the semantic understanding model. If the length of the standardized word sequence is less than the maximum input length of the semantic understanding model, a padding operation is performed on the standardized word sequence, that is, a preset placeholder word is supplemented to ensure that the length of the standardized word sequence meets the input requirements of the model; if the length of the standardized word sequence is greater than the maximum input length of the model (for example, the user's question contains a large number of technical parameter descriptions), a sliding window strategy is adopted to divide the long sequence into multiple continuous subsequences, the length of each subsequence does not exceed the maximum input length of the model, and a certain overlap part is reserved between the subsequences to avoid semantic breakage and ensure that the model can completely capture the semantic information of the standardized word sequence.

[0170] In the embodiments provided by the application, independent execution threads are created for the keyword path and the semantic path respectively to ensure parallel calculation of the double paths and greatly shorten the overall processing time. At the same time, a first timeout timer and a second timeout timer are set to monitor the execution time of the keyword path and the semantic path in real time. When the execution time of any path exceeds the preset timeout threshold, the calculation process of the corresponding path is immediately interrupted, and a degradation strategy is triggered to return a degradation result. For example, if the keyword path times out, the degradation result adopts the sparse feature vector of the last processed similar user demand text (such as the consultation of the same device type); if the semantic path times out, the degradation result adopts a preset default semantic vector (determined by statistical mean of the semantic vectors of similar user demand texts). When the double-path processing is normally completed, feature fusion is performed. This avoids interruption of the entire processing process due to single-path failure and guarantees high availability of the system.

[0171] Further, different fusion strategies are matched according to the type of the user demand text to fuse the keyword feature matrix and the semantic vector to obtain a fusion result, specifically including:

[0172] If the type of the user demand text is a consultation type, the keyword feature matrix or the semantic vector is selected as the fusion result;

[0173] If the type of the user demand text is a technical type, the keyword feature matrix and the semantic vector are fused based on a graph convolution network model to obtain a fusion result, specifically including:

[0174] The graph-level features corresponding to the keyword feature matrix are constructed in combination with the keyword feature matrix and the semantic vectors of the core keywords;

[0175] Based on the graph-level features corresponding to the keyword feature matrix, the similarity between the graph features of each core keyword and the semantic vector of the user demand text is calculated to give the attention weight of each core keyword;

[0176] The graph features of each core keyword are fused with the corresponding attention weight, and are spliced with the semantic vector of the user demand text to give a fusion feature, and a fusion result is obtained.

[0177] In order to ensure the accuracy and real-time performance of the fusion result, a corresponding fusion strategy is dynamically selected according to the type of the user demand text. The type of the user demand text can be determined by the core keywords extracted by the keyword path, or by other means, which is not limited.

[0178] Among them, the technical type refers to the query in the user demand text that involves professional field knowledge, technical details, complex semantic association and multiple technical terms. This kind of demand usually requires highly accurate answers, and needs to deeply understand the technical background and semantic relationship in the text. For example, the user demand text is "What forms of test reports are required for 10kV vacuum circuit breaker bidding?", "What are the insulation test standards for 35kV oil-immersed transformer?" etc. Therefore, for this type of user demand text, a complex model (such as a graph convolution network) is needed to process to fuse the keyword feature matrix and the semantic vector to obtain an accurate fusion result.

[0179] The consultation type refers to the query in the user demand text that involves general questions, simple semantic structure and high real-time requirement. This kind of demand usually has high requirements for processing speed, and the semantic structure is relatively simple, which can be quickly answered by keyword matching or simple semantic understanding. For example, the user demand text is "How to query the bidding deadline?" "How to download the bidding document?" etc. For this type of user demand text, the keyword feature matrix or the semantic vector output by the keyword path or the semantic path can be directly used as the fusion feature, the process is simple, and the real-time response requirement is met.

[0180] When the type of the user demand text is the consultation type, this kind of demand has high requirements for processing real-time performance, and the semantic structure is simple. The keyword feature matrix output by the keyword path or the semantic vector output by the semantic path is directly used as the fusion feature, the process is simple, the processing speed is fast, and the real-time response requirement is met. The fusion feature contains the weight information of the keyword (such as the high weight of "bidding deadline") or the overall semantic information (such as the action semantics of "query"), which can be directly used for subsequent answer retrieval (such as matching the answers related to "bidding deadline query" in the knowledge base). If the type of the user demand text is the technical type, this kind of demand has extremely high requirements for the accuracy of the answer, and involves multiple technical terms and complex semantic association. The keyword feature matrix and the semantic vector need to be fused by a graph convolution network model to obtain a fusion result.

[0181] In one specific implementation, a lightweight graph convolutional network with low-rank compression is used to process the keyword feature matrix. Two layers of feature propagation are completed in the 64-dimensional latent space. After attention pooling to obtain the graph-level features corresponding to the keyword feature matrix, they are concatenated with the semantic vector of the user's request text to form fused features. The fused result is then used for subsequent answer filtering.

[0182] Treat the core keywords as nodes in the graph, denoted as... ;

[0183] The product of the co-occurrence frequency of the core keyword and the semantic similarity of the context is used as the weighted edge, denoted as...

[0184]

[0185] Wherein, Co(v) p ,v q () as the core keyword v p With core keyword v q The number of times the core keyword v appears, i.e., the number of times it appears. p With core keyword v q Co-occurrence count in the knowledge base (in this example, the preset window size is 20 characters to avoid irrelevant co-occurrences at long distances); Sim(v p ,v q () represents contextual semantic similarity, which can be achieved by using BERT pre-trained in the power sector to encode core keywords v. p With core keyword v q In the context of the encoding vectors, the cosine similarity between the encoded vectors is calculated, specifically as follows:

[0186]

[0187] In a specific example, the user requirement text is "What forms of test reports are required for bidding on 10kV vacuum circuit breakers?" The core keywords include 10kV vacuum circuit breaker, test report, and bidding. The co-occurrence frequency of "10kV vacuum circuit breaker" (v1) and "test report" (v2) is 100, and their semantic similarity is 0.9. Therefore, the edge weight e... 12 =100×0.9=90, numerical normalization processing.

[0188] The semantic vector of each node (core keyword) (obtained by encoding with BERT pre-trained in the power domain) and the keyword feature matrix are input into the graph convolutional network model. Low-rank compression is used to reduce the dimensionality (to 64 dimensions). The architecture of the graph convolutional network model is as follows: Figure 7 As shown.

[0189] Further, based on the edge weight between each core keyword, in combination with the neighbor nodes of each core keyword, the edge weight is normalized to obtain a standard edge weight;

[0190] The standard edge weight and the semantic vector of the corresponding core keyword are fused to obtain a fusion parameter of each core keyword;

[0191] The fusion parameters of each core keyword are summed, combined with the weight matrix and bias term corresponding to the current graph convolutional network layer, to obtain a propagation term;

[0192] Based on the activation function, the propagation term is processed to complete the propagation in the current graph convolutional network layer.

[0193] A two-layer graph convolutional network (GCN) is adopted, and the propagation formula of each layer is:

[0194]

[0195] wherein, is the semantic vector of the core keyword v q , K(v p ) is the neighbor node (including itself) of the core keyword v p , e pq is the edge weight corresponding to the core keyword v p and the core keyword v q , W l is the weight matrix of the lth layer (randomly initialized, dimension 64x64), b l is the bias term, and σ is the activation function (using ReLU to avoid gradient disappearance).

[0196] By using the edge weight e pq to calculate the feature contribution of the neighbor node, the information of the neighbor node can be more accurately aggregated, which is conducive to capturing the complex relationship between nodes and enhancing the expression ability of the model, so that it can better learn the embedding representation of the node. Accurate modeling of the relationship between nodes is crucial to improve the prediction accuracy. At the same time, the normalization of the edge weight is used to obtain the standard edge weight, which allows the graph convolutional network model to more flexibly handle edges of different importance.

[0197] After two layers of GCN , the graph feature of each core keyword is output , which reflects the structured semantic association of the core keyword v p in the graph (such as the association feature of "10kV vacuum circuit breaker" and "test report").

[0198] ​The similarity between the graph feature of each core keyword and the semantic vector of the user demand text is calculated as the attention weight:

[0199]

[0200] In the formula, α p is the attention weight of the core keyword v p , and s is the semantic vector of the user demand text (the dimension is reduced to 64 dimensions by low-rank compression).

[0201] It should be noted that the traditional attention mechanism is usually based on sequence data (such as text or time series), while in this application, the graph feature of the core keyword obtained by the graph convolution network model is directly used to calculate the attention weight. The traditional attention mechanism usually only considers the similarity within the sequence, and in this application, the attention weight is calculated by calculating the similarity between the graph feature of the core keyword and the semantic vector of the user demand text.

[0202] The graph feature obtained by the graph convolution network contains graph structure information, so that the calculation of the attention weight can consider both the local features and the global structure of the nodes, thereby obtaining a more rich and accurate feature representation, providing a more rich, accurate and interpretable attention mechanism, and thus showing better performance in the application of the power and other fields. By calculating the similarity between the graph feature and the semantic vector, the user demand and the core keyword can be more accurately matched, thereby improving the accuracy of the model. At the same time, the introduction of the graph convolution network enables the model to better explain its results, and it can be directly seen which core keyword has the greatest influence on the final result.

[0203] Further, the graph features of each core keyword are weighted and summed with the corresponding attention weights, and the features of all nodes are aggregated by the attention weights to obtain the graph-level feature of the user demand text, which is specifically represented as:

[0204]

[0205] In the formula, H graph is the graph-level feature of the user demand text, which highlights the contribution of the core keywords in the user demand text by weighted summation, so that the subsequent processing focuses on the core demand.

[0206] By combining the graph features of each core keyword obtained from the graph convolutional network model with weights calculated through an attention mechanism, the features of all nodes in the graph are aggregated to obtain a graph-level feature representation. In the power industry, this approach highlights the contribution of core keywords in user request text, allowing subsequent processing to focus more on the core needs. In contrast, traditional graph convolutional networks typically aggregate graph features without considering external textual information, relying solely on the graph structure itself and neglecting the correlation between node features and external textual information, thus failing to fully capture the core content of user needs.

[0207] In a specific example, the attention weight α2 of "Experiment Report" (v2) is 0.8 (significantly higher than α3 of "Bidding" at 0.1), then the graph-level feature H graph Primarily contributed by v2 features, focusing on core requirements.

[0208] Graph-level features capture the structured relationships between core keywords (such as the co-occurrence frequency and semantic similarity between "10kV vacuum circuit breaker" and "test report"), as well as the focus of core keywords (such as "test report" having a higher attention weight). For example, graph-level features can reflect that "10kV vacuum circuit breaker" is a related object of "test report", and "test report" is the core content of "bid requirements".

[0209] The graph-level features are concatenated with the semantic vector of the user's request text to form a fused feature, resulting in the fused outcome:

[0210]

[0211] The Concat function is a concatenation function used to combine graph-level features with the semantic vector of the user's request text. The fused feature F... fused It can be used for subsequent answer search. The fused features are input into a large language model (such as LLaMA-2) fine-tuned in the power field, combined with a professional knowledge base, to search for accurate answers (such as "a test report of GB / T 11022-2011 standard needs to be provided").

[0212] By analyzing the frequency and semantics of each word in the standardized word sequence and obtaining fusion features, the system's text understanding ability and feature representation richness can be improved. This enables accurate identification and understanding of user needs, providing a data foundation for relevant and accurate answers and enhancing user experience.

[0213] By accurately identifying and understanding the key information in user demand and generating corresponding fusion features, the system effectively retrieves relevant answers from the knowledge base according to the fusion features, thereby improving the recall rate of the question answering system. Fusion features can help the system more accurately match user questions and answers in the knowledge base, thereby improving the accuracy of the question answering system. For example, through semantic analysis, the system can distinguish the meanings of the words "transformer" and "substation" in different contexts, thereby providing more accurate answers.

[0214] Referring to Figure 8 The embodiment of the present application provides a demand processing device fusing keywords and semantics, comprising:

[0215] A data acquisition module 201 is configured to collect user demand text.

[0216] A data cleaning module 202 is configured to perform character-level data cleaning on the user demand text to obtain standard demand text.

[0217] A text segmentation module 203 is configured to perform segmentation processing on the standard demand text based on a first segmentation model and a second segmentation model to obtain a first segmentation set and a second segmentation set, wherein the first segmentation model performs segmentation on the standard demand text through a basic dictionary, and the second segmentation model performs segmentation on the standard demand text through a power professional dictionary.

[0218] A segmentation merging module 204 is configured to fuse the first segmentation set and the second segmentation set to perform filtering and merging processing to obtain a standardized word sequence.

[0219] A feature output module 205 is configured to analyze the frequency and semantics of each word in the standardized word sequence to obtain fusion features, thereby completing the processing of the user demand text.

[0220] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described modules can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0221] Although the preferred embodiments of the present application have been described, those skilled in the art can make further changes and modifications to these embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application. Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application also intends to include these modifications and variations.

Claims

1. A demand processing method fusing keywords and semantics, characterized by, The method comprises the following steps: Collecting user demand text; Performing character-level data cleaning on the user demand text to obtain standard demand text; Based on the first segmentation model and the second segmentation model, the standard demand text is segmented respectively to obtain the first segmentation set and the second segmentation set, wherein the first segmentation model segments the standard demand text through the basic dictionary, and the second segmentation model segments the standard demand text through the power professional dictionary; Fusing the first segmentation set and the second segmentation set, and performing filtering and merging processing to obtain a standardized word sequence; Analyzing the frequency and semantics of each word in the standardized word sequence to obtain fusion features, and completing the processing of the user demand text, specifically including: analyzing the frequency of each word in the standardized word sequence in the user demand text and the inverse document frequency in the historical demand library, screening the words in the standardized word sequence to obtain candidate demand words; based on the candidate demand words, screening similar professional documents from the pre-constructed professional knowledge base; extracting keywords from the professional documents and constructing a keyword feature matrix according to the co-occurrence number of the keywords; according to the semantic understanding model, context encoding is performed on each word in the standardized word sequence, and mean pooling operation is performed to obtain a semantic vector; according to the type of the user demand text, different fusion strategies are matched to fuse the keyword feature matrix and the semantic vector to obtain a fusion result.

2. The method of claim 1, wherein the keyword and semantic fusion is performed by a keyword and semantic fusion module. The character-level data cleaning on the user demand text to obtain the standard demand text, specifically including: Encoding standardization processing is performed on the user demand text to obtain a first encoded text; The standard character width of each code in the first encoded text is unified to obtain a second encoded text; The privacy information in the second encoded text is desensitized to obtain the standard demand text.

3. The method of claim 2, wherein the keyword and semantic fusion is performed by a keyword and semantic fusion module. The privacy information in the second encoded text is desensitized to obtain the standard demand text, specifically including: According to the pre-set regular expression, the corresponding privacy information in the second encoded text is matched; According to the different types of privacy information, different desensitization strategies are adopted to desensitize the privacy information to obtain the standard demand text, wherein the desensitization strategies include at least one of information replacement, information encryption, information masking, information fuzzing and information generalization.

4. The method of claim 1, wherein the keyword and semantic fusion is performed by a keyword and semantic fusion engine. The update of the power professional dictionary is determined by the following steps: Real-time collection of the latest power professional files; Data cleaning and segmentation processing are performed on the latest power professional files to obtain candidate professional vocabulary; Based on the word frequency, inverse document frequency, number of appearing files and appearing time of each candidate professional vocabulary in the latest power professional files, the effectiveness of each candidate professional vocabulary is analyzed and an effectiveness score is given; Based on the word frequency of each candidate professional vocabulary in the power professional dictionary and the word frequency in the basic dictionary, the professionalism of each candidate professional vocabulary is analyzed and a professionalism score is given; Combining the pre-set effective range and professional range, the effectiveness score and the professionalism score of each candidate professional vocabulary are judged, the target professional vocabulary is screened out and added to the power professional dictionary, and the update of the power professional dictionary is completed.

5. The method of claim 4, wherein the keyword and semantic fusion is performed by a keyword and semantic fusion module. Based on the word frequency, inverse document frequency, number of appearing files and appearing time of each candidate professional vocabulary in the latest power professional files, the effectiveness of each candidate professional vocabulary is analyzed and an effectiveness score is given, specifically including: The appearing time of the candidate professional vocabulary in the latest power professional files is quantified, and a time parameter is obtained by combining a preset logarithmic function; The word frequency, inverse document frequency and number of appearing files of the candidate professional vocabulary in the latest power professional files are fused to obtain a space parameter; The ratio of the space parameter and the time parameter is calculated to obtain the effectiveness score of the corresponding candidate professional vocabulary.

6. The method of claim 1, wherein the keyword and semantic fusion is performed by a keyword and semantic fusion engine. The first segmentation set and the second segmentation set are fused and filtered and merged to obtain a standardized word sequence, specifically including: The first segmentation set and the second segmentation set are filtered respectively; The filtered first segmentation set and the second segmentation set are fused to obtain a total segmentation set; The synonyms in the total segmentation set are merged to obtain a standardized word sequence.

7. The method of claim 1, wherein the keyword and semantic fusion is performed by a keyword and semantic fusion engine. The keywords in the professional document are extracted and a keyword feature matrix is constructed according to the co-occurrence number of the keywords, specifically including: According to the preset window, the co-occurrence number of each keyword in the professional document in the preset window is analyzed, and an edge is established between each keyword; According to the edges between the keywords, the keyword weight corresponding to each keyword is calculated, specifically represented as: ; wherein WS(v i ) is the keyword weight of the keyword v i , d is a damping coefficient, ln(v i ) is a keyword set pointing to the keyword v i , and Out(v j ) is a keyword set pointed by the node v j . According to the keyword weight, a keyword feature matrix is constructed.

8. The method of claim 1, wherein the keyword and semantic fusion is performed by a keyword and semantic fusion engine. According to the type of user demand text, different fusion strategies are matched to fuse the keyword feature matrix and the semantic vector to obtain a fusion result, specifically including: If the type of user demand text is a consultation type, the keyword feature matrix or the semantic vector is selected as the fusion result; If the type of user demand text is a technology type, the keyword feature matrix and the semantic vector are fused based on a graph convolution network model to obtain a fusion result, specifically including: The graph-level features corresponding to the keyword feature matrix are constructed combining the keyword feature matrix and the semantic vector of each core keyword; Based on the graph-level features corresponding to the keyword feature matrix, the similarity between the graph feature of each core keyword and the semantic vector of the user demand text is calculated, and the attention weight of each core keyword is given; The graph feature of each core keyword is fused with the corresponding attention weight, and is spliced with the semantic vector of the user demand text to give a fusion feature, and the fusion result is obtained.

9. A demand processing apparatus that fuses keywords and semantics, characterized by, The demand processing method of fusing keywords and semantics as claimed in any one of claims 1-8, comprising: a data acquisition module for collecting user demand text; a data cleaning module for performing character-level data cleaning on the user demand text to obtain a standard demand text; a text segmentation module for performing segmentation processing on the standard demand text based on a first segmentation model and a second segmentation model to obtain a first segmentation set and a second segmentation set, wherein the first segmentation model segments the standard demand text through a basic dictionary, and the second segmentation model segments the standard demand text through a power professional dictionary; a segmentation merging module for fusing the first segmentation set and the second segmentation set, performing filtering and merging processing, and obtaining a standardized word sequence; The feature output module is configured to analyze the frequency and semantics of each word in the standardized word sequence to obtain fused features and complete processing of the user demand text, specifically including: analyzing the frequency of each word in the standardized word sequence in the user demand text and the inverse document frequency of the user demand text in the historical demand library, screening the words in the standardized word sequence to obtain candidate demand words; based on the candidate demand words, screening professional documents with high similarity from a pre-constructed professional knowledge base; extracting keywords in the professional documents and constructing a keyword feature matrix according to the co-occurrence number of the keywords; performing context coding on each word in the standardized word sequence according to a semantic understanding model and performing a mean pooling operation to obtain a semantic vector; and matching different fusion strategies according to the type of the user demand text, fusing the keyword feature matrix and the semantic vector to obtain a fusion result.

Citation Information

Patent Citations

  • Question and answer method and device based on keywords and semantic model and storage medium

    CN118520089A

  • Power dictionary based text processing method

    CN107577713A

  • Resume label generation method and device and medium

    CN120724993A