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

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

Info

Publication number
CN111309876A
CN111309876A CN201811519890.1A CN201811519890A CN111309876A CN 111309876 A CN111309876 A CN 111309876A CN 201811519890 A CN201811519890 A CN 201811519890A CN 111309876 A CN111309876 A CN 111309876A
Authority
CN
China
Prior art keywords
vocabulary
matched
statement
request
statement template
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
CN201811519890.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 Didi Infinity Technology and Development Co Ltd
Original Assignee
Beijing Didi Infinity Technology and Development Co 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 Didi Infinity Technology and Development Co Ltd filed Critical Beijing Didi Infinity Technology and Development Co Ltd
Priority to CN201811519890.1A priority Critical patent/CN111309876A/en
Publication of CN111309876A publication Critical patent/CN111309876A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The application provides a service request processing method and device, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the steps of obtaining a service request, wherein the service request comprises a statement to be processed; analyzing the statement to be processed to obtain a statement template to be matched; matching the statement template to be matched with a preset statement template stored in a database to obtain a target operation intention corresponding to the successfully matched preset statement template, wherein the preset statement template is created for a user in a self-defined manner in advance; and awakening the corresponding service according to the target operation intention. According to the embodiment of the invention, the sentence template to be matched is matched with the preset sentence template to obtain the target operation intention, so that the corresponding service is awakened according to the operation intention.

Description

