Event classification method, device, and medium

By acquiring work order information, extracting keywords and processing data, correcting typos, and using a pre-trained classification model for event classification, the problem of non-standard work order descriptions was solved, enabling faster and more accurate event classification and improving the efficiency of resolving urban management incidents.

CN120763675BActive Publication Date: 2026-01-16HAINA CLOUD IOT TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511278842.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2026-01-16
Estimated Expiration
2045-09-09

AI Technical Summary

Technical Problem

The existing work order event descriptions contain frequent typos and are not standardized, resulting in insufficient accuracy in event classification, prolonging dispatch time, and affecting the speed of urban management event resolution.

Method used

By acquiring work order information, we extract primary keywords and process data, correct typos, extract key information, and use a pre-trained classification model to classify events, thereby improving the accuracy and readability of the information.

Benefits of technology

It improved the accuracy of event classification, reduced the time for identification and correction, shortened the dispatch time, accelerated the operation of the work order processing chain, and improved the efficiency of event resolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120763675B_ABST
    Figure CN120763675B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of electrical appliances, and particularly relates to an event classification method, device and medium, comprising: obtaining work order information, wherein the work order information comprises event description content; performing first keyword extraction on the event description content to obtain an extraction result, and determining whether the work order information is valid work order information according to the extraction result; if yes, performing data processing on the event description content to obtain standard description content corresponding to the work order information; the data processing comprises error correction and / or information extraction; determining an event classification result corresponding to the work order information based on a pre-trained classification model; wherein the classification model is obtained by training based on historical standard description content corresponding to historical work order information. The method can more quickly and clearly obtain key information, greatly reducing the time cost of screening, sorting and correcting. At the same time, the event classification accuracy is significantly improved, effectively improving the event solving efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of event classification, and particularly relates to an event classification method, device and medium. BACKGROUND

[0002] In a modern urban management comprehensive service system, grid members and patrol members serve as key forces for information collection and event reporting on the front line, and bear the important responsibilities of timely discovering and feeding back various livelihood problems, safety hazards and the like.

[0003] However, in an actual working scenario, the existing reporting process exposes a problem that urgently needs to be solved: the event description statements reported by the grid members and the patrol members are generally in a chaotic state, and the event classification accuracy is seriously insufficient. First, due to the fact that some personnel have not received system and professional training on text expression and business classification, wrong characters frequently occur, which reduces the readability of the work order information; second, the non-standard description is generally present, which is either too brief or too long and vague, and it is difficult to directly display important information. In addition, even if the demand staff selects the event category of the work order, the event is often misclassified.

[0004] The above problems are concentrated in the dispatching link. After receiving the work order with defects, the dispatcher needs to spend a lot of time and energy to correct the information, reclassify, carefully identify the wrong characters, sort out the description, and correct the category attribution, which greatly prolongs the dispatching time, reduces the efficiency of the entire work order processing chain, and seriously affects the speed of solving the urban management events. SUMMARY

[0005] In view of the above problems, the application provides an event classification method, device and medium.

[0006] In a first aspect, the application provides an event classification method, which comprises:

[0007] obtaining work order information, wherein the work order information comprises event description content;

[0008] performing first keyword extraction on the event description content to obtain an extraction result, and determining whether the work order information is valid work order information according to the extraction result;

[0009] if yes, performing data processing on the event description content to obtain standard description content corresponding to the work order information; the data processing comprises wrong character correction and / or information extraction;

[0010] determining an event classification result corresponding to the work order information based on a pre-trained classification model; wherein the classification model is obtained by training historical standard description content corresponding to historical work order information.

[0011] In a possible implementation, the pre-trained classification model is used to determine the event classification result corresponding to the work order information, including:

[0012] The standard description content is input into the pre-trained classification model to obtain a first event type corresponding to the work order information output by the classification model;

[0013] According to a list of second event types corresponding to the first event type, a target second event type corresponding to the work order information is determined;

[0014] The first event type and the target second event type are taken as the event classification result of the work order information;

[0015] The list of second event types includes a plurality of candidate second event types, and each candidate second event type corresponds to at least one second keyword, different candidate second event types correspond to different second keywords, and the target second event type corresponding to the work order information is determined according to the second keyword of the candidate second event type.

[0016] In a possible implementation, the pre-trained classification model is used to determine the event classification result corresponding to the work order information, including:

[0017] For each candidate second event type, the number of second keywords corresponding to the candidate second event type contained in the standard description content is determined;

[0018] The proportion of the number and the total number of second keywords corresponding to the candidate second event type is determined;

[0019] The candidate second event type with the highest proportion is taken as the target second event type corresponding to the work order information.

[0020] In a possible implementation, the classification model includes a multi-layer Transformer-XL and a classification head connected to the multi-layer Transformer-XL, and the pre-training of the classification model includes:

[0021] Obtaining sample data; wherein the sample data includes a plurality of historical work order information respectively corresponding to historical standard description content, and a label corresponding to each historical standard description content, the label being used to indicate a first event type corresponding to the historical standard description content;

[0022] Based on the sample data, pre-adaptation training is performed on the multi-layer Transformer-XL of the classification model, the pre-adaptation training is used to indicate that the parameters of the multi-layer Transformer-XL are updated through minimizing sequence-level contrastive loss or masked language modeling loss, and a curriculum learning mechanism;

[0023] Fine-tuning the updated multi-layer Transformer-XL and the classification head to obtain a trained classification model, the fine-tuning is used to indicate that the parameters of the updated multi-layer Transformer-XL and the classification head are updated through a linear learning rate decay strategy with warm-up and a cross-entropy loss function.

[0024] In a possible implementation, the first keyword extraction on the event description content to obtain an extraction result includes:

[0025] Arranging each first keyword in a predetermined first keyword list in descending order of character length to obtain a target first keyword list;

[0026] According to the arrangement order of each first keyword in the target first keyword list, it is determined whether each first keyword satisfies a preset condition based on a greedy strategy, wherein the preset condition is used to indicate that the first keyword has a matching position in the event description content, and the matching position has no intersection with an occupied position set, and the occupied position set is used to indicate a set of position intervals in the event description content that have been matched to the first keyword;

[0027] The first keyword satisfying the preset condition is taken as the extraction result.

[0028] In a possible implementation, the determination of whether the work order information is valid work order information according to the extraction result includes:

[0029] It is judged whether the first keyword contained in the event description content is a keyword of a preset type; the preset type includes an event problem description type;

[0030] If yes, it is determined that the work order information is valid work order information; if no, it is determined that the work order information is invalid work order information.

[0031] In a possible implementation, the data processing on the event description content to obtain the standard description content corresponding to the work order information includes:

[0032] input the event description content into a pre-trained error correction model to obtain corrected description content output by the error correction model; the error correction model is obtained based on pre-processing results of historical work order information;

[0033] input the corrected description content into a pre-trained information extraction model to obtain the standard description content output by the information extraction model; the standard description content includes event problem description and event occurrence address, the information extraction model is obtained based on pre-processing results of historical work order information and the first keyword list.

[0034] In a possible implementation, the method further includes:

[0035] if the standard description content output by the information extraction model does not contain the event occurrence address, determining a user end position for outputting the work order information;

[0036] taking the user end position as the event occurrence address.

[0037] In a second aspect, the present application provides an event classification device, including:

[0038] an acquisition module configured to acquire work order information, the work order information including event description content;

[0039] an analysis module configured to perform first keyword extraction on the event description content to obtain an extraction result, and determine whether the work order information is valid work order information according to the extraction result;

[0040] a processing module configured to, if the work order information is valid work order information, perform data processing on the event description content to obtain standard description content corresponding to the work order information; the data processing includes error correction and / or information extraction;

[0041] a classification module configured to determine an event classification result corresponding to the work order information based on a pre-trained classification model; the classification model is obtained based on historical standard description content corresponding to historical work order information.

[0042] In a possible implementation, the classification module is specifically configured to:

[0043] input the standard description content into the pre-trained classification model to obtain a primary event type corresponding to the work order information output by the classification model;

[0044] determine a target secondary event type corresponding to the work order information according to a secondary event type list corresponding to the primary event type;

[0045] determine the first event type and the target second event type as an event classification result of the work order information;

[0046] The second event type list includes a plurality of candidate second event types, and each candidate second event type corresponds to at least one second keyword. Different candidate second event types correspond to different second keywords. The target second event type corresponding to the work order information is determined according to the second keyword of the candidate second event type.

[0047] In a possible implementation, the classification module is specifically configured to:

[0048] For each candidate second event type, determine the number of second keywords corresponding to the candidate second event type contained in the standard description content;

[0049] Determine the proportion of the number of the second keywords and the total number of the second keywords corresponding to the candidate second event type;

[0050] The candidate second event type with the highest proportion is taken as the target second event type corresponding to the work order information.

[0051] In a possible implementation, the classification model includes a multi-layer Transformer-XL and a classification head connected to the multi-layer Transformer-XL. The classification module is specifically configured to:

[0052] Obtain sample data. The sample data includes a plurality of historical standard description contents corresponding to a plurality of historical work order information respectively, and a label corresponding to each historical standard description content. The label is used to indicate the first event type corresponding to the historical standard description content.

[0053] Based on the sample data, pre-adaptively train the multi-layer Transformer-XL of the classification model. The pre-adaptive training is used to indicate that the parameters of the multi-layer Transformer-XL are updated by minimizing the sequence-level contrastive loss or the mask language modeling loss, and the curriculum learning mechanism.

[0054] Fine-tune the updated multi-layer Transformer-XL and the classification head to obtain a trained classification model. The fine-tuning is used to indicate that the parameters of the updated multi-layer Transformer-XL and the classification head are updated by using a linear learning rate decay strategy with warm-up and a cross-entropy loss function.

[0055] In a possible implementation, the analysis module is specifically configured to:

[0056] arrange each first keyword in the predetermined first keyword list in descending order according to character length to obtain a target first keyword list;

[0057] determine whether each first keyword in the target first keyword list meets a preset condition according to an arrangement order of each first keyword in the target first keyword list based on a greedy strategy, wherein the preset condition is used to indicate that the first keyword has a matching position in the event description content, and the matching position has no intersection with an occupied position set, and the occupied position set is used to indicate a set of position intervals in the event description content that have been matched to the first keyword;

[0058] take the first keyword meeting the preset condition as the extraction result.

[0059] In a possible implementation, the analysis module is specifically configured to:

[0060] determine whether a first keyword included in the event description content is a keyword of a preset type; the preset type includes an event problem description type;

[0061] if yes, determine that the work order information is valid work order information; and if no, determine that the work order information is invalid work order information.

[0062] In a possible implementation, the processing module is specifically configured to:

[0063] input the event description content into a pre-trained error correction model to obtain error-corrected description content output by the error correction model; the error correction model is trained based on a preprocessing result of historical work order information;

[0064] input the error-corrected description content into a pre-trained information extraction model to obtain the standard description content output by the information extraction model; the standard description content includes an event problem description and an event occurrence address, and the information extraction model is trained based on the preprocessing result of the historical work order information and the first keyword list.

[0065] In a possible implementation, the processing module is further configured to:

[0066] if the standard description content output by the information extraction model does not contain the event occurrence address, determine a user end position outputting the work order information;

[0067] take the user end position as the event occurrence address.

[0068] In a third aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by a processor to implement the method according to any one of the first aspect.

[0069] In a fourth aspect, the present application provides an electronic device, comprising at least one processor and a memory, wherein

[0070] The memory stores computer execution instructions.

[0071] The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the method according to any one of the first aspect.

[0072] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the steps of the method according to any one of the first aspect.

[0073] The event classification method, device and medium provided by the present application first acquire work order information containing event description content, then perform first keyword extraction on the event description to determine the validity of the work order, filter out invalid work orders that do not meet the requirements, and save subsequent processing resources. Then, data processing is carried out on the event description of the valid work order, and through the means of error correction and information extraction, the event description is converted into standard description content, and the accuracy and readability of the information are improved. Finally, based on the classification model trained based on historical data, the work order is accurately matched with the corresponding event classification. This method effectively avoids the problems of frequent errors, long and vague descriptions or too brief descriptions in the original description, and can quickly and clearly obtain key information, greatly reducing the time cost of screening, sorting and correcting. At the same time, the accuracy of event classification is significantly improved, avoiding the errors caused by incorrect classification or repeated modification, which can greatly shorten the dispatching time, and thus speed up the operation speed of the entire work order processing chain, effectively improving the efficiency of event solving. BRIEF DESCRIPTION OF DRAWINGS

