WO2021012382A1 - Method and apparatus for configuring chat robot, computer device and storage medium - Google Patents

Method and apparatus for configuring chat robot, computer device and storage medium Download PDF

Info

Publication number
WO2021012382A1
WO2021012382A1 PCT/CN2019/107693 CN2019107693W WO2021012382A1 WO 2021012382 A1 WO2021012382 A1 WO 2021012382A1 CN 2019107693 W CN2019107693 W CN 2019107693W WO 2021012382 A1 WO2021012382 A1 WO 2021012382A1
Authority
WO
WIPO (PCT)
Prior art keywords
text block
business
block
field
text
Prior art date
Application number
PCT/CN2019/107693
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 深圳壹账通智能科技有限公司
Priority to SG11202004541WA priority Critical patent/SG11202004541WA/en
Publication of WO2021012382A1 publication Critical patent/WO2021012382A1/en

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
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds

Definitions

  • This application relates to a method, device, computer equipment and storage medium for configuring a chat robot.
  • OCR Optical Character Recognition
  • a method, apparatus, computer device, and storage medium for configuring a chat robot are provided.
  • One method of configuring a chatbot includes:
  • Obtain the scan map of the business table extract the table feature information in the scan map of the business table, determine the field type of the text block in the table feature information, and identify the target text block that needs to be field filled according to the field type, and perform the field filling target according to the need Text block, establish the relationship between each text block;
  • the chat robot is configured.
  • a device for configuring a chat robot includes:
  • the acquisition module is used to obtain the scan map of the business table, extract the table feature information in the scan map of the business table, determine the field type of the text block in the table feature information, and identify the target text block that needs to be filled in according to the field type.
  • the target text block for field filling, and the relationship between each text block is established;
  • the first processing module is configured to query the preset data type configuration table according to the target text block that needs to be field filled, and determine the data type of the field to be filled corresponding to each target text block;
  • the second processing module is used to generate business segment sentences for each target text block according to the data type of the field to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template;
  • the configuration module is used to configure the chat robot according to the position information of each target text block in the table feature information and the business segment statement of each target text block.
  • a computer device including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
  • Obtain the scan map of the business table extract the table feature information in the scan map of the business table, determine the field type of the text block in the table feature information, and identify the target text block that needs to be field filled according to the field type, and perform the field filling target according to the need Text block, establish the relationship between each text block;
  • the chat robot is configured.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the one or more processors execute the following steps:
  • Obtain the scan map of the business table extract the table feature information in the scan map of the business table, determine the field type of the text block in the table feature information, and identify the target text block that needs to be field filled according to the field type, and perform the field filling target according to the need Text block, establish the relationship between each text block;
  • the chat robot is configured.
  • Fig. 1 is an application scenario diagram of a method for configuring a chat robot according to one or more embodiments.
  • Fig. 2 is a schematic flowchart of a method for configuring a chat robot according to one or more embodiments.
  • FIG. 3 is a schematic diagram of the sub-flow of step 202 in FIG. 1 according to one or more embodiments.
  • Fig. 4 is a schematic diagram of a sub-flow of step 202 in Fig. 1 according to one or more embodiments.
  • FIG. 5 is a schematic diagram of the sub-flow of step 202 in FIG. 1 according to one or more embodiments.
  • FIG. 6 is a schematic diagram of the sub-flow of step 206 in FIG. 1 according to one or more embodiments.
  • FIG. 7 is a schematic diagram of the sub-flow of step 608 in FIG. 1 according to one or more embodiments.
  • Fig. 8 is a block diagram of an apparatus for configuring a chat robot according to one or more embodiments.
  • Figure 9 is a block diagram of a computer device according to one or more embodiments.
  • the method for configuring a chat robot provided in this application can be applied to the application environment as shown in FIG. 1.
  • the terminal 102 and the server 104 communicate through the network.
  • the server 104 obtains the scanned image of the business form from the terminal 102, extracts the feature information of the form in the scanned image of the business form, determines the field type of the text block in the feature information of the form, and identifies the target text block that needs to be filled in according to the field type.
  • the target text block for field filling establish the association relationship between each text block, query the preset data type configuration table according to the target text block for field filling, and determine the data type of the field to be filled corresponding to each target text block , According to the data type of the field to be filled corresponding to each target text block, the association relationship between each text block and the preset sentence template, generate the business segment sentence of each target text block, according to each target text block in the table feature information
  • the location information and business segment sentences of each target text block configure the chat robot.
  • the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
  • a method for configuring a chat robot is provided. Taking the method applied to the server in FIG. 1 as an example, the method includes the following steps:
  • Step S202 Obtain a scanned image of the business form, extract the feature information of the form in the scanned image of the business form, determine the field type of the text block in the feature information of the form, and identify the target text block that needs to be filled in according to the field type, and perform the fields as needed
  • the filled target text block establishes the relationship between the text blocks.
  • the scanned image of the business form can be a scanned copy of a paper business application form or a picture of an electronic business application form.
  • the character recognition algorithm can be used to extract the feature information of the form in the scanned image of the business form, and the character recognition algorithm can use feature extraction and text positioning And optical recognition extracts the form feature information from the business form scan.
  • Feature extraction refers to the feature extraction based on the target detection model trained in the character recognition algorithm, taking the scanned image of the business table as input, and extracting features through the convolutional neural network in the target detection model.
  • Text localization refers to the features extracted from the trained target detection model in the character recognition algorithm, and obtains the position information of the detected text block pictures and the text symbol pictures.
  • Optical recognition refers to the training through the character recognition algorithm The picture classification model of the detected characters and symbols in each text block picture and each text symbol picture.
  • the trained target detection model and picture classification model in the character recognition algorithm are trained based on a large number of sample pictures containing text and text symbols.
  • the text captured by the character recognition algorithm will be captured in blocks.
  • the field "Full Name" will be captured as a block.
  • the table feature information includes each character block, position information of each character block, character symbols, and position information of each character symbol.
  • Position information refers to the coordinates of each text block and each text symbol relative to the entire picture, in pixels.
  • the coordinates of the top-left vertex of the grab box are (top,left), and the bottom-right vertex is (bottom,right). The coordinates of these two points determine the position and size of the grab box.
  • the field types of each text block include required fields, option fields, and comment fields.
  • Option fields and comment fields correspond to the required fields.
  • the server will determine the field type as the text of the required field according to the field type of each text block
  • the block is the target text block
  • the text block with the field type as the option field is the option field text block
  • the text block with the field type as the comment field is the comment field text block, and then according to each target text block, each option field text block and each comment field
  • the distance between the text blocks determines the corresponding relationship between them, and then establishes the association relationship between the text blocks according to the corresponding relationship.
  • Step S204 Query a preset data type configuration table according to the target text block for which field filling is required, and determine the data type of the field to be filled corresponding to each target text block.
  • the server queries the preset data type configuration table according to the target text block for field filling, and can determine the data type of the field to be filled corresponding to each target text block.
  • the data type configuration table the data type of the field to be filled corresponding to each target text block is preset. For example, when the field to be filled is a phone number or age, the corresponding data type is a number.
  • Step S206 according to the data type of the fields to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template, generate business segment sentences of each target text block.
  • the server will determine the option field text block and the comment field text block corresponding to each target text block according to the association relationship between the text blocks, and then according to the data type of the field to be filled and the preset sentence corresponding to each target text block
  • the template, the option field text block and the comment field text block corresponding to each target text block generate business segment sentences for each target text block.
  • Business fragment sentences refer to sample dialogue fragments that need to be filled in fields corresponding to each target text block, including machine reply sentences, comment prompt sentences, and customer intention sentences.
  • the machine reply sentence is obtained based on each target text block.
  • the machine reply sentence refers to the language used by the chat robot to ask the customer for the required information corresponding to the field to be filled.
  • the comment prompt sentence is obtained based on the association relationship between the text blocks. When there is a comment field text block corresponding to the target text block, the comment prompt sentence can be obtained according to the comment field text block.
  • the comment prompt sentence is used to prompt the customer to input and The required information corresponding to the field to be filled.
  • the customer intent sentence is obtained based on the data type of each target text block and the relationship between the text blocks, and refers to the statement that the customer provides the information to be filled corresponding to the field to be filled. For example, when the data type is a number, the obtained customer intent statement should be a string of numbers.
  • the server will obtain the business segment sentences of each target text block in the order of machine reply sentences, comment prompt sentences, and user intention sentences.
  • step S208 the chat robot is configured according to the position information of each target text block in the table feature information and the business segment sentence of each target text block.
  • the filling order of the fields to be filled corresponding to each target text block can be determined, and the business segment sentences of each target text block are sorted according to the filling order of each target text block to generate a complete
  • the scenario process information of the business application so as to configure the chat robot according to the scenario process information.
  • the above method of configuring chat bots extracts the table feature information in the business table scanning diagram, determines the field type of each text block in the table feature information, and identifies the target text block that needs to be filled in according to the field type, and fills in the field as required Target text block, establish the association relationship between each text block, determine the data type of the field to be filled corresponding to each target text block by querying the preset data type configuration table, and then fill according to the need to fill corresponding to each target text block
  • the data type of the field, the association relationship between each text block and the preset sentence template generate the business segment statement of each target text block, according to the position information of each target text block in the table feature information and the business segment of each target text block Statement, configure the chat robot.
  • business processing can be performed according to the configured chat robot, so that users can provide the required information in the original paper form through online chat, complete business applications, and improve the efficiency of business processing.
  • step S202 includes:
  • Step S302 obtaining a scanned image of the business form, and preprocessing the scanned image of the business form;
  • Step S304 According to the trained target detection model, obtain the position information of each text block and the position information of each text symbol in the preprocessed business table scan image.
  • the target detection model is trained on a sample image including text blocks and text symbols. get;
  • Step S306 according to the position information of each character block and the position information of each character symbol, segment the scanned image of the business table to obtain multiple character block images and character symbol images;
  • Step S308 According to the trained picture classification model, extract the text block image and the text block and text symbol in each text symbol image to obtain the table feature information in the scanned image of the business table.
  • the picture classification model includes text blocks and text Sample images of symbols are trained.
  • Preprocessing includes denoising processing and tilt correction.
  • the target detection model is trained on sample pictures including text blocks and text symbols. After the scanned image of the business table is input into the trained target detection model in the character recognition algorithm, the convolutional neural network in the trained target detection model will extract Based on the features of the business table scan graph, and based on the extracted features and the fully connected layer in the trained target detection model, the location information of each text block in the business table scan graph and the location information of each text symbol are obtained, according to each text block The location information of each text symbol and the location information of each text symbol can be divided into the scanned image of the business table to obtain multiple text block images and text symbol images. Finally, the trained image classification model can be used to recognize the text in the picture.
  • Both the target detection model and the picture classification model are trained on sample pictures including text blocks and text symbols.
  • the target detection model can be common YOLO, Faster R-CNN, SSD, etc.
  • the picture classification model can be ResNet.
  • Common text symbols include long underscores, check boxes, etc. These text symbols can be used to help classify each text block.
  • the pre-processed business table scan map is processed by using the trained target detection model and the picture classification model, and the table feature information in the business table scan map is extracted, so as to realize the extraction of the table feature information.
  • step 304 includes:
  • the position information of each character block and the position information of each word symbol in the preprocessed business table scan map are obtained.
  • step S202 includes:
  • Step S402 Input each text block in the table feature information into the trained classification model to obtain the confidence that each text block belongs to each preset field type;
  • Step S404 Determine the coordinate distance between each character block and each character symbol according to the position information of each character block in the table feature information and the position information of each character symbol;
  • Step S406 Use each character symbol whose coordinate distance from each character block is within a preset distance threshold range as a character symbol associated with each character block;
  • Step S408 according to the association between each text block and each text symbol, correct the confidence that each text block belongs to each preset field type
  • Step S410 Sort the confidence of each text block belonging to each preset field type, and use the field type with the highest confidence as the field type of each text block.
  • the server inputs each text block in the table feature information into the trained classification model, and can obtain the confidence that each text block belongs to each preset field type, and the confidence that each text block belongs to each preset field type is used to indicate The probability that each text block belongs to each preset field type. After obtaining the confidence that each text block belongs to each preset field type, the server will determine the distance between each text block and each text symbol according to the location information of each text block and the location information of each text symbol in the table feature information.
  • each character symbol whose coordinate distance from each character block is within the preset distance threshold is regarded as the character symbol associated with each character block, and the attribute of each character block is corrected according to the association between each character block and each character symbol Regarding the confidence of each preset field type, finally sort the confidence of each text block attributable to each preset field type, and use the field type with the highest confidence as the field type of each text block.
  • each text block to modify the confidence that each text block belongs to each preset field type means that when the text block is associated with the text symbol, the text block is adjusted according to the type of the associated text symbol For example, if a field is followed by a check box, increase the confidence that the field is an "option field”; if a field is followed by a long underline, increase the confidence that the field is a "field required".
  • the required fields include required fields and optional fields. The required fields can be further classified by detecting whether there are required symbols before and after the text block.
  • the confidence that each text block belongs to each preset field type is obtained, and according to the association between each text block and each text symbol, it is corrected that each text block belongs to each preset field
  • the field type with the highest confidence is used as the field type of each text block to realize the determination of the field type of each text block.
  • Step S202 includes:
  • Step S502 according to the field type of each text block, determine that the text block whose field type is a field to be filled is the target text block that needs to be filled in.
  • Step S504 Determine the distance between each target text block and each option field text block and each comment field text block according to the position information of each text block in the table feature information;
  • Step S506 according to the distance between each target text block and each option field text block and each comment field text block, determine the option field text block and the comment field text block corresponding to each target text block;
  • Step S508 Establish an association relationship between each target text block and the corresponding option field text block and annotation field text block.
  • each text block includes required fields, option fields, and comment fields.
  • Option fields and comment fields correspond to the required fields.
  • the server will determine that the text block whose field type is the required field is the target text block that needs to be filled in, the text block whose field type is the option field is the option field text block, and the field type is the comment field
  • the text block is the text block of the comment field.
  • the distance between each target text block, each option field text block, and each comment field text block is determined.
  • the distance between the option field text block and the comment field text block determine the option field text block and the comment field text block corresponding to each target text block, and establish each target text block and the corresponding option field text block and comment field text block The relationship between.
  • the text block whose field type is the field to be filled is determined as the target text block, and the option field text corresponding to each target text block is determined according to the position information of each text block in the table feature information Blocks and text blocks in the annotation field, thereby establishing the association relationship between the text blocks, and realizing the determination of the association relationship between the text blocks.
  • step S206 includes:
  • Step S602 according to the position information of each target text block in the form feature information, determine the filling order of the fields to be filled corresponding to each target text block;
  • Step S604 Determine the business process sequence of the business segment statements of each target text block according to the filling order of the fields to be filled corresponding to each target text block;
  • Step S606 Generate scenario process information of the business application according to the business process sequence
  • Step S608 Perform model training according to the scene process information and the business segment sentences of each target text block, and configure a chat robot.
  • each target text block can get the business process sequence, according to the business process sequence and the business segment of each target text block
  • Sentences can generate the scene process information of the business application, and then perform model training according to the scene process information and the business fragment sentences of each target text block to obtain the natural language understanding model and the dialogue management model.
  • the natural language understanding model is used to determine the user's intention based on the user's sentence and to capture entity information
  • the dialogue management model is used to determine the reply sentence based on the user's sentence and the user's intention.
  • the order of filling in the fields to be filled corresponding to each target text block is determined, and the business of each target text block is determined according to the order of filling in the fields to be filled corresponding to each target text block.
  • the business flow sequence of the fragment sentences, the scene flow information of the business application is generated, the model training is performed according to the scene flow information and the business fragment sentences of each target text block, the chat robot is configured, and the configuration of the chat robot is realized.
  • step S608 includes:
  • Step S702 input the business segment sentences of each target text block as the first training set into the initial natural language understanding model for model training to obtain a natural language understanding model, which is used to judge user intentions and capture entity information based on user sentences ;
  • Step S704 input the scene process information as the second training set into the initial dialogue management model for model training, to obtain the dialogue management model, the dialogue management model is used to determine the reply sentence according to the user sentence and the user's intention;
  • Step S706 Configure a chat robot according to the natural language understanding model and the dialogue management model.
  • the business segment sentences of each target text block include machine reply sentences, comment prompt sentences, and user intention sentences.
  • the business segment sentences of each target text block are input as the first training set into the initial natural language understanding model for model training, which can make natural
  • the language comprehension model judges the user's intention according to the user's intention sentence and captures the required information in the user's intention sentence as the entity information.
  • the scene process information is input into the initial dialogue management model as the second training set for model training, so that the dialogue management model can determine the corresponding machine reply sentence and the comment prompt sentence according to the user sentence and the user's intention.
  • the chatbot can be configured.
  • the natural language understanding model will determine the user intention according to the first user intention sentence, and input the user intention into the dialogue management model.
  • the dialogue management model will be based on the user The intention determines the corresponding machine reply sentence and the comment prompt sentence and pushes it.
  • the customer responds to the second user’s intent sentence according to the pushed machine reply sentence and the comment prompt sentence.
  • the natural language understanding model will grab the need to fill in the second user’s intention sentence Information as entity information.
  • the natural language understanding model is obtained according to the business segment sentences of each target text block
  • the dialogue management model is obtained according to the scene process information
  • the chat robot is configured according to the natural language understanding model and the dialogue management model, thereby realizing the configuration of the chat robot.
  • a device for configuring a chat robot including: an acquisition module 802, a first processing module 804, a second processing module 806, and a configuration module 808, wherein:
  • the obtaining module 802 is used to obtain the scanned image of the business form, extract the feature information of the form in the scanned image of the business form, determine the field type of the text block in the form feature information, and identify the target text block that needs to be filled in according to the field type. For the target text blocks that need to be filled with fields, establish the association relationship between the text blocks;
  • the first processing module 804 is configured to query a preset data type configuration table according to the target text block that needs to be field filled, and determine the data type of the field to be filled corresponding to each target text block;
  • the second processing module 806 is configured to generate business segment sentences of each target text block according to the data type of the field to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template;
  • the configuration module 808 is used to configure the chat robot according to the position information of each target text block in the table feature information and the business segment sentence of each target text block.
  • the above device for configuring chat robots extracts the table feature information in the business table scanning diagram, determines the field type of each text block in the table feature information, and identifies the target text block that needs field filling according to the field type, and performs field filling according to the needs Target text block, establish the association relationship between each text block, determine the data type of the field to be filled corresponding to each target text block by querying the preset data type configuration table, and then fill according to the need to fill corresponding to each target text block
  • the data type of the field, the association relationship between each text block and the preset sentence template generate the business segment statement of each target text block, according to the position information of each target text block in the table feature information and the business segment of each target text block Statement, configure the chat robot.
  • business processing can be performed according to the configured chat robot, so that users can provide the required information in the original paper form through online chat, complete business applications, and improve the efficiency of business processing.
  • the acquisition module is also used to acquire a scanned image of the business form, preprocess the scanned image of the business form, and obtain the position of each text block in the scanned image of the preprocessed business form according to the trained target detection model
  • the target detection model is trained on sample pictures including text blocks and text symbols. According to the location information of each text block and the location information of each text symbol, the scanned image of the business table is divided to obtain multiple Text block images and text symbol images, according to the trained picture classification model, extract the text block images and text blocks and text symbols in each text symbol image to obtain the table feature information in the business table scan graph.
  • the picture classification model is based on Sample pictures including text blocks and text symbols are trained.
  • the acquisition module is also used to input the preprocessed scan map of the business form into the trained target detection model, and extract the preprocessed business form according to the convolutional neural network in the target detection model According to the features of the scanned image, the position information of each character block and the position information of each character symbol in the preprocessed service table scanned image are obtained according to the fully connected layer in the target detection model and the characteristics of the service table scanned image.
  • the acquisition module is also used to input each text block in the table feature information into the trained classification model to obtain the confidence that each text block belongs to each preset field type, according to each text in the table feature information
  • the position information of the block and the position information of each character symbol determine the coordinate distance between each character block and each character symbol, and each character symbol whose coordinate distance from each character block is within a preset distance threshold is regarded as the coordinate distance between each character block and each character symbol.
  • Block-associated text symbols according to the association between each text block and each text symbol, correct the confidence that each text block belongs to each preset field type, and calculate the confidence that each text block belongs to each preset field type Sort, and use the field type with the highest confidence as the field type of each text block.
  • the field types include fields to be filled, option fields, and comment fields.
  • the acquisition module is also used to determine the text block whose field type is a field to be filled as the target to be filled according to the field type of each text block.
  • the text block determines the distance between each target text block and each option field text block and each comment field text block according to the position information of each text block in the table feature information, and determines the distance between each target text block and each option field text block and each
  • the distance between the note field text blocks determines the option field text block and the note field text block corresponding to each target text block, and establishes the association relationship between each target text block and the corresponding option field text block and the note field text block.
  • the configuration module is also used to determine the filling order of the fields to be filled corresponding to each target text block according to the position information of each target text block in the table feature information, and to fill according to the required filling corresponding to each target text block Fill in the fields in order to determine the business process sequence of the business fragment statements of each target text block, generate the scene process information of the business application according to the business process sequence, and perform model training and configuration based on the scene process information and the business fragment statements of each target text block Chatbot.
  • the configuration module is also used to input the business segment sentences of each target text block as the first training set into the initial natural language understanding model for model training, to obtain the natural language understanding model, which is used according to the user Sentences determine user intentions and capture entity information, use scene process information as the second training set into the initial dialogue management model for model training, and obtain the dialogue management model.
  • the dialogue management model is used to determine the reply sentence according to the user's sentence and user intention. Language understanding model and dialogue management model, configure chatbots.
  • the various modules in the above apparatus for configuring chat robots can be implemented in whole or in part by software, hardware, and combinations thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 9.
  • the computer equipment includes a processor, a memory, and a network interface connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by the processor to implement a method of configuring a chat robot.
  • FIG. 9 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the specific computer equipment may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device including a memory and one or more processors, and computer-readable instructions are stored in the memory.
  • the steps of the method for configuring a chat robot provided in any embodiment of the present application are implemented .
  • One or more non-volatile storage media storing computer-readable instructions.
  • the computer-readable instructions When executed by one or more processors, the one or more processors implement the configuration provided in any embodiment of the present application The steps of the chatbot method.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Channel
  • memory bus Radbus direct RAM
  • RDRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)

Abstract

A method for configuring a chat robot, comprising: acquiring a scanned image of a service table; extracting table feature information in the scanned image of the service table; determining field types of text blocks in the table feature information, and identifying target text blocks that need to perform field filling according to the field types; according to said target text blocks, establishing an association relationship between the text blocks; querying a preset data type configuration table according to the target text blocks; determining a data type of a field to be filled corresponding to each target text block; according to the data type of the field corresponding to each target text block, the association relationship between the text blocks, and a preset sentence template, generating a service segment sentence of each target text block; and according to position information of each target text block in the table feature information and the service segment sentence of each target text block, configuring a chat robot.

Description

配置聊天机器人的方法、装置、计算机设备和存储介质Method, device, computer equipment and storage medium for configuring chat robot
相关申请的交叉引用Cross references to related applications
本申请要求于2019年7月25日提交中国专利局,申请号为2019106768243,申请名称为“配置聊天机器人的方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 25, 2019. The application number is 2019106768243 and the application name is "Methods, devices, computer equipment and storage media for configuring chat robots". The reference is incorporated in this application.
技术领域Technical field
本申请涉及一种配置聊天机器人的方法、装置、计算机设备和存储介质。This application relates to a method, device, computer equipment and storage medium for configuring a chat robot.
背景技术Background technique
随着计算机技术的发展,出现了基于OCR(Optical Character Recognition,光学字符识别)的业务申请方式,OCR是指电子设备(例如扫描仪或数码相机)检查纸上打印的字符,通过检测暗、亮的模式确定其形状,然后用字符识别方法将形状翻译成计算机文字的过程,基于OCR的业务申请方式包括通过OCR从用户已事先填写好的纸质表格中抓取内容并自动进行系统录入。With the development of computer technology, a business application method based on OCR (Optical Character Recognition) has emerged. OCR refers to electronic devices (such as scanners or digital cameras) that check the characters printed on paper and detect dark and bright characters. The model determines its shape, and then uses character recognition to translate the shape into computer text. The OCR-based business application method includes grabbing content from paper forms that users have filled in advance through OCR and automatically entering the system.
然而,发明人意识到,目前的基于OCR的业务申请方式仍需要用户先填写纸质表格,只是把后期录入过程自动化,存在业务处理效率低的问题。However, the inventor realizes that the current OCR-based business application method still requires users to fill out paper forms first, but only automates the later entry process, which has the problem of low business processing efficiency.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种配置聊天机器人的方法、装置、计算机设备和存储介质。According to various embodiments disclosed in the present application, a method, apparatus, computer device, and storage medium for configuring a chat robot are provided.
一种配置聊天机器人的方法包括:One method of configuring a chatbot includes:
获取业务表格扫描图,提取业务表格扫描图中的表格特征信息,确定表格特征信息中的文字块的字段类型,并根据字段类型识别需要进行字段填充的目标文字块,根据需要进行字段填充的目标文字块,建立各文字块之间的关联关系;Obtain the scan map of the business table, extract the table feature information in the scan map of the business table, determine the field type of the text block in the table feature information, and identify the target text block that needs to be field filled according to the field type, and perform the field filling target according to the need Text block, establish the relationship between each text block;
根据需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型;Query the preset data type configuration table according to the target text block that needs to be field filled, and determine the data type of the field to be filled corresponding to each target text block;
根据与各目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句;及According to the data type of the fields to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template, generate business segment sentences for each target text block; and
根据表格特征信息中各目标文字块的位置信息以及各目标文字块的业务片段语句,配置聊天机器人。According to the location information of each target text block in the table feature information and the business segment sentence of each target text block, the chat robot is configured.
一种配置聊天机器人的装置包括:A device for configuring a chat robot includes:
获取模块,用于获取业务表格扫描图,提取业务表格扫描图中的表格特征信息,确定 表格特征信息中的文字块的字段类型,并根据字段类型识别需要进行字段填充的目标文字块,根据需要进行字段填充的目标文字块,建立各文字块之间的关联关系;The acquisition module is used to obtain the scan map of the business table, extract the table feature information in the scan map of the business table, determine the field type of the text block in the table feature information, and identify the target text block that needs to be filled in according to the field type. The target text block for field filling, and the relationship between each text block is established;
第一处理模块,用于根据需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型;The first processing module is configured to query the preset data type configuration table according to the target text block that needs to be field filled, and determine the data type of the field to be filled corresponding to each target text block;
第二处理模块,用于根据与各目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句;及The second processing module is used to generate business segment sentences for each target text block according to the data type of the field to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template; and
配置模块,用于根据表格特征信息中各目标文字块的位置信息以及各目标文字块的业务片段语句,配置聊天机器人。The configuration module is used to configure the chat robot according to the position information of each target text block in the table feature information and the business segment statement of each target text block.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device, including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
获取业务表格扫描图,提取业务表格扫描图中的表格特征信息,确定表格特征信息中的文字块的字段类型,并根据字段类型识别需要进行字段填充的目标文字块,根据需要进行字段填充的目标文字块,建立各文字块之间的关联关系;Obtain the scan map of the business table, extract the table feature information in the scan map of the business table, determine the field type of the text block in the table feature information, and identify the target text block that needs to be field filled according to the field type, and perform the field filling target according to the need Text block, establish the relationship between each text block;
根据需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型;Query the preset data type configuration table according to the target text block that needs to be field filled, and determine the data type of the field to be filled corresponding to each target text block;
根据与各目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句;及According to the data type of the fields to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template, generate business segment sentences for each target text block; and
根据表格特征信息中各目标文字块的位置信息以及各目标文字块的业务片段语句,配置聊天机器人。According to the location information of each target text block in the table feature information and the business segment sentence of each target text block, the chat robot is configured.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more non-volatile computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the following steps:
获取业务表格扫描图,提取业务表格扫描图中的表格特征信息,确定表格特征信息中的文字块的字段类型,并根据字段类型识别需要进行字段填充的目标文字块,根据需要进行字段填充的目标文字块,建立各文字块之间的关联关系;Obtain the scan map of the business table, extract the table feature information in the scan map of the business table, determine the field type of the text block in the table feature information, and identify the target text block that needs to be field filled according to the field type, and perform the field filling target according to the need Text block, establish the relationship between each text block;
根据需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型;Query the preset data type configuration table according to the target text block that needs to be field filled, and determine the data type of the field to be filled corresponding to each target text block;
根据与各目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句;及According to the data type of the fields to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template, generate business segment sentences for each target text block; and
根据表格特征信息中各目标文字块的位置信息以及各目标文字块的业务片段语句,配置聊天机器人。According to the location information of each target text block in the table feature information and the business segment sentence of each target text block, the chat robot is configured.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the application are set forth in the following drawings and description. Other features and advantages of this application will become apparent from the description, drawings and claims.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为根据一个或多个实施例中配置聊天机器人的方法的应用场景图。Fig. 1 is an application scenario diagram of a method for configuring a chat robot according to one or more embodiments.
图2为根据一个或多个实施例中配置聊天机器人的方法的流程示意图。Fig. 2 is a schematic flowchart of a method for configuring a chat robot according to one or more embodiments.
图3为根据一个或多个实施例中图1中步骤202的子流程示意图。FIG. 3 is a schematic diagram of the sub-flow of step 202 in FIG. 1 according to one or more embodiments.
图4为根据一个或多个实施例中图1中步骤202的子流程示意图。Fig. 4 is a schematic diagram of a sub-flow of step 202 in Fig. 1 according to one or more embodiments.
图5为根据一个或多个实施例中图1中步骤202的子流程示意图。FIG. 5 is a schematic diagram of the sub-flow of step 202 in FIG. 1 according to one or more embodiments.
图6为根据一个或多个实施例中图1中步骤206的子流程示意图。FIG. 6 is a schematic diagram of the sub-flow of step 206 in FIG. 1 according to one or more embodiments.
图7为根据一个或多个实施例中图1中步骤608的子流程示意图。FIG. 7 is a schematic diagram of the sub-flow of step 608 in FIG. 1 according to one or more embodiments.
图8为根据一个或多个实施例中配置聊天机器人的装置的框图。Fig. 8 is a block diagram of an apparatus for configuring a chat robot according to one or more embodiments.
图9为根据一个或多个实施例中计算机设备的框图。Figure 9 is a block diagram of a computer device according to one or more embodiments.
具体实施方式Detailed ways
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application clearer, the following further describes the present application in detail with reference to the accompanying drawings and embodiments. 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所示的应用环境中。终端102与服务器104通过网络进行通信。服务器104从终端102获取业务表格扫描图,提取业务表格扫描图中的表格特征信息,确定表格特征信息中的文字块的字段类型,并根据字段类型识别需要进行字段填充的目标文字块,根据需要进行字段填充的目标文字块,建立各文字块之间的关联关系,根据需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型,根据与各目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句,根据表格特征信息中各目标文字块的位置信息以及各目标文字块的业务片段语句,配置聊天机器人。终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The method for configuring a chat robot provided in this application can be applied to the application environment as shown in FIG. 1. The terminal 102 and the server 104 communicate through the network. The server 104 obtains the scanned image of the business form from the terminal 102, extracts the feature information of the form in the scanned image of the business form, determines the field type of the text block in the feature information of the form, and identifies the target text block that needs to be filled in according to the field type. The target text block for field filling, establish the association relationship between each text block, query the preset data type configuration table according to the target text block for field filling, and determine the data type of the field to be filled corresponding to each target text block , According to the data type of the field to be filled corresponding to each target text block, the association relationship between each text block and the preset sentence template, generate the business segment sentence of each target text block, according to each target text block in the table feature information The location information and business segment sentences of each target text block, configure the chat robot. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
在其中一个实施例中,如图2所示,提供了一种配置聊天机器人的方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:In one of the embodiments, as shown in FIG. 2, a method for configuring a chat robot is provided. Taking the method applied to the server in FIG. 1 as an example, the method includes the following steps:
步骤S202,获取业务表格扫描图,提取业务表格扫描图中的表格特征信息,确定表格特征信息中的文字块的字段类型,并根据字段类型识别需要进行字段填充的目标文字块,根据需要进行字段填充的目标文字块,建立各文字块之间的关联关系。Step S202: Obtain a scanned image of the business form, extract the feature information of the form in the scanned image of the business form, determine the field type of the text block in the feature information of the form, and identify the target text block that needs to be filled in according to the field type, and perform the fields as needed The filled target text block establishes the relationship between the text blocks.
业务表格扫描图可以为纸质业务申请表格的扫描件也可以为电子业务申请表格的图片,提取业务表格扫描图中的表格特征信息可以采用字符识别算法,字符识别算法可以通 过特征提取、文字定位以及光学识别从业务表格扫描图中提取出表格特征信息。特征提取指的是基于字符识别算法中已训练的目标检测模型,将业务表格扫描图作为输入,通过目标检测模型中的卷积神经网络提取特征。文字定位指的是基于字符识别算法中已训练的目标检测模型提取到的特征,得到检测到的各文字块图片以及各文字符号图片的位置信息,光学识别指的是通过字符识别算法中已训练的图片分类模型对检测到的各文字块图片以及各文字符号图片中的文字以及符号进行识别。The scanned image of the business form can be a scanned copy of a paper business application form or a picture of an electronic business application form. The character recognition algorithm can be used to extract the feature information of the form in the scanned image of the business form, and the character recognition algorithm can use feature extraction and text positioning And optical recognition extracts the form feature information from the business form scan. Feature extraction refers to the feature extraction based on the target detection model trained in the character recognition algorithm, taking the scanned image of the business table as input, and extracting features through the convolutional neural network in the target detection model. Text localization refers to the features extracted from the trained target detection model in the character recognition algorithm, and obtains the position information of the detected text block pictures and the text symbol pictures. Optical recognition refers to the training through the character recognition algorithm The picture classification model of the detected characters and symbols in each text block picture and each text symbol picture.
字符识别算法中已训练的目标检测模型和图片分类模型是基于大量含有文字和文字符号的样本图片训练得到的。字符识别算法抓取的文字会以块为单位,例如字段“Full Name”会被抓取为一个块。表格特征信息包括各文字块、各文字块的位置信息、各文字符号以及各文字符号的位置信息。位置信息指的是各文字块以及各文字符号相对于整张图片的坐标,以像素为单位。抓取框左上角顶点的坐标是(top,left),右下角顶点是(bottom,right)。这两个点的坐标确定了抓取框的位置和大小。The trained target detection model and picture classification model in the character recognition algorithm are trained based on a large number of sample pictures containing text and text symbols. The text captured by the character recognition algorithm will be captured in blocks. For example, the field "Full Name" will be captured as a block. The table feature information includes each character block, position information of each character block, character symbols, and position information of each character symbol. Position information refers to the coordinates of each text block and each text symbol relative to the entire picture, in pixels. The coordinates of the top-left vertex of the grab box are (top,left), and the bottom-right vertex is (bottom,right). The coordinates of these two points determine the position and size of the grab box.
各文字块的字段类型包括需填字段、选项字段以及注释字段,选项字段以及注释字段是与需填字段相对应的,服务器会根据各文字块的字段类型,确定字段类型为需填字段的文字块为目标文字块,字段类型为选项字段的文字块为选项字段文字块,字段类型为注释字段的文字块为注释字段文字块,进而根据各目标文字块、各选项字段文字块以及各注释字段文字块之间的距离,来确定它们之间的对应关系,进而根据对应关系,建立各文字块之间的关联关系。The field types of each text block include required fields, option fields, and comment fields. Option fields and comment fields correspond to the required fields. The server will determine the field type as the text of the required field according to the field type of each text block The block is the target text block, the text block with the field type as the option field is the option field text block, and the text block with the field type as the comment field is the comment field text block, and then according to each target text block, each option field text block and each comment field The distance between the text blocks determines the corresponding relationship between them, and then establishes the association relationship between the text blocks according to the corresponding relationship.
步骤S204,根据需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型。Step S204: Query a preset data type configuration table according to the target text block for which field filling is required, and determine the data type of the field to be filled corresponding to each target text block.
服务器根据需要进行字段填充的目标文字块查询预设的数据类型配置表,可确定与各目标文字块对应的需填充字段的数据类型。在数据类型配置表中,预设了与各目标文字块对应的需填充字段的数据类型,例如当需填充字段为电话号码或者年龄时,对应的数据类型为数字。The server queries the preset data type configuration table according to the target text block for field filling, and can determine the data type of the field to be filled corresponding to each target text block. In the data type configuration table, the data type of the field to be filled corresponding to each target text block is preset. For example, when the field to be filled is a phone number or age, the corresponding data type is a number.
步骤S206,根据与各目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句。Step S206, according to the data type of the fields to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template, generate business segment sentences of each target text block.
服务器会根据各文字块之间的关联关系,确定与各目标文字块对应的选项字段文字块以及注释字段文字块,进而根据与各目标文字块对应的需填充字段的数据类型、预设的语句模板、与各目标文字块对应的选项字段文字块以及注释字段文字块,生成各目标文字块的业务片段语句。业务片段语句指的是获取与各目标文字块对应的需填充字段的样本对话片段,其中包括机器回复语句、注释提示语句以及客户意图语句。The server will determine the option field text block and the comment field text block corresponding to each target text block according to the association relationship between the text blocks, and then according to the data type of the field to be filled and the preset sentence corresponding to each target text block The template, the option field text block and the comment field text block corresponding to each target text block, generate business segment sentences for each target text block. Business fragment sentences refer to sample dialogue fragments that need to be filled in fields corresponding to each target text block, including machine reply sentences, comment prompt sentences, and customer intention sentences.
机器回复语句是基于各目标文字块得到的,机器回复语句指的是聊天机器人向客户询问与需填充字段对应的需填信息的用语。注释提示语句是基于各文字块之间的关联关系得到的,当存在与目标文字块对应的注释字段文字块时,可根据注释字段文字块得到注释提示语句,注释提示语句用于提示客户输入与需填充字段对应的需填信息。客户意图语句是 基于各目标文字块的数据类型以及各文字块之间的关联关系得到的,指的是客户提供与需填充字段对应的需填信息的语句。例如,当数据类型为数字时,得到的客户意图语句应该为一串数字。服务器会按照机器回复语句、注释提示语句、用户意图语句的顺序,得到各目标文字块的业务片段语句。The machine reply sentence is obtained based on each target text block. The machine reply sentence refers to the language used by the chat robot to ask the customer for the required information corresponding to the field to be filled. The comment prompt sentence is obtained based on the association relationship between the text blocks. When there is a comment field text block corresponding to the target text block, the comment prompt sentence can be obtained according to the comment field text block. The comment prompt sentence is used to prompt the customer to input and The required information corresponding to the field to be filled. The customer intent sentence is obtained based on the data type of each target text block and the relationship between the text blocks, and refers to the statement that the customer provides the information to be filled corresponding to the field to be filled. For example, when the data type is a number, the obtained customer intent statement should be a string of numbers. The server will obtain the business segment sentences of each target text block in the order of machine reply sentences, comment prompt sentences, and user intention sentences.
步骤S208,根据表格特征信息中各目标文字块的位置信息以及各目标文字块的业务片段语句,配置聊天机器人。In step S208, the chat robot is configured according to the position information of each target text block in the table feature information and the business segment sentence of each target text block.
根据各目标文字块的位置信息,可以确定与各目标文字块对应的需填充字段的填写顺序,将各目标文字块的业务片段语句按照各目标文字块的填写顺序进行排序,即可生成完整的业务申请的场景流程信息,从而根据场景流程信息,配置聊天机器人。According to the position information of each target text block, the filling order of the fields to be filled corresponding to each target text block can be determined, and the business segment sentences of each target text block are sorted according to the filling order of each target text block to generate a complete The scenario process information of the business application, so as to configure the chat robot according to the scenario process information.
上述配置聊天机器人的方法,提取业务表格扫描图中的表格特征信息,确定表格特征信息中各文字块的字段类型,并根据字段类型识别需要进行字段填充的目标文字块,根据需要进行字段填充的目标文字块,建立各文字块之间的关联关系,通过查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型,进而根据与各目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句,根据表格特征信息中各目标文字块的位置信息以及各目标文字块的业务片段语句,配置聊天机器人。从而可以根据配置的聊天机器人,进行业务处理,使用户通过线上聊天的方式提供原纸质表格中的所需信息,完成业务申请,提高了业务处理的效率。The above method of configuring chat bots extracts the table feature information in the business table scanning diagram, determines the field type of each text block in the table feature information, and identifies the target text block that needs to be filled in according to the field type, and fills in the field as required Target text block, establish the association relationship between each text block, determine the data type of the field to be filled corresponding to each target text block by querying the preset data type configuration table, and then fill according to the need to fill corresponding to each target text block The data type of the field, the association relationship between each text block and the preset sentence template, generate the business segment statement of each target text block, according to the position information of each target text block in the table feature information and the business segment of each target text block Statement, configure the chat robot. Thereby, business processing can be performed according to the configured chat robot, so that users can provide the required information in the original paper form through online chat, complete business applications, and improve the efficiency of business processing.
在其中一个实施例中,如图3所示,步骤S202包括:In one of the embodiments, as shown in FIG. 3, step S202 includes:
步骤S302,获取业务表格扫描图,对业务表格扫描图进行预处理;Step S302, obtaining a scanned image of the business form, and preprocessing the scanned image of the business form;
步骤S304,根据已训练的目标检测模型,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息,目标检测模型是以包括文字块和文字符号的样本图片训练得到;Step S304: According to the trained target detection model, obtain the position information of each text block and the position information of each text symbol in the preprocessed business table scan image. The target detection model is trained on a sample image including text blocks and text symbols. get;
步骤S306,根据各文字块的位置信息以及各文字符号的位置信息,分割业务表格扫描图,得到多个文字块图像以及文字符号图像;Step S306, according to the position information of each character block and the position information of each character symbol, segment the scanned image of the business table to obtain multiple character block images and character symbol images;
步骤S308,根据已训练的图片分类模型,提取各文字块图像以及各文字符号图像中的文字块以及文字符号,得到业务表格扫描图中的表格特征信息,图片分类模型是以包括文字块和文字符号的样本图片训练得到。Step S308: According to the trained picture classification model, extract the text block image and the text block and text symbol in each text symbol image to obtain the table feature information in the scanned image of the business table. The picture classification model includes text blocks and text Sample images of symbols are trained.
预处理包括去噪处理以及倾斜矫正。目标检测模型是以包括文字块和文字符号的样本图片训练得到,在将业务表格扫描图输入字符识别算法中已训练的目标检测模型后,已训练的目标检测模型中的卷积神经网络会提取业务表格扫描图的特征,并基于提取到的特征以及已训练的目标检测模型中的全连接层,得到业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息,根据各文字块的位置信息以及各文字符号的位置信息,分割业务表格扫描图,能够得到多个文字块图像以及文字符号图像,最后采用已训练的图片分类模型,可以对图片中的文字进行识别。目标检测模型和图片分类模型都是以包括文字块和 文字符号的样本图片训练得到,目标检测模型可以为常见的YOLO,Faster R-CNN,SSD等,图片分类模型可以为ResNet。常见的文字符号包括长下划线,勾选框等,这些文字符号可以用于帮助对各文字块进行分类。Preprocessing includes denoising processing and tilt correction. The target detection model is trained on sample pictures including text blocks and text symbols. After the scanned image of the business table is input into the trained target detection model in the character recognition algorithm, the convolutional neural network in the trained target detection model will extract Based on the features of the business table scan graph, and based on the extracted features and the fully connected layer in the trained target detection model, the location information of each text block in the business table scan graph and the location information of each text symbol are obtained, according to each text block The location information of each text symbol and the location information of each text symbol can be divided into the scanned image of the business table to obtain multiple text block images and text symbol images. Finally, the trained image classification model can be used to recognize the text in the picture. Both the target detection model and the picture classification model are trained on sample pictures including text blocks and text symbols. The target detection model can be common YOLO, Faster R-CNN, SSD, etc., and the picture classification model can be ResNet. Common text symbols include long underscores, check boxes, etc. These text symbols can be used to help classify each text block.
上述实施例,采用已训练的目标检测模型和图片分类模型对预处理后的业务表格扫描图进行处理,提取业务表格扫描图中的表格特征信息,实现了对表格特征信息的提取。In the above-mentioned embodiment, the pre-processed business table scan map is processed by using the trained target detection model and the picture classification model, and the table feature information in the business table scan map is extracted, so as to realize the extraction of the table feature information.
在其中一个实施例中,步骤304包括:In one of the embodiments, step 304 includes:
将预处理后的业务表格扫描图输入已训练的目标检测模型;Input the preprocessed scanned image of the business table into the trained target detection model;
根据所述目标检测模型中的卷积神经网络提取所述预处理后的业务表格扫描图的特征;及Extracting the features of the preprocessed scan map of the business table according to the convolutional neural network in the target detection model; and
根据所述目标检测模型中的全连接层以及所述业务表格扫描图的特征,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息。According to the fully connected layer in the target detection model and the features of the business table scan map, the position information of each character block and the position information of each word symbol in the preprocessed business table scan map are obtained.
在其中一个实施例中,如图4所示,步骤S202包括:In one of the embodiments, as shown in FIG. 4, step S202 includes:
步骤S402,将表格特征信息中各文字块输入已训练的分类模型,得到各文字块归属于各预设的字段类型的置信度;Step S402: Input each text block in the table feature information into the trained classification model to obtain the confidence that each text block belongs to each preset field type;
步骤S404,根据表格特征信息中各文字块的位置信息以及各文字符号的位置信息,确定各文字块与各文字符号之间的坐标距离;Step S404: Determine the coordinate distance between each character block and each character symbol according to the position information of each character block in the table feature information and the position information of each character symbol;
步骤S406,将与各文字块的坐标距离在预设的距离阈值范围内的各文字符号作为与各文字块关联的文字符号;Step S406: Use each character symbol whose coordinate distance from each character block is within a preset distance threshold range as a character symbol associated with each character block;
步骤S408,根据各文字块与各文字符号的关联情况,修正各文字块归属于各预设的字段类型的置信度;Step S408, according to the association between each text block and each text symbol, correct the confidence that each text block belongs to each preset field type;
步骤S410,将各文字块归属于各预设的字段类型的置信度进行排序,并将置信度最高的字段类型,作为各文字块的字段类型。Step S410: Sort the confidence of each text block belonging to each preset field type, and use the field type with the highest confidence as the field type of each text block.
服务器将表格特征信息中各文字块输入已训练的分类模型,可以得到各文字块归属于各预设的字段类型的置信度,各文字块归属于各预设的字段类型的置信度用于表示各文字块归属于各预设的字段类型的概率。在得到各文字块归属于各预设的字段类型的置信度之后,服务器会根据表格特征信息中各文字块的位置信息以及各文字符号的位置信息,确定各文字块与各文字符号之间的坐标距离,将与各文字块的坐标距离在预设的距离阈值范围内的各文字符号作为与各文字块关联的文字符号,根据各文字块与各文字符号的关联情况,修正各文字块归属于各预设的字段类型的置信度,最后将各文字块归属于各预设的字段类型的置信度进行排序,并将置信度最高的字段类型,作为各文字块的字段类型。The server inputs each text block in the table feature information into the trained classification model, and can obtain the confidence that each text block belongs to each preset field type, and the confidence that each text block belongs to each preset field type is used to indicate The probability that each text block belongs to each preset field type. After obtaining the confidence that each text block belongs to each preset field type, the server will determine the distance between each text block and each text symbol according to the location information of each text block and the location information of each text symbol in the table feature information. Coordinate distance, each character symbol whose coordinate distance from each character block is within the preset distance threshold is regarded as the character symbol associated with each character block, and the attribute of each character block is corrected according to the association between each character block and each character symbol Regarding the confidence of each preset field type, finally sort the confidence of each text block attributable to each preset field type, and use the field type with the highest confidence as the field type of each text block.
根据各文字块与各文字符号的关联情况,修正各文字块归属于各预设的字段类型的置信度指的是当文字块与文字符号关联时,根据已关联的文字符号的类型对文字块的置信度进行调整,例如,若字段前跟着勾选框,则增加该字段为“选项字段”的置信度,如果字段后跟着长下划线,则增加该字段为“需填字段”的置信度。更进一步地,需填字段中包括必填字段和选填字段,可以通过检测文字块前后是否存在必填符号,来对需填字段进行 进一步分类。According to the association between each text block and each text symbol, to modify the confidence that each text block belongs to each preset field type means that when the text block is associated with the text symbol, the text block is adjusted according to the type of the associated text symbol For example, if a field is followed by a check box, increase the confidence that the field is an "option field"; if a field is followed by a long underline, increase the confidence that the field is a "field required". Furthermore, the required fields include required fields and optional fields. The required fields can be further classified by detecting whether there are required symbols before and after the text block.
上述实施例,根据已训练的分类模型得到各文字块归属于各预设的字段类型的置信度,并根据各文字块与各文字符号的关联情况,修正各文字块归属于各预设的字段类型的置信度,将置信度最高的字段类型,作为各文字块的字段类型,实现了对各文字块的字段类型的确定。In the above-mentioned embodiment, according to the trained classification model, the confidence that each text block belongs to each preset field type is obtained, and according to the association between each text block and each text symbol, it is corrected that each text block belongs to each preset field For the confidence of the type, the field type with the highest confidence is used as the field type of each text block to realize the determination of the field type of each text block.
在其中一个实施例中,如图5所示,字段类型包括需填字段、选项字段以及注释字段,步骤S202包括:In one of the embodiments, as shown in FIG. 5, the field types include required fields, option fields, and comment fields. Step S202 includes:
步骤S502,根据各文字块的字段类型,确定字段类型为需填字段的文字块为需要进行字段填充的目标文字块;Step S502, according to the field type of each text block, determine that the text block whose field type is a field to be filled is the target text block that needs to be filled in.
步骤S504,根据表格特征信息中各文字块的位置信息,确定各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离;Step S504: Determine the distance between each target text block and each option field text block and each comment field text block according to the position information of each text block in the table feature information;
步骤S506,根据各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离,确定与各目标文字块对应的选项字段文字块以及注释字段文字块;Step S506, according to the distance between each target text block and each option field text block and each comment field text block, determine the option field text block and the comment field text block corresponding to each target text block;
步骤S508,建立各目标文字块与对应的选项字段文字块以及注释字段文字块之间的关联关系。Step S508: Establish an association relationship between each target text block and the corresponding option field text block and annotation field text block.
各文字块的字段类型包括需填字段、选项字段以及注释字段,选项字段以及注释字段是与需填字段相对应的。服务器会根据各文字块的字段类型,确定字段类型为需填字段的文字块为需要进行字段填充的目标文字块,字段类型为选项字段的文字块为选项字段文字块,字段类型为注释字段的文字块为注释字段文字块,进而根据表格特征信息中各文字块的位置信息,确定各目标文字块、各选项字段文字块以及各注释字段文字块之间的距离,根据各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离,确定与各目标文字块对应的选项字段文字块以及注释字段文字块,建立各目标文字块与对应的选项字段文字块以及注释字段文字块之间的关联关系。The field types of each text block include required fields, option fields, and comment fields. Option fields and comment fields correspond to the required fields. According to the field type of each text block, the server will determine that the text block whose field type is the required field is the target text block that needs to be filled in, the text block whose field type is the option field is the option field text block, and the field type is the comment field The text block is the text block of the comment field. Then, according to the position information of each text block in the table feature information, the distance between each target text block, each option field text block, and each comment field text block is determined. The distance between the option field text block and the comment field text block, determine the option field text block and the comment field text block corresponding to each target text block, and establish each target text block and the corresponding option field text block and comment field text block The relationship between.
上述实施例,根据各文字块的字段类型,确定字段类型为需填字段的文字块为目标文字块,根据表格特征信息中各文字块的位置信息,确定与各目标文字块对应的选项字段文字块以及注释字段文字块,从而建立各文字块之间的关联关系,实现了对各文字块之间的关联关系的确定。In the above embodiment, according to the field type of each text block, the text block whose field type is the field to be filled is determined as the target text block, and the option field text corresponding to each target text block is determined according to the position information of each text block in the table feature information Blocks and text blocks in the annotation field, thereby establishing the association relationship between the text blocks, and realizing the determination of the association relationship between the text blocks.
在其中一个实施例中,如图6所示,步骤S206包括:In one of the embodiments, as shown in FIG. 6, step S206 includes:
步骤S602,根据表格特征信息中各目标文字块的位置信息,确定与各目标文字块对应的需填充字段的填写顺序;Step S602, according to the position information of each target text block in the form feature information, determine the filling order of the fields to be filled corresponding to each target text block;
步骤S604,根据与各目标文字块对应的需填充字段的填写顺序,确定各目标文字块的业务片段语句的业务流程顺序;Step S604: Determine the business process sequence of the business segment statements of each target text block according to the filling order of the fields to be filled corresponding to each target text block;
步骤S606,根据业务流程顺序,生成业务申请的场景流程信息;Step S606: Generate scenario process information of the business application according to the business process sequence;
步骤S608,根据场景流程信息以及各目标文字块的业务片段语句进行模型训练,配置聊天机器人。Step S608: Perform model training according to the scene process information and the business segment sentences of each target text block, and configure a chat robot.
将各目标文字块的业务片段语句,按照与各目标文字块对应的需填充字段的填写顺序进行整合,即可各目标文字块得到业务流程顺序,根据业务流程顺序以及各目标文字块的业务片段语句,可以生成业务申请的场景流程信息,进而根据场景流程信息以及各目标文字块的业务片段语句进行模型训练,得到自然语言理解模型和对话管理模型,根据自然语言理解模型和对话管理模型,配置聊天机器人。自然语言理解模型用于根据用户语句判断用户意图并抓取实体信息,对话管理模型用于根据用户语句以及用户意图确定回复语句。Integrate the business segment statements of each target text block according to the order of filling in the fields to be filled corresponding to each target text block, and then each target text block can get the business process sequence, according to the business process sequence and the business segment of each target text block Sentences can generate the scene process information of the business application, and then perform model training according to the scene process information and the business fragment sentences of each target text block to obtain the natural language understanding model and the dialogue management model. Configure according to the natural language understanding model and the dialogue management model Chatbot. The natural language understanding model is used to determine the user's intention based on the user's sentence and to capture entity information, and the dialogue management model is used to determine the reply sentence based on the user's sentence and the user's intention.
上述实施例,根据各目标文字块的位置信息,确定与各目标文字块对应的需填充字段的填写顺序,根据与各目标文字块对应的需填充字段的填写顺序,确定各目标文字块的业务片段语句的业务流程顺序,生成业务申请的场景流程信息,根据场景流程信息以及各目标文字块的业务片段语句进行模型训练,配置聊天机器人,实现了对聊天机器人的配置。In the above embodiment, according to the position information of each target text block, the order of filling in the fields to be filled corresponding to each target text block is determined, and the business of each target text block is determined according to the order of filling in the fields to be filled corresponding to each target text block. The business flow sequence of the fragment sentences, the scene flow information of the business application is generated, the model training is performed according to the scene flow information and the business fragment sentences of each target text block, the chat robot is configured, and the configuration of the chat robot is realized.
在其中一个实施例中,如图7所示,步骤S608包括:In one of the embodiments, as shown in FIG. 7, step S608 includes:
步骤S702,将各目标文字块的业务片段语句作为第一训练集输入初始自然语言理解模型进行模型训练,得到自然语言理解模型,自然语言理解模型用于根据用户语句判断用户意图并抓取实体信息;Step S702, input the business segment sentences of each target text block as the first training set into the initial natural language understanding model for model training to obtain a natural language understanding model, which is used to judge user intentions and capture entity information based on user sentences ;
步骤S704,将场景流程信息作为第二训练集输入初始对话管理模型进行模型训练,得到对话管理模型,对话管理模型用于根据用户语句以及用户意图确定回复语句;Step S704, input the scene process information as the second training set into the initial dialogue management model for model training, to obtain the dialogue management model, the dialogue management model is used to determine the reply sentence according to the user sentence and the user's intention;
步骤S706,根据自然语言理解模型以及对话管理模型,配置聊天机器人。Step S706: Configure a chat robot according to the natural language understanding model and the dialogue management model.
各目标文字块的业务片段语句中包括了机器回复语句、注释提示语句以及用户意图语句,将各目标文字块的业务片段语句作为第一训练集输入初始自然语言理解模型进行模型训练,能使自然语言理解模型根据用户意图语句判断用户意图并抓取用户意图语句中的需填信息作为实体信息。将场景流程信息作为第二训练集输入初始对话管理模型进行模型训练,能使对话管理模型根据用户语句以及用户意图确定对应的机器回复语句以及注释提示语句。根据自然语言理解模型以及对话管理模型,即可配置聊天机器人。在完成配置之后,在聊天机器人任务中,当客户输入第一用户意图语句后,自然语言理解模型会根据第一用户意图语句确定用户意图,将用户意图输入对话管理模型,对话管理模型会根据用户意图确定对应的机器回复语句以及注释提示语句并推送,客户进而根据推送的机器回复语句以及注释提示语句,回复第二用户意图语句,自然语言理解模型会从第二用户意图语句中抓取需填信息作为实体信息。The business segment sentences of each target text block include machine reply sentences, comment prompt sentences, and user intention sentences. The business segment sentences of each target text block are input as the first training set into the initial natural language understanding model for model training, which can make natural The language comprehension model judges the user's intention according to the user's intention sentence and captures the required information in the user's intention sentence as the entity information. The scene process information is input into the initial dialogue management model as the second training set for model training, so that the dialogue management model can determine the corresponding machine reply sentence and the comment prompt sentence according to the user sentence and the user's intention. According to the natural language understanding model and the dialogue management model, the chatbot can be configured. After the configuration is completed, in the chatbot task, when the customer inputs the first user intention sentence, the natural language understanding model will determine the user intention according to the first user intention sentence, and input the user intention into the dialogue management model. The dialogue management model will be based on the user The intention determines the corresponding machine reply sentence and the comment prompt sentence and pushes it. The customer then responds to the second user’s intent sentence according to the pushed machine reply sentence and the comment prompt sentence. The natural language understanding model will grab the need to fill in the second user’s intention sentence Information as entity information.
上述实施例,根据各目标文字块的业务片段语句得到自然语言理解模型,根据场景流程信息得到对话管理模型,进而根据自然语言理解模型和对话管理模型配置聊天机器人,实现了对聊天机器人的配置。In the above embodiment, the natural language understanding model is obtained according to the business segment sentences of each target text block, the dialogue management model is obtained according to the scene process information, and the chat robot is configured according to the natural language understanding model and the dialogue management model, thereby realizing the configuration of the chat robot.
应该理解的是,虽然图2-7的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-7中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻 执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowcharts of FIGS. 2-7 are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least part of the steps in Figures 2-7 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. These sub-steps or stages The execution order of is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
在一个实施例中,如图8所示,提供了一种配置聊天机器人的装置,包括:获取模块802、第一处理模块804、第二处理模块806和配置模块808,其中:In one embodiment, as shown in FIG. 8, a device for configuring a chat robot is provided, including: an acquisition module 802, a first processing module 804, a second processing module 806, and a configuration module 808, wherein:
获取模块802,用于获取业务表格扫描图,提取业务表格扫描图中的表格特征信息,确定表格特征信息中的文字块的字段类型,并根据字段类型识别需要进行字段填充的目标文字块,根据需要进行字段填充的目标文字块,建立各文字块之间的关联关系;The obtaining module 802 is used to obtain the scanned image of the business form, extract the feature information of the form in the scanned image of the business form, determine the field type of the text block in the form feature information, and identify the target text block that needs to be filled in according to the field type. For the target text blocks that need to be filled with fields, establish the association relationship between the text blocks;
第一处理模块804,用于根据需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型;The first processing module 804 is configured to query a preset data type configuration table according to the target text block that needs to be field filled, and determine the data type of the field to be filled corresponding to each target text block;
第二处理模块806,用于根据与各目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句;The second processing module 806 is configured to generate business segment sentences of each target text block according to the data type of the field to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template;
配置模块808,用于根据表格特征信息中各目标文字块的位置信息以及各目标文字块的业务片段语句,配置聊天机器人。The configuration module 808 is used to configure the chat robot according to the position information of each target text block in the table feature information and the business segment sentence of each target text block.
上述配置聊天机器人的装置,提取业务表格扫描图中的表格特征信息,确定表格特征信息中各文字块的字段类型,并根据字段类型识别需要进行字段填充的目标文字块,根据需要进行字段填充的目标文字块,建立各文字块之间的关联关系,通过查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型,进而根据与各目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句,根据表格特征信息中各目标文字块的位置信息以及各目标文字块的业务片段语句,配置聊天机器人。从而可以根据配置的聊天机器人,进行业务处理,使用户通过线上聊天的方式提供原纸质表格中的所需信息,完成业务申请,提高了业务处理的效率。The above device for configuring chat robots extracts the table feature information in the business table scanning diagram, determines the field type of each text block in the table feature information, and identifies the target text block that needs field filling according to the field type, and performs field filling according to the needs Target text block, establish the association relationship between each text block, determine the data type of the field to be filled corresponding to each target text block by querying the preset data type configuration table, and then fill according to the need to fill corresponding to each target text block The data type of the field, the association relationship between each text block and the preset sentence template, generate the business segment statement of each target text block, according to the position information of each target text block in the table feature information and the business segment of each target text block Statement, configure the chat robot. Thereby, business processing can be performed according to the configured chat robot, so that users can provide the required information in the original paper form through online chat, complete business applications, and improve the efficiency of business processing.
在其中一个实施例中,获取模块还用于获取业务表格扫描图,对业务表格扫描图进行预处理,根据已训练的目标检测模型,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息,目标检测模型是以包括文字块和文字符号的样本图片训练得到,根据各文字块的位置信息以及各文字符号的位置信息,分割业务表格扫描图,得到多个文字块图像以及文字符号图像,根据已训练的图片分类模型,提取各文字块图像以及各文字符号图像中的文字块以及文字符号,得到业务表格扫描图中的表格特征信息,图片分类模型是以包括文字块和文字符号的样本图片训练得到。In one of the embodiments, the acquisition module is also used to acquire a scanned image of the business form, preprocess the scanned image of the business form, and obtain the position of each text block in the scanned image of the preprocessed business form according to the trained target detection model The target detection model is trained on sample pictures including text blocks and text symbols. According to the location information of each text block and the location information of each text symbol, the scanned image of the business table is divided to obtain multiple Text block images and text symbol images, according to the trained picture classification model, extract the text block images and text blocks and text symbols in each text symbol image to obtain the table feature information in the business table scan graph. The picture classification model is based on Sample pictures including text blocks and text symbols are trained.
在其中一个实施例中,获取模块还用于将预处理后的业务表格扫描图输入已训练的目标检测模型,根据所述目标检测模型中的卷积神经网络提取所述预处理后的业务表格扫描图的特征,根据所述目标检测模型中的全连接层以及所述业务表格扫描图的特征,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息。In one of the embodiments, the acquisition module is also used to input the preprocessed scan map of the business form into the trained target detection model, and extract the preprocessed business form according to the convolutional neural network in the target detection model According to the features of the scanned image, the position information of each character block and the position information of each character symbol in the preprocessed service table scanned image are obtained according to the fully connected layer in the target detection model and the characteristics of the service table scanned image.
在其中一个实施例中,获取模块还用于将表格特征信息中各文字块输入已训练的分类 模型,得到各文字块归属于各预设的字段类型的置信度,根据表格特征信息中各文字块的位置信息以及各文字符号的位置信息,确定各文字块与各文字符号之间的坐标距离,将与各文字块的坐标距离在预设的距离阈值范围内的各文字符号作为与各文字块关联的文字符号,根据各文字块与各文字符号的关联情况,修正各文字块归属于各预设的字段类型的置信度,将各文字块归属于各预设的字段类型的置信度进行排序,并将置信度最高的字段类型,作为各文字块的字段类型。In one of the embodiments, the acquisition module is also used to input each text block in the table feature information into the trained classification model to obtain the confidence that each text block belongs to each preset field type, according to each text in the table feature information The position information of the block and the position information of each character symbol determine the coordinate distance between each character block and each character symbol, and each character symbol whose coordinate distance from each character block is within a preset distance threshold is regarded as the coordinate distance between each character block and each character symbol. Block-associated text symbols, according to the association between each text block and each text symbol, correct the confidence that each text block belongs to each preset field type, and calculate the confidence that each text block belongs to each preset field type Sort, and use the field type with the highest confidence as the field type of each text block.
在其中一个实施例中,字段类型包括需填字段、选项字段以及注释字段,获取模块还用于根据各文字块的字段类型,确定字段类型为需填字段的文字块为需要进行字段填充的目标文字块,根据表格特征信息中各文字块的位置信息,确定各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离,根据各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离,确定与各目标文字块对应的选项字段文字块以及注释字段文字块,建立各目标文字块与对应的选项字段文字块以及注释字段文字块之间的关联关系。In one of the embodiments, the field types include fields to be filled, option fields, and comment fields. The acquisition module is also used to determine the text block whose field type is a field to be filled as the target to be filled according to the field type of each text block. The text block determines the distance between each target text block and each option field text block and each comment field text block according to the position information of each text block in the table feature information, and determines the distance between each target text block and each option field text block and each The distance between the note field text blocks determines the option field text block and the note field text block corresponding to each target text block, and establishes the association relationship between each target text block and the corresponding option field text block and the note field text block.
在其中一个实施例中,配置模块还用于根据表格特征信息中各目标文字块的位置信息,确定与各目标文字块对应的需填充字段的填写顺序,根据与各目标文字块对应的需填充字段的填写顺序,确定各目标文字块的业务片段语句的业务流程顺序,根据业务流程顺序,生成业务申请的场景流程信息,根据场景流程信息以及各目标文字块的业务片段语句进行模型训练,配置聊天机器人。In one of the embodiments, the configuration module is also used to determine the filling order of the fields to be filled corresponding to each target text block according to the position information of each target text block in the table feature information, and to fill according to the required filling corresponding to each target text block Fill in the fields in order to determine the business process sequence of the business fragment statements of each target text block, generate the scene process information of the business application according to the business process sequence, and perform model training and configuration based on the scene process information and the business fragment statements of each target text block Chatbot.
在其中一个实施例中,配置模块还用于将各目标文字块的业务片段语句作为第一训练集输入初始自然语言理解模型进行模型训练,得到自然语言理解模型,自然语言理解模型用于根据用户语句判断用户意图并抓取实体信息,将场景流程信息作为第二训练集输入初始对话管理模型进行模型训练,得到对话管理模型,对话管理模型用于根据用户语句以及用户意图确定回复语句,根据自然语言理解模型以及对话管理模型,配置聊天机器人。In one of the embodiments, the configuration module is also used to input the business segment sentences of each target text block as the first training set into the initial natural language understanding model for model training, to obtain the natural language understanding model, which is used according to the user Sentences determine user intentions and capture entity information, use scene process information as the second training set into the initial dialogue management model for model training, and obtain the dialogue management model. The dialogue management model is used to determine the reply sentence according to the user's sentence and user intention. Language understanding model and dialogue management model, configure chatbots.
关于配置聊天机器人的装置的具体限定可以参见上文中对于配置聊天机器人的方法的限定,在此不再赘述。上述配置聊天机器人的装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the device for configuring the chat robot, please refer to the above limitation on the method of configuring the chat robot, which will not be repeated here. The various modules in the above apparatus for configuring chat robots can be implemented in whole or in part by software, hardware, and combinations thereof. The foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种配置聊天机器人的方法。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 9. The computer equipment includes a processor, a memory, and a network interface connected through a system bus. The processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer-readable instructions are executed by the processor to implement a method of configuring a chat robot.
本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构 的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 9 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. The specific computer equipment may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
一种计算机设备,包括存储器和一个或多个处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时实现本申请任意一个实施例中提供的配置聊天机器人的方法的步骤。A computer device including a memory and one or more processors, and computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the steps of the method for configuring a chat robot provided in any embodiment of the present application are implemented .
一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的配置聊天机器人的方法的步骤。One or more non-volatile storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors implement the configuration provided in any embodiment of the present application The steps of the chatbot method.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through computer-readable instructions, which can be stored in a non-volatile computer. In a readable storage medium, when the computer-readable instructions are executed, they may include the processes of the above-mentioned method embodiments. Any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, they should It is considered as the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

