A task processing method and device

By constructing multi-layered communities and using semantic edges to cluster the knowledge graph, and combining fine-grained and coarse-grained information to generate answers, the problem of mismatch between answers and questions is solved, improving answer matching and retrieval efficiency.

CN123138237APending Publication Date: 2026-11-20SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611001900.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

The problem is that when a computing device generates answers to a target question based on community clustering, the answers do not match the questions.

Method used

By constructing multi-layered communities and using semantic edges to cluster the knowledge graph, answers are generated. By combining fine-grained and coarse-grained information, the matching between the answer and the question is ensured.

Benefits of technology

It improves the matching between answers and questions, reduces the one-sidedness of information, and enhances retrieval efficiency and the utilization rate of storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123138237A_ABST
    Figure CN123138237A_ABST
Patent Text Reader

Abstract

A task processing method and device are disclosed, and relate to the technical field of computers. Since the search result of each layer includes nodes in each layer that have semantic relevance to the target question greater than or equal to a relevance threshold, and the node in the previous layer of the multi-layer community is a semantic abstract expression of at least one node in the next layer, the search result of each layer includes not only the fine-grained information corresponding to the nodes in the next layer, but also the coarse-grained summary information corresponding to the nodes in the previous layer (i.e., the semantic abstract expression of at least one node). The computing device obtains the answer to the target question according to the search result of each layer, that is, the computing device obtains the answer to the target question according to the fine-grained information and the coarse-grained summary information. In this way, the answer refers to both the fine-grained information and the coarse-grained information, reducing the one-sidedness of the information and providing a guarantee for the matching of the answer and the target question.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a task processing method and apparatus. Background Technology

[0002] A knowledge graph is a graphical model for representing and storing knowledge. It provides a structured, systematic, and standardized description of knowledge by organizing entities, relationships, and attributes as nodes, edges, and labels, respectively. Typically, computing devices perform structural clustering on the knowledge graph to obtain multiple communities. Each community includes structurally related entities, relationships between these entities, and attributes. The computing device then identifies at least one community most relevant to the target question and generates an answer to the target question based on that community.

[0003] In the above process, the computing device generates the answer to the target question based on the community obtained by structural clustering, which may result in a mismatch between the generated answer and the target question. Summary of the Invention

[0004] This application provides a task processing method and apparatus for resolving the problem of mismatch between the answer to the target problem and the target problem.

[0005] Firstly, this application provides a task processing method. This method can be executed by a computing device, a cluster of computing devices comprising multiple computing devices, a component of the computing device such as its processor, chip, or chip system, or a logic module or software capable of implementing all or part of the functions of the computing device.

[0006] Taking the execution by a computing device as an example, the method provided in the first aspect includes: the computing device acquiring a user request. The user request is for retrieving an answer to a target question. In response to the user request, the computing device retrieves the retrieval results for each layer in a multi-layered community. The multi-layered community includes: M layers, each layer including: multiple nodes and semantic relevance between multiple nodes; a node in the i-th layer of the M layers is a semantic abstraction of at least one node in the (i-1)-th layer of the M layers; the retrieval results for each layer include: nodes in each layer whose semantic relevance to the target question is greater than or equal to a relevance threshold, where M is an integer greater than or equal to 2, and i is an integer greater than or equal to 2 and less than or equal to M. The computing device then generates an answer to the target question based on the retrieval results for each layer.

[0007] In the first aspect of this application, since the retrieval results at each layer include nodes in each layer whose semantic relevance to the target question is greater than or equal to the relevance threshold, and since nodes in the upper layer of a multi-layered community are semantic abstract expressions of at least one node in the lower layer, the retrieval results at each layer include both fine-grained information corresponding to nodes in the lower layer and coarse-grained summary information corresponding to nodes in the upper layer (i.e., semantic abstract expressions of at least one node). The computing device obtains the answer to the target question based on the retrieval results at each layer. That is, the computing device obtains the answer to the target question based on both fine-grained and coarse-grained summary information. In this way, the answer references both fine-grained and coarse-grained information, reducing the one-sidedness of information and ensuring the matching of the answer with the target question.

[0008] In one possible implementation, the computing device retrieves search results for each layer of the multi-layered community, including: determining the second node in the (i-1)th layer that has a mapping relationship with the first node as the entry node of the (i-1)th layer. Here, the first node is the node in the i-th search result of the i-th layer whose semantic similarity to the target question satisfies the similarity condition. And, based on the association relationships among multiple nodes in the (i-1)th layer, the computing device retrieves nodes in the (i-1)th layer starting from the second node, obtaining the (i-1)th search result of the (i-1)th layer. Here, the (i-1)th search result includes N nodes in the (i-1)th layer whose semantic similarity to the target question satisfies the similarity condition, where N is a positive integer. Thus, the computing device retrieves the (i-1)th layer starting from the second node, where the second node is the node in the (i-1)th layer that has a mapping relationship with the first node, and the first node is the node in the i-th layer search result that is most relevant to the target question. In other words, the computing device starts searching the (i-1)th layer from the node in the (i-1)th layer that has a mapping relationship with the node in the (i)th layer that is most relevant to the target problem. This helps to shorten the number of searches required to find at least one node in the (i-1)th layer that is most relevant to the target problem, thereby improving search efficiency.

[0009] In another possible implementation, the method further includes: the computing device obtaining an index of the multi-layered community. The index includes: node identifiers of nodes in each layer, associations between nodes in each layer, and mappings between nodes in adjacent layers. The computing device retrieves the retrieval results for each layer in the multi-layered community, including: the computing device retrieving the retrieval results for each layer in the multi-layered community based on the index of the multi-layered community. Thus, compared to the computing device creating indexes for each layer in the multi-layered community and retrieving retrieval results based on multiple indexes corresponding to the multi-layered community, the computing device needs to retrieve the layers corresponding to each index in multiple indexes to obtain the retrieval results. In this application, the computing device retrieves the retrieval results for each layer based on the index of the multi-layered community; that is, the computing device only needs to retrieve the layers corresponding to the indexes of multiple communities to obtain the retrieval results for each layer. This reduces the number of layers that need to be reduced, improving retrieval efficiency. The computing device stores and maintains the index of the multi-layered community, which reduces the resources occupied by storing the index and the cost required for maintaining the index compared to storing and maintaining multiple indexes.

[0010] In another possible implementation, the i-th layer includes: a first node, which is a semantic abstraction of at least one node in the (i-1)-th layer; an index including the mapping relationship between the first node and the second node; and a second node being at least one node whose semantic similarity with the first node satisfies a similarity condition. Thus, since the second node and the first node satisfy the similarity condition, subsequent retrieval of the (i-1)-th layer by the computing device, starting from the second node, helps to shorten the retrieval steps required to obtain the (i-1)-th retrieval result, thereby improving retrieval efficiency.

[0011] In another possible implementation, the method further includes: a computing device acquiring an initial knowledge graph. This initial knowledge graph is constructed based on files related to the application scenario of the target problem and includes multiple nodes and data dependency edges between them. The computing device adds semantic edges to the initial knowledge graph to obtain a new knowledge graph. This new knowledge graph includes multiple nodes, data dependency edges, and semantic edges. A first semantic edge describes the semantic similarity between the two nodes connected by the first semantic edge as greater than or equal to a similarity threshold. The first semantic edge is considered a semantic edge. Two nodes belong to multiple nodes. Based on the semantic edges, the computing device clusters the multiple nodes in the knowledge graph to obtain multi-layered communities. Thus, the computing device's addition of semantic edges to the initial graph and the generation of multiple communities based on these semantic edges ensure the relevance of the content between nodes semantically represented by the communities, thereby ensuring the adaptability of the answer to the target problem.

[0012] In another possible implementation, the computing device generates an answer to the target question based on the retrieval results from each layer. This includes: the computing device acquiring the target retrieval results from the retrieval results at each layer, wherein the sum of the term lengths of the target retrieval results is less than or equal to the upper limit of term length; and the computing device using the target retrieval results to generate an answer. Thus, the sum of the term lengths of the target retrieval results being less than or equal to the upper limit of term length means that the computing device truncates the retrieval results, retaining those with a sum of term lengths less than the upper limit. The retrieval results are not limited by the supported token length, and all target retrieval results can be used to generate an answer to the target question, ensuring the adaptability of the answer to the target question.

[0013] In another possible implementation, the computing device obtains the target search results from the search results at each layer, including: assessing the reasonableness of each layer's search results as answers to the target question; and selecting search results from the search results at each layer whose reasonableness meets the reasonableness criteria to obtain the target search results. Thus, the computing device selects search results whose reasonableness meets the reasonableness criteria to obtain the target search results. The reasonableness of the target search results as answers to the target question is higher than the reasonableness of non-target search results as answers to the target question. The computing device's selection of search results with higher reasonableness to generate answers to the target question ensures the fit between the answer and the target question.

[0014] Secondly, this application provides a method for constructing a multi-layered community. Similarly, this method can be executed by a computing device, a cluster of computing devices including multiple computing devices, a component of the computing device such as its processor, chip, or chip system, or a logic module or software capable of implementing all or part of the functions of the computing device.

[0015] Taking the execution by a computing device as an example, the first aspect of the method includes: the computing device acquiring an initial knowledge graph. This initial knowledge graph is constructed based on application scenario-related files and includes multiple nodes and data dependency edges between them. The computing device adds semantic edges to the initial knowledge graph to obtain a new knowledge graph. This new knowledge graph includes multiple nodes, data dependency edges, and semantic edges. A first semantic edge describes the following: the semantic similarity between the two nodes connected by the first semantic edge is greater than or equal to a similarity threshold. The first semantic edge is a semantic edge. The two nodes belong to multiple nodes. Based on the semantic edges, the computing device clusters multiple nodes in the knowledge graph to obtain multi-layered communities.

[0016] In the second aspect of this application, the computing device adds semantic edges to the initial graph and obtains multiple communities based on the semantic edges, which ensures the relevance of the content between nodes expressed by the semantic abstraction of the community and improves the purity of the community.

[0017] Thirdly, this application provides a task processing apparatus. The apparatus includes modules for performing the methods described in the first aspect or any possible design of the first aspect.

[0018] Fourthly, this application provides a processor. The processor includes an interface circuit and a control circuit, wherein the interface circuit is used to acquire user requests and cooperate with the control circuit to implement the operation steps of the method in the first aspect or any possible design in the first aspect.

[0019] Fifthly, this application provides a computing device cluster. The computing device cluster includes at least one computing device, each computing device including a processor and a memory. The processor of the at least one computing device is configured to execute instructions stored in the at least one memory, causing the computing device cluster to perform operational steps of the task processing method described in the first aspect or any possible design of the first aspect.

[0020] Sixthly, this application provides a computer-readable storage medium, comprising: computer software instructions; which, when executed in a computing device, cause the computing device to perform operational steps of the method as described in the first aspect or any possible implementation thereof.

[0021] In a seventh aspect, this application provides a computer program product. When the computer program product is run on a computer cluster, it causes the computing device cluster to perform the operational steps of the method as described in the first aspect or any possible implementation thereof.

[0022] The beneficial effects of aspects three through seven above can be described with reference to the implementation of any of aspects one or two, and will not be repeated here. Based on the implementations provided in the above aspects, this application can be further combined to provide more implementations. Attached Figure Description

[0023] Figure 1 A schematic diagram of the structure of a task processing system provided in this application; Figure 2 This application provides a schematic diagram of the structure of a chip; Figure 3 A flowchart illustrating a task processing method provided in this application; Figure 4 A flowchart illustrating the process of establishing a multi-level community, provided for this application; Figure 5 An example diagram of an index provided for this application; Figure 6 A flowchart illustrating a task processing method provided in this application; Figure 7 An application flowchart of the first task processing method provided in this application; Figure 8 Application flowchart of the second task processing method provided in this application; Figure 9 Application flowchart of the third task processing method provided in this application; Figure 10 A schematic diagram of the structure of a task processing device provided in this application; Figure 11 This application provides a schematic diagram of the structure of a computing device cluster; Figure 12 This is a schematic diagram of the connection between computing devices provided in this application. Detailed Implementation

[0024] To ensure clarity and conciseness in the description of the following embodiments, the relevant terms that may be involved in this application will first be described.

[0025] (1) Knowledge graph.

[0026] A knowledge graph can be a graphical model used to represent and store knowledge. Knowledge graphs can provide a structured, systematic, and standardized description of knowledge by organizing entities, relationships, and attributes as nodes, edges, and labels, respectively.

[0027] (2) Community.

[0028] A community is a relatively independent subgraph within a knowledge graph. A community consists of multiple closely connected nodes in the knowledge graph, and the connection density between different nodes within a community is much higher than the connection density between nodes in different communities within the knowledge graph.

[0029] Typically, computing devices can generate answers to target questions based on knowledge graphs. Specifically, the computing device can perform structural clustering of nodes in the knowledge graph to obtain multiple communities. Each community includes structurally related entities, the relationships between these entities, and their attributes. From these communities, the computing device identifies those relevant to the target question. Based on these relevant communities, the computing device determines the answer to the target question.

[0030] Based on this, this application provides a task processing method. In this method, since the retrieval results at each layer include nodes in each layer whose semantic relevance to the target question is greater than or equal to a relevance threshold, and since nodes in the upper layer of a multi-layered community are semantic abstractions of at least one node in the lower layer, the retrieval results at each layer include both fine-grained information corresponding to nodes in the lower layer and coarse-grained summary information corresponding to nodes in the upper layer (i.e., semantic abstractions of at least one node). The computing device obtains the answer to the target question based on the retrieval results at each layer. That is, the computing device obtains the answer to the target question based on both fine-grained and coarse-grained summary information. In this way, the answer references both fine-grained and coarse-grained information, reducing the one-sidedness of information and ensuring the matching of the answer with the target question.

[0031] The method provided in this application can be applied to task processing systems. Figure 1 A schematic diagram of the structure of a task processing system provided in this application is shown below. Figure 1 As shown, the task processing system 100 includes a computing device 110.

[0032] The computing device 110 can acquire user requests, respond to user requests by obtaining search results for each layer in a multi-layered community, and answers to the target question based on the search results for each layer. The computing device 110 can refer to a device with data processing capabilities. The computing device 110 may or may not have a physical entity; this application does not limit this. If the computing device 110 has a physical entity, it can be a personal computer, a desktop computer, etc., or, for example, a server on a cloud platform. If the computing device 110 does not have a physical entity, it can be a virtual machine (VM), a container (such as a docket™), etc. The computing device 110 includes a communication interface 114, a processor 111, a memory 112, and a bus 116. The communication interface 114 is used to communicate with devices located outside the computing device 110. For example, the computing device 110 receives user requests sent by a user through a client device via the communication interface 114. Alternatively, the computing device 110 sends processing results (such as the answer to a target question) to a client device via the communication interface 114. The communication interface 114 can be an input / output (I / O) interface.

[0033] Processor 111 is the core of computing device 110 for both computation and control. It may include: a central processing unit (CPU), a specific integrated circuit, other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. In practical applications, computing device 110 may also include multiple processors. Processor 111 may include one or more processor cores. An operating system and other software programs are installed in processor 111, enabling it to access memory 112 and various peripheral component interconnect (PCIe) devices.

[0034] The processor 111 is connected to the memory 112 via a bus 116. The bus 116 can be a double data rate (DDR) bus or other types of bus. The memory 112 is the main memory of the computing device 110. The memory 112 is typically used to store various running software in the operating system. To improve the access speed of the processor 111, the memory 112 needs to have the advantage of high access speed. In traditional computer devices, dynamic random access memory (DRAM) is usually used as the memory 112. In addition to DRAM, the memory 112 can also be other random access memory, such as static random access memory (SRAM). Alternatively, the memory 112 can also be read-only memory (ROM). For example, read-only memory can be programmable read-only memory (PROM) or erasable programmable read-only memory (EPROM). This embodiment does not limit the number or type of memory 112.

[0035] In some possible scenarios, in order to persistently store data (such as user requests, initial knowledge graphs, and knowledge graphs), the task processing system 100 also includes a data storage system 113, which may be located outside the computing device 110 (e.g., Figure 1 As shown, the data storage system 113 exchanges data with the computing device 110 via a network. In some possible scenarios, the data storage system 113 may also be located inside the host, such as when the data storage system 113 exchanges data with the processor 111 via the bus 116. In this case, the data storage system 113 can be represented as a hard disk.

[0036] In some possible scenarios, the task processing system 100 may also include a client device 120. In this case, the user can use the client device 120 to send user requests to the computing device 110. The client device 120 may be a device with data transmission capabilities, including but not limited to: a personal computer, a server, a tablet computer, a mobile phone, etc. In some possible examples, the computing device 110 may also output processing results (such as outputting the answer to the target question to the client device 120).

[0037] For example, Figure 2 The processor 111 in the middle can be implemented through a chip, such as Figure 2 As shown, Figure 2 This is a schematic diagram of the structure of a chip provided in this application. For example, the chip 200 includes a core 201, a CPU 202, a system buffer 203, an input / output (I / O) device 205, and a DDR 206.

[0038] In this implementation, CPU 202 accepts tasks (such as obtaining the answer to a target question) and calls core 201 to execute those tasks. When chip 200 has multiple cores 201, CPU 202 also handles scheduling tasks. For example, CPU 202 can be implemented using an ARM processor, which is small, low-power, and uses a 32-bit reduced instruction set, offering simple and flexible addressing. Of course, in some implementations, CPU 202 can also be implemented using other processors.

[0039] Core 201 provides the computing power required for acquiring and processing tasks. In one optional configuration, core 201 includes a load / store unit (LSU), a cube computation unit, a scalar computation unit, a vector computation unit, and a buffer. The LSU loads data to be processed and stores processed data. It also manages read / write operations between different buffers within the core and performs format conversions. The cube computation unit provides the core computing power for matrix multiplication. The scalar computation unit is a single-instruction-single-data (SISD) processor, meaning it processes only one data item (usually an integer or floating-point number) at a time. The vector computation unit, also known as an array processor, allows direct manipulation of arrays or vectors for computation. There may be one or more buffers, primarily referring to a level 1 buffer (L1 buffer). These buffers temporarily store data that core 201 uses repeatedly, reducing bus read / write operations. Additionally, certain data format conversion functions require the source data to reside in the buffer.

[0040] System buffer 203 is used to temporarily store input data (such as user requests), intermediate results (such as initial knowledge graph, knowledge graph, etc.) or final results (such as the answer to the target question) that have passed through chip 200.

[0041] DDR 206 is an off-chip memory that can be replaced by high bandwidth memory (HBM) or other off-chip memory. Located between the chip and external memory, DDR 206 overcomes the access speed limitations of shared memory read / write operations in computing resource sharing.

[0042] The I / O devices 205 included in chip 200 refer to the hardware that performs task processing, or devices that interface with the I / O interface. Common I / O devices include network cards, printers, keyboards, and mice. All external storage devices can also be used as I / O devices, such as hard drives, floppy disks, and optical discs.

[0043] Core 201, CPU 202, system buffer 203, I / O devices 205, and DDR 206 are connected via a bus. The bus may include a pathway for transmitting information between the aforementioned components (such as CPU 202 and system buffer 203). In addition to a data bus, the bus may also include a power bus, control bus, and status signal bus. However, for clarity, the bus may be a PCIe bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. For example, core 201 can access these I / O devices 205 via a PCIe bus. Core 201 is connected to system buffer 203 via a DDR bus. Here, different system buffers 203 may use different data buses to communicate with core 201; therefore, the DDR bus can also be replaced with other types of data buses. This embodiment does not limit the bus type.

[0044] For example, after CPU 202 loads the data to be processed by the task (such as a user request) into DDR 206, the LSU in core 201 reads (loads) the data from DDR 206, processes the user request, and obtains the processing result (such as responding to the user request, obtaining the search results of each layer in the multi-layer community, and obtaining the answer to the target question based on the search results of each layer). After obtaining the processing result, the LSU then loads (stores) the processing result into DDR 206. If the task processing system 100 includes a data storage system 113, the data can be sent from the network interface card to the data storage system 113 for persistent storage. In some possible cases, chip 200 can also persistently store intermediate results, such as persistently storing the initial knowledge graph, the knowledge graph itself, etc.

[0045] It is understood that the structures illustrated in this embodiment do not constitute a specific limitation on the computing device or chip. In other embodiments, the computing device and chip may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0046] The following is combined Figure 2 and Figure 3 The content shown provides a detailed description of the task processing method provided in this application.

[0047] The task processing method provided in this application can be executed by a single computing device, a cluster of computing devices including multiple computing devices, components of a computing device (such as a processor, chip, or chip system of the computing device), or it can be implemented by a logic module or software. In the case where the task processing method is executed by a single computing device, the computing device can be... Figure 1 The computing device 110 shown can be referenced in the foregoing hardware implementation. Figure 1 The description of that will not be repeated here. When the task processing method is executed by a component of a computing device, that computing device component can be... Figure 2 The chips shown are described above. For details on the hardware implementation of these chips, please refer to the aforementioned documentation. Figure 2 The description of the task processing method is omitted here. In some optional examples, the task processing method can also be executed by other computing devices; the hardware implementation of the computing devices can be found in the foregoing. Figure 1 and Figure 2 The description of the above will not be repeated here. The following explanation will take the execution of the task processing method provided in this embodiment by a single computing device as an example.

[0048] Figure 3 A flowchart illustrating a task processing method provided in this application is shown below. Figure 3 As shown, the task processing method provided in this embodiment includes the following S310 to S330.

[0049] S310, The computing device obtains the user request.

[0050] The user request is used to request an answer to a target question. The target question can be any question raised by the user. The target question can be based on actual business scenarios or other information. This application does not limit this. For example, the target question could be "What are the main technical bottlenecks that various business units have generally faced in the past year?", "What is the most common core failure of a certain model of product in a target region in a certain year?", or "What is the mechanistic relationship between the bandgap change of oxide materials and the doping elements?"

[0051] In some possible scenarios, the target question may not be proposed by the user; for example, the target question may be generated by the computing device according to preset question generation rules. The computing device generates an answer to the target question based on the generated target question. The computing device determines the suitability of the method provided in this application for the scenario based on the answer to the target question, etc. The method of obtaining the target question in this application is not limited.

[0052] The above section described the target problem of user requests; the following section describes how computing devices obtain user requests.

[0053] Computing devices can obtain user requests in a variety of ways. Examples of two possible methods are given below using Example 1 and Example 2.

[0054] Example 1: The computing device directly obtains the user request.

[0055] In this scenario, the computing device can provide a user request input interface and, in response to the user's operation on the user request input interface, obtain the user request.

[0056] Example 2: The computing device receives a user request sent by another device.

[0057] In this scenario, the computing device receives user requests from other devices (such as client devices) that are communicatively connected to the computing device.

[0058] The foregoing has provided an exemplary description of how a computing device obtains user requests. Depending on the needs of the actual application, the computing device may also use other methods to obtain user requests, and this application does not limit such methods.

[0059] After obtaining the user's request, the computing device can also execute S320 to obtain the search results for each layer.

[0060] S320, the computing device responds to the user's request and retrieves the search results for each layer in the multi-layered community.

[0061] The multi-layered community comprises M levels. Each level includes multiple nodes and semantic relevance between them. A node in the i-th level of the M levels is a semantic abstraction of at least one node in the (i-1)-th level of the M levels. The retrieval results for each level include nodes in each level whose semantic relevance to the target question is greater than or equal to a relevance threshold. M is an integer greater than or equal to 2, and i is an integer greater than or equal to 2 and less than or equal to M.

[0062] In some possible scenarios, semantic similarity can be used to represent semantic relevance. When semantic similarity is used to represent semantic relevance, the relevance threshold can be represented by a similarity condition. That is, the retrieval results at each layer include nodes in each layer whose semantic similarity to the target question satisfies the similarity condition. The method provided in this application will be described below as an example of using semantic similarity to represent semantic relevance and similarity conditions to represent the relevance threshold.

[0063] A multi-layered community can be constructed based on application scenario-related files related to the target problem. In other words, the multi-layered community describes the relevance of the target problem. For example, if M is 3, the first layer includes the following nodes: classification algorithm, regression algorithm, clustering algorithm, dimensionality reduction algorithm, convolutional neural network, recurrent neural network, large model algorithm, intelligent decision-making, and environment interaction learning. The second layer includes the following nodes: supervised learning, unsupervised learning, deep learning, and reinforcement learning. The third layer includes nodes for machine learning. Supervised learning is a semantic abstraction of classification and regression algorithms; unsupervised learning is a semantic abstraction of clustering and dimensionality reduction algorithms; deep learning is a semantic abstraction of convolutional neural networks, recurrent neural networks, and large model algorithms; and reinforcement learning is a semantic abstraction of intelligent decision-making and environment interaction learning. For details on how to obtain the multi-layered community, please refer to the relevant description below.

[0064] The previous section described the multi-layered community; the following section describes the process by which computing devices obtain the retrieval results for each layer.

[0065] In response to a user request, the computing device can perform a layer-by-layer search of the multi-level community from the highest to the lowest level, obtaining the search results for each level. Specifically, the computing device determines the entry node for each level, performs a nearest neighbor search based on the entry node, and identifies the k nodes in each level that are most relevant to the target problem. The computing device uses the k nodes most relevant to the target problem in each level as the search results for that level. Here, k is a positive integer. k can be preset or set according to the needs of actual application; this application does not limit this.

[0066] Depending on whether the current retrieval layer is the highest layer in a multi-layered community, the computing device uses different retrieval methods for the current retrieval layer. Case 1 and Case 2 are described below respectively.

[0067] Scenario 1: The current retrieval layer is the highest layer in a multi-layered community.

[0068] In this scenario, the computing device randomly selects a node from the multiple nodes included in the highest layer as the entry node for that layer. The computing device then performs a nearest neighbor search within the highest layer from the entry node to obtain at least one node that is most relevant to the target problem.

[0069] In some possible scenarios, the computing device can write at least one node that is most relevant to the target problem into the set, such as writing at least one node in the highest layer that is most relevant to the target problem into the set R. M .

[0070] Scenario 2: The current retrieval layer is not the highest layer in a multi-layered community.

[0071] Taking the (i-1)th layer in a multi-layered community as an example, the retrieval process for the current retrieval layer is explained. Specifically, the computing device determines the second node in the (i-1)th layer that has a mapping relationship with the first node as the entry node of the (i-1)th layer. The first node is defined as: the node in the i-th retrieval result of the i-th layer whose semantic similarity to the target question meets the first similarity condition. Based on the association relationships among multiple nodes in the (i-1)th layer, the computing device retrieves nodes in the (i-1)th layer starting from the second node, obtaining the (i-1)th retrieval result of the (i-1)th layer. The (i-1)th retrieval result includes: nodes in the (i-1)th layer whose semantic similarity to the target question is greater than or equal to the second similarity condition.

[0072] Both the first and second similarity conditions can be preset or set according to the needs of actual application. This application does not limit this. For example, the first similarity condition may be: maximum semantic similarity. The second similarity condition may be: semantic similarity greater than a specified value. The specified value is equal to the semantic similarity between a specified node in the (i-1)th layer and the target problem. The specified node is the node located in a specified position in the first sequence. The first sequence is: nodes in the (i-1)th layer arranged in descending order of semantic similarity to the target problem. The specified position can be preset or set according to the needs of actual application. This application does not limit this. In some possible examples, the first and second similarity conditions can be collectively referred to as similarity conditions. This application does not limit this.

[0073] Similarly, the computing device can write the (i-1)th retrieval result into set R. i-1 .

[0074] In some possible scenarios, a computing device can determine the similarity between nodes based on textual descriptions of node attributes. In some examples, the textual description can be simply referred to as "text." For instance, text 1 describes the attributes of node 1, and text 2 describes the attributes of node 2. In this case, the computing device can obtain vector 1 corresponding to text 1 and vector 2 corresponding to text 2. The computing device calculates the similarity between vector 1 and vector 2, and uses the similarity result as the similarity between node 1 and node 2.

[0075] The computing device can calculate the similarity between vector 1 and vector 2 in various ways, including but not limited to cosine similarity. The computing device can determine the similarity between vector 1 and vector 2 using the following formula 1.

[0076] Formula 1 Where, sim ( The similarity between node 1 and node 2 is represented by ).

[0077] The above describes the process of determining the entry node of each layer in a multi-layered community, and the process of searching each layer based on the entry node.

[0078] Computing devices can obtain retrieval results for each layer in various ways, including but not limited to: Hierarchical Navigable Small Worlds (HNSW) indexing, Hierarchical K-Means Clustering (KMeans) indexing, inverted indexing, hybrid vector indexing structures, multi-layer inverted file (IVF) indexing, and cross-layer indexing based on graph neural networks (GNN). The following description uses the example of a computing device using an HNSW index to obtain retrieval results for each layer to illustrate the process. In some possible examples, the HNSW index may also be referred to simply as an index.

[0079] The computing device can also use a multi-layered community index to retrieve results for each layer within the community. For example, the computing device can retrieve results for each layer based on the multi-layered community index. This eliminates the need for the computing device to create an index for each layer within the multi-layered community and to obtain retrieval results for each layer based on its corresponding index. In this application, the computing device creates one index for the multi-layered community, reducing the number of indexes required. During the retrieval process, when creating an index for each layer within the multi-layered community, the computing device needs to retrieve each layer within each index to obtain the retrieval results for one index, and then obtain the retrieval results for the entire multi-layered community based on the retrieval results from multiple indexes. In this application, the computing device can retrieve the retrieval results for the entire multi-layered community simply by retrieving each layer within the multi-layered community index. This reduces the number of layers that need to be retrieved, improving retrieval efficiency. Furthermore, when using multiple indexes for retrieval, information from other indexes cannot be obtained during the retrieval of one index, potentially affecting the accuracy of the retrieval results. In this application, global information can be obtained from a single index, ensuring the accuracy of the retrieval results.

[0080] Before describing the process by which computing devices retrieve data from each layer based on a multi-layer community index, we will first describe the multi-layer community index.

[0081] The index of a multi-level community includes: the node identifiers of nodes in each level of the multi-level community, the relationships between nodes in each level, and the mapping relationships between nodes in adjacent levels. The index of a multi-level community can be represented by the following formula 2.

[0082] Formula 2 Here, H represents the index of the multi-level community. G represents the level included in the multi-level community. This represents the mapping relationship between nodes in adjacent layers. G can be represented by the following formula 3.

[0083] Formula 3 in, This indicates the first level (i.e., the lowest level) of a multi-level community. This represents the i-th layer of a multi-layered community. This represents the Mth layer (i.e., the highest layer) of a multi-layered community. It can be represented by the following formula 4.

[0084] Formula 4 in, This represents the nodes included in the i-th layer. This represents the association between different nodes in the i-th layer.

[0085] In some possible scenarios, the relationships between nodes in each layer of a multi-level community index can be represented by the following formula 5.

[0086] Formula 5 in, The index represents the relationships between nodes in each layer of a multi-level community. This represents the relationships between different nodes in each layer from layer 1 to layer M.

[0087] In some possible cases, the mapping relationship between nodes in adjacent layers of the multi-layer community index can be represented by the following formula 6.

[0088] Formula 6 in, This represents the mapping relationship between two adjacent layers from layer 1 to layer M.

[0089] In some possible scenarios, the mapping relationship between nodes in adjacent layers can be established based on the semantic similarity between nodes in adjacent layers. For example, the i-th layer includes a second node, which is a semantic abstraction of at least one node in the (i-1)-th layer. In this case, the index can include the mapping relationship between the second node and a third node. The third node is at least one node whose semantic similarity with the second node satisfies the first similarity condition. That is, a node in the i-th layer has a mapping relationship with at least one node in the (i-1)-th layer whose semantic similarity satisfies the first similarity condition. Please refer to the above for a description of the first similarity condition, which will not be repeated here.

[0090] The above describes the index of multi-level communities. The following describes the retrieval process based on the index of multi-level communities.

[0091] Specifically, the computing device can execute the following steps S3201 to S3204 to retrieve the search results for each layer based on the multi-layer community index.

[0092] S3201, The computing device determines the entry node M of the highest level.

[0093] The computing device can randomly select a node from the nodes included in the highest layer as the entry node of the highest layer (such as the nodes s included in the highest layer).

[0094] S3202, the computing device performs a nearest neighbor search on the highest layer based on the entry node M, and obtains at least one node in the highest layer that is most relevant to the target problem.

[0095] The computing device performs a nearest neighbor search on the highest level based on the relationships between nodes in each layer of the index, obtaining the retrieval results for the highest level. The retrieval results for the highest level include at least one node in the highest level that is most relevant to the target question. This most relevant node can refer to a node in the highest level whose semantic similarity to the target question satisfies a second similarity condition. For a detailed description of the process of the computing device performing a nearest neighbor search on the highest level, please refer to the description of the single-layer retrieval process below; it will not be repeated here.

[0096] Similarly, computing devices can write the highest-level search results into a set, such as writing the highest-level search results into set R. M Among them, R M This includes at least one node in the highest layer that is most relevant to the target problem.

[0097] S3203, the computing device determines the entry node of each layer in the other layers, and performs a nearest neighbor search based on the entry node of each layer to obtain at least one node in each layer that is most relevant to the target problem.

[0098] Other layers include all layers in a multi-layered community except for the top layer.

[0099] The computing device can determine the retrieval results of the layer above the current retrieval layer (i.e., the i-th layer), and identify the node most relevant to the target question (i.e., the first node) from the retrieval results of the layer above (i.e., the i-th layer). Based on the mapping relationship between nodes in adjacent layers included in the index, the computing device determines the node in the current retrieval layer that has a mapping relationship with the first node (i.e., the second node), and identifies the node with the mapping relationship as the entry node of the current retrieval layer.

[0100] After determining the entry node of the current retrieval layer, similarly, the computing device performs a nearest neighbor search on the current retrieval layer, starting from the entry node, based on the relationships between nodes in each layer of the index, to obtain the retrieval results for the current retrieval layer. The retrieval results for the current retrieval layer include: at least one node most relevant to the target question. Similarly, at least one node most relevant to the target question can refer to a node in the current retrieval layer whose semantic similarity to the target question satisfies the second similarity condition. For a detailed description of the single-layer retrieval process below, please refer to the description of the nearest neighbor search process for the computing device performing the nearest neighbor search on the current retrieval layer; it will not be repeated here.

[0101] In some possible scenarios, the computing device can identify the node closest to the target question in the previous layer's search results as the most relevant node to the target question. The computing device can determine the distance between the node in the search results and the target question based on the similarity between the node's vector and the target question's vector. The computing device can use methods such as cosine similarity to calculate the similarity between the node's vector and the target question's vector; relevant descriptions are provided above and will not be repeated here. In some possible examples, the target question's vector can also be called the query vector.

[0102] The computing device performs the above process on each of the other layers to obtain the retrieval results for each of the other layers.

[0103] Similarly, the computing device can write the retrieval results from other layers into a set, such as writing the retrieval results from the (i-1)th layer into a set R. i-1 Among them, R i-1 This includes at least one node in the (i-1)th layer that is most relevant to the target problem.

[0104] S3204, the computing device obtains the search results for each layer in the multi-layer community based on the search results of the highest layer and the search results of each layer in other layers.

[0105] The computing device uses the search results from the highest level and the search results from other levels as the search results for each level in the multi-level community.

[0106] Similarly, a computing device can write the search results of each level of a multi-level community into a set, such as writing the search results of each level of a multi-level community into a set R. That is, R = {R1…R2}. i-1 …R M}, where R1 represents the search results for the lowest level in the multi-level community, and R i-1 For the search results of the (i-1)th layer in a multi-layered community, R M This is the search result for the highest level of a multi-level community.

[0107] The above describes the process of index-based retrieval. The following example, using index-based retrieval of the (i-1)th layer, illustrates the process of index-based retrieval of a single layer in a multi-layered community.

[0108] Taking at least one node that is most relevant to the target problem as an example: k nodes that are most relevant to the target problem, that is, at least k nodes.

[0109] In this scenario, the computing device needs to determine the k nodes most relevant to the target problem from the (i-1)th layer. That is, the (i-1)th retrieval result includes these k nodes.

[0110] The computing device can also perform the following process to obtain k nodes. Specifically, the computing device obtains the query vector q corresponding to the target problem. The computing device initializes the set of visited nodes V, the candidate expansion queue Q, and the current nearest neighbor set K. Here, V is used to store nodes that have been searched in the (i-1)th layer. Q is used to store nodes that will participate in the next retrieval. K is used to store the search results for the (i-1)th layer.

[0111] The computing device stores the entry node of layer i-1 in Q. The computing device calculates the distance between the entry node and q. The computing device determines all adjacent nodes of the entry node in layer i-1 (hereinafter referred to as the first adjacent node) based on the index. The computing device calculates the distance between each node in the first adjacent node and q. The computing device writes at least one node with the smallest distance among the entry node and the first adjacent nodes into K.

[0112] The computing device writes the entry node to V.

[0113] The computing device retrieves the adjacent nodes (hereinafter referred to as the second adjacent nodes) of each node in the first adjacent node at level i-1 based on the index. The computing device writes the nodes in the second adjacent nodes that do not exist in V into Q.

[0114] The computing device selects the node with the smallest distance to q from Q (e.g., the third node). The computing device determines all adjacent nodes of the third node in level i-1 (e.g., the third adjacent node) based on the index. The computing device obtains the distances between the third node, each of the third adjacent nodes, and q. The computing device selects the node with the smallest distance to q from the third node and third adjacent nodes. If the distance corresponding to the node with the smallest distance is greater than or equal to the distance corresponding to the node with the largest distance to q in K, the computing device ends the search in level i-1. Otherwise, the computing device determines whether the number of nodes in K is greater than or equal to k. If the number of nodes in K is less than k, the computing device selects at least one node with the smallest distance to q from the third node and third adjacent nodes, and writes this at least one node into K and Q. If the number of nodes in K is greater than or equal to k, the computing device deletes the node with the farthest distance to q from K. The computing device writes at least one node with the smallest distance to q from the third node and third adjacent nodes into K and Q.

[0115] The computing device repeats the above process until the retrieval of the (i-1)th layer is completed, yielding K. Here, K includes k nodes, and the (i-1)th retrieval result includes k nodes from K.

[0116] The above example illustrates the process of obtaining search results for each layer by using a computing device to search multi-layer communities in order from the highest to the lowest layer. In some possible cases, the computing device may also search multi-layer communities in other ways, which are not limited in this application. For example, the computing device may search each layer of the multi-layer community in parallel, or use reordering or fusion of search results to obtain search results for each layer, etc.

[0117] The above describes the process of obtaining the retrieval results of each layer in a multi-layered community using S320. In some possible cases, after obtaining the retrieval results of each layer, the computing device can also execute S330 to generate the answer to the target question.

[0118] S330, the computing device generates the answer to the target question based on the search results of each layer.

[0119] After obtaining the search results at each layer, the computing device can retrieve information about each node within those results. Based on this information, the computing device generates an answer to the target question.

[0120] The information of a node varies depending on its level.

[0121] For example, for the lowest level of search results, node information may include, but is not limited to: node descriptions, text blocks, and node relationships. Node descriptions describe the nodes, such as definitions and descriptions of the entity the node represents. Node relationships describe the structural dependencies and semantic relevance between nodes. Text blocks include text fragments obtained from documents related to the application scenario of the target problem.

[0122] For example, consider the search results for levels other than the lowest level. Node information may include, but is not limited to: node description and node associations. The node description describes the node, such as the definition, explanation, or summary of the community it represents (i.e., community summary). Node associations indicate the relationships between communities represented by different nodes within the same level.

[0123] The information about the nodes has been described above. The following describes the process of generating the answer to the target question based on the retrieval results of each layer.

[0124] Specifically, the computing device can perform the following (1) and (2) to generate the answer to the target question.

[0125] (1) The computing device obtains the target search results from the search results of each layer.

[0126] Among them, the word length of the target retrieval results is less than or equal to the upper limit of word length.

[0127] In some possible scenarios, the computing device assesses the reasonableness of each layer's search results as answers to the target question, and selects the target search results from the search results at each layer in descending order of reasonableness. That is, the sum of the term lengths of the target search results is less than or equal to the upper limit of term length, and the reasonableness of each search result in the target search results as answers to the target question is greater than the reasonableness of each search result in the non-target search results as answers to the target question.

[0128] In some possible scenarios, computing devices can employ artificial intelligence agent models (such as large models) to generate analysis reports of search results at each layer, and based on these reports, determine the reasonableness of the search results at each layer as answers to the target question. Specifically, the computing device uses the filtering prompt word P... filter Based on the node information in the search results of each layer, a large model is used to generate an analysis report for the corresponding layer. The computing device then uses these analysis reports to determine the reasonableness of the search results for that layer as an answer to the target question. filter It can be preset or set according to the needs of actual application; this application does not limit this.

[0129] In some possible scenarios, the computing device uses the large model to generate analysis reports for each layer according to the following formula 7.

[0130] Formula 7 in, For the analysis report of layer i, To filter prompt words, For the information of the node in the i-th search result, The filter prompts and information from the nodes in the i-th search result are concatenated and then input into the large model.

[0131] In some possible scenarios, computing devices can generate data tables based on the information of nodes in the retrieval results at each layer, and generate corresponding layer analysis reports using a large model based on filter prompts and data tables. The data tables at different layers are used to indicate knowledge perspectives of varying coarseness, scope, and hierarchical dimensions.

[0132] (2) The computing device uses the target retrieval results to generate the answer.

[0133] Computing devices can input target retrieval results into an artificial intelligence model (such as a large model) to obtain the answer to the target question. Specifically, the computing device is based on the fusion prompt word P. merge The system combines the target retrieval results with a large-scale model to generate answers. The fusion prompts can be preset or set according to the needs of the actual application; this application does not limit this. When the target retrieval results include n results, the computing device can obtain the answer using the following formula 8.

[0134] Formula 8 in, For the answer to the target question, To integrate prompt words, The first search result in the target search results. The second search result in the target search results. For the nth search result in the target search results, The analysis reports corresponding to the fusion suggestion words and the various search results in the target search results are then concatenated and input into the large model.

[0135] The above describes the process of obtaining the answer to the target question based on the search results of each layer. The following describes the process of building a multi-layered community.

[0136] The computing device can build multi-layered communities based on a knowledge graph that includes semantic edges. Specifically, the computing device can perform the following steps (1) to (3) to build multi-layered communities.

[0137] (1) The computing device acquires the initial knowledge graph.

[0138] The initial knowledge graph is constructed based on documents related to the application scenario of the target problem. The initial knowledge graph includes multiple nodes and data dependency edges between these nodes.

[0139] The computing device acquires files related to the application scenario of the target problem and divides these files into multiple text blocks. The computing device extracts entities and data dependencies between entities from each text block, generating entity descriptions. Based on the entities, their data dependencies, and the entity descriptions, the computing device generates an initial knowledge graph. In some possible examples, entity descriptions can be used to determine entity attributes.

[0140] Specifically, the computing device acquires files related to the application scenario of the target problem and divides the files into multiple text blocks according to a fixed token length. The computing device inputs these text blocks into a large model to obtain entities, data dependencies between entities, and entity descriptions. Based on the entities, data dependencies between entities, and entity descriptions, the computing device generates an initial knowledge graph. This initial knowledge graph includes: multiple nodes, data dependency edges between multiple nodes, and node descriptions for each node. Node descriptions define and explain the content represented by the node itself. The fixed token length can be preset or set according to the needs of the actual application; this application does not limit this.

[0141] In some possible scenarios, if the length of the remaining token after partitioning is less than the fixed word length, a text block can be generated directly based on the remaining token.

[0142] In some possible scenarios, the documents related to the application scenario of the target problem may include one or more, and this application does not limit this. When there are multiple documents, their formats, languages, etc., may differ or be the same, and this application does not limit this.

[0143] In some possible scenarios, the initial knowledge graph can be generated offline. That is, the computing device can build multiple initial knowledge graphs based on available knowledge even without receiving the target question. Each initial knowledge graph corresponds to a category of knowledge. After receiving a user request, the computing device selects the initial knowledge graph that matches the target question from among the multiple initial knowledge graphs.

[0144] (2) The computing device adds semantic edges to the initial knowledge graph to obtain the knowledge graph.

[0145] The knowledge graph includes multiple nodes, data dependency edges, and semantic edges. The first semantic edge describes a semantic similarity between the two nodes connected by it that is greater than or equal to a similarity threshold. The first semantic edge is a semantic edge. Two nodes belong to multiple nodes.

[0146] The computing device adds semantic edges between different nodes in the initial knowledge graph based on their semantic similarity, thus obtaining the knowledge graph. Specifically, the computing device obtains the node descriptions of different nodes in the initial knowledge graph. The computing device generates vectors for the corresponding nodes based on their node descriptions. The computing device calculates the similarity between the vectors corresponding to different nodes. If the similarity is greater than or equal to a similarity threshold, the computing device adds semantic edges between the different nodes in the initial knowledge graph, thus obtaining the knowledge graph.

[0147] Computing devices can calculate the similarity between vectors corresponding to different nodes in various ways, including but not limited to cosine similarity. When the computing device uses cosine similarity to calculate the similarity between vectors, it can use Formula 1 above to calculate the similarity.

[0148] In some possible cases, the similarity threshold can be preset or set according to the needs of actual application. This application does not limit this, such as the similarity threshold being τ.

