CN114064679B - Identification resource compilation method, electronic device and storage medium - Google Patents
Identification resource compilation method, electronic device and storage medium Download PDFInfo
- Publication number
- CN114064679B CN114064679B CN202111435241.5A CN202111435241A CN114064679B CN 114064679 B CN114064679 B CN 114064679B CN 202111435241 A CN202111435241 A CN 202111435241A CN 114064679 B CN114064679 B CN 114064679B
- Authority
- CN
- China
- Prior art keywords
- resource
- new
- compiling
- resources
- identification
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F16/278—Data partitioning, e.g. horizontal or vertical partitioning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses an identification resource compiling method, electronic equipment and a storage medium, wherein the identification resource compiling method is used for a user terminal and comprises the steps of compiling new identification resources by using a new resource partition when the new identification resources need to be compiled, placing the resources which are compiled successfully in the new resource partition, judging whether the user terminal is in a conversation or not in response to the completion of compiling, and determining the subsequent processing of the resources which are compiled successfully according to a judging result. By compiling the new recognition resources by using the new resource partition, judging whether the user terminal is in a conversation, and determining subsequent processing of the resources successfully compiled according to the judging result, the offline voice function of the new recognition resources in the compiling process can be normally used, and all the corpora except the new corpora can be ensured to be normally used.
Description
Technical Field
The invention belongs to the technical field of resource compiling, and particularly relates to a method for identifying resource compiling, electronic equipment and a storage medium.
Background
Along with the enrichment of voice functions, the corpus in offline dialogue is more and more, especially in vehicle-mounted scenes, the corpus basically reaches thousands of categories, and on a vehicle with insufficient performance, the time of tens of seconds is basically needed for compiling the recognition corpus resource of the magnitude every time, and the user cannot use offline voice (including unchanged corpus) within the time of tens of seconds, so that the offline voice experience of the user is greatly affected.
When the word stock is updated, if the word stock is not in the dialogue, the compiling generation of the identification resource is immediately carried out, and the offline identification cannot be used until the compiling is finished in the compiling process. If not in the dialogue, the SDK waits for compiling after the dialogue is ended, and in the compiling process, the direct compiling is ended, and the voice offline function cannot be used.
The defect is that the voice offline function cannot be used in the compiling process, the defect is not prominent when the corpus is less, the perception is not strong, but the corpus is more and more along with the richness of scenes, so that the user can obviously perceive that the problem that the voice time slices cannot be used exists
Disclosure of Invention
The embodiment of the invention provides a method for compiling identification resources, electronic equipment and a storage medium, which are used for at least solving one of the technical problems.
In a first aspect, an embodiment of the present invention provides an identification resource compiling method for a user terminal, where when a new identification resource needs to be compiled, the compiling of the new identification resource is performed by using a new resource partition, and a successfully compiled resource is placed in the new resource partition, and in response to the completion of compiling, whether the user terminal is in a session is determined, and according to a determination result, a subsequent process of the successfully compiled resource is determined.
In a second aspect, an electronic device is provided that includes at least one processor and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the identified resource compilation method of any of the embodiments of the present invention.
In a third aspect, embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the steps of the identification resource compiling method of any embodiment of the present invention.
The method, the electronic equipment and the storage medium of the application can greatly reduce the compiling times of the offline recognition resources by compiling the new recognition resources in the SDK initialization stage, further, compile the new recognition resources by using the new resource partition, judge whether the user terminal is in a conversation, and determine the subsequent processing of the successfully compiled resources according to the judging result, thereby realizing the normal use of the offline voice function of the new recognition resources in the compiling process and ensuring that all other corpora except the new corpora can be normally used.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for identifying compilation of resources according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method for compiling identification resources according to an embodiment of the present invention;
FIG. 3 is a flowchart of partitioning resource compilation for identifying a specific example of a resource compilation method according to an embodiment of the present invention;
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a flowchart of an embodiment of an identification resource compiling method according to the present application is shown, and the identification resource compiling method according to the present embodiment may be applied to a user terminal having a voice dialogue function, such as a vehicle-mounted terminal, an intelligent sound box, various service terminals, and the like.
As shown in fig. 1, in step 101, when a new identified resource needs to be compiled, compiling the new identified resource using a new resource partition, and placing the successfully compiled resource in the new resource partition;
in step 102, in response to the compiling ending, it is determined whether the user terminal is in a session, and the subsequent processing of the successfully compiled resource is determined according to the determination result.
In this embodiment, for step 101, when it is detected by the identifying resource compiling device that a new identifying resource needs to be compiled, a new identifying resource is compiled by using a new resource partition, and a resource that is compiled successfully is placed in the new resource partition, for example, a new resource partition is opened up, parallel compiling is performed in a new resource partition folder, and a resource that is compiled successfully is placed in the new resource partition first, where by parallel compiling, the effective time of the new identifying resource can be shortened, and the perception of a user on the time slice generated by compiling the identifying resource is reduced.
Then, for step 102, the identifying resource compiling device determines whether the user terminal is in a session in response to the end of compiling, and determines the subsequent processing of the successfully compiled resource according to the determination result, for example, if the user terminal is not in a session, the successfully compiled resource is updated to the use path corresponding to the successfully compiled resource, and if the user terminal is in a session, the user terminal waits for updating the successfully compiled resource to the use path corresponding to the successfully compiled resource after the end of the session.
According to the method, the new recognition resources are compiled by using the new resource partitions, further, whether the user terminal is in a dialogue is judged, and the subsequent processing of the resources which are compiled successfully is determined according to the judgment result, so that the offline voice function of the new recognition resources can be normally used in the compiling process, and all the corpora except the new corpora can be ensured to be normally used.
Referring further to FIG. 2, a flow chart of another method for identifying compilation of resources is shown, according to an embodiment of the present application. The flowchart is mainly a flowchart of the steps further defined in the flowchart of fig. 1 "determining the subsequent processing of the compiled resource according to the determination result".
As shown in fig. 2, in step 201, if the ue is in a session, a flag bit for updating the identification resource is set;
In step 202, the new identified resource is updated to the tag bit in response to the session ending.
In this embodiment, for step 201, the identifying resource compiling device determines that the user terminal is in a session, and sets a flag bit for updating the identifying resource under a use path corresponding to the new identifying resource.
Then, for step 202, the identification resource compiling means updates the new identification resource to the flag bit in response to the end of the session.
According to the method, when the user terminal is in the conversation, the mark bit of the identification resource to be updated is set, and after the conversation of the user terminal is completed, the new identification resource is updated to the mark, so that the offline voice function of the new identification resource in the compiling process can be normally used.
In the method of the foregoing embodiment, the determining, according to the determination result, subsequent processing of the compiled resource includes:
If the user terminal is not in the session, the new identification resource is updated to the use path corresponding to the new identification resource.
In the method of the foregoing embodiment, after the determining, according to the determination result, subsequent processing of the compiled resource, the method further includes:
And deleting the successfully compiled resources in the new resource partition in response to the update ending.
According to the method, after updating, the successfully compiled resources in the new resource partition are deleted, so that the memory occupation of the user terminal can be reduced, and the fluency of the user terminal is increased.
In the method of the above embodiment, the method is used in an SDK usage stage, where in the SDK initialization stage, the method further includes:
and judging whether a compiling operation of a new identification resource is required based on the acquired product ID and the product version information, for example, judging whether the product version information of the user terminal is consistent with the latest product version information, and if not, requiring the compiling operation of the new identification resource.
According to the method, the compiling of the new recognition resources is carried out in the SDK initialization stage, so that the compiling times of the offline recognition resources can be greatly reduced, and the offline voice function can be ensured to be normally used in the compiling process of the new recognition resources.
In the method described in the above embodiment, the external factors that trigger the identification of the resource compilation method include user active invocation updatevocab, dynamic switching productID, and dynamic updating of product versions.
In the method of any of the above embodiments, the compiling the new identified resource using a new resource partition includes:
developing a new resource partition to compile a new identified resource, e.g. deleting the new resource partition after waiting for the new identified resource to be updated, or developing a new resource partition when compiling a new identified resource for the first time, or
And compiling the new identification resources by using the preset partition for compiling the new identification resources, for example, deleting the new identification resources in the new resource partition after the new identification resources are updated.
In the method of the foregoing embodiment, the dialogue is an offline voice dialogue.
It should be noted that the above method steps are not intended to limit the execution sequence of the steps, and in fact, some steps may be executed simultaneously or in reverse order of the steps, which is not intended to limit the present application herein.
The following description is given to better understand the solution of the present application by describing some problems encountered by the inventor in the process of implementing the present application and describing one specific embodiment of the finally determined solution.
The inventors have found that the drawbacks of the prior art in the practice of the present application are mainly caused by the following reasons:
Along with the enrichment of voice functions, the corpus in offline dialogue is more and more, especially in vehicle-mounted scenes, the corpus basically reaches thousands of categories, and on a vehicle with insufficient performance, the time of tens of seconds is basically needed for compiling the recognition corpus resource of the magnitude every time, and the user cannot use offline voice (including unchanged corpus) within the time of tens of seconds, so that the offline voice experience of the user is greatly affected.
The inventor also discovers that the artificial intelligent voice is still in a starting stage at present, and the offline speaking only increases continuously along with the enrichment of scenes and the continuous improvement of experience demands of users, so that the generation time of recognition resources is longer and longer.
The scheme of the application is mainly designed and optimized from the following aspects:
In the initialization stage of SDK, it is used to judge whether the identification resource is to be recompiled or not, in the utilization stage of SDK, when the new identification resource is required to be compiled, a new resource partition is opened and compiled, in the partition folder, the successfully compiled resource is firstly placed in the partition, after the compiling is finished, it is judged whether the current resource is in offline conversation or not, if so, the mark bit for updating identification resource is set, when the conversation is finished, the latest resource in the partition is updated to the use path, after the updating is finished, the resource in the partition is deleted, and if the conversation is in silence state, the latest resource in the partition is immediately updated to the use path, after the updating is finished, the resource in the partition is deleted.
The method can optimize the judgment logic of the SDK for compiling the recognition resources in the SDK initialization stage, reduce the compiling times, solve the problem that the offline voice function of the recognition resources cannot be used in the compiling process in the prior art in the SDK use stage, ensure the normal use of all the corpora except the new corpora, shorten the effective time of the new recognition resources by the scheme of parallel compiling of the partitions in the dialogue process, and reduce the perception of users on the time slices generated by compiling the recognition resources.
Referring to fig. 3, a partition resource compiling flowchart is shown for identifying a specific example of a resource compiling method according to an embodiment of the invention.
As shown in FIG. 3, in step 1, the SDK initialization stage determines whether to start a new scheme.
And 2, judging whether compiling operation for identifying the resource is needed or not through the product ID and the product version information after the new scheme is confirmed to be started.
And step 3, after confirming that the new identified resources need to be compiled, opening up a new resource partition, starting to compile, compiling in parallel in the partition folder, and placing the successfully compiled resources in the partition.
And 4, judging whether the current resources are in an offline dialogue after compiling is finished, setting a mark bit for identifying resources to be updated if the current resources are in the dialogue, updating the latest resources in the partition to the use path after the dialogue is finished, deleting the resources in the partition after the updating is finished, and immediately updating the latest resources in the partition to the use path if the current resources are in a silent state, and deleting the resources in the partition after the updating is finished.
The inventor finds that the effect of deeper level is achieved in the process of realizing the invention:
The method has the advantages that 1, in the SDK initialization stage, the compiling frequency of offline identification resources is greatly reduced, the method is brought by the technical point of step 2 (judging whether the compiling operation of the identification resources is needed or not through the product ID and the product version information), the technical point is not only the optimization of the compiling frequency of the SDK, but also the requirement on performance in the SDK initialization stage is reduced, and the SDK initialization speed is accelerated.
The effect 2 is that in the SDK use stage, the problem that the offline voice function of the recognition resource cannot be used in the compiling process under the existing scheme is solved, and the normal use of all the corpora except the new corpora is ensured;
The effect is brought by the technical point of step 4 in fig. 3 (judging whether the current is in an offline conversation after compiling is finished, setting a mark bit for identifying resources to be updated if the current is in the conversation, updating the latest resources in the subarea to the use path after updating is finished when the conversation is finished, and deleting the resources in the subarea immediately after updating is finished if the current is in a silence state).
In other embodiments, embodiments of the present invention further provide a non-volatile computer storage medium storing computer-executable instructions that are capable of performing the identified resource compiling method of any of the method embodiments described above;
As one embodiment, the non-volatile computer storage medium of the present invention stores computer-executable instructions configured to:
when new identification resources need to be compiled, compiling the new identification resources by using a new resource partition, and placing the resources which are compiled successfully in the new resource partition;
and judging whether the user terminal is in a conversation or not in response to the compiling completion, and determining the subsequent processing of the successfully compiled resource according to a judging result.
The non-transitory computer readable storage medium may include a storage program area that may store an operating system, an application program required for at least one function, and a storage data area that may store data created according to the use of the identification resource compiling apparatus, and the like. Further, the non-volatile computer-readable storage medium may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the non-transitory computer readable storage medium may optionally include memory remotely located with respect to the processor, the remote memory being connectable to the identification resource compiling means through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-volatile computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform any of the above identified resource compilation methods.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the device includes one or more processors 410 and a memory 420, and one processor 410 is illustrated in fig. 4. The apparatus for identifying a resource compilation method may further include an input device 430 and an output device 440. The processor 410, memory 420, input device 430, and output device 440 may be connected by a bus or other means, for example in fig. 4. Memory 420 is the non-volatile computer-readable storage medium described above. The processor 410 executes various functional applications of the server and data processing by running non-volatile software programs, instructions and modules stored in the memory 420, i.e., implements the above-described method embodiment identification resource compilation method. The input device 430 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the communication compensation device. The output 440 may include a display device such as a display screen.
The product can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the methods provided in the embodiments of the present invention.
As one embodiment, the electronic device is applied to an identification resource compiling device and used for a client, and comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:
when new identification resources need to be compiled, compiling the new identification resources by using a new resource partition, and placing the resources which are compiled successfully in the new resource partition;
and judging whether the user terminal is in a conversation or not in response to the compiling completion, and determining the subsequent processing of the successfully compiled resource according to a judging result.
The electronic device of the embodiments of the present application exists in a variety of forms including, but not limited to:
(1) Mobile communication devices, which are characterized by mobile communication functionality and are aimed at providing voice, data communication. Such terminals include smart phones (e.g., iPhone), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer equipment, which belongs to the category of personal computers, has the functions of calculation and processing and generally has the characteristic of mobile internet surfing. Such terminals include PDA, MID and UMPC devices, etc., such as iPad.
(3) Portable entertainment devices such devices can display and play multimedia content. Such devices include audio, video players (e.g., iPod), palm game consoles, electronic books, and smart toys and portable car navigation devices.
(4) The server is similar to a general computer architecture in that the server is provided with high-reliability services, and therefore, the server has high requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like.
(5) Other electronic devices with data interaction function.
The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product, which may be stored in a computer-readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the various embodiments or methods of some parts of the embodiments.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention, and not for limiting the same, and although the present invention has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present invention.
Claims (7)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111435241.5A CN114064679B (en) | 2021-11-29 | 2021-11-29 | Identification resource compilation method, electronic device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111435241.5A CN114064679B (en) | 2021-11-29 | 2021-11-29 | Identification resource compilation method, electronic device and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114064679A CN114064679A (en) | 2022-02-18 |
| CN114064679B true CN114064679B (en) | 2025-01-24 |
Family
ID=80276967
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111435241.5A Active CN114064679B (en) | 2021-11-29 | 2021-11-29 | Identification resource compilation method, electronic device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114064679B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6205527B1 (en) * | 1998-02-24 | 2001-03-20 | Adaptec, Inc. | Intelligent backup and restoring system and method for implementing the same |
| CN110187904A (en) * | 2019-05-05 | 2019-08-30 | 浙江合众新能源汽车有限公司 | A device and method for updating vehicle controller firmware |
-
2021
- 2021-11-29 CN CN202111435241.5A patent/CN114064679B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6205527B1 (en) * | 1998-02-24 | 2001-03-20 | Adaptec, Inc. | Intelligent backup and restoring system and method for implementing the same |
| CN110187904A (en) * | 2019-05-05 | 2019-08-30 | 浙江合众新能源汽车有限公司 | A device and method for updating vehicle controller firmware |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114064679A (en) | 2022-02-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111049996B (en) | Multi-scene speech recognition method and device, and intelligent customer service system using the same | |
| CN108984157B (en) | Skill configuration and calling method and system for voice conversation platform | |
| CN108228628B (en) | Wide table generation method and device in structured query language database | |
| CN108564946A (en) | Technical ability, the method and system of voice dialogue product are created in voice dialogue platform | |
| CN113609017B (en) | Interface test case generation method and device | |
| CN112732340B (en) | Man-machine dialogue processing method and device | |
| CN111681658A (en) | Voice control method and device for in-vehicle APP | |
| CN110955593B (en) | Client testing method and device, electronic equipment and readable storage medium | |
| US9674351B1 (en) | Remote voice recognition | |
| CN111063353B (en) | Client-side processing method and user terminal for allowing custom voice interaction content | |
| CN109684805B (en) | Voice skill sharing method and system for voice conversation platform | |
| CN109002320A (en) | For the update method of software development kit, system, electronic equipment and storage medium | |
| CN112069830A (en) | Intelligent conversation method and device | |
| CN112735407A (en) | Conversation processing method and device | |
| CN112289322A (en) | Voiceprint recognition method and device | |
| CN110825448A (en) | Method, device, electronic equipment and storage medium for realizing mutual calling of multiple service modules | |
| CN108831444B (en) | Semantic resource training method and system for voice conversation platform | |
| CN114220434A (en) | Voice interaction method and device, electronic equipment and storage medium | |
| CN114064679B (en) | Identification resource compilation method, electronic device and storage medium | |
| CN111726284A (en) | WeChat sending method and device for in-vehicle smart speakers | |
| CN110544480B (en) | Voice recognition resource switching method and device | |
| CN112085208B (en) | Method and device for training model by cloud | |
| CN110442698B (en) | Dialog content generation method and system | |
| CN110473524B (en) | Method and device for constructing voice recognition system | |
| CN109712622B (en) | Configuration method and system for voice interaction exception handling for voice dialogue platform |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |