Disclosure of Invention
In view of the above, the present invention provides a semantic analysis library updating method, an apparatus and an electronic device, so as to solve the technical problem in the prior art that when a general universal word library recognizes words in a feature industry, inaccurate character conversion is likely to occur, which causes a user to repeatedly record and modify the characters in a tedious operation technique.
In a first aspect, an embodiment of the present invention provides a method for updating a semantic analysis library, where the method includes the following steps:
acquiring audio information to be analyzed, and starting a matching process of the audio information;
generating character information according to the audio information, and judging whether vocabularies matched with the character information exist in the semantic analysis library or not;
if the word information does not exist, acquiring a plurality of recommended word information matched with the word information in a service word bank;
and acquiring target character information selected by the user from the plurality of recommended character information, and writing the target character information into a semantic analysis library.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where the obtaining, in a service thesaurus, a plurality of pieces of recommended text information matched with the text information includes:
determining the matching degree of each vocabulary in the service word stock and the character information;
and acquiring a plurality of pieces of recommended word information from each vocabulary in the service word stock according to the matching degree.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where after target text information selected by a user from the plurality of pieces of recommended text information is obtained, the method further includes:
and increasing a preset increment for the matching degree of the target character information and the character information in the service word stock.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the third possible implementation manner further includes:
and if the target text information selected by the user from the plurality of recommended text information is not acquired, acquiring the local operation record of the user.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the step of obtaining a local operation record of a user includes:
and if the matching process of the audio information is determined to be restarted according to the local operation record of the user, acquiring a plurality of pieces of recommended character information again from each vocabulary in the service word bank according to the matching degree of each vocabulary in the service word bank and the character information.
With reference to the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where after determining whether there is a vocabulary matching the text information in the semantic analysis library, the method further includes:
and if so, outputting the vocabulary matched with the text information.
With reference to the first aspect, an embodiment of the present invention provides a sixth possible implementation manner of the first aspect, where the generating text information according to the audio information includes:
and calling a voice recognition tool to generate the generated text information from the audio information.
In a second aspect, an embodiment of the present invention further provides a semantic analysis library updating apparatus, including:
the starting module is used for acquiring audio information to be analyzed and starting a matching process of the audio information;
the generating module is used for generating character information according to the audio information;
the judgment module is used for generating character information according to the audio information and judging whether vocabularies matched with the character information exist in the semantic analysis library or not;
the acquisition module is used for acquiring a plurality of pieces of recommended word information matched with the word information from a service word stock if the acquisition module does not exist;
and the writing module is used for acquiring target character information selected by a user from the plurality of recommended character information and writing the target character information into a semantic analysis library.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the above steps when executing the computer program.
In a fourth aspect, the present invention also provides a computer readable medium having a non-volatile program code executable by a processor, where the program code causes the processor to execute the above method.
In the embodiment of the invention, the matching process of the audio information is started by acquiring the audio information to be analyzed; generating character information according to the audio information, and judging whether vocabularies matched with the character information exist in the semantic analysis library or not; if the word information does not exist, acquiring a plurality of recommended word information matched with the word information in a service word bank; and acquiring target character information selected by the user from the plurality of recommended character information, writing the target character information into the semantic analysis library to achieve the aim of updating the semantic analysis library, providing more choices for the user by acquiring the plurality of recommended character information, and avoiding the complicated operation of repeatedly modifying input by the user.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In accordance with an embodiment of the present invention, there is provided an embodiment of a semantic analysis library update method, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
Fig. 1 is a flowchart of a semantic analysis library updating method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, obtaining audio information to be analyzed, and starting a matching process of the audio information;
in the embodiment of the present invention, acquiring voice input of a user by using a recording device such as a microphone to obtain audio information, wherein the generating text information according to the audio information includes: and calling a voice recognition tool to generate the generated text information from the audio information, wherein the specific voice recognition tool can be determined according to actual conditions, and the invention is not limited to this.
Step S102, generating character information according to the audio information, and judging whether vocabularies matched with the character information exist in the semantic analysis library or not;
in the embodiment of the invention, the word information is generated according to the audio information, and the vocabulary matched with the word information is searched in the semantic analysis library, wherein the semantic analysis library is a general vocabulary library in the embodiment of the invention, so that the selection cannot be provided for a user when special vocabulary in a remote field appears.
Step S103, if the word information does not exist, acquiring a plurality of recommended word information matched with the word information from a service word bank;
in the implementation of the present invention, words and phrases matched with the text information are searched in the semantic analysis library, if there is no word and phrase matched with the text information in the semantic analysis library, a plurality of recommended text information matched with the text information is obtained in a business word library, and multiple choices are provided for a user, so that a tedious operation of repeatedly modifying and inputting the user is avoided, and the office efficiency is accelerated, and a specific providing manner and a provided matching degree selection may be determined according to an actual situation, and with respect to step S103, the present invention further provides an implementation manner, as shown in fig. 2, the obtaining of the plurality of recommended text information matched with the text information in the business word library includes:
step S201, determining the matching degree of each vocabulary in the service word stock and the character information;
in the embodiment of the present invention, the text information generated according to the audio information input by the user is obtained, and the matching degree between each vocabulary in the service vocabulary bank and the text information is determined according to the text coincidence degree between the vocabulary in the service vocabulary bank and the text information, where the matching degree may be a numerical value or a percentage of the coincidence of the words, and the present invention is not limited to this.
And step S202, acquiring a plurality of pieces of recommended word information from each vocabulary in the service word stock according to the matching degree.
In the embodiment of the present invention, a plurality of pieces of recommended text information may be manually set and displayed according to the descending order of the matching degree values, for example: the method comprises the steps that 5 pieces of recommended word information are manually set and displayed on a page for a user to select, and then 5 pieces of words with the highest matching degree are sequentially selected as the recommended word information for the user to select.
And step S104, acquiring target character information selected by the user from the plurality of recommended character information, and writing the target character information into a semantic analysis library.
In the embodiment of the present invention, it can be known from the above embodiments that, after providing a plurality of pieces of recommended text information for the user to select, the user selects a desired target text information to output, at this time,
after the target text information selected by the user from the plurality of recommended text information is obtained, the method further comprises the following steps: adding a preset increment to the matching degree of the target character information and the character information in the service word stock, feeding back the target character information to a service test library after a user selects the target character information, and adding a preset increment to the matching degree of the target character information and the character information in the service word stock, wherein the aim is to increase the preset increment to the matching degree of the target character information and the character information in the service word stock when the service word stock is used for big data sharing, such as: when the other user selects the same audio information, the semantic analysis library does not have the matched text information, when the business lexicon searches for a plurality of recommended text information which is matched with the text information, the priority of the selected target text information is improved due to the reason that the matching degree is increased, even if the amount of the recommended text information displayed on a window set by the user is small, the recommended text information which is closest to the text required by the user can be displayed at the top position when the probability statistics of a plurality of users is carried out, a multi-choice scheme is provided for the currently used user, the updating of the business lexicon can be optimized all the time, and the user experience is optimized.
In another embodiment of the present invention, as shown in fig. 3, the semantic analysis library updating method further includes:
and step S105, if the target text information selected by the user from the plurality of pieces of recommended text information is not obtained, obtaining the local operation record of the user.
In the embodiment of the invention, the local operation record of the user is the operation record of the terminal used by the user, which aims to read the operation of the user, and if the user locks the screen or does not select the screen, the matching process of the audio information does not need to be restarted; and if the user does not select the recommended characters and performs voice input again, the recommended characters do not have the characters required by the user.
In another embodiment of the present invention, the step of obtaining the local operation record of the user includes:
and if the matching process of the audio information is determined to be restarted according to the local operation record of the user, acquiring a plurality of pieces of recommended character information again from each vocabulary in the service word bank according to the matching degree of each vocabulary in the service word bank and the character information. In the embodiment of the present invention, when the matching process of the audio information needs to be restarted, the step of matching the words in the service word library with the text information is directly skipped without searching again in the semantic analysis library, and specifically, a process of selecting a plurality of pieces of recommended text information according to the matching degree in the above embodiment may be referred to, but the first group of recommended text information is not listed again in the recommendation list, for example: and manually recommending 5 pieces of recommended text information each time, and pushing the next 5 pieces of recommended text information with high matching degree after restarting an audio information matching process under the condition that the first selection is not successful, so that more choices are provided for the client.
The implementation principle and the generated technical effect of the semantic analysis library updating device provided by the embodiment of the present invention are the same as those of the foregoing method embodiment, and for brief description, no mention is made in the device embodiment, and reference may be made to the corresponding contents in the foregoing method embodiment, as shown in fig. 4, the semantic analysis library updating device includes:
the system comprises a starting module 01, a matching module and a processing module, wherein the starting module 01 is used for acquiring audio information to be analyzed and starting a matching process of the audio information;
the generating module 02 is used for generating text information according to the audio information;
the judging module 03 is used for generating character information according to the audio information and judging whether vocabularies matched with the character information exist in the semantic analysis library or not;
an obtaining module 04, if not, the obtaining module 04 is configured to obtain a plurality of pieces of recommended text information matched with the text information in a service thesaurus;
and the writing module 05 is used for acquiring target character information selected by a user from the plurality of recommended character information and writing the target character information into a semantic analysis library.
In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is clear to 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 the corresponding processes in the foregoing method embodiments, and are not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
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 embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units 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 units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units 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 invention 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 invention may be embodied in the form of a software product, which is stored in a storage medium and includes 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 invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.