Web page content display method, device, electronic device and computer-readable medium
By extracting and correcting the document object tree and knowledge graph of the web page, accurate consultation response content is generated, which solves the problems of the question-answering model answering irrelevant questions and the server being overloaded, and achieves efficient user consultation processing.
Patent Information
- Application Number
- CN202510032645.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-01-09
AI Technical Summary
In the existing technology, when processing user consultation questions, the question-answering model may give irrelevant answers due to different entity semantics, and under high traffic conditions, the server is overloaded, affecting the normal operation and loading of the web page.
By obtaining the document object tree and knowledge graph of the target web page, extracting object nodes and association relationships, generating a set of key information blocks, performing entity extraction and correction processing, generating a corrected knowledge graph, storing and utilizing it to generate accurate consultation response content, and displaying it in text, audio, image or video modalities.
It achieves accurate responses to user inquiries, reduces generation time, avoids excessive server load, and ensures normal operation of web pages.
Smart Images

Figure CN119939067B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and more particularly to a method, device, electronic device, and computer-readable medium for displaying web page content. Background Art
[0002] With the continuous development of computer technology, the application of knowledge graphs in user consultation scenarios is becoming increasingly widespread. To respond to user questions entered on a webpage, the typical approach is: first, extract the user's query on the webpage. Then, input the query into a question-and-answer model to generate a response. Finally, the response is displayed on the webpage.
[0003] However, when using the above method, the following technical problems often occur:
[0004] When users enter questions on web pages, the question-answering model may extract different question semantics based on the different semantic meanings of entities, resulting in irrelevant answers. Furthermore, when users access large amounts of data, accurately determining the question semantics takes a long time and requires a lot of resources. This can overload the backend servers corresponding to the web pages, potentially affecting the normal operation and loading of the web pages.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the Invention
[0006] The content of this disclosure is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this disclosure is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0007] Some embodiments of the present disclosure provide methods, devices, electronic devices, and computer-readable media for displaying web page content to solve one or more of the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a web page content display method, comprising: obtaining a document object tree and a target knowledge graph stored in a target memory corresponding to a target web page, wherein the target web page is a web page for a target scenario under a target domain, and the target knowledge graph is a knowledge graph corresponding to the target scenario; extracting each object node in the document object tree to obtain an object node set and a node association relationship; generating a key information block set corresponding to the document object tree based on the object node set and the node association relationship; generating entity extraction information for the target web page based on the key information block set; and based on the entity extraction information, Perform entity correction processing on the target knowledge graph to generate a corrected knowledge graph; store the corrected knowledge graph and the scene information corresponding to the target scene in a target storage terminal; in response to receiving user consultation information input by the target user for the target web page, generate user consultation semantic information based on the corrected knowledge graph and the user consultation information stored in the target storage terminal; generate consultation reply content for the user consultation semantic information; display the consultation reply content on the target web page in a target display mode, wherein the target display mode is one of the following: text mode, audio mode, image mode, video mode.
[0009] In a second aspect, some embodiments of the present disclosure provide a web page content display device, comprising: an acquisition unit, configured to acquire a document object tree and a target knowledge graph stored in a target memory corresponding to a target web page, wherein the target web page is a web page for a target scenario under a target domain, and the target knowledge graph is a knowledge graph corresponding to the target scenario; an extraction unit, configured to extract each object node in the document object tree to obtain an object node set and a node association relationship; a first generation unit, configured to generate a key information block set corresponding to the document object tree based on the object node set and the node association relationship; a second generation unit, configured to generate entity extraction information for the target web page based on the key information block set; and a correction unit, configured to generate entity information for the target web page based on the entity Extract information and perform entity correction processing on the above-mentioned target knowledge graph to generate a corrected knowledge graph; a storage unit is configured to store the above-mentioned corrected knowledge graph and the scene information corresponding to the above-mentioned target scene to a target storage terminal; a third generation unit is configured to generate user consultation semantic information in response to receiving user consultation information input by the target user for the above-mentioned target web page according to the corrected knowledge graph and the above-mentioned user consultation information stored in the above-mentioned target storage terminal; a fourth generation unit is configured to generate consultation reply content for the above-mentioned user consultation semantic information; a display unit is configured to display the above-mentioned consultation reply content on the above-mentioned target web page in a target display mode, wherein the above-mentioned target display mode is one of the following: text mode, audio mode, image mode, video mode.
[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0012] The above-described embodiments of the present disclosure have the following beneficial effects: Through the webpage content display methods of some embodiments of the present disclosure, based on accurately generating a knowledge graph using entity semantic content, the target user's inquiry semantic content can be accurately identified, thereby facilitating accurate inquiry responses. Specifically, the reason for the inaccurate inquiry responses and the impact on the normal operation of the webpage is that the question-answering model may extract different question semantics based on the different entity semantic meanings for the inquiry questions entered by the user on the webpage, resulting in irrelevant answers. In addition, when the user accesses a large amount of data, the accurate determination of question semantics takes a long time and requires a large number of resources, which overloads the backend server corresponding to the webpage, potentially affecting the normal operation and loading of the webpage. Based on this, the webpage content display methods of some embodiments of the present disclosure first obtain the document object tree and target knowledge graph corresponding to the target webpage stored in the target memory. Here, by pre-storing the document object tree and knowledge graph in the target memory, it is convenient to subsequently call the processor to extract object nodes and node associations. In addition, it is also used to determine the association relationships and true semantic knowledge graph corresponding to each entity in the target scenario. Here, the target knowledge graph is a graph that represents the relationship between various entities pre-built and stored in the target scenario. Then, each object node in the above-mentioned document object tree is extracted to obtain an object node set and a node association relationship, so as to facilitate the subsequent extraction of key web page content in the above-mentioned target web page corresponding to the document object tree. Then, based on the above-mentioned object node set and the above-mentioned node association relationship, a key information block set corresponding to the above-mentioned document object tree can be accurately generated. Here, the generated key information block set is used to determine the meaning of each entity corresponding to the target web page, so as to make corresponding adjustments to the entities in the target knowledge graph and generate a knowledge graph applicable to the target web page. Then, based on the above-mentioned key information block set, entity extraction information for the above-mentioned target web page can be accurately generated. Then, based on the above-mentioned entity extraction information, entity correction processing is performed on the above-mentioned target knowledge graph to accurately generate a corrected knowledge graph corresponding to the target web page. Secondly, the above-mentioned corrected knowledge graph and the web page information corresponding to the above-mentioned target web page are stored in the target storage terminal, so as to facilitate the subsequent real-time and accurate determination of the question semantic content of the search information under the target web page. Furthermore, in response to receiving user inquiry information input by a target user for the target webpage, user inquiry semantic information can be accurately generated based on the corrected knowledge graph stored in the target storage terminal and the user inquiry information. Furthermore, inquiry response content specific to the user inquiry semantic information is accurately generated to facilitate subsequent responses to the target user. Finally, the inquiry response content is displayed on the target webpage in a target display modality, where the target display modality is one of the following: text modality, audio modality, image modality, or video modality.In summary, by extracting key information blocks from the document object tree and generating a knowledge graph corresponding to the target webpage based on these blocks, we can provide accurate responses to user inquiries. Furthermore, generating a knowledge graph corresponding to the target webpage reduces the time required to generate inquiry semantic information, avoiding heavy server loads caused by massive user requests and further preventing webpage malfunctions. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0014] Figure 1 is a flow chart of some embodiments of the webpage content display method according to the present disclosure;
[0015] Figure 2 is a schematic structural diagram of some embodiments of the webpage content display device according to the present disclosure;
[0016] Figure 3 It is a structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0018] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.
[0019] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0020] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0021] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0022] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0023] refer to Figure 1 , shows a process 100 of some embodiments of the web page content display method according to the present disclosure. The web page content display method includes the following steps:
[0024] Step 101: Obtain the document object tree and target knowledge graph stored in the target memory corresponding to the target web page.
[0025] In some embodiments, the execution subject of the above-mentioned web page content display method (for example, an electronic device) can obtain the document object tree and target knowledge graph corresponding to the target web page through a wired connection or a wireless connection. Among them, the target web page can be a page that supports user consultation and access. For example, the target netizen can be a search page. The above-mentioned target web page is a web page for a target scene under a target field. The target field can be a predetermined field to be subjected to entity correction. For example, the target field can be an e-commerce field. The target scene can be a certain scene within the target field. For example, the target scene can be an after-sales scene of an item. The above-mentioned target knowledge graph is a knowledge graph corresponding to the above-mentioned target scene. That is, the target knowledge graph can be a knowledge graph corresponding to each relevant entity under the target scene. For example, for the target scene being an after-sales scene of an item, the corresponding entities can be each item, each merchant, and each supply location registered by the e-commerce company to support after-sales processing. The document object tree can be the DOM (Document Object Model) tree of the web page.
[0026] Here, after determining the request to generate the knowledge graph corresponding to the target web page, the execution entity will store the document object tree and the target knowledge graph in the target memory in advance, so as to facilitate the subsequent call of the processor to execute the generation of the knowledge graph corresponding to the target web page. Here, the processor can be a central processing unit (CPU). By pre-storing the document object tree and the target knowledge graph in the target memory, the processor can effectively and quickly obtain the corresponding calculation data, greatly improving the execution efficiency of the processor and the generation efficiency of the knowledge graph corresponding to the target web page.
[0027] Step 102: extract each object node in the document object tree to obtain an object node set and node association relationships.
[0028] In some embodiments, the execution subject may extract each object node in the document object tree to obtain an object node set and a node association relationship. The object node set may be each document object in the document object tree. The node association relationship may represent the correspondence between each object node. For example, the node association relationship may be one of the following: a parent-child relationship. It should be noted that the execution subject may extract each object node in the document object tree in the processor by a deep traversal to obtain an object node set and a node association relationship.
[0029] As an example, the execution subject may extract each object node in the document object tree using a preset target regular expression for extracting object nodes, and obtain an object node set and a node association relationship.
[0030] Step 103: Generate a key information block set corresponding to the document object tree according to the object node set and the node association relationship.
[0031] In some embodiments, the execution entity may generate a key information block set corresponding to the document object tree based on the object node set and the node association relationship. The key information block may be key node content in the object node set. The key information block set may represent key webpage content in the target webpage. The key information in each key information block may be aggregated information blocks.
[0032] Here, by extracting the key information block set, the main direction and content scenario corresponding to the main webpage content of the target webpage are determined, so as to realize entity extraction for the target webpage.
[0033] In some optional implementations of some embodiments, the execution entity may generate a key information block set corresponding to the document object tree according to the object node set and the node association relationship, including the following steps:
[0034] The first step is to divide the object nodes in the above-mentioned object node set into node hierarchies according to the above-mentioned node association relationship to generate a hierarchical node set group. Among them, the hierarchical nodes in the hierarchical node set belong to the same level. Among them, the node hierarchy can represent the hierarchical position of the object node in the document object tree. Among them, the hierarchical nodes in the hierarchical node set are nodes at the same hierarchical position. Each hierarchical node set in the hierarchical node set group has a corresponding hierarchical position. For example, for an object tree with a document object tree of three layers of nodes, the corresponding hierarchical node set group includes: a first-level node set, a second-level node set, and a third-level node set. Each node in the first-level node set is a node under the first level. Each node in the second-level node set is a node under the second level. Each node in the third-level node set is a node under the third level.
[0035] In the second step, for the target level node set corresponding to the current level in the level node set group, the following second generation step is performed:
[0036] Sub-step 1: For each level node in the target level node set, perform the following third generation step:
[0037] The first sub-step is to determine the child node set corresponding to the above-mentioned level node as the target child node set. The target level node set is each level node under the current level. The target child node set is each child node under the level node.
[0038] The second sub-step is to divide each sub-node in the target sub-node set to generate a sub-node group set, wherein the number of sub-node groups in the sub-node group set is a predetermined number, for example, the number of sub-node groups is 3.
[0039] As an example, the execution entity may use a predetermined node partitioning rule to partition each sub-node in the target sub-node set to generate a sub-node group set. For example, the node partitioning rule may be a random partitioning rule.
[0040] The third sub-step is to determine the node information similarity between each sub-node group in the above-mentioned sub-node group set to obtain a similarity set. Each sub-node group includes at least one sub-node. The node information can be the overall node information corresponding to each sub-node in the sub-node group. For example, the node information corresponding to the sub-node group can be the node information obtained by splicing the contents of each node in the sub-node group. The node information similarity can be the degree of information similarity of the node information between two sub-node groups. For example, the similarity can be a numerical value between 0 and 1. The higher the numerical value, the more similar the overall node information corresponding to the two sub-node groups is. In practice, the node information similarity can be cosine similarity.
[0041] The fourth sub-step is to determine, based on the similarity set, at least one sub-node group in the sub-node group set whose corresponding similarities are greater than a target value, as a target sub-node set. The target value may be a predetermined similarity value, for example, 0.7.
[0042] The fifth sub-step is to generate key nodes based on the target child node set, wherein the key nodes are nodes with crucial content in the document object tree.
[0043] As an example, the execution entity may determine the target child node set as key nodes.
[0044] Sub-step 2: determining the node contents corresponding to the obtained key nodes as a key information block group. Each key information block has corresponding key node contents.
[0045] Sub-step 3: In response to determining that the target level node set corresponds to the last level, each key node group obtained is determined as a key information block set.
[0046] In the third step, in response to determining that the level corresponding to the target level node set is not the last level, each target child node set is removed from the target level node set to obtain a level node set after removal.
[0047] In the fourth step, the node set of the removed level is used as the target level node set, and the next level corresponding to the target level node set is used as the current level, and the above second generation step is continued.
[0048] Step 104: Generate entity extraction information for the target web page based on the key information block set.
[0049] In some embodiments, the execution entity may generate entity extraction information for the target webpage based on the key information block set. The entity extraction information may be an entity extraction result of the webpage content corresponding to the target webpage. The entity extraction information may include various entities involved in the target webpage.
[0050] In some optional implementations of some embodiments, the execution entity may generate entity extraction information for the target webpage according to the key information block set, including the following steps:
[0051] In the first step, for each key information block in the key information block set, the following first generation step is performed:
[0052] Sub-step 1: determining each information sentence included in the key information block as a key information sentence sequence.
[0053] Sub-step 2: Perform sentence length preprocessing on each key information sentence in the key information sentence sequence to generate a preprocessed sentence, thereby obtaining a sequence of preprocessed sentences. The sentence length preprocessing may include controlling the sentence length of the key information sentence to a target length. Specifically, sentence content is supplemented for shorter key information sentences, and sentence content is removed from longer sentences, to generate preprocessed sentences of the target length.
[0054] Sub-step 3: Input each pre-processed statement in the above-mentioned pre-processed statement sequence into a pre-trained sentence vector generation model to generate a sentence vector and obtain a sentence vector sequence. The sentence vector generation model can be a neural network model that generates sentence vectors. The sentence vector can be information in vector form that represents the semantic features of the sentence content corresponding to the pre-processed statement. In practice, the sentence vector generation model can be an encoding model. For example, the sentence vector generation model can be the encoding layer in the Transformer model.
[0055] In sub-step 4, each sentence vector in the above sentence vector sequence is sequentially input into a pre-trained self-attention mechanism model to generate text representation information. The self-attention mechanism model can be a neural network model based on the self-attention mechanism. For example, the self-attention mechanism model can be the self-attention mechanism layer in a Transformer model. The text representation information can be text representation content in vector form. Here, the self-attention mechanism model can be used to extract the comprehensive sentence content between each sentence vector to obtain attention feature information, thereby facilitating the generation of more accurate text representation information.
[0056] Sub-step 5: Generate entity information for the key information block based on the text representation information.
[0057] As an example, the execution entity may input the text representation information into an entity extraction model to generate entity information. The entity extraction model may be a neural network model for entity extraction.
[0058] The second step is to generate the above-mentioned entity extraction information based on the obtained entity information set.
[0059] As an example, the execution entity may directly determine the entity information set as entity extraction information.
[0060] In some optional implementations of some embodiments, the execution entity may generate entity information for the key information block based on the text representation information, including the following steps:
[0061] In the first step, each sentence vector in the above sentence vector sequence is combined according to the order of arrangement of key information sentences to generate a combined vector.
[0062] In the second step, the above text representation information and the above combination vector are concatenated in the target order to generate a concatenated vector.
[0063] In the third step, the concatenated vector is input into the entity information generation model of the multi-head entity output to generate an entity set as the entity information. The entity information generation model can be a neural network model that extracts multiple entities. For example, the entity information generation model can include a feature extraction layer, an attention layer, and a multi-head fully connected layer. The fully connected layers in the multi-head fully connected layer have a one-to-one correspondence with the entity outputs in the multi-head entity output.
[0064] In some optional implementations of some embodiments, the entity extraction information further includes: association relationship information between entities. The association relationship information may be association relationships between entities. For example, the entity correspondence relationship may be an entity affiliation relationship.
[0065] Optionally, generating the above-mentioned entity extraction information based on the obtained entity information set includes:
[0066] In the first step, for each entity information in the entity information set, perform the following determination steps:
[0067] Sub-step 1: determining a key information block corresponding to the entity information as a target key information block, wherein the target key information block may be the key information block to which the entity information belongs.
[0068] Sub-step 2: Determine the entity information set included in the target key information block.
[0069] Sub-step 3: remove the entity information from the entity information set to obtain a post-removal entity information set.
[0070] Sub-step 4: generating a determination instruction representing the correspondence between the entity information determined from the key information block and the entity information set after removal.
[0071] Sub-step 5: inputting the determination instruction into the large language model to generate an association relationship information group for the entity information.
[0072] In the second step, the entity information set and the relationship information set are determined as entity extraction information.
[0073] Step 105: Perform entity correction processing on the target knowledge graph based on the entity extraction information to generate a corrected knowledge graph.
[0074] In some embodiments, the execution entity may perform entity correction processing on the target knowledge graph based on the entity extraction information to generate a corrected knowledge graph.
[0075] As an example, the above-mentioned execution subject can replace entities with similar entities in the target knowledge graph according to the entities corresponding to the entity extraction information, so as to implement entity correction processing and obtain a corrected knowledge graph.
[0076] Step 106: Store the corrected knowledge graph and the scene information corresponding to the target scene in a target storage terminal.
[0077] In some embodiments, the execution entity may store the corrected knowledge graph and the scene information corresponding to the target scene in a target storage terminal.
[0078] Step 107 , in response to receiving the user inquiry information input by the target user for the target webpage, generating user inquiry semantic information according to the corrected knowledge graph stored in the target storage terminal and the user inquiry information.
[0079] In some embodiments, in response to receiving user consultation information input by the target user for the target webpage, the execution entity may generate user consultation semantic information based on the corrected knowledge graph stored in the target storage terminal and the user consultation information.
[0080] In some optional implementations of some embodiments, the corrected knowledge graph includes: entity vectors corresponding to each entity, association relationship information between each entity, and entity prefix vectors corresponding to each entity, where the entity prefix vector is the first target number of vector elements in the corresponding entity vector. The entity prefix vector represents the initial entity semantics of the corresponding entity in the target scenario. The entity vector can represent the entity semantic content corresponding to the entity. In practice, the target number can be a preset value. For example, the target number can be the value "5". For example, for the entity apple, the corresponding entity prefix vector is [0,2,13,1]. The corresponding semantic content of the entity in the target scenario can be represented as fruit, not a mobile phone.
[0081] Optionally, the execution entity may generate user inquiry semantic information based on the corrected knowledge graph and the user inquiry information stored in the target storage terminal, including the following steps:
[0082] In the first step, the user inquiry information is pre-processed to generate user inquiry pre-processed information, wherein the information pre-processing may include but is not limited to at least one of the following: information supplementation and information vectorization.
[0083] The second step is to extract at least one entity from the user consultation preprocessing information as at least one target entity and at least one initial entity semantic under the user consultation information. There is a one-to-one correspondence between the target entity in the at least one target entity and the initial entity semantic in the at least one initial entity semantic. The initial entity semantic can represent the entity semantic content of the target entity in the user consultation information.
[0084] As an example, the execution entity can use the entity extraction model to extract entities and corresponding entity semantics from the user query pre-processing information, obtaining at least one target entity and at least one initial entity semantic. In practice, the entity extraction model can include: an entity extraction layer and an entity semantic extraction layer.
[0085] The third step is to determine at least one target entity vector corresponding to the at least one target entity and at least one target entity prefix vector corresponding to the at least one initial entity semantics.
[0086] As an example, the execution entity may obtain an entity vector mapping table and an entity prefix vector mapping table from a target database, and determine at least one target entity vector corresponding to the at least one target entity and at least one target entity prefix vector corresponding to the at least one initial entity semantics based on the entity vector mapping table and the entity prefix vector mapping table.
[0087] In the fourth step, for each target entity vector in the at least one target entity vector, perform the fourth generation step:
[0088] Sub-step 1: determine the target entity prefix vector corresponding to the above target entity vector as the target vector.
[0089] Sub-step 2: Generate entity prefix vector query information for the target vector. The entity prefix vector query information may be query information for querying the entity position corresponding to the target vector from the corrected knowledge graph based on the entity prefix vector.
[0090] Sub-step 3, executes the above-mentioned entity prefix vector query information to query the corresponding entity position from the above-mentioned corrected knowledge graph as the target entity position. The entity position is determined based on the entity encoding information of at least one associated entity corresponding to the associated relationship information. In practice, the entity position can represent the position of the entity in the knowledge graph. Because the shape of the knowledge graph is different and the position is difficult to determine. Therefore, it can be determined by the entity encoding information of at least one associated entity with an associated relationship. For example, for the entity position of the target entity, the first 3 bits of at least one entity encoding information corresponding to at least one associated entity can be numerically combined to serve as the entity position corresponding to the target entity.
[0091] Here, using entity prefixes to perform vector queries can greatly improve query efficiency, save query resources, and reduce a large amount of query efficiency when there is a large amount of entity data in the knowledge graph, thereby avoiding wasting more real-time query resources of the target processor.
[0092] Sub-step 4: Determine at least one associated entity corresponding to the target entity location as at least one first target associated entity. The at least one associated entity may be at least one associated entity that has a location association relationship with the target entity location. For example, the at least one associated entity may be at least one entity that has a location proximity and an entity connection relationship with the target entity location.
[0093] Sub-step 5: Generate entity query semantic information for the user query information based on the at least one first target associated entity, the target vector, the target entity vector, and the entity prefix vector corresponding to the target entity position. The entity query semantic information may represent semantic features of the entity content of the user query information based on the corrected knowledge graph.
[0094] As an example, first, the above-mentioned execution entity can determine the initial entity semantics corresponding to the target entity vector as the target initial entity semantics. Then, the entity semantics of the entity prefix vector corresponding to the target entity position is determined as the knowledge graph entity semantics. Then, at least one encoding vector corresponding to at least one first target associated entity, the above-mentioned target entity vector, the first semantic vector corresponding to the target initial entity semantics, and the second semantic vector corresponding to the knowledge graph entity semantics are spliced to generate a spliced vector. Finally, the spliced vector is input to the attention layer + semantic information output layer to generate entity consultation semantic information under the above-mentioned user consultation information. Among them, the attention layer is used to filter out important entity feature information related to the entity from the spliced vector. The semantic information output layer can be a network layer for outputting entity consultation semantic information. For example, the attention layer can be an attention layer based on a convolutional neural network. The semantic information output layer can be a plurality of fully connected layers in series.
[0095] The fifth step is to generate user consultation semantic information based on the obtained at least one entity consultation semantic information and the above user consultation pre-processing information.
[0096] Optionally, the execution entity may generate user consultation semantic information based on the obtained at least one entity consultation semantic information and the user consultation pre-processing information, comprising the following steps:
[0097] The first step is to perform word segmentation processing on the above user consultation pre-processing information to generate a user consultation word set.
[0098] In the second step, for each user consultation word in the above user consultation word set, the fifth generation step is performed:
[0099] Sub-step 1: Determine whether the user consultation word has a corresponding entity consultation semantic in the at least one entity consultation semantic, wherein the corresponding entity consultation semantic may be the same word as the user consultation word.
[0100] Sub-step 2: In response to determining existence, the user consultation word and the corresponding entity consultation semantics are spliced to generate splicing information.
[0101] Sub-step 3: In response to determining that the query word does not exist, determining the user consultation word as splicing information.
[0102] In the third step, the resulting concatenated information set is fed into a pre-trained consultation semantic information extraction model to generate the aforementioned user consultation semantic information. The consultation semantic information extraction model can be a network model that extracts consultation semantic feature information. For example, the consultation semantic information extraction model can be a multi-layer concatenated convolutional layer.
[0103] Optionally, the execution entity may input the obtained spliced information set into a pre-trained consultation semantic information extraction model to generate the user consultation semantic information, including the following steps:
[0104] In the first step, each piece of information in the concatenated information set is input into the first attention layer of the consultation semantic information extraction model to generate first attention information, thereby obtaining a first attention information set. The first attention layer can be a self-attention mechanism layer. Here, the first attention layer can be used to extract key semantic content between the user's consultation terms and the corresponding entity consultation semantics.
[0105] The second step is to sort the individual first attention information in the above-mentioned first attention information set to generate a first attention information sequence.
[0106] The third step is to input the first attention information sequence into at least one second attention layer included in the consultation semantic information extraction model to generate at least one second attention information. The at least one second attention layer can extract key semantic feature content related to the user consultation from various angles. Both the second attention information and the first attention information can be information in vector form. The second attention layer can be a self-attention mechanism layer.
[0107] The fourth step is to splice the at least one second attention information mentioned above to generate the above user consultation semantic information.
[0108] Step 108: Generate consultation reply content for the above user consultation semantic information.
[0109] In some embodiments, the execution entity may generate a consultation reply content for the user consultation semantic information, wherein the consultation reply content may be a reply to the user consultation semantic information.
[0110] As an example, the execution entity may utilize a question-answering model to generate inquiry response content for the user inquiry semantic information.
[0111] In some optional implementations of some embodiments, the execution entity may generate consultation reply content for the user consultation semantic information, including:
[0112] The first step is to determine whether there is any question-and-answer data in the target question-and-answer database whose vector similarity to the user's query semantic information is higher than the target similarity. The target question-and-answer database stores question-and-answer data in various fields. Question-and-answer data can include query vectors and answer content.
[0113] The second step is to obtain the graphics processor resource distribution information corresponding to the current time period in response to determining that it does not exist. The server resource distribution information can represent the number of allocated graphics processors under each consulting field. Each consulting field can be a field that may be consulted and is related to the web page content corresponding to the target web page. For example, if the target web page is a multi-functional web page, the corresponding consulting fields may include: social security consulting field, e-commerce consulting field, and social news consulting field. The social security consulting field can represent information related to the social security field. The e-commerce consulting field can represent information related to the e-commerce field. The social news consulting field can represent information related to the social news. In the current time period, each consulting field has a corresponding graphics processor cluster to implement consulting services in the corresponding field. The generation time corresponding to the consultation reply content is within the current time period.
[0114] The third step is to input the user's inquiry semantic information into a pre-trained consultation domain information generation model to generate domain probabilities for each consultation domain. Domain probabilities represent the degree of fit between the user's inquiry semantic information and the consultation content and the consultation domain. Higher domain probabilities indicate a higher degree of fit. In practice, the consultation domain information generation model can consist of 11 concatenated convolutional layers followed by fully connected layers corresponding to each consultation domain.
[0115] The fourth step is to select the domain probability with the highest probability value from the various domain probabilities as the target domain probability.
[0116] In the fifth step, based on the GPU resource distribution information, the GPU cluster and domain information corresponding to the target domain probability are determined as the target GPU cluster and target domain information.
[0117] In a sixth step, the amount of online computing resources corresponding to each of at least one slave graphics processor is determined using the master graphics processor in the target graphics processor cluster.
[0118] In the seventh step, a slave GPU with the highest amount of online computing resources is selected from at least one slave GPU as the target slave GPU.
[0119] In the eighth step, the master GPU is instructed to send the question-answering model information corresponding to the target domain information to the target slave GPU, so that the target slave GPU can build a question-answering model under the target domain. The question-answering model information may include: question-answering model parameters and question-answering model structure.
[0120] In the ninth step, the above user inquiry semantic information is input into the question-answering model to generate inquiry response content.
[0121] Optionally, GPU resource distribution information is updated periodically. Each consulting domain has a corresponding GPU cluster. Each GPU cluster has one master GPU and at least one slave GPU. The master GPU in each GPU cluster cannot perform service transitions. Each slave GPU can be evenly distributed based on the volume of user-accessed services.
[0122] Optionally, the graphics processor resource distribution information is generated by the following steps:
[0123] The first step is to obtain multiple historical user consultation semantic information sets in multiple historical time periods.
[0124] The second step is to determine multiple historical domain information sets corresponding to the multiple historical user query semantic information sets. The historical user query semantic information in the historical user query semantic information set corresponds to the historical domain information in the historical domain information set. The historical user query semantic information can be the user query semantic information for the corresponding historical time period.
[0125] In the third step, for each of the multiple historical field information sets, the amount of consultations in each consultation field is determined based on the historical field information set.
[0126] In the fourth step, for each of the consulting areas, the following determination steps are performed:
[0127] Sub-step 1: determine the consultation volume sequence corresponding to the consultation field.
[0128] Sub-step 2: determining the estimated consultation volume of the consultation field in the current time period based on the consultation volume sequence.
[0129] As an example, the above-mentioned execution entity can input the consultation volume sequence into the recurrent neural network model to generate an estimated consultation volume.
[0130] The fifth step is to determine the proportion of graphics processors corresponding to each consulting field based on the estimated consulting volume.
[0131] In the sixth step, the proportion of each graphics processor is multiplied by the total number of slave graphics processors to generate the number of graphics processors corresponding to each graphics processor, thereby obtaining the number of each graphics processor.
[0132] In the seventh step, the graphics processor clusters are scheduled according to the number of the graphics processors to generate scheduled graphics processor clusters as graphics processor resource distribution information.
[0133] Optionally, as one of the invention points, another technical problem is solved: "When the amount of data accessed by users is large, the time required to accurately determine the semantics of the question is long, the resources required are large, and the back-end server corresponding to the web page is overloaded, which may affect the normal operation and normal loading of the web page, resulting in a large load on the web page." Based on this, the present disclosure, first, alleviates part of the request pressure through the target question and answer database. Then, when it is determined that there is no reply content in the target question and answer database, by setting up corresponding graphics processor clusters for each consulting field, the purpose of diverting user consulting requests according to different consulting fields is achieved to alleviate the situation of large request pressure. In addition, in view of the different consulting volumes in each consulting field in each time period, the processor resource allocation of the graphics processor in each consulting field is achieved through regularly dynamically adjusted graphics processor resource distribution information, so that consulting volumes with large requests can control more graphics processors, and consulting volumes with small requests can control fewer graphics processors. Therefore, when the amount of data accessed by users is large, layer-by-layer diversion of user requests can be achieved to alleviate the problem of large web page load.
[0134] Step 109: Display the consultation reply content on the target webpage in a target display mode.
[0135] In some embodiments, the execution entity may display the inquiry response content on the target webpage in a target display mode, wherein the target display mode is one of the following: text mode, audio mode, image mode, and video mode.
[0136] The above-described embodiments of the present disclosure have the following beneficial effects: Through the webpage content display methods of some embodiments of the present disclosure, based on the accurate knowledge graph of entity semantic content, the semantic content of the target user's inquiry can be accurately identified, thereby facilitating accurate inquiry responses. Specifically, the reason why the relevant inquiry responses are inaccurate and affect the normal operation of the webpage is that the question-answering model may extract different question semantics based on the different entity semantic meanings for the inquiry questions entered by the user on the webpage, resulting in irrelevant answers. In addition, when the user accesses a large amount of data, the accurate determination of the question semantics takes a long time and requires a large number of resources, which overloads the backend server corresponding to the webpage, potentially affecting the normal operation and loading of the webpage. Based on this, the webpage content display methods of some embodiments of the present disclosure first obtain the document object tree and target knowledge graph corresponding to the target webpage stored in the target memory. Here, by pre-storing the document object tree and knowledge graph in the target memory, it is convenient to subsequently call the processor to extract object nodes and node associations. In addition, it is also used to determine the association relationships and true semantic knowledge graph corresponding to each entity in the target scenario. Here, the target knowledge graph is a graph that represents the relationship between various entities pre-built and stored in the target scenario. Then, each object node in the above-mentioned document object tree is extracted to obtain an object node set and a node association relationship, so as to facilitate the subsequent extraction of key web page content in the above-mentioned target web page corresponding to the document object tree. Then, based on the above-mentioned object node set and the above-mentioned node association relationship, a key information block set corresponding to the above-mentioned document object tree can be accurately generated. Here, the generated key information block set is used to determine the meaning of each entity corresponding to the target web page, so as to make corresponding adjustments to the entities in the target knowledge graph and generate a knowledge graph applicable to the target web page. Then, based on the above-mentioned key information block set, entity extraction information for the above-mentioned target web page can be accurately generated. Then, based on the above-mentioned entity extraction information, entity correction processing is performed on the above-mentioned target knowledge graph to accurately generate a corrected knowledge graph corresponding to the target web page. Secondly, the above-mentioned corrected knowledge graph and the web page information corresponding to the above-mentioned target web page are stored in the target storage terminal, so as to facilitate the subsequent real-time and accurate determination of the question semantic content of the search information under the target web page. Furthermore, in response to receiving user inquiry information input by a target user for the target webpage, user inquiry semantic information can be accurately generated based on the corrected knowledge graph stored in the target storage terminal and the user inquiry information. Furthermore, inquiry response content specific to the user inquiry semantic information is accurately generated to facilitate subsequent responses to the target user. Finally, the inquiry response content is displayed on the target webpage in a target display modality, where the target display modality is one of the following: text modality, audio modality, image modality, or video modality.In summary, by extracting key information blocks from the document object tree and generating a knowledge graph corresponding to the target webpage based on these blocks, we can provide accurate responses to user inquiries. Furthermore, generating a knowledge graph corresponding to the target webpage reduces the time required to generate inquiry semantic information, avoiding heavy server loads caused by massive user requests and further preventing webpage malfunctions.
[0137] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a web page content display device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the web page content display device can be specifically applied to various electronic devices.
[0138] like Figure 2 As shown, a web page content display device 200 includes: an acquisition unit 201, an extraction unit 202, a first generation unit 203, a second generation unit 204, a correction unit 205, a storage unit 206, a third generation unit 207, a fourth generation unit 208 and a display unit 209. The acquisition unit 201 is configured to acquire a document object tree and a target knowledge graph stored in a target memory corresponding to a target web page, wherein the target web page is a web page for a target scenario under a target domain, and the target knowledge graph is a knowledge graph corresponding to the target scenario; the extraction unit 202 is configured to extract each object node in the document object tree to obtain an object node set and a node association relationship; the first generation unit 203 is configured to generate a key information block set corresponding to the document object tree according to the object node set and the node association relationship; the second generation unit 204 is configured to generate entity extraction information for the target web page according to the key information block set; the correction unit 205 is configured to extract entity information for the target knowledge graph according to the entity extraction information. The graph is entity corrected to generate a corrected knowledge graph; the storage unit 206 is configured to store the above-mentioned corrected knowledge graph and the corresponding web page information of the above-mentioned target web page to the target storage terminal; the third generation unit 207 is configured to generate user consultation semantic information in response to receiving user consultation information input by the target user for the above-mentioned target web page according to the corrected knowledge graph and the above-mentioned user consultation information stored in the above-mentioned target storage terminal; the fourth generation unit 208 is configured to generate consultation reply content for the above-mentioned user consultation semantic information; the display unit 209 is configured to display the above-mentioned consultation reply content on the above-mentioned target web page in a target display mode, wherein the above-mentioned target display mode is one of the following: text mode, audio mode, image mode, video mode.
[0139] It is understandable that the units described in the web page content display device 200 and the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the webpage content display device 200 and the units included therein, and will not be repeated here.
[0140] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device (eg, an electronic device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0141] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. Various programs and data required for the operation of the electronic device 300 are also stored in the RAM 303. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0142] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as needed.
[0143] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network via the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.
[0144] It should be noted that in some embodiments of the present disclosure, the computer-readable medium mentioned above may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0145] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0146] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the document object tree and target knowledge graph stored in the target memory corresponding to the target web page, wherein the above-mentioned target web page is a web page for the target scenario under the target domain, and the above-mentioned target knowledge graph is a knowledge graph corresponding to the above-mentioned target scenario; extracts each object node in the above-mentioned document object tree to obtain an object node set and a node association relationship; generates a key information block set corresponding to the above-mentioned document object tree based on the above-mentioned object node set and the above-mentioned node association relationship; generates an entity extraction information root for the above-mentioned target web page based on the above-mentioned key information block set. According to the above-mentioned entity extraction information, the above-mentioned target knowledge graph is subjected to entity correction processing to generate a corrected knowledge graph; the above-mentioned corrected knowledge graph and the corresponding web page information of the above-mentioned target web page are stored in the target storage terminal; in response to receiving the user consultation information input by the target user for the above-mentioned target web page, user consultation semantic information is generated according to the corrected knowledge graph and the above-mentioned user consultation information stored in the above-mentioned target storage terminal; consultation reply content for the above-mentioned user consultation semantic information is generated; the above-mentioned consultation reply content is displayed on the above-mentioned target web page in a target display mode, wherein the above-mentioned target display mode is one of the following: text mode, audio mode, image mode, video mode.
[0147] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0149] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, they may be described as: a processor comprising: an acquisition unit, an extraction unit, a first generation unit, a second generation unit, a correction unit, a storage unit, a third generation unit, a fourth generation unit, and a display unit. The names of these units do not, in some cases, constitute a limitation on the units themselves. For example, the acquisition unit may also be described as "a unit for acquiring a document object tree and a target knowledge graph stored in a target memory corresponding to a target web page."
[0150] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0151] The above description is only an illustration of some preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.
Claims
1. A web page content display method, comprising: Obtaining a document object tree and a target knowledge graph stored in a target memory corresponding to a target webpage, wherein the target webpage is a webpage for a target scenario under a target domain, and the target knowledge graph is a knowledge graph corresponding to the target scenario; Extracting each object node in the document object tree to obtain an object node set and a node association relationship; Generate a key information block set corresponding to the document object tree according to the object node set and the node association relationship; generating entity extraction information for the target web page according to the key information block set; Performing entity correction processing on the target knowledge graph according to the entity extraction information to generate a corrected knowledge graph; Storing the corrected knowledge graph and the webpage information corresponding to the target webpage in a target storage terminal; In response to receiving user inquiry information input by a target user for the target webpage, generating user inquiry semantic information based on the corrected knowledge graph stored in the target storage terminal and the user inquiry information; Generating consultation reply content for the user consultation semantic information; The consultation reply content is displayed on the target webpage in a target display mode, wherein the target display mode is one of the following: text mode, audio mode, image mode, video mode.
2. The method according to claim 1, wherein Generating entity extraction information for the target webpage according to the key information block set includes: For each key information block in the key information block set, the following first generation step is performed: determining each information sentence included in the key information block as a key information sentence sequence; Performing sentence length preprocessing on each key information sentence in the key information sentence sequence to generate a preprocessed sentence, thereby obtaining a preprocessed sentence sequence; Inputting each preprocessed sentence in the preprocessed sentence sequence into a pre-trained sentence vector generation model to generate a sentence vector, thereby obtaining a sentence vector sequence; Inputting each sentence vector in the sentence vector sequence into a pre-trained self-attention mechanism model in sequence to generate text representation information; generating entity information for the key information block according to the text representation information; The entity extraction information is generated according to the obtained entity information set.
3. The method according to claim 2, wherein: Generating entity information for the key information block according to the text representation information includes: Combining the individual sentence vectors in the sentence vector sequence according to the order of arrangement of the key information sentences to generate a combined vector; Concatenating the text representation information and the combination vector in a target order to generate a concatenated vector; The concatenated vector is input into an entity information generation model output by a multi-head entity to generate an entity set as entity information.
4. The method according to claim 1, wherein Generating a key information block set corresponding to the document object tree according to the object node set and the node association relationship includes: According to the node association relationship, each object node in the object node set is divided into node hierarchies to generate a hierarchical node set group, wherein each hierarchical node in the hierarchical node set belongs to the same hierarchical level; For the target level node set corresponding to the current level in the level node set group, the target processor is used to perform the following second generation step: For each level node in the target level node set, the following third generation step is performed: Determine a child node set corresponding to the hierarchical node as a target child node set; Dividing each child node in the target child node set to generate a child node group set; Determine the node information similarity between each sub-node group in the sub-node group set to obtain a similarity set; According to the similarity set, determining at least one sub-node group in the sub-node group set whose corresponding similarities are greater than a target value as a target sub-node set; Generate key nodes according to the target child node set; Determine the node content corresponding to the obtained key node as a key information block group; In response to determining that the target level node set corresponds to the last level, determining each key node group obtained as a key information block set; In response to determining that the level corresponding to the target level node set is not the last level, removing each target child node set from the target level node set to obtain a level node set after removal; The node set of the removed level is used as the target level node set, and the next level corresponding to the target level node set is used as the current level, and the second generation step is continued.
5. The method according to claim 1, wherein The corrected knowledge graph includes: entity vectors corresponding to each entity, association relationship information between each entity, and entity prefix vectors corresponding to each entity, where the entity prefix vector is the first target number of vector elements in the corresponding entity vector, and the entity prefix vector represents the initial entity semantics of the corresponding entity in the target scenario; and Generating user consultation semantic information based on the corrected knowledge graph stored in the target storage terminal and the user consultation information includes: Performing information preprocessing on the user consultation information to generate user consultation preprocessing information; Extracting at least one entity from the user consultation preprocessing information as at least one target entity and at least one initial entity semantic under the user consultation information; Determining at least one target entity vector corresponding to the at least one target entity and at least one target entity prefix vector corresponding to the at least one initial entity semantics; For each target entity vector of the at least one target entity vector, performing a fourth generating step: Determine a target entity prefix vector corresponding to the target entity vector as a target vector; generating entity prefix vector query information for the target vector; executing the entity prefix vector query information to query the corresponding entity position from the corrected knowledge graph as a target entity position, wherein the entity position is determined based on entity encoding information of at least one associated entity corresponding to the associated relationship information; determining at least one associated entity corresponding to the target entity location as at least one first target associated entity; generating entity consultation semantic information under the user consultation information according to the at least one first target associated entity, the target vector, the target entity vector, and the entity prefix vector corresponding to the target entity position; User consultation semantic information is generated according to the obtained at least one entity consultation semantic information and the user consultation pre-processing information.
6. The method according to claim 5, wherein: Generating user consultation semantic information based on the obtained at least one entity consultation semantic information and the user consultation preprocessing information includes: Performing word segmentation processing on the user consultation pre-processing information to generate a user consultation word set; For each user consultation word in the user consultation word set, perform the fifth generation step: Determine whether the user consultation word has a corresponding entity consultation semantics in the at least one entity consultation semantics; In response to determining existence, concatenating the user consultation word and the corresponding entity consultation semantics to generate concatenated information; In response to determining that the user consultation word does not exist, determining the user consultation word as the splicing information; The obtained spliced information set is input into a pre-trained consultation semantic information extraction model to generate the user consultation semantic information.
7. The method according to claim 6, wherein: The step of inputting the obtained spliced information set into a pre-trained consultation semantic information extraction model to generate the user consultation semantic information comprises: Inputting each piece of splicing information in the splicing information set into the first attention layer included in the consultation semantic information extraction model to generate first attention information, thereby obtaining a first attention information set; sorting each piece of first attention information in the first attention information set to generate a first attention information sequence; Inputting the first attention information sequence into at least one second attention layer included in the consultation semantic information extraction model to generate at least one second attention information; The at least one second attention information is spliced to generate the user consultation semantic information.
8. A web page content display device, comprising: an acquisition unit configured to acquire a document object tree and a target knowledge graph stored in a target memory corresponding to a target webpage, wherein the target webpage is a webpage for a target scenario in a target domain, and the target knowledge graph is a knowledge graph corresponding to the target scenario; an extraction unit configured to extract each object node in the document object tree to obtain an object node set and a node association relationship; A first generating unit is configured to generate a key information block set corresponding to the document object tree according to the object node set and the node association relationship; A second generating unit is configured to generate entity extraction information for the target web page according to the key information block set; a correction unit, configured to perform entity correction processing on the target knowledge graph according to the entity extraction information to generate a corrected knowledge graph; a storage unit configured to store the corrected knowledge graph and the webpage information corresponding to the target webpage in a target storage terminal; a third generating unit configured to, in response to receiving user inquiry information input by a target user for the target webpage, generate user inquiry semantic information based on the corrected knowledge graph stored in the target storage terminal and the user inquiry information; A fourth generating unit is configured to generate consultation reply content for the user consultation semantic information; The display unit is configured to display the consultation response content on the target web page in a target display mode, wherein the target display mode is one of the following: text mode, audio mode, image mode, and video mode.
9. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Knowledge graph generation method, device and appartus and readable storage medium
CN109992673A
Vulnerability knowledge graph processing method and device, equipment and medium
CN115827895A