JSON process library-driven intelligent retrieval enhanced generation verbal skill method and system

Through the intelligent search-enhanced generation speech method driven by JSON process library, the problem of lack of structure and flexibility in sales speech in the prior art and low update and search efficiency of standard speech library is solved, and efficient, personalized and intelligent sales speech management is achieved.

CN120086346AInactive Publication Date: 2025-06-03JIANGXI NORMAL UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510570771.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-06-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Sales speech in existing telephone sales systems lack structure and flexibility, and the standard speech library updates and retrieval efficiency are inefficient.

Method used

The intelligent search-enhanced generation speech method is adopted by the JSON process library-driven intelligent search enhancement generation speech method. By constructing a standard speech process library and vector process library in JSON format, the preset query statement is used for vectorization, and the similarity matches with the salesperson speech vectors is obtained to obtain the highest similarity JSON text block for semantic extraction, and generate the answer text and guide text of the current process.

Benefits of technology

It improves the efficiency of speech retrieval, quickly responds to the needs of salesmen, enhances the system's personalized and intelligent feedback capabilities, and ensures the consistency and work efficiency of the sales process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086346A_ABST
    Figure CN120086346A_ABST
Patent Text Reader

Abstract

The invention discloses a JSON process library-driven intelligent retrieval enhanced verbal skill generation method and system, and belongs to the technical field of artificial intelligence, and the method comprises the steps: constructing a JSON format standard verbal skill library and a vector process library based on sales verbal skill, and carrying out vectorization processing on verbal skill texts. A query statement is vectorized and matched with a verbal skill vector, and a JSON text block with the highest similarity is obtained. The method comprises the following steps: performing semantic extraction by utilizing a large model, generating an answer text of a current process, dividing the process into a'large process' serving as a main step of a sales process and a'small process' serving as a secondary step of the sales process, and dynamically updating answer content by combining the current answer text and a JSON text block of a next process. According to the method, the verbal skill selling flexibility of salesmen can be enhanced, and the updating efficiency and retrieval efficiency of the standard verbal skill library are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of network security technology, and specifically relates to a method and system for intelligent retrieval enhanced generation of conversation scripts driven by a JSON process library. Background Art

[0002] In the current telemarketing management system, salespersons usually need to communicate with customers according to standard conversation scripts. Traditional sales systems guide salespersons through manual checks and a single conversation script template. However, with the changing market demands and diverse customer needs, the traditional methods of managing and optimizing sales conversation scripts are gradually becoming lagging. Existing systems lack structured processing and flexibility for conversation script content, resulting in the failure to timely and precisely optimize the work efficiency of salespersons and the customer experience. Moreover, existing telemarketing systems usually adopt fixed and unstructured standard conversation script libraries, which are mostly managed based on simple text documents or traditional process libraries and cannot flexibly adjust sales conversation scripts according to specific customer scenarios.

[0003] Therefore, the existing technology has the following deficiencies: First, the conversation scripts lack structure and flexibility; second, the update and retrieval efficiency of the standard conversation script library is low. Summary of the Invention

[0004] The purpose of the embodiments of this application is to provide a method and system for intelligent retrieval enhanced generation of conversation scripts driven by a JSON process library, which can solve the problems that existing sales conversation scripts lack flexibility and the update and retrieval efficiency of the standard conversation script process library is relatively low.

[0005] To solve the above technical problems, this application is implemented as follows: In a first aspect, the embodiments of this application provide a method for intelligent retrieval enhanced generation of conversation scripts driven by a JSON process library, and the method includes: Construct a standard conversation script process library and a vector process library in JSON format based on the salesperson's conversation script text. The standard conversation script process library in JSON format includes multiple JSON text blocks, and the vector process library includes multiple salesperson conversation script vectors obtained by vectorizing the multiple JSON text blocks; Vectorize a preset query statement to obtain a query vector, and perform similarity matching between the query vector and the salesperson conversation script vectors to obtain the JSON text block with the highest similarity; Extract the semantics of the JSON text block with the highest similarity to obtain the response text of the current process. The process is divided into a "major process" and a "minor process". The "major process" is the main step of the sales process, and the "minor process" is the sub-step under the main step; Obtain the updated response text based on the response text of the current process and the JSON text block of the next process.