Claims (20)

  1. 一种配置聊天机器人的方法,包括:A method of configuring chatbots includes:
    获取业务表格扫描图,提取所述业务表格扫描图中的表格特征信息,确定所述表格特征信息中的文字块的字段类型,并根据所述字段类型识别需要进行字段填充的目标文字块,根据所述需要进行字段填充的目标文字块,建立各文字块之间的关联关系;Obtain the scan map of the business form, extract the feature information of the form in the scan graph of the business form, determine the field type of the text block in the form feature information, and identify the target text block that needs to be filled in according to the field type. Establishing an association relationship between the target text blocks that need to be filled with fields;
    根据所述需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型;Query a preset data type configuration table according to the target text block requiring field filling, and determine the data type of the field to be filled corresponding to each target text block;
    根据与各所述目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句;及According to the data type of the field to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template, generate the business segment sentence of each target text block; and
    根据所述表格特征信息中各目标文字块的位置信息以及各所述目标文字块的业务片段语句,配置聊天机器人。According to the location information of each target text block in the table feature information and the business segment sentence of each target text block, a chat robot is configured.
  2. 根据权利要求1所述的方法,其特征在于,所述获取业务表格扫描图,提取所述业务表格扫描图中的表格特征信息,包括:The method according to claim 1, wherein said obtaining a scan map of a business table and extracting table feature information in the scan map of a business table comprises:
    获取业务表格扫描图,对所述业务表格扫描图进行预处理;Obtain a scanned image of the business form, and preprocess the scanned image of the business form;
    根据已训练的目标检测模型,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息,所述目标检测模型是以包括文字块和文字符号的样本图片训练得到;According to the trained target detection model, the position information of each text block and the position information of each text symbol in the preprocessed business table scan image are obtained, and the target detection model is obtained by training a sample picture including text blocks and text symbols ;
    根据各所述文字块的位置信息以及各所述文字符号的位置信息,分割所述业务表格扫描图,得到多个文字块图像以及文字符号图像;及According to the position information of each of the character blocks and the position information of each of the character symbols, segment the scan map of the business form to obtain a plurality of character block images and character symbol images; and
    根据已训练的图片分类模型,提取各文字块图像以及各文字符号图像中的文字块以及文字符号,得到所述业务表格扫描图中的表格特征信息,所述图片分类模型是以包括文字块和文字符号的样本图片训练得到。According to the trained picture classification model, extract each text block image and the text block and text symbol in each text symbol image to obtain the table feature information in the business table scan image. The picture classification model is based on including text blocks and Sample images of text symbols are trained.
  3. 根据权利要求2所述的方法,其特征在于,所述根据已训练的目标检测模型,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息,包括:The method according to claim 2, wherein the obtaining the position information of each character block and the position information of each character symbol in the preprocessed business table scanning image according to the trained target detection model comprises:
    将预处理后的业务表格扫描图输入已训练的目标检测模型;Input the preprocessed scanned image of the business table into the trained target detection model;
    根据所述目标检测模型中的卷积神经网络提取所述预处理后的业务表格扫描图的特征;及Extracting the features of the preprocessed scan map of the business table according to the convolutional neural network in the target detection model; and
    根据所述目标检测模型中的全连接层以及所述业务表格扫描图的特征,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息。According to the fully connected layer in the target detection model and the features of the business table scan map, the position information of each character block and the position information of each word symbol in the preprocessed business table scan map are obtained.
  4. 根据权利要求1所述的方法,其特征在于,所述确定所述表格特征信息中的文字块的字段类型,包括:The method according to claim 1, wherein the determining the field type of the text block in the table characteristic information comprises:
    将所述表格特征信息中各文字块输入已训练的分类模型,得到各文字块归属于各预设的字段类型的置信度;Input each text block in the table feature information into the trained classification model to obtain the confidence that each text block belongs to each preset field type;
    根据所述表格特征信息中各文字块的位置信息以及各文字符号的位置信息,确定各文字块与各文字符号之间的坐标距离;Determine the coordinate distance between each character block and each character symbol according to the position information of each character block and the position information of each character symbol in the table feature information;
    将与各文字块的坐标距离在预设的距离阈值范围内的各文字符号作为与各文字块关联的文字符号;Use each character symbol whose coordinate distance to each character block is within a preset distance threshold range as a character symbol associated with each character block;
    根据各文字块与各文字符号的关联情况,修正各文字块归属于各预设的字段类型的置信度;及According to the association between each text block and each text symbol, modify the confidence that each text block belongs to each preset field type; and
    将各文字块归属于各预设的字段类型的置信度进行排序,并将置信度最高的字段类型,作为各文字块的字段类型。Sort the confidence of each text block belonging to each preset field type, and use the field type with the highest confidence as the field type of each text block.
  5. 根据权利要求1所述的方法,其特征在于,所述字段类型包括需填字段、选项字段以及注释字段,所述根据所述字段类型识别需要进行字段填充的目标文字块,根据所述需要进行字段填充的目标文字块,建立各文字块之间的关联关系,包括:The method according to claim 1, wherein the field type includes a field to be filled, an option field, and a comment field, and the target text block that needs to be filled in the field is identified according to the field type, and is performed according to the need The target text block for field filling establishes the relationship between each text block, including:
    根据各所述文字块的字段类型,确定字段类型为需填字段的文字块为需要进行字段填充的目标文字块;According to the field type of each text block, determine that the text block whose field type is a field to be filled is the target text block that needs to be filled in;
    根据所述表格特征信息中各文字块的位置信息,确定各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离;Determine the distance between each target text block and each option field text block and each comment field text block according to the position information of each text block in the table feature information;
    根据各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离,确定与各目标文字块对应的选项字段文字块以及注释字段文字块;及According to the distance between each target text block and each option field text block and each comment field text block, determine the option field text block and the comment field text block corresponding to each target text block; and
    建立各目标文字块与对应的选项字段文字块以及注释字段文字块之间的关联关系。Establish an association relationship between each target text block and the corresponding option field text block and note field text block.
  6. 根据权利要求1所述的方法,其特征在于,所述根据所述表格特征信息中各目标文字块的位置信息以及各所述目标文字块的业务片段语句,配置聊天机器人,包括:The method according to claim 1, wherein the configuring a chat robot according to the position information of each target text block in the table feature information and the business segment sentence of each target text block comprises:
    根据所述表格特征信息中各目标文字块的位置信息,确定与各目标文字块对应的需填充字段的填写顺序;According to the position information of each target text block in the table feature information, determine the filling order of the fields to be filled corresponding to each target text block;
    根据与各目标文字块对应的需填充字段的填写顺序,确定各目标文字块的业务片段语句的业务流程顺序;Determine the business process sequence of the business segment statements of each target text block according to the filling order of the fields to be filled corresponding to each target text block;
    根据所述业务流程顺序,生成业务申请的场景流程信息;及According to the business process sequence, generate the scenario process information of the business application; and
    根据所述场景流程信息以及各目标文字块的业务片段语句进行模型训练,配置聊天机器人。Perform model training according to the scene process information and the business segment sentences of each target text block, and configure a chat robot.
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述场景流程信息以及各目标文字块的业务片段语句进行模型训练,配置聊天机器人,包括:The method according to claim 6, characterized in that, performing model training based on the scene process information and business segment sentences of each target text block and configuring a chat robot comprises:
    将各目标文字块的业务片段语句作为第一训练集输入初始自然语言理解模型进行模型训练,得到自然语言理解模型,所述自然语言理解模型用于根据用户语句判断用户意图并抓取实体信息;The business segment sentences of each target text block are input as the first training set into the initial natural language understanding model for model training to obtain a natural language understanding model, which is used to judge user intentions and capture entity information according to user sentences;
    将所述场景流程信息作为第二训练集输入初始对话管理模型进行模型训练,得到对话管理模型,所述对话管理模型用于根据所述用户语句以及所述用户意图确定回复语句;及根据所述自然语言理解模型以及所述对话管理模型,配置聊天机器人。Input the scene process information as the second training set into the initial dialogue management model for model training to obtain the dialogue management model, the dialogue management model is used to determine the reply sentence according to the user sentence and the user intention; and according to the said The natural language understanding model and the dialogue management model are configured with chat robots.
  8. 一种配置聊天机器人的装置,包括:A device for configuring chat robots, including:
    获取模块,用于获取业务表格扫描图,提取所述业务表格扫描图中的表格特征信息, 确定所述表格特征信息中的文字块的字段类型,并根据所述字段类型识别需要进行字段填充的目标文字块,根据所述需要进行字段填充的目标文字块,建立各文字块之间的关联关系;The obtaining module is used to obtain the scan map of the business form, extract the form feature information in the scan graph of the business form, determine the field type of the text block in the form feature information, and identify the fields that need to be filled in according to the field type The target text block, according to the target text block that needs to be filled with fields, establishes the association relationship between the text blocks;
    第一处理模块,用于根据所述需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型;The first processing module is configured to query a preset data type configuration table according to the target text block for which field filling is required, and determine the data type of the field to be filled corresponding to each target text block;
    第二处理模块,用于根据与各所述目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句;及The second processing module is configured to generate business segment sentences for each target text block according to the data type of the field to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template; and
    配置模块,用于根据所述表格特征信息中各目标文字块的位置信息以及各所述目标文字块的业务片段语句,配置聊天机器人。The configuration module is used to configure the chat robot according to the position information of each target text block in the table feature information and the business segment sentence of each target text block.
  9. 根据权利要求8所述的装置,其特征在于,所述获取模块还用于获取业务表格扫描图,对所述业务表格扫描图进行预处理,根据已训练的目标检测模型,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息,所述目标检测模型是以包括文字块和文字符号的样本图片训练得到,根据各所述文字块的位置信息以及各所述文字符号的位置信息,分割所述业务表格扫描图,得到多个文字块图像以及文字符号图像,根据已训练的图片分类模型,提取各文字块图像以及各文字符号图像中的文字块以及文字符号,得到所述业务表格扫描图中的表格特征信息,所述图片分类模型是以包括文字块和文字符号的样本图片训练得到。The device according to claim 8, wherein the acquisition module is further configured to acquire a scan map of the business table, preprocess the scan map of the business table, and obtain the preprocessed target detection model according to the trained target detection model. The location information of each text block and the location information of each text symbol in the business table scan graph. The target detection model is trained on sample pictures including text blocks and text symbols, and is based on the location information of each text block and each location. Describe the position information of the text symbols, segment the scan of the business table to obtain multiple text block images and text symbol images, and extract each text block image and text blocks and text in each text symbol image according to the trained picture classification model Symbols to obtain table feature information in the business table scanning diagram, and the picture classification model is obtained by training sample pictures including text blocks and text symbols.
  10. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the one or more processors, the one or more Each processor performs the following steps:
    获取业务表格扫描图,提取所述业务表格扫描图中的表格特征信息,确定所述表格特征信息中的文字块的字段类型,并根据所述字段类型识别需要进行字段填充的目标文字块,根据所述需要进行字段填充的目标文字块,建立各文字块之间的关联关系;Obtain the scan map of the business form, extract the feature information of the form in the scan graph of the business form, determine the field type of the text block in the form feature information, and identify the target text block that needs to be filled in according to the field type. Establishing an association relationship between the target text blocks that need to be filled with fields;
    根据所述需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型;Query a preset data type configuration table according to the target text block requiring field filling, and determine the data type of the field to be filled corresponding to each target text block;
    根据与各所述目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句;及According to the data type of the field to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template, generate the business segment sentence of each target text block; and
    根据所述表格特征信息中各目标文字块的位置信息以及各所述目标文字块的业务片段语句,配置聊天机器人。According to the location information of each target text block in the table feature information and the business segment sentence of each target text block, a chat robot is configured.
  11. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instruction:
    获取业务表格扫描图,对所述业务表格扫描图进行预处理;Obtain a scanned image of the business form, and preprocess the scanned image of the business form;
    根据已训练的目标检测模型,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息,所述目标检测模型是以包括文字块和文字符号的样本图片训练得到;According to the trained target detection model, the position information of each text block and the position information of each text symbol in the preprocessed business table scan image are obtained, and the target detection model is obtained by training a sample picture including text blocks and text symbols ;
    根据各所述文字块的位置信息以及各所述文字符号的位置信息,分割所述业务表格扫描图,得到多个文字块图像以及文字符号图像;及According to the position information of each of the character blocks and the position information of each of the character symbols, segment the scan map of the business form to obtain a plurality of character block images and character symbol images; and
    根据已训练的图片分类模型,提取各文字块图像以及各文字符号图像中的文字块以及文字符号,得到所述业务表格扫描图中的表格特征信息,所述图片分类模型是以包括文字块和文字符号的样本图片训练得到。According to the trained picture classification model, extract each text block image and the text block and text symbol in each text symbol image to obtain the table feature information in the business table scan image. The picture classification model is based on including text blocks and Sample images of text symbols are trained.
  12. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instruction:
    将预处理后的业务表格扫描图输入已训练的目标检测模型;Input the preprocessed scanned image of the business table into the trained target detection model;
    根据所述目标检测模型中的卷积神经网络提取所述预处理后的业务表格扫描图的特征;及Extracting the features of the preprocessed scan map of the business table according to the convolutional neural network in the target detection model; and
    根据所述目标检测模型中的全连接层以及所述业务表格扫描图的特征,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息。According to the fully connected layer in the target detection model and the features of the business table scan map, the position information of each character block and the position information of each word symbol in the preprocessed business table scan map are obtained.
  13. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instruction:
    将所述表格特征信息中各文字块输入已训练的分类模型,得到各文字块归属于各预设的字段类型的置信度;Input each text block in the table feature information into the trained classification model to obtain the confidence that each text block belongs to each preset field type;
    根据所述表格特征信息中各文字块的位置信息以及各文字符号的位置信息,确定各文字块与各文字符号之间的坐标距离;Determine the coordinate distance between each character block and each character symbol according to the position information of each character block and the position information of each character symbol in the table feature information;
    将与各文字块的坐标距离在预设的距离阈值范围内的各文字符号作为与各文字块关联的文字符号;Use each character symbol whose coordinate distance to each character block is within a preset distance threshold range as a character symbol associated with each character block;
    根据各文字块与各文字符号的关联情况,修正各文字块归属于各预设的字段类型的置信度;及According to the association between each text block and each text symbol, modify the confidence that each text block belongs to each preset field type; and
    将各文字块归属于各预设的字段类型的置信度进行排序,并将置信度最高的字段类型,作为各文字块的字段类型。Sort the confidence of each text block belonging to each preset field type, and use the field type with the highest confidence as the field type of each text block.
  14. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instruction:
    根据各所述文字块的字段类型,确定字段类型为需填字段的文字块为需要进行字段填充的目标文字块;According to the field type of each text block, determine that the text block whose field type is a field to be filled is the target text block that needs to be filled in;
    根据所述表格特征信息中各文字块的位置信息,确定各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离;Determine the distance between each target text block and each option field text block and each comment field text block according to the position information of each text block in the table feature information;
    根据各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离,确定与各目标文字块对应的选项字段文字块以及注释字段文字块;及According to the distance between each target text block and each option field text block and each comment field text block, determine the option field text block and the comment field text block corresponding to each target text block; and
    建立各目标文字块与对应的选项字段文字块以及注释字段文字块之间的关联关系。Establish an association relationship between each target text block and the corresponding option field text block and note field text block.
  15. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instruction:
    根据所述表格特征信息中各目标文字块的位置信息,确定与各目标文字块对应的需填充字段的填写顺序;According to the position information of each target text block in the table feature information, determine the filling order of the fields to be filled corresponding to each target text block;
    根据与各目标文字块对应的需填充字段的填写顺序,确定各目标文字块的业务片段语句的业务流程顺序;Determine the business process sequence of the business segment statements of each target text block according to the filling order of the fields to be filled corresponding to each target text block;
    根据所述业务流程顺序,生成业务申请的场景流程信息;及According to the business process sequence, generate the scenario process information of the business application; and
    根据所述场景流程信息以及各目标文字块的业务片段语句进行模型训练,配置聊天机器人。Perform model training according to the scene process information and the business segment sentences of each target text block, and configure a chat robot.
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-volatile computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to perform the following steps:
    获取业务表格扫描图,提取所述业务表格扫描图中的表格特征信息,确定所述表格特征信息中的文字块的字段类型,并根据所述字段类型识别需要进行字段填充的目标文字块,根据所述需要进行字段填充的目标文字块,建立各文字块之间的关联关系;Obtain the scan map of the business form, extract the feature information of the form in the scan graph of the business form, determine the field type of the text block in the form feature information, and identify the target text block that needs to be filled in according to the field type. Establishing an association relationship between the target text blocks that need to be filled with fields;
    根据所述需要进行字段填充的目标文字块查询预设的数据类型配置表,确定与各目标文字块对应的需填充字段的数据类型;Query a preset data type configuration table according to the target text block requiring field filling, and determine the data type of the field to be filled corresponding to each target text block;
    根据与各所述目标文字块对应的需填充字段的数据类型、各文字块之间的关联关系以及预设的语句模板,生成各目标文字块的业务片段语句;及According to the data type of the field to be filled corresponding to each target text block, the association relationship between the text blocks, and the preset sentence template, generate the business segment sentence of each target text block; and
    根据所述表格特征信息中各目标文字块的位置信息以及各所述目标文字块的业务片段语句,配置聊天机器人。According to the location information of each target text block in the table feature information and the business segment sentence of each target text block, a chat robot is configured.
  17. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 16, wherein the following steps are further executed when the computer-readable instructions are executed by the processor:
    获取业务表格扫描图,对所述业务表格扫描图进行预处理;Obtain a scanned image of the business form, and preprocess the scanned image of the business form;
    根据已训练的目标检测模型,得到预处理后的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息,所述目标检测模型是以包括文字块和文字符号的样本图片训练得到;According to the trained target detection model, the position information of each text block and the position information of each text symbol in the preprocessed business table scan image are obtained, and the target detection model is obtained by training a sample picture including text blocks and text symbols ;
    根据各所述文字块的位置信息以及各所述文字符号的位置信息,分割所述业务表格扫描图,得到多个文字块图像以及文字符号图像;及According to the position information of each of the character blocks and the position information of each of the character symbols, segment the scan map of the business form to obtain a plurality of character block images and character symbol images; and
    根据已训练的图片分类模型,提取各文字块图像以及各文字符号图像中的文字块以及文字符号,得到所述业务表格扫描图中的表格特征信息,所述图片分类模型是以包括文字块和文字符号的样本图片训练得到。According to the trained picture classification model, extract each text block image and the text block and text symbol in each text symbol image to obtain the table feature information in the business table scan image. The picture classification model is based on including text blocks and Sample images of text symbols are trained.
  18. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 16, wherein the following steps are further executed when the computer-readable instructions are executed by the processor:
    将预处理后的业务表格扫描图输入已训练的目标检测模型;Input the preprocessed scanned image of the business table into the trained target detection model;
    根据所述目标检测模型中的卷积神经网络提取所述预处理后的业务表格扫描图的特征;及Extracting the features of the preprocessed scan map of the business table according to the convolutional neural network in the target detection model; and
    根据所述目标检测模型中的全连接层以及所述业务表格扫描图的特征,得到预处理后 的业务表格扫描图中各文字块的位置信息以及各文字符号的位置信息。According to the fully connected layer in the target detection model and the features of the business table scan map, the preprocessed business table scan map position information and the position information of each word symbol are obtained.
  19. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 16, wherein the following steps are further executed when the computer-readable instructions are executed by the processor:
    将所述表格特征信息中各文字块输入已训练的分类模型,得到各文字块归属于各预设的字段类型的置信度;Input each text block in the table feature information into the trained classification model to obtain the confidence that each text block belongs to each preset field type;
    根据所述表格特征信息中各文字块的位置信息以及各文字符号的位置信息,确定各文字块与各文字符号之间的坐标距离;Determine the coordinate distance between each character block and each character symbol according to the position information of each character block and the position information of each character symbol in the table feature information;
    将与各文字块的坐标距离在预设的距离阈值范围内的各文字符号作为与各文字块关联的文字符号;Use each character symbol whose coordinate distance to each character block is within a preset distance threshold range as a character symbol associated with each character block;
    根据各文字块与各文字符号的关联情况,修正各文字块归属于各预设的字段类型的置信度;及According to the association between each text block and each text symbol, modify the confidence that each text block belongs to each preset field type; and
    将各文字块归属于各预设的字段类型的置信度进行排序,并将置信度最高的字段类型,作为各文字块的字段类型。Sort the confidence of each text block belonging to each preset field type, and use the field type with the highest confidence as the field type of each text block.
  20. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 16, wherein the following steps are further executed when the computer-readable instructions are executed by the processor:
    根据各所述文字块的字段类型,确定字段类型为需填字段的文字块为需要进行字段填充的目标文字块;According to the field type of each text block, determine that the text block whose field type is a field to be filled is the target text block that needs to be filled in;
    根据所述表格特征信息中各文字块的位置信息,确定各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离;Determine the distance between each target text block and each option field text block and each comment field text block according to the position information of each text block in the table feature information;
    根据各目标文字块与各选项字段文字块以及各注释字段文字块之间的距离,确定与各目标文字块对应的选项字段文字块以及注释字段文字块;及According to the distance between each target text block and each option field text block and each comment field text block, determine the option field text block and the comment field text block corresponding to each target text block; and
    建立各目标文字块与对应的选项字段文字块以及注释字段文字块之间的关联关系。Establish an association relationship between each target text block and the corresponding option field text block and note field text block.
