WO2021047003A1 - Text positioning method, apparatus, device, and storage medium - Google Patents

Text positioning method, apparatus, device, and storage medium Download PDF

Info

Publication number
WO2021047003A1
WO2021047003A1 PCT/CN2019/116470 CN2019116470W WO2021047003A1 WO 2021047003 A1 WO2021047003 A1 WO 2021047003A1 CN 2019116470 W CN2019116470 W CN 2019116470W WO 2021047003 A1 WO2021047003 A1 WO 2021047003A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
character
context model
array
characters
Prior art date
Application number
PCT/CN2019/116470
Other languages
French (fr)
Chinese (zh)
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 WO2021047003A1 publication Critical patent/WO2021047003A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06398Performance of employee with respect to a job function
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/01Customer relationship services
    • G06Q30/015Providing customer assistance, e.g. assisting a customer within a business location or via helpdesk
    • G06Q30/016After-sales
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0281Customer communication at a business location, e.g. providing product or service information, consulting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/26Speech to text systems

Abstract

The present application relates to the field of fintech. Disclosed in the present application are a text positioning method, an apparatus, a device, and a storage medium. The text positioning method comprises: acquiring audio recording content, and performing speech recognition processing on the audio recording content so as to obtain text to be positioned; acquiring a standard script text, and constructing a distance context model according to the standard script text; and obtaining and selecting a text segment according to the distance context model and the text to be positioned. The present application solves the technical problem in the prior art in which text quality inspection content requiring evaluation cannot be quickly positioned.

Description