[0006] As an alternative implementation of the first aspect of the present application, the process of constructing a standard conversation flow library in JSON format based on the salesperson's conversation text includes: obtaining a conversation dataset based on the salesperson's conversation text and the customer's question text; classifying the conversation dataset by process to obtain a "major process" dataset and a "minor process" dataset. The "major process" dataset is the dataset generated by the main steps in the sales process, and the "minor process" dataset is the dataset generated by the sub-steps under the main steps; classifying multiple conversation datasets in the "minor process" dataset by "scenario" to obtain a target conversation dataset classified according to "conversation application scenario" - "major process" - "minor process" - "scenario"; after assigning an ID to each target conversation dataset, traverse the target conversation dataset, use the conversation reference scenario as the top-level key of the JSON data, and use the ID as the nested key; fill in the "major process", "minor process", "scenario" and "question and answer" information to obtain the updated target conversation dataset; traverse the updated target conversation dataset, perform ID matching based on the "next major process" and "next minor process" of the current conversation data to obtain an ID array. The ID array is the value of the "next process", and the ID array includes multiple successfully matched ID numbers; fill the key-value of the "next process" formed by the ID array under the ID layer of the JSON data to generate a standard conversation flow library in JSON format.

[0007] As an alternative implementation of the first aspect of the present application, semantic extraction is performed on the JSON text block with the highest similarity to obtain the answer text for the current process. The "major process" is the main step of the sales process, and the "minor process" is the sub-step under the main step.

[0008] As an alternative implementation of the first aspect of the present application, the process of constructing a vector flow library based on the salesperson's conversation text includes: extracting and combining the key-values of "major process", "minor process", "scenario" and answer of each JSON text block to generate key-value text; combining the key-value text, scenario and ID to obtain a two-dimensional array; loading a pre-trained BERT model and BERT files. The BERT files include a model weight file, a configuration file and a vocabulary file; initializing the pre-trained BERT model based on the model configuration file to obtain a target BERT model; performing tokenization and encoding on the two-dimensional array based on the BERT tokenizer to obtain multiple encoded JSON text blocks; inputting the multiple encoded JSON text blocks into the target BERT model to obtain multiple salesperson's conversation text vectors; storing the multiple salesperson's conversation text vectors in a two-dimensional array to obtain multiple two-dimensional arrays; constructing a vector flow library based on the multiple two-dimensional arrays.

[0009] As an optional implementation of the first aspect of the present application, a process of performing similarity matching between a query vector and a salesperson's speech vector to obtain a JSON text block with the highest similarity includes: reading the salesperson's speech vector from a preset vector flow library and converting it into a NumPy array; traversing each row in the NumPy array and extracting the text vector stored in each row; calculating the cosine similarity between the text vector and the query vector to obtain multiple similarity scores; saving the multiple similarity scores into a similarity array; obtaining the scene information and ID corresponding to the highest similarity score based on the similarity array; locating in a standard speech flow library in JSON format based on the scene information to obtain a scene branch corresponding to the scene information; performing ID matching in the scene branch based on the ID to obtain a JSON text block with the highest similarity.

[0010] As an optional implementation manner of the first aspect of the present application, a process of semantically extracting the JSON text block with the highest similarity to obtain the answer text of the current process includes: extracting the fields in the JSON text block with the highest similarity to obtain the answer background information of the current process, the fields including: "big process", "small process" and "scenario"; extracting the preset "question and answer" information to obtain the answer logic step information of the current process; obtaining the answer text of the current process based on the answer logic step information of the current process and the answer background information of the current process.

[0011] As an optional implementation scheme of the first aspect of the present application, the process of obtaining an updated answer text based on the answer text of the current process and the JSON text block of the next process includes: obtaining the answer background information of the current process based on the "big process", "small process" and "scenario" fields; obtaining the guiding text from the current process to the next process based on the answer text of the current process and the JSON text block of the next process; extracting the "question and answer" information in the JSON text block of the next process to obtain the answer logic step information of the next process; splicing the answer background information, guiding text and answer logic step information of the next process to obtain the guiding text of the next process; splicing the guiding text of the next process with the answer text of the current process to obtain the updated answer text.

[0012] In a second aspect, an embodiment of the present application provides a JSON process library driven intelligent retrieval enhanced speech generation system, the system comprising: A standard speech process library construction module is used to convert the salesperson's speech text into JSON format to obtain multiple JSON text blocks, and save the JSON text blocks into a standard speech process library in JSON format; The vector process library building module is used to vectorize multiple JSON text blocks to obtain multiple salesperson speech vectors; A query vector generation module, used to vectorize a preset query statement to obtain a query vector; The similarity matching module is used to perform similarity matching between the query vector and the salesperson's speech vector to obtain the JSON text block with the highest similarity; The answer text generation module is used to perform semantic extraction on the JSON text block with the highest similarity to obtain the answer text of the current process; A guide text generation module, used to obtain an updated answer text based on the answer text of the current process and the JSON text block of the next process; The answer text update module is used to concatenate the guide text of the next process with the answer text of the current process to obtain the updated answer text.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method of the first aspect.

[0014] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.

[0015] Compared with the prior art, the beneficial effects of the intelligent retrieval and enhanced speech generation method driven by the JSON process library proposed in the present invention are that, first, the present invention uses the JSON format to construct a standard speech process library, which can greatly improve the efficiency of speech retrieval, quickly respond to the needs of salesmen, reduce waiting time, improve work efficiency, and is easy to expand, can adapt to the adjustment and optimization of speech in different sales scenarios, and support rapid modification and updating. Second, the present invention retrieves the most similar JSON text block based on the salesperson's question, can retrieve and provide the most relevant sales speech in real time, so that the system has stronger personalized and intelligent feedback capabilities. Third, the present invention generates the answer text of the salesperson's question based on the JSON text block, and can dynamically generate the answer text according to the current sales background and customer needs, so that the salesperson can respond to customers more flexibly and accurately in actual conversations. Fourth, the present invention generates a guide text based on the JSON text block of the "next process", and the automatically generated guide text can help the salesperson clearly transition to the next sales stage, ensuring the continuity of the sales process and avoiding the fault in the process. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flowchart of the method for intelligent retrieval enhancement and speech generation driven by the JSON process library provided in the first embodiment of the present application; Figure 2It is a schematic structural diagram of an intelligent retrieval enhanced generation speech system driven by a JSON process library provided by the second embodiment of the present application. Detailed implementation manners

[0017] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0018] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means an "or" relationship between the associated objects before and after.

[0019] Next, in conjunction with the accompanying drawings, the JSON process library-driven intelligent retrieval enhanced generation speech method provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.

[0020] Embodiment 1 Please refer to Figure 1 , which is a flowchart of the JSON process library-driven intelligent retrieval enhanced generation speech method proposed in the first embodiment of the present application. The proposed method includes steps S1 to S4.

[0021] Step S1: Construct a standard speech process library and a vector process library in JSON format based on the salesperson's speech text. The standard speech process library in JSON format includes multiple JSON text blocks, and the vector process library includes multiple salesperson speech vectors obtained by vectorizing the multiple JSON text blocks.

[0022] Specifically, when constructing a standard conversation flow library in JSON format, it includes data structuring and JSON data chunking. During the data structuring process, it includes: obtaining a large number of excellent salesperson's actual combat conversation example Q&A (dialogue) datasets, which contain customer questions and salesperson answers; according to the "conversation application scenarios" classified by the salesperson, reclassifying the datasets into datasets under different conversation application scenarios through semantic analysis to ensure that the Q&A (dialogue) data in the same dataset belongs to the same application scenario; further, according to the "major process" and "minor process" classifications provided by the salesperson, dividing the datasets under the same scenario into different "major processes" and "minor processes", where the "major process" is the main step of the sales process and the "minor process" is the sub-step under the main step.

[0023] On this basis, semantically analyze each Q&A in the "minor process" dataset one by one for the specific situations that may occur in a specific conversation application scenario, and classify these situations as "scenarios", and divide the Q&A with roughly the same situations into the same "scenario"; after the above processing, obtain a Q&A dataset classified by "conversation application scenario" - "major process" - "minor process" - "scenario" gradient, and determine the process order between Q&A data through semantic analysis and context analysis, and finally obtain the classification situations of "next major process" and "next minor process"; through the above operations, each Q&A data has the complete classification information of "conversation application scenario" - "major process" - "minor process" - "scenario" - next "major process" - next "minor process".

[0024] Furthermore, during the JSON data chunking process, it includes: assigning a unique "ID" number to each Q&A data; traversing the dataset, using the "conversation application scenario" in the dataset as the top-level key of the JSON data, and nesting all data under this key; extracting the "ID" corresponding to each Q&A data one by one, using it as the nested key, and filling in fields such as "major process", "minor process", "scenario", "question and answer", etc.; traversing the dataset again, according to the "next major process" and "next minor process" of the current Q&A data, find all matching "IDs", and form an array of these "IDs" as the value of "next process" in the JSON data. If the "next major process" or "next minor process" is empty, then "next process" corresponds to an empty array; after the above operations, obtain multiple structured JSON data, and save the multiple structured JSON data to the standard conversation flow library for storage.

[0025] Furthermore, the process of constructing a vector flow library includes two processes: extracting JSON text chunks and vectorization processing.

[0026] Among them, the process of extracting JSON text blocks includes: extracting the key values ​​of "scenario", "ID", "big process", "small process", "scenario" and "question and answer" of the first JSON text block, merging the key values ​​of "big process", "small process", "scenario" and "question and answer" into a piece of text, and forming a row of data of a two-dimensional array with the corresponding "scenario" and "ID"; extracting all JSON text blocks line by line, processing them in the same way, and finally forming a complete two-dimensional array.

[0027] The process of vectorization processing includes: loading the pre-trained BERT model and its related files from the specified path, including the model weight file, the configuration file and the vocabulary file; using the configuration file to initialize the BERT model structure, and loading the model weights asynchronously to ensure high efficiency in large-scale data processing; loading the BERT tokenizer to convert the text into an input format acceptable to the model; using the BERT tokenizer to tokenize and encode the extracted two-dimensional array line by line to generate the input tensor required by the model; inputting the encoded JSON text block into the BERT model, and calculating the hidden layer representation of the text through forward propagation; extracting the hidden layer vector of the token output by the BERT model as the vectorized representation of the entire text, the token is a special tag specially used by the BERT model to represent the semantics of the entire sentence, and its vector contains the global semantic information of the text; by traversing each line of the two-dimensional array, the text is parallelly vectorized line by line using the text vectorization function and the asynchronous concurrency mechanism to improve processing efficiency; the vectorized result is stored back into the two-dimensional array and saved as a vector flow library.

[0028] Step S2: vectorize the preset query statement to obtain a query vector, and perform similarity matching between the query vector and the salesperson's speech vector to obtain a JSON text block with the highest similarity.

[0029] Specifically, the process of obtaining the JSON text block with the highest similarity includes two processes: vectorized query, matching, and retrieval.

[0030] Among them, during the process of vectorized query, it includes: reading vectorized data from the vector process library, and converting the embedded vector stored in string format into a NumPy array for subsequent calculations; loading the pre-trained BERT model and tokenizer, and using the vectorization function to convert the query text query input by the user into a vector representation; traversing each row in the NumPy array, extracting the stored text vector, and calculating the cosine similarity between it and the query vector; after the calculation is completed, storing the similarity score of each piece of data in a temporary array; sorting all the data in descending order according to the similarity score to obtain a result list arranged from high to low in similarity; extracting the data item most similar to the query from the sorted result, and returning its "scenario", "ID" and similarity score; the entire processing process is implemented through asynchronous programming to ensure high efficiency when processing large-scale data.

[0031] Among them, during the process of matching and retrieval, it includes: accurately locating the corresponding scenario branch in the multi-layer nested JSON data structure in the standard conversation flow library according to the "scenario" information; quickly retrieving the specific JSON text block under this scenario branch using the "ID" value, and this specific JSON text block is the JSON text block with the highest similarity.

[0032] Step S3: Perform semantic extraction on the JSON text block with the highest similarity to obtain the response text of the current process.

[0033] Specifically, the process is divided into "major processes" and "minor processes". The "major processes" are the main steps of the sales process, and the "minor processes" are the sub-steps under the main steps. Among them, the specific process of obtaining the response text of the current process includes: obtaining the complete information stored in the JSON text block with the highest similarity obtained in step S2, including keyword field contents such as "major process", "minor process", "scenario", "question and answer", and "next process", and inputting the JSON text block with the highest similarity obtained in step S2 into the intelligent agent, and using the intelligent agent to deeply understand and learn the information of the retrieved JSON text block based on its understanding of the JSON text block structure. For example: analyzing the problems and solutions that may be encountered in the "major process" and "minor process" in the scenario of "renewal of expired number", and analyzing the "scenario" part to identify the specific "scenario" of the sales scenario; at the same time, identifying the key elements in a specific "scenario", such as the degree of customer cooperation, willingness to renew, etc., to provide more information for subsequent answer generation; based on the information understood and learned, analyzing what the current sales background is.

[0034] Further, after deeply understanding the sales background, conduct a structured analysis of the "question and answer" text, dividing it into multiple logical steps, each corresponding to a key node in the sales process, such as the opening statement, problem statement, solution proposal, objection handling, call to action, etc.; use an agent to analyze the purpose, core content, and connection method of each step to ensure that the generated answer conforms to the sales logic. For example, in the renewal scenario, the system may divide the conversation into steps such as "confirming the customer's identity", "explaining the importance of renewal", "handling price objections", "facilitating the renewal decision", etc. Finally, using the analyzed sales background as the background for generating the conversation text and the analyzed logical steps as the step outline for generating the conversation text, generate an answer text that is coherent, natural, and answers the user's input query; check the answer text of the current process to avoid directly copying the input data, but rather create new content that meets the scenario requirements through semantic understanding and text reconstruction; ensure that each step is naturally connected and the final sales goal is achieved.

[0035] Step S4: Obtain the updated answer text based on the answer text of the current process and the JSON text block of the next process.

[0036] Specifically, the process of obtaining the guiding text of the next process includes: based on the "ID" information of "the next process" in the JSON text block with the highest similarity, locate the JSON text block of "the next process" through ID; extract the "big process", "small process", and "scenario" information to generate the current answer background information; extract the answer text and combine it with the JSON text block of "the next process" to generate the guiding words from the current process to "the next process"; extract the "question and answer" information in the JSON text block of "the next process" to analyze the sales logic steps therein; splice the answer background information, guiding words, and sales logic steps to obtain the guiding text of the next process; obtain the updated answer text based on the answer text of the current process and the guiding text of the next process.

[0037] In summary, the present invention can use the large model and prompt words to more deeply understand the standard conversation skills and generate higher-quality answer texts. The present invention uses the JSON format to construct the standard conversation skill process library. By obtaining the standard conversation skill process library in JSON format, the efficiency of conversation skill retrieval can be greatly improved, quickly respond to the needs of salespersons, reduce waiting time, improve work efficiency, and is easy to expand, capable of adapting to the adjustment and optimization of conversation skills in different sales scenarios, and supporting rapid modification and update.

[0038] In addition, the present invention generates response texts for salesperson questions based on JSON text blocks, and can dynamically generate response texts according to the current sales background and customer needs, enabling salespersons to respond to customers more flexibly and accurately in actual conversations. The present invention also generates guiding texts based on the JSON text blocks of the "next process", and the automatically generated guiding texts can help salespersons clearly transition to the next sales stage, ensuring the coherence of the sales process and avoiding breaks in the process.

[0039] Embodiment 2 Please refer to Figure 2 , which shows a schematic structural diagram of an intelligent retrieval enhanced generation speech system driven by a JSON process library according to the second embodiment of the present application. The system includes: A standard speech process library construction module, which is used to convert the salesperson's speech text into JSON format to obtain multiple JSON text blocks, and save the JSON text blocks into a standard speech process library in JSON format; A vector process library construction module, which is used to perform vectorization processing on multiple JSON text blocks to obtain multiple salesperson speech vectors; A query vector generation module, which is used to perform vectorization processing on a preset query statement to obtain a query vector; A similarity matching module, which is used to perform similarity matching between the query vector and the salesperson speech vectors to obtain the JSON text block with the highest similarity; A response text generation module, which is used to perform semantic extraction on the JSON text block with the highest similarity to obtain the response text for the current process; A guiding text generation module, which is used to obtain an updated response text based on the response text of the current process and the JSON text blocks of the next process; A response text update module, which is used to splice the guiding text of the next process with the response text of the current process to obtain an updated response text.

[0040] The beneficial effect of the JSON process library driven intelligent retrieval and enhanced speech generation system proposed in the present invention is that the present invention utilizes the standard speech process library construction module to convert the salesperson's speech text into JSON format to obtain multiple JSON text blocks, and saves the JSON text blocks into the standard speech process library in JSON format. This can greatly improve the efficiency of speech retrieval, quickly respond to the needs of salespeople, reduce waiting time, improve work efficiency, and is easy to expand. It can adapt to speech adjustments and optimizations in different sales scenarios and support rapid modification and updating. The similarity matching module is used to match the query vector with the salesperson's speech vector to obtain the JSON text block with the highest similarity. During the similarity matching process, asynchronous programming is used to retrieve and provide the most relevant sales speech in real time, which makes the system more personalized and intelligent. Feedback capabilities ensure that high efficiency is maintained when processing large-scale data; the answer text generation module is used to generate answer texts for salespersons' questions. The answer text can be dynamically generated according to the current sales background and customer needs, allowing salespeople to respond to customers more flexibly and accurately in actual conversations; the guide text generation module is used to generate guide texts. The automatically generated guide text helps salespeople clearly transition to the next sales stage, ensuring the continuity of the sales process and avoiding gaps in the process.

[0041] The intelligent retrieval enhancement generation speech system driven by the JSON process library in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0042] The intelligent search enhancement and speech generation system driven by the JSON process library in the embodiment of the present application can be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0043] The intelligent retrieval enhanced generation dialogue system driven by the JSON process library provided in the embodiments of the present application can achieve Figure 1 each process implemented by the intelligent retrieval enhanced generation dialogue system in the method embodiments of Figure 1 . To avoid repetition, it will not be elaborated here.

[0044] Optionally, the embodiments of the present application further provide an electronic device, including a processor, a memory, and a program or instruction stored on the memory and executable on the processor. When the program or instruction is executed by the processor, it implements each process of the above-mentioned method embodiment of the intelligent retrieval enhanced generation dialogue method driven by the JSON process library, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0045] The embodiments of the present application further provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by the processor, it implements each process of the above-mentioned method embodiment of the intelligent retrieval enhanced generation dialogue method driven by the JSON process library, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0046] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks, or optical discs, etc.

[0047] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without more limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. For example, the described method may be executed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.

[0048] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0049] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative rather than restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.

Claims

1. The intelligent retrieval enhanced speech generation method driven by JSON process library is characterized by: include: Based on the salesperson's speech text, a standard speech process library and a vector process library in JSON format are constructed, wherein the standard speech process library in JSON format includes multiple JSON text blocks, and the vector process library includes multiple salesperson's speech vectors obtained after vectorization processing of the multiple JSON text blocks; Vectorize the preset query statement to obtain a query vector, and perform similarity matching between the query vector and the salesperson's speech vector to obtain a JSON text block with the highest similarity; Perform semantic extraction on the JSON text block with the highest similarity to obtain the answer text of the current process; Get the updated answer text based on the answer text of the current process and the JSON text block of the next process.

2. According to claim 1, the intelligent retrieval enhanced speech generation method driven by the JSON process library is characterized in that: The process of building a standard script flow library in JSON format based on the salesperson's script text includes: Obtain a conversation dataset based on the salesperson's speech text and the customer's question text; Performing process classification on the dialogue dataset to obtain a "big process" dataset and a "small process" dataset, wherein the "big process" dataset is a dataset generated by a main step in a sales process, and the "small process" dataset is a dataset generated by a sub-step under the main step; Perform "scenario" classification on multiple dialogue data sets in the "small process" data set to obtain the target dialogue data set classified according to "speech application scenario" - "big process" - "small process" - "scenario"; After assigning an ID to each target conversation dataset, traverse the target conversation dataset, use the scenario referenced by the conversation as the top-level key of the JSON data, and use the ID as the nested key; Fill in the "big process", "small process", "scenario" and "question and answer" information to obtain the updated target dialogue dataset; Traverse the updated target conversation data set, perform ID matching based on the "next large process" and "next small process" of the current conversation data, and obtain an ID array, where the ID array is the value of the "next process" and includes multiple successfully matched ID numbers; Fill the key value of "next process" composed of the ID array into the ID layer of the JSON data to generate a standard speech process library in JSON format.

3. The method for generating speech by intelligent retrieval and enhancement driven by JSON process library according to claim 2 is characterized in that: The "big process" is the main step of the sales process, and the "small process" is the sub-step under the main step.

4. The method for generating speech by intelligent retrieval and enhancement driven by a JSON process library according to claim 1 is characterized in that: The process of building a vector flow library based on the salesperson's speech text includes: Extract and merge the key values ​​of "big process", "small process", "scenario" and answer of each JSON text block to generate key value text; Combine the key value text, scene and ID to obtain a two-dimensional array; Load the pre-trained BERT model and BERT file, which includes a model weight file, a configuration file, and a vocabulary file; Initialize the pre-trained BERT model based on the configuration file to obtain a target BERT model; Segment and encode the two-dimensional array based on the BERT tokenizer to obtain multiple encoded JSON text blocks; Inputting multiple encoded JSON text blocks into the target BERT model to obtain multiple salesperson speech text vectors; Storing a plurality of the salesperson's speech text vectors into a two-dimensional array to obtain a plurality of two-dimensional arrays; A vector process library is constructed based on a plurality of the two-dimensional arrays.

5. The method for generating speech by intelligent retrieval and enhancement driven by JSON process library according to claim 1 is characterized in that: The process of performing similarity matching between the query vector and the salesperson's speech vector to obtain a JSON text block with the highest similarity includes: Read the salesperson's speech vector from the preset vector flow library and convert it into a NumPy array; Iterate over each row in the NumPy array and extract the text vector stored in each row; Calculating the cosine similarity between the text vector and the query vector to obtain multiple similarity scores; Saving the plurality of similarity scores into a similarity array; Based on the similarity array, obtain the scene information and ID corresponding to the highest similarity score; Based on the scenario information, locate the standard speech process library in the JSON format and obtain the scenario branch corresponding to the scenario information; Based on the ID, ID matching is performed in the scene branch to obtain a JSON text block with the highest similarity.

6. The method for generating speech by intelligent retrieval and enhancement driven by a JSON process library according to claim 1, characterized in that: The process of performing semantic extraction on the JSON text block with the highest similarity to obtain the answer text of the current process includes: Extract the fields in the JSON text block with the highest similarity to obtain the answer background information of the current process, wherein the fields include: "big process", "small process" and "scenario"; Extract the preset "question and answer" information to obtain the answer logic step information of the current process; The answer text of the current process is obtained based on the answer logic step information of the current process and the answer background information of the current process.

7. The method for generating speech by intelligent retrieval and enhancement driven by a JSON process library according to claim 1 is characterized in that: The process of obtaining the updated answer text based on the answer text of the current process and the JSON text block of the next process includes: Get the answer background information of the current process based on the "big process", "small process" and "scenario" fields; Get the guiding text from the current process to the next process based on the answer text of the current process and the JSON text block of the next process; Extract the "question and answer" information in the JSON text block of the next process, and obtain the answer logic step information of the next process; The answer background information, guiding text and answer logic step information of the next process are spliced ​​together to obtain the guiding text of the next process; The guide text of the next process is concatenated with the answer text of the current process to obtain an updated answer text.

8. The intelligent retrieval and enhanced speech generation system driven by the JSON process library is characterized by: The system comprises: A standard speech process library construction module is used to convert the salesperson's speech text into JSON format to obtain multiple JSON text blocks, and save the JSON text blocks into a standard speech process library in JSON format; The vector process library building module is used to vectorize multiple JSON text blocks to obtain multiple salesperson speech vectors; A query vector generation module, used to vectorize a preset query statement to obtain a query vector; A similarity matching module, used for performing similarity matching between the query vector and the salesperson's speech vector to obtain a JSON text block with the highest similarity; An answer text generation module is used to perform semantic extraction on the JSON text block with the highest similarity to obtain the answer text of the current process; A guide text generation module, used to obtain an updated answer text based on the answer text of the current process and the JSON text block of the next process; The answer text update module is used to concatenate the guide text of the next process with the answer text of the current process to obtain the updated answer text.

9. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the intelligent retrieval enhanced speech generation method driven by the JSON process library as described in any one of claims 1 to 7 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the intelligent retrieval enhanced speech generation method driven by the JSON process library as described in any one of claims 1-7 are implemented.

Citation Information

Patent Citations

  • Construction method of intelligent marketing customer obtaining robot system

    CN114266583A

  • Electric power business scene application method based on intelligent voice technology

    CN116485409A

  • Intelligent power grid dispatching method and system based on man-machine voice interaction

    CN117458708A

  • Voice interaction sales agent based on large language model and sales vehicle

    CN119415647A

  • Bidding field question and answer method and system based on retrieval enhancement generation architecture

    CN119441446A