WO2023178979A1 - 问题标注方法、装置、电子设备及存储介质 - Google Patents

问题标注方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2023178979A1
WO2023178979A1 PCT/CN2022/123000 CN2022123000W WO2023178979A1 WO 2023178979 A1 WO2023178979 A1 WO 2023178979A1 CN 2022123000 W CN2022123000 W CN 2022123000W WO 2023178979 A1 WO2023178979 A1 WO 2023178979A1
Authority
WO
WIPO (PCT)
Prior art keywords
training
intention
question
reply
offline
Prior art date
Application number
PCT/CN2022/123000
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 WO2023178979A1 publication Critical patent/WO2023178979A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Definitions

  • the present application relates to the field of artificial intelligence, and in particular to a question annotation method, device, electronic equipment and computer-readable storage medium.
  • intelligent customer service has become more and more widely used in many fields.
  • intelligent customer service is based on question annotation, that is, it identifies the user's intention to raise questions and responds accordingly. Reply, and mark the reply to realize intelligent questions and answers for intelligent customers.
  • This application provides a problem annotation method, including:
  • Receive offline conversation data identify offline questions and offline replies of the offline conversation data, and use a preset classification model to identify the offline question category of the offline reply;
  • the training question intention that satisfies the preset conditions is queried from the correlation matrix, and the training reply intention corresponding to the training question intention is used as the reply offline intention of the offline question.
  • This application also provides a question annotation device, which includes:
  • a dialogue data identification module used to obtain training dialogue data and identify training question intentions and training reply intentions in the training dialogue data
  • An association matrix construction module used to calculate the intention association between the training question intention and the training reply intention, and construct an association matrix between the training question intention and the training reply intention according to the intention association;
  • a question category identification module configured to receive offline dialogue data, identify offline questions and offline replies of the offline dialogue data, and use a preset classification model to identify the offline question category of the offline replies;
  • a question reply annotation module configured to query training question intentions that meet preset conditions from the correlation matrix according to the offline question category, and use the training reply intention corresponding to the training question intention as a reply to the offline question offline intention.
  • This application also provides an electronic device, which includes:
  • the memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to implement the problem annotation method as described below:
  • Receive offline conversation data identify offline questions and offline replies of the offline conversation data, and use a preset classification model to identify the offline question category of the offline reply;
  • the training question intention that satisfies the preset conditions is queried from the correlation matrix, and the training reply intention corresponding to the training question intention is used as the reply offline intention of the offline question.
  • This application also provides a computer-readable storage medium, which stores at least one computer program.
  • the at least one computer program is executed by a processor in an electronic device to implement the problem annotation method as described below. :
  • Receive offline conversation data identify offline questions and offline replies of the offline conversation data, and use a preset classification model to identify the offline question category of the offline reply;
  • the training question intention that satisfies the preset conditions is queried from the correlation matrix, and the training reply intention corresponding to the training question intention is used as the reply offline intention of the offline question.
  • Figure 1 is a schematic flow chart of a question annotation method provided by an embodiment of the present application.
  • Figure 2 is a schematic module diagram of a question annotation device provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of the internal structure of an electronic device for implementing a problem annotation method provided by an embodiment of the present application
  • the embodiment of the present application provides a problem annotation method.
  • the execution subject of the problem annotation method includes, but is not limited to, at least one of a server, a terminal, and other electronic devices that can be configured to execute the method provided by the embodiments of the present application.
  • the problem annotation method can be executed by software or hardware installed on the terminal device or the server device, and the software can be a blockchain platform.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
  • the server may be an independent server, or may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and content delivery networks (ContentDeliveryNetwork, CDN), as well as cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
  • cloud services such as cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and content delivery networks (ContentDeliveryNetwork, CDN), as well as cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
  • the problem annotation method includes:
  • the training dialogue data refers to data that responds to questions asked by users, which is generated based on different business scenarios.
  • the training dialogue data can be disease-symptom dialogue data.
  • the training dialogue data may be insurance-claims dialogue data
  • the training data may be order-after-sales dialogue data.
  • the embodiment of the present application identifies the training question intention and the training reply intention in the training dialogue data to convert the training dialogue into The data is divided into sequences to establish the corresponding relationship between questions and replies to ensure the prerequisites for reply annotation of subsequent dialogue data questions.
  • identifying the training question intention and the training reply intention in the training dialogue data includes: splitting the training dialogue data into dialogue sequences to obtain multiple training dialogue sequences, and identifying each According to the sentence order in the training dialogue sequence, each training dialogue sequence is divided into training question data and training reply data, and the data intent of the training question data and training reply data is extracted to obtain The training question intent and the training reply intent.
  • the training dialogue sequence refers to a data sequence containing questions and replies
  • the sentence order refers to the contextual order of sentences in the training dialogue sequence.
  • the sentences in the training dialogue sequence can be The statements are divided into question statements and reply statements, the training question intention is used to characterize the intention type of the question in the training dialogue data, and the training reply intention is used to characterize the intention type of the reply in the training dialogue data, as described
  • the intent type of the question is to inquire about disease symptoms, to inquire about the treatment of the disease, to inquire about the medication regimen of the disease, etc.
  • the intent type of the reply is to list the symptoms of the disease, to enumerate the medication regimen of the disease, to enumerate the sequelae of the disease, etc.
  • dividing each training dialogue sequence into training question data and training reply data according to the sentence order includes: determining each of the training dialogue sequences according to the sentence order.
  • the upper sentence and the lower sentence in the training dialogue sequence are used as the training question data, and the lower sentence is used as the training reply data.
  • the data intention of the training question data and training reply data is realized through a deep learning algorithm.
  • the embodiment of the present application calculates the intention correlation degree between the training question intention and the training reply intention to obtain the matching degree between the training question intention and the training reply intention, ensuring the prerequisite for the construction of the subsequent correlation matrix.
  • calculating the intention relevance of the training question intention and the training reply intention includes: performing word segmentation processing on the training question intention and the training reply intention respectively to obtain question intention words and reply intention words, perform vector conversion on the question intention words and the reply intention words respectively to obtain question word vectors and reply word vectors, calculate the vector correlation between the question word vectors and the reply word vectors, and The vector correlation is used as the intention correlation between the training question intention and the training reply intention.
  • the word segmentation processing of the training question intention and the training reply intention is implemented by a word segmentation algorithm, such as the stuttering word segmentation algorithm, and the vector conversion algorithm of the question intention words and the reply intention words is implemented by a vector conversion algorithm.
  • a word segmentation algorithm such as the stuttering word segmentation algorithm
  • the vector conversion algorithm of the question intention words and the reply intention words is implemented by a vector conversion algorithm.
  • Implementation such as one-hot algorithm.
  • the following formula is used to calculate the vector correlation between the question word vector and the reply word vector:
  • the cos ⁇ represents the vector correlation degree
  • a i represents the i-th vector in the question word vector
  • B j represents the j-th vector in the reply word vector
  • n represents the number of vectors in the question word vector
  • m represents the reply word vector. number of vectors.
  • the embodiment of the present application constructs an association matrix of the training question intention and the training reply intention according to the intention correlation degree, so as to form a mapping relationship between the training question intention and the training reply intention, so as to facilitate subsequent training question intentions. Relationship matching search with training reply intent.
  • constructing a correlation matrix of the training question intention and the training reply intention according to the intention correlation degree includes: determining the matrix positions of the training question intention and the training reply intention. , loading the intention correlation degree into the matrix position to generate a correlation matrix of the training question intention and the training reply intention.
  • the matrix position refers to the position information of the training question intention and the training reply intention in the subsequently generated association matrix, which is determined based on the position sequence of the training question intention and the training reply intention.
  • S3. Receive offline conversation data, identify offline questions and offline replies of the offline conversation data, and use a preset classification model to identify offline question categories of the offline replies.
  • the offline conversation data refers to the data that needs to be marked with question reply intentions
  • the offline questions refer to the questions raised by the user in the offline conversation data
  • the offline replies refer to the questions in the offline conversation data. Answers to questions asked by users in the dialogue data.
  • the offline dialogue data is obtained by querying the business system that generates the offline object data.
  • the business system includes an intelligent customer service system.
  • the offline questions and The offline reply is obtained by setting an identification script in the dialog box of the offline conversation data, and the identification script includes a shell script.
  • the preset classification model is constructed through the Fasttext network, which is used to identify the offline question category of the offline reply to achieve reply intention matching for subsequent offline questions.
  • the pre-trained classification model before using the pre-trained classification model to identify the question category of the offline reply, it also includes: obtaining training samples and their corresponding real question categories, and using the coding layer in the pre-built classification model to Perform vector encoding on the training samples to obtain encoding vectors, use the projection layer in the pre-built classification model to perform overlay averaging processing on the encoding vectors to obtain a mean vector, and use the fully-connected layer in the pre-built classification model to calculate the Describe the problem category probability of the mean vector, and according to the problem category probability, output the predicted problem category of the training sample, and use the loss function in the pre-built classification model to calculate the loss between the predicted problem category and the real problem category value, if the loss value is not less than the preset threshold, adjust the model parameters in the pre-built classification model, and return to perform the vector encoding of the training sample using the coding layer in the pre-built classification model. Step: If the loss value is less than the preset threshold, a pre-trained classification
  • the training sample refers to the data containing user responses
  • the real question category refers to the question category label used to characterize the corresponding training sample, which is used to supervise the learning effect of the subsequent model in the training process and ensure the model's Data processing capabilities.
  • using the coding layer in the pre-built classification model to vector-code the training samples to obtain the coding vector includes: using the vector conversion algorithm in the coding layer to convert the The training samples are vector converted, and the index of the training samples after vector conversion is queried to obtain the encoding vector.
  • the vector conversion algorithm includes the word2vec algorithm, and the index is queried through the vocabulary.
  • the superposition averaging processing of the encoding vector is implemented through the global pooling (GlobalAveragePooling, GAP) technology in the projection layer, which is used to implement feature extraction of the encoding vector, Ensure the calculation speed and accuracy of subsequent problem categories.
  • GAP global pooling
  • the problem category probability is implemented through an activation function in the fully connected layer, such as a softmax function
  • the loss function includes a categorical_crossentropy function
  • the preset threshold can be set to, It can also be set according to actual business scenarios
  • the parameters refer to the network structure parameters in the pre-built classification model, such as weights, biases, etc.
  • the parameter adjustment is implemented through an optimizer, such as stochastic gradient descent optimization. device.
  • the offline reply is input into the pre-trained classification model to output the offline question category of the offline reply.
  • the offline problem categories can also be stored in a blockchain node.
  • querying the training question intent that satisfies preset conditions from the correlation matrix according to the offline question category includes: obtaining the training question category of the training question intent in the correlation matrix, calculating the The type matching degree between the offline question category and the training question category. When the category matching degree meets the preset condition, the training question intention is generated.
  • the calculation method of the type matching degree is the same as the calculation method of the above-mentioned intention correlation degree, which will not be described further here.
  • the preset condition can be set to whether the category matching degree is greater than the preset matching degree, that is, where the When the category matching degree is greater than the preset matching degree, the category matching degree satisfies the preset condition.
  • the preset matching degree is set to 0.88.
  • the embodiment of the present application uses the training reply intention corresponding to the training question intention as the offline reply intention of the offline question, so as to realize the reverse annotation of the reply intention of the offline question and reduce too many human participation in annotation actions. Improve the efficiency of problem annotation.
  • the embodiment of the present application first divides the training dialogue data into sequences by identifying the training question intention and the training reply intention in the training dialogue data, establishes the corresponding relationship between questions and replies, and calculates the training questions
  • the degree of intention correlation between the intention and the training reply intention is used to construct a correlation matrix between the training question intention and the training reply intention, forming a mapping relationship between the training question intention and the training reply intention, to facilitate subsequent training question intention and training Relationship matching search for reply intentions;
  • the embodiment of this application realizes the reply intention of subsequent offline questions by identifying offline questions and offline replies of offline conversation data, and using a preset classification model to identify the offline question categories of the offline replies.
  • the embodiment of the present application queries the training question intention that meets the preset conditions from the association matrix according to the offline question category, and uses the training reply intention corresponding to the training question intention as the offline question Reply offline intention to achieve reverse annotation of the reply intention of the offline question, reduce too many human participation in annotation actions, and improve the efficiency of question annotation. Therefore, the question annotation method proposed in the embodiment of the present application can improve the efficiency of question annotation.
  • the question annotation device 100 described in this application can be installed in electronic equipment. According to the implemented functions, the question annotation device may include a dialogue data identification module 101, an association matrix construction module 102, a question category identification module 103, and a question reply annotation module 104.
  • the module described in this application can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of the electronic device and can complete a fixed function, and are stored in the memory of the electronic device.
  • each module/unit is as follows:
  • the dialogue data identification module 101 is used to obtain training dialogue data and identify training question intentions and training reply intentions in the training dialogue data;
  • the correlation matrix construction module 102 is used to calculate the intention correlation between the training question intention and the training reply intention, and construct an correlation matrix between the training question intention and the training reply intention according to the intention correlation;
  • the question category identification module 103 is configured to receive offline dialogue data, identify offline questions and offline replies of the offline dialogue data, and use a preset classification model to identify the offline question category of the offline replies;
  • the question reply annotation module 104 is configured to query the training question intention that meets the preset conditions from the association matrix according to the offline question category, and use the training reply intention corresponding to the training question intention as the offline question Reply offline intent.
  • each module in the question labeling device 100 in the embodiment of the present application adopts the same technical means as the question labeling method described in Figure 1 above, and can produce the same technical effect. Here No longer.
  • FIG. 3 it is a schematic structural diagram of an electronic device 1 that implements the problem annotation method of this application.
  • the electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a problem annotation program. .
  • the processor 10 may be composed of an integrated circuit in some embodiments, for example, it may be composed of a single packaged integrated circuit, or it may be composed of multiple integrated circuits packaged with the same function or different functions, including one or A combination of multiple central processing units (CPUs), microprocessors, digital processing chips, graphics processors and various control chips.
  • the processor 10 is the control core (ControlUnit) of the electronic device 1, using various interfaces and lines to connect various components of the entire electronic device 1, by running or executing programs or modules stored in the memory 11 (for example, Execute problem annotation program, etc.), and call the data stored in the memory 11 to perform various functions of the electronic device 1 and process data.
  • ControlUnit ControlUnit
  • the memory 11 includes at least one type of readable storage medium, which may be non-volatile or volatile.
  • the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc.
  • the memory 11 may be an internal storage unit of the electronic device 1 , such as a mobile hard disk of the electronic device 1 .
  • the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (SmartMediaCard, SMC), or a secure digital (SD) equipped on the electronic device 1. card, flash card (FlashCard), etc.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can not only be used to store application software installed on the electronic device 1 and various types of data, such as codes for problem annotation programs, etc., but can also be used to temporarily store data that has been output or will be output.
  • the communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus, etc.
  • the bus is configured to enable connection communication between the memory 11 and at least one processor 10 and the like.
  • the communication interface 13 is used for communication between the above-mentioned electronic device 1 and other devices, including a network interface and an employee interface.
  • the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which are generally used to establish communication connections between the electronic device 1 and other electronic devices 1 .
  • the employee interface may be a display (Display) or an input unit (such as a keyboard).
  • the employee interface may also be a standard wired interface or a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, or the like.
  • the display which may also be appropriately called a display screen or a display unit, is used for displaying information processed in the electronic device 1 and for displaying a visual employee interface.
  • FIG. 3 only shows the electronic device 1 with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not limit the electronic device 1 and may include fewer or more components than shown in the figure. components, or combinations of certain components, or different component arrangements.
  • the electronic device 1 may also include a power supply (such as a battery) that supplies power to various components.
  • the power supply may be logically connected to the at least one processor 10 through a power management device, so that through the power management device
  • the device implements functions such as charging management, discharge management, and power consumption management.
  • the power supply may also include one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
  • the electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described again here.
  • the problem annotation program stored in the memory 11 of the electronic device 1 is a combination of multiple computer programs. When run in the processor 10, it can realize:
  • Receive offline conversation data identify offline questions and offline replies of the offline conversation data, and use a preset classification model to identify the offline question category of the offline reply;
  • the training question intention that satisfies the preset conditions is queried from the correlation matrix, and the training reply intention corresponding to the training question intention is used as the reply offline intention of the offline question.
  • the integrated modules/units of the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium.
  • the computer-readable storage medium may be volatile or non-volatile.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) ).
  • This application also provides a computer-readable storage medium.
  • the readable storage medium stores a computer program. When executed by the processor of the electronic device 1, the computer program can realize:
  • Receive offline conversation data identify offline questions and offline replies of the offline conversation data, and use a preset classification model to identify the offline question category of the offline reply;
  • the training question intention that satisfies the preset conditions is queried from the correlation matrix, and the training reply intention corresponding to the training question intention is used as the reply offline intention of the offline question.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of hardware plus software function modules.
  • Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain is essentially a decentralized database. It is a series of data blocks generated using cryptographic methods. Each data block contains a batch of network transaction information and is used to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • Blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • AI artificial intelligence
  • digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种问题标注方法、装置、电子设备以及存储介质,问题标注方法包括:获取训练对话数据,识别训练对话数据中的训练问题意图和训练回复意图(S1);计算训练问题意图和训练回复意图的意图关联度,根据意图关联度,构建训练问题意图和训练回复意图的关联矩阵(S2);接收离线对话数据,并识别离线对话数据的离线问题和离线回复,利用预设的分类模型识别离线回复的离线问题类别(S3);根据离线问题类别,从关联矩阵中查询满足预设条件的训练问题意图,并将训练问题意图对应的训练回复意图作为离线问题的回复离线意图(S4)。提高了问题标注的效率。

Description

问题标注方法、装置、电子设备及存储介质
本申请要求于2022年03月23日提交中国专利局、申请号为202210289574.X,发明名称为“问题标注方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能领域,尤其涉及一种问题标注方法、装置、电子设备及计算机可读存储介质。
背景技术
当前,随着人工智能技术的发展,智能客服在多个领域的应用也越来越广泛,智能客服在与用户交互过程中是基于问题标注实现的,即识别用户提出的问题意图并进行相应的答复,并将该答复进行标注,进而实现智能客户的智能问答。
但是,发明人意识到,传统的问题标注是通过标注人员去标注针对用户提出的问题进行回复的标注,并让所有标注人员去统一学习用户提出问题的意图及对应的回复意图的标注标准,由于标注人员在进行标注时对标注人员的记忆要求较高,且需要标注人员进行问题意图筛选,导致问题标注的效率低下。
发明内容
本申请提供的一种问题标注方法,包括:
获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
本申请还提供一种问题标注装置,所述装置包括:
对话数据识别模块,用于获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
关联矩阵构建模块,用于计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
问题类别识别模块,用于接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
问题回复标注模块,用于根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
本申请还提供一种电子设备,所述电子设备包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以实现如下所述的问题标注方法:
获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一个计算机程序,所述至少一个计算机程序被电子设备中的处理器执行以实现如下所述的问题标注方法:
获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
附图说明
图1为本申请一实施例提供的问题标注方法的流程示意图;
图2为本申请一实施例提供的问题标注装置的模块示意图;
图3为本申请一实施例提供的实现问题标注方法的电子设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供一种问题标注方法。所述问题标注方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述问题标注方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。所述服务器可以是独立的服务器,也可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(ContentDeliveryNetwork,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。
参照图1所示,为本申请一实施例提供的问题标注方法的流程示意图。在本申请实施例中,所述问题标注方法包括:
S1、获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图。
本申请实施例中,所述训练对话数据是指针对用户提问的问题作出回复的数据,其基于不同的业务场景产生,如在医疗场景中,所述训练对话数据可以为疾病-症状的对话数据,在金融场景中,所述训练对话数据可以为保险-理赔的对话数据,在商城订单场景中,所述训练数据可以为订单-售后的对话数据。
应该了解的是,在所述训练对话数据中会存在问题和回复的对应数据,因此,本申请实施例通过识别所述训练对话数据中的训练问题意图和训练回复意图,以将所述训练对话数据进行序列拆分,建立问题与回复的对应关系,保障后续对话数据问题的回复标注前提。
作为本申请的一个实施例,所述识别所述训练对话数据中的训练问题意图和训练回复 意图,包括:将所述训练对话数据进行对话序列拆分,得到多个训练对话序列,识别每个所述训练对话序列中的语句顺序,根据所述语句顺序,将每个所述训练对话序列划分为训练问题数据和训练回复数据,并提取所述训练问题数据和训练回复数据的数据意图,得到所述训练问题意图和训练回复意图。
其中,所述训练对话序列是指包含问题-回复的数据序列,所述语句顺序是指在所述训练对话序列中的句子的上下文顺序,通过所述语句顺序可以将所述训练对话序列中的语句划分为问题语句和回复语句,所述训练问题意图用于表征所述训练对话数据中问题的意图类型,所述训练回复意图用于表征所述训练对话数据中回复的意图类型,如所述问题的意图类型为咨询疾病症状、咨询疾病的治疗方式、咨询疾病的用药方案等,所述回复的意图类型:列举疾病症状、列举疾病的用药方案、列举疾病的后遗症等。
进一步地,本申请一可选实施例中,所述根据所述语句顺序,将每个所述训练对话序列划分为训练问题数据和训练回复数据,包括:根据所述语句顺序,确定每个所述训练对话序列中的上文语句和下文语句,并将所述上文语句作为所述训练问题数据,及将所述下文语句作为所述训练回复数据。
进一步地,本申请一可选实施例中,所述训练问题数据和训练回复数据的数据意图通过深度学习算法实现。
S2、计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵。
本申请实施例通过计算所述训练问题意图和所述训练回复意图的意图关联度,以获取所述训练问题意图和所述训练回复意图的匹配度,保障后续关联矩阵的构建前提。
作为本申请的一个实施例,所述计算所述训练问题意图和所述训练回复意图的意图关联度,包括:分别将所述训练问题意图和所述训练回复意图进行分词处理,得到问题意图词语和回复意图词语,分别将所述问题意图词语和所述回复意图词语进行向量转换,得到问题词语向量和回复词语向量,计算所述问题词语向量和所述回复词语向量的向量关联度,并将所述向量关联度作为所述训练问题意图和所述训练回复意图的意图关联度。
一个可选实施例中,所述训练问题意图和所述训练回复意图的分词处理通过分词算法实现,如结巴分词算法,所述问题意图词语和所述回复意图词语的向量转换算法通过向量转换算法实现,如one-hot算法。
一个可选实施例中,利用下述公式计算所述问题词语向量和所述回复词语向量的向量关联度:
Figure PCTCN2022123000-appb-000001
其中,所述cosθ表示向量关联度,A i表示问题词语向量中第i个向量,B j表示回复词语向量中第j个向量,n表示问题词语向量中的向量数量,m表示回复词语向量中的向量数量。
进一步地,本申请实施例根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵,以形成所述训练问题意图和训练回复意图的映射关系,方便后续训练问题意图和训练回复意图的关系匹配查找。
作为本申请的一个实施例,所述根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵,包括:确定所述训练问题意图和所述训练回复意图的矩阵位置,将所述意图关联度加载至所述矩阵位置中,以生成所述训练问题意图和所述训练回复意图的关联矩阵。
其中,所述矩阵位置是指所述训练问题意图和所述训练回复意图在后续生成的关联矩阵中的位置信息,其基于所述训练问题意图和所述训练回复意图所处的位置序列确定。
S3、接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别。
本申请实施例中,所述离线对话数据是指需要进行问题回复意图标注的数据,所述离线问题是指在所述离线对话数据中用户提出的问题,所述离线回复是指在所述离线对话数据中针对用户提问的问题进行回复的答案,可选的,所述离线对话数据通过查询在产生所述离线对象数据的业务系统得到,所述业务系统包括智能客服系统,所述离线问题和所述离线回复通过在所述离线对话数据的对话框中设置识别脚本得到,所述识别脚本包括shell脚本。所述预设的分类模型通过Fasttext网络构建,其用于识别所述离线回复的离线问题类别,以实现后续离线问题的回复意图匹配。
进一步地,本申请实施例中,所述利用预训练好的分类模型识别所述离线回复的问题类别之前,还包括:获取训练样本和其对应的真实问题类别,利用预构建分类模型中编码层对所述训练样本进行向量编码,得到编码向量,利用所述预构建分类模型中投影层对所述编码向量进行叠加平均处理,得到均值向量,利用所述预构建分类模型中全连接层计算所述均值向量的问题类别概率,并根据所述问题类别概率,输出所述训练样本的预测问题类别,利用所述预构建分类模型中损失函数计算所述预测问题类别与所述真实问题类别的损失值,若所述损失值不小于所述预设阈值,则调整所述预构建分类模型中的模型参数,并返回执行所述利用预构建分类模型中编码层对所述训练样本进行向量编码的步骤,若所述损失值小于所述预设阈值,则得到预训练好的分类模型。
其中,所述训练样本是指包含用户回复的数据,所述真实问题类别是指用于表征所述训练样本对应的问题类别标签,其用于监督后续模型在训练过程的学习效果,保障模型的数据处理能力。
进一步地,本申请一可选实施例中,所述利用预构建分类模型中编码层对所述训练样本进行向量编码,得到编码向量,包括:利用所述编码层中的向量转换算法将所述训练样本进行向量转换,并查询向量转换后的所述训练样本的索引,得到编码向量。可选的,所述向量转换算法包括word2vec算法,所述索引通过词汇表进行查询。
进一步地,本申请一可选实施例中,所述编码向量的叠加平均处理通过所述投影层中的全局池化(GlobalAveragePooling,GAP)技术实现,其用于实现所述编码向量的特征提取,保障后续问题类别的计算速度和准确性。
进一步地,本申请一可选实施例中,所述问题类别概率通过所述全连接层中的激活函数实现,如softmax函数,所述损失函数包括categorical_crossentropy函数,所述预设阈值可以设置为,也可以根据实际业务场景设置
进一步地,本申请一可选实施例中,所述参数是指所述预构建分类模型中的网络结构参数,如权重、偏置等,所述参数调整通过优化器实现,如随机梯度下降优化器。
进一步地,本申请实施例通过将所述离线回复输入至所述预训练好的分类模型中,以输出所述离线回复的离线问题类别。
进一步地,为保障所述离线问题类别的隐私性和复用性,所述离线问题类别还可存储于一区块链节点中。
S4、根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
本申请实施例中,所述根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,包括:获取所述关联矩阵中训练问题意图的训练问题类别,计算所述离线问题类别与所述训练问题类别的类型匹配度,在所述类别匹配度满足所述预设条件时,生成所述训练问题意图。
其中,所述类型匹配度的计算方法与上述意图关联度的计算方法相同,在此不做进一步赘述,所述预设条件可以设置为所述类别匹配度是否大于预设匹配度,即在所述类别匹 配度大于所述预设匹配度时,所述类别匹配度满足所述预设条件,可选的,所述预设的匹配度设置为0.88。
进一步地,本申请实施例将所述训练问题意图对应的训练回复意图作为所述离线问题的离线回复意图,以实现所述离线问题的回复意图反向标注,减少过多人为参与标注的动作,提高问题标注的效率。
可以看出,本申请实施例首先通过识别训练对话数据中的训练问题意图和训练回复意图,以将所述训练对话数据进行序列拆分,建立问题与回复的对应关系,并计算所述训练问题意图和所述训练回复意图的意图关联度,以构建所述训练问题意图和所述训练回复意图的关联矩阵,形成所述训练问题意图和训练回复意图的映射关系,方便后续训练问题意图和训练回复意图的关系匹配查找;其次,本申请实施例通过识别离线对话数据的离线问题和离线回复,并利用预设的分类模型识别所述离线回复的离线问题类别,以实现后续离线问题的回复意图匹配前提;进一步地,本申请实施例根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图,以实现所述离线问题的回复意图反向标注,减少过多人为参与标注的动作,提高问题标注的效率。因此,本申请实施例提出的一种问题标注方法可以提高问题标注的效率。
如图2所示,是本申请问题标注装置的功能模块图。
本申请所述问题标注装置100可以安装于电子设备中。根据实现的功能,所述问题标注装置可以包括对话数据识别模块101、关联矩阵构建模块102、问题类别识别模块103以及问题回复标注模块104。本申请所述模块也可以称之为单元,是指一种能够被电子设备的处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述对话数据识别模块101,用于获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
所述关联矩阵构建模块102,用于计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
所述问题类别识别模块103,用于接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
所述问题回复标注模块104,用于根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
详细地,本申请实施例中所述问题标注装置100中的所述各模块在使用时采用与上述的图1中所述的问题标注方法一样的技术手段,并能够产生相同的技术效果,这里不再赘述。
如图3所示,是本申请实现问题标注方法的电子设备1的结构示意图。
所述电子设备1可以包括处理器10、存储器11、通信总线12以及通信接口13,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如问题标注程序。
其中,所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(CentralProcessingunit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备1的控制核心(ControlUnit),利用各种接口和线路连接整个电子设备1的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如执行问题标注程序等),以及调用存储在所述存储器11内的 数据,以执行电子设备1的各种功能和处理数据。
所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质可以是非易失性,也可以是易失性。所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(SmartMediaCard,SMC)、安全数字(SecureDigital,SD)卡、闪存卡(FlashCard)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如问题标注程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述通信总线12可以是外设部件互连标准(peripheralcomponentinterconnect,简称PCI)总线或扩展工业标准结构(extendedindustrystandardarchitecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
所述通信接口13用于上述电子设备1与其他设备之间的通信,包括网络接口和员工接口。可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备1之间建立通信连接。所述员工接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,员工接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(OrganicLight-EmittingDiode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的员工界面。
图3仅示出了具有部件的电子设备1,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
应该了解,所述实施例仅为说明之用,在专利发明范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的问题标注程序是多个计算机程序的组合,在所述处理器10中运行时,可以实现:
获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
具体地,所述处理器10对上述计算机程序的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为 独立的产品销售或使用时,可以存储在一个非易失性计算机可读取存储介质中。所述计算机可读存储介质可以是易失性的,也可以是非易失性的。例如,所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-OnlyMemory)。
本申请还提供一种计算机可读存储介质,所述可读存储介质存储有计算机程序,所述计算机程序在被电子设备1的处理器所执行时,可以实现:
获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(ArtificialIntelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种问题标注方法,其中,所述方法包括:
    获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
    计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
    接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
    根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
  2. 如权利要求1所述的问题标注方法,其中,所述识别所述训练对话数据中的训练问题意图和训练回复意图,包括:
    将所述训练对话数据进行对话序列拆分,得到多个训练对话序列,识别每个所述训练对话序列中的语句顺序;
    根据所述语句顺序,将每个所述训练对话序列划分为训练问题数据和训练回复数据,并提取所述训练问题数据和训练回复数据的数据意图,得到所述训练问题意图和训练回复意图。
  3. 如权利要求1所述的问题标注方法,其中,所述计算所述训练问题意图和所述训练回复意图的意图关联度,包括:
    分别将所述训练问题意图和所述训练回复意图进行分词处理,得到问题意图词语和回复意图词语;
    分别将所述问题意图词语和所述回复意图词语进行向量转换,得到问题词语向量和回复词语向量;
    计算所述问题词语向量和所述回复词语向量的向量关联度,并将所述向量关联度作为所述训练问题意图和所述训练回复意图的意图关联度。
  4. 如权利要求1所述的问题标注方法,其中,所述根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵,包括:
    确定所述训练问题意图和所述训练回复意图的矩阵位置,将所述意图关联度加载至所述矩阵位置中,以生成所述训练问题意图和所述训练回复意图的关联矩阵。
  5. 如权利要求1所述的问题标注方法,其中,所述利用预训练好的分类模型识别所述离线回复的问题类别之前,还包括:
    获取训练样本和其对应的真实问题类别,利用预构建分类模型中编码层对所述训练样本进行向量编码,得到编码向量;
    利用所述预构建分类模型中投影层对所述编码向量进行叠加平均处理,得到均值向量;
    利用所述预构建分类模型中全连接层计算所述均值向量的问题类别概率,并根据所述问题类别概率,输出所述训练样本的预测问题类别;
    利用所述预构建分类模型中损失函数计算所述预测问题类别与所述真实问题类别的损失值;
    若所述损失值不小于所述预设阈值,则调整所述预构建分类模型中的模型参数,并返回执行所述利用预构建分类模型中编码层对所述训练样本进行向量编码的步骤;
    若所述损失值小于所述预设阈值,则得到预训练好的分类模型。
  6. 如权利要求5所述的问题标注方法,其中,所述利用预构建分类模型中编码层对所述训练样本进行向量编码,得到编码向量,包括:
    利用所述编码层中的向量转换算法将所述训练样本进行向量转换,并查询向量转换后 的所述训练样本的索引,得到编码向量。
  7. 如权利要求1至6中任意一项所述的问题标注方法,其中,所述根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,包括:
    获取所述关联矩阵中训练问题意图的训练问题类别;
    计算所述离线问题类别与所述训练问题类别的类型匹配度,在所述类别匹配度满足所述预设条件时,生成所述训练问题意图。
  8. 一种问题标注装置,其中,所述装置包括:
    对话数据识别模块,用于获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
    关联矩阵构建模块,用于计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
    问题类别识别模块,用于接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
    问题回复标注模块,用于根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
  9. 一种电子设备,其中,所述电子设备包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下所述的问题标注方法:
    获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
    计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
    接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
    根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
  10. 如权利要求9所述的电子设备,其中,所述识别所述训练对话数据中的训练问题意图和训练回复意图,包括:
    将所述训练对话数据进行对话序列拆分,得到多个训练对话序列,识别每个所述训练对话序列中的语句顺序;
    根据所述语句顺序,将每个所述训练对话序列划分为训练问题数据和训练回复数据,并提取所述训练问题数据和训练回复数据的数据意图,得到所述训练问题意图和训练回复意图。
  11. 如权利要求9所述的电子设备,其中,所述计算所述训练问题意图和所述训练回复意图的意图关联度,包括:
    分别将所述训练问题意图和所述训练回复意图进行分词处理,得到问题意图词语和回复意图词语;
    分别将所述问题意图词语和所述回复意图词语进行向量转换,得到问题词语向量和回复词语向量;
    计算所述问题词语向量和所述回复词语向量的向量关联度,并将所述向量关联度作为所述训练问题意图和所述训练回复意图的意图关联度。
  12. 如权利要求9所述的电子设备,其中,所述根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵,包括:
    确定所述训练问题意图和所述训练回复意图的矩阵位置,将所述意图关联度加载至所述矩阵位置中,以生成所述训练问题意图和所述训练回复意图的关联矩阵。
  13. 如权利要求9所述的电子设备,其中,所述利用预训练好的分类模型识别所述离线回复的问题类别之前,还包括:
    获取训练样本和其对应的真实问题类别,利用预构建分类模型中编码层对所述训练样本进行向量编码,得到编码向量;
    利用所述预构建分类模型中投影层对所述编码向量进行叠加平均处理,得到均值向量;
    利用所述预构建分类模型中全连接层计算所述均值向量的问题类别概率,并根据所述问题类别概率,输出所述训练样本的预测问题类别;
    利用所述预构建分类模型中损失函数计算所述预测问题类别与所述真实问题类别的损失值;
    若所述损失值不小于所述预设阈值,则调整所述预构建分类模型中的模型参数,并返回执行所述利用预构建分类模型中编码层对所述训练样本进行向量编码的步骤;
    若所述损失值小于所述预设阈值,则得到预训练好的分类模型。
  14. 如权利要求13所述的电子设备,其中,所述利用预构建分类模型中编码层对所述训练样本进行向量编码,得到编码向量,包括:
    利用所述编码层中的向量转换算法将所述训练样本进行向量转换,并查询向量转换后的所述训练样本的索引,得到编码向量。
  15. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下所述的问题标注方法:
    获取训练对话数据,识别所述训练对话数据中的训练问题意图和训练回复意图;
    计算所述训练问题意图和所述训练回复意图的意图关联度,根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵;
    接收离线对话数据,并识别所述离线对话数据的离线问题和离线回复,利用预设的分类模型识别所述离线回复的离线问题类别;
    根据所述离线问题类别,从所述关联矩阵中查询满足预设条件的训练问题意图,并将所述训练问题意图对应的训练回复意图作为所述离线问题的回复离线意图。
  16. 如权利要求15所述的计算机可读存储介质,其中,所述识别所述训练对话数据中的训练问题意图和训练回复意图,包括:
    将所述训练对话数据进行对话序列拆分,得到多个训练对话序列,识别每个所述训练对话序列中的语句顺序;
    根据所述语句顺序,将每个所述训练对话序列划分为训练问题数据和训练回复数据,并提取所述训练问题数据和训练回复数据的数据意图,得到所述训练问题意图和训练回复意图。
  17. 如权利要求15所述的计算机可读存储介质,其中,所述计算所述训练问题意图和所述训练回复意图的意图关联度,包括:
    分别将所述训练问题意图和所述训练回复意图进行分词处理,得到问题意图词语和回复意图词语;
    分别将所述问题意图词语和所述回复意图词语进行向量转换,得到问题词语向量和回复词语向量;
    计算所述问题词语向量和所述回复词语向量的向量关联度,并将所述向量关联度作为所述训练问题意图和所述训练回复意图的意图关联度。
  18. 如权利要求15所述的计算机可读存储介质,其中,所述根据所述意图关联度,构建所述训练问题意图和所述训练回复意图的关联矩阵,包括:
    确定所述训练问题意图和所述训练回复意图的矩阵位置,将所述意图关联度加载至所述矩阵位置中,以生成所述训练问题意图和所述训练回复意图的关联矩阵。
  19. 如权利要求15所述的计算机可读存储介质,其中,所述利用预训练好的分类模型识别所述离线回复的问题类别之前,还包括:
    获取训练样本和其对应的真实问题类别,利用预构建分类模型中编码层对所述训练样本进行向量编码,得到编码向量;
    利用所述预构建分类模型中投影层对所述编码向量进行叠加平均处理,得到均值向量;
    利用所述预构建分类模型中全连接层计算所述均值向量的问题类别概率,并根据所述问题类别概率,输出所述训练样本的预测问题类别;
    利用所述预构建分类模型中损失函数计算所述预测问题类别与所述真实问题类别的损失值;
    若所述损失值不小于所述预设阈值,则调整所述预构建分类模型中的模型参数,并返回执行所述利用预构建分类模型中编码层对所述训练样本进行向量编码的步骤;
    若所述损失值小于所述预设阈值,则得到预训练好的分类模型。
  20. 如权利要求19所述的计算机可读存储介质,其中,所述利用预构建分类模型中编码层对所述训练样本进行向量编码,得到编码向量,包括:
    利用所述编码层中的向量转换算法将所述训练样本进行向量转换,并查询向量转换后的所述训练样本的索引,得到编码向量。
PCT/CN2022/123000 2022-03-23 2022-09-30 问题标注方法、装置、电子设备及存储介质 WO2023178979A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210289574.XA CN114595321A (zh) 2022-03-23 2022-03-23 问题标注方法、装置、电子设备及存储介质
CN202210289574.X 2022-03-23

Publications (1)

Publication Number Publication Date
WO2023178979A1 true WO2023178979A1 (zh) 2023-09-28

Family

ID=81810854

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/123000 WO2023178979A1 (zh) 2022-03-23 2022-09-30 问题标注方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN114595321A (zh)
WO (1) WO2023178979A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114595321A (zh) * 2022-03-23 2022-06-07 康键信息技术(深圳)有限公司 问题标注方法、装置、电子设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020295A (zh) * 2012-12-28 2013-04-03 新浪网技术(中国)有限公司 一种问题标签标注方法及装置
CN108446286A (zh) * 2017-02-16 2018-08-24 阿里巴巴集团控股有限公司 一种自然语言问句答案的生成方法、装置及服务器
US20200081939A1 (en) * 2018-09-11 2020-03-12 Hcl Technologies Limited System for optimizing detection of intent[s] by automated conversational bot[s] for providing human like responses
CN112035610A (zh) * 2020-08-28 2020-12-04 康键信息技术(深圳)有限公司 医疗领域问答对的生成方法、装置、计算机设备和介质
CN112328761A (zh) * 2020-11-03 2021-02-05 中国平安财产保险股份有限公司 一种意图标签设置方法、装置、计算机设备及存储介质
CN113486182A (zh) * 2021-08-02 2021-10-08 上海明略人工智能(集团)有限公司 一种意图识别的方法、系统、电子设备及可读存储介质
CN114595321A (zh) * 2022-03-23 2022-06-07 康键信息技术(深圳)有限公司 问题标注方法、装置、电子设备及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020295A (zh) * 2012-12-28 2013-04-03 新浪网技术(中国)有限公司 一种问题标签标注方法及装置
CN108446286A (zh) * 2017-02-16 2018-08-24 阿里巴巴集团控股有限公司 一种自然语言问句答案的生成方法、装置及服务器
US20200081939A1 (en) * 2018-09-11 2020-03-12 Hcl Technologies Limited System for optimizing detection of intent[s] by automated conversational bot[s] for providing human like responses
CN112035610A (zh) * 2020-08-28 2020-12-04 康键信息技术(深圳)有限公司 医疗领域问答对的生成方法、装置、计算机设备和介质
CN112328761A (zh) * 2020-11-03 2021-02-05 中国平安财产保险股份有限公司 一种意图标签设置方法、装置、计算机设备及存储介质
CN113486182A (zh) * 2021-08-02 2021-10-08 上海明略人工智能(集团)有限公司 一种意图识别的方法、系统、电子设备及可读存储介质
CN114595321A (zh) * 2022-03-23 2022-06-07 康键信息技术(深圳)有限公司 问题标注方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN114595321A (zh) 2022-06-07

Similar Documents

Publication Publication Date Title
WO2021212683A1 (zh) 基于法律知识图谱的查询方法、装置、电子设备及介质
CN113807973B (zh) 文本纠错方法、装置、电子设备及计算机可读存储介质
CN113704429A (zh) 基于半监督学习的意图识别方法、装置、设备及介质
CN113821622B (zh) 基于人工智能的答案检索方法、装置、电子设备及介质
CN112559687A (zh) 问题识别及查询方法、装置、电子设备及存储介质
WO2023159755A1 (zh) 虚假新闻检测方法、装置、设备及存储介质
WO2023178978A1 (zh) 基于人工智能的处方审核方法、装置、设备及介质
CN113887941A (zh) 业务流程生成方法、装置、电子设备及介质
CN112906377A (zh) 基于实体限制的问答方法、装置、电子设备及存储介质
WO2023178979A1 (zh) 问题标注方法、装置、电子设备及存储介质
CN114840684A (zh) 基于医疗实体的图谱构建方法、装置、设备及存储介质
CN113157739B (zh) 跨模态检索方法、装置、电子设备及存储介质
CN114416939A (zh) 智能问答方法、装置、设备及存储介质
CN116578704A (zh) 文本情感分类方法、装置、设备及计算机可读介质
CN116340516A (zh) 实体关系的聚类提取方法、装置、设备及存储介质
WO2022141867A1 (zh) 语音识别方法、装置、电子设备及可读存储介质
CN113420542B (zh) 对话生成方法、装置、电子设备及存储介质
WO2022222228A1 (zh) 文本不良信息识别方法、装置、电子设备及存储介质
CN115221276A (zh) 基于clip的中文图文检索模型训练方法、装置、设备及介质
CN114548114A (zh) 文本情绪识别方法、装置、设备及存储介质
CN113705692A (zh) 基于人工智能的情感分类方法、装置、电子设备及介质
CN113157865B (zh) 跨语言词向量生成方法、装置、电子设备及存储介质
CN115221875B (zh) 词权重生成方法、装置、电子设备及存储介质
CN114840560B (zh) 非结构化数据转化及存储方法和装置
CN114706927B (zh) 基于人工智能的数据批量标注方法及相关设备

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

Country of ref document: EP

Kind code of ref document: A1