WO2020006880A1 - 语音识别工具部署方法、装置、计算机设备及存储介质 - Google Patents

语音识别工具部署方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020006880A1
WO2020006880A1 PCT/CN2018/106270 CN2018106270W WO2020006880A1 WO 2020006880 A1 WO2020006880 A1 WO 2020006880A1 CN 2018106270 W CN2018106270 W CN 2018106270W WO 2020006880 A1 WO2020006880 A1 WO 2020006880A1
Authority
WO
WIPO (PCT)
Prior art keywords
recognition tool
operating system
tool
speech recognition
package
Prior art date
Application number
PCT/CN2018/106270
Other languages
English (en)
French (fr)
Inventor
岳鹏昱
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020006880A1 publication Critical patent/WO2020006880A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/28Constructional details of speech recognition systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Definitions

  • the present application relates to the technical field of speech recognition, and in particular, to a method, an apparatus, a computer device, and a storage medium for deploying a speech recognition tool.
  • Kaldi is a powerful speech recognition tool.
  • many companies and R & D centers use kaldi for research and application of speech recognition.
  • many third-party plug-ins and tools need to be installed, such as cuda (Compute Unified Device Architecture) and gst (GStreamer, used to build streaming media).
  • cuda Computer Unified Device Architecture
  • gst GStreamer, used to build streaming media.
  • Application open source multimedia framework libatlas (Automatic Tuned Linear Algebra Software), etc., the installation process is tedious and time-consuming, which is not conducive to the deployment and application of kaldi on different terminals.
  • a speech recognition tool deployment method includes:
  • the tool environment image is exported to the application container engine of the second terminal through the application container engine of the first terminal, so that the application container engine of the second terminal runs the tool environment image and provides voice recognition services.
  • a voice recognition tool deployment device includes:
  • a system image installation module configured to install an operating system image on an application container engine of the first terminal
  • a voice recognition tool installation module configured to install a voice recognition tool and a dependency package required by the voice recognition tool on the operating system image to obtain a tool environment image;
  • the environment image export module is configured to export the tool environment image to the application container engine of the second terminal through the application container engine of the first terminal, so that the application container engine of the second terminal runs the tool environment image and provides Speech recognition service.
  • a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, and the processor implements the above-mentioned speech recognition tool deployment when the processor executes the computer-readable instructions Method steps.
  • One or more non-volatile readable storage media storing computer readable instructions, the computer readable storage medium storing computer readable instructions, so that the one or more processors execute the method for deploying a voice recognition tool described above A step of.
  • FIG. 1 is a schematic diagram of an application environment of a method for deploying a speech recognition tool according to an embodiment of the present application
  • FIG. 2 is a flowchart of a method for deploying a speech recognition tool according to an embodiment of the present application
  • step S102 is a flowchart of an application scenario in step S102 of a method for deploying a speech recognition tool according to an embodiment of the present application;
  • step S204 is a flowchart of an application scenario in step S204 of a method for deploying a speech recognition tool according to an embodiment of the present application;
  • FIG. 5 is a flowchart of a method for deploying a voice recognition tool in an embodiment of the present application to detect the number of kaldi reinstalls in an application scenario;
  • FIG. 6 is a schematic structural diagram of a device for deploying a voice recognition tool according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of a computer device in an embodiment of the present application.
  • the method for deploying a speech recognition tool provided in this application may be applied in the application environment shown in FIG. 1, where a first terminal and a second terminal communicate with a server through a network.
  • the first terminal and the second terminal may include, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and / or portable wearable devices.
  • the server can be implemented by an independent server or a server cluster composed of multiple servers.
  • a method for deploying a voice recognition tool is provided.
  • the method is applied to the server in FIG. 1 as an example, and includes the following steps:
  • docker container is an open source application engine that allows developers to package their application and a portable container to the dependencies, then conveniently these packaged applications migrate to the other terminals.
  • This application officially uses the working principle of docker to package kaldi programs and kaldi dependencies to docker to make a kaldi environment image, and realizes rapid deployment and migration of kaldi by migrating the kaldi environment image.
  • the operating system mentioned here can be any one of the operating systems such as Ubuntu, centos, oracle, linux, and windows.
  • the operating system image can be obtained through network download, or it can be directly burned from a terminal on which the operating system is installed, which is not limited in this embodiment.
  • first terminal and the second terminal described below may refer to any two different terminals, and "first" and “second” are only numbers for distinguishing between two different terminals.
  • the first terminal can be the source terminal for the kaldi environment image production
  • the second terminal is the target terminal that needs to be quickly migrated. Therefore, the first terminal is generally one and the second terminal can be One, two or even more.
  • the kaldi environment image can be loaded on multiple second terminals to realize rapid migration and deployment of kaldi.
  • the kaldi environment image is located on docker and contains the data of the operating system image. And the data related to the kaldi program (kaldi program and dependent packages), that is, the kaldi program and the environment data on which it depends.
  • the dependency packages required by kaldi can include apt-get, libtool, tornado, and so on.
  • These dependent packages refer to the installation packages supported by the programs or services that the kaldi program normally runs, and the existing kaldi programs also need to install these dependent packages to achieve the normal loading of kaldi during the installation.
  • apt-get is a linux command, suitable for deb package management operating system. It is mainly used to automatically search, install, upgrade, and uninstall software or operating system from software repositories on the Internet. It is used to install kaldi.
  • Required software package one of the main functions of libtool is to solve the library dependency problem in the process of compiling large software.
  • libtool is used to compile the kaldi environment; Tornado is an open source version of web server software. Decoding environment for processing kaldi.
  • step S102 may specifically include:
  • step S201 it can be understood that the installation package of kaldi and the dependent packages required by kaldi can be downloaded through the network, or prepared in advance by the staff.
  • kaldi installation packages and dependency packages are prepared in advance before making a kaldi environment image.
  • only the kaldi installation package and dependency package need to be prepared for the first terminal.
  • Each terminal that deploys kaldi prepares a set of kaldi installation packages and dependent packages. This solution is undoubtedly simpler and saves costs.
  • step S202 it can be known that the operating system image is installed on the docker of the first terminal. After the operating system image is installed on the docker, the operating system image can be directly run on the docker, which is equivalent to starting the operating system, that is, the first operation. system.
  • step S203 after the target operating system is started, just install the kaldi installation package on the target operating system as in the existing kaldi installation process.
  • step S204 after the kaldi installation package is successfully installed, since the dependency packages required by kaldi generally have a strict installation order, the installation of the dependency packages also needs to be based on the default installation of the dependency packages required by the kaldi Install these dependent packages one by one in order to ensure the correct installation of the dependent packages and reduce the occurrence of abnormal installation.
  • step S204 may specifically include:
  • step S305 Determine whether the current dependency package is successfully installed. If the current dependency package fails to be installed, step S306 is performed. If the current dependency package is successfully installed, then step S308 is performed.
  • step S308 Until all dependent packages required by the speech recognition tool are successfully installed, the next dependent package is determined as the current dependent package according to the default installation order, and the process returns to step S303.
  • the server may directly set the installation order to the default installation order in advance.
  • step S302 this method needs to install the dependent packages one by one according to the default installation order of the dependent packages required by the kaldi. Therefore, the first dependent package to be installed is the first-ordered dependent package in the default installation order. As the current dependency package.
  • step S303 in order to avoid contamination of the operating system image on docker by installing errors, before installing each current dependent package, a copy image of the current target operating system is made as the latest system image. In this way, when a dependency package installation error is found, it can directly return to the state of the operating system before installation, which improves the stability when installing the dependency package required by kaldi. It should be noted that after successfully installing a dependency package in this method, it will return to step S303 to make a latest system image. The newly created system image will overwrite the previous system image, which is equivalent to recording the latest successful installation of the dependency package. Operating system, so that when a dependency package fails to install, it can return to the operating system status of the last successful installation, which ensures the stability of the installed dependency package and ensures the efficiency of the installation.
  • the current dependent package may be installed on the current target operating system.
  • step S305 it can be understood that each dependent package has a self-checking program after installation, and it will feedback the server whether the installation was successful. After the server obtains this information, it can know whether the current dependent package is successfully installed. .
  • steps S306 and S307 it can be understood that if the installation of the current dependency package fails, in order to avoid contamination of the target operating system during the installation of the dependency package (such as residual installation files) and subsequent installation of the dependency package fails
  • the method restarts the target operating system by running the latest system image on the docker of the first terminal, and restores the target operating system to a state before the current dependent package is installed. Then, the current dependent package is installed on the target operating system after the restart, and step S305 is fed back to perform a judgment again to determine whether the installation of the current dependent package is successful after the restart.
  • step S308 it can be understood that if the current dependent package is successfully installed, the next dependent package can be determined as the current dependent package according to the default installation sequence, and then return to step S303 to continue installing other dependent packages until the All dependencies required by kaldi are installed successfully.
  • the method can realize the sequential and one-by-one installation of the dependent packages required by the kaldi according to the default installation order of the dependent packages required by the kaldi. At the same time, it also ensures the efficiency of the installation, which indirectly improves the success rate of the server in making the kaldi environment image.
  • step S205 after the kaldi installation package and the dependent package are successfully installed, generally, the kaldi environment image has been obtained on the docker. Therefore, it can be determined that the kaldi environment image is obtained.
  • the kaldi environment image packs the operating system, kaldi programs, and kaldi dependency packages required to run kaldi.
  • kaldi can be started on the target operating system. If the startup is normal, it means that the kaldi environment image on the first terminal docker can be used normally, so as to determine that the kaldi environment image is obtained; if the startup fails, then This shows that the kaldi environment image on the first terminal docker cannot be used normally, and the kaldi installation package and dependent packages are automatically reinstalled. Specifically, before it is determined that the kaldi environment image is obtained, the method may further include detecting whether kaldi is normally started on the target operating system, and if not, returning to step S203, and if so, performing step S205.
  • the method may further include:
  • step S402. Determine whether the number of times the voice recognition tool is reinstalled exceeds a preset threshold; if not, return to step S203, and if yes, perform step S403;
  • the number of kaldi reinstalls is used to count the number of times the kaldi program and the dependent packages required by kaldi are reinstalled when the kaldi image is made this time. It can be known that, whenever it is detected that kaldi cannot be started normally on the target operating system, the cumulative number of kaldi reinstalls is increased by one. It can be understood that the number of kaldi reinstalls should be cleared at an appropriate time. It can be cleared after the operation of this solution is completed, or it can be cleared after feeding back information about the failure of making a kaldi environment image in step S403. The use situation is determined, which is not limited in this embodiment.
  • steps S402 to S403 it can be understood that if the number of kaldi reinstalls is too many, it can be considered that the production of the kaldi environment image failed to avoid excessive consumption of the server's operating resources. The administrator should be informed to stop in time, or the server will stop automatically. Make the kaldi environment image.
  • the preset threshold can be preset on the server, for example, it is set to 3, that is, when the number of kaldi reinstalls exceeds 3 times, it is considered that the production of the kaldi environment image fails this time.
  • the method can timely feedback when the number of kaldi reinstalls is excessive, so that the server administrator can be informed and checked in time to avoid excessive consumption of server operating resources.
  • the kaldi environment image can be exported through the export function on the docker of the first terminal. It is understandable that docker provides the function of exporting application images. These application images exported from docker can be completely imported to docker of other terminals to realize rapid migration of applications. This solution is the technological application of the docker feature to the migration and deployment of kaldi.
  • the exported kaldi environment image can be imported to docker of other terminals.
  • the kaldi environment image can be exported directly to the docker of the second terminal through the docker of the first terminal, so that the docker of the second terminal runs the kaldi environment image and provides voice Identify services.
  • the second terminal here can be one, two or more. Since the kaldi environment image already contains all the data required for the operation of kaldi, after importing the kaldi environment image to the docker of the second terminal, When kaldi needs to be started, run kaldi directly through docker on the second terminal to provide external voice recognition services through the docker interface.
  • this solution can realize the rapid migration and deployment of kaldi, especially when the number of second terminals is large, the method of this solution can save a lot of time and labor costs, so that a large number of second terminals can load kaldi in a short time
  • the program also provides external speech recognition services.
  • a kaldi environment image is created by using docker. Since the kaldi environment image and the dependencies required by kaldi are already installed in the kaldi environment image, the kaldi environment image is imported to the docker of the second terminal and there is no need to install kaldi later. Or dependent packages required by kaldi, the kaldi environment image can be directly run to provide voice recognition services, which avoids the tedious installation process when kaldi is deployed on different terminals, greatly improving the deployment efficiency of kaldi, and is conducive to the promotion and application of kaldi.
  • a speech recognition tool deployment device corresponds to the speech recognition tool speech recognition tool deployment method in the above embodiment.
  • the voice recognition tool voice recognition tool deployment device includes a system image installation module 601, a voice recognition tool installation module 602, and an environment image export module 603. The detailed description of each function module is as follows:
  • a voice recognition tool installation module 602 configured to install a voice recognition tool and a dependency package required by the voice recognition tool on the operating system image to obtain a tool environment image;
  • the environment image exporting module 603 is configured to export the tool environment image to the application container engine of the second terminal through the application container engine of the first terminal, so that the application container engine of the second terminal runs the tool environment image and Provide speech recognition services.
  • the voice recognition tool installation module may include:
  • a first obtaining unit configured to obtain an installation package of a speech recognition tool and a dependency package required by the speech recognition tool
  • An operating system startup unit configured to run the operating system image on an application container engine of the first terminal to start a target operating system
  • a voice recognition tool installation unit configured to install an installation package of the voice recognition tool on the target operating system
  • a dependency package installation unit configured to sequentially and one by one install the dependency packages required by the speech recognition tool according to the default installation order of the dependency packages required by the speech recognition tool after the installation package of the speech recognition tool is successfully installed;
  • a determining unit configured to determine that the tool environment image is obtained after the dependent package required for the speech recognition tool is successfully installed.
  • dependency package installation unit may include:
  • An installation order acquisition subunit configured to acquire a default installation order of a dependency package required by the speech recognition tool
  • a current dependent package determination subunit configured to determine a first-ranked dependent package in the default installation order as a current dependent package
  • Image copy subunit used to make a copy image of the current target operating system as the latest system image
  • a current dependency package installation subunit configured to install the current dependency package on a current target operating system
  • a judging subunit configured to judge whether the current dependent package is successfully installed
  • a first processing subunit configured to: if the determination result of the determination subunit is negative, run the latest system image on the application container engine of the first terminal to restart the target operating system, and Installing the current dependent package on the target operating system, and then returning to trigger the judging subunit;
  • the second processing subunit is configured to determine, if all the dependent packages required by the speech recognition tool are successfully installed, the next dependent package as The current dependent package returns to trigger the mirror copy subunit.
  • the voice recognition tool installation module may further include:
  • a startup detection unit configured to detect whether the speech recognition tool is normally started on the target operating system
  • a return trigger unit configured to return to trigger the voice recognition tool installation unit if the startup detection unit detects that the voice recognition tool cannot be normally started on the target operating system
  • the trigger determining unit is configured to return to trigger the determining unit if the startup detecting unit detects that the speech recognition tool is normally started on the target operating system.
  • the voice recognition tool installation module may further include:
  • a times accumulation unit configured to add 1 if the startup detection unit detects that the speech recognition tool cannot be normally started on the target operating system
  • a times judging unit configured to judge whether the number of times the voice recognition tool is reinstalled exceeds a preset threshold
  • a first triggering unit configured to trigger the return triggering unit if the judgment result of the number of times judgment unit is negative
  • An information feedback unit is configured to feed back information about a failure in making a tool environment image if the judgment result of the number of times judgment unit is yes.
  • Each module in the above voice recognition tool deployment device may be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the hardware in or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 7.
  • the computer device includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in a non-volatile storage medium.
  • the database of the computer equipment is used to store data involved in the method of deploying speech recognition tools.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by a processor to implement a method for deploying a speech recognition tool.
  • a computer device which includes a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor.
  • the processor executes the computer-readable instructions
  • the speech in the foregoing embodiment is implemented. Identify the steps of the tool deployment method, such as step S101 to step S103 shown in FIG. 2.
  • the processor executes the computer-readable instructions
  • the functions of the modules / units of the voice recognition tool deployment device in the foregoing embodiment are implemented, for example, the functions of modules 601 to 603 shown in FIG. 6. To avoid repetition, we will not repeat them here.
  • a computer-readable storage medium is provided, the one or more non-volatile storage mediums storing computer-readable instructions, and the computer-readable instructions are executed by one or more processors.
  • the steps of the method for deploying a speech recognition tool in the foregoing method embodiment are implemented, or the one or more non-volatile readable storage media storing computer-readable instructions
  • the one or more processors are caused to implement the functions of each module / unit in the device for deploying a voice recognition tool in the foregoing device embodiment when the computer-readable instructions are executed. To avoid repetition, we will not repeat them here.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Stored Programmes (AREA)

Abstract

本申请公开了一种语音识别工具部署方法,用于解决语音识别工具安装过程繁琐且耗时巨大,不利于语音识别工具在不同终端上的部署和应用的问题。本申请提供的方法包括:在第一终端的应用容器引擎上安装操作系统镜像;在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像;通过所述第一终端的应用容器引擎导出工具环境镜像至第二终端的应用容器引擎上,以使所述第二终端的应用容器引擎运行所述工具环境镜像并工提供语音识别服务。本申请还提供一种语音识别工具部署装置、计算机设备及存储介质。

Description

语音识别工具部署方法、装置、计算机设备及存储介质
本申请以2018年07月04日提交的申请号为201810721797.2,名称为“语音识别工具部署方法、装置、计算机设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
技术领域
本申请涉及语音识别技术领域,尤其涉及一种语音识别工具部署方法、装置、计算机设备及存储介质。
背景技术
kaldi是一种强大的语音识别工具,目前,很多企业和研发中心均采用kaldi进行语音识别的研究和应用。但是,由于kaldi的使用对系统环境的要求较多,在搭建kaldi的语音识别环境时,需要安装众多第三方插件和工具,比如cuda(Compute Unified Device Architecture)、gst(GStreamer,用来构建流媒体应用的开源多媒体框架)、libatlas(Automatic Tuned Linear Algebra Software)等,安装过程繁琐且耗时巨大,不利于kaldi在不同终端上的部署和应用。
发明内容
基于此,有必要针对上述技术问题,提供一种可以提高语音识别工具部署效率的语音识别工具部署方法、装置、计算机设备及存储介质。
一种语音识别工具部署方法,包括:
在第一终端的应用容器引擎上安装操作系统镜像;
在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像;
通过所述第一终端的应用容器引擎导出工具环境镜像至第二终端的应用容器引擎上,以使所述第二终端的应用容器引擎运行所述工具环境镜像并工提供语音识别服务。
一种语音识别工具部署装置,包括:
系统镜像安装模块,用于在第一终端的应用容器引擎上安装操作系统镜像;
语音识别工具安装模块,用于在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像;
环境镜像导出模块,用于通过所述第一终端的应用容器引擎导出工具环境镜像至第二终端的应用容器引擎上,以使所述第二终端的应用容器引擎运行所述工具环境镜像并提供语音识别服务。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述语音识别工具部署方法的步骤。
一个或多个存储有计算机可读指令的非易失性可读存储介质,所述计算机可读存储介质存储有计算机可读指令,使得所述一个或多个处理器执行上述语音识别工具部署方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中语音识别工具部署方法的一应用环境示意图;
图2是本申请一实施例中语音识别工具部署方法的一流程图;
图3是本申请一实施例中语音识别工具部署方法步骤S102在一个应用场景下的流程图;
图4是本申请一实施例中语音识别工具部署方法步骤S204在一个应用场景下的流程图;
图5是本申请一实施例中语音识别工具部署方法在一个应用场景下检测kaldi重装次数的流程图;
图6是本申请一实施例中语音识别工具部署装置的结构示意图;
图7是本申请一实施例中计算机设备的一示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的语音识别工具部署方法,可应用在如图1的应用环境中,其中,第一终端和第二终端通过网络与服务器进行通信。其中,第一终端和第二终端可以包括但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和/或便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
需要说明的是,为了便于描述,本申请下述将以kaldi这一个典型的语音识别工具作为代表来详细描述该语音识别工具部署方法的具体内容,本领域技术人员应当可以理解的是,下述描述的内容不仅适用于kaldi,也同样适用于其它语音识别工具。
在一实施例中,如图2所示,提供一种语音识别工具部署方法,以该方法应用在图1中的服务器为例进行说明,包括如下步骤:
S101、在第一终端的应用容器引擎上安装操作系统镜像;
本实施例中,该应用容易引擎将以docker为例进行说明。docker是一个 开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后方便地将这些打包好的应用迁移至其它终端上。本申请正式利用docker的工作原理,将kaldi程序以及kaldi的依赖包打包到docker上制作kaldi环境镜像,通过迁移该kaldi环境镜像实现kaldi的快速部署和迁移。
首先,由于kaldi依赖于系统环境才能正常启动,因此,在安装kaldi和制作kaldi镜像之前,需要现在docker上安装一个操作系统镜像。这里所说的操作系统可以是Ubuntu、centos、oracle linux、windows等操作系统中的任意一种。该操作系统镜像可以通过网络下载获取得到,也可以直接从安装有该操作系统的终端上刻录得到,对此本实施例不作限定。
需要说明的是,该第一终端与下述的第二终端可以是指任意的两台不同的终端,“第一”和“第二”仅为区分两台不同终端的号码。一般来说,第一终端可以是kaldi环境镜像制作的源终端,第二终端则是需要将kaldi进行快速迁移的目标终端,因此,第一终端一般为一台即可,而第二终端可以是一台、两台甚至多台。本方案通过在一台第一终端上制作好kaldi环境镜像,可以将该kaldi环境镜像装载到多台第二终端上,实现kaldi的快速迁移和部署。
S102、在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像;
在docker上安装好操作系统镜像后,可以在该操作系统镜像上安装kaldi以及kaldi所需的依赖包,得到kaldi环境镜像,可知,该kaldi环境镜像位于docker上,其包含了操作系统镜像的数据以及kaldi程序相关的数据(kaldi程序和依赖包),也即kaldi程序以及其所依赖的环境数据。
需要说明的是,kaldi所需的依赖包具体可以包括apt-get、libtool、tornado,等等。这些依赖包是指kaldi程序正常运行时所依赖的程序或服务支持的安装包,现有的kaldi程序在安装时同样需要安装这些依赖包才可实现kaldi的正常装载。其中,apt-get,是一条linux命令,适用于deb包管理式的操作系统,主要用于自动从互联网的软件仓库中搜索、安装、升级、卸载软件或操作系统,其是用于安装kaldi所需的软件包;libtool主要的一个作用是在编译大型软件的过程中解决了库的依赖问题,本实施例中,libtool用于编译kaldi环境;Tornado是一种Web服务器软件的开源版本,其用于处理kaldi的解码环境。
进一步地,如图3所示,上述步骤S102具体可以包括:
S201、获取语音识别工具的安装包以及所述语音识别工具所需的依赖包;
S202、在所述第一终端的应用容器引擎上运行所述操作系统镜像以启动目标操作系统;
S203、在所述目标操作系统上安装所述语音识别工具的安装包;
S204、在成功安装所述语音识别工具的安装包之后,根据所述语音识别工具所需的依赖包的默认安装顺序依次且逐个安装所述语音识别工具所需的依赖包;
S205、在成功安装所述语音识别工具所需的依赖包之后,确定得到所述工具环境镜像。
对于步骤S201,可以理解的是,kaldi的安装包以及kaldi所需的依赖包可以通过网络下载得到,或者由工作人员预先准备。一般来说,kaldi的安装包以及依赖包会在制作kaldi环境镜像之前预先准备,本方案中,只需为第一终端准备kaldi的安装包以及依赖包即可,相比现有技术中需要为各个部署kaldi的终端均准备一套kaldi的安装包、依赖包,本方案无疑更加简便,节省成本。
对于步骤S202,可知,该第一终端的docker上安装操作系统镜像,在docker上安装操作系统镜像后,可以直接在docker上运行该操作系统镜像,相当于启动了该操作系统,即第一操作系统。
对于步骤S203,目标操作系统启动后,只需像现有kaldi的安装流程一样,将kaldi 的安装包安装到该目标操作系统上即可。
对于步骤S204,在成功安装所述kaldi的安装包之后,由于kaldi所需的依赖包之间一般具有严格的安装顺序,因此,安装依赖包时也需要根据该kaldi所需的依赖包的默认安装顺序依次且逐个安装这些依赖包,从而保证依赖包的正确安装,减少安装异常的情况出现。
更进一步地,如图4所示,上述步骤S204可以具体包括:
S301、获取所述语音识别工具所需的依赖包的默认安装顺序;
S302、确定所述默认安装顺序中排序第一的依赖包为当前依赖包;
S303、制作当前的目标操作系统的一个复制镜像作为最新的系统镜像;
S304、在当前的目标操作系统上安装所述当前依赖包;
S305、判断所述当前依赖包是否安装成功,若所述当前依赖包安装失败,则执行步骤S306,若所述当前依赖包是否安装成功,则执行步骤S308;
S306、在所述第一终端的应用容器引擎上运行最新的系统镜像来重新启动目标操作系统;
S307、在重启后的所述目标操作系统上安装所述当前依赖包,返回执行步骤S305;
S308、直到所述语音识别工具所需的所有依赖包均安装成功之前,根据所述默认安装顺序确定下一个依赖包作为当前依赖包,返回执行步骤S303。
对于步骤S301,kaldi所需的依赖包之间一般具有严格的安装顺序,因此,服务器可以直接将该安装顺序预先设为所述默认安装顺序即可。
对于步骤S302,本方法中需要根据该kaldi所需的依赖包的默认安装顺序依次且逐个安装这些依赖包,因此,第一个要安装的依赖包就是该默认安装顺序中排序第一的依赖包,将其作为当前依赖包。
对于步骤S303,本方法为了避免安装错误而污染了docker上的操作系统镜像,在安装每个当前依赖包之前,先制作当前的目标操作系统的一个复制镜像作为最新的系统镜像。这样,当发现某个依赖包安装错误时,可以直接退回至安装前的操作系统状态,提升了安装kaldi所需依赖包时的稳定性。需要说明的是,本方法中每成功安装一个依赖包后,均会返回步骤S303制作一个最新的系统镜像,最新制作的系统镜像会覆盖前一个系统镜像,相当于记录下成功安装依赖包的最新的操作系统,这样当某个依赖包安装失败后,就能退回到最近一次安装成功的操作系统状态,在保证安装依赖包稳定性的同时确保了安装的效率。
对于步骤S304,在准备好当前的目标操作系统的复制镜像后,可以在当前的目标操作系统上安装所述当前依赖包。
对于步骤S305,可以理解的是,每个依赖包安装后其均带有自检的程序,会向服务器反馈安装是否成功的信息,服务器获取到该信息后即可得知当前依赖包是否安装成功。
对于步骤S306和S307,可以理解的是,若所述当前依赖包安装失败,为了避免该依赖包安装过程中给该目标操作系统带来污染(比如残留安装文件)而导致后续依赖包也安装失败,本方法通过在所述第一终端的docker上运行最新的系统镜像来重新启动目标操作系统,将目标操作系统回复到安装当前依赖包之前的状态。然后,在重启后的所述目标操作系统上安装所述当前依赖包,再反馈执行步骤S305,再次判断重启后安装当前依赖包是否成功。
对于步骤S308,可以理解的是,若所述当前依赖包安装成功,则可以根据所述默认安装顺序确定下一个依赖包作为当前依赖包,然后返回执行步骤S303继续安装其它依赖包,直到所述kaldi所需的所有依赖包均安装成功。
由上述内容可知,通过上述步骤S301-S308,本方法可以实现根据所述kaldi所需的依赖包的默认安装顺序依次且逐个安装所述kaldi所需的依赖包,在保证安装依赖包稳定性的同时也确保了安装的效率,从而间接提升服务器制作kaldi环境镜像的成功率。
对于步骤S205,在成功安装kaldi安装包以及依赖包后,一般来说,docker上已经得到了kaldi的环境镜像了,因此,可以确定得到所述kaldi环境镜像。该kaldi环境镜像中打包了运行kaldi所需的操作系统、kaldi程序以及kaldi依赖包。
考虑到该kaldi环境镜像将要提供给其它终端(比如第二终端)进行部署,因此,需要在部署之前检测目标操作系统上的kaldi是否能正常启动来确保后续kaldi部署的安全。本实施例中,可以在所述目标操作系统上启动kaldi,若启动正常,则说明该第一终端docker上的kaldi环境镜像能正常使用,从而确定得到所述kaldi环境镜像;若启动失败,则说明该第一终端docker上的kaldi环境镜像无法正常使用,自动重新安装kaldi安装包和依赖包。具体地,在确定得到所述kaldi环境镜像之前,本方法还可以包括:检测在所述目标操作系统上是否正常启动kaldi,若否,则返回执行步骤S203,若是,则执行步骤S205。
更进一步地,如图5所示,在返回执行步骤S203之前,本方法还可以包括:
S401、累计语音识别工具重装次数加1;
S402、判断所述语音识别工具重装次数是否超过预设阈值,若否,则返回执行步骤 S203,若是,则执行步骤S403;
S403、反馈关于工具环境镜像制作失败的信息。
对于步骤S401,该kaldi重装次数用来统计本次制作kaldi镜像时重新安装kaldi程序以及kaldi所需的依赖包的次数。可知,每当检测到在所述目标操作系统上无法正常启动kaldi时,该kaldi重装次数累计加1。可以理解的是,该kaldi重装次数应当在适当的时候清零,可以在本方案运行结束后清零,也可以在步骤S403反馈关于kaldi环境镜像制作失败的信息后清零,具体可以根据实际使用情况确定,本实施例对此不作限定。
对于步骤S402至S403,可以理解的是,若kaldi重装次数过多,则可以认为本次kaldi环境镜像制作失败,避免过多消耗服务器的运行资源,应当告知管理员及时停止,或者服务器自动停止制作该kaldi环境镜像。因此,可以判断所述kaldi重装次数是否超过预设阈值,若所述kaldi重装次数不超过预设阈值,则可以返回执行上述步骤S203;反之,若所述kaldi重装次数超过预设阈值,则可以反馈关于kaldi环境镜像制作失败的信息,通知服务器的管理员进行检查处理。需要说明的是,该预设阈值可以在服务器上预先设定,比如设置为3,即当kaldi重装次数超过3次时,则认为本次kaldi环境镜像制作失败。
由上述内容可知,通过上述步骤S401-S403,本方法可以在kaldi重装次数过多时及时反馈,让服务器管理员第一时间得知并及时检查处理,避免过多消耗服务器的运行资源。
S103、通过所述第一终端的应用容器引擎导出工具环境镜像至第二终端的应用容器引擎上,以使所述第二终端的应用容器引擎运行所述工具环境镜像并提供语音识别服务。
本方案中,在确定得到kaldi环境镜像之后,即可通过第一终端的docker上的导出功能,将该kaldi环境镜像导出。可以理解的是,docker提供导出应用镜像的功能,这些从docker上导出的应用镜像可以完整地导入到其他终端的docker上,实现应用的快速迁移。本方案正是开创性地将docker这一特性应用到kaldi的迁移、部署上,该导出的kaldi环境镜像可以被导入至其他终端的docker上。
可以理解的是,在部署kaldi时,可以直接通过所述第一终端的docker导出kaldi环境镜像至第二终端的docker上,以使所述第二终端的docker运行所述kaldi环境镜像并提供语音识别服务。需要说明的是,这里的第二终端可以一个、两个或多个,由于kaldi环境镜像已经包含了kaldi运行所需的全部数据,因此,导入该kaldi环境镜像至第二终端的docker上后,当需要启动kaldi时,直接通过第二终端上的docker运行kaldi,即可通过docker的接口对外提供语音识别服务。可见,本方案可以实现kaldi的快速迁移和部署,尤其是当第二终端数量很多时,本方案的方法可以节省大量的时间和人力成本,使得大 量的第二终端可以在短时间内装载好kaldi程序并对外提供语音识别服务。
本实施例中,通过docker制作kaldi环境镜像,由于该kaldi环境镜像中已安装好kaldi以及kaldi所需的依赖包,从而将所述kaldi环境镜像导入至第二终端的docker上以后无需再安装kaldi或kaldi所需的依赖包,可以直接运行该kaldi环境镜像来提供语音识别服务,避免了kaldi在不同终端上部署时繁琐的安装过程,大大提高了kaldi的部署效率,有利于kaldi的推广应用。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种语音识别工具部署装置,该语音识别工具部署装置与上述实施例中语音识别工具语音识别工具部署方法一一对应。如图6所示,该语音识别工具语音识别工具部署装置包括系统镜像安装模块601、语音识别工具安装模块602和环境镜像导出模块603。各功能模块详细说明如下:
系统镜像安装模块601,用于在第一终端的应用容器引擎上安装操作系统镜像;
语音识别工具安装模块602,用于在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像;
环境镜像导出模块603,用于通过所述第一终端的应用容器引擎导出工具环境镜像至第二终端的应用容器引擎上,以使所述第二终端的应用容器引擎运行所述工具环境镜像并提供语音识别服务。
进一步地,所述语音识别工具安装模块可以包括:
第一获取单元,用于获取语音识别工具的安装包以及所述语音识别工具所需的依赖包;
操作系统启动单元,用于在所述第一终端的应用容器引擎上运行所述操作系统镜像以启动目标操作系统;
语音识别工具安装单元,用于在所述目标操作系统上安装所述语音识别工具的安装包;
依赖包安装单元,用于在成功安装所述语音识别工具的安装包之后,根据所述语音识别工具所需的依赖包的默认安装顺序依次且逐个安装所述语音识别工具所需的依赖包;
确定单元,用于在成功安装所述语音识别工具所需的依赖包之后,确定得到所述工具环境镜像。
进一步地,所述依赖包安装单元可以包括:
安装顺序获取子单元,用于获取所述语音识别工具所需的依赖包的默认安装顺序;
当前依赖包确定子单元,用于确定所述默认安装顺序中排序第一的依赖包为当前依赖包;
镜像复制子单元,用于制作当前的目标操作系统的一个复制镜像作为最新的系统镜像;
当前依赖包安装子单元,用于在当前的目标操作系统上安装所述当前依赖包;
判断子单元,用于判断所述当前依赖包是否安装成功;
第一处理子单元,用于若所述判断子单元的判断结果为否,则在所述第一终端的应用容器引擎上运行最新的系统镜像来重新启动目标操作系统,并在重启后的所述目标操作系统上安装所述当前依赖包,之后返回触发所述判断子单元;
第二处理子单元,用于若所述判断子单元的判断结果为是,则直到所述语音识别工具所需的所有依赖包均安装成功之前,根据所述默认安装顺序确定下一个依赖包作为当前依赖包,返回触发所述镜像复制子单元。
进一步地,所述语音识别工具安装模块还可以包括:
启动检测单元,用于检测在所述目标操作系统上是否正常启动语音识别工具;
返回触发单元,用于若所述启动检测单元检测到在所述目标操作系统上无法正常启动语音识别工具,则返回触发所述语音识别工具安装单元;
触发确定单元,用于若所述启动检测单元检测到在所述目标操作系统上正常启动语音识别工具,则返回触发所述确定单元。
进一步地,所述语音识别工具安装模块还可以包括:
次数累计单元,用于若所述启动检测单元检测到在所述目标操作系统上无法正常启动语音识别工具,累计语音识别工具重装次数加1;
次数判断单元,用于判断所述语音识别工具重装次数是否超过预设阈值;
第一触发单元,用于若所述次数判断单元的判断结果为否,则触发所述返回触发单元;
信息反馈单元,用于若所述次数判断单元的判断结果为是,则反馈关于工具环境镜像制作失败的信息。
关于语音识别工具部署装置的具体限定可以参见上文中对于语音识别工具部署方法的限定,在此不再赘述。上述语音识别工具部署装置中的各个模块可全部或部分通过软件、 硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图7所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储语音识别工具部署方法中涉及到的数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种语音识别工具部署方法。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中语音识别工具部署方法的步骤,例如图2所示的步骤S101至步骤S103。或者,处理器执行计算机可读指令时实现上述实施例中语音识别工具部署装置的各模块/单元的功能,例如图6所示模块601至模块603的功能。为避免重复,这里不再赘述。
在一个实施例中,提供了一种计算机可读存储介质,该一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行计算机可读指令时实现上述方法实施例中语音识别工具部署方法的步骤,或者,该一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行计算机可读指令时实现上述装置实施例中语音识别工具部署装置中各模块/单元的功能。为避免重复,这里不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM (DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种语音识别工具部署方法,其特征在于,包括:
    在第一终端的应用容器引擎上安装操作系统镜像;
    在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像;
    通过所述第一终端的应用容器引擎导出工具环境镜像至第二终端的应用容器引擎上,以使所述第二终端的应用容器引擎运行所述工具环境镜像并工提供语音识别服务。
  2. 根据权利要求1所述的语音识别工具部署方法,其特征在于,所述在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像包括:
    获取语音识别工具的安装包以及所述语音识别工具所需的依赖包;
    在所述第一终端的应用容器引擎上运行所述操作系统镜像以启动目标操作系统;
    在所述目标操作系统上安装所述语音识别工具的安装包;
    在成功安装所述语音识别工具的安装包之后,根据所述语音识别工具所需的依赖包的默认安装顺序依次且逐个安装所述语音识别工具所需的依赖包;
    在成功安装所述语音识别工具所需的依赖包之后,确定得到所述工具环境镜像。
  3. 根据权利要求2所述的语音识别工具部署方法,其特征在于,所述根据所述语音识别工具所需的依赖包的默认安装顺序依次且逐个安装所述语音识别工具所需的依赖包包括:
    获取所述语音识别工具所需的依赖包的默认安装顺序;
    确定所述默认安装顺序中排序第一的依赖包为当前依赖包;
    制作当前的目标操作系统的一个复制镜像作为最新的系统镜像;
    在当前的目标操作系统上安装所述当前依赖包;
    判断所述当前依赖包是否安装成功;
    若所述当前依赖包安装失败,则在所述第一终端的应用容器引擎上运行最新的系统镜像来重新启动目标操作系统,并在重启后的所述目标操作系统上安装所述当前依赖包,之后返回执行判断所述当前依赖包是否安装成功的步骤;
    若所述当前依赖包安装成功,则直到所述语音识别工具所需的所有依赖包均安装成功之前,根据所述默认安装顺序确定下一个依赖包作为当前依赖包,之后返回执行制作当前的目标操作系统的一个复制镜像作为最新的系统镜像的步骤。
  4. 根据权利要求2或3所述的语音识别工具部署方法,其特征在于,在确定得到所述工具环境镜像之前,还包括:
    检测在所述目标操作系统上是否正常启动语音识别工具;
    若检测到在所述目标操作系统上无法正常启动语音识别工具,则返回执行所述在所述目标操作系统上安装所述语音识别工具的安装包的步骤;
    若检测到在所述目标操作系统上正常启动语音识别工具,则执行确定得到所述工具环境镜像的步骤。
  5. 根据权利要求4所述的语音识别工具部署方法,其特征在于,在返回执行所述在所述目标操作系统上安装所述语音识别工具的安装包的步骤之前,还包括:
    累计语音识别工具重装次数加1;
    判断所述语音识别工具重装次数是否超过预设阈值;
    若所述语音识别工具重装次数不超过预设阈值,则返回执行所述在所述目标操作系统上安装所述语音识别工具的安装包的步骤;
    若所述语音识别工具重装次数超过预设阈值,则反馈关于工具环境镜像制作失败的信息。
  6. 一种语音识别工具部署装置,其特征在于,包括:
    系统镜像安装模块,用于在第一终端的应用容器引擎上安装操作系统镜像;
    语音识别工具安装模块,用于在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像;
    环境镜像导出模块,用于通过所述第一终端的应用容器引擎导出所述工具环境镜像至第二终端的应用容器引擎上,以使所述第二终端的应用容器引擎运行所述工具环境镜像并提供语音识别服务。
  7. 根据权利要求6所述的语音识别工具部署装置,其特征在于,所述语音识别工具安装模块包括:
    第一获取单元,用于获取语音识别工具的安装包以及所述语音识别工具所需的依赖包;
    操作系统启动单元,用于在所述第一终端的应用容器引擎上运行所述操作系统镜像以启动目标操作系统;
    语音识别工具安装单元,用于在所述目标操作系统上安装所述语音识别工具的安装包;
    依赖包安装单元,用于在成功安装所述语音识别工具的安装包之后,根据所述语音识别工具所需的依赖包的默认安装顺序依次且逐个安装所述语音识别工具所需的依赖包;
    确定单元,用于在成功安装所述语音识别工具所需的依赖包之后,确定得到所述工具环境镜像。
  8. 根据权利要求7所述的语音识别工具部署装置,其特征在于,所述依赖包安装单元包括:
    安装顺序获取子单元,用于获取所述语音识别工具所需的依赖包的默认安装顺序;
    当前依赖包确定子单元,用于确定所述默认安装顺序中排序第一的依赖包为当前依赖包;
    镜像复制子单元,用于制作当前的目标操作系统的一个复制镜像作为最新的系统镜像;
    当前依赖包安装子单元,用于在当前的目标操作系统上安装所述当前依赖包;
    判断子单元,用于判断所述当前依赖包是否安装成功;
    第一处理子单元,用于若所述判断子单元的判断结果为否,则在所述第一终端的应用容器引擎上运行最新的系统镜像来重新启动目标操作系统,并在重启后的所述目标操作系统上安装所述当前依赖包,之后返回触发所述判断子单元;
    第二处理子单元,用于若所述判断子单元的判断结果为是,则直到所述语音识别工具所需的所有依赖包均安装成功之前,根据所述默认安装顺序确定下一个依赖包作为当前依赖包,返回触发所述镜像复制子单元。
  9. 根据权利要求7或8所述的语音识别工具部署装置,其特征在于,所述语音识别工具安装模块还包括:
    启动检测单元,用于检测在所述目标操作系统上是否正常启动语音识别工具;
    返回触发单元,用于若所述启动检测单元检测到在所述目标操作系统上无法正常启动语音识别工具,则返回触发所述语音识别工具安装单元;
    触发确定单元,用于若所述启动检测单元检测到在所述目标操作系统上正常启动语音识别工具,则返回触发所述确定单元。
  10. 根据权利要求9所述的语音识别工具部署装置,其特征在于,所述语音识别工具安装模块还包括:
    次数累计单元,用于若所述启动检测单元检测到在所述目标操作系统上无法正常启动语音识别工具,累计语音识别工具重装次数加1;
    次数判断单元,用于判断所述语音识别工具重装次数是否超过预设阈值;
    第一触发单元,用于若所述次数判断单元的判断结果为否,则触发所述返回触发单元;
    信息反馈单元,用于若所述次数判断单元的判断结果为是,则反馈关于工具环境镜像制作失败的信息。
  11. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    在第一终端的应用容器引擎上安装操作系统镜像;
    在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像;
    通过所述第一终端的应用容器引擎导出工具环境镜像至第二终端的应用容器引擎上,以使所述第二终端的应用容器引擎运行所述工具环境镜像并工提供语音识别服务。
  12. 根据权利要求11所述的计算机设备,其特征在于,所述在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像包括:
    获取语音识别工具的安装包以及所述语音识别工具所需的依赖包;
    在所述第一终端的应用容器引擎上运行所述操作系统镜像以启动目标操作系统;
    在所述目标操作系统上安装所述语音识别工具的安装包;
    在成功安装所述语音识别工具的安装包之后,根据所述语音识别工具所需的依赖包的默认安装顺序依次且逐个安装所述语音识别工具所需的依赖包;
    在成功安装所述语音识别工具所需的依赖包之后,确定得到所述工具环境镜像。
  13. 根据权利要求12所述的计算机设备,其特征在于,所述根据所述语音识别工具所需的依赖包的默认安装顺序依次且逐个安装所述语音识别工具所需的依赖包包括:
    获取所述语音识别工具所需的依赖包的默认安装顺序;
    确定所述默认安装顺序中排序第一的依赖包为当前依赖包;
    制作当前的目标操作系统的一个复制镜像作为最新的系统镜像;
    在当前的目标操作系统上安装所述当前依赖包;
    判断所述当前依赖包是否安装成功;
    若所述当前依赖包安装失败,则在所述第一终端的应用容器引擎上运行最新的系统镜像来重新启动目标操作系统,并在重启后的所述目标操作系统上安装所述当前依赖包,之后返回执行判断所述当前依赖包是否安装成功的步骤;
    若所述当前依赖包安装成功,则直到所述语音识别工具所需的所有依赖包均安装成功之前,根据所述默认安装顺序确定下一个依赖包作为当前依赖包,之后返回执行制作当前的目标操作系统的一个复制镜像作为最新的系统镜像的步骤。
  14. 根据权利要求12或13所述的计算机设备,其特征在于,在确定得到所述工具环境镜像之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    检测在所述目标操作系统上是否正常启动语音识别工具;
    若检测到在所述目标操作系统上无法正常启动语音识别工具,则返回执行所述在所述目标操作系统上安装所述语音识别工具的安装包的步骤;
    若检测到在所述目标操作系统上正常启动语音识别工具,则执行确定得到所述工具环境镜像的步骤。
  15. 根据权利要求14所述的计算机设备,其特征在于,在返回执行所述在所述目标操作系统上安装所述语音识别工具的安装包的步骤之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    累计语音识别工具重装次数加1;
    判断所述语音识别工具重装次数是否超过预设阈值;
    若所述语音识别工具重装次数不超过预设阈值,则返回执行所述在所述目标操作系统上安装所述语音识别工具的安装包的步骤;
    若所述语音识别工具重装次数超过预设阈值,则反馈关于工具环境镜像制作失败的信息。
  16. 一个或多个存储有计算机可读指令的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    在第一终端的应用容器引擎上安装操作系统镜像;
    在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像;
    通过所述第一终端的应用容器引擎导出工具环境镜像至第二终端的应用容器引擎上,以使所述第二终端的应用容器引擎运行所述工具环境镜像并工提供语音识别服务。
  17. 根据权利要求16所述的非易失性可读存储介质,其特征在于,所述在所述操作系统镜像上安装语音识别工具以及语音识别工具所需的依赖包,得到工具环境镜像包括:
    获取语音识别工具的安装包以及所述语音识别工具所需的依赖包;
    在所述第一终端的应用容器引擎上运行所述操作系统镜像以启动目标操作系统;
    在所述目标操作系统上安装所述语音识别工具的安装包;
    在成功安装所述语音识别工具的安装包之后,根据所述语音识别工具所需的依赖包的默认安装顺序依次且逐个安装所述语音识别工具所需的依赖包;
    在成功安装所述语音识别工具所需的依赖包之后,确定得到所述工具环境镜像。
  18. 根据权利要求17所述的非易失性可读存储介质,其特征在于,所述根据所述语音识别工具所需的依赖包的默认安装顺序依次且逐个安装所述语音识别工具所需的依赖包包括:
    获取所述语音识别工具所需的依赖包的默认安装顺序;
    确定所述默认安装顺序中排序第一的依赖包为当前依赖包;
    制作当前的目标操作系统的一个复制镜像作为最新的系统镜像;
    在当前的目标操作系统上安装所述当前依赖包;
    判断所述当前依赖包是否安装成功;
    若所述当前依赖包安装失败,则在所述第一终端的应用容器引擎上运行最新的系统镜像来重新启动目标操作系统,并在重启后的所述目标操作系统上安装所述当前依赖包,之后返回执行判断所述当前依赖包是否安装成功的步骤;
    若所述当前依赖包安装成功,则直到所述语音识别工具所需的所有依赖包均安装成功之前,根据所述默认安装顺序确定下一个依赖包作为当前依赖包,之后返回执行制作当前的目标操作系统的一个复制镜像作为最新的系统镜像的步骤。
  19. 根据权利要求17或18所述的非易失性可读存储介质,其特征在于,在确定得到所述工具环境镜像之前,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    检测在所述目标操作系统上是否正常启动语音识别工具;
    若检测到在所述目标操作系统上无法正常启动语音识别工具,则返回执行所述在所述目标操作系统上安装所述语音识别工具的安装包的步骤;
    若检测到在所述目标操作系统上正常启动语音识别工具,则执行确定得到所述工具环境镜像的步骤。
  20. 根据权利要求19所述的非易失性可读存储介质,其特征在于,在返回执行所述在所述目标操作系统上安装所述语音识别工具的安装包的步骤之前,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    累计语音识别工具重装次数加1;
    判断所述语音识别工具重装次数是否超过预设阈值;
    若所述语音识别工具重装次数不超过预设阈值,则返回执行所述在所述目标操作系统上安装所述语音识别工具的安装包的步骤;
    若所述语音识别工具重装次数超过预设阈值,则反馈关于工具环境镜像制作失败的信息。
PCT/CN2018/106270 2018-07-04 2018-09-18 语音识别工具部署方法、装置、计算机设备及存储介质 WO2020006880A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810721797.2A CN109243464A (zh) 2018-07-04 2018-07-04 语音识别工具部署方法、装置、计算机设备及存储介质
CN201810721797.2 2018-07-04

Publications (1)

Publication Number Publication Date
WO2020006880A1 true WO2020006880A1 (zh) 2020-01-09

Family

ID=65071808

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/106270 WO2020006880A1 (zh) 2018-07-04 2018-09-18 语音识别工具部署方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN109243464A (zh)
WO (1) WO2020006880A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527418A (zh) * 2020-12-11 2021-03-19 杭州安恒信息技术股份有限公司 一种npm包获取方法、装置、电子设备和存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816550A (zh) * 2022-05-31 2022-07-29 浪潮(山东)计算机科技有限公司 一种计算机的操作系统与软件灌装方法及相关组件

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155778A (zh) * 2016-07-07 2016-11-23 中国科学院声学研究所 一种应用容器的启动方法及系统
CN107220100A (zh) * 2016-03-22 2017-09-29 中国移动(深圳)有限公司 一种开发运维方法、装置及云计算PaaS平台
CN107733985A (zh) * 2017-09-14 2018-02-23 广州西麦科技股份有限公司 一种云计算系统功能组件部署方法及装置
EP3301581A1 (en) * 2016-09-28 2018-04-04 Wipro Limited Methods and systems for testing mobile applications

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102970305B (zh) * 2012-12-07 2015-12-23 成都康禾科技有限公司 一种适用于自动安装软件的部署方法
CN105490860B (zh) * 2015-12-24 2019-03-05 北京奇虎科技有限公司 部署应用程序运行环境的方法、装置及系统
CN106294157A (zh) * 2016-08-11 2017-01-04 浪潮(北京)电子信息产业有限公司 一种操作系统测试方法及装置
CN106897093A (zh) * 2017-02-24 2017-06-27 郑州云海信息技术有限公司 一种windows操作系统的部署方法及装置
CN107391173A (zh) * 2017-06-14 2017-11-24 北京康得新创科技股份有限公司 应用程序的更新方法、存储介质和终端
CN107171874B (zh) * 2017-07-21 2020-02-18 维沃移动通信有限公司 一种语音引擎切换方法、移动终端及服务器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220100A (zh) * 2016-03-22 2017-09-29 中国移动(深圳)有限公司 一种开发运维方法、装置及云计算PaaS平台
CN106155778A (zh) * 2016-07-07 2016-11-23 中国科学院声学研究所 一种应用容器的启动方法及系统
EP3301581A1 (en) * 2016-09-28 2018-04-04 Wipro Limited Methods and systems for testing mobile applications
CN107733985A (zh) * 2017-09-14 2018-02-23 广州西麦科技股份有限公司 一种云计算系统功能组件部署方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YING, YI ET AL.: "Docker (Constructing Big Data Laboratory Using Docker Container Technology)", RESEARCH AND EXPLORATION IN LABORATORY, vol. 37, no. 2, 28 February 2018 (2018-02-28), ISSN: 1006-7167 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527418A (zh) * 2020-12-11 2021-03-19 杭州安恒信息技术股份有限公司 一种npm包获取方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN109243464A (zh) 2019-01-18

Similar Documents

Publication Publication Date Title
US10701084B2 (en) Reliable and secure firmware update with a dynamic validation for internet of things (IoT) devices
US8782643B2 (en) Device and method for controlling communication between BIOS and BMC
AU2012276003B2 (en) Virtual machine migration tool
US10678533B2 (en) Enhanced server farm patching system for enabling developers to override off-peak patching schedules
US9038059B2 (en) Automatically targeting application modules to individual machines and application framework runtimes instances
WO2018045733A1 (zh) 一种安卓系统so文件的加载方法及电子设备
US9747438B2 (en) Enabling resource access for secure application containers
US10514904B2 (en) Dynamically applying a patch to a computer application
AU2012276003A1 (en) Virtual machine migration tool
US9690564B2 (en) Runtime detection of software configurations and upgrades
US20160328227A1 (en) Dynamically Applying A Software Patch To A Computer Program
CN110928653A (zh) 跨集群任务的执行方法、装置、计算机设备和存储介质
WO2020006880A1 (zh) 语音识别工具部署方法、装置、计算机设备及存储介质
CN113835713B (zh) 源码包下载方法、装置、计算机设备和存储介质
US10338914B2 (en) Dynamically applying a patch to a shared library
CN109189499B (zh) Java程序的管理方法、装置、计算机设备及存储介质
CN105242981A (zh) 一种Kdump的配置方法及计算机设备
CN106708550B (zh) 一种共享对象库加载的方法及装置
WO2016131294A1 (zh) 版本升级处理方法及装置
WO2023087622A1 (zh) 虚拟机引导的配置方法、装置、计算机设备和存储介质
CN111352631A (zh) 一种接口兼容性检测方法及装置
CN114356658A (zh) 固件升级异常的处理方法、计算机设备以及可读存储介质
WO2016124102A1 (zh) 一种服务管理方法和装置
CN116149707B (zh) 分布式系统的升级风险检测和规避方法及装置
US11354138B1 (en) Optimizing plugin loading

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18925548

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18925548

Country of ref document: EP

Kind code of ref document: A1