[0074] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0075] Figure 1 Flow of the event classification method provided by the embodiment of the present application Figure 1 ;

[0076] Figure 2 Flow of the event classification method provided by the embodiment of the present application Figure 2 ;

[0077] Figure 3The flow of the event classification method provided for the embodiment of the present application Figure 3 ;

[0078] Figure 4 The event classification device diagram provided for the embodiment of the present application

[0079] Figure 5 The hardware schematic diagram of the electronic device provided for the embodiment of the present application

[0080] The specific embodiments of the present application have been shown through the above-mentioned drawings, and will be described in more detail hereinafter. The drawings and the written description are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0081] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme of the present application will be described clearly and completely in combination with the drawings in the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative work belong to the scope of protection of the present application.

[0082] The terms "first", "second", "third", "fourth" and the like (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.

[0083] In the embodiments of the present application, the words "exemplary" or "for example" are used to mean example, instance, or illustration. Any embodiment or design scheme described as "exemplary" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner.

[0084] In actual work scenarios, there are significant differences in the cultural levels of front-line staff. Some staff may not have received systematic and professional training in written expression and business classification. When they use mobile applications to report event tickets, a series of problems arise. Typos are common, such as writing "exposed garbage" as "exposed garbage" and "occupying the road for business" as "standing on the road for business". These errors not only reduce the readability of the ticket information, but also may lead to misunderstandings of the core content of the event by subsequent processing personnel. Non-standard descriptions are also common. When describing events, staff often lack clear and accurate logical structures. They may either be too brief and omit key information, such as writing "broken street light" without specifying the location, or they may be verbose and vague, with a lot of colloquial language, making important information lost in irrelevant details. More critically, there are errors in category selection. There are many types of urban management events and detailed classification. Different types of events correspond to different processing procedures and responsible departments, but front-line staff often misclassify events due to a lack of understanding of the classification standards, such as misclassifying "road traffic / wooden trestle" as "public facilities / broken sidewalk board".

[0085] These problems are fully exposed in the ticket assignment stage. After receiving these tickets with many flaws, ticket assigners have to spend a lot of time and effort to correct the information and reclassify it. They need to carefully identify typos, sort out chaotic descriptions, and correct incorrect category assignments. This process greatly extends the time for ticket assignment. Tickets that could have been quickly transferred to the relevant responsible departments are delayed due to the delay in the ticket assignment stage, significantly reducing the efficiency of the entire ticket processing chain and seriously affecting the speed of solving urban management events. For some emergency events, such as road collapse and gas leakage, the delay in ticket assignment may exacerbate the problem, even threatening the safety of citizens' lives and property; for some long-term problems affecting the city's appearance and order, such as illegal construction and road occupation, failure to act promptly will affect the overall image of the city and the quality of life of residents.

[0086] To solve the above problems, the application provides an event classification method. First, ticket information containing event description content is obtained, and then first keyword extraction is performed on the event description to determine the validity of the ticket, filter out invalid tickets that do not meet the requirements, and save subsequent processing resources. Then, data processing is performed on the event description of the valid ticket, and through the means of error correction and information extraction, the event description is converted into standard description content, and the accuracy and readability of the information are improved. Finally, based on the classification model trained based on historical data, the ticket is accurately matched with the corresponding event classification. This method effectively avoids the problems of frequent errors, long and vague descriptions, or overly brief descriptions in the original description, and can quickly and clearly obtain key information, greatly reducing the time cost of screening, sorting and correcting. At the same time, the accuracy of event classification is significantly improved, avoiding the errors caused by incorrect classification or repeated modification, which can greatly shorten the dispatching time, thereby speeding up the operation of the entire ticket processing chain, and effectively improving the efficiency of event solving.

[0087] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards, and provide corresponding operation portal for user to choose authorization or refusal.

[0088] The technical solutions of the application and how the technical solutions of the application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can exist independently or in combination. For the same or similar concepts or processes, some embodiments may not be described again. The embodiments of the application will be described below with reference to the drawings.

[0089] The embodiment provides an event classification method. Figure 1 The flow of the event classification method provided by the embodiment of the application Figure 1 The method comprises the following steps.

[0090] S101, obtaining ticket information, wherein the ticket information comprises event description content.

[0091] S102, performing first keyword extraction on the event description content to obtain an extraction result.

[0092] It should be noted that the work order information refers to the detailed record of the event reported by the grid member or the patrol member, and contains the event description content, which is the basic data of the entire event classification method. The first keyword extraction refers to extracting representative and key words from the event description content in the work order information. These keywords can reflect the main characteristics and core information of the event, and provide a basis for subsequent judgment of the validity of the work order.

[0093] For example, the event description content can be segmented, and then the frequency of each word is counted. The words with higher frequency are extracted as the first keywords. Natural language processing techniques can also be used to analyze the semantics of the event description, understand the meaning of the sentence, and then extract the keywords related to the event. In addition, a set of event-related keyword rules or dictionaries can be predefined to scan the event description content, and the matched words are taken as the first keywords.

[0094] For example, before the first keyword extraction of the event description content is performed to obtain the extraction result, the method further includes:

[0095] Obtain a plurality of historical work order information; each of the historical work order information includes historical event description content;

[0096] Preprocess the historical event description content of each historical work order information to obtain a preprocessing result, the preprocessing being used to indicate deletion of redundant content and / or correction of misspelled words, the preprocessing result including the historical event description content and corresponding preprocessing description content;

[0097] According to the preprocessing description content, select a first keyword to obtain a first keyword list;

[0098] Correspondingly, the first keyword extraction of the event description content to obtain the extraction result includes:

[0099] According to the first keyword list, determine the first keyword contained in the event description content.

[0100] In this example, deleting redundant content can simplify the historical event description content, for example, "garbage accumulation on the sidewalk board, no one cleans up, affects the city appearance, in front of the Harmony Square on Construction Road No. 16", which is simplified to "garbage accumulation on the sidewalk board, in front of the Harmony Square on Construction Road No. 16". Regular expressions can be used to identify and delete some common redundant content, such as repeated punctuation marks, meaningless character combinations, and extra spaces.

[0101] Further, predefined text cleaning rules can be combined, such as removing specific prefixes, suffixes, annotation content, etc. Spelling correction can ensure the accuracy of historical event description content, for example, "exposing rubbish, operating on the road, broken road sign" is corrected to "exposing garbage, operating on the road, broken road sign". A correct vocabulary dictionary can be constructed, and each word in the historical event description content is compared with the words in the dictionary one by one. When a suspected misspelled word is found, the correct word in the dictionary is replaced. Some open source text correction tools or libraries can also be used to correct spelling errors in historical event description text. These tools are usually trained based on a large amount of text data and have good error correction ability.

[0102] Further, the frequency of each word in the preprocessed description content can be calculated, and then ranked from high to low according to the frequency, and a certain number of words ranked in the front are selected as the first keyword. Common keyword extraction algorithms such as TextRank algorithm can also be used to extract keywords from preprocessed text. For example, TextRank algorithm constructs a graph model for text, calculates the importance of each word or phrase, and obtains a keyword list; LDA (Latent Dirichlet Allocation) topic model can also be used to model the text set as a topic distribution, and extract representative keywords from each topic as the first keyword.

[0103] The first keyword list includes multiple keywords in the work order use scenario, such as "garbage", "road sign", "bus station", "rainwater well cover", "monitoring pole", "electronic eye", "junk", "abandoned furniture", "garbage can", "toilet", etc. The first keyword list can be gradually expanded as the amount of data increases, and all categories of keywords are included as much as possible.

[0104] The example introduces the preprocessing of historical work order information and the selection of the first keyword, which can provide more accurate reference for the keyword extraction and classification of subsequent new work orders, and improve the overall classification accuracy.

[0105] For example, the first keyword extraction of the event description content obtains an extraction result, which includes:

[0106] Each first keyword in the predetermined first keyword list is arranged in descending order according to the character length to obtain a target first keyword list;

[0107] In order to determine whether each first keyword meets a preset condition according to the arrangement order of each first keyword in the target first keyword list, a greedy strategy is used, wherein the preset condition is used to indicate that the first keyword has a matching position in the event description content, and the matching position has no intersection with the occupied position set, and the occupied position set is used to indicate a set of position intervals in the event description content that have been matched to the first keyword;

[0108] The first keyword meeting the preset condition is taken as the extraction result.

[0109] In this example, based on the pre-defined first keyword list K and the pre-processed event description content T, a longest-first non-overlapping matching rule can also be used to extract the first keyword set. The specific process can be as follows:

[0110] The first keyword list K is sorted in descending order of character length to generate a sorted keyword sequence:

[0111] ;

[0112] Wherein, |k| represents the character length of the first keyword k, and longer first keywords are preferentially matched to avoid fragmented matching of short words on long words.

[0113] For each first keyword k∈K, the matching position set of k in the event description content T is defined as:

[0114] ;

[0115] Wherein, p is the matching start position, represents a substring with a length of |k| starting from position p.

[0116] The first keywords in are processed in turn using the greedy strategy, and an occupied position set is maintained, which is initially empty. For each first keyword k, if there is a matching position p∈Occur(k,T), and the interval has no intersection with , then k is added to the result set, and is updated.

[0117] The final first keyword set R (i.e., the extraction result) is defined as:

[0118]

[0119] This example can ensure that the keyword matching result has no position overlap, and preferentially retains long keywords with more complete semantics, thereby improving the accuracy and readability of keyword extraction. ​

[0120] S103, determining whether the work order information is valid work order information according to the extraction result.

[0121] S104, if not, no processing is performed.

[0122] S105, if yes, performing data processing on the event description content to obtain standard description content corresponding to the work order information; the data processing includes error correction and / or information extraction.

[0123] It should be noted that valid work order information refers to event description content in the work order information having a certain quality, being able to obtain meaningful keywords through the first keyword extraction, and the keywords being able to roughly reflect the main characteristics of the event, so that subsequent processing can be continued. For example, a threshold of the number of keywords can be set, and if the number of extracted first keywords reaches or exceeds the threshold, the work order is considered valid. For example, if the threshold is set to 3, and 5 first keywords are extracted, the work order is determined to be valid. The extracted first keywords can also be evaluated for quality, and the evaluation indicators can include semantic clarity, relevance, etc. For example, by calculating the semantic similarity of the keywords, keywords with low similarity are filtered out, and if the number of remaining keywords meets the requirements, the work order is determined to be valid. In addition, the extracted first keywords can also be matched with the keywords in the pre-defined standard event classification, and if the matching degree reaches a certain proportion (such as 60%), the work order information is considered valid.

[0124] Data processing is a further optimization and standardization processing of the event description content of the valid work order information, including error correction and information extraction, etc. The purpose is to convert the original event description which may have defects into more accurate, concise and standard format standard description content.

[0125] For example, when performing information extraction, relevant rules can be defined in advance according to the semantic structure and keywords of the event description to extract key information. Machine learning algorithms such as named entity recognition can also be used to train the event description, so that the model can automatically identify and extract key entities and information in the event, such as time, location, event type, etc.

[0126] S106, determining an event classification result corresponding to the work order information based on a pre-trained classification model; wherein the classification model is trained based on historical standard description content corresponding to historical work order information.

[0127] In this step, the pre-trained classification model refers to a model that is pre-trained using standard description content in historical work order information as training data and is capable of classifying events of work order information. The event classification result is the classification of the event described in the work order information, such as "city environment class", "municipal facility class", "traffic order class", etc.

[0128] For example, the standard description content of historical work order information can be used as a feature, and event classification can be used as a label to train a decision tree model. When classifying new work order information, the features in the standard description content are used to determine the nodes of the decision tree, and finally the event classification result is obtained by reaching the leaf node. A multi-layer neural network can also be constructed, the input layer receives the text vector representation of the standard description content, and the features are extracted and converted through the hidden layer, and finally the event classification result is obtained through the classifier (such as softmax) of the output layer. In the training process, the weights of the network are constantly adjusted using historical data, so that the model can accurately classify events. In addition, the standard description content can be converted into a vector representation, and then different classes of event data can be separated by finding the optimal classification hyperplane. For new work order information, after vectorizing the standard description content, the distance and position relationship with the classification hyperplane are determined to determine the event classification to which it belongs.

[0129] The event classification method provided in this embodiment first acquires work order information containing event description content, then performs first keyword extraction on the event description to determine the validity of the work order, filters out invalid work orders that do not meet the requirements, and saves subsequent processing resources. Then, data processing is performed on the event description of the valid work order, and through means such as error correction and information extraction, the event description is converted into standard description content, improving the accuracy and readability of the information. Finally, the classification model trained based on historical data is used to accurately match the corresponding event classification for the work order. This method effectively avoids the problems of frequent errors, long and vague descriptions, or overly brief descriptions in the original description, and can quickly and clearly obtain key information, greatly reducing the time cost of screening, sorting, and correcting. At the same time, the accuracy of event classification is significantly improved, avoiding errors caused by incorrect classification or repeated modifications, which can greatly shorten the dispatching time and thus speed up the operation of the entire work order processing chain, effectively improving the efficiency of event resolution.

[0130] The embodiment provides an event classification method. Figure 2 The flow of the event classification method provided in the embodiment of the application Figure 2 As shown in Figure 2 , the embodiment is based on the Figure 1 embodiment and details the process of determining the event classification result. The method comprises:

[0131] S201, input the standard description content corresponding to the work order information into the pre-trained classification model to obtain a first event type corresponding to the work order information output by the classification model.

[0132] In this step, the first event type refers to a relatively coarse-grained event category obtained by preliminarily classifying the work order information, which is used to roughly separate different types of events. Considering that event classification can include a large number of categories, in some classification methods, event classification includes two steps of large category division and small category division. Since the number of large categories is dozens, the number of small categories (or subcategories) contained in a single large category ranges from several to dozens, and the total number of final small categories can be as high as hundreds, in order to ensure the accuracy of the classification algorithm, a neural network is used for large category division. After determining the large categories, the small categories under the jurisdiction of the large categories are divided, so that the range of small categories can be reduced from hundreds to dozens, improving the classification accuracy of the algorithm.

[0133] For example, the standard description content can be converted into a feature vector and then input into a trained classification model such as Naive Bayes or Support Vector Machine. The model outputs the corresponding first event type according to the mapping relationship between the feature vector and each category. A classification model can also be constructed using the recurrent neural network, convolutional neural network or Transformer architecture in deep learning. The standard description content is input in the form of a word vector, and the feature is extracted and converted through multiple neurons in the model. Finally, the probability distribution of belonging to each first event type is output through the softmax activation function, and the category with the maximum probability is taken as the final first event type.

[0134] For example, the classification model includes a multi-layer Transformer-XL and a classification head connected to the multi-layer Transformer-XL. The pre-training of the classification model includes:

[0135] Obtaining sample data; wherein the sample data includes historical standard description content corresponding to a plurality of historical work order information respectively, and a label corresponding to each historical standard description content, the label being used to indicate a first event type corresponding to the historical standard description content;

[0136] Based on the sample data, pre-adapting and training the multi-layer Transformer-XL of the classification model, the pre-adapting and training being used to update the parameters of the multi-layer Transformer-XL by minimizing the sequence-level contrastive loss or the mask language modeling loss, and the curriculum learning mechanism;

[0137] The updated multi-layer Transformer-XL and the classification head are fine-tuned to obtain a trained classification model, and the fine-tuning is used to indicate that the parameters of the updated multi-layer Transformer-XL and the classification head are updated by a linear learning rate decay strategy with warm-up and a cross-entropy loss function.

[0138] In the present example, the structure of the sample data can be in the form of description information + tab + label, such as "sidewalk garbage, 30 meters in front of Wanda Plaza on Minqian Road. \tab environmental sanitation".

[0139] The classification model can include a structurally optimized multi-layer Transformer-XL backbone network and a classification head module cascaded at the output end of the backbone network.

[0140] The above multi-layer Transformer-XL backbone network can be composed of N layers (N is 6 according to experience, taking into account training cost, model accuracy and inference efficiency) of improved Transformer-XL units stacked, each unit introducing a cross-fragment memory mechanism of relative position coding based on a standard self-attention mechanism, and configuring a learnable segment-level recursive memory vector for capturing long-distance temporal dependency.

[0141] The above classification head module can include, in sequence, a fully connected layer with a dimension of , and a normalization layer configured with a Softmax activation function, where C is the number of categories of the predefined first-level event type.

[0142] The weight matrix of the fully connected layer is optimized in conjunction with the backbone network parameters by a back propagation algorithm to realize joint learning of feature representation and classification decision.

[0143] The training process adopts a phased optimization strategy to improve the convergence stability, feature expression ability and task adaptation performance of the model. During the pre-adaptation training process of the backbone network, the parameters of the fully connected layer and the Softmax layer in the classification head module can be frozen, and only the parameters of the multi-layer Transformer-XL backbone network are updated. In this stage, the model minimizes the sequence-level contrastive loss or the masked language modeling loss to make the backbone network preliminarily learn the context semantic representation and long-distance temporal dependency structure of the input text, and realize the pre-adaptation of the semantic alignment of the input space and the feature extraction ability.

[0144] To further improve the stability of long-range modeling, a curriculum learning mechanism can also be introduced: shorter sequence fragments are used for initial training, and the input sequence length is gradually increased after the model converges preliminarily, guiding the recursive memory mechanism of Transformer-XL to model complex dependency relationships from shallow to deep, avoiding gradient explosion or convergence difficulties caused by long sequence initial training.

[0145] After the pre-adaptive training of the backbone network converges, the classification head and all parameters of the backbone network are unfrozen during the fine-tuning process, and the overall model is optimized jointly with a lower learning rate. In this stage, the task-specific cross-entropy loss function is used as the optimization objective to drive the collaborative learning of feature extraction and classification decision, further improving the discriminant accuracy and generalization ability of the model on the classification task.

[0146] To enhance the stability of training, a linear learning rate decay strategy with warm-up can also be used: the learning rate is linearly increased (warm-up) for the first 10% of the training steps, and then gradually decays to 10% of the initial value, effectively alleviating the gradient disturbance problem caused by random initialization of the classification head, preventing the semantic representation learned by the backbone network from being destroyed.

[0147] The above phased optimization strategy significantly accelerates the overall convergence speed of the model through the progressive training mode of "representation first, decision second", reduces the risk of training shock, and improves the small sample learning ability under limited labeled data conditions, ultimately achieving more robust and accurate text classification performance.

[0148] S202, according to the secondary event type list corresponding to the primary event type, determine the target secondary event type corresponding to the work order information.

[0149] S203, taking the primary event type and the target secondary event type as the event classification result of the work order information.

[0150] Among them, the secondary event type list includes a plurality of candidate secondary event types, and each candidate secondary event type corresponds to at least one second keyword, and the second keywords corresponding to different candidate secondary event types are different, and the target secondary event type corresponding to the work order information is determined according to the second keyword of the candidate secondary event type.

[0151] It should be noted that the secondary event type list refers to a set of more fine-grained event subcategories under each primary event type, including multiple candidate secondary event types, which are used to further subdivide the primary event type to more accurately describe and distinguish the specific type of event. The second keyword refers to a keyword used to distinguish and determine different secondary event types. Each candidate secondary event type corresponds to at least one second keyword. These keywords can reflect the specific characteristics or key information of the secondary event type, and the second keywords corresponding to different secondary event types are different to ensure the accuracy of classification.

[0152] For example, the keywords in the standard description content can be extracted and then matched one by one with the second keywords corresponding to each candidate secondary event type in the secondary event type list. If the second keyword of a certain candidate secondary event type appears in the standard description content, it is determined as the target secondary event type. The standard description content and the second keywords of each candidate secondary event type can also be converted into vector representations using word vector technology. The semantic similarity between the standard description content vector and each second keyword vector is calculated to determine.

[0153] For example, the target secondary event type corresponding to the work order information is determined according to the secondary event type list corresponding to the primary event type, including:

[0154] For each candidate secondary event type, the number of second keywords corresponding to the candidate secondary event type contained in the standard description content is determined.

[0155] The proportion of the number of second keywords corresponding to the candidate secondary event type and the total number of second keywords corresponding to the candidate secondary event type is determined.

[0156] The candidate secondary event type with the highest proportion is taken as the target secondary event type corresponding to the work order information.

[0157] For example, the matching score of the standard description content and the second keyword corresponding to each candidate secondary event type can be calculated based on the following formula :

[0158]

[0159] where j is the jth candidate secondary event type, N is the total number of keywords extracted from the standard description content, represents the i th keyword of the standard description content, The numerator indicates that if the i th extracted keyword belongs to the second keyword corresponding to the j th candidate secondary event type, the number is increased by 1. a second keyword total number representing a total number of second keywords of the jth candidate secondary event type, a second keyword total number representing a total number of second keywords of the jth candidate secondary event type.

[0160] Further, the matching score of each candidate secondary event type can be calculated by dividing the second keyword total number of the candidate secondary event type by the second keyword total number of the standard description content. The candidate secondary event type with the highest matching score can be selected as the target secondary event type corresponding to the work order information.

[0161] It should be noted that the keywords extracted from the standard description content can be the first keywords extracted from the event description content in the foregoing embodiments. Alternatively, the keywords can be extracted from the standard description content based on a new keyword list or extraction rule.

[0162] In this example, after determining the second keywords contained in the standard description content, the position information of each second keyword in the text can also be recorded. The second keywords at different positions in the standard description content are weighted. For example, the keywords appearing at key positions such as the title, the beginning of a paragraph, or the end of a paragraph are given higher weights. The weighted sub-number is divided by the second keyword total number corresponding to the candidate secondary event type to obtain a weighted proportion. The candidate secondary event type with the highest weighted proportion is selected as the target secondary event type.

[0163] In addition, the second keywords of each candidate secondary event type can also be semantically expanded to generate a keyword list related to the semantics. The total number of second keywords and their semantic expansion keywords corresponding to each candidate secondary event type contained in the standard description content is determined as the sub-number. The sub-number is divided by the second keyword total number (including the semantic expansion keywords) corresponding to the candidate secondary event type to obtain a proportion. The candidate secondary event type with the highest proportion is selected as the target secondary event type.

[0164] This example can more accurately measure the degree of association between the work order information and each secondary event type by quantitatively calculating the matching proportion of the keywords, thereby improving the accuracy of classification.

[0165] The event classification method provided in this embodiment can improve the accuracy of classification, reduce errors caused by manual judgment or simple keyword matching, and realize efficient and automatic classification of work order information, thereby significantly improving the work order processing efficiency.

[0166] This embodiment provides an event classification method. Figure 3 The flow of the event classification method provided in this embodiment Figure 3 . For example, Figure 2As shown, the embodiment in Figure 4 Based on the embodiment, the data processing process of the work order information is described in detail. The method comprises:

[0167] S301, obtaining work order information, performing first keyword extraction on the event description content of the work order information to obtain an extraction result.

[0168] This step is the same as S102 and will not be repeated here.

[0169] S302, determining whether the first keyword contained in the event description content is a preset type of keyword; the preset type includes an event problem description type.

[0170] S303, if not, determining that the work order information is invalid work order information, and not processing the work order information.

[0171] S304, if yes, determining that the work order information is valid work order information.

[0172] It should be noted that the preset type can be a keyword category pre-set according to business requirements, for judging whether the event description content contains a specific type of keyword. The event problem description type refers to a keyword category describing specific problems of an event, for judging whether the event description content contains a problem description. For example, the first keyword list can be imported into an information extraction algorithm to perform first keyword extraction on a sentence, and if no information is extracted from the reported event description content, it is determined that the work order is invalid, such as only address information without detailed description of the event problem.

[0173] Further, the valid work order information can be marked as a valid state, allowing it to enter a subsequent processing flow, update a state field, or join a valid work order queue for subsequent module processing. The valid work order information can also be stored in a specific table or area of a database, and a subsequent processing module can periodically read the work order information from this location for processing.

[0174] S305, inputting the event description content into a pre-trained error correction model to obtain error-corrected description content output by the error correction model; the error correction model is trained based on the pre-processing results of historical work order information.

[0175] In this step, the error correction model refers to a machine learning or deep learning model that corrects text errors to improve text accuracy.

[0176] Exemplarily, the text_correction network in the paddlenlp architecture can be used, a public dataset is downloaded, the preprocessed result in the historical work order information and other possibly problematic descriptions in the description are added to the training set, the data set is divided according to the training and test data volume (for example, 7:3), the training hyperparameters are set, the fine-tuning of the error correction model is performed, and the trained error correction model is used for error correction of the event description.

[0177] In addition, a sequence-to-sequence (seq2seq) model can also be trained, the input is an error text sequence, the output is a corrected correct text sequence, the model learns the text sequence conversion method to complete error correction.

[0178] S306, input the error-corrected description content into the pre-trained information extraction model to obtain the standard description content output by the information extraction model, the standard description content including event problem description and event occurrence address, the information extraction model being trained based on the preprocessed result of the historical work order information and the first keyword list.

[0179] In this step, the information extraction model refers to a model for extracting key information from text, which is used to extract event problem description and event occurrence address and other key information from the error-corrected description content.

[0180] Exemplarily, the preprocessed description content in the preprocessed result of the historical work order information can be address annotated to obtain corresponding training data, then the UIE model (Universal Information Extraction) is fine-tuned and optimized in the field, the UIE extraction model is combined with the first keyword list, and the description sentence of the work order is optimized and standardized, and the standardized result includes problem description and event occurrence address, such as “garbage on the road plate, intersection of construction road and people's road in the southwest”. When combined with the first keyword list, the first keyword list can be integrated into the UIE model training as a feature or constraint condition. For example, a regularization term related to the keyword is added to the objective function of the model training, so that the model pays more attention to the keyword when extracting information. The first keyword list can also be used to enhance the training data. By replacing or adding keywords, more diverse training samples are generated, and the recognition ability of the model for keyword-related expressions is improved.

[0181] In addition, key entity information in the text can also be extracted using a named entity recognition model. A large amount of entity types in the text data, such as event problem description, address, etc., are labeled, and a named entity recognition model is trained using a BiLSTM-CRF, BERT, etc. After inputting the text, the key information is recognized and extracted to generate the standard description content. A dependency syntax analysis model can also be used to analyze the dependency relationship of the words in the text, and to identify key information such as event problem description and address. The text structure is parsed, the key information is located and extracted to generate the standard description content.

[0182] For example, the method further comprises:

[0183] If the standard description content output by the information extraction model does not contain the event occurrence address, determining the user end position outputting the work order information;

[0184] Taking the user end position as the event occurrence address.

[0185] This example uses the user end position as a substitute when the information extraction model cannot obtain the event occurrence address, ensuring the integrity of the work order information and avoiding processing delays due to missing addresses. At the same time, this flexible processing method improves the efficiency and practicality of work order processing, ensuring that work orders can be promptly assigned and processed.

[0186] The event classification method provided by the embodiment effectively filters out invalid work orders through first keyword extraction and preset type judgment, avoiding waste of processing resources. For valid work orders, the text errors are corrected by an error correction model, and then the standard description content is obtained by an information extraction model, including key event problem description and address information. This method effectively improves the accuracy and standardization of work order information, and further improves the efficiency and quality of the entire work order processing flow.

[0187] The embodiment also provides an event classification device. Figure 4 As shown in the event classification device diagram provided by the embodiment of the application, Figure 5 The event classification device 40 comprises:

[0188] The acquisition module 401 is configured to acquire work order information, wherein the work order information comprises event description content.

[0189] The analysis module 402 is configured to perform first keyword extraction on the event description content to obtain an extraction result, and determine whether the work order information is valid work order information according to the extraction result.

[0190] The processing module 403 is configured to, if the work order information is valid work order information, perform data processing on the event description content to obtain standard description content corresponding to the work order information. The data processing comprises error correction and / or information extraction.

[0191] The classification module 404 is configured to determine an event classification result corresponding to the work order information based on a pre-trained classification model, wherein the classification model is obtained by training based on historical standard description content corresponding to historical work order information.

[0192] In a possible implementation, the classification module 404 is specifically configured to:

[0193] input the standard description content into the pre-trained classification model to obtain a primary event type corresponding to the work order information output by the classification model;

[0194] determine a target secondary event type corresponding to the work order information according to a secondary event type list corresponding to the primary event type;

[0195] take the primary event type and the target secondary event type as the event classification result of the work order information;

[0196] The secondary event type list includes a plurality of candidate secondary event types, and each candidate secondary event type corresponds to at least one second keyword, different candidate secondary event types correspond to different second keywords, and the target secondary event type corresponding to the work order information is determined according to the second keyword of the candidate secondary event type.

[0197] In a possible implementation, the classification module 404 is specifically configured to:

[0198] For each candidate secondary event type, determine a sub-number of the second keyword corresponding to the candidate secondary event type included in the standard description content;

[0199] determine a proportion of the sub-number and a total number of the second keyword corresponding to the candidate secondary event type;

[0200] take the candidate secondary event type with the highest proportion as the target secondary event type corresponding to the work order information.

[0201] In a possible implementation, the classification model includes a multi-layer Transformer-XL and a classification head connected to the multi-layer Transformer-XL, and the classification module 404 is specifically configured to:

[0202] obtain sample data, wherein the sample data includes historical standard description content corresponding to a plurality of historical work order information respectively, and a label corresponding to each historical standard description content, the label being used to indicate a primary event type corresponding to the historical standard description content;

[0203] The multi-layer Transformer-XL of the classification model is pre-adaptively trained based on the sample data, the pre-adaptive training is used to indicate that the parameters of the multi-layer Transformer-XL are updated through minimizing sequence-level contrastive loss or mask language modeling loss, and a curriculum learning mechanism;

[0204] The updated multi-layer Transformer-XL and the classification head are fine-tuned to obtain a trained classification model, the fine-tuning is used to indicate that the parameters of the updated multi-layer Transformer-XL and the classification head are updated through a linear learning rate decay strategy with warm-up and a cross-entropy loss function.

[0205] In a possible implementation, the analysis module 402 is specifically configured to:

[0206] arranging each first keyword in the predetermined first keyword list in descending order according to the character length to obtain a target first keyword list;

[0207] determining whether each first keyword in the target first keyword list satisfies a preset condition according to the arrangement order of each first keyword in the target first keyword list based on a greedy strategy, wherein the preset condition is used to indicate that the first keyword has a matching position in the event description content, and the matching position has no intersection with an occupied position set, and the occupied position set is used to indicate a set of position intervals in the event description content that have been matched to the first keyword;

[0208] taking the first keyword satisfying the preset condition as the extraction result.

[0209] In a possible implementation, the analysis module 402 is specifically configured to:

[0210] determining whether a first keyword included in the event description content is a keyword of a preset type; the preset type includes an event question description type;

[0211] if yes, determining that the work order information is valid work order information; and if no, determining that the work order information is invalid work order information.

[0212] In a possible implementation, the processing module 403 is specifically configured to:

[0213] inputting the event description content into a pre-trained error correction model to obtain error-corrected description content output by the error correction model; the error correction model is trained based on preprocessed results of historical work order information;

[0214] The error-corrected description content is input into a pre-trained information extraction model to obtain the standard description content output by the information extraction model; the standard description content includes event question description and event occurrence address, the information extraction model is trained based on the preprocessing result of historical work order information and the first keyword list.

[0215] In a possible implementation, the processing module 403 is further configured to:

[0216] If the standard description content output by the information extraction model does not contain the event occurrence address, determining a user terminal position of outputting the work order information;

[0217] Taking the user terminal position as the event occurrence address.

[0218] The event classification device provided in this embodiment can execute the event classification method provided in the method embodiments, and has similar implementation principles and technical effects, which will not be described here again.

[0219] Figure 5 A hardware schematic diagram of an electronic device provided in an embodiment of the present application is shown in FIG. 5. Figure 5 As shown in FIG. 5, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. The device 50 further includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected through a bus 504.

[0220] In the specific implementation process, the at least one processor 501 executes the computer execution instructions stored in the memory 502, so that the at least one processor 501 executes the method as described above.

[0221] The specific implementation process of the processor 501 can refer to the method embodiments described above, and has similar implementation principles and technical effects, which will not be described here again.

[0222] In the above-described ​ In the embodiments shown in FIG. 5, it should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC) and the like. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the present application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0223] The memory can include a Random Access Memory (RAM) and can also include a Non-volatile Memory (NVM), such as at least one disk memory.