Service request processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a service request, an electronic device, and a storage medium.
Background
With the development of mobile intelligent terminals and information network technologies, people use voice interactive applications in more and more scenes. For example, a voice interactive application such as weather/stock/music/traffic condition/alarm/reminder is used by using a smart speaker as an entrance through voice interaction. Each voice interaction application is also referred to as a semantic skill. For another example, with the car mounted device as an entrance, the voice interaction uses semantic skills such as LBS/navigation/radio/music. Based on the above requirements, more and more conversational artificial intelligence open platforms are appearing in the industry, so as to provide a platform capable of developing semantic skills for skill developers.
In the related art, semantic skills are usually created by a skill developer through a conversational artificial intelligence open platform in a code writing mode. However, since different users have different speaking habits, the recognition device may not match the query corpus to the target service after the user inputs the query corpus, or the matched target service is wrong.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide a method, an electronic device, and a storage medium for processing a service request, where a statement template to be matched is obtained by parsing a statement to be processed, the statement template to be matched is matched with a preset statement template to obtain a target operation intention, and then a corresponding service is awakened according to the target operation intention, so that a statement to be processed of a user can be matched according to the preset statement template defined by the user, and accuracy of matching is improved.
According to one aspect of the present application, an electronic device is provided that may include one or more storage media and one or more processors in communication with the storage media. One or more storage media store machine-readable instructions executable by a processor. When the electronic device is operated, the processor communicates with the storage medium through the bus, and the processor executes the machine readable instructions to perform one or more of the following operations:
acquiring a service request, wherein the service request comprises a statement to be processed;
analyzing the statement to be processed to obtain a statement template to be matched;
matching the statement template to be matched with a preset statement template stored in a database to obtain a target operation intention corresponding to the successfully matched preset statement template, wherein the preset statement template is created for a user in a self-defined manner in advance;
and awakening the corresponding service according to the target operation intention.
The embodiment of the invention analyzes the sentence to be processed to obtain the sentence template to be matched, and then matches the sentence template with the preset sentence template to obtain the target operation intention, so that the corresponding service is awakened according to the operation intention.
In some embodiments, before obtaining the service request, the method further comprises:
acquiring a service skill adding request, and creating a service skill corresponding to the service skill adding request;
receiving an operation intention corresponding to the service skill, and storing the operation intention;
receiving a question sentence corresponding to the operation intention, and storing the question sentence; the question sentence comprises at least one entry name;
receiving a word list establishing request, and establishing a word list according to the word list establishing request; the vocabulary creation request includes a vocabulary name, at least one vocabulary entry name corresponding to the vocabulary name, and a vocabulary entry name similar to the vocabulary entry name.
According to the embodiment of the invention, the user creates and stores the skills, the intentions, the question sentences and the word list in advance, the configuration can be carried out according to the self requirements and the self expression habits, and developers are not required to write codes, so that the development cost is greatly reduced.
In some embodiments, the receiving a question sentence corresponding to the operation intention and storing the question sentence includes:
receiving a question sentence corresponding to the operation intention, analyzing the question sentence, and obtaining a vocabulary entry name corresponding to the question sentence;
judging whether the entry name is a universal word or not, and if so, labeling the entry name;
and storing the question sentences, the labeled entry names and the corresponding word list names of the entry names.
According to the embodiment of the invention, the entry names of the universal words are labeled, so that the labeled entry names can be replaced by other entry names in the same word list, and the generalization capability is improved.
In some embodiments, the receiving a vocabulary creation request and performing vocabulary creation according to the vocabulary creation request includes:
receiving the word list establishing request, and acquiring a corresponding user level according to the word list establishing request;
and judging whether the number of the created word lists reaches a preset threshold value or not according to the user level, and if not, creating the word lists according to the word list creating request.
According to the embodiment of the invention, the corresponding preset threshold value is set according to the user level, so that the maximum number of word lists which can be created by users of different user levels is different, and the differentiation of the users is embodied.
In some embodiments, the parsing the to-be-processed statement to obtain a to-be-matched statement template includes:
analyzing the sentence to be processed by utilizing a Natural Language Understanding (NLU) technology to obtain a term name in the sentence to be processed;
acquiring entry names matched with the entry names in the sentences to be processed from the created word list;
and generating the corresponding statement template to be matched according to the successfully matched entry name.
The embodiment of the invention analyzes the sentence to be processed by the NLU technology to obtain the sentence template to be matched, and then matches the sentence template to be matched with the preset sentence template to obtain the target operation intention, so that the corresponding service is awakened according to the operation intention.
In some embodiments, the matching the statement template to be matched with a preset statement template stored in a database to obtain a target operation intention corresponding to the successfully matched preset statement template includes:
matching the statement template to be matched with preset statement templates stored in a database to obtain a matching value of the statement template to be matched and each preset statement template in the database;
and taking the preset statement template corresponding to the maximum matching value as a target statement template, and acquiring a target operation intention corresponding to the target statement template.
In the embodiment of the invention, when a plurality of preset statement templates in the database are matched with the statement template to be matched, the statement template with the highest matching degree is selected as the target statement template, so that the matching accuracy is ensured.
In some embodiments, after obtaining the service request, the method further comprises:
and acquiring the virtual words and the characters in the sentence to be processed, and deleting the virtual words and the characters.
According to the embodiment of the invention, the sentence to be processed is preprocessed before the sentence to be processed is analyzed, and words or characters without substantial meaning are removed, so that the interference of useless words can be reduced, and the matching accuracy is improved.
In another aspect, an embodiment of the present invention provides a device for processing a service request, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a service request which comprises a statement to be processed;
the analysis module is used for analyzing the statement to be processed to obtain a statement template to be matched;
the matching module is used for matching the statement template to be matched with a preset statement template stored in a database to obtain a target operation intention corresponding to the successfully matched preset statement template, and the preset statement template is created for a user in a self-defining mode in advance;
and the execution module is used for awakening the corresponding service according to the target operation intention.
In some embodiments, the apparatus further comprises:
the skill creating module is used for acquiring a service skill adding request and creating a service skill corresponding to the service skill adding request;
the intention creating module is used for receiving the operation intention corresponding to the service skill and storing the operation intention;
the sentence creating module is used for receiving the question sentences corresponding to the operation intentions and storing the question sentences; the question sentence comprises at least one entry name;
the vocabulary creating module is used for receiving a vocabulary creating request and creating a vocabulary according to the vocabulary creating request; the vocabulary creation request includes a vocabulary name, at least one vocabulary entry name corresponding to the vocabulary name, and a vocabulary entry name similar to the vocabulary entry name.
In some embodiments, the statement creation module is specifically configured to:
receiving a question sentence corresponding to the operation intention, analyzing the question sentence, and obtaining a vocabulary entry name corresponding to the question sentence;
judging whether the entry name is a universal word or not, and if so, labeling the entry name;
and storing the question sentences, the labeled entry names and the corresponding word list names of the entry names.
In some embodiments, the vocabulary creating module is specifically configured to:
receiving the word list establishing request, and acquiring a corresponding user level according to the word list establishing request;
and judging whether the number of the created word lists reaches a preset threshold value or not according to the user level, and if not, creating the word lists according to the word list creating request.
In some embodiments, the parsing module is specifically configured to:
analyzing the sentence to be processed by utilizing a Natural Language Understanding (NLU) technology to obtain a term name in the sentence to be processed;
acquiring entry names matched with the entry names in the sentences to be processed from the created word list;
and generating the corresponding statement template to be matched according to the successfully matched entry name.
In some embodiments, the matching module is specifically configured to:
matching the statement template to be matched with preset statement templates stored in a database to obtain a matching value of the statement template to be matched and each preset statement template in the database;
and taking the preset statement template corresponding to the maximum matching value as a target statement template, and acquiring a target operation intention corresponding to the target statement template.
In some embodiments, the apparatus further comprises:
and the preprocessing module is used for acquiring the virtual words and the characters in the sentences to be processed and deleting the virtual words and the characters.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 is a schematic diagram of exemplary hardware and software components of an electronic device provided by an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for processing a service request according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of service skill creation provided by an embodiment of the invention;
FIG. 4 is a schematic diagram of an operation of the present invention;
FIG. 5 is a schematic diagram of a question and sentence creation interface provided by an embodiment of the present invention;
FIG. 6 is a diagram illustrating a vocabulary operating interface according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a vocabulary adding interface according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a test interface provided in an embodiment of the present invention;
FIG. 9 is a schematic diagram of a test interface provided in an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a device for processing a service request according to an embodiment of the present invention.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a schematic diagram of exemplary hardware and software components of an electronic device provided by an embodiment of the present invention, as shown in fig. 1.
The electronic device 100 may be a general-purpose computer or a special-purpose computer, both of which may be used to implement the service request processing method of the present application. Although only a single computer is shown, for convenience, the functions described herein may be implemented in a distributed fashion across multiple similar platforms to balance processing loads.
For example, the electronic device 100 may include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and a storage medium 140 of different form, such as a disk, ROM, or RAM, or any combination thereof. Illustratively, the computer platform may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application may be implemented in accordance with these program instructions. The electronic device 200 also includes an Input/Output (I/O) interface 150 between the computer and other Input/Output devices (e.g., keyboard, display screen).
For ease of illustration, only one processor is depicted in electronic device 100. However, it should be noted that the electronic device 100 in the present application may also comprise a plurality of processors, and thus the steps performed by one processor described in the present application may also be performed by a plurality of processors in combination or individually. For example, if the processor of the electronic device 100 executes steps a and B, it should be understood that steps a and B may also be executed by two different processors together or separately in one processor. For example, a first processor performs step a and a second processor performs step B, or the first processor and the second processor perform steps a and B together.
Because the sentence input by the user is fixed in the device for providing the voice interaction application in the prior art, when the user inputs a sentence with the same meaning but different expression modes, the device cannot perform recognition and further cannot operate corresponding service, so that the problem that the corresponding service cannot be started through the sentence is caused. Therefore, an embodiment of the present invention provides a method for processing a service request, which includes:
fig. 2 is a schematic flow chart of a method for processing a service request according to an embodiment of the present invention, as shown in fig. 2, the method includes:
step 201: obtaining a service request, wherein the service request comprises a statement to be processed.
In a specific implementation process, a user sends a service request to a processing device through a smart sound box, so that the processing device obtains the service request, wherein the service request comprises a statement to be processed. The user can send voice to the intelligent sound box, the voice is the service request, and the intelligent sound box receives the voice of the user and sends the voice to the processing device. It should be noted that the service request may further include information such as an identifier of the user, and the processing device may obtain information such as a corresponding preset sentence template, configured service skill, operation intention, question sentence, and word list through the identifier of the user. The sentence to be processed in the service request acquired by the processing device may be character information input by the user.
Step 202: and analyzing the statement to be processed to obtain a statement template to be matched.
In a specific implementation process, after acquiring a to-be-processed sentence, the processing device parses the to-be-processed sentence, wherein a natural language understanding NLU technology can be adopted for parsing, and the NLU technology includes a plurality of fields such as sentence detection, word segmentation, part of speech tagging, syntactic analysis, text classification/clustering, character angles, information extraction/automatic summarization, machine translation, automatic question answering, text generation and the like. The goal of NLU technology is to convert textual information into a semantic representation that can be machine processed. Because the same meaning can be expressed in many different ways, it is not important for a machine to understand the exact meaning of each word in a sentence, and it is important to understand the meaning of the expression of the sentence. For example: temporary cleaning in the morning of the weekdays can be reserved, so that aunt can be helped to call a home administration and want to find a clock to work for cleaning in the home. The three words are completely different in the aspect of words, but express similar meanings, namely that a user wants to reserve a door cleaning service. Therefore, the to-be-processed sentence sent by the user needs to be analyzed, a word with an actual meaning in the to-be-processed sentence is obtained, and then the obtained actual meaning word is generated into the to-be-matched sentence template.
Step 203: and matching the statement template to be matched with a preset statement template stored in a database to obtain a target operation intention corresponding to the successfully matched preset statement template, wherein the preset statement template is created for a user in a self-defined manner in advance.
In a specific implementation process, after the processing device obtains the statement template to be matched, the statement template to be matched is matched with the preset statement templates stored in the database, wherein the preset statement templates in the database are pre-configured and stored for a user, the preset statement templates may include a plurality of templates, and each preset statement template corresponds to one operation intention. It should be noted that a service skill may include a plurality of operational intents, such as: the service skill is music, and the corresponding operation intention is a language expression for the user to perform corresponding operation for each service skill, which may be: "i want to listen to a song", "who and who do you want to listen to a song", etc.
Step 204: and awakening the corresponding service according to the target operation intention.
In a specific implementation process, after the processing device obtains the target operation intention, the processing device may find a corresponding service skill according to the target operation intention, and wake up a service corresponding to the service skill. For example: the target operation intention is 'I want to listen to songs', the service skill is music, and the processing device can open an application program of the music at the moment. For another example: the target operation intention is that the user wants to go to Beijing, the corresponding service skill is navigation, at the moment, the processing device opens a navigation application program, plans a route by taking the current position as an origin and the Beijing as a destination, and gives a recommended driving route.
The embodiment of the invention analyzes the sentence to be processed by the NLU technology to obtain the sentence template to be matched, and then matches the sentence template to be matched with the preset sentence template to obtain the target operation intention, so that the corresponding service is awakened according to the operation intention.
On the basis of the above embodiment, before obtaining the service request, the embodiment of the present invention further provides an adaptation method for service skills, operational intentions, question sentences and vocabularies, including:
and acquiring a service skill adding request, and creating a service skill corresponding to the service skill adding request.
In a specific implementation process, the processing device provides a configuration interface for a user to match, the user can click an icon for creating a service skill in the configuration interface, at this time, the processing device knows that the user wants to create a service skill, pops up an input box of a name of the service skill, the user can input a name corresponding to the skill to be created in the input box, the name may be english and/or chinese, fig. 3 is a schematic diagram for creating the service skill provided by the embodiment of the present invention, as shown in fig. 3, the user can further perform a re-editing or deleting operation on the created service, if the user selects the re-editing, a corresponding editing popup window pops up, and if the user selects the deleting operation, a query window for confirming whether to delete is popped up for the user to confirm.
Receiving an operation intention corresponding to the service skill, and storing the operation intention;
in a specific implementation process, after a service skill is created, an operation intention may be added to the created service skill, that is, a user may click on an edit in a configuration interface of the service skill and then add the operation intention, fig. 4 is an operation intention diagram provided by an embodiment of the present invention, as shown in fig. 4, an operation intention under a corresponding service skill may be added to a configuration page of fig. 4, for example: the service skill is weather query, the operation intentions of the service skill can be 'query local weather', 'query local air instruction', and 'query specified place weather', and each operation intention corresponds to an intention name, an intention description, a questioning corpus, a slot position and an operation. The query corpus is the number of query corpuses in the operation intention, the slot position is the position information in the word list, the operation includes editing and deleting, and after the user selects the editing function, the corresponding query sentence adding interface can be accessed.
Receiving a question sentence corresponding to the operation intention, and storing the question sentence; the question sentence comprises at least one entry name.
In a specific implementation process, after a user selects an editing function in an operation intention interface, the user may jump to a question sentence creation interface, fig. 5 is a schematic view of the question sentence creation interface provided in the embodiment of the present invention, and as shown in fig. 5, the user may add a question sentence in the question sentence creation interface, and may also set a slot in a vocabulary related to the question sentence and a vocabulary where the slot is located, and it may be understood that different vocabulary entry names are stored in different slots.
It should be noted that if there are representative words such as time, name of person, and place name in the question sentence stored in the database, the system will automatically label them, and the labeled words can be replaced by general words, for example, if "date" is labeled, then "date" can be replaced by any time, so as to improve generalization ability. The method can be used for recognizing through a Named Entity Recognition (NER) model based on statistics and rules in the NLU technology, the NER model is trained in advance, and various representative words can be recognized through the algorithm.
Receiving a word list establishing request, and establishing a word list according to the word list establishing request; the vocabulary creation request includes a vocabulary name, at least one vocabulary entry name corresponding to the vocabulary name, and a vocabulary entry name similar to the vocabulary entry name.
In a specific implementation process, fig. 6 is a schematic diagram of a vocabulary operation interface provided by an embodiment of the present invention, and fig. 7 is a schematic diagram of a vocabulary addition interface provided by an embodiment of the present invention, as shown in fig. 6 and fig. 7, a vocabulary function of the left side column of the interface is triggered to enter the vocabulary operation interface, a vocabulary, an edit vocabulary, and a delete vocabulary can be added to the vocabulary operation interface, if a new vocabulary is to be created by a user, a vocabulary addition function can be triggered to jump to the interface shown in fig. 7, a vocabulary name under a chinese city (china) vocabulary can be added to the interface, and a vocabulary name similar to the vocabulary name of the vocabulary can be added. For example: the term names included under the vocabulary may include: beijing, Shanghai, Guangzhou, etc., similar to Beijing with the entry names including: capital, emperor, etc.
After all service skills, operation intentions, question statements and word lists are configured, the configured processing device can be tested, fig. 8 is a test interface schematic diagram provided by the embodiment of the invention, as shown in fig. 8, a test box can be displayed on the right side of the interface by triggering skill regulation and control of the left side column of fig. 8, the test box comprises a dialog box and a response box, a user can ask a question in the dialog box, and the processing device responds to the question statements according to the configured content.
Fig. 9 is a schematic view of a test interface provided by an embodiment of the present invention, as shown in fig. 9, when a user inputs "today's day of the week? "the system will broadcast the operation intention, date, etc. associated with the question sentence.
It should be noted that, when performing service skill creation, operation intention addition, and word list addition, the processing device may pop up a secondary verification window to ask the user to confirm a corresponding operation, such as deleting a word, saving a page, and the like.
According to the embodiment of the invention, the user creates and stores the skills, the intentions, the question sentences and the word list in advance, the configuration can be carried out according to the self requirements and the self expression habits, and developers are not required to write codes, so that the development cost is greatly reduced.
On the basis of any of the above embodiments, the receiving a vocabulary creation request and performing vocabulary creation according to the vocabulary creation request includes:
receiving the word list establishing request, and acquiring a corresponding user level according to the word list establishing request;
and judging whether the number of the created word lists reaches a preset threshold value or not according to the user level, and if not, creating the word lists according to the word list creating request.
In a specific implementation process, after receiving a vocabulary creation request to a processing device, the vocabulary creation request may include a user identifier, where the user identifier is used to indicate which user the user is, and therefore, the user identifier may be account information when the user registers, or other information capable of uniquely indicating the user, and the user rank of the user is obtained according to the user identifier, where the maximum number of vocabularies that can be created by different user ranks is different, and may be that the higher the user rank is, the greater the number of vocabularies that can be created is. Therefore, the processing device needs to determine whether the number of word lists created by the user reaches a preset threshold according to the user identification, if not, the user can create word lists, and if the number of word lists reaches the preset threshold, the user cannot create word lists.
According to the embodiment of the invention, the corresponding preset threshold value is set according to the user level, so that the maximum number of the user with different user levels capable of creating the word list is different, and the differentiation of the users is embodied.
On the basis of any of the above embodiments, the analyzing the to-be-processed sentence to obtain a to-be-matched sentence template includes:
analyzing the sentence to be processed by utilizing a Natural Language Understanding (NLU) technology to obtain a term name in the sentence to be processed;
acquiring entry names matched with the entry names in the sentences to be processed from the created word list;
and generating the corresponding statement template to be matched according to the successfully matched entry name.
In a specific implementation process, after receiving a to-be-processed statement sent by a user, a processing device analyzes the to-be-processed statement by the NLU technology to obtain an entry name in the to-be-processed statement. It should be noted that before parsing is performed by using the NLU technology, dummy words and characters in the sentence to be processed may be deleted in advance, and then word segmentation and other processing are performed by using the NLU technology to obtain the entry name.
And the processing device extracts corresponding slot position information according to the obtained entry names, and can obtain the entry names matched with the obtained entry names in the word list as the slot position information corresponds to the word list, and generate corresponding statement templates to be matched according to the successfully matched entry names.
The embodiment of the invention analyzes the sentence to be processed by the NLU technology to obtain the sentence template to be matched, and then matches the sentence template to be matched with the preset sentence template to obtain the target operation intention, so that the corresponding service is awakened according to the operation intention.
On the basis of any one of the above embodiments, the matching the statement template to be matched with the preset statement template stored in the database to obtain the target operation intention corresponding to the successfully matched preset statement template includes:
matching the statement template to be matched with preset statement templates stored in a database to obtain a matching value of the statement template to be matched and each preset statement template in the database;
and taking the preset statement template corresponding to the maximum matching value as a target statement template, and acquiring a target operation intention corresponding to the target statement template.
In a specific implementation process, after a statement template to be matched is generated, the statement template to be matched is matched with a preset statement template stored in a database in advance, wherein the preset statement template is configured by a user in advance and can be a plurality of templates. When matching is performed, the statement template to be matched can be matched with each preset statement template respectively, so that the matching degree between the statement template to be matched and each preset statement template is obtained. The larger the matching degree is, the more similar the statement template to be matched and the preset statement template is proved to be, so that the preset statement template with the maximum matching degree is used as the target statement template, and then the target operation intention corresponding to the target statement template is obtained.
It should be noted that all the matching degrees may also be sorted, and from the maximum value, the preset statement templates corresponding to a preset number of matching degrees are taken as the target statement templates, so that the preset number of target operation intents can be obtained.
It should also be noted that, if the question statement is the original data of the processing device, the original data is directly output as a result; if the question sentence is configured by the user, outputting a final result in a matching and calling mode; if the two conditions of the tested sentences do not belong to the same condition, the result cannot be output.
Furthermore, if there are multiple semantic sentences, they will be classified first, for example, the input sentence is "i want to go to junior", "junior" may be navigation skills, and may also be music skills, so two results will be obtained. In this case, the system will use both results (i.e. navigation-like versus music-like) to match against the data in the database.
In the embodiment of the invention, when a plurality of preset statement templates in the database are matched with the statement template to be matched, the statement template with the highest matching degree is selected as the target statement template, so that the matching accuracy is ensured.
Fig. 10 is a schematic structural diagram of a processing device for a service request according to an embodiment of the present invention, and as shown in fig. 10, functions implemented by the processing device correspond to steps executed by the foregoing method. The processing device may be understood as the server or the processor of the server, or may be understood as a component which is independent from the server or the processor and realizes the functions of the present application under the control of the server, and the processing device includes: an obtaining module 1001, a parsing module 1002, a matching module 1003 and an executing module 1004, wherein,
the obtaining module 1001 is configured to obtain a service request, where the service request includes a to-be-processed statement; the analysis module 1002 is configured to analyze the statement to be processed to obtain a statement template to be matched; the matching module 1003 is configured to match the statement template to be matched with a preset statement template stored in a database, so as to obtain a target operation intention corresponding to the successfully matched preset statement template, where the preset statement template is created by a user in a self-defined manner in advance; the executing module 1004 is configured to wake up the corresponding service according to the target operation intention.
On the basis of the above embodiment, the apparatus further includes:
the skill creating module is used for acquiring a service skill adding request and creating a service skill corresponding to the service skill adding request;
the intention creating module is used for receiving the operation intention corresponding to the service skill and storing the operation intention;
the sentence creating module is used for receiving the question sentences corresponding to the operation intentions and storing the question sentences; the question sentence comprises at least one entry name;
the vocabulary creating module is used for receiving a vocabulary creating request and creating a vocabulary according to the vocabulary creating request; the vocabulary creation request includes a vocabulary name, at least one vocabulary entry name corresponding to the vocabulary name, and a vocabulary entry name similar to the vocabulary entry name.
On the basis of any of the above embodiments, the statement creation module is specifically configured to:
receiving a question sentence corresponding to the operation intention, analyzing the question sentence, and obtaining a vocabulary entry name corresponding to the question sentence;
judging whether the entry name is a universal word or not, and if so, labeling the entry name;
and storing the question sentences, the labeled entry names and the corresponding word list names of the entry names.
On the basis of any of the above embodiments, the vocabulary creating module is specifically configured to:
receiving the word list establishing request, and acquiring a corresponding user level according to the word list establishing request;
and judging whether the number of the created word lists reaches a preset threshold value or not according to the user level, and if not, creating the word lists according to the word list creating request.
On the basis of any of the above embodiments, the parsing module is specifically configured to:
analyzing the sentence to be processed by utilizing a Natural Language Understanding (NLU) technology to obtain a term name in the sentence to be processed;
acquiring entry names matched with the entry names in the sentences to be processed from the created word list;
and generating the corresponding statement template to be matched according to the successfully matched entry name.
On the basis of any of the above embodiments, the matching module is specifically configured to:
matching the statement template to be matched with preset statement templates stored in a database to obtain a matching value of the statement template to be matched and each preset statement template in the database;
and taking the preset statement template corresponding to the maximum matching value as a target statement template, and acquiring a target operation intention corresponding to the target statement template.
On the basis of any one of the above embodiments, the apparatus further includes:
and the preprocessing module is used for acquiring the virtual words and the characters in the sentences to be processed and deleting the virtual words and the characters.
The modules may be connected or in communication with each other via a wired or wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may comprise a connection over a LAN, WAN, bluetooth, ZigBee, NFC, or the like, or any combination thereof. Two or more modules may be combined into a single module, and any one module may be divided into two or more units.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (16)

