Semantic parsing method, device and storage medium

By converting sentences into sentence vectors and performing clustering processing in a distributed storage system, the problem of low semantic parsing efficiency in the existing technology is solved, and efficient processing and storage of large-scale text data is achieved.

CN112016330BActive Publication Date: 2024-10-22PINGAN INT SMART CITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010890081.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-28
Publication Date
2024-10-22
Estimated Expiration
2040-08-28

AI Technical Summary

Technical Problem

The existing full-text retrieval framework based on word segmentation cannot recognize semantic searches, and it is difficult for a single machine to support large-scale vector data, resulting in low semantic parsing efficiency.

Method used

By obtaining the text to be processed in the distributed storage system, converting the sentences into sentence vectors, clustering and assigning them to slave nodes for processing, and using preset interfaces for data processing and clustering, the efficiency of semantic analysis is improved.

Benefits of technology

It improves the efficiency of semantic parsing, can process and store large-scale text data more accurately, and improves the processing capabilities of distributed storage systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112016330B_ABST
    Figure CN112016330B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and in particular to a semantic parsing method, device and storage medium, which are applied to the master node of a retrieval distributed storage system, the retrieval distributed storage system includes a master node and P slave nodes, the P is an integer greater than 1, wherein the method includes: obtaining a text to be processed; segmenting the text to be processed to obtain multiple sentences, and converting the multiple sentences into sentence vectors to obtain multiple first sentence vectors; performing data processing on the multiple first sentence vectors through a preset interface to obtain multiple second sentence vectors; clustering the multiple second sentence vectors to obtain Q classes, the Q being an integer greater than 1; assigning the Q classes to corresponding slave nodes, and instructing each slave node to process the second sentence vector of the corresponding class. The use of the embodiments of the present application can improve the efficiency of semantic parsing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a semantic parsing method, device and storage medium. Background Art

[0002] Currently, there are frameworks such as Elasticsearch and slor in the industry for large-scale full-text retrieval, but these frameworks are based on word segmentation and cannot recognize semantic-based searches. For example, when two articles use different words to express the same meaning, it is impossible to retrieve data with a higher matching degree through the framework. However, in the era of big data, a single machine cannot support vector storage of huge amounts of data, so the distributed storage solution for vector data is a huge problem. How to improve the efficiency of semantic analysis needs to be solved urgently. Summary of the invention

[0003] The embodiments of the present application provide a semantic parsing method, device and storage medium, which can improve the efficiency of semantic parsing.

[0004] In a first aspect, an embodiment of the present application provides a semantic parsing method, which is applied to searching a master node of a distributed storage system, wherein the distributed storage system includes one master node and P slave nodes, where P is an integer greater than 1, and the method includes:

[0005] Get the text to be processed;

[0006] Sentence the text to be processed to obtain a plurality of sentences, and convert the plurality of sentences into sentence vectors to obtain a plurality of first sentence vectors;

[0007] Processing the plurality of first sentence vectors through a preset interface to obtain a plurality of second sentence vectors;

[0008] Clustering the plurality of second sentence vectors to obtain Q clusters, where Q is an integer greater than 1;

[0009] The Q classes are assigned to corresponding slave nodes, and each slave node is instructed to process the second sentence vector of the corresponding class.

[0010] In a second aspect, an embodiment of the present application provides a semantic parsing method, which is applied to searching a first slave node of a distributed storage system, wherein the distributed storage system includes a master node and P slave nodes, wherein the first slave node is any slave node of the P slave nodes, and P is an integer greater than 1, and the method includes:

[0011] Receive k classes assigned by the master node, where k is a positive integer, the k classes are obtained by the master node from a text to be processed, the text to be processed is segmented into sentences to obtain a plurality of sentences, and the plurality of sentences are converted into first sentence vectors to obtain a plurality of first sentence vectors, the plurality of first sentence vectors are subjected to data processing through a preset interface to obtain a plurality of second sentence vectors, the plurality of second sentence vectors are clustered to obtain Q classes, and the k classes among the Q classes are assigned to the first slave node, where Q is an integer greater than 1;

[0012] The second sentence vectors corresponding to the k classes are processed.

[0013] In a third aspect, an embodiment of the present application provides a semantic parsing device, which is applied to retrieve a master node of a distributed storage system, the retrieval distributed storage system includes one master node and P slave nodes, where P is an integer greater than 1, and the device includes:

[0014] An acquisition unit, used for acquiring the text to be processed;

[0015] A conversion unit, configured to segment the text to be processed into sentences to obtain a plurality of sentences, and convert the plurality of sentences into sentence vectors to obtain a plurality of first sentence vectors;

[0016] A processing unit, configured to perform data processing on the plurality of first sentence vectors through a preset interface to obtain a plurality of second sentence vectors;

[0017] A clustering unit, used for clustering the plurality of second sentence vectors to obtain Q clusters, where Q is an integer greater than 1;

[0018] The processing unit is also used to assign the Q classes to corresponding slave nodes and instruct each slave node to process the second sentence vector of the corresponding class.

[0019] In a fourth aspect, an embodiment of the present application provides a semantic parsing device, which is applied to retrieve a first slave node of a distributed storage system, wherein the retrieval distributed storage system includes a master node and P slave nodes, wherein the first slave node is any slave node of the P slave nodes, wherein P is an integer greater than 1, and wherein the device includes:

[0020] A receiving unit, configured to receive k classes assigned by the master node, wherein k is a positive integer, wherein the master node obtains a text to be processed, divides the text to be processed into sentences to obtain a plurality of sentences, converts the plurality of sentences into first sentence vectors to obtain a plurality of first sentence vectors, performs data processing on the plurality of first sentence vectors through a preset interface to obtain a plurality of second sentence vectors, clusters the plurality of second sentence vectors to obtain Q classes, and assigns the k classes among the Q classes to the first slave node, wherein Q is an integer greater than 1;

[0021] A processing unit is used to process the second sentence vectors corresponding to the k classes.

[0022] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.

[0023] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the second aspect of the embodiment of the present application.

[0024] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables the computer to execute part or all of the steps described in the first aspect of the embodiment of the present application.

[0025] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the second aspect of the embodiment of the present application.

[0026] In a ninth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0027] In a tenth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the second aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0028] The implementation of the embodiments of the present application has the following beneficial effects:

[0029] It can be seen that the semantic parsing method, device and storage medium described in the embodiments of the present application are applied to the master node of a retrieval distributed storage system, which includes a master node and P slave nodes, where P is an integer greater than 1. The text to be processed is obtained, the text to be processed is segmented into sentences to obtain multiple sentences, and the multiple sentences are converted into sentence vectors to obtain multiple first sentence vectors. The multiple first sentence vectors are subjected to data processing through a preset interface to obtain multiple second sentence vectors. The multiple second sentence vectors are clustered to obtain Q classes, where Q is an integer greater than 1. The Q classes are assigned to corresponding slave nodes, and each slave node is instructed to process the second sentence vector of the corresponding class. The text can be converted into sentences, and the sentences can be converted into sentence vectors and assigned to slave nodes for processing, which helps to improve the efficiency of semantic parsing. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 It is a flowchart of a semantic parsing method provided in an embodiment of the present application;

[0032] Figure 2 It is a flowchart of another semantic parsing method provided in an embodiment of the present application;

[0033] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0034] Figure 4 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application;

[0035] Figure 5A It is a block diagram of the functional units of a semantic parsing device provided in an embodiment of the present application;

[0036] Figure 5BIt is a block diagram of the functional units of another semantic parsing device provided in an embodiment of the present application;

[0037] Figure 6 It is a block diagram of the functional units of another semantic parsing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0039] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0040] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0041] The electronic devices involved in the embodiments of the present application may include various handheld devices with wireless communication functions, desktops, vehicle-mounted devices, wearable devices (smart watches, smart bracelets, wireless headphones, augmented reality / virtual reality devices, smart glasses), computing devices or other processing devices connected to wireless modems, and various forms of user equipment (UE), mobile stations (MS), terminal devices, etc. For the convenience of description, the above-mentioned devices are collectively referred to as electronic devices.

[0042] The following is a detailed description of the embodiments of the present application.

[0043] See also Figure 1 , Figure 1: is a flow chart of a semantic parsing method provided by an embodiment of the present application, the method is applied to retrieve a master node of a distributed storage system, the retrieval distributed storage system includes a master node and P slave nodes, the P is an integer greater than 1, as shown in the figure, the semantic parsing method includes:

[0044] 101. Get the text to be processed.

[0045] In the embodiments of the present application, the text to be processed can be understood as referring to the expression form of written language, for example, usually a sentence or a combination of multiple sentences with a complete and systematic meaning (Message). A text can be a sentence (Sentence), a paragraph (Paragraph) or a chapter (Discourse). Specifically, the text to be processed can be at least one of the following: a text file, a word file, a PDF file, etc., which are not limited here. Of course, the text to be processed can also be the text obtained by identifying the content in the picture using character recognition technology.

[0046] Among them, the embodiment of the present application is applied to the master node of the retrieval distributed storage system, and the retrieval distributed storage system includes a master node (master) and P slave nodes (slave), where P is an integer greater than 1. The master node and each slave node can be independent electronic devices. The master node can obtain the text to be processed, and the text to be processed can be one or more texts. Specifically, the master node may include a master node process, which is mainly responsible for the management and information synchronization of the entire distributed cluster, storage data splitting records, clustering models, and the process is responsible for synchronously distributing the splitting model to the process of the slave node.

[0047] 102. Segment the text to be processed to obtain a plurality of sentences, and convert the plurality of sentences into sentence vectors to obtain a plurality of first sentence vectors.

[0048] Among them, the main node can use preset rules to segment the text to be processed to obtain multiple sentences. The preset rules can be set by the user or by the system default. For example, the sentence segmentation is performed according to the specified symbols. The specified symbols can be at least one of the following: period, question mark, exclamation mark, semicolon, etc., which are not limited here. Furthermore, the main node can convert each of the multiple sentences into a sentence vector. Since the semantics is based on the granularity of the sentence level, the sentences in the text to be processed are converted into multiple first sentence vectors through the language model (Word2Vec, Bert, etc.).

[0049] Optionally, the above step 102, dividing the text to be processed into sentences to obtain multiple sentences, may include the following steps:

[0050] 21. Search the text to be processed to obtain multiple target keywords;

[0051] 22. Divide the text to be processed into sentences according to the multiple target keywords to obtain the multiple sentences.

[0052] In the embodiment of the present application, the target keyword can be set by the user or by the system default, for example, it can be at least one of the following: a period, a question mark, an exclamation mark, a semicolon, a page break, a paragraph break, etc., which are not limited here. The main node can search the text to be processed to obtain multiple target keywords, and then, the text to be processed can be divided into sentences according to the multiple target keywords to obtain multiple sentences. For example, the content between two keywords can be regarded as a sentence.

[0053] 103. Perform data processing on the multiple first sentence vectors through a preset interface to obtain multiple second sentence vectors.

[0054] Among them, the preset interface can be set by the user or by the system default, the preset interface can be a restful interface, and the preset interface can correspond to different resource identifiers, and different resource identifiers are used to implement different data processing operations. Data processing may include addition, deletion, modification and query, which may be at least one of the following: data addition, data deletion (such as data screening, data deduplication), data modification, data search, etc., which are not limited here. The retrieval distributed storage system may include at least one preset interface, and data filtering can be implemented through the preset interface.

[0055] Optionally, the above step 103, performing data processing on the multiple first sentence vectors through a preset interface to obtain multiple second sentence vectors, may include the following steps:

[0056] 31. Obtain a target resource identifier of the preset interface;

[0057] 32. Determine the target processing parameter corresponding to the target resource identifier according to the preset mapping relationship between the resource identifier and the processing parameter;

[0058] 33. Perform data processing on the multiple first sentence vectors through the preset interface with the target processing parameters to obtain multiple second sentence vectors.

[0059] Among them, in the embodiment of the present application, the processing parameter may be at least one of the following: a new addition indication parameter, a deletion indication parameter, a modification indication parameter, a search indication parameter, a priority parameter, etc., which are not limited here. The new addition indication parameter may include at least one of the following parameters: a new addition position, a new addition quantity, a new addition storage area, etc., which are not limited here. The deletion indication parameter may be at least one of the following: a deletion data type, a deletion data amount, a deletion data location, etc., which are not limited here. The modification indication parameter may be at least one of the following: a modification position, a modification quantity, a modification method, etc., which are not limited here. The search indication parameter may be at least one of the following: a search range, a search time, a search location, a search keyword, etc., which are not limited here.

[0060] In a specific implementation, the mapping relationship between the preset resource identifier and the processing parameters can be stored in the master node, and the master node can obtain the target resource identifier of the preset interface, and then, according to the mapping relationship between the preset resource identifier and the processing parameters, determine the target processing parameters corresponding to the target resource identifier, and process multiple first sentence vectors through the preset interface with the target processing parameters to obtain multiple second sentence vectors. In this way, the corresponding data processing operations can be performed according to the resource identifier of the preset interface to achieve optimized processing of the data.

[0061] 104. Cluster the multiple second sentence vectors to obtain Q clusters, where Q is an integer greater than 1.

[0062] In a specific implementation, the master node may use a clustering algorithm to perform clustering operations on the multiple second sentence vectors to obtain Q clusters, where Q is an integer greater than 1. The clustering algorithm may be at least one of the following: K-MEANS clustering algorithm, mean shift clustering algorithm, DBSCAN clustering algorithm, expectation maximization (EM) clustering using Gaussian mixture model (GMM), hierarchical clustering algorithm, synthetic clustering, etc., which are not limited here.

[0063] The number of clustered classes can be determined by the number of slave nodes. The more slave nodes there are, the more clustered classes there are. Conversely, the fewer slave nodes there are, the fewer clustered classes there are.

[0064] 105. Allocate the Q classes to corresponding slave nodes, and instruct each slave node to process the second sentence vector of the corresponding class.

[0065] In a specific implementation, the master node can assign Q classes to corresponding slave nodes. Specifically, the master node can assign Q classes to some or all of the P slave nodes. Each slave node can correspond to at least one of the Q classes, and instruct each slave node to process the second sentence vector of the corresponding class. In this way, semantic parsing can be achieved by multiple slave nodes to improve data processing efficiency. The slave node can be used as a data storage node. Taking the clustering algorithm K-means as an example, all second sentence vectors are clustered using the K-means clustering model. The number of clustering clusters is controlled by the K-means algorithm parameters, and then the number of each cluster is used to determine whether to continue splitting.

[0066] Optionally, after the above step 105, the following steps may also be included:

[0067] A1. When the amount of data of the first slave node exceeds a preset number, W slave nodes among the P slave nodes are triggered to split to obtain A new slave nodes, and then the second sentence vectors of the classes corresponding to the W slave nodes are clustered to obtain B classes, where W is a positive integer less than or equal to P, A is a positive integer, and B is a positive integer greater than or equal to W;

[0068] A2. The B classes are preferentially assigned to the W slave nodes, and each of the W slave nodes is instructed to process the second sentence vector in the corresponding class, and the redundant classes in the B classes are assigned to at least one new slave node among the A new slave nodes, and each of the at least one new slave node is instructed to process the second sentence vector in the corresponding class.

[0069] The above preset number can be set by the user or by system default.

[0070] In a specific implementation, the first slave node is any slave node among P slave nodes. When the amount of data in the first slave node exceeds a preset number, the electronic device can trigger W slave nodes among the P slave nodes to split, obtain A new slave nodes, and then cluster the second sentence vectors of the classes corresponding to the W slave nodes. The specific clustering algorithm can refer to the above description to obtain B classes, W is a positive integer less than or equal to P, A is a positive integer, and B is a positive integer greater than or equal to W. The B classes are preferentially assigned to the W slave nodes, and each of the W slave nodes is instructed to process the second sentence vector in the corresponding class, and the redundant classes in the B classes are assigned to at least one new slave node among the A new slave nodes, and each of the at least one new slave node is instructed to process the second sentence vector in the corresponding class. In this way, the efficiency of semantic parsing can be improved.

[0071] In the specific implementation, the data of each cluster can be stored on the slave node. The stored data of the slave node is divided into different clusters through the clustering model and then stored. When the amount of data in a cluster exceeds its corresponding threshold, it triggers the split of some slave nodes. For example, if the number of clusters of a slave node exceeds the threshold, the split is triggered. If the split data is not 2, the data of the cluster can be clustered and evenly distributed to 2 new slave nodes according to the number of clusters and clusters. The new slave node can build its own clustering model according to the allocated data. The clustering model K is the default value and can be manually adjusted later. For example, the slave node can split a cluster with a large amount of data on the current slave node, and then cluster it through the clustering model. The data is divided into K clusters through the model parameter k, and then the K clusters are evenly distributed to N newly created slave nodes according to the amount of data.

[0072] Optionally, each slave node may correspond to a clustering model and corresponding model parameters. The model parameters may be adjusted according to clustering accuracy and clustering efficiency. The model parameters may be at least one of the following: cluster radius, number of clusters, etc., which are not limited here.

[0073] Optionally, when the data on a slave node exceeds the limit, a split will be triggered, and the data will be split again, where: the parameters of the clustering model on each node can be adjusted individually to control the distribution of cluster data. The number of clusters triggering the split threshold is an adjustable parameter that controls the number of clusters. For example, the adjustable parameter can be set to 0.05 by default. Then, according to the amount of data in each cluster node and cluster, it needs to be adjusted according to the actual data. For example, if the amount of data in the cluster is too small, it will lead to many clusters. You can increase S, which will increase the amount of data in each cluster and reduce the number of clusters. On the contrary, it will reduce the amount of data in the cluster and increase the number of clusters.

[0074] For example, if you use a vector data to search for a similar vector in 1 million data, ordinary brute force search requires 1 million calculations. If this solution is used, assuming that this solution evenly distributes 1 million data on 10 slave nodes, each slave node has 100 clusters, and each cluster has 1000 data. During retrieval, the clustering model is first indexed to a slave node, and a cluster is calculated once in the slave node to index to a specific cluster. Then, the 1000 data in the cluster are calculated 1000 times to find the most similar one.

[0075] Optionally, the number of slave node splits may be an adjustable parameter, which may be used to adjust the speed of controlling cluster splits and the number of slave nodes.

[0076] Optionally, before the above step 101, the following steps may be included:

[0077] B1, obtain the target iris image;

[0078] B2. determining a target image quality evaluation value of the target iris image;

[0079] B3. When the target image quality evaluation value is greater than a preset threshold, matching the target iris image with a preset iris template;

[0080] B4. When the target iris image matches the preset iris template successfully, execute step 101.

[0081] The preset threshold can be set by the user or by the system default. A target iris image can be obtained, and at least one image quality evaluation parameter is used to evaluate the image quality of the target iris image to obtain a target image quality evaluation value. The image quality evaluation index can be at least one of the following: clarity, edge preservation, information entropy, mean square error, etc., which are not limited here.

[0082] Furthermore, when the target image quality evaluation value is greater than a preset threshold, the target iris image can be matched with a preset iris template, and when the target iris image successfully matches the preset iris template, step 101 is executed. When the target image quality evaluation value is less than the preset threshold, image enhancement processing is performed on the target iris image, and the target iris image after image enhancement processing is matched with the preset iris template. If the match is successful, step 101 is executed, otherwise, iris authentication is performed again.

[0083] Furthermore, the above step B2, determining the target image quality evaluation value of the target iris image, may include the following steps:

[0084] B21, performing multi-scale feature decomposition on the target iris image to obtain low-frequency feature components and high-frequency feature components;

[0085] B22, dividing the low-frequency characteristic component into a plurality of regions;

[0086] B23, determining the information entropy corresponding to each of the multiple regions to obtain multiple information entropies;

[0087] B24, determining an average information entropy and a target mean square error according to the multiple information entropies;

[0088] B25, determining a target adjustment coefficient corresponding to the target mean square error;

[0089] B26. Adjust the average information entropy according to the target adjustment coefficient to obtain target information entropy;

[0090] B27. Determine a first evaluation value corresponding to the target information entropy according to a preset mapping relationship between information entropy and evaluation value;

[0091] B28, obtaining target shooting parameters corresponding to the target iris image;

[0092] B29, determining a target low-frequency weight corresponding to the target shooting parameter according to a preset mapping relationship between the shooting parameter and the low-frequency weight, and determining a target high-frequency weight according to the target low-frequency weight;

[0093] B30, determining the target feature point distribution density according to the high-frequency feature components;

[0094] B31. Determine a second evaluation value corresponding to the target feature point distribution density according to a preset mapping relationship between the feature point distribution density and the evaluation value;

[0095] B32. Perform a weighted operation according to the first evaluation value, the second evaluation value, the target low-frequency weight, and the target high-frequency weight to obtain a target image quality evaluation value of the target iris image.

[0096] In a specific implementation, the electronic device can use a multi-scale decomposition algorithm to perform multi-scale feature decomposition on the target iris image to obtain low-frequency feature components and high-frequency feature components. The multi-scale decomposition algorithm can be at least one of the following: pyramid transform algorithm, wavelet transform, contourlet transform, shearlet transform, etc., which are not limited here. Further, the low-frequency feature component can be divided into multiple regions, and the area size of each region is the same or different. The low-frequency feature component reflects the main features of the image, and the high-frequency feature component reflects the detailed information of the image.

[0097] Furthermore, the electronic device can determine the information entropy corresponding to each of the multiple regions, obtain multiple information entropies, and determine the average information entropy and the target mean square error based on the multiple information entropies. The information entropy reflects the amount of image information to a certain extent, and the mean square error can reflect the stability of the image information. The electronic device can pre-store a mapping relationship between a preset mean square error and an adjustment coefficient, and then, the target adjustment coefficient corresponding to the target mean square error can be determined based on the mapping relationship. In the embodiment of the present application, the value range of the adjustment coefficient can be -0.15 to 0.15.

[0098] Furthermore, the electronic device may adjust the average information entropy according to the target adjustment coefficient to obtain the target information entropy, where target information entropy = (1 + target adjustment coefficient) * average information entropy. The electronic device may pre-store a mapping relationship between a preset information entropy and an evaluation value, and further, may determine a first evaluation value corresponding to the target information entropy according to the mapping relationship between the preset information entropy and the evaluation value.

[0099] In addition, the electronic device can obtain the target shooting parameters corresponding to the target iris image, and the target shooting parameters can be at least one of the following: ISO, exposure time, white balance parameter, focus parameter, etc., which are not limited here. The electronic device can also pre-store the mapping relationship between the preset shooting parameters and the low-frequency weights, and then, according to the mapping relationship between the preset shooting parameters and the low-frequency weights, the target low-frequency weights corresponding to the target shooting parameters can be determined, and the target high-frequency weights can be determined based on the target low-frequency weights, and the target low-frequency weights + target high-frequency weights = 1.

[0100] Furthermore, the electronic device can determine the target feature point distribution density based on the high-frequency feature component, and the target feature point distribution density = the total number of feature points of the high-frequency feature component / the area of ​​the region. The electronic device can also pre-store a mapping relationship between a preset feature point distribution density and an evaluation value, and then, according to the mapping relationship between the preset feature point distribution density and the evaluation value, determine the second evaluation value corresponding to the target feature point distribution density, and finally, perform a weighted operation based on the first evaluation value, the second evaluation value, the target low-frequency weight and the target high-frequency weight to obtain the target image quality evaluation value of the target iris image, as follows:

[0101] Target image quality evaluation value = first evaluation value * target low frequency weight + second evaluation value * target high frequency weight

[0102] In this way, image quality evaluation can be performed based on the two dimensions of low-frequency component and high-frequency component of the iris image, and evaluation parameters suitable for the shooting environment, that is, the target image quality evaluation value, can be accurately obtained.

[0103] It can be seen that the semantic parsing method described in the embodiment of the present application is applied to the master node of a retrieval distributed storage system, which includes a master node and P slave nodes, where P is an integer greater than 1. The text to be processed is obtained, the text to be processed is segmented into sentences to obtain multiple sentences, and the multiple sentences are converted into sentence vectors to obtain multiple first sentence vectors. The multiple first sentence vectors are subjected to data processing through a preset interface to obtain multiple second sentence vectors. The multiple second sentence vectors are clustered to obtain Q classes, where Q is an integer greater than 1. The Q classes are assigned to corresponding slave nodes, and each slave node is instructed to process the second sentence vector of the corresponding class. The text can be converted into sentences, and the sentences can be converted into sentence vectors and assigned to slave nodes for processing, which helps to improve the efficiency of semantic parsing.

[0104] See also Figure 2 , Figure 2: is a flow chart of a semantic parsing method provided by an embodiment of the present application, the method is applied to retrieve a master node of a distributed storage system, the retrieval distributed storage system includes a master node and P slave nodes, the P is an integer greater than 1, as shown in the figure, the semantic parsing method includes:

[0105] 201. Receive k classes assigned by the master node, where k is a positive integer. The master node obtains a text to be processed, divides the text to be processed into sentences to obtain a plurality of sentences, and converts the plurality of sentences into first sentence vectors to obtain a plurality of first sentence vectors. The plurality of first sentence vectors are subjected to data processing through a preset interface to obtain a plurality of second sentence vectors. The plurality of second sentence vectors are clustered to obtain Q classes. The k classes among the Q classes are assigned to the first slave node, where Q is an integer greater than 1.

[0106] 202. Process the second sentence vectors corresponding to the k classes.

[0107] The specific description of the above steps 201 to 202 can refer to the above Figure 1 The corresponding steps described are not repeated here.

[0108] It can be seen that the semantic parsing method described in the embodiment of the present application can convert text into sentences by the master node, and convert sentences into sentence vectors, which are assigned to slave nodes and then processed by the slave nodes, which helps to improve the efficiency of semantic parsing.

[0109] In accordance with the above embodiment, please refer to Figure 3 , Figure 3 : is a structural schematic diagram of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device includes a processor, a memory, a communication interface and one or more programs. The one or more programs are stored in the memory and are configured to be executed by the processor. The electronic device can have the function of a master node. The electronic device can include a master node for retrieving a distributed storage system. The distributed storage system includes one master node and P slave nodes, where P is an integer greater than 1. In the embodiment of the present application, the program includes instructions for executing the following steps:

[0110] Get the text to be processed;

[0111] Sentence the text to be processed to obtain a plurality of sentences, and convert the plurality of sentences into sentence vectors to obtain a plurality of first sentence vectors;

[0112] Processing the plurality of first sentence vectors through a preset interface to obtain a plurality of second sentence vectors;

[0113] Clustering the plurality of second sentence vectors to obtain Q clusters, where Q is an integer greater than 1;

[0114] The Q classes are assigned to corresponding slave nodes, and each slave node is instructed to process the second sentence vector of the corresponding class.

[0115] Optionally, the program further includes instructions for executing the following steps:

[0116] When the amount of data of the first slave node exceeds a preset number, W slave nodes among the P slave nodes are triggered to split to obtain A new slave nodes, and then the second sentence vectors of the classes corresponding to the W slave nodes are clustered to obtain B classes, where W is a positive integer less than or equal to P, A is a positive integer, and B is a positive integer greater than or equal to W;

[0117] The B classes are preferentially assigned to the W slave nodes, and each of the W slave nodes is instructed to process the second sentence vector in the corresponding class; and the redundant classes in the B classes are assigned to at least one new slave node among the A new slave nodes, and each of the at least one new slave node is instructed to process the second sentence vector in the corresponding class.

[0118] Optionally, in the aspect of performing data processing on the plurality of first sentence vectors through a preset interface to obtain a plurality of second sentence vectors, the program further includes instructions for executing the following steps:

[0119] Obtaining a target resource identifier of the preset interface;

[0120] Determine the target processing parameter corresponding to the target resource identifier according to the preset mapping relationship between the resource identifier and the processing parameter;

[0121] The plurality of first sentence vectors are processed with the target processing parameters through the preset interface to obtain a plurality of second sentence vectors.

[0122] Optionally, in the aspect of segmenting the text to be processed into sentences to obtain a plurality of sentences, the program includes instructions for executing the following steps:

[0123] Searching the text to be processed to obtain multiple target keywords;

[0124] The text to be processed is divided into sentences according to the multiple target keywords to obtain the multiple sentences.

[0125] Optionally, the program further includes instructions for executing the following steps:

[0126] Acquire target iris image;

[0127] Determining a target image quality evaluation value of the target iris image;

[0128] When the target image quality evaluation value is greater than a preset threshold, matching the target iris image with a preset iris template;

[0129] When the target iris image matches the preset iris template successfully, the step of acquiring the text to be processed is performed.

[0130] Optionally, in determining the target image quality evaluation value of the target iris image, the program includes instructions for performing the following steps:

[0131] Performing multi-scale feature decomposition on the target iris image to obtain low-frequency feature components and high-frequency feature components;

[0132] Dividing the low-frequency characteristic component into a plurality of regions;

[0133] Determine the information entropy corresponding to each of the multiple regions to obtain multiple information entropies;

[0134] Determining an average information entropy and a target mean square error according to the multiple information entropies;

[0135] Determine a target adjustment coefficient corresponding to the target mean square error;

[0136] The average information entropy is adjusted according to the target adjustment coefficient to obtain a target information entropy;

[0137] Determine a first evaluation value corresponding to the target information entropy according to a preset mapping relationship between information entropy and evaluation value;

[0138] Obtaining target shooting parameters corresponding to the target iris image;

[0139] According to a preset mapping relationship between the shooting parameters and the low-frequency weights, a target low-frequency weight corresponding to the target shooting parameters is determined, and a target high-frequency weight is determined according to the target low-frequency weight;

[0140] Determining the distribution density of target feature points according to the high-frequency feature components;

[0141] Determine a second evaluation value corresponding to the target feature point distribution density according to a preset mapping relationship between the feature point distribution density and the evaluation value;

[0142] A weighted operation is performed according to the first evaluation value, the second evaluation value, the target low-frequency weight, and the target high-frequency weight to obtain a target image quality evaluation value of the target iris image.

[0143] In accordance with the above embodiment, please refer to Figure 4, Figure 4 : is a structural schematic diagram of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device includes a processor, a memory, a communication interface and one or more programs. The one or more programs are stored in the memory and are configured to be executed by the processor. The electronic device can have the function of a slave node. The electronic device can include a first slave node for retrieving a distributed storage system. The distributed storage system includes a master node and P slave nodes. The first slave node is any slave node among the P slave nodes. P is an integer greater than 1. In the embodiment of the present application, the program includes instructions for executing the following steps:

[0144] Receive k classes assigned by the master node, where k is a positive integer, the k classes are obtained by the master node from a text to be processed, the text to be processed is segmented into sentences to obtain a plurality of sentences, and the plurality of sentences are converted into first sentence vectors to obtain a plurality of first sentence vectors, the plurality of first sentence vectors are subjected to data processing through a preset interface to obtain a plurality of second sentence vectors, the plurality of second sentence vectors are clustered to obtain Q classes, and the k classes among the Q classes are assigned to the first slave node, where Q is an integer greater than 1;

[0145] The second sentence vectors corresponding to the k classes are processed.

[0146] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0147] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0148] Figure 5A1 is a functional unit block diagram of a semantic parsing device 500 involved in an embodiment of the present application. The semantic parsing device 500 is applied to retrieve a master node of a distributed storage system, the retrieval distributed storage system includes one master node and P slave nodes, where P is an integer greater than 1, and the device 500 includes:

[0149] An acquisition unit 501 is used to acquire a text to be processed;

[0150] A conversion unit 502 is used to divide the text to be processed into sentences to obtain a plurality of sentences, and convert the plurality of sentences into sentence vectors to obtain a plurality of first sentence vectors;

[0151] A processing unit 503 is used to perform data processing on the multiple first sentence vectors through a preset interface to obtain multiple second sentence vectors;

[0152] A clustering unit 504 is used to cluster the plurality of second sentence vectors to obtain Q clusters, where Q is an integer greater than 1;

[0153] The processing unit 503 is further used to assign the Q classes to corresponding slave nodes, and instruct each slave node to process the second sentence vector of the corresponding class.

[0154] Optionally, the processing unit 503 is specifically configured to:

[0155] When the amount of data of the first slave node exceeds a preset number, W slave nodes among the P slave nodes are triggered to split to obtain A new slave nodes, and then the second sentence vectors of the classes corresponding to the W slave nodes are clustered to obtain B classes, where W is a positive integer less than or equal to P, A is a positive integer, and B is a positive integer greater than or equal to W;

[0156] The B classes are preferentially assigned to the W slave nodes, and each of the W slave nodes is instructed to process the second sentence vector in the corresponding class; and the redundant classes in the B classes are assigned to at least one new slave node among the A new slave nodes, and each of the at least one new slave node is instructed to process the second sentence vector in the corresponding class.

[0157] Optionally, in the aspect of performing data processing on the plurality of first sentence vectors through a preset interface to obtain a plurality of second sentence vectors, the processing unit 503 is specifically configured to:

[0158] Obtaining a target resource identifier of the preset interface;

[0159] Determine the target processing parameter corresponding to the target resource identifier according to the preset mapping relationship between the resource identifier and the processing parameter;

[0160] The plurality of first sentence vectors are processed with the target processing parameters through the preset interface to obtain a plurality of second sentence vectors.

[0161] Optionally, in the aspect of segmenting the text to be processed into sentences to obtain a plurality of sentences, the conversion unit 502 is specifically used for:

[0162] Searching the text to be processed to obtain multiple target keywords;

[0163] The text to be processed is divided into sentences according to the multiple target keywords to obtain the multiple sentences.

[0164] Alternatively, if Figure 5B As shown, Figure 5B for Figure 5A Another variant structure of the semantic parsing device shown in Figure 5A In comparison, a determination unit 505 and a matching unit 506 may also be included, as follows:

[0165] The acquisition unit 501 is also used to acquire a target iris image;

[0166] The determining unit 505 is further configured to determine a target image quality evaluation value of the target iris image;

[0167] The matching unit 506 is further configured to match the target iris image with a preset iris template when the target image quality evaluation value is greater than a preset threshold;

[0168] The acquisition unit 501 executes the step of acquiring the text to be processed when the target iris image matches the preset iris template successfully.

[0169] Optionally, in determining the target image quality evaluation value of the target iris image, the determining unit 505 is specifically configured to:

[0170] Performing multi-scale feature decomposition on the target iris image to obtain low-frequency feature components and high-frequency feature components;

[0171] Dividing the low-frequency characteristic component into a plurality of regions;

[0172] Determine the information entropy corresponding to each of the multiple regions to obtain multiple information entropies;

[0173] Determining an average information entropy and a target mean square error according to the multiple information entropies;

[0174] Determine a target adjustment coefficient corresponding to the target mean square error;

[0175] The average information entropy is adjusted according to the target adjustment coefficient to obtain a target information entropy;

[0176] Determine a first evaluation value corresponding to the target information entropy according to a preset mapping relationship between information entropy and evaluation value;

[0177] Obtaining target shooting parameters corresponding to the target iris image;

[0178] According to a preset mapping relationship between the shooting parameters and the low-frequency weights, a target low-frequency weight corresponding to the target shooting parameters is determined, and a target high-frequency weight is determined according to the target low-frequency weight;

[0179] Determining the distribution density of target feature points according to the high-frequency feature components;

[0180] Determine a second evaluation value corresponding to the target feature point distribution density according to a preset mapping relationship between the feature point distribution density and the evaluation value;

[0181] A weighted operation is performed according to the first evaluation value, the second evaluation value, the target low-frequency weight, and the target high-frequency weight to obtain a target image quality evaluation value of the target iris image.

[0182] It can be understood that the functions of each program module of the semantic parsing device of this embodiment can be specifically implemented according to the method in the above method embodiment, and its specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.

[0183] Figure 6 6 is a functional unit composition block diagram of a semantic parsing device 600 involved in an embodiment of the present application. The semantic parsing device 600 is applied to retrieve a first slave node of a distributed storage system, the retrieval distributed storage system includes a master node and P slave nodes, the first slave node is any slave node of the P slave nodes, the P is an integer greater than 1, and the device 600 includes:

[0184] The receiving unit 601 is used to receive k classes assigned by the master node, where k is a positive integer. The master node obtains a text to be processed, divides the text to be processed into sentences to obtain a plurality of sentences, converts the plurality of sentences into first sentence vectors to obtain a plurality of first sentence vectors, performs data processing on the plurality of first sentence vectors through a preset interface to obtain a plurality of second sentence vectors, clusters the plurality of second sentence vectors to obtain Q classes, and assigns the k classes among the Q classes to the first slave node, where Q is an integer greater than 1.

[0185] The processing unit 602 is used to process the second sentence vectors corresponding to the k classes.

[0186] It can be understood that the functions of each program module of the semantic parsing device of this embodiment can be specifically implemented according to the method in the above method embodiment, and its specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.

[0187] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.

[0188] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.

[0189] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0190] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0191] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0192] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0193] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0194] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0195] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.

[0196] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A semantic parsing method, characterized in that: The method is applied to retrieve a master node of a distributed storage system, the distributed storage system comprising one master node and P slave nodes, where P is an integer greater than 1, and comprises: Get the text to be processed; Sentence the text to be processed to obtain a plurality of sentences, and convert the plurality of sentences into sentence vectors to obtain a plurality of first sentence vectors; Processing the plurality of first sentence vectors through a preset interface to obtain a plurality of second sentence vectors; Clustering the plurality of second sentence vectors to obtain Q clusters, where Q is an integer greater than 1; Allocating the Q classes to corresponding slave nodes, and instructing each slave node to process the second sentence vector of the corresponding class; When the amount of data of the first slave node exceeds a preset number, W slave nodes among the P slave nodes are triggered to split to obtain A new slave nodes, and then the second sentence vectors of the classes corresponding to the W slave nodes are clustered to obtain B classes, where W is a positive integer less than or equal to P, A is a positive integer, and B is a positive integer greater than or equal to W; The B classes are preferentially assigned to the W slave nodes, and each of the W slave nodes is instructed to process the second sentence vector in the corresponding class; and the redundant classes in the B classes are assigned to at least one new slave node among the A new slave nodes, and each of the at least one new slave node is instructed to process the second sentence vector in the corresponding class.

2. The method according to claim 1, characterized in that The step of processing the plurality of first sentence vectors through a preset interface to obtain a plurality of second sentence vectors includes: Obtaining a target resource identifier of the preset interface; Determine the target processing parameter corresponding to the target resource identifier according to the preset mapping relationship between the resource identifier and the processing parameter; The plurality of first sentence vectors are processed with the target processing parameters through the preset interface to obtain a plurality of second sentence vectors.

3. The method according to claim 1, characterized in that The text to be processed is divided into sentences to obtain a plurality of sentences, including: Searching the text to be processed to obtain multiple target keywords; The text to be processed is divided into sentences according to the multiple target keywords to obtain the multiple sentences.

4. The method according to claim 1, characterized in that The method further comprises: Acquire target iris image; Determining a target image quality evaluation value of the target iris image; When the target image quality evaluation value is greater than a preset threshold, matching the target iris image with a preset iris template; When the target iris image matches the preset iris template successfully, the step of acquiring the text to be processed is performed.

5. The method according to claim 4, characterized in that The step of determining a target image quality evaluation value of the target iris image comprises: Performing multi-scale feature decomposition on the target iris image to obtain low-frequency feature components and high-frequency feature components; Dividing the low-frequency characteristic component into a plurality of regions; Determine the information entropy corresponding to each of the multiple regions to obtain multiple information entropies; Determining an average information entropy and a target mean square error according to the multiple information entropies; Determine a target adjustment coefficient corresponding to the target mean square error; The average information entropy is adjusted according to the target adjustment coefficient to obtain a target information entropy; Determine a first evaluation value corresponding to the target information entropy according to a preset mapping relationship between information entropy and evaluation value; Obtaining target shooting parameters corresponding to the target iris image; According to a preset mapping relationship between the shooting parameters and the low-frequency weights, a target low-frequency weight corresponding to the target shooting parameters is determined, and a target high-frequency weight is determined according to the target low-frequency weight; Determining the distribution density of target feature points according to the high-frequency feature components; Determine a second evaluation value corresponding to the target feature point distribution density according to a preset mapping relationship between the feature point distribution density and the evaluation value; A weighted operation is performed according to the first evaluation value, the second evaluation value, the target low-frequency weight, and the target high-frequency weight to obtain a target image quality evaluation value of the target iris image.

6. A semantic analysis device, characterized in that: The device is applied to retrieve a master node of a distributed storage system, the distributed storage system comprising one master node and P slave nodes, where P is an integer greater than 1, and comprises: An acquisition unit, used for acquiring the text to be processed; A conversion unit, configured to segment the text to be processed into sentences to obtain a plurality of sentences, and convert the plurality of sentences into sentence vectors to obtain a plurality of first sentence vectors; A processing unit, configured to perform data processing on the plurality of first sentence vectors through a preset interface to obtain a plurality of second sentence vectors; A clustering unit, used for clustering the plurality of second sentence vectors to obtain Q clusters, where Q is an integer greater than 1; The processing unit is further used to assign the Q classes to corresponding slave nodes, and instruct each slave node to process the second sentence vector of the corresponding class; The processing unit is further configured to trigger W slave nodes among the P slave nodes to split when the amount of data of the first slave node exceeds a preset amount to obtain A new slave nodes, and then cluster the second sentence vectors of the classes corresponding to the W slave nodes to obtain B classes, where W is a positive integer less than or equal to P, A is a positive integer, and B is a positive integer greater than or equal to W; The B classes are preferentially assigned to the W slave nodes, and each of the W slave nodes is instructed to process the second sentence vector in the corresponding class; and the redundant classes in the B classes are assigned to at least one new slave node among the A new slave nodes, and each of the at least one new slave node is instructed to process the second sentence vector in the corresponding class.

7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the program comprises instructions for executing the steps in the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.