[0224] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.

[0225] The present application also provides a computer readable storage medium, which stores computer execution instructions, and when a processor executes the computer execution instructions, the method described above is realized.

[0226] The readable storage medium described above can be realized by any type of volatile or non-volatile storage device or their combination, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0227] An exemplary readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an Application Specific Integrated Circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the device.

[0228] The division of the units is only a logical functional division, and in actual implementation, there can be another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0229] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0230] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0231] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0232] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0233] The technical solutions of this application have been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it is readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. An event classification method characterized by, The method comprises: obtaining work order information, the work order information comprising event description content; performing first keyword extraction on the event description content to obtain an extraction result, and determining whether the work order information is valid work order information according to the extraction result; if so, performing data processing on the event description content to obtain standard description content corresponding to the work order information; the data processing comprises error correction and / or information extraction; determining an event classification result corresponding to the work order information based on a pre-trained classification model; wherein the classification model is obtained by training based on historical standard description content corresponding to historical work order information; the determination of the event classification result corresponding to the work order information based on the pre-trained classification model comprises: inputting the standard description content into the pre-trained classification model to obtain a primary event type corresponding to the work order information output by the classification model; determining a target secondary event type corresponding to the work order information according to a secondary event type list corresponding to the primary event type; taking the primary event type and the target secondary event type as the event classification result of the work order information; wherein the secondary event type list comprises a plurality of candidate secondary event types, and at least one second keyword corresponding to each candidate secondary event type, the second keywords corresponding to different candidate secondary event types being different, and the target secondary event type corresponding to the work order information being determined according to the second keywords of the candidate secondary event types; the classification model comprises a multi-layer Transformer-XL and a classification head connected to the multi-layer Transformer-XL, and the pre-training of the classification model comprises: obtaining sample data; wherein the sample data comprises historical standard description content corresponding to a plurality of historical work order information respectively, and a label corresponding to each historical standard description content, the label being used to indicate a primary event type corresponding to the historical standard description content; performing pre-adaptive training on the multi-layer Transformer-XL of the classification model based on the sample data, the pre-adaptive training being used to indicate that the parameters of the multi-layer Transformer-XL are updated through minimizing sequence-level contrastive loss or mask language modeling loss, and a curriculum learning mechanism; performing fine-tuning on the updated multi-layer Transformer-XL and the classification head to obtain a trained classification model, the fine-tuning being used to indicate that the parameters of the updated multi-layer Transformer-XL and the classification head are updated through a linear learning rate decay strategy with warm-up and a cross-entropy loss function.

