A method and system for analyzing electricity demand based on NLP and hot word meta-analysis
Through the NLP-based hot word meta analysis method, combined with dialect vocabulary and vocabulary pinyin database, the problem of user electricity demand recognition is solved, and refined management and rapid response to multiple intention recognition fields is achieved, reducing complaint risks.
Patent Information
- Application Number
- CN202310649448.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2043-06-02
AI Technical Summary
The prior art is difficult to effectively identify and deal with user power demands in the field of multi-intention identification, especially when users are unclearly expressed or contain emotional factors and typos, resulting in the intent of work orders being unable to be accurately identified, affecting refined management.
Using the method based on NLP and hot word element analysis, the work order text is extracted for semantic recognition, hot word element is filtered, and the correlation is compared with multi-dimensional hot word element. Combined with dialect vocabulary and vocabulary pinyin database, the keyword correlation is calculated. Finally, the correlation degree is calculated with the appeal classification library to achieve the analysis of electricity use demands.
It improves the analysis effect of users' electricity demands, reduces work order return due to unclear definitions, quickly locates and deals with problems, reduces the risk of complaints caused by emotional factors, and adapts to the needs of areas where language is inconsistent.
Smart Images

Figure CN116861915B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power work order data intention recognition, and relates to a method and system for analyzing power demand based on NLP (natural language processing) and hot word element analysis. Background Art
[0002] At present, artificial intelligence models in the field of multi-intent recognition are increasingly widely used in the real world. In order to achieve better recognition and prediction results, engineers often combine and use multiple AI models with different implementation principles to complete extremely difficult recognition and prediction tasks. Although the research on a single AI model is relatively complete, there is still no good evaluation scheme and evaluation index for the overall effect of AI applications after combining multiple models to comprehensively, fairly and objectively reflect its recognition and prediction effects.
[0003] The power supply service command center received a lot of non-emergency repair work orders during the service process. The work order types marked by the customer service center are 7 major categories and 272 minor categories, and the user's electricity demand has been preliminarily classified. However, taking Nanjing as an example, from the perspective of Nanjing's size, there are millions of users with a wide range of electricity usage environments and electricity demands; at the same time, since there are a large number of elderly people among the users, emotional factors are often added when filling out the work order, resulting in serious colloquialism of the work order. In addition, there are also typos on the work order due to negligence of the filler, resulting in the problem that the intention of the work order cannot be recognized. Relying solely on the preliminary identification of the customer service center to handle business obviously does not meet the requirements of refined management. In addition, the work orders marked by the customer service center as customer-side electricity demand coordination account for more than half of the total. Most of these work orders are generated due to unclear expression of user demands or no clear classification matching, which has a great impact on the refined processing of work orders. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, the present invention provides a method and system for analyzing electricity demand based on NLP and hot word analysis.
[0005] The present invention adopts the following technical solution.
[0006] A method for analyzing electricity demand based on NLP and hot word meta-analysis includes the following steps:
[0007] S101, extracting text on the user's electricity demand work order based on NLP and performing semantic recognition on the text;
[0008] S102, segmenting the text on the work order into basic word units according to context semantics, comparing the segmented basic word units with professional word units in a professional word unit database, and merging the professional basic word units;
[0009] S103, screening hot word units in the basic word units, comparing the hot word units screened out with the multi-dimensional hot word units in the database for relevance, and obtaining a number of keywords;
[0010] S104, concatenating the keywords according to different word orders to obtain a number of keyword concatenated sentences, calculating the correlation between the keyword concatenated sentences and the demand data in the demand classification library, and taking the demand in the demand classification library with the highest correlation as the electricity demand identification result.
[0011] Preferably, in S103, word-grams belonging to or meaning hot word-grams in the basic word-grams are screened, wherein the hot word-grams are pre-selected based on the experience of experts in the field.
[0012] Preferably, in S103, the database includes a dialect vocabulary database, a vocabulary pinyin database and a hot word database;
[0013] The dialect vocabulary database is used to extract and store dialect vocabulary data containing hot words in the region;
[0014] The hot word database is used to extract and store the hot word data for demands in Mandarin;
[0015] The vocabulary pinyin database is used to extract and store vocabulary data with similar pinyin to hot vocabulary data.
[0016] Preferably, in S103, the hot word elements obtained by screening are compared with the multi-dimensional hot word elements in the database for relevance, and several keywords are obtained, specifically including:
[0017] 1) The dialect vocabulary database, hot word database and vocabulary pinyin database are combined on the dimension vector to obtain a multi-dimensional hot word combination set:
[0018] f n4 =N(x k1 ,x k1 (c ks ),x k1 (o km ))
[0019] Among them, N is the hot word combination dimension value;
[0020] x k1 is the Mandarin representation of the kth hot word data requested in the hot word database;
[0021] x k1 (c ks )) represents the Mandarin representation of the kth hot word data requested in the vocabulary Pinyin database, and the s similar words with the same Pinyin;
[0022] x k1 (o km ) represents the m forms used to represent the kth hot word in the dialect vocabulary database;
[0023] 2) Extracting individual words from the hot word set in turn, and calculating the relevance of the individual words with the individual dimension vectors in the multi-dimensional hot word combination set;
[0024] 3) Compare the relevance of the single word with the relevance threshold. If the relevance of the single word is less than the relevance threshold, the corresponding word is not set as a keyword. Otherwise, the set corresponding to the maximum relevance value (x k1 ,x k1 (c ks ),x k1 (o km )) k1 As keywords, elements in the hot word unit combination set and elements in the hot word unit set are substituted in sequence to obtain several keywords.
[0025] Preferably, the single word relevance I xgd The calculation formula is:
[0026]
[0027] Among them, a i is the frequency of the i-th word in the hot word set, and its value is 1;
[0028] b i is the i-th word in the multi-dimensional hot word combination set (x k1 ,x k1 (c ks ),x k1 (o km )) where n is the number of word units.
[0029] Preferably, in S104, the claim classification library stores claim ticket data that have been processed in the past by users; the claim ticket data that have been processed in the past by users refers to the claim keywords obtained by collecting user claim tickets as original files of the claim classification library, extracting natural text paragraphs of their accepted content, performing lexical and grammatical analysis using NLP natural language, and then clustering them.
[0030] Preferably, S104 specifically includes:
[0031] a) importing a number of keyword concatenation sentences to obtain a keyword concatenation sentence set and importing the set of demand data vectors into the demand classification library;
[0032] b) Substituting the single vectors in the keyword concatenation sentence set and the appeal data vector set into the correlation calculation formula one by one to calculate the correlation between the single vectors in the two;
[0033] c) Arrange the correlations in descending order, find out the single demand data in the demand classification library corresponding to the largest correlation, that is, the electricity demand, and complete the demand analysis.
[0034] Preferably, the calculation formula for the correlation between single vectors is:
[0035]
[0036] Among them, a i is the frequency of occurrence of the ith keyword in the keyword concatenation sentence set;
[0037] b j is the frequency of the jth keyword appearing in the demand keywords in a single demand in the demand classification library.
[0038] An electricity demand analysis system based on NLP and hot word element analysis, including a demand extraction module, a text recognition module, a word element segmentation module, a word element recognition module, a keyword extraction module, a keyword splicing module, a database module and a demand intention analysis module;
[0039] The demand extraction module is used to extract the text on the user demand work order to obtain a text set;
[0040] The text recognition module is used to recognize the meaning of the text on the request work order and import it into the word unit segmentation module;
[0041] The word unit segmentation module is used to segment the text on the work order into basic word units according to the context semantics to obtain a basic word unit set;
[0042] The word unit recognition module is used to segment the text on the work order into basic word units according to context semantics, compare the segmented basic word units with the professional word units in the professional word unit database, and merge the professional basic word units;
[0043] The keyword extraction module is used to screen the words in the basic words that belong to or mean hot words, call the word comparison module and the relevance calculation module to compare the relevance of the screened hot words with the hot words in the database, and obtain several keywords; wherein the hot words are pre-selected based on the experience of experts in this field.
[0044] The keyword splicing module is used to splice keywords and words that are not set as keywords according to different word orders to obtain a plurality of keyword splicing sentences;
[0045] The appeal intention analysis module is used to call the relevance calculation module to calculate the relevance between the keyword concatenation sentence and the appeal data in the appeal classification library, obtain the relevance and arrange it in descending order, so as to analyze the appeal intention;
[0046] The database module is used to classify and store the previous demand data, dialect vocabulary data related to hot words, vocabulary pinyin data and hot word data.
[0047] Preferably, the database module includes a demand classification database, a dialect vocabulary database, a vocabulary pinyin database and a hot word database;
[0048] The request classification library is used to store the request work order data that have been processed by users in the past;
[0049] The previously processed user request ticket data refers to the request keywords obtained by collecting user request tickets as the original archive of the request classification library, extracting the natural text paragraphs of the accepted content, performing lexical and grammatical analysis using NLP natural language, and then clustering;
[0050] The dialect vocabulary database is used to extract and store dialect vocabulary data containing hot words in the region;
[0051] The hot word database is used to extract and store the hot word data for demands in Mandarin;
[0052] The vocabulary pinyin database is used to extract and store vocabulary data with similar pinyin to hot vocabulary data.
[0053] Preferably, the input end of the keyword extraction unit is connected to a word unit comparison module, and the word unit comparison module includes a relevance calculation module;
[0054] The word unit comparison module is used to compare the hot word units obtained by screening with the vocabulary data of the database module, and use the relevance calculation module to perform relevance calculation;
[0055] The correlation calculation module includes a correlation calculation strategy, and the correlation calculation strategy includes:
[0056] 1) The dialect vocabulary database, hot word database and vocabulary pinyin database are combined on the dimension vector to obtain a multi-dimensional hot word combination set:
[0057] f n4 =N(x k1 ,x k1 (c ks ),x k1 (o km ))
[0058] Among them, N is the hot word combination dimension value;
[0059] 2) Extracting individual words from the hot word set in turn, and calculating the relevance of the individual words with the individual dimension vectors in the multi-dimensional hot word combination set;
[0060] The calculation formula for the relevance of a single word Ixgd is:
[0061]
[0062] Among them, a i is the frequency of the i-th word in the hot word set, and its value is 1;
[0063] b i is the i-th word in the multi-dimensional hot word combination set (x k1 ,x k1 (c ks ),x k1 (o km )) frequency of occurrence;
[0064] 3) Compare the relevance of the single word with the relevance threshold. If the relevance of the single word is less than the relevance threshold, the corresponding word is not set as a keyword. Otherwise, the set corresponding to the maximum relevance value (x k1 ,x k1 (c ks ),x k1 (o km )) k1 As keywords, elements in the hot word unit combination set and elements in the hot word unit set are substituted in sequence to obtain several keywords.
[0065] Preferably, the appeal intention analysis module includes a correlation calculation module, and the correlation calculation module is used to calculate the correlation between the appeal classification in the appeal classification library and the keyword splicing sentence, so as to find the corresponding appeal and realize the appeal intention analysis;
[0066] The association calculation module includes an association calculation strategy, and the association calculation strategy includes:
[0067] a) importing a number of keyword concatenation sentences to obtain a keyword concatenation sentence set and importing the set of demand data vectors into the demand classification library;
[0068] b) Substituting the single vectors in the keyword concatenation sentence set and the appeal data vector set into the correlation calculation formula one by one to calculate the correlation between the single vectors in the two. The correlation calculation formula between the single vectors is:
[0069]
[0070] Among them, a i is the frequency of occurrence of the ith keyword in the keyword concatenation sentence set;
[0071] b j is the frequency of the jth keyword appearing in the demand keywords in the single demand in the demand classification library;
[0072] c) Arrange the correlations in descending order, find out the single demand data in the demand classification library corresponding to the largest correlation, that is, the electricity demand, and complete the demand analysis.
[0073] The beneficial effects of the present invention are as follows:
[0074] 1) Collect user demand work orders as the original files of the demand classification library, extract the natural text paragraphs of the accepted content, and use NLP natural language lexical and grammatical analysis to cluster keywords with more demands. Based on this, the electricity demand analysis can be quickly realized, and the work orders can be sent to the corresponding processing departments or personnel to reduce the return of work orders due to unclear definitions, and provide targeted services to electricity users, so as to quickly locate, handle and solve problems, respond actively, and reduce the risk of user complaints caused by emotional factors;
[0075] 2) Taking into account the areas with inconsistent languages, including unrecognizable words due to dialect and homophone errors, the dialect vocabulary database, hot word database and vocabulary pinyin database are compared with the word-grams through the relevance calculation unit, the relevance between the word-grams and the hot words is calculated, and the relevance is arranged to obtain the elements of the hot words implied in the dialect and homophones, so as to further improve the analysis effect of user demands. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 This is a flow chart of a method for analyzing electricity demand based on NLP and hot word element analysis of the present invention;
[0077] Figure 2 This is a structural diagram of an electricity demand analysis system based on NLP and hot word analysis in the present invention. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0079] like Figure 1As shown, Example 1 of the present invention provides a method for analyzing electricity demand based on NLP and hot word analysis. In a preferred but non-limiting embodiment of the present invention, the method includes the following steps:
[0080] S101, extracting text on the user's electricity demand work order based on NLP and performing semantic recognition on the text;
[0081] S102, segmenting the text on the work order into basic words according to context semantics, comparing the basic words obtained by segmentation with professional words in a professional word database, and merging professional basic words. For example, for the text on the work order: A location, one-time wiring, circuit fault maintenance, segmentation obtains basic words: A, location, one-time, wiring, circuit, fault, maintenance, among which one-time wiring belongs to professional words, which are merged to finally obtain: A, location, one-time wiring, circuit, fault, maintenance;
[0082] S103, screening hot word units in the basic word units, comparing the hot word units screened out with the multi-dimensional hot word units in the database for relevance, and obtaining a number of keywords;
[0083] Further preferably, word-grams belonging to or meaning hot word-grams in the basic word-grams are screened, wherein the hot word-grams are pre-selected based on the experience of experts in the field.
[0084] The database includes a dialect vocabulary database, a vocabulary pinyin database and a hot word database;
[0085] The dialect vocabulary database is used to extract and store dialect vocabulary data containing hot words in the region;
[0086] f n2 =(x 11 (o 1m ), x 21 (o 2m ), x 31 (o 3m ), ..., x k1 (o km ))
[0087] Among them, x k1 (o km ) represents the m forms used to represent the kth hot word in the dialect vocabulary, for example, the hot word (circuit) has different representations in different dialects;
[0088] The hot word database is used to extract and store the hot word data for demands in Mandarin;
[0089] f n1 =(x 11 , x21 , x 31 , ..., x k1 )
[0090] Among them, x k1 The Mandarin representation of the kth hot word data required in this field;
[0091] The vocabulary pinyin database is used to extract and store vocabulary data with similar pinyin to the hot vocabulary data:
[0092] f n3 =(x 11 (c 1s ), x 21 (c 2s ), x 31 (c 3s ), ..., x k1 (c ks )),
[0093] Among them, x k1 (c ks )) represents the kth hot word data in this field, which is represented by s similar words with the same pinyin in Mandarin, such as the similar words of circuit, electric furnace, and road pad.
[0094] The hot words obtained by screening are compared with the multi-dimensional hot words in the database for relevance, and several keywords are obtained, including:
[0095] 1) The dialect vocabulary database, hot word database and vocabulary pinyin database are combined on the dimension vector to obtain a multi-dimensional hot word combination set:
[0096] f n4 =N(x k1 ,x k1 (c ks ),x k1 (o km ))
[0097] Among them, N is the hot word combination dimension value;
[0098] 2) Extracting individual words from the hot word set in turn, and calculating the relevance of the individual words with the individual dimension vectors in the multi-dimensional hot word combination set;
[0099] Single word relevance I xgd The calculation formula is:
[0100]
[0101] Among them, a i is the frequency of the i-th word in the hot word set, and its value is 1;
[0102] b i is the i-th word in the multi-dimensional hot word combination set (x k1 ,x k1 (c ks ),x k1 (o km )). For example, the frequency of circuit appearing in the multi-dimensional hot word combination set.
[0103] 3) Compare the relevance of the single word with the relevance threshold. If the relevance of the single word is less than the relevance threshold, the corresponding word is not set as a keyword. Otherwise, the set corresponding to the maximum relevance value (x k1 ,x k1 (c ks ),x k1 (o km )) k1 As keywords, elements in the hot word combination set and elements in the hot word set are substituted in sequence to obtain several keywords. For example, circuit is selected as the keyword from (circuit, pad circuit, electric furnace, electronic circuit).
[0104] S104, concatenating keywords according to different word orders to obtain a number of keyword concatenated sentences, calculating the correlation between the keyword concatenated sentences and the demand data in the demand classification library, and taking the demand in the demand classification library with the highest correlation as the electricity demand identification result, specifically including:
[0105] a) Import several keyword concatenation sentences to obtain a keyword concatenation sentence set:
[0106] f6=(x′ 11 , x′ 21 , x′ 31 , ..., x′ f1 )
[0107] Among them, x′ f1 The fth keyword concatenation sentence;
[0108] And import the demand data vector set in the demand classification library:
[0109] D=m(y1,y2,y3,...,y c );
[0110] Among them, m is the number of demands in the demand classification library, y c The cth keyword in the claim, the claim in the claim classification library is, for example, the primary wiring circuit fault inspection and repair at position A;
[0111] b) Substituting the single vectors in the keyword concatenation sentence set and the appeal data vector set into the correlation calculation formula one by one to calculate the correlation between the single vectors in the two;
[0112] The calculation formula for the correlation between single vectors is:
[0113]
[0114] Among them, a i is the frequency of occurrence of the ith keyword in the keyword concatenation sentence set;
[0115] b j is the frequency of the jth keyword appearing in the demand keywords in the single demand in the demand classification library;
[0116] c) Arrange the correlations in descending order, find out the single demand data in the demand classification library corresponding to the largest correlation, that is, the electricity demand, and complete the demand analysis.
[0117] like Figure 2 As shown, Embodiment 2 of the present invention provides an electricity demand analysis system based on NLP and hot word unit analysis, including a demand extraction module, a text recognition module, a word unit segmentation module, a word unit recognition module, a keyword extraction module, a keyword splicing module, a database module and a demand intention analysis module;
[0118] The demand extraction module is used to extract the text on the user demand work order to obtain a text set:
[0119] f1=(x1+x2+x3+...+x n ),
[0120] Among them, n is the number of words, x is n The nth character on the extracted user request ticket;
[0121] The text recognition module is used to recognize the meaning of the text on the request work order and import it into the word unit segmentation module;
[0122] The word unit segmentation module is used to segment the text on the work order into basic word units according to the context semantics to obtain a basic word unit set: f2 = (x1, x2, x3, ..., x n );
[0123] The word unit recognition module is used to segment the text on the work order into basic word units according to context semantics, compare the segmented basic word units with the professional word units in the professional word unit database, and merge the professional basic word units;
[0124] The keyword extraction module is used to screen the words in the basic words that belong to or mean hot words, call the word comparison module and the relevance calculation module to compare the relevance of the screened hot words with the hot words in the database, and obtain several keywords; wherein the hot words are pre-selected based on the experience of experts in this field.
[0125] The keyword splicing module is used to splice keywords and words that are not set as keywords according to different word orders to obtain a plurality of keyword splicing sentences;
[0126] The appeal intention analysis module is used to call the relevance calculation module to calculate the relevance between the keyword concatenation sentence and the appeal data in the appeal classification library, obtain the relevance and arrange it in descending order, so as to analyze the appeal intention;
[0127] The database module is used to classify and store the previous demand data, dialect vocabulary data related to hot words, vocabulary pinyin data and hot word data.
[0128] Further preferably, the database module includes a demand classification database, a dialect vocabulary database, a vocabulary pinyin database and a hot word database;
[0129] The request classification library is used to store the request work order data that have been processed by users in the past;
[0130] The previously processed user request ticket data refers to the request keywords obtained by collecting user request tickets as the original archive of the request classification library, extracting the natural text paragraphs of the accepted content, performing lexical and grammatical analysis using NLP natural language, and then clustering;
[0131] The dialect vocabulary database is used to extract and store dialect vocabulary data containing hot words in the region;
[0132] f n2 =(x 11 (o 1m ), x 21 (o 2m ), x 31 (o 3m ), ..., x k1 (o km ))
[0133] Among them, x k1 (o km ) represents the m forms used to represent the kth hot word in the dialect vocabulary;
[0134] The hot word database is used to extract and store the hot word data for demands in Mandarin;
[0135] f n1 =(x 11 , x 21 , x 31 , ..., x k1 )
[0136] Among them, x k1 The Mandarin representation of the kth hot word data required in this field;
[0137] The vocabulary pinyin database is used to extract and store vocabulary data with similar pinyin to the hot vocabulary data:
[0138] f n3 =(x 11 (c 1s ), x 21 (c 2s ), x 31 (c 3s ), ..., x k1 (c ks )),
[0139] Among them, x k1 (c ks )) represents the kth hot word data in this field, which represents s similar words with the same pinyin in Mandarin.
[0140] Further preferably, the input end of the keyword extraction unit is connected to a word unit comparison module, and the word unit comparison module includes a relevance calculation module;
[0141] The word unit comparison module is used to compare the hot word units obtained by screening with the vocabulary data of the database module, and use the relevance calculation module to perform relevance calculation;
[0142] The correlation calculation module includes a correlation calculation strategy, and the correlation calculation strategy includes:
[0143] 1) The dialect vocabulary database, hot word database and vocabulary pinyin database are combined on the dimension vector to obtain a multi-dimensional hot word combination set:
[0144] f n4 =N(x k1 ,x k1 (c ks ),x k1 (o km ))
[0145] Among them, N is the hot word combination dimension value;
[0146] 2) Extracting individual words from the hot word set in turn, and calculating the relevance of the individual words with the individual dimension vectors in the multi-dimensional hot word combination set;
[0147] Single word relevance I xgd The calculation formula is:
[0148]
[0149] Among them, a i is the frequency of the i-th word in the hot word set, and its value is 1;
[0150] b i is the i-th word in the multi-dimensional hot word combination set (x k1 ,x k1 (c ks ),x k1 (o km ), such as the frequency of circuits appearing in a multi-dimensional hot word combination set;
[0151] 3) Compare the relevance of the single word with the relevance threshold. If the relevance of the single word is less than the relevance threshold, the corresponding word is not set as a keyword. Otherwise, the set corresponding to the maximum relevance value (x k1 ,x k1 (c ks ),x k1 (o km )) k1 As keywords, elements in the hot word unit combination set and elements in the hot word unit set are substituted in sequence to obtain several keywords.
[0152] Further preferably, the appeal intention analysis module includes a correlation calculation module, and the correlation calculation module is used to calculate the correlation between the appeal classification in the appeal classification library and the keyword splicing sentence, so as to find the corresponding appeal and realize the appeal intention analysis;
[0153] The association calculation module includes an association calculation strategy, and the association calculation strategy includes:
[0154] a) Import several keyword concatenation sentences to obtain a keyword concatenation sentence set:
[0155] f6=(x′ 11 , x′ 21 , x′ 31 , ..., x′ f1 )
[0156] Among them, x′ f1 The fth keyword concatenation sentence;
[0157] And import the demand data vector set in the demand classification library:
[0158] D=m(y1,y2,y3,...,y c );
[0159] Among them, m is the number of demands in the demand classification library, y c The cth keyword in the claim, the claim in the claim classification library is, for example, the primary wiring circuit fault inspection and repair at position A;
[0160] b) Substituting the single vectors in the keyword concatenation sentence set and the appeal data vector set into the correlation calculation formula one by one to calculate the correlation between the single vectors in the two. The correlation calculation formula between the single vectors is:
[0161]
[0162] Among them, a i is the frequency of occurrence of the ith keyword in the keyword concatenation sentence set;
[0163] b j is the frequency of the jth keyword appearing in the demand keywords in the single demand in the demand classification library;
[0164] c) Arrange the correlations in descending order, find out the single demand data in the demand classification library corresponding to the largest correlation, that is, the electricity demand, and complete the demand analysis.
[0165] A terminal includes a processor and a storage medium; the storage medium is used to store instructions;
[0166] The processor is configured to operate according to the instructions to execute the steps of the method.
[0167] A computer-readable storage medium stores a computer program, which implements the steps of the method when executed by a processor.
[0168] The beneficial effects of the present invention are as follows:
[0169] 1) Collect user demand work orders as the original files of the demand classification library, extract the natural text paragraphs of the accepted content, and use NLP natural language lexical and grammatical analysis to cluster keywords with more demands. Based on this, the electricity demand analysis can be quickly realized, and the work orders can be sent to the corresponding processing departments or personnel to reduce the return of work orders due to unclear definitions, and provide targeted services to electricity users, so as to quickly locate, handle and solve problems, respond actively, and reduce the risk of user complaints caused by emotional factors;
[0170] 2) Taking into account the areas with inconsistent languages, including unrecognizable words due to dialect and homophone errors, the dialect vocabulary database, hot word database and vocabulary pinyin database are compared with the word-grams through the relevance calculation unit, the relevance between the word-grams and the hot words is calculated, and the relevance is arranged to obtain the elements of the hot words implied in the dialect and homophones, so as to further improve the analysis effect of user demands.
[0171] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0172] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0173] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0174] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for analyzing electricity demand based on NLP and hot word meta-analysis. Features: The method comprises the following steps: S101, extracting text on the user's electricity demand work order based on NLP and performing semantic recognition on the text; S102, segmenting the text on the work order into basic word units according to context semantics, comparing the segmented basic word units with professional word units in a professional word unit database, and merging the basic word units belonging to the professional word units; S103, screening hot word units in the basic word units, comparing the hot word units screened out with the multi-dimensional hot word units in the database for relevance, and obtaining a number of keywords; In S103, the database includes a dialect vocabulary database, a vocabulary pinyin database and a hot vocabulary database; the dialect vocabulary database is used to extract and store dialect vocabulary data containing hot vocabulary in the region; the hot vocabulary database is used to extract and store hot vocabulary data for demands in Mandarin; the vocabulary pinyin database is used to extract and store vocabulary data with similar pinyin to the hot vocabulary data; The hot words obtained by screening are compared with the multi-dimensional hot words in the database for relevance, and several keywords are obtained, including: 1) The dialect vocabulary database, hot word database and vocabulary pinyin database are combined on the dimension vector to obtain a multi-dimensional hot word combination set: f n4 =N(x k1 ,x k1 (c ks ),x k1 (o km )) Among them, N is the hot word combination dimension value; x k1 is the Mandarin representation of the kth hot word data requested in the hot word database; x k1 (c ks )) represents the Mandarin representation of the kth hot word data requested in the vocabulary Pinyin database, and the s similar words with the same Pinyin; x k1 (o km ) represents the m forms used to represent the kth hot word in the dialect vocabulary database; 2) Extracting individual words from the hot word set in turn, and calculating the relevance of the individual words with the individual dimension vectors in the multi-dimensional hot word combination set; 3) Compare the relevance of the single word with the relevance threshold. If the relevance of the single word is less than the relevance threshold, the corresponding word is not set as a keyword. Otherwise, the set corresponding to the maximum relevance value (x k1 ,x k1 (c ks ),x k1 (o km )) k1 As keywords, the elements in the multi-dimensional hot word combination set and the elements in the hot word set are substituted in turn to obtain several keywords; S104, concatenating the keywords according to different word orders to obtain a number of keyword concatenated sentences, calculating the correlation between the keyword concatenated sentences and the demand data in the demand classification library, and taking the demand in the demand classification library with the highest correlation as the electricity demand identification result.
2. According to claim 1, a method for analyzing electricity demand based on NLP and hot word element analysis, Features: In S103, word-grams belonging to or meaning hot word-grams in the basic word-grams are screened, wherein the hot word-grams are pre-selected based on the experience of experts in the field.
3. According to the method for analyzing electricity demand based on NLP and hot word element analysis as described in claim 1, Features: The calculation formula for the relevance of a single word Ixgd is: Where ai is the frequency of the i-th word in the hot word set, and its value is 1; b i is the i-th word in the multi-dimensional hot word combination set (x k1 ,x k1 (c ks ),x k1 (o km )) where n is the number of individual words.
4. According to claim 1, a method for analyzing electricity demand based on NLP and hot word element analysis, Features: In S104, the claim classification library stores the claim ticket data of users that have been processed in the past; the claim ticket data of users that have been processed in the past refers to the claim keywords obtained by collecting user claim tickets as the original files of the claim classification library, extracting the natural text paragraphs of the accepted content, and using NLP natural language processing to perform lexical and grammatical analysis, and then clustering them.
5. According to claim 1, a method for analyzing electricity demand based on NLP and hot word element analysis, Features: S104 specifically includes: a) importing a number of keyword concatenation sentences to obtain a keyword concatenation sentence set and importing the set of demand data vectors into the demand classification library; b) Substituting the single vectors in the keyword concatenation sentence set and the appeal data vector set into the correlation calculation formula one by one to calculate the correlation between the single vectors in the two; c) Arrange the correlations in descending order, find out the single demand data in the demand classification library corresponding to the largest correlation, that is, the electricity demand, and complete the demand analysis.
6. According to claim 5, a method for analyzing electricity demand based on NLP and hot word element analysis, Features: The calculation formula for the correlation between single vectors is: Among them, a i is the frequency of occurrence of the ith keyword in the keyword concatenation sentence set; b j is the frequency of the jth keyword appearing in the demand keywords in the single demand in the demand classification library; n1 represents the number of keywords in a single vector of a keyword concatenation sentence; n3 represents the number of keywords in a single vector of demand data.
7. A system for analyzing electricity demand based on NLP and hot word meta-analysis, used to implement the method described in any one of claims 1 to 6, Features: The system includes a demand extraction module, a text recognition module, a word unit segmentation module, a word unit recognition module, a keyword extraction module, a keyword splicing module, a database module, a word unit comparison module, a relevance calculation module, a correlation calculation module and a demand intention analysis module; The demand extraction module is used to extract the text on the user demand work order to obtain a text set; The text recognition module is used to perform semantic recognition on the text on the request work order and import it into the word unit segmentation module; The word unit segmentation module is used to segment the text on the work order into basic word units according to the context semantics to obtain a basic word unit set; The word unit recognition module is used to compare the basic word units obtained by segmentation with the professional word units in the professional word unit database, and merge the basic word units belonging to the professional word units; The keyword extraction module is used to screen the words that belong to or mean hot words in the basic words, call the word comparison module and the relevance calculation module to compare the hot words obtained by the screening with the multi-dimensional hot words in the database, and obtain several keywords; wherein the hot words are pre-selected according to the experience of experts in this field; The keyword splicing module is used to splice keywords and words that are not set as keywords according to different word orders to obtain a plurality of keyword splicing sentences; The appeal intention analysis module is used to call the relevance calculation module to calculate the relevance between the keyword concatenation sentence and the appeal data in the appeal classification library, obtain the relevance and arrange it in descending order, so as to analyze the appeal intention; The database module is used to classify and store past demand data, dialect vocabulary data related to hot words, vocabulary pinyin data and hot word data.
8. According to claim 7, a system for analyzing electricity demand based on NLP and hot word element analysis, Features: The database module includes a demand classification database, a dialect vocabulary database, a vocabulary pinyin database and a hot word database; The request classification library is used to store the request work order data that have been processed by users in the past; The previously processed user request ticket data refers to the request keywords obtained by collecting user request tickets as the original archive of the request classification library, extracting the natural text paragraphs of the accepted content, performing lexical and grammatical analysis using NLP natural language processing, and then clustering them; The dialect vocabulary database is used to extract and store dialect vocabulary data containing hot words in the region; The hot word database is used to extract and store the hot word data for demands in Mandarin; The vocabulary pinyin database is used to extract and store vocabulary data with similar pinyin to hot vocabulary data.
9. According to claim 8, a system for analyzing electricity demand based on NLP and hot word element analysis, Features: The input end of the keyword extraction module is connected to a word unit comparison module, and the word unit comparison module includes a relevance calculation module; The word unit comparison module is used to compare the hot word units obtained by screening with the multi-dimensional hot word units in the database module, and use the relevance calculation module to perform relevance calculation; The correlation calculation module includes a correlation calculation strategy, and the correlation calculation strategy includes: 1) The dialect vocabulary database, hot word database and vocabulary pinyin database are combined on the dimension vector to obtain a multi-dimensional hot word combination set: f n4 =N(x k1 ,x k1 (c ks ),x k1 (o km )) Among them, N is the hot word combination dimension value; 2) Extracting individual words from the hot word set in turn, and calculating the relevance of the individual words with the individual dimension vectors in the multi-dimensional hot word combination set; The calculation formula for the relevance of a single word Ixgd is: Among them, n is the number of single word units; ai is the frequency of the i-th word in the hot word set, and its value is 1; b i is the i-th word in the multi-dimensional hot word combination set (x k1 ,x k1 (c ks ),x k1 (o km )) frequency of occurrence; 3) Compare the relevance of the single word with the relevance threshold. If the relevance of the single word is less than the relevance threshold, the corresponding word is not set as a keyword. Otherwise, the set corresponding to the maximum relevance value (x k1 ,x k1 (c ks ),x k1 (o km )) k1 As keywords, elements in the multi-dimensional hot word unit combination set and elements in the hot word unit set are substituted in sequence to obtain several keywords.
10. The electricity demand analysis system based on NLP and hot word analysis according to claim 9, Features: The appeal intention analysis module includes a correlation calculation module, which is used to calculate the correlation between the appeal data in the appeal classification library and the keyword splicing sentence, so as to find the corresponding appeal and realize the appeal intention analysis; The association calculation module includes an association calculation strategy, and the association calculation strategy includes: a) importing a number of keyword concatenation sentences to obtain a keyword concatenation sentence set and importing the set of demand data vectors into the demand classification library; b) Substituting the single vectors in the keyword concatenation sentence set and the appeal data vector set into the correlation calculation formula one by one to calculate the correlation between the single vectors in the two. The correlation calculation formula between the single vectors is: Among them, a i is the frequency of occurrence of the ith keyword of a single vector of a keyword concatenation sentence in the keyword concatenation sentence set; b j is the frequency of the jth keyword of a single vector of demand data appearing in the demand keywords of a single demand in the demand classification library; n1 represents the number of keywords in a single vector of a keyword concatenation sentence; n3 represents the number of keywords in a single vector of appeal data; c) Arrange the correlations in descending order, find out the single demand data in the demand classification library corresponding to the largest correlation, that is, the electricity demand, and complete the demand analysis.