[0149] In some possible scenarios, the computing device can also obtain the edge weights of semantic edges between nodes based on the similarity between nodes. For example, the computing device can use the following formula 9 to obtain the edge weights of semantic edges.

[0150] Formula 9 Where vector 1 is the vector of node 1, and vector 2 is the vector of node 2. To represent the similarity between node 1 and node 2, This represents the similarity between node 1 and node 2.

[0151] For example, the initial knowledge graph includes nodes 1 to 3. In this case, the computing device can obtain vectors 1 to 3 corresponding to nodes 1 to 3, respectively, based on node descriptions 1 to 3. The computing device uses cosine similarity to calculate the similarity 12 between vector 1 and vector 2, the similarity 13 between vector 1 and vector 3, and the similarity 23 between vector 2 and vector 3. The computing device compares the similarity 12 with τ, the similarity 13 with τ, and the similarity 23 with τ, respectively.

[0152] When similarity 12 is greater than τ, similarity 13 is greater than τ, and similarity 23 is less than τ, the computing device adds semantic edge 12 between node 1 and node 2 of the initial knowledge graph, semantic edge 13 between node 1 and node 3, and semantic edge 23 between node 2 and node 3 to obtain the knowledge graph.

[0153] After obtaining the knowledge graph, the computing device can also perform (3) to obtain multi-layered communities based on the semantic edges in the knowledge graph.

[0154] (3) The computing device clusters multiple nodes in the knowledge graph based on semantic edges to obtain multi-layer communities.

[0155] Computing devices can perform community detection on multiple nodes in a knowledge graph based on semantic edges, obtaining at least one semantic abstraction corresponding to each node. Specifically, the computing device clusters multiple nodes in the knowledge graph based on semantic edges, aggregating semantically similar and closely related nodes to form a community, obtaining at least one community corresponding to each node. Each community is a semantic abstraction of the corresponding at least one node.

[0156] In some possible scenarios, after clustering multiple nodes to obtain at least one community, the computing device can also generate text summaries for each community within that at least one community. Specifically, the computing device can invoke an artificial intelligence model (such as a large model) based on the node descriptions of each node in the at least one node corresponding to a community to generate text descriptions for the community corresponding to at least one node.

[0157] In some possible scenarios, after obtaining at least one community and the text descriptions of each community within that community, the computing device can also construct a first knowledge graph corresponding to at least one community based on the aforementioned information. Specifically, the computing device uses each community within the at least one community as a first node in the first knowledge graph. The computing device generates first edges connecting different first nodes within the at least one first node based on the text descriptions of each community within the at least one community. The computing device generates the first knowledge graph based on the at least one first node and the first edges corresponding to the at least one community. The computing device uses the text descriptions of each community within the at least one community as the node descriptions of the corresponding nodes. That is, the first knowledge graph includes: at least one first node, first edges, and node descriptions of each first node within the at least one first node.

[0158] In this scenario, the computing device clusters multiple nodes in the knowledge graph, resulting in two layers of communities. The first layer (the lowest layer) is the knowledge graph layer, and the second layer (the highest layer) is the first knowledge graph layer.

[0159] In some possible scenarios, the computing device can further cluster the first knowledge graph to obtain a second knowledge graph. Based on the knowledge graph, the first knowledge graph, and the second knowledge graph, the computing device obtains a three-layer community. The first layer (the lowest layer) is the knowledge graph layer, the second layer is the first knowledge graph layer, and the third layer (the highest layer) is the third knowledge graph layer. A node in the second knowledge graph layer is a semantic abstraction of at least one node in the first knowledge graph layer, and vice versa. Regarding the method by which the computing device clusters the first knowledge graph to obtain the second knowledge graph, please refer to the section above on obtaining the first knowledge graph; it will not be repeated here.

[0160] In some possible scenarios, the computing device can also repeat the clustering process M-3 times, using the previous clustering result as input, to obtain M-layer communities. Please refer to the above description for details, which will not be repeated here.

[0161] Describe the process of establishing multi-level communities with specific examples.

[0162] Figure 4 This application provides a flowchart illustrating the process of establishing a multi-level community, such as... Figure 4 As shown in the example, M is 3, the fixed token length is 1 token, and the files related to the application scenario of the target problem include: File 1 to File 3.

[0163] In this case, the computing device can perform the following (1) to (3) to establish the M-layer community.

[0164] (1) The computing device acquires the initial knowledge graph.

[0165] The computing device divides the files from file 1 to file x into text blocks 1 to n according to the quantity 1. The computing device then inputs text blocks 1 to text blocks n into the large model to generate an initial knowledge graph.

[0166] (2) Computing devices acquire knowledge graphs.

[0167] The computing device obtains the semantic similarity between different nodes in the initial knowledge graph. If the semantic similarity between nodes is greater than or equal to the similarity threshold, semantic edges are added between the nodes to obtain the knowledge graph. For example, the knowledge graph includes: nodes 1 to 10, semantic edges, and node descriptions 1 to 10 corresponding to nodes 1 to 10.

[0168] (3) The computing device obtains the M-layer community based on semantic edges.

[0169] The computing device clusters the knowledge graph based on the semantic edges of the knowledge graph, resulting in communities 21 to 24. Among them, community 21 is the semantic abstraction of nodes 1 to 3, community 22 is the semantic abstraction of nodes 4 and 5, community 23 is the semantic abstraction of nodes 6 and 8, and community 24 is the semantic abstraction of nodes 9 and 10.

[0170] The computing device generates a text description for community 21 based on the node descriptions (node ​​descriptions 1 to 3) of the nodes corresponding to community 21. The computing device generates a text description for community 22 based on the node descriptions (node ​​descriptions 4 and 5) of the nodes corresponding to community 22. The computing device generates a text description for community 23 based on the node descriptions (node ​​descriptions 6 to 8) of the nodes corresponding to community 23. The computing device generates a text description for community 24 based on the node descriptions (node ​​descriptions 9 and 10) of the nodes corresponding to community 24.

[0171] The computing device designates communities 21 to 24 as nodes 21 to 24, respectively. It designates the text description of community 21 as text description 21 of node 21, the text description of community 22 as text description 22 of node 22, the text description of community 23 as text description 23 of node 23, and the text description of community 24 as text description 24 of node 24. Based on text descriptions 21 to 24, the computing device determines edge 1 between nodes 21 and 24. Based on the above information, the computing device obtains knowledge graph 1. Knowledge graph 1 includes: nodes 21 to 24, edge 1, and text descriptions 21 to 24.

[0172] The computing device further clusters knowledge graph 1 to obtain knowledge graph 2. Specifically, the computing device clusters knowledge graph 1 based on edge 1 to obtain community 31 and community 32. Among them, community 31 is the semantic abstraction of node 21 and node 22, and community 32 is the semantic abstraction of node 23 and node 24.

[0173] The computing device obtains the text description of community 31 based on text description 21 and text description 22. The computing device obtains the text description of community 32 based on text description 23 and text description 24.

[0174] The computing device designates communities 31 and 32 as nodes 31 and 32, respectively. It uses the text description of community 31 as the text description 31 of node 31 and the text description of community 32 as the text description 32 of node 32. Based on text description 31 and text description 32, the computing device determines edge 2 between nodes 31 and 32. Based on the above information, the computing device obtains knowledge graph 2. Knowledge graph 1 includes: nodes 31 and 32, edge 2, and text descriptions 31 and 32.

[0175] The computing device generates a three-layer community based on knowledge graphs, knowledge graph 1, and knowledge graph 3. The first layer (the lowest layer) is the knowledge graph layer, the second layer is knowledge graph 1, and the third layer (the highest layer) is knowledge graph 2. In knowledge graph 2, node 31 is a semantic abstraction of nodes 21 and 22, and node 32 is a semantic abstraction of nodes 23 and 24. In knowledge graph 1, node 21 is a semantic abstraction of nodes 1 to 3, node 22 is a semantic abstraction of nodes 4 and 5, node 23 is a semantic abstraction of nodes 6 to 8, and node 24 is a semantic abstraction of nodes 9 and 10.

[0176] In some possible scenarios, the first layer can also be called the lower-level community, the second layer can also be called the middle-level community, and the third layer can also be called the upper-level community.

[0177] The process of establishing a multi-level community has been described above. The process of establishing an index for a multi-level community is described below.

[0178] After obtaining the multi-layer community, the computing device can build an index of the multi-layer community based on the nodes in each layer and the node descriptions of the nodes in each layer.

[0179] When creating an index, the computing device sets the number of neighboring nodes for each node. Based on the semantic similarity between nodes, the computing device determines the number of neighboring nodes for each node. The number of neighboring nodes can be preset or set according to the needs of the actual application; this application does not limit this, for example, the number of neighboring nodes could be m.

[0180] The computing device can insert the nodes of each layer in the multi-layer community into the index layer by layer, from the highest to the lowest layer, to obtain the index of the multi-layer community.

[0181] Specifically, this applies to the highest level of a multi-layered community. The computing device retrieves a node (e.g., the fourth node) from the highest level and inserts it into the index. The computing device calculates the similarity between the fourth node and all other nodes in the highest level, identifying the m nodes with the highest similarity to the fourth node as its m adjacent nodes, thus obtaining the association relationships of the fourth node in the next higher level. The computing device repeats this process until all nodes in the highest level are inserted into the index, obtaining the association relationships between nodes in the highest level. If the number of adjacent nodes of a node is less than m (e.g., n), the computing device directly identifies these n nodes as the adjacent nodes of that node (the following steps are similar and will not be elaborated further).

[0182] The computing device inserts nodes from the next adjacent layer (or second-highest layer) of the highest layer into the index. Specifically, the computing device retrieves a node (such as the fifth node) from the second-highest layer and inserts it into the index. The computing device calculates the similarity between the fifth node and all other nodes in the second-highest layer, and identifies the m nodes with the highest similarity to the fifth node as its m adjacent nodes, thus obtaining the association relationship of the fifth node in the second-highest layer.

[0183] The computing device establishes a mapping relationship between the fifth node and each node in the highest layer.

[0184] Similarly, the computing device retrieves a node (such as the sixth node) from the nodes in the second-highest level other than the fifth node and inserts the sixth node into the index. The computing device calculates the similarity between the sixth node and the nodes in the second-highest level other than the sixth node, and determines the m nodes with the highest similarity to the sixth node as the m neighboring nodes of the sixth node, thus obtaining the association relationship of the sixth node in the second-highest level.

[0185] The computing device calculates the similarity between the sixth node and each node in the top layer. If the similarity between the sixth node and the node in the top layer is greater than the similarity between the fifth node and the corresponding node in the top layer, the computing device deletes the mapping relationship between the fifth node and the corresponding node in the top layer, and establishes a mapping relationship between the sixth node and the corresponding node in the top layer.

[0186] The computing device repeats the above process until all nodes in the next higher level are inserted into the index.

[0187] Similarly, the computing device performs the above process, inserting nodes from each layer of the multi-layer community into the index to obtain the index of the multi-layer community.

[0188] In some possible scenarios, if the semantic similarity between node 1 and node 2 has already been calculated during the process of building a multi-layered community index, the previously calculated semantic similarity can be retrieved directly the next time the semantic similarity between node 1 and node 2 needs to be obtained, without having to calculate it again. This saves the computational resources required to build the multi-layered community index.

[0189] In some possible scenarios, computing devices can also determine the semantic similarity between nodes based on the edge weights of semantic edges in the knowledge graph, without having to calculate semantic similarity again.

[0190] The process of obtaining a multi-level community index by a computing device has been described above. The process of obtaining a multi-level community index will be described again below with specific examples.

[0191] In this example, M is 3, meaning the multi-layered community has 3 layers. The highest layer includes nodes 31 and 32, the next highest layer includes nodes 21 to 24, and the lowest layer includes nodes 1 to 10. m is 2.

[0192] In this scenario, targeting the highest level, the computing device randomly selects a node (e.g., node 31) from nodes 31 and 32 and inserts it into the index. The computing device calculates the semantic similarity between nodes 31 and 32. If the semantic similarity is greater than or equal to a similarity threshold, it establishes an association between nodes 31 and 32. The computing device then inserts node 32 into the index. Since the association between nodes 31 and 32 has already been established, there is no need to calculate the similarity between nodes 32 and 31 at this point.

[0193] For the next higher level, the computing device randomly selects a node (e.g., node 21) from nodes 21 to 24 and inserts an index. The computing device calculates the semantic similarity 1 between nodes 21 and 22, the semantic similarity 2 between nodes 21 and 23, and the semantic similarity 3 between nodes 21 and 24. The computing device selects the two largest semantic similarities (e.g., semantic similarity 1 and semantic similarity 2) from semantic similarity 1 to semantic similarity 3, and establishes the association between the nodes corresponding to the two largest semantic similarities and node 21, i.e., establishing the association between nodes 21 and 22, and between nodes 21 and 23.

[0194] The computing device establishes a mapping relationship between node 31 and node 21, and establishes a mapping relationship between node 32 and node 21.

[0195] The computing device continues to insert nodes in the next higher level into the index, such as inserting node 22, the node most similar to node 21, into the index. The computing device calculates the semantic similarity 4 between nodes 22 and 23, and the semantic similarity 5 between nodes 22 and 24. The computing device selects the two largest semantic similarities (e.g., semantic similarity 1 and semantic similarity 4) from semantic similarity 1, semantic similarity 4, and semantic similarity 5, and establishes the association between the nodes corresponding to the two largest semantic similarities and node 22. Since an association has already been established between nodes 21 and 22, in this case, the computing device establishes an association between nodes 22 and 23.

[0196] The computing node obtains the semantic similarity 6 between nodes 21 and 31, and the semantic similarity 7 between nodes 22 and 31. The computing device compares the semantic similarity 6 and semantic similarity 7. Since semantic similarity 6 is less than semantic similarity 7, the computing device deletes the mapping relationship between nodes 21 and 31, and establishes a mapping relationship between nodes 22 and 31.

[0197] The computing device obtains the semantic similarity 8 between node 21 and node 32, and the semantic similarity 9 between node 22 and node 32. The computing device compares the semantic similarity 8 and semantic similarity 9. Since semantic similarity 8 is greater than semantic similarity 9, the computing device does not change the mapping relationship between node 21 and node 32.

[0198] The computing device uses the process described above to insert each node in the second-highest level into the index, establish the association relationship between each node in the second-highest level and the mapping relationship between the nodes in the highest level and the nodes in the second-highest level.

[0199] Similarly, the computing device inserts each node in the lowest layer into an index, establishing the association between each node in the lowest layer and the mapping relationship between nodes in the next higher layer and nodes in the lowest layer.

[0200] Figure 5 An example diagram of an index provided for this application, such as Figure 5 As shown, the index includes: the node identifiers of each node from node 1 to node 10, the node identifiers of each node from node 21 to node 24, the node identifier of node 31, the node identifier of node 32, the association relationships between each node from node 1 to node 10, the association relationships between each node from node 21 to node 24, the association relationship between node 31 and node 32, the mapping relationship between node 21 and node 1, the mapping relationship between node 22 and node 4, the mapping relationship between node 23 and node 8, the mapping relationship between node 24 and node 9, the mapping relationship between node 31 and node 22, and the mapping relationship between node 32 and node 21.

[0201] The index of multi-level communities has been described above. The following is a summary description of the process of the method provided in this application.

[0202] Figure 6 A flowchart of a task processing method provided in this application is shown below. Figure 6 As shown in (a), the computing device can perform the following (1) to (7) to generate the answer to the target question.

[0203] (1) The computing device acquires the initial knowledge graph.

[0204] The computing device divides files related to the application scenario of the target problem into multiple text blocks according to a fixed token length. The computing device then inputs these text blocks into a large model to obtain an initial knowledge graph. This initial knowledge graph includes multiple nodes and data dependency edges between these nodes.

[0205] (2) The computing device adds semantic edges to the initial knowledge graph to obtain the knowledge graph.

[0206] The computing device determines the similarity between different nodes within a multi-node system based on the node descriptions of each node. If the similarity between two nodes is greater than or equal to a similarity threshold, the computing device adds a semantic edge between the two nodes to obtain a knowledge graph. The knowledge graph includes: multiple nodes, data dependency edges between the nodes, and semantic edges.

[0207] (3) The computing device establishes a multi-layered community based on the semantic edges in the knowledge graph.

[0208] The computing device clusters multiple nodes in the knowledge graph based on semantic edges to obtain multi-layered communities.

[0209] (4) The computing device establishes an index of multi-level communities.

[0210] The computing device establishes an index for the multi-layered community. The index includes: the node identifiers of nodes in each layer, the relationships between nodes in each layer, and the mapping relationships between adjacent layers.

[0211] (5) The computing device obtains the user request.

[0212] The user request is used to request an answer to the target question.

[0213] (6) The computing device responds to the user's request and retrieves the search results of each layer in the multi-layer community based on the multi-layer community index.

[0214] The computing device retrieves information from the index, following a top-to-bottom order, across multiple layers of the community to obtain at least one node in each layer that is most relevant to the target problem. Based on this most relevant node, the computing device generates retrieval results for each layer. These results include: the retrieval results for the lowest layer, the next highest layer, and the highest layer.

[0215] (7) The computing device generates the answer to the target question based on the retrieval results of each layer.

[0216] The computing device assesses the reasonableness of the search results obtained at each layer as an answer to the target question. The computing device retrieves the target search results from the search results at each layer in descending order of reasonableness. Specifically, the term length of the target search results is less than or equal to a length threshold, and the reasonableness of each result in the target search results is higher than that of each result in the non-target search results. Based on the target search results, the computing device uses a large model to generate the answer to the target question.

[0217] For a more detailed description of the above process, please refer to the text above; it will not be repeated here.

[0218] The flowchart of the method provided in this application has been described above. The method provided in this application will be described again below with specific examples.

[0219] Please continue reading Figure 6 ,like Figure 6 As shown in (b), in this example, the computing device selects the node most relevant to the target question from each layer as the retrieval result for that layer. The multi-layer community consists of three layers. The highest layer includes nodes 31 and 32, the next highest layer includes nodes 21 to 24, and the lowest layer includes nodes 1 to 10. The index includes the relationships between nodes 1 and 4, nodes 21 and 22, nodes 31 and 32, the mapping between nodes 32 and 21, and the mapping between nodes 22 and 4. The text description for node 32 is: “Title: General Blood and Hospitals; Description: The company…”. The text description for node 22 is: “In this community, General Blood acts as a distributor of blood, platelets, and plasma…”. The text description for node 4 is: “Title: The Flow of Goods and Services; Description: One Factor Behind It…”.

[0220] In this scenario, the computing device receives a user request, which requests an answer to "What goods and services are distributed and allocated by General Blood?". In response to the user request, the computing device converts "What goods and services are distributed and allocated by General Blood?" into a query vector q.

[0221] The computing device can perform a retrieval based on the query vector q and the index, as follows: Specifically, the computing device randomly selects a node from the highest level as the entry node of the highest level (e.g., node 31). Based on the index, the computing device determines node 32 (i.e., the adjacent node of node 31) that is associated with node 31. The computing device calculates the distance 1 between the vector of node 31 and the query vector q, and calculates the distance 2 between the vector of node 32 and the query vector q. If distance 1 is less than distance 2, in this case, the computing device uses node 32 as the retrieval result of the highest level.

[0222] Based on the index, the computing device designates node 21, which has a mapping relationship with node 32, as the entry node of the second-highest level. The computing device then retrieves all nodes in the second-highest level starting from the entry node. The computing device determines that the distance between the vector of node 22 and the query vector q is less than the distance between other nodes in the second-highest level and the query vector q. Therefore, the computing device identifies node 22 as the retrieval result for the second-highest level.

[0223] The computing device, based on the index, designates node 1, which has a mapping relationship with node 22, as the entry node of the lowest level. Starting from the entry node, the computing device retrieves all nodes in the lowest level. The computing device determines that the distance between the vector of node 4 and the query vector q is less than the distance between other nodes in the lowest level and the query vector q. Therefore, the computing device identifies node 4 as the retrieval result for the lowest level.

[0224] In other words, the search results obtained by the computing device through the above search process include: the search results at the highest level, the search results at the second highest level, and the search results at the lowest level. Among them, the search result at the highest level is node 32, the search result at the second highest level is node 22, and the search result at the lowest level is node 4.

[0225] Based on the text description of node 32, the computing device generates Analysis 32 for node 32: "In this community, the company's processes are designed to balance surplus...". Based on the text description of node 22, the computing device generates Analysis 22 for node 22: "General Blood is involved in the allocation of blood, platelets, and plasma." Based on the text description of node 4, the computing device generates Analysis 4 for node 4: "No relevant evidence is available in the provided data...".

[0226] The computing device, based on Analysis 32, Analysis 22, and Analysis 4, uses a large model to generate the answer "General Blood's main business focuses on the management and distribution of blood, platelets, and plasma."

[0227] The above description, with specific examples, further illustrates the application of the method provided in this application. The following description outlines the applicable scenarios for the method provided in this application.

[0228] The method provided in this application can be applied to a variety of scenarios. The following uses scenarios 1 to 3 to illustrate the application scenarios of the method provided in this application.

[0229] Scene 1 In this scenario, the method provided in this application is used to achieve unified querying and high-level summarization of cross-part knowledge bases within an enterprise.

[0230] Operational data for enterprises is scattered across internal documents, including but not limited to: technical design specifications, project online shared knowledge bases (wikis), annual reports, engineering logs, and cross-departmental meeting minutes. These internal documents may have different formats, and their themes and years may vary significantly, making cross-document analysis challenging to obtain answers to the target questions. Therefore, the method provided in this application can be used to build a knowledge graph based on internal documents, cluster the knowledge graph to obtain multi-layered communities, and then derive answers to the target questions related to the internal documents based on these multi-layered communities.

[0231] For example, the target question could be, "What were the main technical bottlenecks that various business units generally encountered in the past year?" Figure 7 The application flowchart of the first task processing method provided in this application is as follows: Figure 7 As shown, the computing device acquires internal documents. It divides the internal documents into multiple text blocks according to a fixed token length. Based on these text blocks, the computing device uses a large model to extract entities and data dependencies between them. Entities are used as nodes in the initial knowledge graph, and data dependency edges are established based on these entity data dependencies to create the initial knowledge graph. The computing device generates node descriptions based on the entity information. It then adds semantic edges to the initial knowledge graph based on the node descriptions, resulting in the final knowledge graph. Finally, the computing device clusters the knowledge graph based on these semantic edges, constructing multi-layered communities. This organizes the information in the internal documents into a multi-level organizational structure. For example, in a three-layered community structure, the lowest layer contains nodes corresponding to specific text segments, meeting minutes, and project logs; the next highest layer contains nodes corresponding to communities divided by product modules or problem types; and the highest layer contains nodes corresponding to cross-departmental and cross-year macro-themes (such as technological bottleneck trends and typical cross-departmental collaboration problems).

[0232] The computing device receives the user's target question, "What were the main technical bottlenecks commonly encountered by various business units in the past year?". Responding to the user's request, the computing device, based on a multi-layered community index, retrieves results from each layer of the multi-layered community in descending order of hierarchy. That is, the computing device searches within the nodes of the highest layer of the multi-layered community to quickly locate the topic most relevant to the target question (e.g., last year's technical bottlenecks). The computing device continues searching the next higher layer to determine the module-level communities associated with the most relevant topics retrieved from the highest layer. The computing device continues searching the lowest layer to obtain specific texts, meeting minutes, project logs, etc., associated with the module-level communities, thus obtaining actual cases, project records, and descriptions of engineering defects that led to the technical bottlenecks.

[0233] The computing device analyzes the search results at each layer, generating an analysis report for each layer. Based on the analysis report, the computing device determines the reasonableness of each layer's search results as answers to the target question, and filters them in descending order of reasonableness to obtain target search results whose sum of tokens is less than or equal to a fixed token length. Based on the target search results, the computing device obtains the answer to the target question.

[0234] In the above scheme, the computing device performs searches on each layer of the multi-layered community to obtain search results for each layer. The hierarchical search structure eliminates interference from a large amount of noise information. The computing device can return abstract summaries (i.e., the highest-level topic and the next-highest-level module-level community) and concrete evidence (i.e., specific texts, meeting minutes, project logs, etc. at the lowest level), ensuring that the answer to the target question matches the target question. The computing device filters the target search results from the search results at each layer and obtains the answer to the target question based on the target search results. It filters out search results with low reasonableness, reduces the token length that needs to be processed when obtaining the answer to the target question, reduces the amount of computation, and saves costs. The computing device directly obtains the answer to the target question from internal documents, eliminating the need for manual summarization of internal documents, reducing the workload of operators, and improving the efficiency of obtaining the answer to the target question.

[0235] Scene 2 In this scenario, the method provided in this application is used to achieve after-sales quality analysis and product problem localization for enterprises.

[0236] In the process of after-sales service and quality management, enterprises generate a large number of documents such as work order records, repair reports, and customer service communication texts. These documents vary in language and format, and their quantity is enormous (e.g., the number of work orders). Operators find it difficult to extract cross-regional and cross-century quality problem trends from these documents, such as "In year X, what is the most common core failure of product model Y in region Z?"

[0237] The computing device can use the method provided in this application to perform after-sales quality analysis and product problem localization, such as "What is the most common core failure of product model Y in region Z during year X?"

[0238] Figure 8 The application flowchart of the second task processing method provided in this application is as follows: Figure 8 As shown, the computing device can obtain work order records, repair reports, customer service communication texts, etc., and divide the above texts into multiple text blocks according to a fixed token length. Based on the above multiple text blocks, the computing device uses a large model to obtain multiple entities (such as product model, faulty component, fault mechanism, region, time, etc.) and the relationships between entities. The computing device uses entities as nodes in the initial knowledge graph and the relationships between entities as data dependency edges to obtain the initial knowledge graph. In some possible examples, the computing device can obtain work order records, repair reports, and customer service communication texts from the customer service system and the repair system.

[0239] The computing device generates component-level or fault mechanism-level attribute communities corresponding to at least one node in the initial knowledge graph based on the similarity between the text descriptions of nodes in the initial knowledge graph. The computing device then further clusters these attribute communities according to factors such as region and year to obtain higher-level trend communities. Based on the initial knowledge graph, attribute communities, and higher-level trend communities, the computing device constructs a multi-layered community system.

[0240] In some possible scenarios, the computing device can also generate vectors corresponding to the text descriptions of the nodes, and store the generated vectors using a vector database.

[0241] The computing device receives the target question from the user request: "What are the most common core failures of product model Y in region Z during year X?" Responding to the user request, the computing device retrieves results from each layer of the multi-layered community, proceeding from the highest to the lowest layer. In other words, the computing device locates the relevant trends for region Z and year X from the highest layer, without needing to traverse all work orders. From the next higher layer, the computing device identifies the component-level community, pinpointing the key components or mechanisms leading to high failure rates. At the lowest layer, the computing device retrieves maintenance records, customer complaints, and technical specifications corresponding to the key components or mechanisms.

[0242] The computing device can read the vectors of nodes from the vector database, calculate the similarity between the vectors of the nodes and the vectors corresponding to the target question, and determine the retrieval results at each layer based on the similarity.

[0243] The computing device generates analysis reports on the search results at each layer, and determines the reasonableness of each layer's search results as answers to the target question based on these reports. The computing device then filters the results according to their reasonableness, from highest to lowest, to obtain target search results whose sum of token lengths is less than a fixed token length. Based on these target search results, the computing device obtains the answer to the target question.

[0244] Scene 3 In this scenario, the method provided in this application is used to realize multi-hop reasoning and concept chain construction in scientific literature.

[0245] In scientific research, researchers often need to construct reasoning chains by using corpora across literature and experimental systems, such as establishing "what kind of mechanistic relationship exists between the band gap change of oxide materials and doping elements". Researchers need to invest a lot of time and energy to obtain reasoning chains, which is a lot of work and has a high time cost.

[0246] The computing device can use the methods described in this application to realize multi-hop reasoning and concept chain construction in scientific literature, such as establishing "what kind of mechanism relationship exists between the band gap change of oxide materials and doping elements".

[0247] Figure 9 The application flowchart of the third task processing method provided in this application is as follows: Figure 9 As shown, the computing device divides scientific literature (such as the main text of a paper, experimental appendices, and tabular data) into multiple text blocks according to a fixed token length. Based on these text blocks, the computing device uses a large model to extract entities (such as material systems, doping elements, band parameters, model names, experimental conditions, etc.) and the relationships between entities. The computing device uses entities as nodes and relationships as data dependency edges to obtain an initial knowledge graph.

[0248] The computing device clusters nodes in the initial knowledge graph based on the similarity between their textual descriptions, obtaining communities that represent the semantic abstraction of at least one node in the initial knowledge graph. The computing device further clusters these communities, obtaining communities that represent the semantic abstraction of at least one community. The computing device constructs multi-layered communities based on the initial knowledge graph, the communities obtained from the first clustering, and the communities obtained from the second clustering. These multi-layered communities include: a lowest layer, a second-highest layer, and a highest layer. Nodes in the lowest layer correspond to raw data such as experimental paragraphs and numerical tables. Nodes in the second-highest layer correspond to material system clusters and experimental condition clusters. Nodes in the highest layer correspond to abstract topics such as theoretical models and mechanism explanations.

[0249] The computing device receives the user's requested target question: "What is the mechanistic relationship between bandgap changes in oxide materials and doping elements?" Responding to the user's request, the computing device searches each layer of the multi-layered community in descending order of height, obtaining the search results for each layer. That is, the computing device locates the entity related to the "energy level labeling mechanism" in the highest layer, obtaining the search results for that layer. The computing device searches the next higher layers to determine the material system and experimental conditions, obtaining relevant experimental records, doping concentrations, and bandgap measurement data from different papers, obtaining the search results for those next higher layers. The computing device searches the lowest layer to obtain the nodes that can connect the inference chain of "doping element -> local electronic structure change -> energy level shift -> material property change," obtaining the search results for that layer.

[0250] Similarly, the computing device generates analysis reports corresponding to the search results at each layer. Based on the analysis reports, the computing device determines the reasonableness of each layer's search results as answers to the target question. The computing device then filters the search results according to their reasonableness, from highest to lowest, to obtain target search results whose sum of token lengths is less than a fixed token length. Finally, the computing device generates the answer to the target question based on the target search results.

[0251] In this application, since the retrieval results at each layer include nodes whose semantic relevance to the target question is greater than or equal to the relevance threshold, and since nodes in the upper layer of a multi-layered community are semantic abstractions of at least one node in the lower layer, the retrieval results at each layer include both fine-grained information corresponding to nodes in the lower layer and coarse-grained summary information corresponding to nodes in the upper layer (i.e., semantic abstractions of at least one node). The computing device obtains the answer to the target question based on the retrieval results at each layer. That is, the computing device obtains the answer to the target question based on both fine-grained and coarse-grained summary information. In this way, the answer references both fine-grained and coarse-grained information, reducing the one-sidedness of information and ensuring the matching of the answer with the target question.

[0252] It is understood that, in order to achieve the functions in the above embodiments, the computing device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and method steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0253] The above text combines Figures 1 to 9 The task processing method provided according to this embodiment is described in detail below. Figure 10 This describes the task processing apparatus provided according to this embodiment.

[0254] Figure 10 A schematic diagram of the structure of a task processing device provided in this application is shown below. Figure 10 As shown, the task processing device 1000 includes an acquisition module 1010 and a processing module 1020.

[0255] The task processing device 1000 can be used to implement the functions of the computing device in the above method embodiments. When the task processing device 1000 performs the steps executed by the computing device in the above method embodiments, the above and other operations and / or functions of each module in the task processing device 1000 are respectively to implement the method flow executed by the computing device in the foregoing figures.

[0256] Specifically, the acquisition module 1010 is used to: acquire user requests. The user request is for requesting an answer to a target question. The processing module 1020 is used to: respond to the user request and retrieve the search results for each layer in the multi-layered community. The multi-layered community includes: M layers, each layer including: multiple nodes and semantic relevance between multiple nodes, where a node in the i-th layer of the M layers is a semantic abstraction of at least one node in the (i-1)-th layer of the M layers, and the search results for each layer include: nodes in each layer whose semantic relevance to the target question is greater than or equal to a relevance threshold, where M is an integer greater than or equal to 2, and i is an integer greater than or equal to 2 and less than or equal to M. The processing module 1020 is also used to: obtain the answer to the target question based on the search results of each layer.

[0257] In some possible scenarios, processing module 1020 is specifically used to: determine the second node in the (i-1)th layer that has a mapping relationship with the first node as the entry node of the (i-1)th layer. Here, the first node is: the node in the i-th retrieval result of the i-th layer whose semantic similarity to the target question meets the similarity condition. Processing module 1020 is specifically used to: based on the association relationships among multiple nodes in the (i-1)th layer, retrieve nodes in the (i-1)th layer starting from the second node, to obtain the (i-1)th retrieval result of the (i-1)th layer. Here, the (i-1)th retrieval result includes: N nodes in the (i-1)th layer whose semantic similarity to the target question meets the similarity condition, where N is a positive integer.

[0258] In some possible scenarios, the acquisition module 1010 is also used to: acquire the index of the multi-layer community. The index includes: node identifiers of nodes in each layer, the relationships between nodes in each layer, and the mapping relationships between nodes in adjacent layers. The processing module 1020 is specifically used to: retrieve the search results for each layer in the multi-layer community based on the index.

[0259] In some possible cases, the i-th layer includes: a first node, which is a semantic abstract expression of at least one node in the (i-1)-th layer; an index includes the mapping relationship between the first node and the second node; and a second node is at least one node whose semantic similarity with the first node satisfies the similarity condition.

[0260] In some possible scenarios, the acquisition module 1010 is further configured to: acquire an initial knowledge graph. The initial knowledge graph is constructed based on files related to the application scenario of the target problem, and includes multiple nodes and data dependency edges between these nodes. The processing module 1020 is further configured to: add semantic edges to the initial knowledge graph to obtain a knowledge graph. The knowledge graph includes multiple nodes, data dependency edges, and semantic edges. A first semantic edge describes the semantic similarity between the two nodes connected by the first semantic edge as greater than or equal to a similarity threshold. The first semantic edge is a semantic edge. Two nodes belong to multiple nodes. The processing module 1020 is further configured to: cluster multiple nodes in the knowledge graph based on the semantic edges to obtain multi-layered communities.