2. The method of claim 1, wherein, the determination of the target secondary event type corresponding to the work order information according to the secondary event type list corresponding to the primary event type comprises: determining the number of second keywords corresponding to each candidate secondary event type contained in the standard description content; determining the proportion of the number and the total number of second keywords corresponding to the candidate secondary event type; The candidate secondary event type with the highest proportion is taken as a target secondary event type corresponding to the work order information.

3. The method of claim 1, wherein, The first keyword extraction is performed on the event description content to obtain an extraction result, including: Each first keyword in a predetermined first keyword list is arranged in descending order of character length to obtain a target first keyword list; Whether each first keyword meets a preset condition is determined based on a greedy strategy according to the arrangement order of each first keyword in the target first keyword list, wherein the preset condition is used to indicate that the first keyword has a matching position in the event description content, and the matching position has no intersection with an occupied position set, and the occupied position set is used to indicate a set of position intervals in the event description content that have been matched to the first keyword. The first keyword meeting the preset condition is taken as the extraction result.

4. The method of claim 3, wherein, The method further includes: determining whether the event description content contains a first keyword of a preset type; the preset type includes an event problem description type; if yes, determining that the work order information is valid work order information; if no, determining that the work order information is invalid work order information.

5. The method of claim 3, wherein, The data processing is performed on the event description content to obtain standard description content corresponding to the work order information, including: The event description content is input into a pre-trained error correction model to obtain error-corrected description content output by the error correction model; the error correction model is trained based on preprocessed results of historical work order information; The error-corrected description content is input into a pre-trained information extraction model to obtain the standard description content output by the information extraction model; the standard description content includes event problem description and event occurrence address, and the information extraction model is trained based on the preprocessed results of the historical work order information and the first keyword list.

6. The method of claim 5, wherein, The method further includes: if the standard description content output by the information extraction model does not contain the event occurrence address, determining a user terminal position outputting the work order information; the user terminal position is taken as the event occurrence address.

7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of claims 1-6.

8. An electronic device, comprising: including: at least one processor and a memory; wherein the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Hotline complaint-to-do collaborative application method and system

    CN119904206A