1. A method for processing a service request, comprising:
acquiring a service request, wherein the service request comprises a statement to be processed;
analyzing the statement to be processed to obtain a statement template to be matched;
matching the statement template to be matched with a preset statement template stored in a database to obtain a target operation intention corresponding to the successfully matched preset statement template, wherein the preset statement template is created for a user in a self-defined manner in advance;
and awakening the corresponding service according to the target operation intention.
2. The method of claim 1, wherein prior to obtaining the service request, the method further comprises:
acquiring a service skill adding request, and creating a service skill corresponding to the service skill adding request;
receiving an operation intention corresponding to the service skill, and storing the operation intention;
receiving a question sentence corresponding to the operation intention, and storing the question sentence; the question sentence comprises at least one entry name;
receiving a word list establishing request, and establishing a word list according to the word list establishing request; the vocabulary creation request includes a vocabulary name, at least one vocabulary entry name corresponding to the vocabulary name, and a vocabulary entry name similar to the vocabulary entry name.
3. The method according to claim 2, wherein the receiving a question sentence corresponding to the operation intention and storing the question sentence comprises:
receiving a question sentence corresponding to the operation intention, analyzing the question sentence, and obtaining a vocabulary entry name corresponding to the question sentence;
judging whether the entry name is a universal word or not, and if so, labeling the entry name;
and storing the question sentences, the labeled entry names and the corresponding word list names of the entry names.
4. The method of claim 2, wherein receiving a vocabulary creation request and performing vocabulary creation based on the vocabulary creation request comprises:
receiving the word list establishing request, and acquiring a corresponding user level according to the word list establishing request;
and judging whether the number of the created word lists reaches a preset threshold value or not according to the user level, and if not, creating the word lists according to the word list creating request.
5. The method of claim 2, wherein the parsing the to-be-processed sentence to obtain a to-be-matched sentence template comprises:
analyzing the sentence to be processed by utilizing a Natural Language Understanding (NLU) technology to obtain a term name in the sentence to be processed;
acquiring entry names matched with the entry names in the sentences to be processed from the created word list;
and generating the corresponding statement template to be matched according to the successfully matched entry name.
6. The method according to claim 1, wherein the matching the statement template to be matched with a preset statement template stored in a database to obtain a target operation intention corresponding to the successfully matched preset statement template comprises:
matching the statement template to be matched with preset statement templates stored in a database to obtain a matching value of the statement template to be matched and each preset statement template in the database;
and taking the preset statement template corresponding to the maximum matching value as a target statement template, and acquiring a target operation intention corresponding to the target statement template.
7. The method according to any of claims 1-6, wherein after obtaining the service request, the method further comprises:
and acquiring the virtual words and the characters in the sentence to be processed, and deleting the virtual words and the characters.
8. An apparatus for processing a service request, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a service request which comprises a statement to be processed;
the analysis module is used for analyzing the statement to be processed to obtain a statement template to be matched;
the matching module is used for matching the statement template to be matched with a preset statement template stored in a database to obtain a target operation intention corresponding to the successfully matched preset statement template, and the preset statement template is created for a user in a self-defining mode in advance;
and the execution module is used for awakening the corresponding service according to the target operation intention.
9. The apparatus of claim 8, further comprising:
the skill creating module is used for acquiring a service skill adding request and creating a service skill corresponding to the service skill adding request;
the intention creating module is used for receiving the operation intention corresponding to the service skill and storing the operation intention;
the sentence creating module is used for receiving the question sentences corresponding to the operation intentions and storing the question sentences; the question sentence comprises at least one entry name;
the vocabulary creating module is used for receiving a vocabulary creating request and creating a vocabulary according to the vocabulary creating request; the vocabulary creation request includes a vocabulary name, at least one vocabulary entry name corresponding to the vocabulary name, and a vocabulary entry name similar to the vocabulary entry name.
10. The apparatus according to claim 9, wherein the sentence creation module is specifically configured to:
receiving a question sentence corresponding to the operation intention, analyzing the question sentence, and obtaining a vocabulary entry name corresponding to the question sentence;
judging whether the entry name is a universal word or not, and if so, labeling the entry name;
and storing the question sentences, the labeled entry names and the corresponding word list names of the entry names.
11. The apparatus of claim 9, wherein the vocabulary creation module is specifically configured to:
receiving the word list establishing request, and acquiring a corresponding user level according to the word list establishing request;
and judging whether the number of the created word lists reaches a preset threshold value or not according to the user level, and if not, creating the word lists according to the word list creating request.
12. The apparatus of claim 9, wherein the parsing module is specifically configured to:
analyzing the statement to be processed by utilizing an NLU technology to obtain a term name in the statement to be processed;
acquiring entry names matched with the entry names in the sentences to be processed from the created word list;
and generating the corresponding statement template to be matched according to the successfully matched entry name.
13. The apparatus of claim 8, wherein the matching module is specifically configured to:
matching the statement template to be matched with preset statement templates stored in a database to obtain a matching value of the statement template to be matched and each preset statement template in the database;
and taking the preset statement template corresponding to the maximum matching value as a target statement template, and acquiring a target operation intention corresponding to the target statement template.
14. The apparatus of any one of claims 8-13, further comprising:
and the preprocessing module is used for acquiring the virtual words and the characters in the sentences to be processed and deleting the virtual words and the characters.
15. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the method of processing a service request according to any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of processing a service request according to any one of claims 1 to 7.
CN201811519890.1A 2018-12-12 2018-12-12 Service request processing method and device, electronic equipment and storage medium Pending CN111309876A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811519890.1A CN111309876A (en) 2018-12-12 2018-12-12 Service request processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811519890.1A CN111309876A (en) 2018-12-12 2018-12-12 Service request processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111309876A true CN111309876A (en) 2020-06-19