[0261] In some possible scenarios, processing module 1020 is specifically used to: obtain the target search results from the search results of each layer. The sum of the term lengths of the target search results is less than or equal to the upper limit of term length. Processing module 1020 is also specifically used to: obtain the answer based on the target search results.

[0262] In some possible scenarios, processing module 1020 is specifically used to: determine the reasonableness of the search results at each layer as answers to the target question. Processing module 1020 is also specifically used to: select search results from the search results at each layer whose reasonableness meets the reasonableness criteria, thereby obtaining the target search result.

[0263] For more details on the acquisition module 1010 and the processing module 1020, please refer to the above description of the task processing method; it will not be repeated here.

[0264] As an example of a software functional unit, the processing module 1020 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, the processing module 1020 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0265] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0266] As an example of a hardware functional unit, the processing module 1020 may include at least one computing device, such as a server. Alternatively, the processing module 1020 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0267] The processing module 1020 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the processing module 1020 can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the processing module 1020 can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0268] It should be noted that, in other embodiments, the processing module 1020 can be used to execute any step in the task processing method. The steps implemented by the acquisition module 1010 and the processing module 1020 can be specified as needed. By implementing different steps in the task processing method through the acquisition module 1010 and the processing module 1020 respectively, all functions of the task processing device can be realized.

[0269] It is worth noting that if the above-mentioned task processing device is implemented through a software module, for example, the software module can be provided to users through a cloud service subscription model, and users can choose different subscription levels according to their needs; or, for example, the software module can also provide enterprise-level customized services with professional domain customization, interface personalization and extended functions according to the needs of users or enterprises.

[0270] In addition, the task processing device 1000 provided in this application can also be made into a value-added service and provided to users, which is not limited in this application.

[0271] The task processing device in this application embodiment can also be implemented in hardware, such as a computing device, a computing device cluster, a chip, or a processor. For specific implementation details of the computing device, please refer to... Figure 1 For a description of the chip and processor's specific implementation, please refer to [link / reference]. Figure 2 For a detailed description of the implementation of computing device clusters, please refer to [link / reference]. Figure 11 , Figure 12 The description of that will not be repeated here.

[0272] The method steps in this embodiment can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Alternatively, the ASIC can reside in a computing device. Of course, the processor and storage medium can also exist as discrete components in a network device or terminal device.

[0273] This application also provides a computing device cluster. The computing device cluster includes at least one computing device, which may be a server with a display. In some embodiments, the computing device may also be a terminal device such as a desktop computer, laptop computer, or smartphone.

[0274] like Figure 11 As shown, Figure 11 This application provides a schematic diagram of a computing device cluster, which includes at least one computing device 110. The memory 112 of one or more computing devices 110 in the computing device cluster may store the same instructions for executing task processing methods.

[0275] In some possible implementations, the memory 112 of one or more computing devices 110 in the computing device cluster may also store partial instructions for executing task processing methods. In other words, a combination of one or more computing devices 110 can jointly execute instructions for executing task processing methods.

[0276] It should be noted that the memory 112 in different computing devices 110 within the computing device cluster can store different instructions, each used to execute a portion of the computing device's functions. That is, the instructions stored in the memory 112 of different computing devices 110 can implement the functions of one or more modules in the acquisition module 1010 and processing module 1020.

[0277] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN). Figure 12 One possible implementation is shown. For example... Figure 12 As shown, Figure 12 This application provides a schematic diagram of a connection between computing devices, where two computing devices 110A and 110B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this possible implementation, the instructions stored in the memory 112 of computing device 110A can implement the functions implemented by the acquisition module 1010. Simultaneously, the instructions stored in the memory 112 of computing device 110B can implement the functions implemented by the processing module 1020.

[0278] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a task processing method.

[0279] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform a task processing method.

[0280] This application also provides a chip. The chip includes an interface circuit and a control circuit. The interface circuit is used to acquire user requests, and the control circuit is used to implement the functions of the computing device in the task processing method.

[0281] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).

[0282] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A task processing method, characterized in that, The method includes: Obtain a user request; wherein the user request is used to request an answer to a target question; In response to the user request, the retrieval results of each layer in the multi-layer community are obtained; wherein, the multi-layer community includes: M layers, each layer includes: multiple nodes and semantic relevance between the multiple nodes, a node in the i-th layer of the M layers is a semantic abstract expression of at least one node in the (i-1)-th layer of the M layers, and the retrieval results of each layer include: nodes in each layer whose semantic relevance to the target question is greater than or equal to a relevance threshold, where M is an integer greater than or equal to 2, and i is an integer greater than or equal to 2 and less than or equal to M; Based on the retrieval results of each layer, the answer to the target question is generated.

2. The method according to claim 1, characterized in that, The retrieval of each layer in the multi-layered community yields the retrieval results for each layer, including: The second node in the (i-1)th layer that has a mapping relationship with the first node is determined as the entry node of the (i-1)th layer; wherein, the first node is: the node in the i-th retrieval result of the i-th layer that satisfies the similarity condition with the semantic similarity of the target question; Based on the association relationship of multiple nodes in the (i-1)th layer, the nodes in the (i-1)th layer are retrieved starting from the second node to obtain the (i-1)th retrieval result of the (i-1)th layer; wherein, the (i-1)th retrieval result includes: N nodes in the (i-1)th layer whose semantic similarity to the target question satisfies the similarity condition, where N is a positive integer.

3. The method according to claim 1 or 2, characterized in that, The method further includes: Obtain the index of the multi-layered community; wherein the index includes: the node identifier of the node in each layer, the association relationship between the nodes in each layer, and the mapping relationship between the nodes in adjacent layers; The retrieval of each layer in the multi-layered community yields the retrieval results for each layer, including: Based on the index of the multi-layered community, the search results for each layer in the multi-layered community are obtained.

4. The method according to claim 3, characterized in that, The i-th layer includes: a first node, which is: a semantic abstract expression of at least one node in the (i-1)-th layer; the index includes: a mapping relationship between the first node and a second node, where the second node is: a node among the at least one nodes whose semantic similarity to the first node satisfies a similarity condition.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: Obtain an initial knowledge graph; wherein the initial knowledge graph is constructed based on files related to the application scenario of the target problem, and the initial knowledge graph includes: multiple nodes and data dependency edges between the multiple nodes; Semantic edges are added to the initial knowledge graph to obtain a knowledge graph; wherein, the knowledge graph includes: the plurality of nodes, the data dependency edges, and the semantic edges; a first semantic edge is used to describe: the semantic similarity between the two nodes connected by the first semantic edge is greater than or equal to a similarity threshold; the first semantic edge belongs to the semantic edge; the two nodes belong to the plurality of nodes; Based on the semantic edges, the multiple nodes in the knowledge graph are clustered to obtain the multi-layered community.

6. The method according to any one of claims 1-5, characterized in that, The step of generating the answer to the target question based on the search results of each layer includes: Obtain the target search results from the search results of each layer; wherein the word length of the target search results is less than or equal to the upper limit of word length; The answer is generated using the target retrieval results.

7. The method according to claim 6, characterized in that, The step of obtaining the target search result from the search results of each layer includes: The reasonableness of obtaining the search results of each layer as an answer to the target question; The search results that meet the reasonableness criteria are selected from the search results of each layer to obtain the target search result.

8. A task processing device, characterized in that, The device includes: The acquisition module is used to: acquire user requests; wherein the user requests are for requesting answers to a target question; The processing module is configured to: respond to the user request and retrieve the search results for each layer in the multi-layer community; wherein the multi-layer community includes: M layers, each layer includes: multiple nodes and semantic relevance between the multiple nodes, a node in the i-th layer of the M layers is a semantic abstract expression of at least one node in the (i-1)-th layer of the M layers, and the search results for each layer include: nodes in each layer whose semantic relevance to the target question is greater than or equal to a relevance threshold, where M is an integer greater than or equal to 2, and i is an integer greater than or equal to 2 and less than or equal to M; The processing module is further configured to: obtain the answer to the target question based on the retrieval results of each layer.

9. The apparatus according to claim 8, characterized in that, The processing module is specifically used to: determine the second node in the (i-1)th layer that has a mapping relationship with the first node as the entry node of the (i-1)th layer; wherein, the first node is: the node in the i-th retrieval result of the i-th layer that satisfies the semantic similarity condition with the target question; The processing module is further specifically used to: retrieve nodes in the (i-1)th layer starting from the second node according to the association relationship of multiple nodes in the (i-1)th layer, and obtain the (i-1)th retrieval result of the (i-1)th layer; wherein, the (i-1)th retrieval result includes: N nodes in the (i-1)th layer whose semantic similarity to the target question satisfies the similarity condition, where N is a positive integer.

10. The apparatus according to claim 8 or 9, characterized in that, The acquisition module is further configured to: acquire the index of the multi-layer community; wherein the index includes: the node identifier of the node in each layer, the association relationship between the nodes in each layer, and the mapping relationship between the nodes in adjacent layers; The processing module is specifically used to: retrieve the search results of each layer in the multi-layer community based on the index of the multi-layer community.

11. The apparatus according to claim 10, characterized in that, The i-th layer includes: a first node, which is: a semantic abstract expression of at least one node in the (i-1)-th layer; the index includes: a mapping relationship between the first node and a second node, where the second node is: a node among the at least one nodes whose semantic similarity to the first node satisfies a similarity condition.

12. The apparatus according to any one of claims 8-11, characterized in that, The acquisition module is further configured to: acquire an initial knowledge graph; wherein the initial knowledge graph is constructed based on files related to the application scenario of the target problem, and the initial knowledge graph includes: multiple nodes and data dependency edges between the multiple nodes; The processing module is further configured to: add semantic edges to the initial knowledge graph to obtain a knowledge graph; the knowledge graph includes: the plurality of nodes, the data dependency edges, and the semantic edges; a first semantic edge is used to describe: the semantic similarity between the two nodes connected by the first semantic edge is greater than or equal to a similarity threshold; the first semantic edge belongs to the semantic edge; the two nodes belong to the plurality of nodes; The processing module is further configured to: cluster multiple nodes in the knowledge graph based on the semantic edges to obtain multi-layered communities.

13. The apparatus according to any one of claims 8-12, characterized in that, The processing module is specifically used to: obtain the target search result from the search results of each layer; wherein the word length of the target search result is less than or equal to the upper limit of word length; The processing module is also specifically used to: obtain the answer based on the target retrieval results.

14. The apparatus according to claim 13, characterized in that, The processing module is specifically used to: determine the reasonableness of the search results of each layer as an answer to the target question; The processing module is further specifically used to: select the search results that meet the reasonableness condition from the search results of each layer, and obtain the target search result.

15. A processor, characterized in that, The processor includes an interface circuit and a control circuit; the interface circuit is used to acquire user requests and, in conjunction with the control circuit, execute the method of any one of claims 1-7.

16. A computing device cluster, characterized in that, The computing device cluster includes at least one computing device, and each computing device includes a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1-7.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions; when the computer instructions are executed in a computing device, the computing device performs the method of any one of claims 1-7.

18. A computer program product, characterized in that, When the computer program product is run in a computing device, the computing device performs the method of any one of claims 1-7.