文本定位方法、装置、设备及存储介质 Text positioning method, device, equipment and storage medium To
本申请要求于2019年9月9日提交中国专利局、申请号为201910851802.6、发明名称为“文本定位方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 201910851802.6, and the invention title is "text positioning method, device, equipment and storage medium" on September 9, 2019, the entire content of which is incorporated by reference Applying.
技术领域Technical field
本申请涉及金融科技技术领域,尤其涉及一种文本定位方法、装置、设备及存储介质。This application relates to the technical field of financial technology, and in particular to a text positioning method, device, equipment and storage medium.
背景技术Background technique
随着计算机技术的发展,越来越多的技术(大数据、分布式、区块链Blockchain、人工智能等)应用在金融领域,传统金融工业正在逐步向金融科技(Fintech)转变,但由于金融行业的安全性、实时性要求,也对技术提出了更高的要求。With the development of computer technology, more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are applied in the financial field. The traditional financial industry is gradually transforming to Fintech. However, due to financial The industry's security and real-time requirements also place higher requirements on technology.
目前客服行业的质检考核过程通常需要靠人工抽查客服录音,而人为操作往往具有一定的主观性和局限性,无法全面客观的对客服服务质量进行之间评估;同时,人工抽查可能一直抽查到服务质量差的录音,引起质检失衡,造成抽查不精准;并且人工抽查需要质检人员一字一句进行评估,而语音录音中可能包含有大量其他无关信息,导致无法快速定位到要评估的文本质检内容,从而造成质检人员无法快速定位到要评估的文本内容,即现有技术文本定位功能的定位精确度低,文本定位效率低下,间接降低了质检工作质量和质检效率。At present, the quality inspection and evaluation process of the customer service industry usually requires manual random inspection of customer service recordings, and human operations often have certain subjectiveness and limitations, and cannot comprehensively and objectively evaluate the quality of customer service services; at the same time, manual random inspections may always be spot-checked Poor service quality recordings cause quality inspection imbalances, resulting in inaccurate spot checks; and manual spot checks require quality inspectors to evaluate each word, and voice recordings may contain a lot of other irrelevant information, which makes it impossible to quickly locate the text to be evaluated. Quality inspection content, resulting in the inability of quality inspectors to quickly locate the text content to be evaluated, that is, the prior art text positioning function has low positioning accuracy and low text positioning efficiency, which indirectly reduces the quality of quality inspection work and the efficiency of quality inspection.
因此,如何实现高精度的文本定位,提高文本定位效率,是当前亟待解决的技术问题。Therefore, how to achieve high-precision text positioning and improve text positioning efficiency is a technical problem that needs to be solved urgently.
发明内容Summary of the invention
本申请的主要目的在于提供一种文本定位方法、装置、设备及存储介质,旨在解决无法快速定位到要评估的文本质检内容的技术问题。The main purpose of this application is to provide a text positioning method, device, equipment and storage medium, aiming to solve the technical problem that the text quality inspection content to be evaluated cannot be quickly located.
为实现上述目的,本申请实施例提供一种文本定位方法,所述文本定位方法包括:To achieve the foregoing objective, an embodiment of the present application provides a text locating method, the text locating method includes:
获取录音内容,对所述录音内容进行语音识别处理,以获得待定位文本;Acquiring the recording content, and performing voice recognition processing on the recording content to obtain the text to be located;
获取标准话术文本,并根据所述标准话术文本构建距离上下文模型;Obtaining the standard speech text, and constructing a distance context model based on the standard speech text;
根据所述距离上下文模型和所述待定位文本,获得候选文本片段。According to the distance context model and the text to be located, candidate text segments are obtained.
可选地,所述根据所述标准话术文本构建距离上下文模型的步骤包括:Optionally, the step of constructing a distance context model based on the standard speech text includes:
获取所述标准话术文本的文本字符;Acquiring text characters of the standard speech text;
对所述文本字符进行阶跃处理,以获取各个文本字符的第一阶跃数组;Performing step processing on the text characters to obtain a first step array of each text character;
根据所述第一阶跃数组进行列表排序,以构建距离上下文模型。Perform list sorting according to the first step array to construct a distance context model.
可选地,所述根据所述距离上下文模型和所述待定位文本,获得候选文本片段的步骤包括:Optionally, the step of obtaining candidate text fragments according to the distance context model and the text to be located includes:
根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符,并确定所述文本字符的目标定位范围;Acquiring text characters that meet a preset distance range in the text to be located according to the distance context model, and determining a target location range of the text characters;
将所述目标定位范围内的目标字符确定为候选文本片段。The target character in the target positioning range is determined as a candidate text segment.
可选地,所述根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符的步骤包括:Optionally, the step of obtaining text characters that meet a preset distance range in the text to be located according to the distance context model includes:
根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列;Performing character traversal in the text to be located according to the first step array, so as to obtain a character sequence that meets a preset distance range from the text to be located;
获取所述字符序列中序列长度最长的目标字符序列;Obtaining a target character sequence with the longest sequence length in the character sequence;
将所述目标字符序列对应的待定位文本确认为文本字符。The to-be-positioned text corresponding to the target character sequence is confirmed as a text character.
可选地,所述根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列的步骤还包括:Optionally, the step of performing character traversal in the text to be located according to the first step array to obtain a character sequence that meets a preset distance range from the text to be located further includes:
获取所述待定位文本的上文文本;Obtaining the above text of the text to be located;
根据所述上文文本进行阶跃计算,以获得第二阶跃数组;Perform step calculation according to the above text to obtain the second step array;
根据所述第一阶跃数组和第二阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。Perform character traversal in the text to be located according to the first step array and the second step array, so as to obtain a character sequence that meets a preset distance range from the text to be located.
可选地,所述根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列的步骤还包括:Optionally, the step of performing character traversal in the text to be located according to the first step array to obtain a character sequence that meets a preset distance range from the text to be located further includes:
获取所述待定位文本的下文文本;Obtaining the following text of the text to be located;
根据所述下文文本进行阶跃计算,以获得第三阶跃数组;Perform step calculation according to the following text to obtain the third step array;
根据所述第一阶跃数组和第三阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。Perform character traversal in the text to be located according to the first step array and the third step array, so as to obtain a character sequence that meets a preset distance range from the text to be located.
可选地,所述根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列的步骤还包括:Optionally, the step of performing character traversal in the text to be located according to the first step array to obtain a character sequence that meets a preset distance range from the text to be located further includes:
获取所述待定位文本的上文文本,并获取所述待定位文本的下文文本;Acquiring the above text of the text to be located, and acquiring the following text of the text to be located;
根据所述上文文本进行阶跃计算,以获得第二阶跃数组,并根据所述下文文本进行阶跃计算,以获得第三阶跃数组;Perform step calculation according to the above text to obtain a second step array, and perform step calculation according to the following text to obtain a third step array;
根据所述第一阶跃数组、第二阶跃数组和第三阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。Perform character traversal in the text to be located according to the first step array, the second step array, and the third step array, so as to obtain a character sequence that meets a preset distance range from the text to be located.
本申请还提供一种文本定位装置,所述文本定位装置包括:The present application also provides a text positioning device, the text positioning device includes:
识别模块,用于获取录音内容,对所述录音内容进行语音识别处理,以获得待定位文本;The recognition module is used to obtain the recording content, and perform voice recognition processing on the recording content to obtain the text to be located;
构建模块,用于获取标准话术文本,并根据所述标准话术文本构建距离上下文模型;A building module for obtaining standard speech texts, and constructing a distance context model based on the standard speech texts;
获取模块,用于根据所述距离上下文模型和所述待定位文本,获得候选文本片段。The obtaining module is used to obtain candidate text fragments according to the distance context model and the text to be located.
可选地,所述构建模块包括:Optionally, the building module includes:
获取子模块,用于获取所述标准话术文本的文本字符;An obtaining sub-module for obtaining text characters of the standard speech text;
阶跃子模块,用于对所述文本字符进行阶跃处理,以获取各个文本字符的第一阶跃数组;The step submodule is used to perform step processing on the text characters to obtain the first step array of each text character;
构建子模块,用于根据所述第一阶跃数组进行列表排序,以构建距离上下文模型。The construction sub-module is used to sort the list according to the first step array to construct a distance context model.
可选地,所述获取模块包括:Optionally, the acquisition module includes:
第一确定子模块,用于根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符,并确定所述文本字符的目标定位范围;The first determining sub-module is configured to obtain text characters that meet a preset distance range in the text to be located according to the distance context model, and determine the target location range of the text characters;
第二确定子模块,用于将所述目标定位范围内的目标字符确定为候选文本片段。The second determining sub-module is used to determine the target character in the target positioning range as a candidate text segment.
可选地,所述第一确定子模块包括:Optionally, the first determining submodule includes:
遍历单元,用于根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列;A traversal unit, configured to perform character traversal in the text to be located according to the first step array, so as to obtain a character sequence that meets a preset distance range from the text to be located;
获取单元,用于获取所述字符序列中序列长度最长的目标字符序列;An obtaining unit for obtaining a target character sequence with the longest sequence length in the character sequence;
确认单元,用于将所述目标字符序列对应的待定位文本确认为文本字符。The confirming unit is used to confirm the to-be-located text corresponding to the target character sequence as a text character.
可选地,所述遍历单元还包括:Optionally, the traversal unit further includes:
第一获取子单元,用于获取所述待定位文本的上文文本;The first obtaining subunit is used to obtain the above text of the text to be located;
第一阶跃子单元,用于根据所述上文文本进行阶跃计算,以获得第二阶跃数组;The first step subunit is used to perform step calculation according to the above text to obtain the second step array;
第一遍历子单元,用于根据所述第一阶跃数组和第二阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。The first traversal subunit is configured to perform character traversal in the text to be located according to the first step array and the second step array, so as to obtain a character sequence that meets a preset distance range from the text to be located .
可选地,所述遍历单元还包括:Optionally, the traversal unit further includes:
第二获取子单元,用于获取所述待定位文本的下文文本;The second obtaining subunit is used to obtain the following text of the text to be located;
第二跃阶子单元,用于根据所述下文文本进行阶跃计算,以获得第三阶跃数组;The second step subunit is used to perform step calculation according to the following text to obtain the third step array;
第二遍历子单元,用于根据所述第一阶跃数组和第三阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。The second traversal subunit is configured to perform character traversal in the text to be located according to the first step array and the third step array, so as to obtain a character sequence that meets a preset distance range from the text to be located .
可选地,所述遍历单元还包括:Optionally, the traversal unit further includes:
第三获取子单元,用于获取所述待定位文本的上文文本,并获取所述待定位文本的下文文本;The third obtaining subunit is used to obtain the above text of the text to be located, and obtain the following text of the text to be located;
第三跃阶子单元,用于根据所述上文文本进行阶跃计算,以获得第二阶跃数组,并根据所述下文文本进行阶跃计算,以获得第三阶跃数组;The third step subunit is used to perform step calculation according to the above text to obtain a second step array, and perform step calculation according to the following text to obtain a third step array;
第三遍历子单元,用于根据所述第一阶跃数组、第二阶跃数组和第三阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。The third traversal subunit is used to perform character traversal in the text to be located according to the first step array, the second step array, and the third step array, so as to obtain the pre-aligned text from the text to be located. Set the character sequence of the distance range.
此外,为实现上述目的,本申请还提供一种设备,所述设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,其中:In addition, in order to achieve the above object, the present application also provides a device, the device including: a memory, a processor, and computer-readable instructions stored on the memory and running on the processor, wherein:
所述计算机可读指令被所述处理器执行时实现如上所述的文本定位方法的步骤。When the computer-readable instructions are executed by the processor, the steps of the text positioning method as described above are realized.
此外,为实现上述目的,本申请还提供计算机存储介质;In addition, in order to achieve the above purpose, this application also provides a computer storage medium;
所述计算机存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如上述的文本定位方法的步骤。The computer storage medium stores computer readable instructions, and when the computer readable instructions are executed by a processor, the steps of the text positioning method as described above are realized.
本申请获取录音内容,对所述录音内容进行语音识别处理,以获得待定位文本;获取标准话术文本,并根据所述标准话术文本构建距离上下文模型;根据所述距离上下文模型和所述待定位文本,获得候选文本片段。通过以上方案,实现了高精度的语音文本定位,提高了文本定位效率,解决了现有技术无法快速定位到要评估的文本定位内容的技术问题,间接提高了质检工作质量和质检效率。This application obtains the recording content, performs speech recognition processing on the recording content to obtain the text to be located; obtains the standard speech text, and constructs a distance context model according to the standard speech text; according to the distance context model and the The text to be located is obtained, and candidate text fragments are obtained. Through the above solution, high-precision voice and text positioning is realized, the efficiency of text positioning is improved, the technical problem that the existing technology cannot quickly locate the text positioning content to be evaluated is solved, and the quality of quality inspection work and the efficiency of quality inspection are indirectly improved.
附图说明Description of the drawings
图1为本申请实施例方案涉及的硬件运行环境的设备结构示意图;FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the application;
图2为本申请文本定位方法一实施例的流程示意图。FIG. 2 is a schematic flowchart of an embodiment of a text positioning method of this application.
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional characteristics and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the application, and not used to limit the application.
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图。As shown in FIG. 1, FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
本申请实施例设备可以是PC机或服务器设备。The device in the embodiment of the present application may be a PC or a server device.
如图1所示,该设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1, the device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as disk storage. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the device shown in FIG. 1 does not constitute a limitation on the device, and may include more or fewer components than those shown in the figure, or a combination of certain components, or different component arrangements.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及计算机可读指令。As shown in FIG. 1, a memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and computer readable instructions.
在图1所示的设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的计算机可读指令,并执行下述文本定位方法各个实施例中的操作。In the device shown in Figure 1, the network interface 1004 is mainly used to connect to the back-end server and communicate with the back-end server; the user interface 1003 is mainly used to connect to the client (user side) to communicate with the client; and the processor 1001 can be used to call computer-readable instructions stored in the memory 1005, and perform operations in each embodiment of the text positioning method described below.
基于上述硬件结构,提出本申请文本定位方法实施例。Based on the foregoing hardware structure, an embodiment of the text positioning method of the present application is proposed.
本申请属于金融科技领域(Fintech),本申请提供一种文本定位方法,该文本定位方法主要应用于设备上,在文本定位方法一实施例中,参照图2,所述文本定位方法包括:This application belongs to the field of financial technology (Fintech). This application provides a text positioning method, which is mainly applied to devices. In an embodiment of the text positioning method, referring to FIG. 2, the text positioning method includes:
步骤S10,获取录音内容,对所述录音内容进行语音识别处理,以获得待定位文本;Step S10: Obtain the recording content, and perform voice recognition processing on the recording content to obtain the text to be located;
步骤S20,获取标准话术文本,并根据所述标准话术文本构建距离上下文模型;Step S20: Obtain a standard speech text, and construct a distance context model based on the standard speech text;
步骤S30,根据所述距离上下文模型和所述待定位文本,获得候选文本片段。Step S30: Obtain candidate text fragments according to the distance context model and the text to be located.
具体内容如下:The specific content is as follows:
步骤S10,获取录音内容,对所述录音内容进行语音识别处理,以获得待定位文本;Step S10: Obtain the recording content, and perform voice recognition processing on the recording content to obtain the text to be located;
在本实施例中录音内容包括客服录音。通常地,客服在与客户沟通的过程中会留存有客服录音,设备将对该客服录音进行语音识别,以将客服录音转化为待定位文本。需要说明的是,由于质检对象是客服,故待定位文本是指一通录音内容中语音转化的文本,而非用户的语音转成的文本。In this embodiment, the recording content includes customer service recording. Generally, customer service recordings are stored in the process of customer service communication with customers, and the device will perform voice recognition on the customer service recordings to convert the customer service recordings into text to be located. It should be noted that since the subject of quality inspection is customer service, the text to be located refers to the text converted from the voice in the recording content, not the text converted from the user's voice.
步骤S20,获取标准话术文本,并根据所述标准话术文本构建距离上下文模型;Step S20: Obtain a standard speech text, and construct a distance context model based on the standard speech text;
所述标准话术文本指的是质检过程中要求待检测文本中必须附带的预定质检话术,即待检测文本中需要具备预定话术的话术样本,因此标准话术文本是检测待检测文本中是否有预定话术的参考标准,也就是说,标准话术文本用于检测待检测文本中是否存在该标准话术文本。例如,“感谢您的申请和配合”。获取该标准话术文本可对待检测文本进行文本定位。The standard speech text refers to the predetermined quality control speech that must be attached to the text to be tested during the quality inspection process, that is, the text to be tested needs to have a sample of the predetermined speech, so the standard speech text is the text to be tested. Whether there is a reference standard for predetermined phonetics in the text, that is, the standard phonetic text is used to detect whether the standard phonetic text exists in the text to be detected. For example, "Thank you for your application and cooperation." Obtaining the standard speech text can be used to locate the text to be detected.
具体地,所述根据所述标准话术文本构建距离上下文模型的步骤包括:Specifically, the step of constructing a distance context model based on the standard speech text includes:
步骤A1,获取所述标准话术文本的文本字符;Step A1, obtaining the text characters of the standard speech text;
在本实施例中标准话术文本作为参照标本,因此需要对标准话术文本进行字符化,以获得标准话术文本的文本字符。例如标准话术文本“感谢您的申请和配合”的文本字符为“感”“谢”“您”“的”“申”“请”“和”“配”“合”。In this embodiment, the standard phonetic text is used as the reference sample, so it is necessary to characterize the standard phonetic text to obtain the text characters of the standard phonetic text. For example, the text characters of the standard phraseology text "Thank you for your application and cooperation" are "Gan", "Thank you", "You", "De," "Apply", "Please", "He", "With", and "He".
步骤A2,对所述文本字符进行阶跃处理,以获取各个文本字符的第一阶跃数组;Step A2, performing step processing on the text characters to obtain a first step array of each text character;
步骤A3,根据所述第一阶跃数组进行列表排序,以构建距离上下文模型。Step A3: Perform list sorting according to the first step array to construct a distance context model.
假设标准话术文本为str1,则str1=感谢您的申请和配合,同时获取str1的字符长度len。通过如下矩阵公式,构建模型矩阵matrix[len][len]:Assuming that the standard phonetic text is str1, then str1=Thank you for your application and cooperation, and obtain the character length len of str1. Construct the model matrix matrix[len][len] through the following matrix formula:
matrix[i][j] = [min distance,max distance]matrix[i][j] = [min distance, max distance]
min distance = min(sgn(j-i)*1,j-i) if i <= jmin distance = min(sgn(j-i)*1,j-i) if i <= j
max distance = max(sgn(j-i)*1,j-i) if i <= jmax distance = max(sgn(j-i)*1, j-i) if i <= j
所述sgn(x)为阶跃函数,通过遍历标准话术文本的字符间隔特征,获取到标准话术文本相对于本身各个字符的阶跃坐标,从而获取到各个文本字符的第一阶跃数组。若x的数值大于0,则sgn(x)返回1;数值等于0,则返回0;数值小于0,则返回-1。所述第一阶跃数组指的是一个字符编号与其他字符编号的最小距离值和最大距离值所组成的数组,例如字符a的字符编号为i,j,那么字符a的阶跃数组为[min distance,max distance],其中最小距离值为min distance,最大距离值为max distance,而min distance由min(sgn(j-i)*1,j-1)获取,而max distance由max(sgn(j-i)*1,j-1)获取,i和j代表字符数组编号。也就是说阶跃函数根据字符编号的计算,所得到的返回值将作为min函数和max函数的输入参数,从而计算出min函数和max函数,并将min函数和max函数的返回值作为对应的文本字符的第一阶跃数组。The sgn(x) is a step function. By traversing the character interval characteristics of the standard speech text, the step coordinates of the standard speech text relative to each character of the standard speech text are obtained, thereby obtaining the first step array of each text character . If the value of x is greater than 0, sgn(x) returns 1; if the value is equal to 0, it returns 0; if the value is less than 0, it returns -1. The first step array refers to an array composed of the minimum distance value and the maximum distance value between a character number and other character numbers. For example, the character number of character a is i, j, then the step array of character a is [ min distance, max distance], where the minimum distance value is min distance, the maximum distance value is max distance, and min distance is obtained by min(sgn(j-i)*1, j-1), and max The distance is obtained by max(sgn(j-i)*1, j-1), and i and j represent the character array numbers. That is to say, the step function is calculated according to the character number, and the return value obtained will be used as the input parameter of the min function and max function, so as to calculate the min function and max function, and the return value of the min function and max function as the corresponding The first step array of text characters.
根据以上矩阵公式,获取到各个文本字符的第一阶跃数组,将所述阶跃数组进行列表排列,对应上各自的文本字符,如横排“感谢您的申请和配合”的字符编号以j为代表的数组字编号a[j],分别为a[0]、a[1]、a[2]、a[3]、a[4]、a[5]、a[6]、a[7]、a[8],而竖排“感谢您的申请和配合”的字符编号以i为代表获得对应的数组字符编号b[i],根据字符数组编号,以及对应的矩阵公式,即可获取到如以下表1的矩阵模型:According to the above matrix formula, the first step array of each text character is obtained, and the step array is arranged in a list, corresponding to the respective text characters, such as the character number of the horizontal "Thank you for your application and cooperation" with j Is the representative array word number a[j], which are a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[ 7], a[8], and the character number of "Thank you for your application and cooperation" in the vertical row is represented by i to obtain the corresponding array character number b[i]. According to the character array number and the corresponding matrix formula, you can Obtain the matrix model shown in Table 1 below:
表1
[0,0] [1,1] [1,2] [1,3] [1,4] [1,5] [1,6] [1,7] [1,8]
[-1,-1] [0,0] [1,1] [1,2] [1,3] [1,4] [1,5] [1,6] [1,7]
[-2,-1] [-1,-1] [0,0] [1,1] [1,2] [1,3] [1,4] [1,5] [1,6]
[-3,-1] [-2,-1] [-1,-1] [0,0] [1,1] [1,2] [1,3] [1,4] [1,5]
[-4,-1] [-3,-1] [-2,-1] [-1,-1] [0,0] [1,1] [1,2] [1,3] [1,4]
[-5,-1] [-4,-1] [-3,-1] [-2,-1] [-1,-1] [0,0] [1,1] [1,2] [1,3]
[-6,-1] [-5,-1] [-4,-1] [-3,-1] [-2,-1] [-1,-1] [0,0] [1,1] [1,2]
[-7,-1] [-6,-1] [-5,-1] [-4,-1] [-3,-1] [-2,-1] [-1,-1] [0,0] [1,1]
[-8,-1] [-7,-1] [-6,-1] [-5,-1] [-4,-1] [-3,-1] [-2,-1] [-1,-1] [0,0]
Table 1
sense thank you of Apply for please with Match Combine
sense [0, 0] [1, 1] [1, 2] [1, 3] [1, 4] [1, 5] [1, 6] [1, 7] [1, 8]
thank [-1, -1] [0, 0] [1, 1] [1, 2] [1, 3] [1, 4] [1, 5] [1, 6] [1, 7]
you [-2, -1] [-1, -1] [0, 0] [1, 1] [1, 2] [1, 3] [1, 4] [1, 5] [1, 6]
of [-3, -1] [-2, -1] [-1, -1] [0, 0] [1, 1] [1, 2] [1, 3] [1, 4] [1, 5]
Apply for [-4, -1] [-3, -1] [-2, -1] [-1, -1] [0, 0] [1, 1] [1, 2] [1, 3] [1, 4]
please [-5, -1] [-4, -1] [-3, -1] [-2, -1] [-1, -1] [0, 0] [1, 1] [1, 2] [1, 3]
with [-6, -1] [-5, -1] [-4, -1] [-3, -1] [-2, -1] [-1, -1] [0, 0] [1, 1] [1, 2]
Match [-7, -1] [-6, -1] [-5, -1] [-4, -1] [-3, -1] [-2, -1] [-1, -1] [0, 0] [1, 1]
Combine [-8, -1] [-7, -1] [-6, -1] [-5, -1] [-4, -1] [-3, -1] [-2, -1] [-1, -1] [0, 0]
由此,以上表1所示的矩阵模型即为距离上下文模型。Therefore, the matrix model shown in Table 1 above is the distance context model.
步骤S30,根据所述距离上下文模型和所述待定位文本,获得候选文本片段。Step S30: Obtain candidate text fragments according to the distance context model and the text to be located.
所述距离上下文模型是标准话术文本的标准矩阵,可作为待定位文本的参照模型,在本实施例中,待定位文本不一定完全与标准话术文本相对应,因此,需要以标准话术文本为基础的距离上下文模型进行检测匹配,以从中筛选出到符合模型规则的候选文本片段。The distance context model is a standard matrix of standard speech text, which can be used as a reference model for the text to be located. In this embodiment, the text to be located may not completely correspond to the standard speech text. Therefore, it is necessary to use standard speech The text-based distance context model performs detection and matching to filter out candidate text fragments that meet the model rules.
进一步地,所述根据所述距离上下文模型和所述待定位文本,获得候选文本片段的步骤包括:Further, the step of obtaining candidate text fragments according to the distance context model and the text to be located includes:
步骤B1,根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符,并确定所述文本字符的目标定位范围;Step B1: Acquire text characters that meet a preset distance range in the text to be located according to the distance context model, and determine the target location range of the text characters;
将待定位文本输入距离上下文模型,并根据距离上下文模型对待定位文本进行文本字符检索。假设待定位文本为“嗯嗯感谢您申请的配合我们会尽快为您处理”,则将待定位文本确定为text。设备将对text中的字符进行筛选,从中获取到符合预设距离范围的文本字符。所述文本字符为text中符合标准话术文本语义的字符文本,即与标准话术文本具有最接近语序的字符样本。Input the text to be located into the distance context model, and perform text character retrieval on the text to be located according to the distance context model. Assuming that the text to be positioned is "Uh, thank you for your cooperation, we will process it for you as soon as possible", then the text to be positioned is determined to be text. The device will filter the characters in the text and obtain the text characters that meet the preset distance range. The text character is a character text in text that meets the semantics of a standard telephony text, that is, a character sample that has the closest word order to the standard telephony text.
获取到文本字符之后,设备将基于文本字符的起始位置和终止位置确定文本字符的目标定位范围。After obtaining the text character, the device will determine the target positioning range of the text character based on the start position and end position of the text character.
具体地,所述根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符的步骤包括:Specifically, the step of acquiring text characters that meet a preset distance range in the text to be located according to the distance context model includes:
步骤a,根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列;Step a: Perform character traversal in the text to be located according to the first step array, so as to obtain a character sequence that meets a preset distance range from the text to be located;
距离上下文模型中第一阶跃数组能够为待定位文本提供字符匹配检索处理,以获取到待定位文本的字符之间的共现关系,从而将待定位文本中符合预设距离范围的字符特征检索出来,以获取到字符序列。The first step array in the distance context model can provide character matching and retrieval processing for the text to be located, so as to obtain the co-occurrence relationship between the characters of the text to be located, so as to retrieve the character features in the text to be located that meet the preset distance range To get to the character sequence.
遍历待定位文本text的每个字符char i,其索引为i:Traverse each character char i of the text to be positioned, and its index is i:
如果字符char i,在matrix第一列中:If the character char i, in the first column of the matrix:
遍历text的每个字符char j,其索引为j:Traverse each character char j of text, its index is j:
如果char j,在matrix第一行中:If char j, in the first row of the matrix:
if dis(i,j)>=matrix[i][j][0] 且 dis(i,j)<=matrix[i][j][1]:if dis(i,j)>=matrix[i][j][0] and dis(i,j)<=matrix[i][j][1]:
可以理解的是,待定位文本中text[j]与text[i]有符合距离范围的共现关系,获取到与字符text[i]所有的符合距离范围的共现关系的字符序列seq=text[j]…text[k],字符text[i]的字符序列seq的范围[j:k]之内的文本片段,即是确定起始位置和终止位置的文本片段。It is understandable that text[j] and text[i] in the text to be positioned have a co-occurrence relationship that conforms to the distance range, and all character sequences seq=text that conform to the co-occurrence relationship of the distance range with the character text[i] are obtained [j]...text[k], the text segment within the range [j:k] of the character sequence seq of the character text[i] is the text segment that determines the start and end positions.
可以理解的是,字符text[i]的字符序列seq的范围[j:k]之内的文本片段。字符text[i’]的字符序列seq的范围[j’:k’]之内的文本片段。It is understandable that the text segment within the range [j:k] of the character sequence seq of the character text[i]. The text segment within the range [j':k'] of the character sequence seq of the character text[i'].
进一步地,所述根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列的步骤还包括:Further, the step of performing character traversal in the text to be located according to the first step array to obtain a character sequence within a preset distance range from the text to be located further includes:
步骤a1,获取所述待定位文本的上文文本;Step a1, obtaining the above text of the text to be located;
可以理解的是,距离上下文模型,使用的是标准话术文本自身构建的。假设M是标准话术文本,M自身的距离上下文模型是matrix(M,M),除了使用M自身做距离上下文模型,还可以假设M是标准话术文本,L是M的上文文本,M和LM的距离上下文模型是matrix(M,LM)。需要注意的是,上文文本L将在模型中作为标准话术文本的左侧文本显示。It is understandable that the distance context model is constructed by the standard phonetics text itself. Assume that M is the text of standard phonetics, and the distance context model of M itself is matrix(M, M). In addition to using M itself as the distance context model, you can also assume that M is the text of standard phonetics, L is the text above of M, and M The distance context model with LM is matrix(M, LM). It should be noted that the above text L will be displayed as the left text of the standard speech text in the model.
例如上文文本为“谢谢您的致电”,则标准话术文本和上文文本构建matrix(M,LM)。For example, the above text is "Thank you for calling", then the standard phonetics text and the above text construct a matrix (M, LM).
步骤a2,根据所述上文文本进行阶跃计算,以获得第二阶跃数组;Step a2, perform step calculation according to the above text to obtain a second step array;
同理,设备将计算上文文本的阶跃数组,得到第二阶跃数组。In the same way, the device will calculate the step array of the text above to get the second step array.
步骤a3,根据所述第一阶跃数组和第二阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。Step a3: Perform character traversal in the text to be located according to the first step array and the second step array, so as to obtain a character sequence that meets a preset distance range from the text to be located.
由于增加了第二阶跃数组作为参照对照组,本实施例可根据第一阶跃数组和第二阶跃数组对待定位文本进行字符遍历处理,通过更多参照样本的数组遍历,从而从待定位文本中获取到符合预设距离范围的字符序列。Since the second step array is added as the reference control group, this embodiment can perform character traversal processing on the text to be positioned based on the first step array and the second step array, and traverse more reference samples from the array to be positioned. A character sequence that meets the preset distance range is obtained in the text.
步骤b,获取所述字符序列中序列长度最长的目标字符序列;Step b: Obtain the target character sequence with the longest sequence length in the character sequence;
字符序列代表具有共现关系的字符样本,而字符序列由于是通过符合预设距离范围而筛选下来的,因此字符序列的序列长度可能并不一致。设备将从所有字符序列中筛选出序列长度最长的目标字符序列,具体方式为,通过长度倒序排列,将各个字符序列的序列长度按从大到校进行排列,即可获取到序列长度最长的目标字符序列。The character sequence represents a character sample with a co-occurrence relationship, and the character sequence is filtered by meeting the preset distance range, so the sequence length of the character sequence may not be consistent. The device will filter out the target character sequence with the longest sequence length from all character sequences. The specific method is to arrange the sequence length of each character sequence in reverse order by length to obtain the longest sequence length. The target character sequence.
例如,待定位文本text“嗯嗯感谢您申请的配合我们会尽快为您处理”中的字符“配”的字符序列是“感谢您申请的配合”,这就是最长的目标字符序列。For example, the character sequence of the character "match" in the text "um, thank you for your cooperation, we will process it for you as soon as possible" is "thank you for your cooperation", which is the longest target character sequence.
步骤c,将所述目标字符序列对应的待定位文本确认为文本字符。Step c, confirming the to-be-located text corresponding to the target character sequence as a text character.
目标字符序列对应于待定位文本text中的部分字符,该部分待定位文本即可确定为文本字符。The target character sequence corresponds to part of the characters in the text to be located, and the part of the text to be located can be determined as text characters.
步骤B2,将所述目标定位范围内的目标字符确定为候选文本片段。Step B2: Determine the target character in the target location range as a candidate text segment.
在确定目标定位范围之后,设备将从待定位文本中获取到目标定位范围中的目标字符,并确定目标字符为候选文本片段,以备后用。After determining the target location range, the device will obtain the target character in the target location range from the text to be located, and determine the target character as a candidate text segment for later use.
进一步地,基于第一实施例,提出本申请文本定位方法的第二实施例,在该实施例中,所述根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列的步骤还包括:Further, based on the first embodiment, a second embodiment of the text positioning method of the present application is proposed. In this embodiment, the character traversal is performed in the text to be positioned according to the first step array to obtain The step of obtaining a character sequence that meets the preset distance range in the text to be located further includes:
获取所述待定位文本的下文文本;Obtaining the following text of the text to be located;
根据所述下文文本进行阶跃计算,以获得第三阶跃数组;Perform step calculation according to the following text to obtain the third step array;
可以理解的是,距离上下文模型,使用的是标准话术文本自身构建的。假设M是标准话术文本,M自身的距离上下文模型是matrix(M,M),除了使用M自身做距离上下文模型,还可以假设M是标准话术文本,R是M的下文文本,M和MR的距离上下文模型是matrix(M,MR)。需要注意的是,下文文本R将在模型中作为标准话术文本的右侧文本显示。It is understandable that the distance context model is constructed by the standard phonetics text itself. Assume that M is the standard phonetic text, and the distance context model of M itself is matrix(M, M). In addition to using M itself as the distance context model, you can also assume that M is the standard phonetic text and R is the following text of M, and M and The distance context model of MR is matrix(M, MR). It should be noted that the following text R will be displayed in the model as the right text of the standard speech text.
例如下文文本为“我们会尽快为您处理”,则标准话术文本和下文文本构建matrix(M,MR)。For example, the following text is "We will handle it for you as soon as possible", then the standard language text and the following text construct a matrix (M, MR).
同理,设备将计算下文文本的阶跃数组,得到第三阶跃数组。In the same way, the device will calculate the step array of the text below to get the third step array.
根据所述第一阶跃数组和第三阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。Perform character traversal in the text to be located according to the first step array and the third step array, so as to obtain a character sequence that meets a preset distance range from the text to be located.
由于增加了第三阶跃数组作为参照对照组,本实施例可根据第一阶跃数组和第三阶跃数组对待定位文本进行字符遍历处理,通过更多参照样本的数组遍历,从而从待定位文本中获取到符合预设距离范围的字符序列。Since the third step array is added as the reference control group, this embodiment can perform character traversal processing on the text to be positioned based on the first step array and the third step array, and traverse more reference samples from the array to be positioned. A character sequence that meets the preset distance range is obtained in the text.
进一步地,所述根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列的步骤还包括:Further, the step of performing character traversal in the text to be located according to the first step array to obtain a character sequence within a preset distance range from the text to be located further includes:
获取所述待定位文本的上文文本,并获取所述待定位文本的下文文本;Acquiring the above text of the text to be located, and acquiring the following text of the text to be located;
根据所述上文文本进行阶跃计算,以获得第二阶跃数组,并根据所述下文文本进行阶跃计算,以获得第三阶跃数组;Perform step calculation according to the above text to obtain a second step array, and perform step calculation according to the following text to obtain a third step array;
根据所述第一阶跃数组、第二阶跃数组和第三阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。Perform character traversal in the text to be located according to the first step array, the second step array, and the third step array, so as to obtain a character sequence that meets a preset distance range from the text to be located.
本实施例中的距离上下文模型,是在第一实施例的距离上下文模型的基础上增加新的阶跃计算样本,第一实施例的模型使用的是标准话术文本自身构建的:M是标准话术文本,M自身的距离上下文模型是matrix(M,M)。为进一步增强模型的文本定位效率,本实施例将待定位文本的下文文本添加进模型中。设备获取到上文文本进行阶跃计算,获得第二阶跃数组,而获取到下文文本进行阶跃计算,获得第三阶跃数组,其原理与第一阶跃数组相同。The distance context model in this embodiment adds a new step calculation sample based on the distance context model of the first embodiment. The model of the first embodiment uses the standard phonetic text itself to construct: M is the standard For verbal texts, the distance context model of M itself is matrix(M, M). In order to further enhance the text location efficiency of the model, this embodiment adds the following text of the text to be located into the model. The device obtains the above text for step calculation and obtains the second step array, and obtains the following text for step calculation to obtain the third step array. The principle is the same as that of the first step array.
假设M是标准话术文本,L是M的上文文本,R是M的下文文本,M和LMR的距离上下文模型是matrix(M,LMR)。需要注意的是,上文文本L将在模型中作为标准话术文本的左侧文本显示,而下文文本R将在模型中作为标准话术文本的右侧文本显示。Suppose that M is the standard phonetic text, L is the above text of M, R is the following text of M, and the distance context model of M and LMR is matrix(M, LMR). It should be noted that the above text L will be displayed as the left text of the standard spelling text in the model, and the following text R will be displayed as the right text of the standard spelling text in the model.
例如,标准话术文本M是“感谢您的申请和配合”,其上文文本L是“谢谢您的致电”,其下文文本R是“我们会尽快为您处理”,构建matrix(M,LMR)。For example, the standard language text M is "Thank you for your application and cooperation", the text L above is "Thank you for calling", and the text R below is "We will process it for you as soon as possible", constructing a matrix (M, LMR) ).
类似于第一实施例的正方形表格矩阵matrix[M,M],本实施例中,matrix[M,LMR]是编码M和LMR的长方形表格矩阵。Similar to the square table matrix matrix[M, M] of the first embodiment, in this embodiment, matrix[M, LMR] is a rectangular table matrix encoding M and LMR.
可以理解的是,本实施例中,matrix[M,LMR]的构建基本原理与matrix[M,M]完全一致,通过对上文文本进行阶跃计算获得第二阶跃数组,通过下文文本进行阶跃计算获得第三阶跃数组。再基于第一阶跃数组,第二阶跃数组和第三阶跃数组对待定位文本中的字符进行遍历检索映射,以确定待定位文本中的字符与其他字符的位置关系,进而确定符合预设距离范围的字符序列。It is understandable that in this embodiment, the basic principle of matrix[M,LMR] construction is completely consistent with matrix[M,M]. The second step array is obtained by step calculation of the above text, and the second step array is obtained through the following text. Step calculation obtains the third step array. Then based on the first step array, the second step array and the third step array, the characters in the text to be positioned are traversed and searched to determine the positional relationship between the characters in the text to be positioned and other characters, and then it is determined that it conforms to the preset The character sequence of the distance range.
以下表2是本实施例的示例matrix[M,LMR]:
L: 谢谢您的致电 M: 感谢您的申请和配合 R: 我们会尽快为您处理
M: 感谢您的申请和配合
The following Table 2 is an example matrix[M, LMR] of this embodiment:
L: Thank you for calling M: Thank you for your application and cooperation R: We will handle it for you as soon as possible
M: Thank you for your application and cooperation
基于matrix(M,LMR),在待定位文本text“嗯嗯感谢您申请的配合我们会尽快为您处理”中,定位到[“”,“感谢您申请的配合”,“我们会尽快为您处理”]。Based on the matrix (M, LMR), in the text to be positioned "Well thank you for your cooperation, we will process it for you as soon as possible", locate ["", "Thank you for your cooperation", "We will do it for you as soon as possible deal with"].
matrix(M,LMR)比matrix(M,M)的优势在于:The advantages of matrix(M, LMR) over matrix(M, M) are:
(1)标准话术文本一般来说比较短,且待定位文本的候选片段往往会因为语音识别的问题有很多错误,这样对引起短文本和短文本匹配的问题。通过增加上下文,对标准话术文本,进行扩展,就会将短文本对匹配转变为长文本对匹配,从而提高了匹配效果和文本定位准确度。(1) Standard speech texts are generally short, and candidate segments of the text to be located often have many errors due to speech recognition problems, which can cause short text and short text matching problems. By increasing the context and expanding the standard speech text, short text pair matching will be transformed into long text pair matching, thereby improving the matching effect and the accuracy of text positioning.
(2)客服的语音经过语音识别后,会有各种问题,有问题的文本往往是随机的。通过增加上下文,可以较好地降低有问题文本的比重,从而提升匹配的效果。短文本中的错误比重,会比长文本中的错误比重高一些,所以使用长文本做匹配效果更好。(2) After the voice of the customer service is recognized, there will be various problems, and the text in question is often random. By increasing the context, the proportion of questionable text can be better reduced, thereby improving the matching effect. The proportion of errors in short text is higher than that in long text, so it is better to use long text for matching.
通过以上方式,本实施例在第一实施例的基础上,增加了下文文本的阶跃计算,增加了距离上下文模型的文本定位参考样本,从而提升了文本定位效率。In the above manner, on the basis of the first embodiment, this embodiment adds the step calculation of the following text, and increases the text positioning reference samples of the distance context model, thereby improving the efficiency of text positioning.
进一步地,基于第一实施例,提出本申请文本定位方法的第三实施例,在该实施例中,所述对所述录音内容进行语音识别处理,以获得待定位文本的步骤包括:Further, based on the first embodiment, a third embodiment of the text location method of the present application is proposed. In this embodiment, the step of performing voice recognition processing on the recording content to obtain the text to be located includes:
步骤e,对所述录音内容进行语音识别处理,以获得第一文本;Step e: Perform voice recognition processing on the recording content to obtain the first text;
本实施例中,录音内容可能存在语法错误或者语义分歧,因此需要对录音内容标准化语音识别处理,以得到第一文本。In this embodiment, there may be grammatical errors or semantic divergence in the recorded content. Therefore, it is necessary to standardize the voice recognition processing on the recorded content to obtain the first text.
步骤f,对所述第一文本进行文本分词处理,以获得第二文本;Step f: Perform text word segmentation processing on the first text to obtain a second text;
英文单词天然有空格隔开容易按照空格分词,但是也有时候需要把多个单词做为一个分词,比如一些名词如“New York”,需要做为一个词看待。而中文由于没有空格,因此对第一文本需要进行分词。所述第一文本由多个词组组成,设备将对第一文本中的词组进行分隔,从而得到有意义的词组。English words are naturally separated by spaces, and it is easy to divide them according to the spaces, but sometimes it is necessary to use multiple words as one participle, such as some nouns such as "New York" needs to be treated as a word. Since Chinese has no spaces, the first text needs to be segmented. The first text consists of multiple phrases, and the device will separate the phrases in the first text to obtain Meaningful phrases.
通过词袋模型(Bag of Words,简称BoW),基于词的特征,将各个文本样本的词与对应的词频进行聚类,实现文本向量化,从而形成词组聚类;或者通过词集模型(Set of Words,简称SoW),和词袋模型不同的是词集模型仅考虑词是否在文本中出现,而不考虑词频。Through the bag of words model (Bag of Words, abbreviated as BoW, clusters the words of each text sample with the corresponding word frequency based on the characteristics of the words to achieve text vectorization to form phrase clusters; or through the word set model (Set of Words, abbreviated as SoW), is different from the bag-of-words model in that the word set model only considers whether the word appears in the text, and does not consider the word frequency.
基于以上模型进行文本分词处理,从而得到第二文本。Based on the above model, the text segmentation process is performed to obtain the second text.
步骤g,对所述第二文本进行文本纠错处理,以获得第三文本;Step g: Perform text error correction processing on the second text to obtain a third text;
文本错误常见的错误主要包括别字,纯拼音,模糊音,拼音汉字混合,拼音其他符号混合等多种问题。第二文本中可能存在以上一种或多种问题,因此需要进行文本纠错处理。The common errors of text errors mainly include miscellaneous characters, pure pinyin, fuzzy pronunciation, mixed pinyin and Chinese characters, and mixed pinyin and other symbols. There may be one or more of the above problems in the second text, so text error correction is required.
文本纠错处理分为两步走,第一步是错误检测,第二步是错误纠正。1、错误检测部分先通过中文分词器对第二文本进行切词,由于第二文本中可能含有错别字,所以切词结果往往会有切分错误的情况,这样从字粒度和词粒度两方面检测错误,整合这两种粒度的疑似错误结果,形成疑似错误位置候选集;2、错误纠正部分,遍历所有的疑似错误位置,并使用音似、形似词典替换错误位置的词,然后通过语言模型计算句子困惑度,对所有候选集结果比较并排序,得到最优纠正词。The text error correction process is divided into two steps. The first step is error detection, and the second step is error correction. 1. The error detection part first performs word segmentation on the second text through the Chinese word segmenter. Since the second text may contain typos, the result of word segmentation will often be segmented incorrectly, so it can be detected from both the word granularity and the word granularity. Error, integrate these two granular results of suspected errors to form a candidate set of suspected error positions; 2. Error correction part, traverse all suspected error positions, and replace words in the wrong position with sound-like and shape-like dictionaries, and then calculate by language model Sentence perplexity, compare and sort the results of all candidate sets to get the best corrected words.
通过以上文本纠错处理,可获得第三文本。Through the above text error correction processing, the third text can be obtained.
步骤h,对所述第三文本进行文本改写处理,以获得待定位文本。Step h: Perform text rewriting processing on the third text to obtain the text to be located.
文本改写处理通过改造第三文本中的词汇属性以达到清理杂乱文本的效果。例如将第三文本中的语序语法、词汇字眼进行修正,从而达到将第三文本的文本语义表达清晰畅通的技术效果,而经过文本改写处理后得到的修正文本即为待定位文本。The text rewriting process achieves the effect of cleaning up the messy text by transforming the lexical attributes in the third text. For example, the word order, grammar, vocabulary and words in the third text are amended, so as to achieve the technical effect of clear and unobstructed semantic expression of the text of the third text, and the revised text obtained after the text rewriting process is the text to be located.
通过对客服语音的语音识别处理,极大地提高了待定位文本的识别准确度,为后续待定位文本的应用提供了有效的数据支撑。本实施例最终目的是服务于文本数据的高效定位。Through the voice recognition processing of the customer service voice, the recognition accuracy of the text to be located is greatly improved, and effective data support is provided for subsequent applications of the text to be located. The ultimate goal of this embodiment is to serve the efficient positioning of text data.
此外,本申请实施例还提出一种文本定位装置,所述文本定位装置包括:In addition, an embodiment of the present application also proposes a text positioning device, the text positioning device includes:
识别模块,用于获取录音内容,对所述录音内容进行语音识别处理,以获得待定位文本;The recognition module is used to obtain the recording content, and perform voice recognition processing on the recording content to obtain the text to be located;
构建模块,用于获取标准话术文本,并根据所述标准话术文本构建距离上下文模型;A building module for obtaining standard speech texts, and constructing a distance context model based on the standard speech texts;
获取模块,用于根据所述距离上下文模型和所述待定位文本,获得候选文本片段。The obtaining module is used to obtain candidate text fragments according to the distance context model and the text to be located.
可选地,所述构建模块包括:Optionally, the building module includes:
获取子模块,用于获取所述标准话术文本的文本字符;An obtaining sub-module for obtaining text characters of the standard speech text;
阶跃子模块,用于对所述文本字符进行阶跃处理,以获取各个文本字符的第一阶跃数组;The step submodule is used to perform step processing on the text characters to obtain the first step array of each text character;
构建子模块,用于根据所述第一阶跃数组进行列表排序,以构建距离上下文模型。The construction sub-module is used to sort the list according to the first step array to construct a distance context model.
可选地,所述获取模块包括:Optionally, the acquisition module includes:
第一确定子模块,用于根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符,并确定所述文本字符的目标定位范围;The first determining sub-module is configured to obtain text characters that meet a preset distance range in the text to be located according to the distance context model, and determine the target location range of the text characters;
第二确定子模块,用于将所述目标定位范围内的目标字符确定为候选文本片段。The second determining sub-module is used to determine the target character in the target positioning range as a candidate text segment.
可选地,所述第一确定子模块包括:Optionally, the first determining submodule includes:
遍历单元,用于根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列;A traversal unit, configured to perform character traversal in the text to be located according to the first step array, so as to obtain a character sequence that meets a preset distance range from the text to be located;
获取单元,用于获取所述字符序列中序列长度最长的目标字符序列;An obtaining unit for obtaining a target character sequence with the longest sequence length in the character sequence;
确认单元,用于将所述目标字符序列对应的待定位文本确认为文本字符。The confirming unit is used to confirm the to-be-located text corresponding to the target character sequence as a text character.
可选地,所述遍历单元还包括:Optionally, the traversal unit further includes:
第一获取子单元,用于获取所述待定位文本的上文文本;The first obtaining subunit is used to obtain the above text of the text to be located;
第一阶跃子单元,用于根据所述上文文本进行阶跃计算,以获得第二阶跃数组;The first step subunit is used to perform step calculation according to the above text to obtain the second step array;
第一遍历子单元,用于根据所述第一阶跃数组和第二阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。The first traversal subunit is configured to perform character traversal in the text to be located according to the first step array and the second step array, so as to obtain a character sequence that meets a preset distance range from the text to be located .
可选地,所述遍历单元还包括:Optionally, the traversal unit further includes:
第二获取子单元,用于获取所述待定位文本的下文文本;The second obtaining subunit is used to obtain the following text of the text to be located;
第二跃阶子单元,用于根据所述下文文本进行阶跃计算,以获得第三阶跃数组;The second step subunit is used to perform step calculation according to the following text to obtain the third step array;
第二遍历子单元,用于根据所述第一阶跃数组和第三阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。The second traversal subunit is configured to perform character traversal in the text to be located according to the first step array and the third step array, so as to obtain a character sequence that meets a preset distance range from the text to be located .
可选地,所述遍历单元还包括:Optionally, the traversal unit further includes:
第三获取子单元,用于获取所述待定位文本的上文文本,并获取所述待定位文本的下文文本;The third obtaining subunit is used to obtain the above text of the text to be located, and obtain the following text of the text to be located;
第三跃阶子单元,用于根据所述上文文本进行阶跃计算,以获得第二阶跃数组,并根据所述下文文本进行阶跃计算,以获得第三阶跃数组;The third step subunit is used to perform step calculation according to the above text to obtain a second step array, and perform step calculation according to the following text to obtain a third step array;
第三遍历子单元,用于根据所述第一阶跃数组、第二阶跃数组和第三阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。The third traversal subunit is used to perform character traversal in the text to be located according to the first step array, the second step array, and the third step array, so as to obtain the pre-aligned text from the text to be located. Set the character sequence of the distance range.
此外,本申请实施例还提出一种设备,设备包括:存储器109、处理器110及存储在存储器109上并可在处理器110上运行的计算机可读指令,所述计算机可读指令被处理器110执行时实现上述的文本定位方法各实施例的步骤。In addition, an embodiment of the present application also proposes a device. The device includes a memory 109, a processor 110, and computer-readable instructions that are stored on the memory 109 and can run on the processor 110. The computer-readable instructions are executed by the processor. When 110 is executed, the steps of each embodiment of the above-mentioned text positioning method are realized.
此外,本申请还提供了一种计算机存储介质,所述计算机可读存储介质可以为非易失性可读存储介质。In addition, the present application also provides a computer storage medium, and the computer-readable storage medium may be a non-volatile readable storage medium.
所述计算机存储介质存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如上述的文本定位方法的步骤。The computer storage medium stores computer readable instructions, and when the computer readable instructions are executed by a processor, the steps of the text positioning method as described above are realized.
本申请设备及存储介质(即计算机存储介质)的具体实施方式的拓展内容与上述文本定位方法各实施例基本相同,在此不做赘述。The expanded content of the specific implementation of the device and storage medium of the application (ie, computer storage medium) is basically the same as the embodiments of the text positioning method described above, and will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, It also includes other elements not explicitly listed, or elements inherent to the process, method, article, or device. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or device that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the foregoing embodiments of the present application are only for description, and do not represent the superiority or inferiority of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , Magnetic disk, optical disk), including several instructions to make a device (can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本申请的保护之内。The embodiments of the application are described above with reference to the accompanying drawings, but the application is not limited to the above-mentioned specific embodiments. The above-mentioned specific embodiments are only illustrative and not restrictive. Those of ordinary skill in the art are Under the enlightenment of this application, many forms can be made without departing from the purpose of this application and the scope of protection of the claims, and these are all within the protection of this application.

Claims (20)

  1. 一种文本定位方法,其特征在于,所述文本定位方法包括: A text positioning method, characterized in that the text positioning method includes:
    获取录音内容,对所述录音内容进行语音识别处理,以获得待定位文本;Acquiring the recording content, and performing voice recognition processing on the recording content to obtain the text to be located;
    获取标准话术文本,并根据所述标准话术文本构建距离上下文模型;Obtaining the standard speech text, and constructing a distance context model based on the standard speech text;
    根据所述距离上下文模型和所述待定位文本,获得候选文本片段。According to the distance context model and the text to be located, candidate text segments are obtained.
  2. 如权利要求1所述的文本定位方法,其特征在于,所述根据所述标准话术文本构建距离上下文模型的步骤包括:The text positioning method according to claim 1, wherein the step of constructing a distance context model according to the standard speech text comprises:
    获取所述标准话术文本的文本字符;Acquiring text characters of the standard speech text;
    对所述文本字符进行阶跃处理,以获取各个文本字符的第一阶跃数组;Performing step processing on the text characters to obtain a first step array of each text character;
    根据所述第一阶跃数组进行列表排序,以构建距离上下文模型。Perform list sorting according to the first step array to construct a distance context model.
  3. 如权利要求2所述的文本定位方法,其特征在于,所述根据所述距离上下文模型和所述待定位文本,获得候选文本片段的步骤包括:3. The text positioning method according to claim 2, wherein the step of obtaining candidate text fragments according to the distance context model and the text to be located comprises:
    根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符,并确定所述文本字符的目标定位范围;Acquiring text characters that meet a preset distance range in the text to be located according to the distance context model, and determining a target location range of the text characters;
    将所述目标定位范围内的目标字符确定为候选文本片段。The target character in the target positioning range is determined as a candidate text segment.
  4. 如权利要求3所述的文本定位方法,其特征在于,所述根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符的步骤包括:3. The text positioning method according to claim 3, wherein the step of obtaining text characters that meet a preset distance range in the text to be located according to the distance context model comprises:
    根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列;Performing character traversal in the text to be located according to the first step array, so as to obtain a character sequence that meets a preset distance range from the text to be located;
    获取所述字符序列中序列长度最长的目标字符序列;Obtaining a target character sequence with the longest sequence length in the character sequence;
    将所述目标字符序列对应的待定位文本确认为文本字符。The to-be-positioned text corresponding to the target character sequence is confirmed as a text character.
  5. 如权利要求4所述的文本定位方法,其特征在于,所述根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列的步骤还包括:The text positioning method according to claim 4, wherein the character traversal is performed in the text to be located according to the first step array, so as to obtain a preset distance range from the text to be located The sequence of characters also includes:
    获取所述待定位文本的上文文本;Obtaining the above text of the text to be located;
    根据所述上文文本进行阶跃计算,以获得第二阶跃数组;Perform step calculation according to the above text to obtain the second step array;
    根据所述第一阶跃数组和第二阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。Perform character traversal in the text to be located according to the first step array and the second step array, so as to obtain a character sequence that meets a preset distance range from the text to be located.
  6. 如权利要求4所述的文本定位方法,其特征在于,所述根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列的步骤还包括:The text positioning method according to claim 4, wherein the character traversal is performed in the text to be located according to the first step array, so as to obtain a preset distance range from the text to be located The sequence of characters also includes:
    获取所述待定位文本的下文文本;Obtaining the following text of the text to be located;
    根据所述下文文本进行阶跃计算,以获得第三阶跃数组;Perform step calculation according to the following text to obtain the third step array;
    根据所述第一阶跃数组和第三阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。Perform character traversal in the text to be located according to the first step array and the third step array, so as to obtain a character sequence that meets a preset distance range from the text to be located.
  7. 如权利要求4所述的文本定位方法,其特征在于,所述根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列的步骤还包括:The text positioning method according to claim 4, wherein the character traversal is performed in the text to be located according to the first step array, so as to obtain a preset distance range from the text to be located The sequence of characters also includes:
    获取所述待定位文本的上文文本,并获取所述待定位文本的下文文本;Acquiring the above text of the text to be located, and acquiring the following text of the text to be located;
    根据所述上文文本进行阶跃计算,以获得第二阶跃数组,并根据所述下文文本进行阶跃计算,以获得第三阶跃数组;Perform step calculation according to the above text to obtain a second step array, and perform step calculation according to the following text to obtain a third step array;
    根据所述第一阶跃数组、第二阶跃数组和第三阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。Perform character traversal in the text to be located according to the first step array, the second step array, and the third step array, so as to obtain a character sequence that meets a preset distance range from the text to be located.
  8. 一种文本定位装置,其特征在于,所述文本定位装置包括:A text positioning device, characterized in that the text positioning device comprises:
    识别模块,用于获取录音内容,对所述录音内容进行语音识别处理,以获得待定位文本;The recognition module is used to obtain the recording content, and perform voice recognition processing on the recording content to obtain the text to be located;
    构建模块,用于获取标准话术文本,并根据所述标准话术文本构建距离上下文模型;A building module for obtaining standard speech texts, and constructing a distance context model based on the standard speech texts;
    获取模块,用于根据所述距离上下文模型和所述待定位文本,获得候选文本片段。The obtaining module is used to obtain candidate text fragments according to the distance context model and the text to be located.
  9. 如权利要求8所述的文本定位装置,其特征在于,所述构建模块包括:8. The text positioning device according to claim 8, wherein the building module comprises:
    获取子模块,用于获取所述标准话术文本的文本字符;An obtaining sub-module for obtaining text characters of the standard speech text;
    阶跃子模块,用于对所述文本字符进行阶跃处理,以获取各个文本字符的第一阶跃数组;The step submodule is used to perform step processing on the text characters to obtain the first step array of each text character;
    构建子模块,用于根据所述第一阶跃数组进行列表排序,以构建距离上下文模型。The construction sub-module is used to sort the list according to the first step array to construct a distance context model.
  10. 如权利要求9所述的文本定位装置,其特征在于,所述获取模块包括:9. The text positioning device according to claim 9, wherein the acquiring module comprises:
    第一确定子模块,用于根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符,并确定所述文本字符的目标定位范围;The first determining sub-module is configured to obtain text characters that meet a preset distance range in the text to be located according to the distance context model, and determine the target location range of the text characters;
    第二确定子模块,用于将所述目标定位范围内的目标字符确定为候选文本片段。The second determining sub-module is used to determine the target character in the target positioning range as a candidate text segment.
  11. 如权利要求10所述的文本定位装置,其特征在于,所述第一确定子模块包括:10. The text positioning device according to claim 10, wherein the first determining submodule comprises:
    遍历单元,用于根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列;A traversal unit, configured to perform character traversal in the text to be located according to the first step array, so as to obtain a character sequence that meets a preset distance range from the text to be located;
    获取单元,用于获取所述字符序列中序列长度最长的目标字符序列;An obtaining unit for obtaining a target character sequence with the longest sequence length in the character sequence;
    确认单元,用于将所述目标字符序列对应的待定位文本确认为文本字符。The confirming unit is used to confirm the to-be-located text corresponding to the target character sequence as a text character.
  12. 如权利要求11所述的文本定位装置,其特征在于,所述遍历单元还包括:The text positioning device according to claim 11, wherein the traversal unit further comprises:
    第一获取子单元,用于获取所述待定位文本的上文文本;The first obtaining subunit is used to obtain the above text of the text to be located;
    第一阶跃子单元,用于根据所述上文文本进行阶跃计算,以获得第二阶跃数组;The first step subunit is used to perform step calculation according to the above text to obtain the second step array;
    第一遍历子单元,用于根据所述第一阶跃数组和第二阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。The first traversal subunit is configured to perform character traversal in the text to be located according to the first step array and the second step array, so as to obtain a character sequence that meets a preset distance range from the text to be located .
  13. 一种设备,其特征在于,所述设备包括:存储器、处理器及存储在所述存储器上并可在处理器上运行的计算机可读指令,所述计算机可读指令被所述处理器执行时实现如下步骤:A device, characterized in that the device comprises: a memory, a processor, and computer-readable instructions stored on the memory and capable of running on the processor, and when the computer-readable instructions are executed by the processor To achieve the following steps:
    获取录音内容,对所述录音内容进行语音识别处理,以获得待定位文本;Acquiring the recording content, and performing voice recognition processing on the recording content to obtain the text to be located;
    获取标准话术文本,并根据所述标准话术文本构建距离上下文模型;Obtaining the standard speech text, and constructing a distance context model based on the standard speech text;
    根据所述距离上下文模型和所述待定位文本,获得候选文本片段。According to the distance context model and the text to be located, candidate text segments are obtained.
  14. 如权利要求13所述的设备,其特征在于,所述根据所述标准话术文本构建距离上下文模型的步骤包括:The device according to claim 13, wherein the step of constructing a distance context model based on the standard speech text comprises:
    获取所述标准话术文本的文本字符;Acquiring text characters of the standard speech text;
    对所述文本字符进行阶跃处理,以获取各个文本字符的第一阶跃数组;Performing step processing on the text characters to obtain a first step array of each text character;
    根据所述第一阶跃数组进行列表排序,以构建距离上下文模型。Perform list sorting according to the first step array to construct a distance context model.
  15. 如权利要求14所述的设备,其特征在于,所述根据所述距离上下文模型和所述待定位文本,获得候选文本片段的步骤包括:The device according to claim 14, wherein the step of obtaining candidate text fragments according to the distance context model and the text to be located comprises:
    根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符,并确定所述文本字符的目标定位范围;Acquiring text characters that meet a preset distance range in the text to be located according to the distance context model, and determining a target location range of the text characters;
    将所述目标定位范围内的目标字符确定为候选文本片段。The target character in the target positioning range is determined as a candidate text segment.
  16. 如权利要求15所述的设备,其特征在于,所述根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符的步骤包括:The device according to claim 15, wherein the step of acquiring text characters that meet a preset distance range in the text to be located according to the distance context model comprises:
    根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列;Performing character traversal in the text to be located according to the first step array, so as to obtain a character sequence that meets a preset distance range from the text to be located;
    获取所述字符序列中序列长度最长的目标字符序列;Obtaining a target character sequence with the longest sequence length in the character sequence;
    将所述目标字符序列对应的待定位文本确认为文本字符。The to-be-positioned text corresponding to the target character sequence is confirmed as a text character.
  17. 如权利要求16所述的设备,其特征在于,所述根据所述第一阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列的步骤还包括:The device according to claim 16, wherein the character traversal is performed in the text to be located according to the first step array, so as to obtain characters that meet a preset distance range from the text to be located The sequence of steps also includes:
    获取所述待定位文本的上文文本;Obtaining the above text of the text to be located;
    根据所述上文文本进行阶跃计算,以获得第二阶跃数组;Perform step calculation according to the above text to obtain the second step array;
    根据所述第一阶跃数组和第二阶跃数组在所述待定位文本中进行字符遍历,以从所述待定位文本中获取符合预设距离范围的字符序列。Perform character traversal in the text to be located according to the first step array and the second step array, so as to obtain a character sequence that meets a preset distance range from the text to be located.
  18. 一种存储介质,其特征在于,所述存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:A storage medium, characterized in that computer readable instructions are stored on the storage medium, and when the computer readable instructions are executed by a processor, the following steps are implemented:
    获取录音内容,对所述录音内容进行语音识别处理,以获得待定位文本;Acquiring the recording content, and performing voice recognition processing on the recording content to obtain the text to be located;
    获取标准话术文本,并根据所述标准话术文本构建距离上下文模型;Obtaining the standard speech text, and constructing a distance context model based on the standard speech text;
    根据所述距离上下文模型和所述待定位文本,获得候选文本片段。According to the distance context model and the text to be located, candidate text segments are obtained.
  19. 如权利要求18所述的存储介质,其特征在于,所述根据所述标准话术文本构建距离上下文模型的步骤包括:The storage medium of claim 18, wherein the step of constructing a distance context model based on the standard speech text comprises:
    获取所述标准话术文本的文本字符;Acquiring text characters of the standard speech text;
    对所述文本字符进行阶跃处理,以获取各个文本字符的第一阶跃数组;Performing step processing on the text characters to obtain a first step array of each text character;
    根据所述第一阶跃数组进行列表排序,以构建距离上下文模型。Perform list sorting according to the first step array to construct a distance context model.
  20. 如权利要求19所述的存储介质,其特征在于,所述根据所述距离上下文模型和所述待定位文本,获得候选文本片段的步骤包括:The storage medium according to claim 19, wherein the step of obtaining candidate text fragments according to the distance context model and the text to be located comprises:
    根据所述距离上下文模型在所述待定位文本中获取符合预设距离范围的文本字符,并确定所述文本字符的目标定位范围;Acquiring text characters that meet a preset distance range in the text to be located according to the distance context model, and determining a target location range of the text characters;
    将所述目标定位范围内的目标字符确定为候选文本片段。 The target character in the target positioning range is determined as a candidate text segment.
PCT/CN2019/116470 2019-09-09 2019-11-08 Text positioning method, apparatus, device, and storage medium WO2021047003A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910851802.6A CN110599028B (en) 2019-09-09 2019-09-09 Text positioning method, device, equipment and storage medium
CN201910851802.6 2019-09-09

Publications (1)

Publication Number Publication Date
WO2021047003A1 true WO2021047003A1 (en) 2021-03-18

Family

ID=68858597

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/116470 WO2021047003A1 (en) 2019-09-09 2019-11-08 Text positioning method, apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN110599028B (en)
WO (1) WO2021047003A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112364130B (en) * 2020-11-10 2024-04-09 深圳前海微众银行股份有限公司 Sample sampling method, apparatus and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577598A (en) * 2013-11-15 2014-02-12 曙光信息产业(北京)有限公司 Matching method and device for pattern string and text string
CN107861779A (en) * 2017-09-20 2018-03-30 东软集团股份有限公司 Page object localization method and device, storage medium, electronic equipment
US20180157644A1 (en) * 2016-12-07 2018-06-07 Disney Enterprises, Inc. Dynamic word embeddings
CN109271489A (en) * 2018-10-25 2019-01-25 第四范式(北京)技术有限公司 A kind of Method for text detection and device
CN110008335A (en) * 2018-12-12 2019-07-12 阿里巴巴集团控股有限公司 The method and device of natural language processing

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8655939B2 (en) * 2007-01-05 2014-02-18 Digital Doors, Inc. Electromagnetic pulse (EMP) hardened information infrastructure with extractor, cloud dispersal, secure storage, content analysis and classification and method therefor
CN105609107A (en) * 2015-12-23 2016-05-25 北京奇虎科技有限公司 Text processing method and device based on voice identification
US10846523B2 (en) * 2016-11-14 2020-11-24 Kodak Alaris Inc. System and method of character recognition using fully convolutional neural networks with attention
CN109389971B (en) * 2018-08-17 2022-06-17 深圳壹账通智能科技有限公司 Insurance recording quality inspection method, device, equipment and medium based on voice recognition

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577598A (en) * 2013-11-15 2014-02-12 曙光信息产业(北京)有限公司 Matching method and device for pattern string and text string
US20180157644A1 (en) * 2016-12-07 2018-06-07 Disney Enterprises, Inc. Dynamic word embeddings
CN107861779A (en) * 2017-09-20 2018-03-30 东软集团股份有限公司 Page object localization method and device, storage medium, electronic equipment
CN109271489A (en) * 2018-10-25 2019-01-25 第四范式(北京)技术有限公司 A kind of Method for text detection and device
CN110008335A (en) * 2018-12-12 2019-07-12 阿里巴巴集团控股有限公司 The method and device of natural language processing

Also Published As

Publication number Publication date
CN110599028A (en) 2019-12-20
CN110599028B (en) 2022-05-17

Similar Documents

Publication Publication Date Title
WO2020009297A1 (en) Domain extraction based language comprehension performance enhancement apparatus and performance enhancement method
WO2021003930A1 (en) Quality inspection method, apparatus, and device for customer service audio, and computer readable storage medium
WO2018034426A1 (en) Method for automatically correcting error in tagged corpus by using kernel pdr
WO2020060325A1 (en) Electronic device, system, and method for using voice recognition service
WO2022065811A1 (en) Multimodal translation method, apparatus, electronic device and computer-readable storage medium
WO2019177182A1 (en) Multimedia content search apparatus and search method using attribute information analysis
WO2014107097A1 (en) Display apparatus and method for controlling the display apparatus
WO2020231209A1 (en) Method, apparatus, electronic device, and computer readable storage medium for voice translation
WO2011122724A1 (en) Code inspection executing system for performing a code inspection of abap source codes
WO2016032021A1 (en) Apparatus and method for recognizing voice commands
WO2020050509A1 (en) Voice synthesis device
WO2012130145A1 (en) Method and device for acquiring and searching for relevant knowledge information
WO2022203167A1 (en) Speech recognition method, apparatus, electronic device and computer readable storage medium
WO2020114333A1 (en) Video-based ar education method, smart television, storage medium, and device
WO2020168606A1 (en) Advertisement video optimising method, apparatus and device and computer readable storage medium
WO2020253125A1 (en) Log management method, apparatus, and device, and storage medium
WO2020130425A1 (en) Electronic apparatus, controlling method of electronic apparatus and computer readable medium
WO2018056779A1 (en) Method of translating speech signal and electronic device employing the same
WO2021047003A1 (en) Text positioning method, apparatus, device, and storage medium
EP3980991A1 (en) System and method for recognizing user&#39;s speech
WO2019225892A1 (en) Electronic apparatus, controlling method and computer readable medium
WO2015088291A1 (en) Long sentence translation service apparatus and method
WO2018097504A2 (en) Electronic device and method for updating channel map thereof
WO2011068315A4 (en) Apparatus for selecting optimum database using maximal concept-strength recognition technique and method thereof
WO2023101377A1 (en) Method and apparatus for performing speaker diarization based on language identification

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: 19944730

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: 19944730

Country of ref document: EP

Kind code of ref document: A1