Content search method, electronic device, and readable storage medium

By sinking external knowledge vectors to the edge cluster and using cloud-edge collaboration, edge nodes can perform data queries, which solves the problem of high computing power pressure on the cloud, realizes the load sharing of cloud servers and the efficient utilization of edge node resources, and improves retrieval and generation efficiency.

CN122388134APending Publication Date: 2026-07-14CHINA MOBILE GRP HEILONGJIANG CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE GRP HEILONGJIANG CO LTD
Filing Date
2026-03-03
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In existing technologies, large model retrieval augmented generation (RAG) technology puts a lot of pressure on cloud computing resources, resulting in an excessive burden on cloud computing resources and failing to fully utilize the computing resources of edge clusters.

Method used

By sinking external knowledge vectors to edge clusters and leveraging cloud-edge collaboration through computing power networks, edge nodes perform data queries, and cloud servers receive the query results, thereby reducing the burden on cloud servers and improving the utilization rate of computing resources of edge nodes.

Benefits of technology

It effectively reduces the workload of cloud servers, alleviates the pressure on cloud computing resources, improves the utilization rate of computing resources at edge nodes, and enhances the efficiency of external knowledge retrieval and generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122388134A_ABST
    Figure CN122388134A_ABST
Patent Text Reader

Abstract

The application discloses a content retrieval method, an electronic device and a readable storage medium, and belongs to the computer field. The method comprises the following steps: a cloud server acquires a first vector, the first vector being obtained based on to-be-retrieved content; the cloud server sends the first vector to an edge node, so that the edge node performs data query based on the first vector; the cloud server receives a data query result sent by the edge node; and the cloud server obtains a retrieval result for the to-be-retrieved content based on the data query result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer science, and specifically relates to a content retrieval method, an electronic device, and a readable storage medium. Background Technology

[0002] Retrieval Augmented Generation (RAG) is a technique that uses proprietary data sources to assist in the generation of large models. This technique combines information retrieval with the generation capabilities of large language models, leveraging external knowledge bases to enhance the model's generative abilities, enabling it to generate more accurate, richer, and context-relevant content.

[0003] Currently, when using RAG technology for retrieval, related technologies typically centrally deploy external knowledge data storage, retrieval, and text generation services in the cloud, resulting in significant pressure on cloud computing resources. Summary of the Invention

[0004] This application provides a content retrieval method, an electronic device, and a readable storage medium, which can solve the problem of high pressure on cloud computing resources in related technologies.

[0005] In a first aspect, embodiments of this application provide a content retrieval method, including: The cloud server obtains a first vector, which is based on the content to be retrieved. The cloud server sends the first vector to the edge node, enabling the edge node to perform data queries based on the first vector; The cloud server receives the data query results sent by the edge node; Based on the data query results, the cloud server obtains search results for the content to be searched.

[0006] Secondly, embodiments of this application provide a content retrieval method, including: The edge node receives a first vector sent by the cloud server, which is obtained based on the content to be retrieved. The edge node performs a data query based on the first vector to obtain the data query result; The edge node sends the data query result to the cloud server, enabling the cloud server to obtain search results for the content to be searched based on the data query result.

[0007] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method described in the first or second aspect.

[0008] Fourthly, embodiments of this application provide a computer-readable storage medium on which a program or instructions are stored, which, when executed, implement the steps of the method described in the first or second aspect.

[0009] Fifthly, embodiments of this application provide a computer program product comprising a computer program that, when executed by a processor, implements the steps of the method described in the first or second aspect.

[0010] The at least one technical solution provided in the embodiments of this application can achieve the following technical effects: In this embodiment, the cloud server obtains a first vector based on the content to be retrieved; the cloud server sends the first vector to an edge node, enabling the edge node to perform a data query based on the first vector; the cloud server receives the data query result sent by the edge node; and the cloud server obtains a retrieval result for the content to be retrieved based on the data query result. Thus, compared to related technologies that centrally deploy external knowledge data storage, retrieval, and text generation services in the cloud, this embodiment uses edge nodes to perform the data query, sharing some of the work of the cloud server, thereby reducing the pressure on the cloud server's computing resources and improving the utilization rate of the edge node's computing resources, solving the problem of high cloud computing resource pressure in related technologies. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating a content retrieval method provided in this application embodiment; Figure 2 A flowchart illustrating a content retrieval method provided in this application embodiment; Figure 3 This is a flowchart of another content retrieval method provided in the embodiments of this application; Figure 4This is an example schematic diagram of a hash ring provided in an embodiment of this application; Figure 5 This is a schematic diagram illustrating an example of grouping and clustering external knowledge vectors provided in an embodiment of this application; Figure 6 This is a flowchart of another content retrieval method provided in the embodiments of this application; Figure 7 This is a schematic diagram illustrating the overall concept of a content retrieval method provided in an embodiment of this application; Figure 8 This is a structural block diagram of a content retrieval device provided in an embodiment of this application; Figure 9 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0015] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0016] The content retrieval method provided in this application is applied to RAG technology. Specifically, this application embodiment can sink external knowledge vectors to edge clusters, and coordinate cloud and edge resources in computing power networks. On the one hand, this improves the resource utilization of computing power networks, and on the other hand, it enables parallel creation of indexes and data retrieval by cloud and edge collaboration, thereby improving the efficiency of external knowledge retrieval. In addition, external knowledge vectors can be vertically grouped according to dimensions and horizontally clustered. Through the triple parallel mechanism of edge clusters, grouping, and clustering, index creation and data retrieval are carried out simultaneously and in parallel, improving the efficiency of large model retrieval enhancement generation.

[0017] The following section first describes the implementation environment of the content retrieval method provided in the embodiments of this application. (Refer to...) Figure 1 , Figure 1 This is an example implementation environment for a content retrieval method provided in the embodiments of this application. For example... Figure 1 As shown, the content retrieval method provided in this application involves clients, cloud, and edge clusters. Clients include, for example, […]. Figure 1 The cloud includes multiple clients such as Client 1 and Client 2, and the cloud includes, for example, a business application server, a vector aggregation module, and a basic large model. The edge cluster includes, for example, multiple clients such as Client 1 and Client 2. Figure 1 The diagram shows multiple edge clusters, such as edge cluster 1 and edge cluster 2, and each edge cluster can include multiple edge clusters.

[0018] The client can be the one initiating a large-scale model RAG query or question-and-answer request. For example, a user using websites like Wenxin Yiyan or Tongyi Qianwen to perform a search query is the client initiator, such as searching for an introduction to Spark big data technology on a knowledge question-and-answer website. The business application server is an application service deployed in the cloud to host the front-end question-and-answer dialogue page. Its main function is to interact with the client through the business application service page, similar to websites like Wenxin Yiyan and Tongyi Qianwen that provide business application services. The vector aggregation module can be deployed in the cloud computing network and mainly has the following four core functions: First, it reduces the dimensionality of external knowledge vectors to improve index generation efficiency; second, it constructs a mapping relationship between external knowledge vectors and edge cluster nodes through a consistent hashing ring, quickly locating the cluster with the strongest association of external knowledge vectors during data retrieval; third, it receives the cluster center point vector reported by each edge cluster; fourth, based on the client's query content, it uses similarity matching to find the optimal association information, inputs the content with high similarity to the user's query content along with the query content into the basic large-scale model, utilizes the reasoning capabilities of the basic large-scale model, and returns the generated result. The basic model can be a mainstream general-purpose basic model (such as GPT-4, BERT, LLaMA, etc.). The basic model can receive the query content input from the vector aggregation module, and the basic model can return the content to generate a search response, thus completing the interaction with the customer.

[0019] The edge cluster can include multiple edge clusters, and different edge clusters within these multiple edge clusters can be distributed on the same edge node or different edge nodes. The edge cluster can also be used to reduce the dimensionality of external knowledge vectors. Based on the grouping and clustering results of the external knowledge vectors, the vector center point of each group and cluster is sent to the vector aggregation module. This addresses the problem that in traditional computing power networks, during large-model retrieval and enhanced query processing, the entire process of external knowledge vectorization, external knowledge storage, index creation, data retrieval, and calling the basic large model to generate answers is completed in the cloud. This approach does not fully utilize the computing power resources of the edge cluster, resulting in low efficiency in index creation and enhanced query processing. Edge groups are the results of grouping external knowledge vectors within the edge cluster according to dimension. Indexes are created in parallel between groups, improving the efficiency of index creation and retrieval. Edge clusters are edge clusters divided based on the edge groups, with the highest density within the cluster as the objective function. Indexes are created based on the central nodes within the clusters, improving data retrieval efficiency.

[0020] The content retrieval method provided in this application embodiment can be executed by a target device, wherein the target device can be a cloud server or an edge node, i.e. Figure 1 The edge node where the cloud or edge cluster is located.

[0021] The content retrieval method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0022] Please see Figure 2 , Figure 2 This is a flowchart illustrating a content retrieval method provided in an embodiment of this application. Figure 2 As shown, this method is executed by a cloud server and includes the following steps: Step 210: The cloud server obtains the first vector, which is based on the content to be retrieved.

[0023] In this embodiment, users can perform content retrieval through a client. The content to be retrieved can be the content input by the user on the client, such as "Please introduce what Spark technology is." After the cloud server obtains the content to be retrieved, it can be vectorized to obtain a first vector. Specifically, a sentence vector generation model can be used to vectorize the content to be retrieved, obtaining a fixed-length vector output by the model. The sentence vector generation model can be, for example, an open-source model such as a sentence-level BERT embedding model (Sentence-BERT) or Hugging Face. Vectorization ensures that the content to be retrieved can be effectively compared in subsequent queries. The first vector can be, for example, the vector output by the sentence vector generation model, or it can be a vector after dimensionality reduction of the vector output by the sentence vector generation model; there is no limitation here.

[0024] Step 220: The cloud server sends the first vector to the edge node, enabling the edge node to perform data query based on the first vector.

[0025] In this embodiment of the application, the edge node can perform data query on the first vector based on the local knowledge vector library to obtain data query results. The data query results include knowledge content related to the first vector, that is, knowledge content related to the content to be retrieved.

[0026] Step 230: The cloud server receives the data query results sent by the edge node.

[0027] Step 240: The cloud server obtains search results for the content to be searched based on the data query results.

[0028] In this embodiment of the application, after obtaining the data query results, the cloud server can input the data query results into a large model deployed in the cloud (e.g., Figure 1 The basic large model in the system can generate the final response result based on the context information provided by the data query results, that is, the search results for the content to be searched, and return the search results to the user to complete the interaction process with the user.

[0029] In this embodiment, the cloud server obtains a first vector based on the content to be retrieved; the cloud server sends the first vector to an edge node, enabling the edge node to perform a data query based on the first vector; the cloud server receives the data query result sent by the edge node; and the cloud server obtains a retrieval result for the content to be retrieved based on the data query result. Thus, compared to related technologies that centrally deploy external knowledge data storage, retrieval, and text generation services in the cloud, this embodiment uses edge nodes to perform the data query, sharing some of the work of the cloud server, thereby reducing the pressure on the cloud server's computing resources and improving the utilization rate of the edge node's computing resources, solving the problem of high cloud computing resource pressure in related technologies.

[0030] Please see Figure 3 , Figure 3 This is a flowchart of another content retrieval method provided in the embodiments of this application, such as... Figure 3 As shown, the method includes the following steps: Step 310: The cloud server obtains the first vector, which is based on the content to be retrieved.

[0031] Step 320: The cloud server obtains Q copies of knowledge content, where Q is a positive integer greater than 1.

[0032] In this embodiment, the Q sets of knowledge content are used to establish a big data knowledge base to provide professional knowledge Q&A. When collecting knowledge content, the external knowledge content is knowledge information from a specific vertical scenario. This embodiment can be applied to RAG services in various scenarios, and the corresponding knowledge content can be collected based on the vertical scenario of the content retrieval service. For example, if this embodiment is applied to a scenario providing professional computer knowledge Q&A, the Q sets of knowledge content can be computer-related content. Computer professional knowledge data can be collected from computer professional websites such as Baidu Encyclopedia, CSDN, and Wikipedia to obtain Q sets of knowledge content. For example, knowledge content related to Spark and large models can be collected from Baidu Encyclopedia to obtain the following content.

[0033] Knowledge related to Spark technology: "Apache Spark is a fast and general-purpose computing engine designed for large-scale data processing. Spark is a general-purpose parallel framework similar to Hadoop MapReduce, open-sourced by UC Berkeley AMP lab. Spark has the advantages of Hadoop MapReduce; however, unlike MapReduce, intermediate job outputs can be stored in memory, eliminating the need to read and write to HDFS. Therefore, Spark is better suited for iterative MapReduce algorithms such as data mining and machine learning."

[0034] Spark is an open-source cluster computing environment similar to Hadoop, but there are some differences between the two. These useful differences make Spark perform better on certain workloads. In other words, Spark enables in-memory distributed datasets, which, in addition to providing interactive queries, can optimize iterative workloads.

[0035] Spark is implemented in the Scala language, using Scala as its application framework. Unlike Hadoop, Spark and Scala are tightly integrated, allowing Scala to manipulate distributed datasets as easily as local collection objects.

[0036] Although Spark was created to support iterative jobs on distributed datasets, it is actually a complement to Hadoop, capable of running in parallel within the Hadoop file system. This behavior is supported by a third-party clustering framework called Mesos. Developed by the AMP Lab (Algorithms, Machines, and PeopleLab) at UC Berkeley, Spark can be used to build large, low-latency data analytics applications.

[0037] Knowledge related to large-scale artificial intelligence models: "Large-scale artificial intelligence models refer to 'large-parameter' models trained using large-scale data and powerful computing capabilities. These models typically have high versatility and generalization ability and can be applied to fields such as natural language processing, image recognition, and speech recognition. They can be divided into large language models, large visual models, multimodal large models, and basic large models."

[0038] The origins of large-scale models can be traced back to the early days of AI research in the 20th century, when research primarily focused on logical reasoning and expert systems. However, these methods, limited by hard-coded knowledge and rules, struggled to handle the complexity and diversity of natural language. In 2017, Google's Transformer model architecture, by introducing a self-attention mechanism, significantly improved sequence modeling capabilities, particularly in efficiency and accuracy when handling long-distance dependencies. Since then, the concept of pre-trained language models (PLMs) has gradually become mainstream. In November 2022, OpenAI, a renowned US AI research company, released ChatGPT, an AI chatbot program based on the large language model GPT-3.5.

[0039] Large models, with their massive number of parameters, deep network structures, and extensive pre-training capabilities, can capture complex data patterns and demonstrate outstanding performance across multiple domains. They can not only understand and generate natural language but also process complex visual and multimodal information, adapting to a variety of ever-changing application scenarios. As an automation of expert capabilities, large models can bring tremendous convenience to ordinary people in various ways, such as helping them learn knowledge, revise articles, and generate solutions.

[0040] In this embodiment of the application, after collecting relevant knowledge content (external knowledge content), the cloud server can perform sentence segmentation, word segmentation, and removal of stop words and function words on the collected knowledge content. Each of the Q pieces of knowledge content is, for example, a sentence in the collected knowledge content. For example, one piece of knowledge content could be "A large artificial intelligence model refers to a 'large parameter' model trained using large-scale data and powerful computing capabilities".

[0041] Step 330: The cloud server obtains Q first knowledge vectors based on the Q pieces of knowledge content; In this embodiment, the Q first knowledge vectors include a first knowledge vector corresponding to each of the Q knowledge contents. Each of the Q first knowledge vectors is, for example, a vector obtained by vectorizing one of the Q knowledge contents. Similar to the vectorization of the content to be retrieved, a sentence vector generation model can be used to vectorize the external knowledge content, outputting the external knowledge content as a fixed-length vector. For example, each sentence can be output as a 768-dimensional vector. Using the Spark and large model-related knowledge content in the example above, the vectors shown in Table 1 below can be obtained. The Q first knowledge vectors are, for example, the vectors shown in the third column of Table 1:

[0042] Table 1 Examples of Knowledge Content Vectorization However, it should be noted that the first knowledge vector is not limited to the original vector obtained based on the knowledge content; it can also be a knowledge vector obtained after dimensionality reduction of the original vector. The original vector refers to the output result of the model after the knowledge content is input into the sentence vector generation model. Specifically, in one embodiment of this application, the cloud server obtains Q first knowledge vectors based on the Q pieces of knowledge content, including: the cloud server obtains Q second knowledge vectors based on the Q pieces of knowledge content; the cloud server performs dimensionality reduction on each of the Q second knowledge vectors to obtain Q first knowledge vectors.

[0043] In this embodiment, for any one of the Q pieces of knowledge content, the knowledge content can be input into a sentence vector generation model, which outputs a second knowledge vector corresponding to that knowledge content. By inputting the Q pieces of knowledge content into the sentence vector generation model, Q second knowledge vectors can be obtained, where each of the Q pieces of knowledge content corresponds to a second knowledge vector. Dimensionality reduction means that the number of parameters in each first knowledge vector is less than the number of parameters in each second knowledge vector. This embodiment does not limit the specific method of dimensionality reduction; for example, principal component analysis can also be used.

[0044] In this embodiment of the application, the computing power network cloud can be accessed through, for example... Figure 1 The vector aggregation module shown reduces the dimensionality of external knowledge vectors (such as the vector corresponding to each sentence in Table 1). By transforming external knowledge vectors into low-dimensional vectors, the efficiency of external knowledge data retrieval is improved while ensuring the accuracy of external knowledge vectors. For example, the 768-dimensional vector corresponding to each sentence is transformed into a 10-dimensional vector.

[0045] The following is an example of a dimensionality reduction method. In one embodiment of this application, the cloud server performs dimensionality reduction on each of the Q second knowledge vectors to obtain Q first knowledge vectors, including: the cloud server obtaining a first knowledge vector matrix based on the Q second knowledge vectors; the cloud server performing standardization processing on the first knowledge vector matrix to obtain a second knowledge vector matrix; the cloud server determining T eigenvalues ​​and T eigenvectors based on the second knowledge vector matrix; the T eigenvectors including the eigenvectors corresponding to each of the T eigenvalues; the cloud server selecting E eigenvalues ​​from the T eigenvalues ​​in descending order of eigenvalues; and the cloud server obtaining Q first knowledge vectors based on the E eigenvectors corresponding to the E eigenvalues.

[0046] Specifically, assume that the total external knowledge vector contains Q second knowledge vectors corresponding to Q sentences, and each second knowledge vector is a K-dimensional vector. Based on the Q second knowledge vectors, the first knowledge vector matrix can be obtained as shown in the following formula: ; Where X represents the first knowledge vector matrix. Each row in the above equation represents a second knowledge vector, and each second knowledge vector is a K-dimensional vector. Therefore, the external knowledge vector can be represented as follows: The first knowledge vector matrix. As described above, after vectorization, each second knowledge vector is, for example, a 768-dimensional vector, i.e., K is, for example, 768. Each row in the above formula represents a sentence. This is used to represent the second knowledge vector corresponding to the i-th sentence out of Q sentences. It can also be expressed as: .

[0047] In this embodiment, the external sentence vectors can be standardized by calculating the mean and variance among the external knowledge vectors, transforming them into more comparable vectors. Each of the Q second knowledge vectors is a K-dimensional vector, and the mean of the j-th dimension parameter value of each of the Q second knowledge vectors can be calculated using the following formula: ; in, This is used to represent the mean value of the j-th dimension parameter of each of the Q second knowledge vectors. The parameter value used to represent the j-th dimension of the i-th second knowledge vector among the Q second knowledge vectors.

[0048] Secondly, the standard deviation of the j-th dimension parameter value of each of the Q second knowledge vectors is calculated using the following formula: ; in, This is used to represent the standard deviation of the j-th dimension parameter value of each of the Q second knowledge vectors. This is used to represent the mean value of the j-th dimension parameter of each of the Q second knowledge vectors. The parameter value used to represent the j-th dimension of the i-th second knowledge vector among the Q second knowledge vectors.

[0049] The mean and standard deviation of each of the K dimensions can be obtained through the above method. Then, based on the first knowledge vector matrix and the mean and standard deviation of each of the K dimensions, a second knowledge vector matrix can be obtained. Specifically, each parameter in the first knowledge vector matrix is ​​standardized using the following formula: ; in, This is used to represent the result of standardizing the parameter value of the j-th dimension of the i-th second knowledge vector. Used to represent the standard deviation of the j-th dimension parameter value. Used to represent the mean value of the j-th dimension parameter. The parameter value used to represent the j-th dimension of the i-th second knowledge vector.

[0050] After standardizing each parameter in the first knowledge vector matrix, the second knowledge vector matrix is ​​obtained as shown in the following formula: ; Where Y represents the second knowledge vector matrix. The second knowledge vector matrix can also be represented as follows: This matrix is ​​used to represent the result of standardization of the i-th knowledge vector among the Q second knowledge vectors. .

[0051] Then, the eigenvalues ​​and eigenvectors of the second knowledge vector matrix can be calculated to obtain T eigenvalues ​​and T eigenvectors, with a one-to-one correspondence between the T eigenvalues ​​and the T eigenvectors. For each of the T eigenvalues, the eigenvalue and its corresponding eigenvector satisfy the following condition: ;in, Used to represent this feature value, Y is used to represent the feature vector corresponding to the feature value, and Y is used to represent the second knowledge vector matrix. The T feature values ​​are sorted in descending order, assuming the result is... E can be a preset value, set according to the actual situation, and E is an integer greater than 1. If it is necessary to reduce the K-dimensional vector to E-dimensionality, then select the E eigenvectors corresponding to the E eigenvalues ​​with the largest eigenvalues ​​as the vector after dimensionality reduction.

[0052] Step 340: The cloud server determines L first knowledge vectors from the Q first knowledge vectors, and the cloud server divides the L first knowledge vectors into P types of knowledge vectors.

[0053] In this embodiment, each of the P types of knowledge vectors includes at least one of the L first knowledge vectors, where P is a positive integer less than L, and L is a positive integer less than or equal to Q. For example, if Q=L, the cloud server can directly determine the Q first knowledge vectors as L first knowledge vectors. In this embodiment, one type of knowledge vector can be understood as a clustered knowledge vector, and a cluster can be understood as... Figure 1 One of the edge clusters.

[0054] For example, in one embodiment of this application, the L first knowledge vectors are the first knowledge vectors among the Q first knowledge vectors that are assigned to the target edge cluster. The cloud server selects L first knowledge vectors from the Q first knowledge vectors, including: the cloud server obtaining the identifier of each of the Q first knowledge vectors; based on the identifier of each of the Q first knowledge vectors, allocating the Q first knowledge vectors to W edge clusters; and selecting L first knowledge vectors from the Q first knowledge vectors to be assigned to the target edge cluster, where the target edge cluster is one of the W edge clusters, and W is an integer greater than 1.

[0055] In this embodiment, the Q first knowledge vectors can be allocated to different edge clusters, and retrieval indexes can be built in parallel on the edge clusters to improve data query efficiency. The following provides a method for allocating the Q first knowledge vectors to different edge clusters, using a hash ring mapping method to determine the edge cluster corresponding to each of the Q first knowledge vectors. However, it should be noted that this method is not limited to the one listed here; in practice, the Q first knowledge vectors can also be randomly allocated to W edge clusters.

[0056] Traditional computing networks deploy all services in the cloud when providing retrieval enhancement generation services, failing to fully utilize the computing resources of edge clusters and resulting in low efficiency. This solution addresses this by using a cloud-based vector aggregation module that evenly distributes the Q first knowledge vectors across W edge clusters via a consistent hashing algorithm. This allows for parallel index building and vector similarity queries within the edge clusters. By fully utilizing the computing resources of the edge clusters, this approach improves both the efficiency and accuracy of external data queries and the overall efficiency of computing network resource utilization.

[0057] Specifically, a preset identifier is obtained for each of the W edge clusters, for example, The Q first knowledge vectors are denoted as The identifier for each edge cluster is determined using a consistent hashing algorithm. And the identifier of each first knowledge vector Perform calculations, , Represent as The unique value of the interval, and , Form a hash ring. (See reference...) Figure 4 , Figure 4 This is an example schematic diagram of a hash ring provided in an embodiment of this application. The hash ring is, for example, a... Figure 4 The hash ring shown.

[0058] Then, based on the allocation result of the hash ring, the Q first knowledge vectors are distributed to W edge clusters, with the allocation principle being to distribute each external knowledge vector to the edge cluster on the left side of the hash ring. For example... Figure 4 As shown, the identifier can be... The first knowledge vector is assigned to the identifier. Edge clusters can be identified as , , The first knowledge vector is assigned to the identifier. By using the above partitioning method, each of the Q first knowledge vectors can be pushed down to its corresponding edge cluster. This has two advantages: First, external knowledge vectors can utilize a consistent hash function to generate globally unique hash values, allowing for rapid location of the corresponding edge cluster during data similarity queries, thus improving query efficiency. Second, edge clusters can execute index creation or vector similarity queries in parallel, further improving the efficiency of both. After pushing the external knowledge vectors (dimensionality-reduced vectors) down to the edge clusters, the edge clusters can store these vectors in a vector database (e.g., Faiss, Pgvector, Milvus).

[0059] Step 350: The cloud server sends the P-type knowledge vector to the edge node.

[0060] Step 360: The cloud server sends the first vector to the edge node, enabling the edge node to perform data queries based on the first vector.

[0061] In this embodiment, steps 320-350 are used to provide external knowledge vectors to edge nodes. Providing external knowledge vectors to edge nodes is not limited to being performed after step 310; it can also be performed before step 310. Figure 3 This is just one example.

[0062] Step 370: The cloud server receives the data query result sent by the edge node, the data query result being obtained by the edge node based on the P-class knowledge vector.

[0063] In this embodiment, the edge node can obtain the similarity between each knowledge vector in the P-class knowledge vectors and the first vector. Following a descending order of similarity, it selects at least one knowledge vector from the P-class knowledge vectors to obtain the knowledge content corresponding to that at least one knowledge vector. The edge node can then determine the knowledge content corresponding to the at least one knowledge vector as the data query result of the first vector and send the data query result to the cloud server. Alternatively, it can further select the knowledge content most similar to the first vector from the knowledge content corresponding to the at least one knowledge vector and determine it as the data query result. It should be noted that the vector dimension of each knowledge vector in the P-class knowledge vectors is the same as the vector dimension of the first vector. If each first knowledge vector in the P-class knowledge vectors is a vector obtained through dimensionality reduction, then the first vector is a vector obtained through the same dimensionality reduction method.

[0064] Specifically, such as Figure 1As shown, this application embodiment involves multiple edge clusters. When retrieving the content to be retrieved, the multiple edge clusters can perform parallel queries based on a first vector of the content to be retrieved. The following example uses a target edge cluster among the multiple edge clusters. The target edge cluster includes P edge clusters, each corresponding to one of P types of knowledge vectors. The P edge clusters can be distributed across one or more edge nodes. For example, if the P edge clusters are distributed on one edge node, that edge node can calculate the similarity between the first vector and each type of knowledge vector in the P types of knowledge vectors. Alternatively, if the P edge clusters are distributed across multiple edge nodes, each edge node can distribute multiple edge clusters from the P edge clusters, and each edge node can calculate the similarity between the first vector and the multiple types of knowledge vectors corresponding to the multiple edge clusters. For example, if 100 edge clusters are evenly distributed across 10 edge nodes, and each edge node has 10 edge clusters, then each edge node can calculate the similarity between the first vector and the 10 types of knowledge vectors corresponding to the 10 edge clusters.

[0065] In one embodiment of this application, the data query result is at least a portion of knowledge content determined by the edge node from specified knowledge content based on the first vector. The specified knowledge content is at least one type of knowledge content determined by the edge node from N types of knowledge content based on a first similarity between each of the N center vectors and the first vector. Each of the N center vectors is obtained based on one type of knowledge vector from the N types of knowledge vectors, and the N types of knowledge content include knowledge content corresponding to each type of knowledge vector in the N types of knowledge vectors. The P types of knowledge vectors include the N types of knowledge vectors, where N is an integer greater than 1.

[0066] In this embodiment, the specified knowledge content includes M pieces of knowledge content, where M is an integer greater than 1. The at least part of the knowledge content is selected by the edge node from the M pieces of knowledge content based on a second similarity between each piece of knowledge content and the first vector. For any piece of knowledge content in the M pieces, the knowledge content includes multiple sets of text, and the second similarity between the knowledge content and the first vector is obtained based on the similarity between each set of text and the first vector. The specific data query process can be referred to later in the text. Figure 5 and Figure 6 The details will not be elaborated here.

[0067] Step 380: The cloud server obtains search results for the content to be searched based on the data query results.

[0068] In this embodiment, multiple external knowledge vectors are divided into multiple types of knowledge vectors, which facilitates the coarse-grained selection of one or more types of knowledge vectors related to the first vector, thereby improving the efficiency of data retrieval.

[0069] In one embodiment of this application, the cloud server divides the L first knowledge vectors into P types of knowledge vectors, including: the cloud server selecting P first knowledge vectors from the L first knowledge vectors; the cloud server determining the P first knowledge vectors as the initial knowledge vectors for each type of knowledge vector in the P types of knowledge vectors, wherein the initial knowledge vector for each type of knowledge vector in the P types of knowledge vectors is one of the first knowledge vectors in the P first knowledge vectors; and the cloud server allocating the remaining knowledge vectors to the P types of knowledge vectors, wherein the remaining knowledge vectors are the first knowledge vectors other than the P first knowledge vectors in the L first knowledge vectors.

[0070] In this embodiment, an initial knowledge vector for each of the P categories of knowledge vectors can be selected from the L first knowledge vectors. The initial knowledge vectors for each category can serve as the basis for subsequent allocation, thereby assigning the remaining knowledge vectors to each category. This method facilitates grouping semantically related knowledge vectors into one category. Furthermore, the value of P can be determined based on the value of L, for example... The number of first knowledge vectors that need to be divided into each category (edge ​​cluster) is: Therefore, when creating an index, it can be created based on each type of knowledge vector, and indexes for different types of knowledge vectors can be created in parallel. Compared with traditional methods, this improves retrieval efficiency. It should be noted that the index of each type of knowledge vector here can be understood as the center vector of each type of knowledge vector. For example, if a type of knowledge vector contains 4 knowledge vectors, then the mean vector of the 4 knowledge vectors can be used as the center vector of that type of knowledge vector.

[0071] It's important to note that index creation isn't limited to a single approach: first grouping based on the external knowledge vector dimension within the edge cluster, then clustering based on the external knowledge vector density, using a triple parallel mechanism of edge clustering, grouping, and clustering. For example, the k-means algorithm can be used for grouping, or an index can be omitted, and queries can be performed using a full table scan.

[0072] Furthermore, this application embodiment also supports grouping the L first knowledge vectors according to their vector dimensions. For example, the first and second dimension parameters of each of the L first knowledge vectors are grouped into a first group, the third and fifth dimension parameters of each of the L first knowledge vectors are grouped into a second group, and so on. Preferably, the number of vertical groupings in the edge cluster is used. Ideally, the vector dimension in each group should be [value missing]. The parameters of the E dimensions are randomly and evenly distributed among p groups. (See reference...) Figure 5 , Figure 5 This is a schematic diagram illustrating an example of grouping and clustering external knowledge vectors provided in an embodiment of this application. For example... Figure 5 As shown, the parameters of dimensions 1, 4, and 6 are assigned to group 1, and the parameters of dimensions 2, 3, 8, and 9 are assigned to group 2. The indexes in p groups are executed in parallel, which improves the efficiency of index creation.

[0073] In this application's embodiments, grouping and clustering are relatively independent; clustering can occur before grouping, or grouping can occur before clustering. In one example, after grouping within the edge cluster, each group is further clustered horizontally based on vector density. Sentences with high semantic similarity in their knowledge vectors are grouped into the same cluster. This allows for quick location of the cluster with the highest sentence similarity when calculating query content similarity by comparing the similarity between the query content vector and the center point of each cluster, and then performing round-robin queries within that cluster.

[0074] For example, in one embodiment of this application, the cloud server selects P first knowledge vectors from the L first knowledge vectors, including: the cloud server obtaining a target knowledge vector based on the L first knowledge vectors; the cloud server determining a first target knowledge vector from the L first knowledge vectors, wherein the first target knowledge vector is the first knowledge vector with the largest Euclidean distance from the L first knowledge vectors to the target knowledge vector; the cloud server adding the target knowledge vector and the first target knowledge vector to a vector queue, and adding L-1 first knowledge vectors to an unallocated queue, wherein the L-1 first knowledge vectors are the first knowledge vectors from the L first knowledge vectors to the target knowledge vector. The first knowledge vector is a first knowledge vector other than the first target knowledge vector; the cloud server executes the following process cyclically until P-1 second target knowledge vectors are determined: the cloud server determines the second target knowledge vector from the unallocated queue, the second target knowledge vector being the first knowledge vector with the largest sum of distances to the knowledge vectors in the vector queue in the unallocated queue; the cloud server removes the second target knowledge vector from the unallocated queue and adds the second target knowledge vector to the vector queue; the cloud server determines P first knowledge vectors by combining the first target knowledge vector and the P-1 second target knowledge vectors.

[0075] In this embodiment, the target knowledge vector can be the mean vector of the L first knowledge vectors. First, the center point (i.e., the target knowledge vector) of all L first knowledge vectors in the target edge cluster is calculated. The first knowledge vector with the largest Euclidean distance to the center point is selected from all L first knowledge vectors as the initial knowledge vector of the first cluster. Then, the first knowledge vector with the largest sum of distances to the center point and the knowledge vector of the first cluster is selected from the remaining knowledge vectors as the initial knowledge vector of the second cluster, and so on, until a target knowledge vector is determined. The initial knowledge vector of each cluster.

[0076] In one embodiment of this application, the cloud server allocates the remaining knowledge vectors to the P-class knowledge vectors, including: obtaining P target distances of the P-class knowledge vectors, wherein the P target distances include the target distance of each class of knowledge vectors in the P-class knowledge vectors; for any one class of knowledge vectors in the P-class knowledge vectors, selecting at least one first knowledge vector from the remaining knowledge vectors, wherein the Euclidean distance between any one of the at least one first knowledge vectors and the initial knowledge vector of the class of knowledge vectors is less than or equal to the target distance of the class of knowledge vectors; and based on the P target distances, the cloud server allocates the remaining knowledge vectors to the P-class knowledge vectors.

[0077] In this embodiment, the P target distances can be preset distances, and the target distances for each type of knowledge vector can be the same or different, without limitation. For ease of understanding, the idea behind this allocation method is as follows: using the initial knowledge vector as the center and the target distance as the radius, knowledge vectors located within the circular area are assigned to the category corresponding to the center. In this way, the remaining knowledge vectors can be temporarily assigned to P types of knowledge vectors. To further optimize this allocation scheme, the target distance of each type of knowledge vector in the P types of knowledge vectors can be adjusted to ensure that the index distance of each type of knowledge vector is as short as possible, thereby improving retrieval efficiency.

[0078] For each cluster (category), the knowledge vectors in the cluster are sorted in ascending order of their distance from the initial knowledge vector. The h-th knowledge vector is then compared with the initial knowledge vector. The Euclidean distance between them is denoted as Let the set of knowledge vectors (temporarily assigned according to the target distance) in the cluster be denoted as For any two external knowledge vectors u and v in the dataset, the vector index distance between u and v is as follows: ; in, Used to represent the vector index distance between u and v Used to represent the Euclidean distance between u and v.

[0079] Then, the vector density of the cluster can be calculated, which is the initial knowledge vector of the cluster. The reciprocal of the average vector index distance to all points in its neighborhood is calculated as follows: ; Using the maximization of the sum of vector densities across all clusters as the objective function, the target distance for each cluster is dynamically adjusted to obtain P target distances. These P target distances are then used to allocate the remaining knowledge vectors, resulting in knowledge vectors within each cluster, thus completing vector data clustering. Specifically, the P target distances maximize the sum of P density values ​​of the P classes of knowledge vectors. These P density values ​​include the density value of each class of knowledge vectors within the P classes. The P density values ​​are determined based on the P target distances, and the density value of any class of knowledge vectors within the P classes is negatively correlated with the index distance of that class of knowledge vectors. This method sequentially completes the clustering of all external knowledge in each edge cluster. Furthermore, this method enables parallel computation between clusters during similarity matching, improving the efficiency of index creation and similarity querying.

[0080] For reference Figure 6 , Figure 6 This is a flowchart of another content retrieval method provided in an embodiment of this application. For example... Figure 6 As shown, the method includes the following steps: Step 610: The edge node receives the first vector sent by the cloud server, which is obtained based on the content to be retrieved.

[0081] Step 620: The edge node performs a data query based on the first vector to obtain the data query result.

[0082] Step 630: The edge node sends the data query result to the cloud server, so that the cloud server obtains the search result for the content to be searched based on the data query result.

[0083] In this embodiment, the explanation and determination process of the first vector, the content to be retrieved, and the data query results can be referred to the previous text and will not be elaborated here. The following describes the data query process for edge nodes.

[0084] In this embodiment, an edge node receives a first vector sent by a cloud server, the first vector being obtained based on the content to be retrieved; the edge node performs a data query based on the first vector to obtain a data query result; the edge node sends the data query result to the cloud server, enabling the cloud server to obtain a retrieval result for the content to be retrieved based on the data query result. Thus, compared to related technologies that centrally deploy external knowledge data storage, retrieval, and text generation services in the cloud, this embodiment uses edge nodes to complete the data query, sharing some of the work of the cloud server, thereby reducing the pressure on the cloud server's computing resources and improving the utilization rate of the edge node's computing resources, solving the problem of high cloud computing resource pressure in related technologies.

[0085] In one embodiment of this application, the edge node performs a data query based on the first vector to obtain a data query result, including: the edge node acquiring N center vectors, each of the N center vectors being obtained based on one type of knowledge vector from N types of knowledge vectors; the edge node acquiring a first similarity between each of the N center vectors and the first vector; the edge node determining at least one type of knowledge vector from the N types of knowledge vectors based on the first similarity between each of the N center vectors and the first vector; and the edge node obtaining a data query result based on the at least one type of knowledge vector.

[0086] In this embodiment, the N types of knowledge vectors can be at least a portion of the P types of knowledge vectors mentioned above. It is understood that N types of knowledge vectors are deployed on the edge nodes from among the P types of knowledge vectors. The edge nodes are used to calculate the similarity between the first vector and each of the N types of knowledge vectors deployed on the edge nodes. Multiple edge nodes can calculate the similarity between the first vector and the indicator vectors deployed on the edge nodes in parallel. The first similarity can be cosine similarity. For any one of the N center vectors, the first similarity between the center vector and the first vector can be the cosine similarity between the center vector and the first vector. Based on the first similarity between each of the N center vectors and the first vector, the edge nodes determine at least one type of knowledge vector from the N types of knowledge vectors, including: the edge nodes determining at least one type of knowledge vector from the N types of knowledge vectors in descending order of the first similarity.

[0087] Combination Figure 5The following description introduces cluster 1 (one type of knowledge vector among N types of knowledge vectors) and cluster 2 (another type of knowledge vector among N types of knowledge vectors) distributed on the edge nodes. The edge nodes can determine the similarity between the first vector and the center vector of cluster 1, and the similarity between the first vector and the center vector of cluster 2. The center vector of cluster 1 can be the mean vector of the knowledge vectors contained in cluster 1, i.e., the mean vector of external knowledge vector 1 and external knowledge vector k. The center vector of cluster 2 can be the mean vector of the knowledge vectors contained in cluster 2, i.e., external knowledge vector 2. If the first similarity between the first vector and the center vector of cluster 1 is higher than the second similarity between the first vector and the center vector of cluster 2, then the knowledge vector corresponding to cluster 1 can be determined as at least one type of knowledge vector. Furthermore, the at least one type of knowledge content corresponding to at least one type of knowledge vector can be directly determined as the data query result, such as... Figure 5 The text refers to "Apache Spark, a fast and general-purpose computing engine designed for large-scale data processing" and "large models, using large-scale data, powerful computing capabilities, trained with large parameters."

[0088] Alternatively, the edge node can further locate the knowledge vector closest to the first vector from the at least one type of knowledge vectors, and determine the knowledge content corresponding to the knowledge vector as the data query result. Specifically, the at least one type of knowledge vectors includes M knowledge vectors. The edge node obtains the data query result based on the at least one type of knowledge vectors, including: the edge node determines the second similarity between each of the M knowledge vectors and the first vector; the first vector with the largest second similarity between the M knowledge vectors and the first vector is determined as the specified knowledge vector; and the knowledge content corresponding to the specified knowledge vector is determined as the data query result. For any one of the M knowledge vectors, the knowledge vector is divided into multiple groups of vectors, and the second similarity between the knowledge vector and the first vector is obtained based on the similarity between each of the multiple groups of vectors and the first vector.

[0089] In this embodiment of the application, similar to the calculation method of the first similarity, the second similarity can also be cosine similarity. For any one of the M knowledge vectors, the second similarity between the knowledge vector and the first vector is, for example, the average of multiple similarities between multiple sets of vectors and the first vector, wherein the multiple similarities include the similarity between each set of vectors and the first vector.

[0090] To illustrate with an example, after determining the external knowledge vector 1 and external knowledge vector k of cluster 1, both external knowledge vector 1 and external knowledge vector k can be divided into multiple groups according to their dimensions, for example... Figure 5 Dimensions 1, 4, and 6 are assigned to group 1, and dimensions 2, 3, 8, and 9 are assigned to group 2, and so on. Thus, external knowledge vector 1 can be divided into (0.118, 0.986, 0.332), (0.243, 0.134, 0.984, 0.118), etc. External knowledge vector k and the first vector can also be divided into multiple groups of vectors, which will not be elaborated here. The similarity between the vectors composed of dimensions 1, 4, and 6 in external knowledge vector 1 and the vectors composed of dimensions 1, 4, and 6 in the first vector can be determined. Using the same method, the similarity between each of the multiple groups of vectors in external knowledge vector 1 and the first vector can be determined, resulting in multiple similarity scores. This allows us to determine the second similarity between external knowledge vector 1 and the first vector.

[0091] To facilitate understanding, the following is a brief overview of the overall content retrieval process. Please refer to... Figure 7 , Figure 7 This is a schematic diagram illustrating the overall concept of a content retrieval method provided in an embodiment of this application. For example... Figure 7 As shown, the process involves seven steps: First, external knowledge vector data is vectorized, where the cloud server uses a sentence vector generation module to vectorize the collected external knowledge content. Second, the external knowledge vectors are dimensionality-reduced in the cloud computing network. Third, the external knowledge vectors are deployed to edge clusters, where a consistent hashing algorithm maps each knowledge vector to a specific edge cluster. Fourth, the edge cluster vector data is stored in a vector database. Fifth, a distributed edge index is created, grouping and clustering each knowledge vector and creating an index for each cluster. Sixth, query content similarity is calculated, first by clustering, selecting one or more clusters with high similarity to the content to be retrieved, and then by grouping, selecting the sentence with the highest similarity to the content to be retrieved as the query result for the edge node. Seventh, the basic large model is invoked to generate the answer.

[0092] It is important to understand that Figures 1 to 6 The explanations of the same or corresponding steps can be cross-referenced. For example, Figure 2 The explanation of step 210 is applicable to Figure 3 Step 310 in the process.

[0093] Regarding the retrieval enhancement generation methods adopted under the computing power network architecture, the relevant technologies mainly suffer from the following two problems: First, the entire process of retrieval enhancement generation, including external knowledge vectorization, external knowledge storage, index creation, data retrieval, and invocation of the basic large model, is completed in the cloud. In the cloud-edge collaborative architecture of the computing power network, the computing power of the edge cluster is not fully utilized, and the cloud-edge collaborative execution of the computing power network is not achieved, resulting in low external knowledge retrieval efficiency. Second, when creating indexes for external knowledge and performing related queries, indexes are only created for the entire amount of external knowledge in the cloud. On the one hand, external knowledge is not effectively partitioned to utilize the computing power resources of the edge cluster for parallel index creation. On the other hand, external knowledge vectors are not classified and clustered according to vector dimensions and data volume, resulting in low external knowledge retrieval efficiency.

[0094] Based on this, this application proposes a method to improve the efficiency of large-scale model retrieval and enhancement generation in computing power networks. First, the cloud-based vector aggregation module of the computing power network reduces the dimensionality of external knowledge vectors. Based on the external knowledge vectors and edge clusters, a consistent hash ring is created, sinking the external knowledge vectors to the edge clusters and fully utilizing their computing resources. Indexes and data queries are then created in parallel on the edge clusters. Second, within the edge clusters, the vectors are vertically divided into multiple groups. Horizontally, within each group, sentences with high semantic similarity are clustered with the goal of maximizing the average density of external knowledge vectors within the cluster. Parallel computation between groups and clusters improves index generation efficiency. Finally, during query content similarity retrieval, the cosine similarity between the query content vector and all group indexes is calculated sequentially. The grouped cosine similarities are then assembled, and the sentence with the highest average cosine similarity is selected as a synonym for the query content, which is then substituted into the basic large-scale model to generate the answer. This method solves the two problems mentioned above.

[0095] Meanwhile, it should be understood that the content retrieval method provided in this application embodiment can have the following beneficial effects: First, this solution proposes a method to improve the efficiency of large-scale model retrieval and generation in computing power networks. First, the cloud-based vector aggregation module of the computing power network reduces the dimensionality of external knowledge vectors, creates a consistent hash ring based on external knowledge vectors and edge clusters, sinks external data to the edge clusters, and creates indexes and performs data queries in parallel on the edge clusters, making full use of the computing power resources of the edge clusters. Second, within the edge clusters, the vectors are vertically divided into multiple groups, and horizontally, within each group, sentences with high semantic similarity are clustered with the goal of maximizing the average density of external knowledge vectors within the cluster. Groups and clusters are computed in parallel simultaneously, improving the efficiency of index generation. Finally, during data similarity retrieval, the cosine similarity between the query content vector and all group indexes is calculated sequentially, and then the group cosine similarity is assembled. The result with the largest average cosine similarity is selected as the synonym of the query content and substituted into the basic large-scale model to generate the answer. The above methods, on the one hand, fully utilize the cloud-edge resource collaboration capabilities under the computing power network architecture to improve the utilization rate of computing power network resources; on the other hand, through the triple parallel mechanism of edge clusters, grouping, and sub-clustering, indexes and data retrieval are generated in parallel, thereby improving the efficiency of large model retrieval and enhancement generation.

[0096] Secondly, this solution proposes a method to improve retrieval efficiency by creating an edge cluster cluster index. First, the center point of all external knowledge vectors is determined, and the knowledge vector furthest from the center point is used as the initial point of the first cluster. The initial points of all clusters are selected based on maximizing the interval between initial points. Next, the distance to each cluster's initial point and the vector index distance between any two points are calculated. Then, the vector index density of the cluster's initial points is calculated. Using the maximization of the average density of external knowledge vectors within each cluster as the objective function, the distance of each cluster is dynamically allocated to obtain the external knowledge vectors in each cluster, thus completing the external knowledge vector clustering. The closer the average vector index distance within each cluster, the higher the density of external knowledge vectors in the cluster, indicating a better clustering effect. Finally, during data similarity retrieval, the cosine similarity between the query content vector and all group indices is calculated sequentially. The grouped cosine similarities are then assembled, and the sentence with the highest average cosine similarity is selected as a synonym for the query content, which is then substituted into the basic large model to generate the answer. The distributed edge cluster cluster index constructed using this method can effectively improve the efficiency of large model retrieval enhancement generation.

[0097] Furthermore, Retrieval Augmentation (RAG) technology, by combining retrieval and generation models and supplementing the original knowledge base of the basic large model with proprietary data sources, significantly improves the accuracy, richness, and contextual relevance of content, demonstrating broad commercial application value in the digital domain, telecommunications, and financial industries. In the digital domain, RAG not only improves the efficiency of public services, building intelligent customer service systems to answer citizens' inquiries in real time, but also optimizes decision support, providing the latest information to assist in scientific decision-making. For telecommunications operators, RAG enables personalized user experiences, providing customized services and troubleshooting guidance based on user preferences, while also quickly locating problems and automatically generating solutions in intelligent network operation and maintenance, shortening fault recovery time. In the financial industry, RAG technology enhances risk management and compliance, ensuring business operations comply with the latest laws and regulations, assisting in credit assessment, and optimizing loan approval processes. This solution proposes a method to improve the efficiency of large model retrieval augmentation generation in computing power networks. On the one hand, under the computing power network architecture, it fully utilizes the collaborative capabilities of cloud and edge resources to improve the utilization rate of computing power network resources. On the other hand, through a triple parallel mechanism of edge clustering, grouping, and clustering, it generates indexes and retrieves data in parallel, improving the efficiency of large model retrieval augmentation generation. This solution can be applied to search enhancement generation scenarios in various industries, and has a wide range of applications.

[0098] For reference Figure 8 , Figure 8 This is a structural block diagram of a content retrieval device provided in an embodiment of this application. For example... Figure 8 As shown, the content retrieval device 800 provided in this application embodiment includes: an acquisition module 810, a sending module 820, and a query module 830.

[0099] The acquisition module 810 is used to acquire a first vector, which is obtained based on the content to be retrieved; The sending module 820 is used to send the first vector to the edge node, so that the edge node performs data query based on the first vector; The query module 830 is used to receive the data query results sent by the edge node; and based on the data query results, to obtain the search results for the content to be searched.

[0100] In this embodiment, a first vector is obtained based on the content to be retrieved; the first vector is sent to an edge node, enabling the edge node to perform a data query based on the first vector; the data query result sent by the edge node is received; and based on the data query result, a retrieval result for the content to be retrieved is obtained. Thus, compared to related technologies that centrally deploy external knowledge data storage, retrieval, and text generation services in the cloud, this embodiment uses edge nodes to perform data queries, sharing some of the work of the cloud server, thereby reducing the pressure on the cloud server's computing resources and improving the utilization rate of the edge node's computing resources, solving the problem of high cloud computing resource pressure in related technologies.

[0101] The content retrieval device provided in this application embodiment can implement all the processes implemented in the above method embodiments, and will not be described again here to avoid repetition.

[0102] like Figure 9 As shown, this application embodiment also provides an electronic device 900, which can be an adapter or various types of computers, etc. The electronic device 900 includes a processor 910 and a memory 920. The memory 920 stores programs or instructions, which, when executed by the processor 910, implement the steps of any of the methods described above. For example, when the program is executed by the processor 910, it implements the following process: obtaining a first vector, which is obtained based on the content to be retrieved; sending the first vector to an edge node, causing the edge node to perform a data query based on the first vector; receiving the data query result sent by the edge node; and obtaining a retrieval result for the content to be retrieved based on the data query result. Thus, compared to the related technologies that centrally deploy external knowledge data storage, retrieval, and text generation services in the cloud, this application embodiment uses edge nodes to complete the data query, sharing some of the work of the cloud server, thereby reducing the pressure on the cloud server's computing resources and improving the utilization rate of the edge node's computing resources, solving the problem of high pressure on cloud computing resources in related technologies.

[0103] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the steps of various embodiments of the content retrieval method and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0104] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0105] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0106] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.

[0107] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0108] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0109] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A content retrieval method, characterized in that, include: The cloud server obtains a first vector, which is based on the content to be retrieved. The cloud server sends the first vector to the edge node, enabling the edge node to perform data queries based on the first vector; The cloud server receives the data query results sent by the edge node; Based on the data query results, the cloud server obtains search results for the content to be searched.

2. The method according to claim 1, characterized in that, Before the cloud server sends the first vector to the edge node, the method further includes: The cloud server acquires Q copies of knowledge content, where Q is a positive integer greater than 1; The cloud server obtains Q first knowledge vectors based on the Q pieces of knowledge content; The cloud server determines L first knowledge vectors from the Q first knowledge vectors, where L is a positive integer less than or equal to Q; The cloud server divides the L first knowledge vectors into P types of knowledge vectors; each type of knowledge vector in the P types of knowledge vectors includes at least one first knowledge vector from the L first knowledge vectors, where P is a positive integer less than L. The cloud server sends the P-type knowledge vector to the edge node, and the data query result is obtained by the edge node based on the P-type knowledge vector.

3. The method according to claim 2, characterized in that, The cloud server divides the L first knowledge vectors into P types of knowledge vectors, including: The cloud server selects P first knowledge vectors from the L first knowledge vectors; The cloud server determines the P first knowledge vectors as the initial knowledge vectors of each of the P types of knowledge vectors, and the initial knowledge vector of each of the P types of knowledge vectors is one of the P first knowledge vectors. The cloud server allocates the remaining knowledge vectors to the P-class knowledge vectors, where the remaining knowledge vectors are the first knowledge vectors among the L first knowledge vectors excluding the P first knowledge vectors.

4. The method according to claim 3, characterized in that, The cloud server selects P first knowledge vectors from the L first knowledge vectors, including: The cloud server obtains the target knowledge vector based on the L first knowledge vectors; The cloud server determines a first target knowledge vector from the L first knowledge vectors, wherein the first target knowledge vector is the first knowledge vector with the largest Euclidean distance from the target knowledge vector among the L first knowledge vectors. The cloud server adds the target knowledge vector and the first target knowledge vector to the vector queue, and adds L-1 first knowledge vectors to the unallocated queue. The L-1 first knowledge vectors are the first knowledge vectors other than the first target knowledge vector among the L first knowledge vectors. The cloud server executes the following process repeatedly until P-1 second target knowledge vectors are determined: the cloud server determines the second target knowledge vector from the unallocated queue, and the second target knowledge vector is the first knowledge vector in the unallocated queue with the largest sum of distances to the knowledge vectors in the vector queue; the cloud server removes the second target knowledge vector from the unallocated queue and adds the second target knowledge vector to the vector queue; The cloud server determines the first target knowledge vector and the P-1 second target knowledge vectors into P first knowledge vectors.

5. The method according to claim 3, characterized in that, The cloud server allocates the remaining knowledge vectors to the P-class knowledge vectors, including: Obtain P target distances for the P types of knowledge vectors, where the P target distances include the target distance of each type of knowledge vector in the P types of knowledge vectors; For any one of the knowledge vectors in the P-class knowledge vectors, at least one first knowledge vector is selected from the remaining knowledge vectors. The Euclidean distance between any one of the first knowledge vectors and the initial knowledge vector of that class of knowledge vectors is less than or equal to the target distance of that class of knowledge vectors. Based on the P target distances, the cloud server allocates the remaining knowledge vectors to the P types of knowledge vectors.

6. A content retrieval method, characterized in that, include: The edge node receives a first vector sent by the cloud server, which is obtained based on the content to be retrieved. The edge node performs a data query based on the first vector to obtain the data query result; The edge node sends the data query result to the cloud server, enabling the cloud server to obtain search results for the content to be searched based on the data query result.

7. The method according to claim 6, characterized in that, The edge node performs a data query based on the first vector to obtain the data query results, including: The edge node obtains N center vectors, and each of the N center vectors is obtained based on one of the N types of knowledge vectors, where N is an integer greater than 1. The edge node obtains the first similarity between each of the N center vectors and the first vector; The edge node determines at least one type of knowledge vector from the N types of knowledge vectors based on the first similarity between each of the N center vectors and the first vector. The edge node obtains data query results based on the at least one type of knowledge vector.

8. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a program or instructions that, when executed by the processor, implement the steps of the method as described in any one of claims 1-7.

9. A readable storage medium, characterized in that, The medium stores a program or instructions that, when executed, implement the steps of the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1-7.