Robot version regression management methods, devices, robots and storage media
By generating a test dataset on the development environment server and calculating the intent recognition pass rate, the optimal version of configuration data is selected and synchronized to the production environment. This solves the problems of configuration isolation and historical version backtracking in interactive robot version management, ensuring the stability of the production environment.
Patent Information
- Application Number
- CN202110370224.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-07
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2041-04-07
AI Technical Summary
In existing technologies, interactive robot version management suffers from insufficient isolation between production and development environments, making it impossible to backtrack to historical versions and failing to guarantee the effectiveness of robot version backtracking.
By receiving corpus data from the development environment server to form a test dataset, calculating the intent recognition pass rate of the configuration data of historical versions in the test dataset, and synchronizing the configuration data of the target version with the highest intent recognition pass rate to the production environment server, the backtracking of configuration data is realized.
Effective backtracking of robot versions was achieved, ensuring normal use in the production environment and avoiding the impact of development environment changes on the production environment.
Smart Images

Figure CN113064631B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, and in particular to a robot version regression management method, apparatus, robot, and storage medium. Background Technology
[0002] To ensure the semantic understanding, question-and-answer, and response capabilities of intelligent interactive robots, it is necessary to regularly optimize and update relevant data such as the robot's skills, intents, slots, dialogue flow, and sample corpora in daily work. However, the configuration information of the robot development environment directly affects the use of the production environment, and there are many problems with interactive robot version management.
[0003] The technical issues that need to be addressed include the lack of configuration isolation between the production and development environments, the inability to backtrack to historical versions, and the inability to guarantee the effectiveness of robot version backtracking. Summary of the Invention
[0004] To address the aforementioned technical problems, this application proposes a robot version regression management method, system, robot, and storage medium, the specific solution of which is as follows:
[0005] In a first aspect, embodiments of this disclosure provide a robot version regression management method, applied to a development environment server of a robot system, the method comprising:
[0006] Receive the corpus data uploaded by the robot, and perform preset processing on the corpus data to form a test dataset;
[0007] Extract configuration data for multiple historical versions of the robot from the version database;
[0008] Calculate the intent recognition pass rate for each historical version of the configuration data in the test dataset;
[0009] The configuration data corresponding to the target version with the highest intent recognition pass rate is synchronized to the production environment server corresponding to the robot.
[0010] According to a specific embodiment of this disclosure, the step of performing preset processing on the corpus data to form a test dataset includes:
[0011] The corpus data is classified according to preset intent classification rules.
[0012] The statistically categorized corpus data is used to form a corresponding test dataset, which includes test data for different intent categories;
[0013] The step of calculating the intent recognition pass rate of the configuration data for each historical version in the test dataset includes:
[0014] Calculate the intent recognition results for each intent category in the test data of the historical version's configuration data;
[0015] The intent recognition pass rate is calculated based on the intent recognition results and the number of intents included in the test dataset.
[0016] According to one specific embodiment of this disclosure, the step of calculating the intent recognition result of the configuration data of the historical version in the test data of each intent category includes:
[0017] The test dataset is segmented using natural language processing tools to generate test corpus templates corresponding to different intent categories.
[0018] The similarity between the configuration corpus template and the test corpus template of the same intent category is calculated based on the text edit distance similarity algorithm. The configuration corpus template is the corpus template under all intents in the configuration data of each historical version of the robot.
[0019] When the similarity is greater than or equal to a preset similarity threshold, the intent of the configured corpus template is determined to include the intent of the test corpus template.
[0020] According to a specific embodiment of this disclosure, when all the similarities are less than a preset similarity threshold, the method further includes:
[0021] The corpus data is converted into sentence vectors to obtain test data for the input text classification model;
[0022] The probability that the test data belongs to the intent of the configuration corpus data is calculated by the text classification model to determine whether the intent of the configuration corpus data includes the intent of the test data. The configuration corpus data is the corpus data under all intents in the configuration data of each historical version of the robot.
[0023] According to one specific embodiment of this disclosure, the storage method for the configuration data of the robot's historical versions includes:
[0024] The configuration data of the robot's historical versions is objectified based on the functional category, and all the objectified configuration data is encapsulated into a robot object.
[0025] The robot object is converted into a JSON string using JSON serialization technology, and the JSON string is stored in the version database.
[0026] According to a specific embodiment of this disclosure, the step of extracting a preset number of robot version configuration data from a historical version database includes:
[0027] Retrieve a preset number of historical versions of the corresponding robots from the version database;
[0028] Based on JSON deserialization technology, the JSON data of the corresponding historical versions of the preset number of robots is deserialized into the preset number of robot objects, and the configuration data of the historical versions of the preset number of robots is obtained based on the preset number of robot objects.
[0029] According to a specific embodiment of this disclosure, the step of synchronizing the configuration data corresponding to the target version with the highest intent recognition pass rate to the production environment server corresponding to the robot includes:
[0030] The configuration data of the robot version currently used by the production environment server is marked as offline in the version database, and the configuration data of the target version is marked as online.
[0031] Call the synchronization interface of the production environment server and load the configuration data that is in the online state through the synchronization interface.
[0032] Secondly, this disclosure also provides a robot version regression management device, the device comprising:
[0033] The test data receiving module is used to receive the corpus data uploaded by the robot and perform preset processing on the corpus data to form a test dataset;
[0034] The version data extraction module is used to extract configuration data for multiple historical versions of the robot from the version database;
[0035] The calculation module is used to calculate the intent recognition pass rate of the configuration data for each historical version in the test dataset;
[0036] The version switching module is used to synchronize the configuration data corresponding to the target version with the highest intent recognition pass rate to the production environment server corresponding to the robot.
[0037] Thirdly, embodiments of this disclosure also provide a robot including a processor and a memory, the memory storing a computer program, the computer program executing the robot version regression management method described in the first aspect when running on the processor.
[0038] Fourthly, this disclosure also provides a computer storage medium storing a computer program, which executes the robot version regression management method described in the first aspect when run on a processor.
[0039] This disclosure provides a robot version regression management method, system, robot, and storage medium. The robot system includes a development environment server and a production environment server, thereby achieving configuration isolation between the two environments by running the development and production environments separately on the two servers. After receiving the corpus data uploaded by the robot, the development environment server performs preset processing on the corpus data to form a test dataset. It extracts configuration data for multiple historical versions of the robot from the version database. After calculating the intent recognition pass rate of the configuration data for each historical version in the test dataset, the configuration data corresponding to the target version with the highest intent recognition pass rate is synchronized to the production environment server corresponding to the robot. This enables the regression of the robot's historical version configuration data and ensures that the version with the best performance is selected for regression processing, thus guaranteeing the normal use of the production environment. Attached Figure Description
[0040] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope of protection of the present invention. In the various drawings, similar components are numbered similarly.
[0041] Figure 1 A schematic flowchart of a robot version regression management method provided in an embodiment of this application is shown;
[0042] Figure 2 This application discloses a schematic tabular diagram of a test dataset for a robot version regression management method according to an embodiment of the present application.
[0043] Figure 3 This paper illustrates a schematic structural diagram of a TextCNN model for a robot version regression management method provided in an embodiment of this application.
[0044] Figure 4 This application discloses a device module diagram of a robot version regression management device according to an embodiment of the present application. Detailed Implementation
[0045] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0046] The components of the embodiments of the invention described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0047] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of the invention, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0048] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0049] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the invention pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the invention.
[0050] In this invention, the development and operation of the robot are divided into two web services: robot-dev and robot-pro. robot-dev, the development environment server, is used to configure robot-related functions such as skills, intentions, corpus templates, slots, question-answer pairs, and sample corpora. All configuration data is stored in independent database tables. The development environment server primarily provides development environment services to R&D and maintenance personnel. robot-pro, the production environment server, is used to load the configuration data of the currently enabled version from the database into the robot's memory to enable user-facing interactive functions.
[0051] By setting up the production environment server and the development environment server as described above, this invention isolates the interactive services provided by the production environment from the configuration data functions provided by the development environment, thereby ensuring that the interactive functions implemented by the robot in the production environment are not affected by changes in the relevant configurations in the development environment.
[0052] Reference Figure 1 This disclosure provides a robot version regression management method, applied to a robot system development environment server, the method comprising:
[0053] S101, Receive the corpus data uploaded by the robot, and perform preset processing on the corpus data to form a test dataset;
[0054] In practical applications, user interactions with the robot are random, which can generate corpus data that is unrecognizable in the robot's current configuration data. This affects the implementation of the robot's specific interactive functions and impacts the user experience. Therefore, the robot collects this unrecognizable corpus data and uploads it to the development environment server.
[0055] Specifically, the step of performing pre-processing on the corpus data to form a test dataset includes:
[0056] The corpus data is classified according to preset intent classification rules.
[0057] The statistically categorized corpus data is used to form a corresponding test dataset, which includes test data for different intent categories;
[0058] After receiving the corpus data, the development environment server performs preliminary intent classification processing on the corpus data and generates test data corresponding to each intent. Then, the test data corresponding to each intent is organized and collected as follows: Figure 2 The test dataset shown in the table is stored in the test database.
[0059] Specifically, the test dataset can also be formed by directly selecting historically uploaded test datasets from the test database; this is not a limitation here.
[0060] S102, Extract configuration data for multiple historical versions of the robot from the version database;
[0061] Once the development environment server detects the formation of the test dataset, it extracts configuration data for multiple historical versions of the robot from the version database of the development environment. This is done to prepare for evaluating the effectiveness of the configuration data for multiple versions based on the test dataset, and to select whether to perform backtracking and to choose the target historical version for robot backtracking.
[0062] In practical applications, each time a robot version is launched for testing in the development environment, the development environment server stores the configuration data of the corresponding version of the robot and displays version-related information such as the robot's release number, release time, and online status in a list format for easy viewing by technical personnel.
[0063] Specifically, the storage methods for the configuration data of the robot's historical versions include:
[0064] The configuration data of the robot's historical versions is objectified based on the functional category, and all the objectified configuration data is encapsulated into a robot object.
[0065] The robot object is converted into a JSON string using JSON serialization technology, and the JSON string is stored in the version database.
[0066] After objectifying and encapsulating the configuration data of historical robot versions based on functional categories, data including robot objects, skill objects, intent objects, corpus objects, slot objects, and question-and-answer objects can be obtained. Furthermore, the production environment server can establish relationships between these objects to store the robot's historical configuration data in memory. For example, the relationships between objects could be that a robot object contains multiple skill objects, the skill objects contain multiple intent objects and multiple question-and-answer objects, the intent objects contain multiple corpus objects and multiple slot objects, and the question-and-answer objects contain multiple similar question objects.
[0067] In this embodiment of the disclosure, all object-encapsulated configuration data is encapsulated into a robot object to store the configuration data of the robot's historical versions in the robot's memory.
[0068] Once the configuration data is stored in the robot object, JSON (JavaScript Object Notation) serialization technology can be used to convert the robot object into a JSON string, and then the JSON string can be persisted to the version database, thus realizing the storage of configuration data for historical versions of the robot. Furthermore, the object-oriented encapsulation technology and JSON serialization technology used to process the configuration data make the configuration data stored in the version database easier to parse and retrieve.
[0069] According to a specific embodiment of this disclosure, the step of extracting a preset number of robot version configuration data from a historical version database includes:
[0070] Retrieve a preset number of historical versions of the corresponding robots from the version database;
[0071] Based on JSON deserialization technology, the JSON data of the corresponding historical versions of the preset number of robots is deserialized into the preset number of robot objects, and the configuration data of the historical versions of the preset number of robots is obtained based on the preset number of robot objects.
[0072] When the production environment server starts retrieving configuration data for a preset number of robot versions, it can directly extract JSON data of the corresponding historical versions of the robots from the version database, and obtain the configuration data of the corresponding preset number of robots' historical versions based on JSON deserialization technology and the robot object unpacking procedure.
[0073] In addition, the preset number is the number of versions to be extracted set in advance by the technicians. It can be some versions or all versions. There is no limitation on the number or the specific versions to be compared here.
[0074] S103, Calculate the intent recognition pass rate of the configuration data for each historical version in the test dataset;
[0075] After obtaining the test dataset and extracting configuration data from multiple historical versions from the version database, the intent recognition pass rate of each historical version's configuration data in the test dataset can be calculated using the configuration data of the multiple historical versions and the test dataset.
[0076] Specifically, it is necessary to first calculate the intent recognition results of the historical version configuration data in the test data of each intent category, and then calculate the intent recognition pass rate based on the intent recognition results and the number of intents included in the test dataset.
[0077] First, the intent recognition result is obtained through an algorithm or model. After obtaining the intent recognition result, the intent recognition pass rate is calculated based on the intent in the configuration data of the corresponding version in the test dataset and the number of intents in the corpus data of the test dataset.
[0078] The intent recognition pass rate is set with a preset pass rate threshold. For example, the pass rate threshold is set to 0.8, meaning that the configuration data of a version is considered to meet the standard for online use only when more than 80% of the intents in the test dataset belong to the intents in the version configuration data. By calculating the average pass rate of the intents in the test dataset in the configuration data of each version and making a horizontal comparison, the target version with the highest intent recognition pass rate can be obtained.
[0079] According to one specific embodiment of this disclosure, the step of calculating the intent recognition result of the configuration data of the historical version in the test data of each intent category includes:
[0080] The test dataset is segmented using natural language processing tools to generate test corpus templates corresponding to different intent categories.
[0081] The similarity between the configuration corpus template and the test corpus template of the same intent category is calculated based on the text edit distance similarity algorithm. The configuration corpus template is the corpus template under all intents in the configuration data of each historical version of the robot.
[0082] When the similarity is greater than or equal to a preset similarity threshold, the intent of the configured corpus template is determined to include the intent of the test corpus template.
[0083] Specifically, the corpus data received by the robot can be segmented using the Han Language Processing (HanLP) package, thus transforming the corpus data into a test corpus template. For example, segmenting the corpus data "Query today's maximum load" using the HanLP package can transform it into a test corpus template for the load {system_action}{system_date}{max_value}. It is worth noting that the HanLP package can also be other natural language processing tools; this is not limited to these specific tools.
[0084] After generating the corresponding test corpus template, the text edit distance similarity algorithm can be used to calculate the similarity between the test corpus template and the corpus templates under all intents in the robot's historical version configuration data. Based on the pre-set similarity threshold, it can be determined whether the intent of the test corpus template belongs to the corresponding intent in the robot's historical version configuration data.
[0085] For example, if the similarity threshold is set to 0.7, the edit distance between the configuration corpus template "Query the maximum load in northern Hebei" and the test corpus template "Query the maximum load yesterday" is calculated, as shown in Table 1 below:
[0086] Table 1
[0087]
[0088]
[0089] Taking the value of the bottom right corner d[9][9], the edit distance is 2. Therefore, the similarity between the two strings is:
[0090]
[0091] It can be determined that the similarity between the configured corpus template and the test corpus template exceeds the threshold, and the intent of the test corpus template belongs to the intent of the configured corpus template.
[0092] It is worth noting that the test dataset includes test data of different categories of intent. In the specific calculation process, test data of the same category is selected and calculated with configuration data of all categories. Through multiple calculations, the intent recognition pass rate of the test dataset in each version is obtained.
[0093] The text edit distance similarity algorithm described above is fast to calculate and does not require model training. Since the daily working language in the power industry is relatively standardized, it can achieve good recognition results when the corpus data is relatively standardized.
[0094] According to a specific embodiment of this disclosure, when all the similarities are less than a preset similarity threshold, the method further includes:
[0095] The corpus data is converted into sentence vectors to obtain test data for the input text classification model;
[0096] The probability that the test data belongs to the intent of the configuration corpus data is calculated by the text classification model to determine whether the intent of the configuration corpus data includes the intent of the test data. The configuration corpus data is the corpus data under all intents in the configuration data of each historical version of the robot.
[0097] The text classification model includes the FastText model and the TextCNN model. The FastText model is mainly used to convert corpus data into multiple word vectors and concatenate multiple word vectors into a sentence vector.
[0098] like Figure 3 As shown, the TextCNN model is a deep learning-based text classification model. Its specific structure includes an embedding layer, which projects one-hot encoded words into a low-dimensional space through a hidden layer, acting as a feature extractor to encode semantic features in a specified dimension. This ensures that semantically similar words have relatively close Euclidean or cosine distances. The word vectors used are pre-trained using the FastText method, but word vectors trained using word2vec and GloVe methods can also be used; no specific limitation is made here.
[0099] In CNNs (Convolutional Neural Networks), the width and height of the convolutional kernels are the same when processing image data. However, in TextCNN, the width of the convolutional kernel is consistent with the dimension of the word vectors. This is because each row of the input vector represents a word, and words are the smallest unit of text extraction. The height, like in CNNs, can be set manually (typically 2, 3, 4, or 5), similar to an n-gram. Since the input is a sentence, the relationships between adjacent words are very strong. Therefore, when using convolutional kernels, not only word meaning but also word order and context are considered.
[0100] Pooling layers address the issue of inconsistent dimensionality in feature vectors resulting from convolutional layers, which use kernels of varying heights. Pooling layers employ 1-Max-pooling to pool each feature vector into a single value, extracting the maximum value from each feature vector to represent that feature. This maximum value represents the most important feature. After 1-Max-Pooling, the values are concatenated to obtain the final feature vector from the pooling layer. Dropout can be added between the pooling layer and the fully connected layer to prevent overfitting.
[0101] Fully connected layer: Like other models, this model has two fully connected layers. The first layer can be activated by ReLU, and the second layer uses the softmax activation function to obtain the probability of belonging to each class.
[0102] Specifically, using the FastText model, the corpus data is converted into multiple word vectors, which are then concatenated into a sentence vector. This sentence vector is used as input data for the TextCNN model. After calculations by each network layer, the output layer obtains the probability that the vector belongs to each intent and the intent category to which the sample corpus belongs. Assuming the current model can classify the intents of querying load, querying electricity consumption, and work order execution status, with category numbers 0, 1, and 2 respectively, the output layer using the softmax function will obtain a result similar to [0.95, 0.03, 0.02]. The system sets the probability threshold to 0.6. In this case, 0.95 is greater than 0.6 and has an index of 0, indicating that "querying yesterday's maximum load" belongs to the intent of querying load.
[0103] Therefore, after converting the corpus data into test data for the input text classification model, the intent recognition pass rate of the test data in each version can be directly calculated through the text classification model. The text classification model is more accurate in identifying the intent of the corpus data and can understand corpus data with similar semantics.
[0104] By combining the text edit distance similarity algorithm and the text classification model, the efficiency of identifying the intent of the corpus data can be greatly improved while ensuring the accuracy of the identification.
[0105] S104, synchronize the configuration data corresponding to the target version with the highest intent recognition pass rate to the production environment server corresponding to the robot.
[0106] Once the production environment server completes the calculation of the robot's intent recognition rate, it can perform a horizontal comparison of the intent recognition rates of each version and mark the version with the highest intent recognition pass rate as the target version to execute the version backtracking action.
[0107] The step of synchronizing the configuration data corresponding to the target version with the highest intent recognition pass rate to the production environment server corresponding to the robot includes:
[0108] The configuration data of the robot version currently used by the production environment server is marked as offline in the version database, and the configuration data of the target version is marked as online.
[0109] Call the synchronization interface of the production environment server and load the configuration data that is in the online state through the synchronization interface.
[0110] Reference Figure 4 This disclosure also provides a robot version regression management device 400, which includes:
[0111] The test data receiving module 401 is used to receive the corpus data uploaded by the robot and perform preset processing on the corpus data to form a test dataset.
[0112] Version data extraction module 402 is used to extract configuration data corresponding to multiple historical versions of the robot from the version database;
[0113] Calculation module 403 is used to calculate the intent recognition pass rate of configuration data for each historical version in the test dataset;
[0114] The version switching module 404 is used to synchronize the configuration data corresponding to the target version with the highest intent recognition pass rate to the production environment server corresponding to the robot.
[0115] In addition, this disclosure also provides a robot including a processor and a memory, wherein the memory stores a computer program, and the computer program executes the robot version regression management method described in the above embodiments when it is run on the processor.
[0116] This disclosure also provides a computer storage medium storing a computer program, which executes the robot version regression management method described in the above embodiments when run on a processor.
[0117] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, as an alternative implementation, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0118] In addition, the functional modules or units in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0119] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0120] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A robot version regression management method, characterized in that, A development environment server for robot systems, the method comprising: Receive the corpus data uploaded by the robot, and perform preset processing on the corpus data to form a test dataset; Extract configuration data for multiple historical versions of the robot from the version database; Calculate the intent recognition pass rate for each historical version of the configuration data in the test dataset; Synchronize the configuration data corresponding to the target version with the highest intent recognition pass rate to the production environment server corresponding to the robot; The calculation of the intent recognition pass rate for each historical version of the configuration data in the test dataset includes: Calculate the intent recognition results for each intent category in the test data of the historical version's configuration data; The intent recognition pass rate is calculated based on the intent recognition results and the number of intents included in the test dataset; The step of calculating the intent recognition results of the configuration data of the historical version in the test data of each intent category includes: The test dataset is segmented using natural language processing tools to generate test corpus templates corresponding to different intent categories. The similarity between the configuration corpus template and the test corpus template of the same intent category is calculated based on the text edit distance similarity algorithm. The configuration corpus template is the corpus template under all intents in the configuration data of each historical version of the robot. When the similarity is greater than or equal to a preset similarity threshold, the intent of the configured corpus template is determined to include the intent of the test corpus template.
2. The method according to claim 1, characterized in that, The step of performing pre-processing on the corpus data to form a test dataset includes: The corpus data is classified according to preset intent classification rules. The statistically categorized corpus data is used to form a corresponding test dataset, which includes test data for different intent categories.
3. The method according to claim 1, characterized in that, When all the similarities are less than a preset similarity threshold, the method further includes: The corpus data is converted into sentence vectors to obtain test data for the input text classification model; The probability that the test data belongs to the intent of the configuration corpus data is calculated by the text classification model to determine whether the intent of the configuration corpus data includes the intent of the test data. The configuration corpus data is the corpus data under all intents in the configuration data of each historical version of the robot.
4. The method according to claim 1, characterized in that, The storage methods for the configuration data of the robot's historical versions include: The configuration data of the robot's historical versions is objectified and encapsulated based on the functional categories, and all the objectified configuration data is encapsulated into a robot object; The robot object is converted into a JSON string using JSON serialization technology, and the JSON string is stored in the version database.
5. The method according to claim 4, characterized in that, The step of extracting configuration data corresponding to multiple historical versions of the robot from the version database includes: Retrieve a preset number of historical versions of the corresponding robots from the version database; Based on JSON deserialization technology, the JSON data of the corresponding historical versions of the preset number of robots is deserialized into the preset number of robot objects, and the configuration data of the historical versions of the preset number of robots is obtained based on the preset number of robot objects.
6. The method according to claim 1, characterized in that, The step of synchronizing the configuration data corresponding to the target version with the highest intent recognition pass rate to the production environment server corresponding to the robot includes: The configuration data of the robot version currently used by the production environment server is marked as offline in the version database, and the configuration data of the target version is marked as online. Call the synchronization interface of the production environment server and load the configuration data that is in the online state through the synchronization interface.
7. A robot version regression management device, characterized in that, The device includes: The test data receiving module is used to receive the corpus data uploaded by the robot and perform preset processing on the corpus data to form a test dataset; The version data extraction module is used to extract configuration data for multiple historical versions of the robot from the version database; The calculation module is used to calculate the intent recognition pass rate of the configuration data for each historical version in the test dataset; The version switching module is used to synchronize the configuration data corresponding to the target version with the highest intent recognition pass rate to the production environment server corresponding to the robot. The calculation of the intent recognition pass rate for each historical version of the configuration data in the test dataset includes: Calculate the intent recognition results for each intent category in the test data of the historical version's configuration data; The intent recognition pass rate is calculated based on the intent recognition results and the number of intents included in the test dataset; The step of calculating the intent recognition results of the configuration data of the historical version in the test data of each intent category includes: The test dataset is segmented using natural language processing tools to generate test corpus templates corresponding to different intent categories. The similarity between the configuration corpus template and the test corpus template of the same intent category is calculated based on the text edit distance similarity algorithm. The configuration corpus template is the corpus template under all intents in the configuration data of each historical version of the robot. When the similarity is greater than or equal to a preset similarity threshold, the intent of the configured corpus template is determined to include the intent of the test corpus template.
8. A robot, characterized in that, It includes a processor and a memory, the memory storing a computer program that, when executed on the processor, performs the robot version regression management method according to any one of claims 1 to 6.
9. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when run on a processor, executes any one of the robot version regression management methods according to claims 1-6.
Citation Information
Patent Citations
A multi-version parallel development method and system for voice interaction products
CN109710303A
Intention analysis method and device, display terminal and computer readable storage medium
CN109800306A