PCT/CN2019/107693 2019-07-25 2019-09-25 Method and apparatus for configuring chat robot, computer device and storage medium WO2021012382A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SG11202004541WA SG11202004541WA (en) 2019-07-25 2019-09-25 Chatbot configuration method and apparatus, computer device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910676824.3 2019-07-25
CN201910676824.3A CN110569341B (en) 2019-07-25 2019-07-25 Method and device for configuring chat robot, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021012382A1 true WO2021012382A1 (en) 2021-01-28

Family

ID=68773221

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/107693 WO2021012382A1 (en) 2019-07-25 2019-09-25 Method and apparatus for configuring chat robot, computer device and storage medium

Country Status (3)

Country Link
CN (1) CN110569341B (en)
SG (1) SG11202004541WA (en)
WO (1) WO2021012382A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051291A (en) * 2021-04-16 2021-06-29 平安国际智慧城市科技股份有限公司 Work order information processing method, device, equipment and storage medium
CN113159737A (en) * 2021-05-27 2021-07-23 中国平安人寿保险股份有限公司 RPA service processing method, RPA management platform, device and medium
CN113569005A (en) * 2021-06-17 2021-10-29 国家电网有限公司 Large-scale data feature intelligent extraction method based on data content
CN114385779A (en) * 2021-08-06 2022-04-22 应急管理部通信信息中心 Emergency scheduling instruction execution method and device and electronic equipment
CN114531477A (en) * 2022-04-22 2022-05-24 深圳丰尚智慧农牧科技有限公司 Method and device for configuring functional components, computer equipment and storage medium
CN114979120A (en) * 2022-05-24 2022-08-30 中国平安财产保险股份有限公司 Data uploading method, device, equipment and storage medium
CN116663509A (en) * 2023-08-02 2023-08-29 四川享宇科技有限公司 Automatic information acquisition and filling robot for banking complex system

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400465B (en) * 2020-02-25 2023-04-18 支付宝(杭州)信息技术有限公司 Generation method and device of customer service robot, electronic equipment and medium
CN112685441A (en) * 2021-01-06 2021-04-20 特赞(上海)信息科技有限公司 Metadata-based content asset management method and system
CN113392848A (en) * 2021-08-18 2021-09-14 海特锐(天津)科技有限公司 Deep learning-based reading method and device for OCR on cylinder

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503101A (en) * 2016-10-14 2017-03-15 五邑大学 Electric business customer service automatically request-answering system sentence keyword extracting method
CN106777018A (en) * 2016-12-08 2017-05-31 竹间智能科技(上海)有限公司 To the optimization method and device of read statement in a kind of intelligent chat robots
CN108416279A (en) * 2018-02-26 2018-08-17 阿博茨德(北京)科技有限公司 Form analysis method and device in file and picture
CN108829757A (en) * 2018-05-28 2018-11-16 广州麦优网络科技有限公司 A kind of intelligent Service method, server and the storage medium of chat robots
EP3502921A1 (en) * 2017-12-21 2019-06-26 Robert Bosch GmbH Generating dialogue through simulation
CN110008322A (en) * 2019-03-25 2019-07-12 阿里巴巴集团控股有限公司 Art recommended method and device under more wheel session operational scenarios

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10460024B2 (en) * 2016-01-05 2019-10-29 Adobe Inc. Interactive electronic form workflow assistant that guides interactions with electronic forms in a conversational manner
CN107127766A (en) * 2017-05-24 2017-09-05 南京华设科技股份有限公司 Intelligent grid service handling robot
US10951552B2 (en) * 2017-10-30 2021-03-16 International Business Machines Corporation Generation of a chatbot interface for an application programming interface
TWI661349B (en) * 2017-11-15 2019-06-01 財團法人資訊工業策進會 Method and system for generating conversational user interface
CN109727091B (en) * 2018-12-14 2022-04-05 平安科技(深圳)有限公司 Product recommendation method, device, medium and server based on conversation robot

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503101A (en) * 2016-10-14 2017-03-15 五邑大学 Electric business customer service automatically request-answering system sentence keyword extracting method
CN106777018A (en) * 2016-12-08 2017-05-31 竹间智能科技(上海)有限公司 To the optimization method and device of read statement in a kind of intelligent chat robots
EP3502921A1 (en) * 2017-12-21 2019-06-26 Robert Bosch GmbH Generating dialogue through simulation
CN108416279A (en) * 2018-02-26 2018-08-17 阿博茨德(北京)科技有限公司 Form analysis method and device in file and picture
CN108829757A (en) * 2018-05-28 2018-11-16 广州麦优网络科技有限公司 A kind of intelligent Service method, server and the storage medium of chat robots
CN110008322A (en) * 2019-03-25 2019-07-12 阿里巴巴集团控股有限公司 Art recommended method and device under more wheel session operational scenarios

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051291A (en) * 2021-04-16 2021-06-29 平安国际智慧城市科技股份有限公司 Work order information processing method, device, equipment and storage medium
CN113159737A (en) * 2021-05-27 2021-07-23 中国平安人寿保险股份有限公司 RPA service processing method, RPA management platform, device and medium
CN113569005A (en) * 2021-06-17 2021-10-29 国家电网有限公司 Large-scale data feature intelligent extraction method based on data content
CN113569005B (en) * 2021-06-17 2024-02-20 国家电网有限公司 Large-scale data characteristic intelligent extraction method based on data content
CN114385779A (en) * 2021-08-06 2022-04-22 应急管理部通信信息中心 Emergency scheduling instruction execution method and device and electronic equipment
CN114531477A (en) * 2022-04-22 2022-05-24 深圳丰尚智慧农牧科技有限公司 Method and device for configuring functional components, computer equipment and storage medium
CN114531477B (en) * 2022-04-22 2022-08-30 深圳丰尚智慧农牧科技有限公司 Method and device for configuring functional components, computer equipment and storage medium
CN114979120A (en) * 2022-05-24 2022-08-30 中国平安财产保险股份有限公司 Data uploading method, device, equipment and storage medium
CN114979120B (en) * 2022-05-24 2023-10-13 中国平安财产保险股份有限公司 Data uploading method, device, equipment and storage medium
CN116663509A (en) * 2023-08-02 2023-08-29 四川享宇科技有限公司 Automatic information acquisition and filling robot for banking complex system
CN116663509B (en) * 2023-08-02 2023-09-29 四川享宇科技有限公司 Automatic information acquisition and filling robot for banking complex system

