CN116775867A - Service processing method and device, storage medium and electronic equipment - Google Patents

Service processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN116775867A
CN116775867A CN202310594003.1A CN202310594003A CN116775867A CN 116775867 A CN116775867 A CN 116775867A CN 202310594003 A CN202310594003 A CN 202310594003A CN 116775867 A CN116775867 A CN 116775867A
Authority
CN
China
Prior art keywords
service
text
type
determining
classification model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310594003.1A
Other languages
Chinese (zh)
Inventor
程炎敏
杨明川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Research Institute Of China Telecom Corp ltd
China Telecom Corp Ltd
Original Assignee
Beijing Research Institute Of China Telecom Corp ltd
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Research Institute Of China Telecom Corp ltd, China Telecom Corp Ltd filed Critical Beijing Research Institute Of China Telecom Corp ltd
Priority to CN202310594003.1A priority Critical patent/CN116775867A/en
Publication of CN116775867A publication Critical patent/CN116775867A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure provides a service processing method and apparatus, a storage medium, and an electronic device, and relates to the technical field of natural language processing, where the method includes: acquiring a history service text; the history service text is marked with a service type; according to the historical service text, determining a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type; determining a vectorized service text according to a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type; and training according to the vectorized service text to obtain a service classification model, and determining the service type of the service to be classified. According to the application, the automatic and accurate classification of the service types is realized through machine learning, so that the workload of related workers can be greatly reduced, and the working efficiency is improved.

Description