Family

ID=71159820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811519890.1A Pending CN111309876A (en) 2018-12-12 2018-12-12 Service request processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111309876A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111950300A (en) * 2020-07-22 2020-11-17 广州朗国电子科技有限公司 Translation management method and device for universal software entries, storage medium and server
CN111966781A (en) * 2020-06-28 2020-11-20 北京百度网讯科技有限公司 Data query interaction method and device, electronic equipment and storage medium
CN112241631A (en) * 2020-10-23 2021-01-19 平安科技(深圳)有限公司 Text semantic recognition method and device, electronic equipment and storage medium
CN113553843A (en) * 2021-06-24 2021-10-26 青岛海尔科技有限公司 Skill creation method and device
CN113779216A (en) * 2021-09-02 2021-12-10 携程计算机技术(上海)有限公司 Event recording method, system, device and storage medium based on multi-party conversation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499277A (en) * 2008-07-25 2009-08-05 中国科学院计算技术研究所 Service intelligent navigation method and system
US20170026705A1 (en) * 2015-07-24 2017-01-26 Nuance Communications, Inc. System and method for natural language driven search and discovery in large data sources
CN106557461A (en) * 2016-10-31 2017-04-05 百度在线网络技术(北京)有限公司 Semantic analyzing and processing method and device based on artificial intelligence
CN108509412A (en) * 2018-03-02 2018-09-07 北京搜狗科技发展有限公司 A kind of data processing method, device, electronic equipment and storage medium
CN108628830A (en) * 2018-04-24 2018-10-09 北京京东尚科信息技术有限公司 A kind of method and apparatus of semantics recognition

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499277A (en) * 2008-07-25 2009-08-05 中国科学院计算技术研究所 Service intelligent navigation method and system
US20170026705A1 (en) * 2015-07-24 2017-01-26 Nuance Communications, Inc. System and method for natural language driven search and discovery in large data sources
CN106557461A (en) * 2016-10-31 2017-04-05 百度在线网络技术(北京)有限公司 Semantic analyzing and processing method and device based on artificial intelligence
CN108509412A (en) * 2018-03-02 2018-09-07 北京搜狗科技发展有限公司 A kind of data processing method, device, electronic equipment and storage medium
CN108628830A (en) * 2018-04-24 2018-10-09 北京京东尚科信息技术有限公司 A kind of method and apparatus of semantics recognition

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵力: "《语音信号处理》", vol. 2, 30 June 2009, 机械工业出版社, pages: 221 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966781A (en) * 2020-06-28 2020-11-20 北京百度网讯科技有限公司 Data query interaction method and device, electronic equipment and storage medium
CN111966781B (en) * 2020-06-28 2024-02-20 北京百度网讯科技有限公司 Interaction method and device for data query, electronic equipment and storage medium
CN111950300A (en) * 2020-07-22 2020-11-17 广州朗国电子科技有限公司 Translation management method and device for universal software entries, storage medium and server
CN111950300B (en) * 2020-07-22 2021-12-24 广州朗国电子科技有限公司 Translation management method and device for universal software entries, storage medium and server
CN112241631A (en) * 2020-10-23 2021-01-19 平安科技(深圳)有限公司 Text semantic recognition method and device, electronic equipment and storage medium
CN113553843A (en) * 2021-06-24 2021-10-26 青岛海尔科技有限公司 Skill creation method and device
CN113553843B (en) * 2021-06-24 2023-12-19 青岛海尔科技有限公司 Skill creation method and device
CN113779216A (en) * 2021-09-02 2021-12-10 携程计算机技术(上海)有限公司 Event recording method, system, device and storage medium based on multi-party conversation

