Fault knowledge text extraction method and extraction device, equipment and medium
By using a fault knowledge extraction module to predict and interact with guest entities, and by leveraging an Encoder-Decoder network structure and feature extraction, the problem of difficulty in extracting guest entities in existing technologies is solved, thereby improving the accuracy and completeness of fault knowledge text extraction.
Patent Information
- Application Number
- CN202211282701.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-10-19
AI Technical Summary
Existing knowledge extraction schemes struggle to effectively extract object entities from product description texts, resulting in poor fault knowledge extraction performance.
A fault knowledge extraction module is used for subject-object entity prediction. The prediction is performed through an Encoder-Decoder network structure. Combined with knowledge labeling and feature extraction networks, interactive prediction and feedback of subject-object entities are realized, thereby improving the completeness of entity extraction.
It significantly improves the extraction effect of fault knowledge, enhances the extraction accuracy and completeness of subject and object entities, and strengthens the ability to construct fault knowledge text.
Smart Images

Figure CN115630699B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a fault knowledge text extraction method and device, equipment and medium. BACKGROUND
[0002] It is known that knowledge extraction technology has been applied in various fields, such as smart medical care, education, various C-end consumer products, etc., to form a knowledge base of the field. For example, in the process of product use, it is necessary to extract and construct the fault-related knowledge in the product instructions, so as to help maintenance personnel and users realize intelligent maintenance and fault self-checking.
[0003] Most of the existing knowledge extraction schemes rely on deep learning methods to solve the problem. However, since the main entity usually appears frequently in the product instructions, but the guest entity is usually sparse, it is difficult to completely extract the guest entity, and the guest entity is particularly important for fault knowledge extraction. Therefore, how to improve the extraction effect of fault knowledge has become a problem to be solved. SUMMARY
[0004] The technical problem solved by the present application is to provide a fault knowledge text extraction method and device, equipment and medium, which can improve the extraction effect of fault knowledge.
[0005] To solve the above technical problem, the first aspect of the present application provides a fault knowledge text extraction method, comprising: sequentially performing main-guest entity prediction on the product instruction text to obtain the main entity first prediction result and the guest entity first prediction result, and sequentially performing guest-main entity prediction on the product instruction text to obtain the guest entity second prediction result and the main entity second prediction result; extracting the fault main entity in the product instruction text based on the main entity first prediction result and the main entity second prediction result, and extracting the fault guest entity in the product instruction text based on the guest entity first prediction result and the guest entity second prediction result; constructing the fault knowledge text based on the fault main entity and the fault guest entity; wherein the main-guest entity prediction and the guest-main entity prediction are realized by a fault knowledge extraction module.
[0006] To solve the above technical problems, the second aspect of the present application provides a fault knowledge text extraction device, comprising: a prediction module, an extraction module and a construction module, the prediction module is used for sequentially performing main entity prediction and guest entity prediction on the product description text to obtain main entity first prediction result and guest entity first prediction result, and sequentially performing guest entity prediction and main entity prediction on the product description text to obtain guest entity second prediction result and main entity second prediction result; the extraction module is used for extracting fault main entity in the product description text based on the main entity first prediction result and the main entity second prediction result, and extracting fault guest entity in the product description text based on the guest entity first prediction result and the guest entity second prediction result; the construction module is used for constructing fault knowledge text based on the fault main entity and the fault guest entity; wherein the main entity prediction and the guest entity prediction are realized by the fault knowledge extraction module.
[0007] To solve the above technical problems, the third aspect of the present application provides an electronic device, comprising a memory and a processor coupled with each other, the memory stores program instructions, and the processor is used to execute the program instructions to realize the fault knowledge text extraction method of the first aspect.
[0008] To solve the above technical problems, the fourth aspect of the present application provides a computer readable storage medium, which stores program instructions capable of being run by a processor, and the program instructions are used to realize the fault knowledge text extraction method of the first aspect.
[0009] The above scheme sequentially performs main entity prediction and guest entity prediction on the product description text to obtain main entity first prediction result and guest entity first prediction result, and sequentially performs guest entity prediction and main entity prediction on the product description text to obtain guest entity second prediction result and main entity second prediction result, so as to extract fault main entity in the product description text based on the main entity first prediction result and the main entity second prediction result, and extract fault guest entity in the product description text based on the guest entity first prediction result and the guest entity second prediction result, so as to construct fault knowledge text based on the fault main entity and the fault guest entity, and the main entity prediction and the guest entity prediction are realized by the fault knowledge extraction module, which can provide feedback for the extraction task of the main entity prediction and the guest entity prediction, and also provide feedback for the extraction task of the main entity prediction and the guest entity prediction, so as to significantly improve the integrity of the main / guest entity extracted by the knowledge extraction module, and help to improve the extraction effect of fault knowledge. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 is a flowchart of an embodiment of the fault knowledge text extraction method of the present application;
[0011] Figure 2 is a framework diagram of an embodiment of the fault knowledge extraction module;
[0012] Figure 3 is a process schematic diagram of an embodiment of training a feature extraction network;
[0013] Figure 4 is a process schematic diagram of an embodiment of extracting additional knowledge text;
[0014] Figure 5 is Figure 1 is a flow schematic diagram of an embodiment of step S11 in the method;
[0015] Figure 6 is a framework schematic diagram of an embodiment of the fault knowledge text extraction apparatus of the present application;
[0016] Figure 7 is a framework schematic diagram of an embodiment of the electronic device of the present application;
[0017] Figure 8 is a framework schematic diagram of an embodiment of the computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0018] The scheme of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0019] In the following description, specific details are set forth in order to provide a thorough understanding of the present application. However, persons having ordinary skill in the art will appreciate that the present application can be practiced without the specific details.
[0020] The terms "system" and "network" are often used interchangeably herein. The term "and / or", merely describes an associated relationship between associated objects, and means that there can be three relationships, for example, A and / or B, which means that A exists alone, A and B exist together, and B exists alone. In addition, the segment " / " herein generally means that the associated objects before and after are in an "or" relationship. In addition, "multiple" herein means two or more than two.
[0021] In order to facilitate understanding of the specific meanings of various entities in the disclosed embodiments of the present application, the automobile description text "The vehicle power system uses a high-voltage battery for driving. In the event of a serious collision accident, high-voltage leakage or battery liquid leakage may occur. Therefore, when rescuing the vehicle, professional rescue personnel should operate and wear appropriate protective devices to ensure personal safety" is taken as an example. Please refer to Table 1, which is a schematic table of various fault knowledge in the automobile description text according to an embodiment.
[0022] Table 1 is a schematic table of various fault knowledge in the automobile description text according to an embodiment.
[0023]
[0024] As shown in Table 1, the above automobile description text contains a fault main entity "high-voltage battery" of a main entity type "component", a fault guest entity "high-voltage battery leakage or battery liquid leakage" of a guest entity type "failure phenomenon", and a relationship type "functional failure" between the fault main entity and the fault guest entity. In addition, the fault knowledge "failure cause" and "solution" can be further included. For example, in the foregoing automobile description text, the fault knowledge "failure cause" is "serious collision accident", and the fault knowledge "solution" is "professional rescue personnel operation and wearing appropriate protective devices". Of course, the foregoing example is only one possible case in the actual application process, and the main entity type is not limited to the above "component", but can also include but is not limited to "performance" and the like, the guest entity type is not limited to the above "failure phenomenon", but can also include but is not limited to "failure consequences" and the like, and the relationship type is not limited to the above "functional failure", but can also include but is not limited to "performance failure" and the like. Other application scenarios can be similarly deduced, and will not be exemplified one by one here.
[0025] Please refer to Figure 1 , Figure 1 is a flowchart of an embodiment of the fault knowledge text extraction method of the present application. Specifically, it can include the following steps:
[0026] Step S11: sequentially performing main-guest entity prediction on the product description text to obtain a main entity first prediction result and a guest entity first prediction result, and sequentially performing guest-main entity prediction on the product description text to obtain a guest entity second prediction result and a main entity second prediction result.
[0027] In the embodiments of the present disclosure, the main-guest entity prediction and the guest-main entity prediction can be realized by a fault knowledge extraction module. It should be noted that the fault knowledge extraction module can be composed of a network model (such as a neural network), or can be composed of a function model such as a decision tree, a Bayesian, etc., which is not limited herein. Taking the case that the knowledge extraction module is composed of a network model, please refer to Figure 2 , Figure 2 is a framework diagram of an embodiment of the fault knowledge extraction module. As Figure 2As shown, the fault knowledge extraction module for extracting fault knowledge text includes a first prediction network and a second prediction network, the first prediction network is used to perform main entity prediction, and the second prediction network is used to perform guest entity prediction, the first prediction network includes a first main entity prediction network and a first guest entity prediction network connected in sequence, so that after the product description text is input into the first prediction network, the main entity first prediction result output by the first main entity prediction network can be obtained, and the guest entity first prediction result output by the first guest entity prediction network can be obtained, the second prediction network includes a second guest entity prediction network and a second main entity prediction network connected in sequence, so that after the product description text is input into the second prediction network, the guest entity second prediction result output by the second guest entity prediction network can be obtained, and the main entity second prediction result output by the second main entity prediction network can be obtained.
[0028] In one implementation scenario, the first prediction network and the second prediction network can adopt a network structure including but not limited to an Encoder-Decoder (i.e., an encoder-decoder) and the like, and the network structure of the first prediction network and the second prediction network is not limited here. Please continue to refer to Figure 2 For ease of description, the product description text can be denoted as W, and each character contained therein can be denoted as w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, and w14. Taking the Encoder-Decoder network structure as an example, the first main entity prediction network in the first prediction network can include a BERT Encoder and a Decoder connected in sequence, and the first guest entity prediction network in the first prediction network can also include a BERT Encoder and a Decoder. Of course, the first main entity prediction network in the first prediction network can reuse the BERT Encoder in the first guest entity prediction network. For example, after the product description text is input into the first main entity prediction network, the character feature representation h N1 output by the BERT Encoder in the first main entity prediction network for each character (i.e., w1-w14) in the product description text can be obtained, and then the main entity first prediction result is obtained by decoding the character feature representation h N1The first entity first prediction result is decoded by a Decoder in the first entity prediction network. Similarly, the second entity prediction network in the second prediction network can include a BERT Encoder and a Decoder connected in sequence, and the second main entity prediction network in the second prediction network can also include a BERT Encoder and a Decoder. Of course, the second main entity prediction network in the second prediction network can reuse the BERT Encoder in the second entity prediction network. For example, after the product description text is input into the second entity prediction network, a character feature representation of each character (i.e., w1-w14) in the product description text encoded by the BERT Encoder in the second entity prediction network can be obtained. In order to distinguish from the character feature representation h N1 , the character feature representation can be denoted as h N2 The second entity second prediction result is decoded by a Decoder in the second entity prediction network, and the second main entity prediction network can reuse the character feature representation h N2 The second main entity second prediction result is decoded by a Decoder in the second main entity prediction network. Other cases can be similarly deduced and will not be repeated here.
[0029] In one implementation scenario, after the first main entity prediction network in the first prediction network predicts the main entity first prediction result, the first entity prediction network in the first prediction network can decode the character feature representation h N1 and the main entity first prediction result to obtain the entity first prediction result, that is, the first entity prediction network refers to the prediction result output by the previous prediction network when decoding. Similarly, after the second entity prediction network in the second prediction network predicts the entity second prediction result, the second main entity prediction network in the second prediction network can decode the character feature representation h N2 and the entity second prediction result to obtain the main entity second prediction result, that is, the second main entity prediction network refers to the prediction result output by the previous prediction network when decoding. The decoding by referring to the output result of the previous prediction network can refer to a two-stage relationship extraction network such as CasRel, and the specific process will not be repeated here.
[0030] In one implementation scenario, in order to further improve the integrity of the fault knowledge extraction, the first prediction network and the second prediction network can further refer to the knowledge label in the prediction process of the product description text, and the knowledge label can be composed of an entity type and a relationship type. Specifically, each time the fault knowledge text extraction is performed, the main entity first prediction result and the main entity second prediction result can be predicted by referring to the reference feature representation corresponding to the knowledge label related to the main entity type. For example, the main entity first prediction result and the main entity second prediction result can be predicted by the first main entity prediction network and the second main entity prediction network, respectively, by referring to the reference feature representation corresponding to the knowledge label related to the main entity type. At this time, the main entity first prediction result and the main entity second prediction result are specifically the position prediction results of the fault main entity with the relationship type and belonging to the main entity type, and the "relationship type" is the relationship type defined in the knowledge label related to the main entity type, and the "main entity type" is the main entity type defined in the knowledge label related to the main entity type. The guest entity first prediction result and the guest entity second prediction result can be predicted by referring to the reference feature representation corresponding to the knowledge label related to the guest entity type. For example, the guest entity first prediction result and the guest entity second prediction result can be predicted by the first guest entity prediction network and the second guest entity prediction network, respectively, by referring to the reference feature representation corresponding to the knowledge label related to the guest entity type. At this time, the guest entity first prediction result and the guest entity second prediction result are specifically the position prediction results of the fault main entity with the relationship type and belonging to the guest entity type, and the "relationship type" is the relationship type defined in the knowledge label related to the guest entity type, and the "guest entity type" is the guest entity type defined in the knowledge label related to the guest entity type. Each time the fault knowledge text extraction is performed, the knowledge label related to the main entity type and the knowledge label related to the guest entity type have the same relationship type. As mentioned earlier, the knowledge label can be composed of an entity type and a relationship type. For example, the knowledge label related to the main entity type is composed of a main entity type and a relationship type, and the knowledge label related to the guest entity type is composed of a guest entity type and a relationship type. On this basis, for each knowledge label, feature extraction can be performed in advance to obtain the reference feature representation of various knowledge labels, so that if the knowledge label related to the main entity type and the knowledge label related to the guest entity type have the same relationship type, they can be regarded as a group of knowledge labels. Then, the fault knowledge extraction module can refer to a group of knowledge labels for fault knowledge text extraction each time. The specific process of prediction combined with the reference feature representation can be referred to in the following description, which is not described here.The first prediction result of the main entity and the second prediction result of the main entity are respectively predicted by referring to reference feature representations corresponding to knowledge labels related to the main entity type, the first prediction result of the guest entity and the second prediction result of the guest entity are respectively predicted by referring to reference feature representations corresponding to knowledge labels related to the guest entity type, and the knowledge labels related to the main entity type and the knowledge labels related to the guest entity type have the same relationship type, so that the relationship type and the entity type can be jointly encoded, the association between the two can be learned by the fault knowledge extraction module, and then the interaction can be referred to in the extraction process, which is helpful to improve the accuracy of entity extraction.
[0031] In a specific implementation scenario, in order to improve the accuracy of the reference feature representation, a plurality of relationship types can be combined with different main entity types two by two, and a plurality of relationship types can be combined with different guest entity types two by two to obtain a plurality of knowledge labels. Taking the automobile field as an example, the relationship types "performance fault" and "function fault" can be combined with different main entity types "parts" and "performance" two by two, and the relationship types "performance fault" and "function fault" can be combined with different guest entity types "fault phenomenon" and "fault consequence" two by two to obtain knowledge labels related to the main entity type: "performance fault - parts", "performance fault - performance", "function fault - parts", "function fault - performance", and knowledge labels related to the guest entity type: "performance fault - fault phenomenon", "performance fault - fault consequence", "function fault - fault phenomenon", "function fault - fault consequence". Other cases can be similarly extended, which will not be repeated here. In particular, the knowledge label can be represented as {[CLS] relationship type [SEP] entity type}, wherein [CLS] represents the start character of the knowledge label, and [SEP] represents the separation character of the relationship type and the entity type. On this basis, the feature extraction network can be used to extract features of various knowledge labels to obtain initial feature representations of various knowledge labels. The feature extraction network can include but is not limited to convolutional neural network, long short-term memory network, recurrent neural network, etc. Please refer to Figure 3 , Figure 3 is a process schematic diagram of an embodiment of training the feature extraction network. As Figure 3As shown, the feature extraction network can include BERT and pooling (i.e., a pooling layer). Of course, the foregoing are merely several possible implementations of the feature extraction network, and do not limit the network structure of the feature extraction network. In particular, when the knowledge label is represented as {[CLS] relation type [SEP] entity type}, the character feature representation of each character in the representation can be extracted after the feature extraction network, and based on this, the starting character [CLS] can be taken as the initial feature representation of the knowledge label. After obtaining the initial feature representation of each knowledge label, the feature similarity between the initial feature representations of different knowledge labels can be measured to obtain the network loss. For example, the cosine similarity between the initial feature representation u of knowledge label A after the feature extraction network and the initial feature representation v of knowledge label B after the feature extraction network can be measured to obtain the feature similarity. Other cases can be similarly deduced and will not be repeated here. It should be noted that the greater the feature similarity, the more similar the initial feature representations of different knowledge labels, and the smaller the feature similarity, the more different the initial feature representations of different knowledge labels. In addition, the network loss can be positively correlated with the feature similarity, i.e., the smaller the feature similarity, the smaller the network loss, and the greater the feature similarity, the greater the network loss. Therefore, by minimizing the network loss, the feature extraction network can be forced to extract feature information that is significantly different from other knowledge labels for each knowledge label, so that the feature representations extracted by different knowledge labels are as different as possible. Therefore, during training, a training convergence condition can be set, such as being set to include that the network loss is less than a preset threshold. On this basis, if the calculated network loss does not meet the training convergence condition, the network parameters of the feature extraction network can be adjusted based on the network loss (e.g., the network parameters are adjusted by gradient descent based on the network loss), and the foregoing step of extracting the initial feature representation of each knowledge label using the feature extraction network is re-executed until the network loss meets the training convergence condition. After the feature extraction network is trained and converged, the reference feature representation of each knowledge label is obtained by using the trained and converged feature extraction network to extract the features of each knowledge label. In particular, when the knowledge label is represented as {[CLS] relation type [SEP] entity type}, the character feature representation of each character in the representation can be extracted after the trained and converged feature extraction network, and based on this, the starting character [CLS] can be taken as the reference feature representation of the knowledge label.The above manner combines a plurality of relation types with different main entity types two by two, and combines a plurality of relation types with different object entity types two by two to obtain a plurality of knowledge labels, and then the feature extraction network is used to extract the initial feature representation of each knowledge label based on the initial feature representation of each knowledge label, and the network loss is obtained based on the feature similarity between the initial feature representations of different knowledge labels, and in the case that the network loss does not satisfy the training convergence condition, the network parameters of the feature extraction network are adjusted based on the network loss, and the step of extracting the initial feature representation of each knowledge label by using the feature extraction network is re-executed until the network loss satisfies the training convergence condition, and then the reference feature representation of each knowledge label is obtained by using the trained feature extraction network to extract the feature of each knowledge label, which can force the feature extraction network to extract the feature information of each knowledge label that is significantly different from other knowledge labels, so that the reference feature representations extracted by different knowledge labels are as different as possible.
[0032] In a specific implementation scenario, please continue to refer to Figure 2 The knowledge labels can include: relation 1-main entity type, relation 2-main entity type, relation 1-object entity type, and relation 2-object entity type, that is, the knowledge label “relation 1-main entity type” related to the main entity type and the knowledge label “relation 1-object entity type” related to the object entity type have the same relation type “relation 1”, so they can be used as a group of knowledge labels, and the knowledge label “relation 2-main entity type” related to the main entity type and the knowledge label “relation 2-object entity type” related to the object entity type have the same relation type “relation 2”, so they can be used as a group of knowledge labels. On this basis, for the first group of knowledge labels, the first main entity prediction network in the first prediction network can obtain the first prediction result of the main entity by combining the knowledge label “relation 1-main entity type” related to the main entity type (that is, the first prediction result of the main entity is obtained by combining the knowledge label “relation 1-main entity type” related to the main entity type, and the first prediction result of the main entity is obtained by combining the knowledge label “relation 1-main entity type” related to the main entity type), and the first object entity prediction network in the first prediction network can obtain the first prediction result of the object entity by combining the knowledge label “relation 1-object entity type” related to the object entity type (that is, the first prediction result of the object entity is obtained by combining the knowledge label “relation 1-object entity type” related to the object entity type, and the first prediction result of the object entity is obtained by combining the knowledge label “relation 1-object entity type” related to the object entity type). Figure 2 In the first main entity prediction network in the first prediction network, the knowledge label “relation 1-main entity type” is shown in the dashed box, and the first row of numbers in the two rows of numbers in the dashed box represents the prediction probability that each character is the start character of the fault main entity belonging to “main entity type” and having “relation 1”, and the second row of numbers represents the prediction probability that each character is the end character of the fault main entity belonging to “main entity type” and having “relation 1”, and the first object entity prediction network in the first prediction network can obtain the first prediction result of the object entity by combining the knowledge label “relation 1-object entity type” related to the object entity type (that is, the first prediction result of the object entity is obtained by combining the knowledge label “relation 1-object entity type” related to the object entity type, and the first prediction result of the object entity is obtained by combining the knowledge label “relation 1-object entity type” related to the object entity type). Figure 2The knowledge tag "relation 1 - guest entity type" is shown in the dashed box on the first guest entity prediction network, and the two rows of numbers in the dashed box represent the first row of numbers representing the prediction probability of each character as the start character of the fault guest entity belonging to the "guest entity type" and having "relation 1", and the second row of numbers representing the prediction probability of each character as the end character of the fault guest entity belonging to the "guest entity type" and having "relation 1"; similarly, the second prediction network can obtain the second guest entity prediction network in combination with the knowledge tag "relation 1 - guest entity type" related to the guest entity type (i.e. Figure 2 The knowledge tag "relation 1 - guest entity type" is shown in the dashed box on the first guest entity prediction network, and the two rows of numbers in the dashed box represent the first row of numbers representing the prediction probability of each character as the start character of the fault guest entity belonging to the "guest entity type" and having "relation 1", and the second row of numbers representing the prediction probability of each character as the end character of the fault guest entity belonging to the "guest entity type" and having "relation 1"; similarly, the second prediction network can obtain the second guest entity prediction network in combination with the knowledge tag "relation 1 - guest entity type" related to the guest entity type (i.e. Figure 2 The knowledge tag "relation 1 - guest entity type" is shown in the dashed box on the first guest entity prediction network, and the two rows of numbers in the dashed box represent the first row of numbers representing the prediction probability of each character as the start character of the fault guest entity belonging to the "guest entity type" and having "relation 1", and the second row of numbers representing the prediction probability of each character as the end character of the fault guest entity belonging to the "guest entity type" and having "relation 1"; similarly, the second prediction network can obtain the second guest entity prediction network in combination with the knowledge tag "relation 1 - guest entity type" related to the guest entity type (i.e. Figure 2 The knowledge tag "relation 1 - guest entity type" is shown in the dashed box on the first guest entity prediction network, and the two rows of numbers in the dashed box represent the first row of numbers representing the prediction probability of each character as the start character of the fault guest entity belonging to the "guest entity type" and having "relation 1", and the second row of numbers representing the prediction probability of each character as the end character of the fault guest entity belonging to the "guest entity type" and having "relation 1"; similarly, the second prediction network can obtain the second guest entity prediction network in combination with the knowledge tag "relation 1 - guest entity type" related to the guest entity type (i.e. Figure 2The first object entity prediction network is shown in the dashed box containing the knowledge label "Relationship 2 - Object Entity Type". Within the dashed box, the first row of numbers represents the prediction probability of each character being the start character of a faulty object entity belonging to "Object Entity Type" and having "Relationship 2", and the second row represents the prediction probability of each character being the end character of a faulty object entity belonging to "Object Entity Type" and having "Relationship 1". Similarly, the second object entity prediction network in the second prediction network can be obtained by combining the knowledge label "Relationship 2 - Object Entity Type" related to the object entity type (i.e., the second object entity prediction network). Figure 2 The dashed box indicating the knowledge tag "Relation 2 - Object Entity Type" on the second object entity prediction network shows the following: The first row of numbers within the dashed box represents the prediction probability of each character being the start character of a faulty object entity belonging to "Object Entity Type" and having "Relation 2"; the second row represents the prediction probability of each character being the end character of a faulty object entity belonging to "Object Entity Type" and having "Relation 2". The second primary entity prediction network in the second prediction network can combine the knowledge tag "Relation 2 - Primary Entity Type" related to the primary entity type to obtain the second prediction result of the primary entity (i.e.,...). Figure 2 The second principal entity prediction network shows the knowledge tag "Relation 2 - Principal Entity Type" within the dashed box. The first row of numbers within the dashed box represents the predicted probability that each character is the start character of a faulty principal entity belonging to "Principal Entity Type" and having "Relation 2". The second row of numbers represents the predicted probability that each character is the end character of a faulty principal entity belonging to "Principal Entity Type" and having "Relation 2". Other cases can be deduced similarly, and will not be listed here.
[0033] It should be noted that, unless otherwise specified, all descriptions of "feature representation" such as "initial feature representation," "reference feature representation," and "character feature representation" can be expressed in vector form. The vector dimension can be set according to application needs, such as 128 dimensions, 256 dimensions, etc., and is not limited here.
[0034] Step S12: Based on the first prediction result and the second prediction result of the main entity, extract the faulty main entity from the product description text, and based on the first prediction result and the second prediction result of the guest entity, extract the faulty guest entity from the product description text.
[0035] In one implementation scenario, as described above, the first prediction result of the main entity can include prediction probabilities of each character in the product description text as a start character and an end character of the fault main entity, and the second prediction result of the main entity can include prediction probabilities of each character in the product description text as a start character and an end character of the fault main entity. On this basis, for each character, the prediction probability of the character in the first prediction result of the main entity and the prediction probability of the character in the second prediction result of the main entity can be fused to obtain a final probability of the corresponding character as a start character and an end character of the fault main entity, so that the fault main entity is extracted in the product description text based on the final probability of each character as a start character and an end character of the fault main entity. The above-mentioned manner determines the final probability of each character by fusing the prediction probability of each character, so as to extract the fault main entity, which helps to improve the extraction accuracy of the fault main entity.
[0036] In one specific implementation scenario, the prediction probabilities can be fused by averaging, weighting, or the like to obtain the final probability, which is not limited herein. Based on this, if the final probability as a start character is greater than a preset threshold (such as 0.8, 0.85, 0.9, 0.95, etc.), the character can be determined as a start character of the fault main entity, and similarly, if the final probability as an end character is greater than a preset threshold (such as 0.8, 0.85, 0.9, 0.95, etc.), the character can be determined as an end character of the fault main entity.
[0037] In one specific implementation scenario, taking the case of fusing the prediction probabilities by averaging as an example, please refer to Figure 2 For the set of knowledge labels of “relationship 1”, the first prediction result of the main entity includes prediction probabilities of w1-w14 as a start character and an end character of the fault main entity:
[0038] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Start 0 0 0 1 0 0 0 0 0 0 0 0 0 0 End 0 0 0 0 0 0 1 0 0 0 0 0 0 0
[0039] The second prediction result of the main entity includes prediction probabilities of w1-w14 as a start character and an end character of the fault main entity:
[0040] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Start 0 0 0 1 0 0 0 0 0 0 0 0 0 0 End 0 0 0 0 0 0 1 0 0 0 0 0 0 0
[0041] Based on this, the prediction probability of each character as a start character is averaged, and the prediction probability of each character as an end character is averaged, so as to obtain the final probability of each character as a start character and an end character of the fault main entity:
[0042] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Start 0 0 0 1 0 0 0 0 0 0 0 0 0 0 End 0 0 0 0 0 0 1 0 0 0 0 0 0 0
[0043] Therefore, it can be determined that w4-w7 combine to form the fault main entity with “relationship 1”.
[0044] In one specific implementation scenario, taking the fusion of prediction probabilities in an average manner as an example, please refer to Figure 2 For the set of knowledge labels of "relation 2", the first prediction result of the main entity includes the prediction probabilities of w1-w14 as the start character and the end character of the fault main entity, respectively:
[0045] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Start 0 0 0 0 0 0 0 0 0 0 0 0 0 0 End 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[0046] The second prediction result of the main entity includes the prediction probabilities of w1-w14 as the start character and the end character of the fault main entity, respectively:
[0047] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Start 0 0 0 0 0 0 0 0 0 0 0 0 0 0 End 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[0048] Based on this, the prediction probabilities of each character as the start character are averaged, and the prediction probabilities of each character as the end character are averaged, so that the final probabilities of each character as the start character and the end character of the fault main entity are obtained:
[0049] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Start 0 0 0 0 0 0 0 0 0 0 0 0 0 0 End 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[0050] Therefore, it can be determined that there is no fault main entity with "relation 2" in the product description text.
[0051] In one implementation scenario, the first prediction result of the guest entity includes the prediction probabilities of each character in the product description text as the start character and the end character of the fault guest entity, respectively, and the second prediction result of the guest entity includes the prediction probabilities of each character in the product description text as the start character and the end character of the fault guest entity, respectively. On this basis, for each character, the prediction probabilities of the character in the first prediction result of the guest entity and the prediction probabilities of the character in the second prediction result of the guest entity can be fused to obtain the final probabilities of the corresponding character as the start character and the end character of the fault guest entity, so that the fault guest entity is extracted in the product description text based on the final probabilities of each character as the start character and the end character of the fault guest entity. In this way, by fusing the prediction probabilities of each character, the final probabilities of each character are determined, so that the fault main entity is extracted, which helps to improve the extraction accuracy of the fault main entity.
[0052] In a specific implementation scenario, the prediction probabilities can be fused by averaging, weighting, etc. to obtain the final probability, which is not limited herein. Based on this, if the final probability of the starting character is greater than a preset threshold (such as 0.8, 0.85, 0.9, 0.95, etc.), the character can be determined as the starting character of the fault entity, and similarly, if the final probability of the ending character is greater than a preset threshold (such as 0.8, 0.85, 0.9, 0.95, etc.), the character can be determined as the ending character of the fault entity.
[0053] In a specific implementation scenario, taking the fusion of prediction probabilities by averaging as an example, please refer to Figure 2 For a set of knowledge labels of “relationship 1”, the first prediction result of the entity includes the prediction probabilities of w1-w14 as the starting character and the ending character of the fault subject entity respectively:
[0054] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Start 0 0 0 0 0 0 0 0 1 0 0 0 0 0 End 0 0 0 0 0 0 0 0 0 0 0 0 0 1
[0055] The second prediction result of the entity includes the prediction probabilities of w1-w14 as the starting character and the ending character of the fault subject entity respectively:
[0056] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Start 0 0 0 0 0 0 0 0 1 0 0 0 0 0 End 0 0 0 0 0 0 0 0 0 0 0 0 0 1
[0057] Based on this, the prediction probabilities of each character as the starting character are averaged, and the prediction probabilities of each character as the ending character are averaged, to obtain the final probabilities of each character as the starting character and the ending character of the fault entity respectively:
[0058] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Start 0 0 0 0 0 0 0 0 1 0 0 0 0 0 End 0 0 0 0 0 0 0 0 0 0 0 0 0 1
[0059] Therefore, it can be determined that w9-w14 form the fault entity with “relationship 1”.
[0060] In a specific implementation scenario, taking the fusion of prediction probabilities by averaging as an example, please refer to Figure 4 For a set of knowledge labels of “relationship 2”, the first prediction result of the subject and the entity includes the prediction probabilities of w1-w14 as the starting character and the ending character of the fault subject entity respectively:
[0061] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Figure 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Figure 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[0062] The second prediction result of the entity includes the prediction probabilities of w1-w14 as the starting character and the ending character of the fault subject entity respectively:
[0063] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Figure 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Figure 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[0064] Based on this, the prediction probability of each character as a start character is averaged, and the prediction probability of each character as an end character is averaged, to obtain the final probability of each character as a start character and an end character of the fault guest entity:
[0065] w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 Figure 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Figure 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[0066] Therefore, it can be determined that the product description text does not have a fault guest entity with "relationship 2".
[0067] Step S13: Based on the fault main entity and the fault guest entity, a fault knowledge text is constructed.
[0068] In one implementation scenario, the fault knowledge text can be organized in a structured form as {fault main entity, fault guest entity} to construct the fault knowledge text.
[0069] In another implementation scenario, as described above, if the knowledge label related to the main entity type and the knowledge label related to the guest entity type have the same relationship type, they can be first taken as a set of knowledge labels, and then the fault knowledge extraction module can refer to a set of knowledge labels each time to extract the fault knowledge text. In this case, the same relationship type can also be extracted, and combined with the fault main entity and the fault guest entity, to form a structured form as {fault main entity, relationship type, fault guest entity} to construct the fault knowledge text.
[0070] In one implementation scenario, as described above, the guest entity type of the fault guest entity can be a fault phenomenon. In addition, the fault knowledge extraction module can further include a third prediction network, so as to further enrich the fault knowledge text, before constructing the fault knowledge text, the fault guest entity can be spliced with the product description text to obtain a to-be-processed text, and the third prediction network is used to predict the to-be-processed text to obtain a position prediction result of at least one of the fault cause and the solution, so as to extract additional knowledge text in the product description text based on the position prediction result, and the additional knowledge text includes at least one of the fault cause and the solution, and then the fault knowledge text is constructed based on the fault main entity, the fault guest entity and the additional knowledge text. The above-mentioned manner can enhance the network perception in the extraction process and improve the extraction effect of the additional knowledge text by splicing the fault guest entity with the guest entity type being a fault phenomenon with the product description text and then extracting the additional knowledge text.
[0071] In a specific implementation scenario, the position prediction result of the fault cause can include prediction probabilities of each character in the product description text as a start character and an end character of the fault cause, and the position prediction result of the solution can include prediction probabilities of each character in the product description text as a start character and an end character of the solution.
[0072] In a specific implementation scenario, for the fault cause, if the prediction probability of the starting character is greater than a preset threshold (e.g., 0.8, 0.85, 0.9, 0.95, etc.), the character can be taken as the starting character of the fault cause, and if the prediction probability of the ending character is greater than a preset threshold (e.g., 0.8, 0.85, 0.9, 0.95, etc.), the character can be taken as the ending character of the fault cause. Similarly, for the solution, if the prediction probability of the starting character is greater than a preset threshold (e.g., 0.8, 0.85, 0.9, 0.95, etc.), the character can be taken as the starting character of the solution, and if the prediction probability of the ending character is greater than a preset threshold (e.g., 0.8, 0.85, 0.9, 0.95, etc.), the character can be taken as the ending character of the solution.
[0073] In a specific implementation scenario, please refer to Figure 1 , Figure 2 is a process schematic diagram of an embodiment of extracting additional knowledge text. As shown in Figure 2 , the third prediction network can adopt an Encoder-Decoder (i.e., encoder-decoder) network structure, and specifically can include a BERT Encoder and a Decoder, and the network structure of the third prediction network is not limited herein. Similarly to the knowledge label, the text to be processed can be represented as {[CLS] fault phenomenon [SEP] w1 …… w9 w10 w11 w12 w13 w14}. The above text to be processed processed by the third prediction network can obtain the position prediction result of the fault cause (e.g., the two rows of numbers in the dashed box of “fault cause” in Figure 6 , the upper row represents the prediction probability of the starting character of the fault cause, and the lower row represents the prediction probability of the ending character of the fault cause), and the position prediction result of the solution (e.g., the two rows of numbers in the dashed box of “solution” in Figure 6 , the upper row represents the prediction probability of the starting character of the solution, and the lower row represents the prediction probability of the ending character of the solution). Based on this, it can be determined that w7-w9 are combined to form the fault cause, and w11-w14 are combined to form the solution. Other cases can be similarly deduced, which will not be exemplified one by one herein.
[0074] In a specific implementation scenario, in order to improve the accuracy of the third prediction network, a sample product description text can be prepared in advance, and the sample product description text is attached with a first character label (such as a numerical label 0 indicating not belonging to a failure phenomenon, and a numerical label 1 indicating belonging to a failure phenomenon) for sample characters belonging to a failure phenomenon, and a second character label (such as a numerical label 0 indicating not belonging to a failure cause, and a numerical label 1 indicating belonging to a failure cause) for sample characters belonging to a failure cause, and a third character label (such as a numerical label 0 indicating not belonging to a solution, and a numerical label 1 indicating belonging to a solution) for sample characters belonging to a solution. On this basis, the failure phenomenon can be extracted from the sample product description text according to the first character label, and spliced with the sample product description text as a sample to-be-processed text, input to the third prediction network, to obtain a position prediction result of the failure cause in the sample product description text, and a position prediction result of the solution in the sample product description text, so that the difference between the second character label of the failure cause and the position prediction result (such as can be measured by using a cross-entropy loss function), and the difference between the third character label of the solution and the position prediction result (such as can be measured by using a cross-entropy loss function), can be obtained. The training loss of the third prediction network, and the network parameters of the third prediction network are adjusted based on the training loss of the third prediction network. Illustratively, the network parameters of the third prediction network can be adjusted by using an optimization method such as gradient descent based on the training loss of the third prediction network.
[0075] In a specific implementation scenario, similar to the foregoing construction of the failure knowledge text, after obtaining the additional knowledge text, the failure main entity, the relationship type, the failure guest entity, the failure cause, and the solution can be organized in a structured form as {failure main entity, relationship type, failure guest entity, failure cause, solution} to construct the failure knowledge text.
[0076] In order to improve the performance of the fault knowledge extraction module, when the fault knowledge extraction module is trained based on the sample product description text, the training is performed based on the prediction difference of the subject-predicate entity prediction and the predicate-subject entity prediction about the sample fault subject entity and the prediction difference of the subject-predicate entity prediction and the predicate-subject entity prediction about the sample fault predicate entity, so as to force the extraction task of the subject-predicate entity prediction and the predicate-subject entity prediction about the subject entity to promote and learn each other, and also force the extraction task of the subject-predicate entity prediction and the predicate-subject entity prediction about the predicate entity to promote and learn each other. Such training can significantly improve the integrity of the knowledge extraction module in extracting the subject / predicate entity. Specifically, when the subject-predicate entity prediction is performed, the sample subject entity first prediction result and the sample predicate entity first prediction result can be obtained, and when the predicate-subject entity prediction is performed, the sample predicate entity second prediction result and the sample subject entity second prediction result can be obtained. Then, the training loss of the fault knowledge extraction module at least includes: a first sub-loss obtained based on the measurement of the sample subject entity first prediction result and the sample subject entity second prediction result, and a second sub-loss obtained based on the measurement of the sample predicate entity first prediction result and the sample predicate entity second prediction result. It should be noted that the related meanings and acquisition methods of the sample product description text, the sample subject entity first prediction result, the sample predicate entity first prediction result, the sample predicate entity second prediction result, and the sample subject entity second prediction result can be referred to the related descriptions of the product description text, the subject entity first prediction result, the predicate entity first prediction result, the predicate entity second prediction result, and the subject entity second prediction result, which will not be described here.
[0077] In one implementation scenario, similar to the subject entity first prediction result, the sample subject entity first prediction result includes the sample probability that the characters in the sample product description text are respectively the start character and the end character of the sample fault subject entity, and similar to the subject entity second prediction result, the sample subject entity second prediction result includes the sample probability that the characters in the sample product description text are respectively the start character and the end character of the sample fault subject entity. On this basis, the difference between the sample probability in the sample subject entity first prediction result and the sample probability in the sample subject entity second prediction result can be measured to obtain the first sub-loss. For example, the probability distribution difference can be measured to obtain the first sub-loss. For example, the probability distribution difference between the two can be measured by using the KL divergence or other measurement methods. For ease of description, the first sub-loss Loss1 can be represented as:
[0078] Loss1=D(P subject ||O subject )……(1)
[0079] In the above formula (1), P subject represents the sample subject entity first prediction result, and O subjectrepresents the second prediction result of the sample main entity, and D(·) represents a calculation function of the KL divergence. For specific calculation process, please refer to the technical details of the KL divergence, which will not be described here. Of course, in addition, the probability error of each character as the start character in the first prediction result of the sample main entity and the second prediction result of the sample main entity, and the probability error of each character as the end character in the first prediction result of the sample main entity and the second prediction result of the sample main entity can also be directly calculated, so as to measure the first sub-loss. In the above manner, the first prediction result of the sample main entity includes the sample probability of the character in the sample product description text as the start character and the end character of the sample fault main entity, the second prediction result of the sample main entity includes the sample probability of the character in the sample product description text as the start character and the end character of the sample fault main entity, and the first sub-loss is measured based on the difference between the sample probability in the first prediction result of the sample main entity and the sample probability in the second prediction result of the sample main entity. Therefore, in the training process, the probabilities output by the first prediction network and the second prediction network when predicting the main entity can be made as consistent as possible, and the missing prediction of the main entity can be avoided as much as possible, which helps to improve the integrity and accuracy of the knowledge extraction module in extracting the main entity.
[0080] In one implementation scenario, similar to the first prediction result of the guest entity, the first prediction result of the sample guest entity includes the sample probability of the character in the sample product description text as the start character and the end character of the sample fault guest entity, and similar to the second prediction result of the guest entity, the second prediction result of the sample guest entity includes the sample probability of the character in the sample product description text as the start character and the end character of the sample fault guest entity. On this basis, the difference between the sample probability in the first prediction result of the sample guest entity and the sample probability in the second prediction result of the sample guest entity can be measured to obtain the second sub-loss. For example, the probability distribution difference can be measured to obtain the second sub-loss. Exemplarily, the probability distribution difference between the two can be measured by using the KL divergence and other measurement methods. For ease of description, the second sub-loss Loss1 can be represented as:
[0081] Loss2=D(P object ||O object )……(2)
[0082] In the above formula (2), P object represents the first prediction result of the sample guest entity, and O objectrepresents the sample entity second prediction result, and D(||) represents a calculation function of the KL divergence. For specific calculation process, refer to the technical details of the KL divergence, which will not be described here. Of course, in addition, the probability error of each character as a start character in the sample entity first prediction result and the sample entity second prediction result, and the probability error of each character as an end character in the sample entity first prediction result and the sample entity second prediction result can also be directly calculated, so as to measure the second sub-loss. In the above manner, the sample entity first prediction result includes the sample probability of the character in the sample product description text as the start character and the end character of the sample fault entity, the sample entity second prediction result includes the sample probability of the character in the sample product description text as the start character and the end character of the sample fault entity, and the second sub-loss is measured based on the difference between the sample probability in the sample entity first prediction result and the sample probability in the sample entity second prediction result. Therefore, in the training process, the probabilities output by the first prediction network and the second prediction network when predicting the entity can be as consistent as possible, and the missing prediction of the entity can be avoided as much as possible, which helps to improve the integrity and accuracy of the knowledge extraction module in extracting the entity.
[0083] In one implementation scenario, the sample product description text can also be labeled with a sample main entity actual position mark representing the position (such as the start character and the end character) of the sample fault main entity, and the sample product description text is also labeled with a sample entity position mark representing the position (such as the start character and the end character) of the sample fault entity. In addition, the training loss can also include a third sub-loss Loss3 and a fourth sub-loss Loss4. The third sub-loss Loss3 can be measured based on the difference between the sample main entity first prediction result and the sample main entity actual position mark Loss 3,主实体 , and the difference between the sample entity first prediction result and the sample entity actual position mark Loss 3,客实体 . Specifically, the third sub-loss Loss3 can be represented as:
[0084] Loss3 = Loss 3,主实体 + Loss 3,客实体 … (3)
[0085] It should be noted that Loss 3,主实体 and Loss 3,客实体 can be measured by a cross-entropy loss function. For specific details, refer to the technical details of the cross-entropy loss function, which will not be described here. Similarly, the fourth loss Loss4 is measured based on the difference between the sample main entity second prediction result and the sample main entity actual position mark Loss 4,主实体, and a difference between the second predicted result of the sample guest entity and the actual position label of the sample guest entity Loss 4,客实体 . Specifically, the fourth sub-loss Loss4 can be represented as:
[0086] Loss4 = Loss 4,主实体 + Loss 4,客实体 … (4)
[0087] It should be noted that Loss 4,主实体 and Loss 4,客实体 can be measured by a cross-entropy loss function, and details of the cross-entropy loss function can be referred to, which will not be described here. Through minimizing the third sub-loss and the fourth sub-loss, the above-mentioned manner can force the host / guest entity to be predicted as accurately as possible, which helps to improve the accuracy of the knowledge extraction module in extracting the host / guest entity.
[0088] In one implementation scenario, the training loss Loss of the fault knowledge extraction module can be represented as:
[0089] Loss = Loss1 + Loss2 + Loss3 + Loss4 … (5)
[0090] It should be noted that by minimizing the training loss, on the one hand, the host / guest entity can be forced to be predicted as accurately as possible, and on the other hand, the probability output when predicting the host / guest entity can be forced to be as consistent as possible, so that the missing prediction can be further avoided as much as possible, which helps to improve the integrity and accuracy of the knowledge extraction module in extracting the host / guest entity.
[0091] The above scheme sequentially performs host / guest entity prediction on the product description text to obtain the first predicted result of the host entity and the first predicted result of the guest entity, and sequentially performs guest / host entity prediction on the product description text to obtain the second predicted result of the guest entity and the second predicted result of the host entity, thereby extracting the fault host entity in the product description text based on the first predicted result of the host entity and the second predicted result of the host entity, and extracting the fault guest entity in the product description text based on the first predicted result of the guest entity and the second predicted result of the guest entity, thereby constructing the fault knowledge text based on the fault host entity and the fault guest entity, and the host / guest entity prediction and the guest / host entity prediction are both implemented by the fault knowledge extraction module, which can provide feedback for each other on the extraction task of the host entity, and also provide feedback for each other on the extraction task of the guest entity, thereby significantly improving the integrity of the knowledge extraction module in extracting the host / guest entity, and helping to improve the extraction effect of the fault knowledge.
[0092] Please refer to Figure 7 , Figure 7 is Figure 8Fig. 11 is a flowchart illustrating an embodiment of step S11. Specifically, step S11 can include the following steps.
[0093] Step S51: Extract the first feature representation of each character in the product description text.
[0094] It should be noted that, as described above, the main entity prediction and the guest entity prediction can be performed by the fault knowledge extraction module respectively, and when the main entity prediction and the guest entity prediction are performed, the first feature representation can be extracted by the first entity prediction network in the entity prediction network. Specifically, the entity prediction network can include the first entity prediction network and the second entity prediction network. Please refer to Figure 8 In the case of the entity prediction network being the first prediction network (i.e., when the main entity prediction is performed), the first entity prediction network is the first main entity prediction network, and the second entity prediction network is the first guest entity prediction network. In the case of the entity prediction network being the second prediction network (i.e., when the guest entity prediction is performed), the first entity prediction network is the second guest entity prediction network, and the second entity prediction network is the second main entity prediction network. The network structure of the first entity prediction network and the second entity prediction network can be referred to the technical details of the “first main entity prediction network”, “first guest entity prediction network”, “second guest entity prediction network” and “second main entity prediction network” in the foregoing disclosed embodiments, which will not be described here.
[0095] Step S52: Perform inner product of the first feature representation of each character and the reference feature representation of the first knowledge label respectively, to obtain the first entity result.
[0096] In the embodiments of the present disclosure, the first knowledge label contains the first entity type, the first entity result includes the prediction probability of each character as the start character and the end character of the first entity, and the first entity belongs to the first entity type. It should be noted that, as described in the foregoing disclosed embodiments, the knowledge label can also contain the relationship type, and each time the fault knowledge is extracted, a pair of main / guest entity knowledge labels containing the same relationship type can be taken as the first knowledge label and the second knowledge label respectively. For example, As shown, the first time the fault knowledge is extracted, the "relation 1-main entity type" and the "relation 1-guest entity type" can be taken as a pair of main / guest entity knowledge labels, and in the case that the first entity prediction network is the first main entity prediction network and the second entity prediction network is the first guest entity prediction network, the "relation 1-main entity type" is the first knowledge label, and the "relation 1-guest entity type" is the second knowledge label; otherwise, in the case that the first entity prediction network is the second guest entity prediction network and the second entity prediction network is the second main entity prediction network, the "relation 1-guest entity type" is the first knowledge label, and the "relation 1-main entity type" is the second knowledge label. Similarly, the second time the fault knowledge is extracted, the "relation 2-main entity type" and the "relation 2-guest entity type" can be taken as a pair of main / guest entity knowledge labels, and in the case that the first entity prediction network is the first main entity prediction network and the second entity prediction network is the first guest entity prediction network, the "relation 2-main entity type" is the first knowledge label, and the "relation 2-guest entity type" is the second knowledge label; otherwise, in the case that the first entity prediction network is the second guest entity prediction network and the second entity prediction network is the second main entity prediction network, the "relation 2-guest entity type" is the first knowledge label, and the "relation 2-main entity type" is the second knowledge label. Other cases can be similarly deduced, and will not be listed one by one here.
[0097] It should be noted that, as described previously, the first entity result includes the prediction probability of each character as the start character and the end character of the first entity, and the first entity needs to have the relation type defined in the first knowledge label and belong to the first entity type. For example, in the case that the first knowledge label is "relation 1-main entity type", the first entity has "relation 1" and belongs to "main entity type", and other cases can be similarly deduced, and will not be listed one by one here.
[0098] In addition, the extraction process of the feature representation can refer to the related description in the foregoing disclosed embodiments, and will not be repeated here.
[0099] Step S53: Extract the second feature representation of each character in the product description text in combination with the first entity result.
[0100] It should be noted that, as described previously, the main / guest entity prediction and the guest / main entity prediction can be performed by the fault knowledge extraction module respectively, and then the second feature representation can be extracted by the second entity prediction network in the entity prediction network in combination with the first entity result. The specific network of the second entity prediction network in the main / guest entity prediction and the guest / main entity prediction can refer to the related description previously described, and will not be repeated here. In addition, the specific process of decoding the output result of the previous prediction network can refer to the two-stage relation extraction network such as CasRel, and the specific process will not be repeated here.
[0101] Step S54: inner product of the second feature representation of each character and the reference feature representation of the second knowledge label respectively, to obtain a second entity result.
[0102] In the embodiments of the present disclosure, similar to the first knowledge label, the second knowledge label contains a second entity type, and as described above, the first knowledge label and the second knowledge label have the same relationship type, the second entity result includes the prediction probability of each character as the start character and the end character of the second entity, and the second entity belongs to the second entity type. Specifically, the second entity needs to have the relationship type defined in the second knowledge label and belong to the second entity type. For example, when the second knowledge label is "relationship 1-guest entity type", the first entity has "relationship 1" and belongs to "guest entity type", and other cases can be similarly deduced, which will not be repeated here.
[0103] It should be noted that, as described above, when the entity prediction network is the first prediction network (i.e., when the host-guest entity is predicted), the first entity result is the first prediction result of the host entity, the second entity result is the first prediction result of the guest entity, the first knowledge label is the knowledge label related to the host entity type, and the second knowledge label is the knowledge label related to the guest entity type; and when the entity prediction network is the second prediction network (i.e., when the guest-host entity is predicted), the first entity result is the first prediction result of the guest entity, the second entity result is the second prediction result of the host entity, the first knowledge label is the knowledge label related to the guest entity type, and the second knowledge label is the knowledge label related to the host entity type.
[0104] The above scheme predicts the prediction probability of each character as the start / end of the entity by inner product of the feature representation of each character and the reference feature representation of the knowledge label, so that the interaction of the knowledge label can be combined in the fault knowledge extraction process, which helps to improve the accuracy and completeness of the fault knowledge extraction.
[0105] Please refer to , is a framework schematic diagram of an embodiment of the fault knowledge text extraction device 60 of the application. The fault knowledge text extraction device 60 comprises a prediction module 61, an extraction module 62, and a construction module 63. The prediction module 61 is configured to sequentially perform main entity prediction and guest entity prediction on the product description text to obtain a first prediction result of the main entity and a first prediction result of the guest entity, and sequentially perform guest entity prediction and main entity prediction on the product description text to obtain a second prediction result of the guest entity and a second prediction result of the main entity. The extraction module 62 is configured to extract the main fault entity from the product description text based on the first prediction result of the main entity and the second prediction result of the main entity, and extract the guest fault entity from the product description text based on the first prediction result of the guest entity and the second prediction result of the guest entity. The construction module 63 is configured to construct the fault knowledge text based on the main fault entity and the guest fault entity. The main entity prediction and the guest entity prediction are both implemented by the fault knowledge extraction module.
[0106] The above scheme can provide feedback between the main entity prediction and the guest entity prediction on the extraction task of the main entity, and provide feedback between the main entity prediction and the guest entity prediction on the extraction task of the guest entity, thereby significantly improving the completeness of the main / guest entity extracted by the knowledge extraction module, and helping to improve the extraction effect of the fault knowledge.
[0107] In some disclosed embodiments, when the fault knowledge extraction module is trained based on the sample product description text, the training is performed based on the prediction difference between the main entity prediction and the guest entity prediction on the sample main fault entity, and the prediction difference between the main entity prediction and the guest entity prediction on the sample guest fault entity.
[0108] In some disclosed embodiments, when the fault knowledge extraction module is trained, the main entity prediction is performed to obtain a sample main entity first prediction result and a sample guest entity first prediction result, and the guest entity prediction is performed to obtain a sample guest entity second prediction result and a sample main entity second prediction result. The training loss at least includes a first sub-loss obtained based on the measurement of the sample main entity first prediction result and the sample main entity second prediction result, and a second sub-loss obtained based on the measurement of the sample guest entity first prediction result and the sample guest entity second prediction result.
[0109] In some disclosed embodiments, the sample main entity first prediction result includes sample probabilities of characters in the sample product description text as start characters and end characters of the sample main fault entity, the sample main entity second prediction result includes sample probabilities of characters in the sample product description text as start characters and end characters of the sample main fault entity, and the first sub-loss is obtained based on the distribution difference between the sample probabilities in the sample main entity first prediction result and the sample probabilities in the sample main entity second prediction result.
[0110] In some disclosed embodiments, the sample entity first prediction result includes sample probabilities that each character in the sample product description text is a start character or an end character of a sample fault entity, the sample entity second prediction result includes sample probabilities that each character in the sample product description text is a start character or an end character of a sample fault entity, and the second sub-loss is obtained based on a distribution difference between the sample probabilities in the sample entity first prediction result and the sample probabilities in the sample entity second prediction result.
[0111] In some disclosed embodiments, the sample product description text is labeled with sample main entity actual position markers representing positions of the sample fault main entity, and the sample product description text is also labeled with sample entity actual position markers representing positions of the sample fault entity; wherein the training loss further includes a third sub-loss and a fourth loss, the third sub-loss is obtained based on a difference between the sample main entity first prediction result and the sample main entity actual position markers and a difference between the sample entity first prediction result and the sample entity actual position markers, and the fourth loss is obtained based on a difference between the sample main entity second prediction result and the sample main entity actual position markers and a difference between the sample entity second prediction result and the sample entity actual position markers.
[0112] In some disclosed embodiments, the main entity first prediction result and the main entity second prediction result are predicted by referring to reference feature representations corresponding to knowledge labels related to the main entity type, the entity first prediction result and the entity second prediction result are predicted by referring to reference feature representations corresponding to knowledge labels related to the entity type, and the knowledge labels related to the main entity type and the knowledge labels related to the entity type have the same relationship type.
[0113] In some disclosed embodiments, the fault knowledge text extraction device 60 comprises a combination module configured to combine each of the plurality of relation types with each of the different subject entity types and to combine each of the plurality of relation types with each of the different object entity types, to obtain a plurality of knowledge labels; the fault knowledge text extraction device 60 comprises an initial extraction module configured to extract initial feature representations of each of the plurality of knowledge labels using the feature extraction network; the fault knowledge text extraction device 60 comprises a training module configured to measure a network loss based on feature similarities between the initial feature representations of different knowledge labels, and in the case that the network loss does not satisfy a training convergence condition, to adjust network parameters of the feature extraction network based on the network loss, and to re-execute the step of extracting initial feature representations of each of the plurality of knowledge labels using the feature extraction network until the network loss satisfies the training convergence condition; the fault knowledge text extraction device 60 comprises a final extraction module configured to extract reference feature representations of each of the plurality of knowledge labels using the trained feature extraction network.
[0114] In some disclosed embodiments, the prediction module 61 comprises a first extraction submodule configured to extract first feature representations of each character in the product description text; the prediction module 61 comprises a first inner product submodule configured to perform inner products between the first feature representations of each character and the reference feature representations of the first knowledge label to obtain first entity results; wherein the first knowledge label contains a first entity type, the first entity results include prediction probabilities of the characters in the product description text as start characters and end characters of the first entity, and the first entity belongs to the first entity type; the prediction module 61 comprises a second extraction submodule configured to extract second feature representations of each character in the product description text in combination with the first entity results; the prediction module 61 comprises a second inner product submodule configured to perform inner products between the second feature representations of each character and the reference feature representations of the second knowledge label to obtain second entity results; wherein the second knowledge label contains a second entity type, and the first knowledge label and the second knowledge label have the same relation type, the second entity results include prediction probabilities of each character as a start character and an end character of the second entity, and the second entity belongs to the second entity type; in the case of subject-object entity prediction, the first entity results are the first prediction results of the subject entity, the second entity results are the first prediction results of the object entity, the first knowledge label is a knowledge label related to the subject entity type, and the second knowledge label is a knowledge label related to the object entity type; in the case of object-subject entity prediction, the first entity results are the first prediction results of the object entity, the second entity results are the second prediction results of the subject entity, the first knowledge label is a knowledge label related to the object entity type, and the second knowledge label is a knowledge label related to the subject entity type.
[0115] In some disclosed embodiments, the fault extraction module is composed of a network model, and the fault knowledge extraction module includes a first prediction network and a second prediction network, the first prediction network is used to perform subject-predicate-object entity prediction, and includes a first subject prediction network and a first object prediction network connected in sequence, the second prediction network is used to perform predicate-subject-object entity prediction, and includes a second object prediction network and a second subject prediction network connected in sequence.
[0116] In some disclosed embodiments, the object entity type of the fault object entity is a fault phenomenon, and the fault knowledge extraction module further includes a third prediction network; the fault knowledge text extraction device 60 includes a splicing module configured to splice the fault object entity and the product description text to obtain a to-be-processed text; the prediction module 61 is further configured to use the third prediction network to predict the to-be-processed text to obtain a position prediction result of at least one of the fault cause and the solution; the extraction module 62 is further configured to extract additional knowledge text from the product description text based on the position prediction result; and the additional knowledge text includes at least one of the fault cause and the solution; and the construction module 63 is specifically configured to construct the fault knowledge text based on the fault subject entity, the fault object entity, and the additional knowledge text.
[0117] In some disclosed embodiments, the first prediction result of the subject entity includes prediction probabilities of each character in the product description text as a start character and an end character of the fault subject entity, the second prediction result of the subject entity includes prediction probabilities of each character in the product description text as the start character and the end character of the fault subject entity, the extraction module 62 includes a first fusion sub-module configured to fuse, for each character, a prediction probability of the character in the first prediction result of the subject entity and a prediction probability of the character in the second prediction result of the subject entity to obtain final probabilities of the corresponding character as the start character and the end character of the fault subject entity; and the extraction module 62 includes a first extraction sub-module configured to extract the fault subject entity from the product description text based on the final probabilities of the character in the product description text as the start character and the end character of the fault subject entity.
[0118] In some disclosed embodiments, the first prediction result of the object entity includes prediction probabilities of each character in the product description text as a start character and an end character of the fault object entity, the second prediction result of the object entity includes prediction probabilities of each character in the product description text as the start character and the end character of the fault object entity, the extraction module 62 includes a second fusion sub-module configured to fuse, for each character, a prediction probability of the character in the first prediction result of the object entity and a prediction probability of the character in the second prediction result of the object entity to obtain final probabilities of the corresponding character as the start character and the end character of the fault object entity; and the extraction module 62 includes a second extraction sub-module configured to extract the fault object entity from the product description text based on the final probabilities of the character in the product description text as the start character and the end character of the fault object entity.
[0119] Please refer to , is a schematic diagram of an embodiment of an electronic device 70 of the present application. The electronic device 70 comprises a memory 71 and a processor 72 coupled to each other, the memory 71 stores program instructions, and the processor 72 is configured to execute the program instructions to implement the steps in any of the above embodiments of the method for extracting fault knowledge text. Specifically, the electronic device 70 can include but is not limited to a desktop computer, a notebook computer, a server, a mobile phone, a tablet computer, etc., which are not limited herein.
[0120] Specifically, the processor 72 is configured to control itself and the memory 71 to implement the steps in any of the above embodiments of the method for extracting fault knowledge text. The processor 72 can also be referred to as a CPU (Central Processing Unit). The processor 72 can be an integrated circuit chip having a processing capability of signals. The processor 72 can also be a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like. In addition, the processor 72 can be implemented by an integrated circuit chip together.
[0121] The above scheme can enable the main entity prediction and the guest entity prediction to provide feedback to each other for the extraction task about the main entity, and enable the main entity prediction and the guest entity prediction to also provide feedback to each other for the extraction task about the guest entity, thereby being able to significantly improve the completeness of the main / guest entity extracted by the knowledge extraction module, and helping to improve the extraction effect of fault knowledge.
[0122] Please refer to , is a schematic diagram of an embodiment of a computer-readable storage medium 80 of the present application. The computer-readable storage medium 80 stores program instructions 81 executable by a processor, and the program instructions 81 are configured to implement the steps in any of the above embodiments of the method for extracting fault knowledge text.
[0123] The above scheme can make the main entity prediction and the guest entity prediction provide feedback to each other on the extraction task of the main entity, and make the main entity prediction and the guest entity prediction also provide feedback to each other on the extraction task of the guest entity, thereby significantly improving the integrity of the main / guest entity extracted by the knowledge extraction module, and helping to improve the extraction effect of fault knowledge.
[0124] In some embodiments, the apparatus provided by the embodiments of the present disclosure has functions or includes modules that can be used to perform the methods described in the above method embodiments, and the specific implementation can refer to the description of the above method embodiments. For brevity, details are not repeated here.
[0125] The above description of various embodiments tends to emphasize the differences between various embodiments, and the same or similar parts can be mutually referred to. For brevity, details are not repeated here.
[0126] In several embodiments provided in the present application, it should be understood that the disclosed methods and apparatuses can be implemented in other ways. For example, the above-described apparatus implementation is only schematic, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual elements can be indirect coupling or communication connection through some interface, apparatus or unit, and can be electrical, mechanical or other forms.
[0127] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment scheme.
[0128] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0129] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods in the embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various other media that can store program codes.
[0130] If the technical solutions of the present application involve personal information, the product applying the technical solutions of the present application has been informed of the personal information processing rules before processing the personal information, and has obtained the personal independent consent. If the technical solutions of the present application involve sensitive personal information, the product applying the technical solutions of the present application has obtained the personal independent consent before processing the sensitive personal information, and at the same time meets the requirement of "explicit consent". For example, at the personal information collection device such as camera, a clear and prominent mark is set to inform that the personal information collection range has been entered, and the personal information will be collected. If the person voluntarily enters the collection range, it is regarded as agreeing to collect the personal information. Or, on the device for processing personal information, the personal information processing rules are informed by using obvious mark / information, and the personal authorization is obtained by means of pop-up information or asking the person to upload his / her personal information. The personal information processing rules can include personal information processor, personal information processing purpose, processing method, and personal information type, etc.
Claims
1. A method for extracting fault knowledge text, characterized in that, include: The product description text is sequentially subjected to subject-object entity prediction to obtain the first prediction result of the subject entity and the first prediction result of the object entity. Then, the product description text is sequentially subjected to object-subject entity prediction to obtain the second prediction result of the object entity and the second prediction result of the subject entity. The subject-object entity prediction and the object-subject entity prediction are both implemented by the fault knowledge extraction module. Based on the first prediction result and the second prediction result of the main entity, the faulty main entity is extracted from the product description text, and based on the first prediction result and the second prediction result of the guest entity, the faulty guest entity is extracted from the product description text. Based on the faulty main entity and the faulty object entity, a fault knowledge text is constructed; The first and second prediction results for the main entity both include the predicted probabilities of characters in the product description text as the start and end characters of the faulty main entity. Similarly, the first and second prediction results for the object entity both include the predicted probabilities of characters in the product description text as the start and end characters of the faulty object entity. Extracting the faulty main entity specifically includes: for each character, fusing the predicted probabilities in the first and second prediction results for the main entity to obtain the final probabilities of the corresponding character as the start and end characters of the faulty main entity; and extracting the faulty main entity from the product description text based on these final probabilities. Extracting the faulty object entity specifically includes: for each character, fusing the predicted probabilities in the first and second prediction results for the object entity to obtain the final probabilities of the corresponding character as the start and end characters of the faulty object entity; and extracting the faulty object entity from the product description text based on these final probabilities.
2. The method according to claim 1, characterized in that, When training based on sample product description text, the fault knowledge extraction module is trained based on the prediction differences between the subject-object entity prediction and the object-subject entity prediction regarding the sample fault subject entity, and the prediction differences between the subject-object entity prediction and the object-subject entity prediction regarding the sample fault object entity.
3. The method according to claim 2, characterized in that, During training, the fault knowledge extraction module performs subject-object entity prediction to obtain a first prediction result for the sample subject entity and a first prediction result for the sample object entity, and performs object-subject entity prediction to obtain a second prediction result for the sample object entity and a second prediction result for the sample subject entity. The training loss includes at least: a first sub-loss measured based on the first prediction result for the sample subject entity and the second prediction result for the sample subject entity, and a second sub-loss measured based on the first prediction result for the sample object entity and the second prediction result for the sample object entity.
4. The method according to claim 3, characterized in that, The first prediction result of the sample main entity includes the sample probabilities of the characters in the sample product description text being used as the start and end characters of the sample fault main entity, respectively. The second prediction result of the sample main entity includes the sample probabilities of the characters in the sample product description text being used as the start and end characters of the sample fault main entity, respectively. The first sub-loss is obtained based on the difference measure between the sample probabilities in the first prediction result of the sample main entity and the sample probabilities in the second prediction result of the sample main entity.
5. The method according to claim 3, characterized in that, The first prediction result of the sample object entity includes the sample probabilities of the characters in the sample product description text as the start character and end character of the sample fault object entity, respectively. The second prediction result of the sample object entity includes the sample probabilities of the characters in the sample product description text as the start character and end character of the sample fault object entity, respectively. The second sub-loss is obtained based on the difference measure between the sample probabilities in the first prediction result of the sample object entity and the sample probabilities in the second prediction result of the sample object entity.
6. The method according to claim 3, characterized in that, The sample product description text is marked with the actual location marker of the main entity of the sample failure, which represents the location of the main entity of the sample failure. The sample product description text is also marked with the actual location marker of the guest entity of the sample failure, which represents the location of the guest entity of the sample failure. The training loss further includes a third sub-loss and a fourth loss. The third sub-loss is based on the following two measures: the difference between the first prediction result of the sample main entity and the actual location label of the sample main entity, and the difference between the first prediction result of the sample guest entity and the actual location label of the sample guest entity. The fourth loss is based on the following two measures: the difference between the second prediction result of the sample main entity and the actual location label of the sample main entity, and the difference between the second prediction result of the sample guest entity and the actual location label of the sample guest entity.
7. The method according to claim 1, characterized in that, The first prediction result and the second prediction result of the main entity are predicted by referring to the reference feature representation corresponding to the knowledge tag related to the main entity type, and the first prediction result and the second prediction result of the object entity are predicted by referring to the reference feature representation corresponding to the knowledge tag related to the object entity type, and the knowledge tag related to the main entity type and the knowledge tag related to the object entity type have the same relationship type.
8. The method according to claim 7, characterized in that, The steps for obtaining the reference feature representation include: Several relation types are combined with different main entity types in pairs, and the several relation types are combined with different object entity types in pairs to obtain several knowledge tags; Feature extraction networks are used to extract features from various knowledge tags to obtain initial feature representations for each knowledge tag. Based on the feature similarity between the initial feature representations of different knowledge labels, the network loss is measured. If the network loss does not meet the training convergence condition, the network parameters of the feature extraction network are adjusted based on the network loss, and the step of extracting the initial feature representations of various knowledge labels using the feature extraction network is re-executed until the network loss meets the training convergence condition. By using a convergent feature extraction network, features are extracted from various knowledge labels to obtain reference feature representations for each knowledge label.
9. The method according to claim 7, characterized in that, If a faulty main entity belonging to the main entity type is extracted by referring to knowledge tags related to the main entity type, and a faulty guest entity belonging to the guest entity type is extracted by referring to knowledge tags related to the guest entity type, the faulty knowledge text includes the faulty main entity belonging to the main entity type, the faulty guest entity belonging to the guest entity type, and the same relationship type.
10. The method according to any one of claims 1 to 9, characterized in that, The step of sequentially performing subject-object entity prediction on the product description text to obtain a first prediction result for the subject entity and a first prediction result for the object entity, or the step of sequentially performing subject-object entity prediction on the product description text to obtain a second prediction result for the object entity and a second prediction result for the subject entity, includes: Extract the first feature representation of each character in the product description text; The first feature representation of each character is inner-producted with the reference feature representation of the first knowledge tag to obtain the first entity result; wherein, the first knowledge tag contains a first entity type, the first entity result includes the predicted probabilities of the characters in the product description text as the start character and end character of the first entity, and the first entity belongs to the first entity type; Based on the first entity result, extract the second feature representation of each character in the product description text; The second feature representation of each character is inner-producted with the reference feature representation of the second knowledge tag to obtain the second entity result; wherein the second knowledge tag contains a second entity type, and the first knowledge tag and the second knowledge tag have the same relationship type, the second entity result includes the predicted probabilities of each character as the start character and end character of the second entity, and the second entity belongs to the second entity type; In the case of subject-object entity prediction, the first entity result is the first prediction result of the subject entity, the second entity result is the first prediction result of the object entity, the first knowledge tag is a knowledge tag related to the subject entity type, and the second knowledge tag is a knowledge tag related to the object entity type; in the case of object-subject entity prediction, the first entity result is the first prediction result of the object entity, the second entity result is the second prediction result of the subject entity, the first knowledge tag is a knowledge tag related to the object entity type, and the second knowledge tag is a knowledge tag related to the subject entity type.
11. The method according to claim 1, characterized in that, The fault extraction module is composed of a network model. The fault knowledge extraction module includes a first prediction network and a second prediction network. The first prediction network is used to perform the subject-object entity prediction and includes a first subject entity prediction network and a first object entity prediction network connected in sequence. The second prediction network is used to perform the object-subject entity prediction and includes a second object entity prediction network and a second subject entity prediction network connected in sequence.
12. The method according to claim 1, characterized in that, The object type of the faulty object is a fault phenomenon, and the fault knowledge extraction module also includes a third prediction network. Before constructing the fault knowledge text based on the faulty main entity and the faulty guest entity, the method further includes: The faulty object is concatenated with the product description text to obtain the text to be processed; The third prediction network is used to predict the text to be processed, and the location prediction result of at least one of the fault cause and solution is obtained. Based on the location prediction results, additional knowledge text is extracted from the product description text; wherein, the additional knowledge text includes at least one of the cause of the failure and the solution. The construction of fault knowledge text based on the faulty main entity and the faulty object entity includes: Based on the faulty main entity, the faulty object entity, and the additional knowledge text, the fault knowledge text is constructed.
13. A device for extracting fault knowledge text, characterized in that, include: The prediction module is used to sequentially predict the subject and object entities of the product description text to obtain the first prediction result of the subject entity and the first prediction result of the object entity, and to sequentially predict the object and subject entities of the product description text to obtain the second prediction result of the object entity and the second prediction result of the subject entity; wherein, the subject and object entity prediction and the object and subject entity prediction are both implemented by the fault knowledge extraction module; An extraction module is used to extract faulty main entities from the product description text based on the first prediction result and the second prediction result of the main entity, and to extract faulty customer entities from the product description text based on the first prediction result and the second prediction result of the customer entity. The construction module is used to construct fault knowledge text based on the faulty main entity and the faulty guest entity; The first and second prediction results for the main entity both include the predicted probabilities of characters in the product description text as the start and end characters of the faulty main entity. Similarly, the first and second prediction results for the object entity both include the predicted probabilities of characters in the product description text as the start and end characters of the faulty object entity. Extracting the faulty main entity specifically includes: for each character, fusing the predicted probabilities in the first and second prediction results for the main entity to obtain the final probabilities of the corresponding character as the start and end characters of the faulty main entity; and extracting the faulty main entity from the product description text based on these final probabilities. Extracting the faulty object entity specifically includes: for each character, fusing the predicted probabilities in the first and second prediction results for the object entity to obtain the final probabilities of the corresponding character as the start and end characters of the faulty object entity; and extracting the faulty object entity from the product description text based on these final probabilities.
14. An electronic device, characterized in that, The method includes a memory and a processor coupled to each other, wherein the memory stores program instructions and the processor executes the program instructions to implement the method for extracting fault knowledge text as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the method for extracting fault knowledge text as described in any one of claims 1 to 12.
Citation Information
Patent Citations
Excavator fault knowledge graph construction method based on deep learning
CN113449072A
Question answering method and related device, electronic equipment and storage medium
CN114357107A