Also Published As

Publication number Publication date
CN110569341B (en) 2023-04-07
CN110569341A (en) 2019-12-13
SG11202004541WA (en) 2021-02-25

Similar Documents

Publication Publication Date Title
WO2021012382A1 (en) Method and apparatus for configuring chat robot, computer device and storage medium
CN110569721B (en) Recognition model training method, image recognition method, device, equipment and medium
WO2020232872A1 (en) Table recognition method and apparatus, computer device, and storage medium
US10140511B2 (en) Building classification and extraction models based on electronic forms
WO2020098074A1 (en) Face sample picture marking method and apparatus, computer device, and storage medium
WO2020238054A1 (en) Method and apparatus for positioning chart in pdf document, and computer device
CN108256591B (en) Method and apparatus for outputting information
US10943107B2 (en) Simulating image capture
WO2021143088A1 (en) Synchronous check method and apparatus for multiple certificate types, and computer device and storage medium
US11714921B2 (en) Image processing method with ash code on local feature vectors, image processing device and storage medium
CN108182457B (en) Method and apparatus for generating information
CN113378710A (en) Layout analysis method and device for image file, computer equipment and storage medium
CN110795714A (en) Identity authentication method and device, computer equipment and storage medium
US11727701B2 (en) Techniques to determine document recognition errors
CN112330331A (en) Identity verification method, device and equipment based on face recognition and storage medium
CN113627439A (en) Text structuring method, processing device, electronic device and storage medium
CN110866457A (en) Electronic insurance policy obtaining method and device, computer equipment and storage medium
CN114359932B (en) Text detection method, text recognition method and device
WO2020258669A1 (en) Website identification method and apparatus, and computer device and storage medium
WO2020232866A1 (en) Scanned text segmentation method and apparatus, computer device and storage medium
CN110889341A (en) Form image recognition method and device based on AI (Artificial Intelligence), computer equipment and storage medium
US20230048495A1 (en) Method and platform of generating document, electronic device and storage medium
US20220392243A1 (en) Method for training text classification model, electronic device and storage medium
CN113610090B (en) Seal image identification and classification method, device, computer equipment and storage medium
WO2022105120A1 (en) Text detection method and apparatus from image, computer device and storage medium

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

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

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 090822)

122 Ep: pct application non-entry in european phase

Ref document number: 19938157

Country of ref document: EP

Kind code of ref document: A1