Similar Documents

Publication Publication Date Title
CN108847241B (en) Method for recognizing conference voice as text, electronic device and storage medium
CN111309876A (en) Service request processing method and device, electronic equipment and storage medium
US10777192B2 (en) Method and apparatus of recognizing field of semantic parsing information, device and readable medium
CN107291783B (en) Semantic matching method and intelligent equipment
CN110379445A (en) Method for processing business, device, equipment and storage medium based on mood analysis
KR20200108775A (en) Training corpus generating method, apparatus, device and storage medium
US20170199867A1 (en) Dialogue control system and dialogue control method
JP2020030408A (en) Method, apparatus, device and medium for identifying key phrase in audio
CN109346078B (en) Voice interaction method and device, electronic equipment and computer readable medium
CN111292751B (en) Semantic analysis method and device, voice interaction method and device, and electronic equipment
JP2015176099A (en) Dialog system construction assist system, method, and program
CN112001175A (en) Process automation method, device, electronic equipment and storage medium
CN108039175B (en) Voice recognition method and device and server
TW201339862A (en) System and method for eliminating language ambiguity
CN110797012B (en) Information extraction method, equipment and storage medium
CN111897511A (en) Voice drawing method, device, equipment and storage medium
CN116108857B (en) Information extraction method, device, electronic equipment and storage medium
CN113722457A (en) Intention recognition method and device, storage medium, and electronic device
CN114676691B (en) Identification method, system, equipment and computer readable storage medium
CN110750626B (en) Scene-based task-driven multi-turn dialogue method and system
CN114492396A (en) Text error correction method for automobile proper nouns and readable storage medium
CN112149403A (en) Method and device for determining confidential text
CN114490986B (en) Computer-implemented data mining method, device, electronic equipment and storage medium
CN110866394A (en) Company name identification method and device, computer equipment and readable storage medium
CN115309994A (en) Location search method, electronic device, and storage medium

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