Service processing method and device, storage medium and electronic equipment
Technical Field
The disclosure relates to the technical field of natural language processing, and in particular relates to a service processing method and device, a storage medium and electronic equipment.
Background
In the process of processing the service, when the staff receives the related service, the service content is recorded into text data, the service is classified manually to reach the standard, and the staff is arranged to process according to different service types. Therefore, it is very important to correctly classify each service in the service processing flow, the current service type classification function is obtained by manually marking by a worker according to service content, the manual workload is large, and the classification result is subjectively influenced by the worker, thereby influencing the accuracy and the processing efficiency of service processing.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure provides a service processing method and device, a storage medium and an electronic device, which at least overcome the problems of low service processing precision and low efficiency in the limit of the related technology to a certain extent.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to one aspect of the present disclosure, there is provided a service processing method, including:
acquiring a history service text; the history service text is marked with a service type;
according to the historical service text, determining a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type;
determining a vectorized service text according to a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type;
and training according to the vectorized service text to obtain a service classification model, and determining the service type of the service to be classified.
In some embodiments, determining a set of word vectors corresponding to a single business text from historical business text includes:
extracting a single business text from the historical business text;
performing Chinese word segmentation on a single service text to determine a Chinese word set;
and carrying out vectorization representation on the Chinese word set, and determining a word vector set corresponding to the single business text.
In some embodiments, determining a keyword set corresponding to each type of service type according to the historical service text includes:
classifying the historical service texts according to service types, splicing the service texts included in each type of service types, and determining long texts corresponding to each type of service types;
performing Chinese word segmentation on the long text corresponding to each type of service type, and determining a service long text word segmentation set;
and extracting keywords in the business long text word segmentation set by using the set threshold value, and determining a keyword set corresponding to each type of business type.
In some embodiments, determining the vectorized business text based on the set of word vectors corresponding to the single business text and the set of keywords corresponding to each type of business comprises:
determining a classification model feature vector set according to the keyword set corresponding to each type of service type;
and determining the vectorized service text according to the similarity between the word vector set corresponding to the single service text and the classification model feature vector set.
In some embodiments, determining the classification model feature vector set according to the keyword set corresponding to each type of service type includes:
combining and de-duplication processing are carried out on keyword sets corresponding to each type of service type, and screened keywords are determined;
and carrying out vectorization representation on the screened keywords, and determining a classification model feature vector set.
In some embodiments, the set of word vectors includes a plurality of word vectors therein; the classification model feature vector set comprises a plurality of feature vectors;
according to the similarity of the word vector set corresponding to the single service text and the classification model feature vector set, determining the vectorized service text comprises the following steps:
the method comprises the steps of taking a first feature vector from a classification model feature vector set, calculating the similarity between the first feature vector and each word vector in a word vector set, and selecting a maximum similarity value as the weight of the first feature vector;
repeatedly taking the residual feature vectors in the feature vector set of the classification model until the feature vector set of the classification model is empty, and determining the weight of the residual feature vector corresponding to each residual feature vector;
determining a weight set according to the weight of the first feature vector and the weight of the residual feature vector;
and determining the vectorized service text according to the weight set and the classification model feature vector set.
In some embodiments, obtaining a service classification model according to vectorized service text training, determining a service type of a service to be classified includes:
training a pre-established classifier model by using the vectorized service text as training data and adopting a machine learning algorithm to determine a service classification model;
and inputting the service to be classified into a service classification model, and determining the service type of the service to be classified.
According to another aspect of the present disclosure, there is also provided a service processing apparatus, including:
the historical service text acquisition module is used for acquiring the historical service text; the history service text is marked with a service type;
the word vector set and keyword set determining module is used for determining a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type according to the historical service text;
the vectorization service text determining module is used for determining vectorization service texts according to word vector sets corresponding to single service texts and keyword sets corresponding to each type of service types;
and the service classification module is used for obtaining a service classification model according to the vectorization service text training and determining the service type of the service to be classified.
According to another aspect of the present disclosure, there is also provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform a service processing method according to any one of the preceding claims via execution of the executable instructions.
According to another aspect of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a service processing method of any one of the above.
According to another aspect of the present disclosure, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements a service processing method of any one of the above.
According to the business processing method, the business processing device, the storage medium and the electronic equipment provided by the embodiment of the disclosure, the keywords corresponding to each type of business type are extracted to obtain the vectorized business text to train the model, and the classification accuracy is greatly improved; the vector business text is constructed by utilizing the word vector set and the keyword set, so that the problem of sparse dimension can be well solved, the dimension of vector space is greatly reduced, the classification speed is high, and the model training cost is reduced; the automatic and accurate classification of the business is realized through machine learning, so that the work load can be greatly reduced, and the work efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
Fig. 1 is a schematic diagram illustrating a system configuration of a service processing method in an embodiment of the disclosure.
Fig. 2 is a schematic diagram of a service processing method in an embodiment of the disclosure.
Fig. 3 is a schematic diagram illustrating a process of determining a set of word vectors in a business processing method according to an embodiment of the disclosure.
Fig. 4 is a schematic diagram illustrating a process of determining a keyword set corresponding to each type of service type in a service processing method according to an embodiment of the disclosure.
Fig. 5 is a schematic diagram illustrating a process of determining a directional quantization service text of a service processing method in an embodiment of the disclosure.
Fig. 6 is a schematic diagram illustrating a process of determining a feature vector set of a classification model in a service processing method according to an embodiment of the disclosure.
Fig. 7 is a schematic diagram illustrating another process of determining directional quantization business text according to one business processing method in an embodiment of the disclosure.
Fig. 8 shows a flowchart of a service processing method in an embodiment of the disclosure.
Fig. 9 shows a schematic diagram of a service processing apparatus in an embodiment of the disclosure.
Fig. 10 is a block diagram illustrating a business processing method according to an embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
The following detailed description of embodiments of the present disclosure refers to the accompanying drawings.
Fig. 1 shows a schematic diagram of an exemplary application system architecture to which a service processing method according to an embodiment of the present disclosure may be applied. As shown in fig. 1, the system architecture may include a terminal device 101, a network 102, and a server 103.
The medium used by the network 102 to provide a communication link between the terminal device 101 and the server 103 may be a wired network or a wireless network.
Alternatively, the wireless network or wired network described above uses standard communication techniques and/or protocols. The network is typically the Internet, but may be any network including, but not limited to, a local area network (Local Area Network, LAN), metropolitan area network (Metropolitan Area Network, MAN), wide area network (Wide Area Network, WAN), mobile, wired or wireless network, private network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including HyperText Mark-up Language (HTML), extensible markup Language (Extensible MarkupLanguage, XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as secure sockets layer (Secure Socket Layer, SSL), transport layer security (Transport Layer Security, TLS), virtual private network (Virtual Private Network, VPN), internet protocol security (Internet ProtocolSecurity, IPsec), etc. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of or in addition to the data communication techniques described above.
The terminal device 101 may be a variety of electronic devices including, but not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, wearable devices, augmented reality devices, virtual reality devices, and the like.
Alternatively, the clients of the applications installed in different terminal devices 101 are the same or clients of the same type of application based on different operating systems. The specific form of the application client may also be different based on the different terminal platforms, for example, the application client may be a mobile phone client, a PC client, etc.
The server 103 may be a server providing various services, such as a background management server providing support for devices operated by the user with the terminal apparatus 101. The background management server can analyze and process the received data such as the request and the like, and feed back the processing result to the terminal equipment.
Optionally, the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
Those skilled in the art will appreciate that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative, and that any number of terminal devices, networks, and servers may be provided as desired. The embodiments of the present disclosure are not limited in this regard.
Under the system architecture described above, a service processing method is provided in the embodiments of the present disclosure, and the method may be executed by any electronic device having computing processing capability.
In some embodiments, a service processing method provided in the embodiments of the present disclosure may be performed by a terminal device of the above system architecture; in other embodiments, a service processing method provided in the embodiments of the present disclosure may be performed by a server in the system architecture described above; in other embodiments, a service processing method provided in the embodiments of the present disclosure may be implemented by a terminal device and a server in the system architecture in an interactive manner.
Fig. 2 is a schematic diagram of a service processing method in an embodiment of the disclosure, and as shown in fig. 2, the service processing method provided in the embodiment of the disclosure includes the following steps:
s202, acquiring a history service text; the history service text is marked with a service type;
s204, determining a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type according to the historical service text;
s206, determining a vectorized service text according to a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type;
s208, obtaining a service classification model according to the vectorization service text training, and determining the service type of the service to be classified.
In the embodiment, the step S202 of obtaining the history service text extracts the history service text from the database, and the history service text is already processed and marked with the service type in the processing process, so that the history service text can be directly used. In another embodiment, after the historical service text is obtained, the method further includes performing data cleaning processing on the historical service text, for example, removing interference data and empty text, so that accuracy of the service classification model can be further improved. In the present disclosure, a business may refer to various types of transactions received by related departments, such as processing alarm condition transactions received by related departments of public security, or processing transactions received by related departments of city management that do not conduct business as specified by the related regulations.
As shown in fig. 3, when the service processing method provided by the embodiment of the present application is implemented, in one embodiment, the determining, by the step S204, a set of word vectors corresponding to a single service text according to a historical service text may include:
s302, extracting a single business text from the historical business text;
s303, performing Chinese word segmentation on a single service text to determine a Chinese word set;
s304, vectorizing the word set to determine the word vector set corresponding to the single business text.
In an embodiment, for processing a single business text, a single business text p is extracted from historical business texts i The method comprises the steps of carrying out a first treatment on the surface of the Wherein, the history service text comprises a plurality of service texts p 1 -p n The method comprises the steps of carrying out a first treatment on the surface of the Wherein p is i ∈p 1 -p n The method comprises the steps of carrying out a first treatment on the surface of the For a single extracted service text p i Performing Chinese word segmentation to obtain a Chinese word set M formed by a plurality of Chinese words, wherein the Chinese word segmentation can adopt a jieba word segmentation tool; then, the word embedding model is utilized to vectorize the Chinese word set M to obtain a single business text p i A corresponding set of word vectors W. Further, extracting other single service texts in the historical service texts continuously to obtain corresponding word vector sets; i.e. one set of word vectors for each single business text. Wherein the word vector set W comprises a plurality of word vectors W 1 -w n
As shown in fig. 4, when the service processing method provided by the embodiment of the present application is implemented, in an embodiment, the determining, by the step S204, a keyword set corresponding to each type of service type according to a history service text may include:
s402, classifying historical service texts according to service types, splicing service texts included in each type of service types, and determining long texts corresponding to each type of service types;
s404, chinese word segmentation is carried out on the long text corresponding to each type of service type, and a service long text word segmentation set is determined;
s406, extracting keywords in the business long text word segmentation set by using the set threshold value, and determining a keyword set corresponding to each type of business type.
In an embodiment, a history service text includes service texts of multiple service types, and the history service text is first classified according to service types to obtain multiple service texts in each service type, and the service texts included in each service type are spliced and integrated to obtain a long text corresponding to each service type; then, chinese word segmentation is carried out on the long text corresponding to each type of service type, and a service long text word segmentation set is obtained; setting a threshold K, extracting keywords in the service long text word segmentation set by using a TextRank algorithm, sequencing according to the occurrence frequency, and taking K keywords in the top ranking as a keyword set corresponding to each type of service type.
As shown in fig. 5, when the service processing method provided by the embodiment of the present application is implemented, in one embodiment, the determining the vectorized service text according to the word vector set corresponding to the single service text and the keyword set corresponding to each type of service type in step S206 may include:
s502, determining a classification model feature vector set according to the keyword set corresponding to each type of service type;
s504, determining the vectorized service text according to the similarity between the word vector set corresponding to the single service text and the classification model feature vector set.
In the embodiment, the semantic relation between words can be well represented by calculating the similarity between the word vector corresponding to the text and the feature vector corresponding to the keyword and selecting the maximum similarity as the feature weight, so that the degree of distinguishing the text is improved.
As shown in fig. 6, when the service processing method provided by the embodiment of the present application is implemented, in an embodiment, the determining, by the step S502, a classification model feature vector set according to a keyword set corresponding to each type of service type may include:
s602, combining and de-duplication processing are carried out on keyword sets corresponding to each type of service type, and screened keywords are determined;
s604, vectorizing the screened keywords to determine a classification model feature vector set.
In the embodiment, after the keyword sets corresponding to the multiple service types are obtained, combining and de-duplication processing are performed on the keyword sets corresponding to each service type, combining repeated keywords, retaining the same keyword, removing the repetition to obtain screened keywords, and then vectorizing the screened keywords by using a word embedding model to obtain a classification model feature vector set S; wherein the classification model feature vector set S comprises a plurality of feature vectors S 1 -s n
As shown in fig. 7, when a service processing method provided by an embodiment of the present application is implemented, in one embodiment, the word vector set includes a plurality of word vectors; the classification model feature vector set comprises a plurality of feature vectors;
according to the similarity of the word vector set corresponding to the single service text and the classification model feature vector set, determining the vectorized service text comprises the following steps:
s702, taking a first feature vector from a classification model feature vector set, calculating the similarity between the first feature vector and each word vector in a word vector set, and selecting the maximum similarity value as the weight of the first feature vector;
s704, repeatedly taking the residual feature vectors in the feature vector set of the classification model until the feature vector set of the classification model is empty, and determining the weight of the residual feature vector corresponding to each residual feature vector;
s706, determining a weight set according to the weight of the first feature vector and the weight of the rest feature vectors;
s708, determining the vectorized service text according to the weight set and the classification model feature vector set.
In the embodiment, when calculating the similarity, the first feature vector S needs to be taken from the feature vector set S of the classification model 1 Calculate the first feature vector s 1 Similarity with each word vector in the word vector set W, selecting the maximum similarity value as the first feature vector s 1 Weight n of (2) 1 The method comprises the steps of carrying out a first treatment on the surface of the Repeatedly executing the above steps, repeatedly taking the residual feature vectors in the classification model feature vector set S until the classification model feature vector set S is empty, and determining each residual feature vector (S 2 -s n ) The weight (n) of the corresponding residual feature vector 2- n n ) The method comprises the steps of carrying out a first treatment on the surface of the Will first feature vector s 1 Weight n of (2) 1 And the weight n of the remaining feature vector 2- n n Summarizing to obtain a weight set N; and determining the vectorized service text according to the weight set N and the classification model feature vector set S.
In an embodiment, when determining the vectorized service text, ns= { n 1 s 1 ,n 2 s 2 ,…,n n s n NS may be employed to represent the vectorized representation of a single business text, i.e., to determine the vectorized business text.
When the service processing method provided by the embodiment of the application is implemented, in one embodiment, a service classification model is obtained according to vectorization service text training, and the service type of the service to be classified is determined, which comprises the following steps:
training a pre-established classifier model by using the vectorized service text as training data and adopting a machine learning algorithm to determine a service classification model;
and inputting the service to be classified into a service classification model, and determining the service type of the service to be classified.
In the embodiment, after the vectorized service text is obtained, a classifier model is built, the vectorized service text is used as training data to train the classifier model, a GBDT (Gradient Boosting Decision Tree, gradient lifting decision tree) algorithm can be adopted to train during training, a service classification model is obtained, then the service to be classified received in real time is input into the trained service classification model, and the service type of the service to be classified is determined.
As shown in fig. 8, the present application further provides a processing flow of a service processing method, for example, the processing of the alarm event transaction received by the relevant departments of public security as a service.
According to specific needs, the alarm situation transaction is divided into four major categories, namely criminal police, public security police, disputed help seeking police and community opinion police, and the four major categories are subdivided according to specific situations to obtain 24 sub-categories, and the 24 sub-categories are used as labels of service types; for the alarm event to be classified, the business classification model trained by the method is utilized to obtain the corresponding subtype, and the method has important guiding significance for arranging corresponding personnel to process.
The processing flow of the application mainly comprises:
s1: acquiring a history service text, wherein the history service text is marked with a corresponding service type;
s2: extracting a single business text from the historical business text;
s3: performing Chinese word segmentation on a single service text to determine a Chinese word set;
s4: vectorizing the word set to determine the word vector set corresponding to the single business text;
s5: classifying the historical service texts according to service types, splicing the service texts included in each type of service types, and determining long texts corresponding to each type of service types;
s6: performing Chinese word segmentation on the long text corresponding to each type of service type by using a Chinese word segmentation tool such as jieba and the like to determine a service long text word segmentation set;
s7: extracting keywords in the business long text word segmentation set by using a set threshold value, and determining a keyword set corresponding to each type of business type;
s8: combining and de-duplication processing are carried out on keyword sets corresponding to each type of service type, vectorization representation is carried out, and a classification model feature vector set is determined;
s9: the method comprises the steps of taking a first feature vector from a classification model feature vector set, calculating the similarity between the first feature vector and each word vector in a word vector set, and selecting a maximum similarity value as the weight of the first feature vector; repeatedly taking the residual feature vectors in the feature vector set of the classification model until the feature vector set of the classification model is empty, and determining the weight of the residual feature vector corresponding to each residual feature vector; determining a weight set according to the weight of the first feature vector and the weight of the residual feature vector;
s10: calculate ns= { n 1 s 1 ,n 2 s 2 ,…,n n s n Determining vectorized service text;
s11: training a pre-established classifier model by using the vectorized service text as training data and adopting a machine learning algorithm to determine a service classification model;
s12: and inputting the service to be classified into a service classification model, and determining the service type of the service to be classified.
According to the application, through extracting a plurality of business category keywords of each category, performing de-duplication and merging, and then taking the keywords as a characteristic set of a classification model, the classification accuracy is greatly improved. The method can well solve the problem of dimensional sparseness, greatly reduces vector space dimensions, has high classification speed and reduces model training cost. By calculating the similarity between the text and the keywords and selecting the maximum similarity as the feature weight, the semantic relationship between the words can be well represented, and the degree of distinguishing the text is improved. Extracting a plurality of category keywords of each category of service, de-duplicating and merging, taking the category keywords as a feature set of a classification model, calculating the similarity between each word and the feature in each service text according to any feature of the feature set of the classification model, selecting the maximum similarity as the weight of the feature, and representing each service by the feature set with the weight to realize vectorization representation of each service text.
It should be noted that, in the technical solution of the present disclosure, the acquiring, storing, using, processing, etc. of data all conform to relevant regulations of national laws and regulations, and various types of data such as personal identity data, operation data, behavior data, etc. relevant to individuals, clients, crowds, etc. acquired in the embodiments of the present disclosure have been authorized.
Based on the same inventive concept, the embodiments of the present disclosure also provide a service processing apparatus, as described in the following embodiments. Since the principle of solving the problem of the embodiment of the device is similar to that of the embodiment of the method, the implementation of the embodiment of the device can be referred to the implementation of the embodiment of the method, and the repetition is omitted.
Fig. 9 is a schematic diagram of a service processing apparatus according to an embodiment of the disclosure, as shown in fig. 9, where the apparatus includes:
a history service text obtaining module 901, configured to obtain a history service text; the history service text is marked with a service type;
a word vector set and keyword set determining module 902, configured to determine, according to the historical service text, a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type;
the vectorization service text determining module 903 is configured to determine a vectorization service text according to a word vector set corresponding to a single service text and a keyword set corresponding to each type of service;
the service classification module 904 is configured to obtain a service classification model according to the vectorized service text training, and determine a service type of a service to be classified.
It should be noted that, the above-mentioned history service text obtaining module 901, word vector set and keyword set determining module 902, vectorized service text determining module 903, and service classifying module 904 correspond to S202 to S208 in the method embodiment, and the above-mentioned modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in the above-mentioned method embodiment. It should be noted that the modules described above may be implemented as part of an apparatus in a computer system, such as a set of computer-executable instructions.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 1000 according to such an embodiment of the present disclosure is described below with reference to fig. 10. The electronic device 1000 shown in fig. 10 is merely an example and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 10, the electronic device 1000 is embodied in the form of a general purpose computing device. Components of electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one memory unit 1020, and a bus 1030 that connects the various system components, including the memory unit 1020 and the processing unit 1010.
Wherein the storage unit stores program code that is executable by the processing unit 1010 such that the processing unit 1010 performs steps according to various exemplary embodiments of the present disclosure described in the above section of the present specification. For example, the processing unit 1010 may perform the following steps of the method embodiment described above:
acquiring a history service text; the history service text is marked with a service type;
according to the historical service text, determining a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type;
determining a vectorized service text according to a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type;
and training according to the vectorized service text to obtain a service classification model, and determining the service type of the service to be classified.
The memory unit 1020 may include readable media in the form of volatile memory units such as Random Access Memory (RAM) 10201 and/or cache memory unit 10202, and may further include Read Only Memory (ROM) 10203.
The storage unit 1020 may also include a program/utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 1030 may be representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1000 can also communicate with one or more external devices 1040 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1000, and/or with any device (e.g., router, modem, etc.) that enables the electronic device 1000 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1050. Also, electronic device 1000 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 over the bus 1030. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with the electronic device 1000, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In particular, according to embodiments of the present disclosure, the process described above with reference to the flowcharts may be implemented as a computer program product comprising: a computer program which, when executed by a processor, implements a business processing method as described above.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium, which may be a readable signal medium or a readable storage medium, is also provided. On which a program product is stored which enables the implementation of the method described above of the present disclosure. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
More specific examples of the computer readable storage medium in the present disclosure may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In this disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Alternatively, the program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In particular implementations, the program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the description of the above embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method for processing a service, comprising:
acquiring a history service text; the history service text is marked with a service type;
according to the historical service text, determining a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type;
determining a vectorized service text according to a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type;
and training according to the vectorized service text to obtain a service classification model, and determining the service type of the service to be classified.
2. The method of claim 1, wherein determining a set of word vectors corresponding to a single business text based on historical business text comprises:
extracting a single business text from the historical business text;
performing Chinese word segmentation on a single service text to determine a Chinese word set;
and carrying out vectorization representation on the Chinese word set, and determining a word vector set corresponding to the single business text.
3. The method for processing services according to claim 1, wherein determining the keyword set corresponding to each type of service according to the historical service text comprises:
classifying the historical service texts according to service types, splicing the service texts included in each type of service types, and determining long texts corresponding to each type of service types;
performing Chinese word segmentation on the long text corresponding to each type of service type, and determining a service long text word segmentation set;
and extracting keywords in the business long text word segmentation set by using the set threshold value, and determining a keyword set corresponding to each type of business type.
4. A business processing method according to claim 3, wherein determining the vectorized business text based on the set of word vectors corresponding to the single business text and the set of keywords corresponding to each type of business comprises:
determining a classification model feature vector set according to the keyword set corresponding to each type of service type;
and determining the vectorized service text according to the similarity between the word vector set corresponding to the single service text and the classification model feature vector set.
5. The method of claim 4, wherein determining a set of classification model feature vectors based on the set of keywords corresponding to each type of service type comprises:
combining and de-duplication processing are carried out on keyword sets corresponding to each type of service type, and screened keywords are determined;
and carrying out vectorization representation on the screened keywords, and determining a classification model feature vector set.
6. The business processing method of claim 4, wherein the set of word vectors includes a plurality of word vectors; the classification model feature vector set comprises a plurality of feature vectors;
according to the similarity of the word vector set corresponding to the single service text and the classification model feature vector set, determining the vectorized service text comprises the following steps:
the method comprises the steps of taking a first feature vector from a classification model feature vector set, calculating the similarity between the first feature vector and each word vector in a word vector set, and selecting a maximum similarity value as the weight of the first feature vector;
repeatedly taking the residual feature vectors in the feature vector set of the classification model until the feature vector set of the classification model is empty, and determining the weight of the residual feature vector corresponding to each residual feature vector;
determining a weight set according to the weight of the first feature vector and the weight of the residual feature vector;
and determining the vectorized service text according to the weight set and the classification model feature vector set.
7. The method for processing services according to claim 1, wherein the step of obtaining a service classification model according to the vectorized service text training, and determining the service type of the service to be classified comprises:
training a pre-established classifier model by using the vectorized service text as training data and adopting a machine learning algorithm to determine a service classification model;
and inputting the service to be classified into a service classification model, and determining the service type of the service to be classified.
8. A service processing apparatus, comprising:
the historical service text acquisition module is used for acquiring the historical service text; the history service text is marked with a service type;
the word vector set and keyword set determining module is used for determining a word vector set corresponding to a single service text and a keyword set corresponding to each type of service type according to the historical service text;
the vectorization service text determining module is used for determining vectorization service texts according to word vector sets corresponding to single service texts and keyword sets corresponding to each type of service types;
and the service classification module is used for obtaining a service classification model according to the vectorization service text training and determining the service type of the service to be classified.
9. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform a service processing method according to any one of claims 1 to 7 via execution of the executable instructions.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements a service processing method according to any of claims 1 to 7.
CN202310594003.1A 2023-05-24 2023-05-24 Service processing method and device, storage medium and electronic equipment Pending CN116775867A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310594003.1A CN116775867A (en) 2023-05-24 2023-05-24 Service processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310594003.1A CN116775867A (en) 2023-05-24 2023-05-24 Service processing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116775867A true CN116775867A (en) 2023-09-19

Family

ID=88009021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310594003.1A Pending CN116775867A (en) 2023-05-24 2023-05-24 Service processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116775867A (en)

Similar Documents

Publication Publication Date Title
US20210073473A1 (en) Vector Representation Based on Context
CN111709240A (en) Entity relationship extraction method, device, equipment and storage medium thereof
WO2022048363A1 (en) Website classification method and apparatus, computer device, and storage medium
CN113141360B (en) Method and device for detecting network malicious attack
CN113986864A (en) Log data processing method and device, electronic equipment and storage medium
CN112925914B (en) Data security grading method, system, equipment and storage medium
US20230092274A1 (en) Training example generation to create new intents for chatbots
US20220391598A1 (en) Text checking method based on knowledge graph, electronic device, and medium
CN111368551A (en) Method and device for determining event subject
CN111797204A (en) Text matching method and device, computer equipment and storage medium
CN111190967B (en) User multidimensional data processing method and device and electronic equipment
CN112468658A (en) Voice quality detection method and device, computer equipment and storage medium
CN110929499B (en) Text similarity obtaining method, device, medium and electronic equipment
CN115758211B (en) Text information classification method, apparatus, electronic device and storage medium
CN116502147A (en) Training method of anomaly detection model and related equipment
CN115221892B (en) Work order data processing method and device, storage medium and electronic equipment
US20230004715A1 (en) Method and apparatus for constructing object relationship network, and electronic device
US12014142B2 (en) Machine learning for training NLP agent
CN116775867A (en) Service processing method and device, storage medium and electronic equipment
CN114925757A (en) Multi-source threat intelligence fusion method, device, equipment and storage medium
CN112989817A (en) Automatic auditing method for meteorological early warning information
CN114971744B (en) User portrait determination method and device based on sparse matrix
EP4109323A2 (en) Method and apparatus for identifying instruction, and screen for voice interaction
CN117294500A (en) Method, device, equipment and storage medium for constructing network security dictionary data set
CN115545015A (en) Method, device, medium and equipment for identifying counterfeit account

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination