Computing power transaction service system, computing power transaction service method, computing power transaction service platform, electronic equipment and medium

Through the intelligent agent receiving and processing the text data input by the user in the computing power trading service system, and using the prompt word template for reasoning, it solves the demand side's professional knowledge needs when selecting computing power resources, realizes intelligent matching and automated operations, and improves Improve configuration and operational efficiency.

CN118608291AActive Publication Date: 2024-09-06INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202411002814.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-09-06
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

In the computing power trading business, it is difficult for the demander to select appropriate computing resources, resulting in low allocation efficiency and the need for professional knowledge.

Method used

Provides a computing power trading service system that receives text data input by users through an intelligent agent, uses prompt word templates to perform step-by-step reasoning, generates computing power resource configuration information and execution result information, and realizes intelligent matching and automated operations.

Benefits of technology

It reduces the difficulty for users to select appropriate computing resources and improves the efficiency of computing resource configuration and operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608291A
    Figure CN118608291A
Patent Text Reader

Abstract

The embodiment of the invention provides a computing power transaction service system, method and platform, electronic equipment and a medium, and relates to the technical field of computers. The system comprises a receiving module which is used for receiving first text data which is input by a user and comprises a question text for consulting computing power resource configuration and / or a command text for operating a target computing power resource; the intelligent agent is used for gradually reasoning the first text data according to the cue word template to obtain second text data comprising computing power resource configuration information corresponding to the problem text and / or execution result information corresponding to the command text; the cue word template comprises a problem sample and thinking chain reasoning logic corresponding to the problem sample; and the output module is used for outputting the second text data. According to the system, the requirements of the user are intelligently matched, proper computing power resource selection and automatic operation computing power resources are provided for the user, the resource selection difficulty of the user is effectively reduced, and the resource configuration efficiency and the resource operation efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a computing power trading service system, method, platform, electronic device and medium. Background Art

[0002] The computing power trading business is an emerging business that aims to meet the growing computing needs in the fields of artificial intelligence, big data analysis and blockchain. Based on cloud computing and distributed system technology, this business achieves efficient resource utilization and flexible configuration by trading and sharing computing power resources (such as CPU (Central Processing Unit) resources, GPU (Graphics Processing Unit) resources, storage resources and network resources), becoming an important means to solve the shortage and high cost of computing power resources. In the computing power trading business, there are usually two roles: suppliers and demanders. Suppliers are entities with a large amount of idle computing power resources, which can be cloud service providers, data centers or individual users. Demanders are entities that need a large amount of computing power resources to perform specific tasks or projects, which can be research institutions, enterprises or individual developers. Suppliers put their idle computing power resources on the computing power trading platform, waiting for demanders to purchase and use them. Demanders can choose appropriate computing power resources according to their own needs and pay corresponding fees to rent these resources. The computing power trading business is promising. However, when choosing appropriate computing resources, the demander needs to have professional knowledge in this field and be familiar with the scale and parameter quantity of common model applications in these fields and the computing resource requirements of these fields in order to choose appropriate computing resources. The selection is difficult and the configuration efficiency of computing resources is low. Summary of the invention

[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present invention provide a computing power trading service system, a computing power trading service method, a computing power trading platform, a computer program product, an electronic device and a computer-readable storage medium.

[0004] In a first aspect, an embodiment of the present invention provides a computing power trading service system, including: A receiving module, configured to receive first text data input by a user, wherein the first text data includes a question text for consulting computing power resource configuration and / or a command text for operating a target computing power resource; An intelligent agent, configured to perform step-by-step reasoning on the first text data according to a prompt word template corresponding to the first text data to obtain second text data, wherein the second text data includes computing resource configuration information corresponding to the question text and / or execution result information corresponding to the command text; wherein the prompt word template includes a question sample and a thinking chain reasoning logic corresponding to the question sample; An output module is used to output the second text data.

[0005] Optionally, the intelligent agent is used to: disassemble the first text data according to a prompt word template corresponding to the first text data to obtain multiple sub-texts to be processed, generate a thinking text to be processed corresponding to each of the sub-texts to be processed, determine a processing action to be executed corresponding to at least one of the thinking texts to be processed, execute the processing action to be executed, obtain a processing result, and obtain the second text data based on the processing result.

[0006] Optionally, the intelligent agent is used to: when the processing action to be executed is a retrieval enhancement generation action, calculate the semantic similarity between the retrieval statement indicated by the retrieval enhancement generation action and the knowledge documents in a preset knowledge base; based on the semantic similarity, determine the target knowledge related to the retrieval statement, and the target knowledge serves as the processing result.

[0007] Optionally, the intelligent agent is used to: obtain a retrieval vector corresponding to the retrieval statement indicated by the processing action to be executed; and determine the semantic similarity between the retrieval statement and the knowledge document based on the distance between the retrieval vector and the index vector of each knowledge document in the knowledge base.

[0008] Optionally, the system also includes a construction module, which is used to: obtain a document word sequence and a keyword sequence of the knowledge document; vectorize the document word sequence and the keyword sequence respectively to obtain multiple document word vectors and multiple keyword vectors; and construct an index vector of the knowledge document based on the multiple document word vectors and the multiple keyword vectors.

[0009] Optionally, the construction module is used to: filter the knowledge document according to a preset filtering strategy; and obtain a document word sequence and a keyword sequence of the filtered knowledge document.

[0010] Optionally, the intelligent agent is used to: when the processing action to be executed is an atomic operation of computing power resources, execute the atomic operation of computing power resources, obtain the operation result of the atomic operation of computing power resources, and use the operation result as the processing result.

[0011] Optionally, the intelligent agent is used to: when the computing power resource atomic operation includes a computing power query operation, execute the computing power query operation to obtain a snapshot of currently available computing power resources, and the snapshot of the available computing power resources is the operation result of the computing power query operation.

[0012] Optionally, the intelligent agent is used to: when the computing power resource atomic operation includes a computing power allocation operation, execute the computing power allocation operation to determine whether the number of currently available computing power resources is greater than or equal to the resource demand indicated by the computing power allocation operation; when the number of currently available computing power resources is greater than or equal to the resource demand, allocate available computing power resources to the user according to the resource demand, and obtain identification information of the available computing power resources allocated to the user, the identification information being the operation result of the computing power allocation operation.

[0013] Optionally, the intelligent agent is used to: when the computing power resource atomic operation includes a computing power service termination operation, execute the computing power service termination operation to stop the computing power resource indicated by the computing power service termination operation.

[0014] Optionally, the intelligent agent is used to: when the computing power resource atomic operation includes a computing power service recovery operation, execute the computing power service recovery operation to restore the computing power resource service indicated by the computing power service recovery operation.

[0015] Optionally, the intelligent agent is used to: when the computing power resource atomic operation includes a computing power transaction settlement operation, settle the computing power resources indicated by the computing power transaction settlement operation according to preset settlement rules, and determine the service fees corresponding to the computing power resources indicated by the computing power transaction settlement operation, and the service fee is the operation result of the computing power transaction settlement operation.

[0016] Optionally, the system further comprises a tool management module for managing a preset tool set; The intelligent agent is also used to call a target tool corresponding to the processing action to be executed from a preset tool set, and use the target tool to execute the processing action to be executed.

[0017] Optionally, the system further comprises a session memory module, which is used to record the first text data, the second text data, the sub-text to be processed, the thinking text to be processed, the processing action to be executed, and the processing result; The intelligent agent is also used to: obtain the historical record of the user's current session from the session memory module; and perform step-by-step reasoning on the first text data in combination with the historical record of the current session and the prompt word template corresponding to the first text data.

[0018] Optionally, the system further comprises an agent role definition module for managing agent role information and agent task information, wherein the agent role information and the agent task information are used to initialize the agent.

[0019] In a second aspect, an embodiment of the present invention provides a computing power transaction service method, including: Receive first text data input by a user, wherein the first text data includes a question text for consulting computing resource configuration and / or a command text for operating a target computing resource; According to the prompt word template corresponding to the first text data, the first text data is gradually inferred to obtain second text data, wherein the second text data includes computing resource configuration information corresponding to the question text and / or execution result information corresponding to the command text; wherein the prompt word template includes a question sample and a thinking chain reasoning logic corresponding to the question sample; The second text data is output.

[0020] In a third aspect, an embodiment of the present invention provides a computing power trading platform, the computing power trading platform comprising a computing power resource management system and a computing power trading service system according to any embodiment of the present invention; the computing power resource management system is coupled with the computing power trading service system; The computing power resource management system is used to manage computing power resources; The computing power trading service system receives first text data input by a user, wherein the first text data includes a command text for operating a target computing power resource, and performs step-by-step reasoning on the command text according to a prompt word template corresponding to the command text to operate the target computing power resource indicated by the command text, thereby obtaining execution result information corresponding to the command text.

[0021] In a fourth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the computing power trading service method provided by any embodiment of the present invention.

[0022] In a fifth aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor is used to implement the computing power trading service method provided by any embodiment of the present invention when executing the program stored in the memory.

[0023] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the computing power trading service method provided by any embodiment of the present invention is implemented.

[0024] The technical solution provided by the embodiment of the present invention brings at least the following beneficial effects: The computing power trading service system provided by the embodiment of the present invention uses an intelligent agent to gradually infer the question text of the user input for consulting on the computing power resource configuration and / or the command text for operating the target computing power resources, and obtains the computing power resource configuration information corresponding to the question text and / or the execution result information corresponding to the command text, thereby providing the user with appropriate and diverse computing power resource choices, realizing intelligent matching of user needs and automated operation of computing power resources, effectively reducing the difficulty for users to select appropriate computing power resources, and improving the efficiency of computing power resource configuration and the efficiency of computing power resource operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0026] Figure 1 A schematic diagram showing the structure of a computing power trading service system provided by an embodiment of the present invention is shown; Figure 2A A schematic diagram of the flow of the thinking chain reasoning logic provided by an embodiment of the present invention is shown; Figure 2B A schematic diagram of the process of vectorizing a search statement by an intelligent agent provided in an embodiment of the present invention is shown; Figure 3 A schematic diagram showing the structure of a computing power trading service system provided by another embodiment of the present invention is shown; Figure 4 A schematic diagram showing the structure of a computing power trading service system provided by another embodiment of the present invention is shown; Figure 5 A flowchart showing the initialization process of the computing power trading service system provided by an embodiment of the present invention is shown; Figure 6 A timing diagram showing a computing power transaction service system provided by an embodiment of the present invention processing a computing power resource configuration consulting service; Figure 7 A timing diagram showing a computing power transaction service system provided by an embodiment of the present invention processing computing power resource operation services; Figure 8 A schematic diagram of the structure of a computing power trading platform provided by an embodiment of the present invention is shown; Fig. 9 A flowchart of a computing power trading service method provided by an embodiment of the present invention is shown; Fig.10 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0027] Below in conjunction with the accompanying drawings, exemplary embodiments of the present invention are described, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention.

[0028] The computing power trading service system provided in the embodiment of the present invention can be applied to an intelligent service platform for the vertical field of computing power trading, and is used to handle computing power resource trading business. In the embodiment of the present invention, the computing power resource trading business is divided into computing power resource configuration consulting business and computing power resource operation business. Among them, when processing the computing power resource configuration consulting business, the computing power trading service system gradually infers the questions related to the computing power configuration provided by the user, and generates answers in combination with the knowledge related to the computing power resource configuration. When processing the computing power resource operation business, the computing power trading service system gradually infers the computing power resource operation commands provided by the customer, and maps the computing power resource operation commands into a variety of computing power resource atomic operations, thereby completing the computing power trading operation expected by the user. Among them, computing power resources include, for example, but are not limited to: CPU (Central Processing Unit, central processing unit) resources, GPU (Graphics Processing Unit, graphics processor) resources, storage resources and network resources.

[0029] Figure 1 FIG. 1 shows a schematic diagram of the structure of a computing power trading service system provided by an embodiment of the present invention. Figure 1 As shown, the computing power trading service system 100 includes a receiving module 101, an intelligent agent 102 and an output module 103.

[0030] Among them, the receiving module 101 is used to receive first text data input by a user, and the first text data includes a question text for consulting computing power resource configuration and / or a command text for operating a target computing power resource.

[0031] The computing power trading service system provided by the embodiment of the present invention can handle computing power resource configuration consulting services and computing power resource operation services. Users initiate computing power resource configuration consulting services by inputting question texts for consulting computing power resource configuration, and initiate computing power resource operation services by inputting command texts for operating target computing power resources.

[0032] Intelligent agent 102 is used to perform step-by-step reasoning on the first text data according to the prompt word template corresponding to the first text data to obtain second text data, where the second text data includes computing resource configuration information corresponding to the question text and / or execution result information corresponding to the command text; the preset prompt word template includes a question sample and the thinking chain reasoning logic corresponding to the question sample.

[0033] In the field of artificial intelligence, an agent refers to a computer system or entity that has the ability to make autonomous decisions, learn, make decisions, and interact with the environment. It usually relies on a base model such as a large language model as its core decision-making and processing unit, and has the ability to think independently and call tools to complete a given goal. In an embodiment of the present invention, the agent can be a customer service robot built on a computing power trading platform to intelligently answer and analyze user questions and perform computing power trading operations expected by customers. Optionally, the agent is built based on a base model such as a large language model (LLM, referred to as a large language model, which refers to a pre-trained language model with billions of parameters). By pre-training the base model, fine-tuning the instructions, and aligning the base model, the base model has basic interactive capabilities, and then the base model is packaged using an artificial intelligence engineering development framework, and the base model is packaged into a ReAct paradigm with reasoning and exploration execution capabilities, thereby obtaining an agent with general intelligent capabilities such as interaction, question and answer, and thought chain analysis. Reasoning and Acting (ReAct paradigm) aims to enable large language models to achieve specific goals through logical reasoning and the construction of action sequences. A class is a user-defined reference data type, also known as a class type. Each class contains a data description and a set of functions that operate on data or pass messages. Instances of a class are called objects.

[0034] In this embodiment, the intelligent agent 102 analyzes the user's computing power resource requirements, queries for computing power resources that meet the requirements, and executes the computing power transaction operations expected by the customer through conversations with the user.

[0035] In an optional embodiment, multiple prompt word templates (CoT Prompt for Computing Grid Service, CPCGS for short) can be constructed in advance for computing power trading businesses in the vertical field of computing power trading, such as computing power resource configuration consulting business and computing power resource operation business. The prompt word template is used to provide ideas, methods and examples for answering the text entered by the user in the computing power resource configuration consulting business or the computing power resource operation business. Optionally, the prompt word template includes a problem sample and a chain of thought reasoning logic corresponding to the problem sample. Among them, the chain of thought (CoT for short) reasoning logic gradually decomposes the problem entered by the user, such as a complex problem, into multiple sub-problems, and completes the solution to the complex problem by answering multiple sub-problems.

[0036] Figure 2A FIG. 1 is a flow chart of the reasoning logic of the thought chain provided by an embodiment of the present invention. Figure 2AAs shown, the thought chain reasoning logic includes: in response to receiving a question text (recorded as question Q) input by a user, breaking question Q into multiple sub-question texts (recorded as { }, n is a positive integer greater than 1). For each sub-question text, reasoning is performed on the sub-question text to generate a thinking text corresponding to the sub-question text, a processing action corresponding to the thinking text is determined, the processing action is executed, a processing result is generated, the processing result corresponding to each sub-question text is summarized and concluded, and an answer text for question Q is generated. Optionally, when generating an answer text for question Q, not only the processing result corresponding to each sub-question text is considered, but also the thinking text corresponding to each sub-question text is considered. That is, the thinking text and the processing result corresponding to each sub-question text are summarized and concluded to generate an answer text for question Q.

[0037] As an optional example, the prompt word template is as follows: {CPCGS=For questions raised by customers, please refer to the following examples to disassemble and analyze them step by step, and finally summarize the processing results of all actions to generate the final answer: Question 1: I need a computing resource instance that can run a large model Z. Can it meet my needs? Thinking 1: The computing resources required for full parameter training, fine-tuning, and inference stages of large model Z at different precisions are different, so it is necessary to retrieve relevant answers separately for multiple situations. When full parameter training uses float32 (float32 is a data type, also known as single-precision floating point number, using 32 bits (4 bytes) to represent floating point numbers), the resource requirements are large, while bf16 (also known as BFloat16 or Brain Floats Point, 16-bit non-standard floating point number, is a digital format used for artificial intelligence and deep learning) is more economical. Fine-tuning is usually LoRA (Low Rank Adaption, a low-rank adaptation technology for fine-tuning large language models. LoRA fine-tunes the original model by training only low-rank matrices and then injecting these parameters into the original model) using bf16 or int8 (int8 is a data type, also known as an 8-bit signed integer). You can consider using bf16 or int8 in the inference stage.

[0038] Action 1: Retrieve the computing power required for full parameter training of large model Z. Retrieve the computing power required for fine-tuning of large model Z. Retrieve the computing power required for inference of large model Z.

[0039] Execution result 1: The large model Z full parameter training requires 98.96GB of video memory at float32 precision and 49.48GB of video memory at bf16 precision. When fine-tuning 25% of LoRA parameters, 30.7GB of video memory is required at bf16 precision and 23.28GB of video memory is required at int8 precision. In the inference state, 14.84GB of video memory is required at bf16 precision and 6.18GB of video memory is required at int8 precision.

[0040] Thinking 2: After obtaining the operating resource requirements, you need to query the currently available computing resources.

[0041] Action 2: Query the currently available computing resources.

[0042] Execution result 2: The current number of available GPU configuration information is as follows R=[{gpu name: A100 80GB, memorysize: 80, memory size unit: GB, available number: 24}; {gpu name: L40S 48GB, memory size: 48, memory size unit: GB, available number: 48}; {gpu name: RTX4090, memory size: 24, memory size unit: GB, available number: 96}]. Other configurations recommended are 64-core CPU, 256GB memory, and 2TB SSD.

[0043] Thinking 3: Integrate all the above information to generate user solutions.

[0044] Action 3: Summarize all execution results and generate answer text.

[0045] } Among them, gpu name indicates the name of the graphics processor, memory size indicates the memory capacity, memory size unit indicates the memory capacity unit, available number indicates the available amount, SSD (Solid State Disk or Solid State Drive) is a solid state drive. TB (Terabyte) is a unit of computer storage capacity.

[0046] In an embodiment of the present invention, the intelligent agent disassembles the first text data according to the prompt word template corresponding to the first text data, obtains multiple sub-texts to be processed, generates the to-be-processed thinking texts corresponding to each to-be-processed sub-text, determines the to-be-executed processing action corresponding to at least one to-be-processed thinking text, executes the to-be-executed processing action, obtains the processing result, and obtains the second text data according to the processing result. The second text data is the reply text for the first text data. Optionally, if the first text data input by the user is a question text for consulting computing power resource configuration, the question text is disassembled, analyzed, and finally summarized and summarized according to the prompt word template corresponding to the computing power resource configuration business to generate the final answer. If the first text data input by the user is a command text for operating the target computing power resource, the command text is disassembled according to the prompt word template corresponding to the computing power resource operation business, and the command text is mapped to at least one computing power resource atomic operation, thereby completing the computing power transaction operation expected by the user.

[0047] The output module 103 is configured to output the second text data.

[0048] The computing power resource service system provided by the embodiment of the present invention uses an intelligent agent to gradually infer the question text of the user input for consulting on the computing power resource configuration and / or the command text for operating the target computing power resources, to obtain the computing power resource configuration information corresponding to the question text and / or the execution result information corresponding to the command text, to provide the user with appropriate and diverse computing power resource choices, to achieve intelligent matching of user needs and automated operation of computing power resources, to effectively reduce the difficulty for users to select appropriate computing power resources, and to improve the efficiency of computing power resource configuration and the efficiency of computing power resource operation.

[0049] In an optional embodiment, the intelligent agent provided by the embodiment of the present invention sets different processing actions for different computing power resource transaction businesses.

[0050] For example, a retrieval enhancement generation action is set for the computing power resource configuration consulting business. The retrieval enhancement generation action is used to retrieve target knowledge related to computing power resource configuration from the knowledge base. Among them, the knowledge base includes a library composed of multiple documents, and the documents in the knowledge base include but are not limited to professional knowledge in the field of computing power trading and experience in estimating the usage of computing power resources for some commonly used computing models. For example, the parameters of model A are about 1.25GB, and Adam training under float32 precision requires 4.99GB of video memory (Adam is a commonly used optimization algorithm, especially suitable for training neural networks and deep learning models. It is an optimization algorithm for adaptive learning rate, which can dynamically adjust the learning rate according to the gradient information of different parameters to improve the efficiency and stability of training), inference requires 1.5GB of video memory, and LoRA requires 1.56GB of video memory when fine-tuning 2% parameters. Adam training under bf16 precision requires 2.5GB, inference requires 0.75GB, and LoRA requires 0.81GB when fine-tuning 2% parameters. Among them, the retrieval enhancement generation action includes information retrieval actions and text generation actions. In an optional embodiment, the computing power trading service system processes the retrieval augmented generation action based on the retrieval augmented generation framework (RAG). In RAG, information retrieval technology is first used to retrieve information related to the current context from a large-scale text library. The retrieved information can be related articles, knowledge base entries, or other forms of structured or unstructured data. For example, when a text generator model attempts to complete a text on a specific topic, RAG can retrieve related knowledge base entries or a document collection on a specific topic as input. The retrieved information will be encoded into a vector representation and provided to the text generator model together with the current context. The text generator model will then use the retrieved information and the current context to generate the next text unit. This generation process usually adopts a conditional generation model, in which the generator takes context information and retrieved information as input and predicts the probability distribution of the next text unit. The generated text unit may be a word, a phrase, or a complete sentence.

[0051] In an optional embodiment, the process of the agent 102 performing the retrieval enhancement generation action includes: calculating the semantic similarity between the retrieval statement indicated by the retrieval enhancement generation action and the knowledge in the preset knowledge base; determining the target knowledge related to the retrieval statement based on the semantic similarity, and the target knowledge is used as the processing result of performing the retrieval enhancement generation action. Among them, the semantic similarity between the retrieval statement and the knowledge document is determined based on the distance between the retrieval vector corresponding to the retrieval statement and the index vector of each knowledge document in the knowledge base. For example, the cosine similarity, Hamming distance, Euclidean distance, and Manhattan distance between the retrieval vector and the index vector are used as the semantic similarity between the retrieval statement and the knowledge document. Optionally, the preset knowledge base may include a vector database, which is used to store the index vectors of the knowledge document. The vector database can be used to store, index, and manage the massive vectors generated by deep neural network learning and other machine learning models, aiming to achieve efficient vector data management and query.

[0052] In an optional embodiment, the agent 102 performs the retrieval enhancement generation action using a dense retrieval framework. Figure 2B , the agent inputs the search sentence indicated by the search enhancement generation action into the Tokenizer of the base model, performs word segmentation on the search sentence, and obtains a search word sequence (for example, recorded as search word 1, search word 2, search word m, where m is an integer greater than 1). The search word sequence is input into the sentence vector model of the base model, the search words are vectorized, and the vectors corresponding to each search word are obtained (for example, recorded as vector 1, vector 2, vector m). The vectors corresponding to each search word are input into the multi-layer perceptron (MLP) network with a meanpooling layer to obtain the search vector corresponding to the search sentence. Then, the search vector corresponding to the search sentence is input into the vector database, and the vector search method (vector_search) is called to obtain several knowledge documents with the highest cosine similarity between the index vector and the search vector, and the several knowledge documents with the highest cosine similarity are combined into a document set, which is the retrieved target knowledge. The agent generates the second text data according to the prompt words in the prompt word template, such as "Through the search in the knowledge base, please answer the user's questions based on the following professional knowledge as background information".

[0053] In an optional embodiment, the computing power transaction service system also includes a construction module for constructing an index vector of a knowledge document.

[0054] Further optionally, the construction module is used to: filter the knowledge documents according to a preset filtering strategy; obtain the document word sequence and keyword sequence of the filtered knowledge documents; vectorize the document word sequence and keyword sequence respectively to obtain multiple document word vectors and multiple keyword vectors; and construct an index vector of the knowledge document based on the multiple document word vectors and multiple keyword vectors.

[0055] For example, the filtering strategy is used to filter out illegal characters in the knowledge document, such as vocabulary that does not conform to the rules, language characters that do not meet the requirements, and meaningless strings (such as uniform resource locators URLs). After filtering the knowledge document, the construction module slices the filtered indication document. If the length of the document segment obtained by slicing exceeds the threshold, the document segment is divided into blocks (each block has a maximum length of 512 characters, and the blocks are divided into sentences) to obtain multiple text blocks. The construction module inputs each text block into the Tokenizer of the base model to obtain a document word sequence, and inputs the document word sequence into the sentence vector model to obtain multiple document word vectors. At the same time, the keywords of the knowledge document are extracted to obtain a keyword sequence, and the keyword sequence is input into the sentence vector model to obtain multiple keyword vectors. The construction module constructs an index vector of the knowledge document based on multiple document word vectors and multiple keyword vectors. For example, the construction model uses a vector spliced ​​and integrated with multiple document word vectors and multiple keyword vectors as the index vector of the knowledge document. In an optional embodiment, the keywords of the knowledge document are extracted using a prompt word instruction for extracting keywords and a base model. When extracting keywords from a knowledge document, the entire knowledge document may be used as the text to be processed for keyword extraction, or the document fragments or document blocks obtained by segmentation may be used as the text to be processed for keyword extraction.

[0056] In an optional embodiment, the construction module may generate an index table according to the document word sequence, the keyword sequence, the document word vector and the keyword vector, and construct the index vector of the knowledge document according to the index table. As an optional example, the index table includes: fields = [ FieldSchema(name=``doc_id``, dtype=DataType.INT64, is primary=True) FieldSchema(name=``plain_text``, dtype=DataType.VarChar), FieldSchema(name=``embeddings``,dtype=DataType.FLOAT_VECTOR,dim=embedding_size) FieldSchema(name=``key_words``, dtype=DataType.VarChar), FieldSchema(name=``kembeddings``,dtype=DataType.FLOAT_VECTOR,dim=embedding_size) ] Among them, fields represents fields, FieldSchema is used to indicate the mode of the field, which indicates the table structure and ensures that each row of data conforms to the structure of the table. doc_id is the unique identification ID of the knowledge document and is the unique primary key value of a knowledge document in the vector database. plain_text is used to store the document word sequence of the knowledge document. key words is used to store the keyword sequence extracted from the knowledge document. embeddings is used to store the semantic representation vector (i.e. document word vector) of each document word in the knowledge document. Kembedding is used to store the semantic representation vector (i.e. keyword vector) of each keyword. dtype is an object that describes the data type of an element in an array. DataType is used to obtain the data type of the field. is primary=True, indicating that the field is primary. dim is used to indicate the dimension of the semantic representation vector, and embedding_size is the dimension of the model semantic vector, which is consistent with the dimension of the base model output vector. INT64 (64-bit integer data type), VarChar (variable length string), and FLOAT_VECTOR (floating point vector) are data types respectively.

[0057] The computing power trading service system provided by the embodiment of the present invention sets a search enhancement generation action for the computing power resource configuration consulting business, and provides the intelligent agent with professional knowledge and estimated experience in the field of computing power trading, so that the intelligent agent can provide users with more accurate answers based on the professional knowledge and estimated experience. When it is necessary to update the knowledge related to the computing power trading business, the solution provided by the embodiment of the present invention does not require retraining. It only needs to process the newly added vertical field-related business knowledge according to the aforementioned process and update it to the vector database. The intelligent agent can use the newly added knowledge to answer user-related questions through the search enhancement generation function in the subsequent operation process.

[0058] For another example, the embodiment of the present invention sets a variety of computing power resource atomic operations for computing power resource operation services. When the processing action to be executed is a computing power resource atomic operation, the intelligent agent executes the computing power resource atomic operation, obtains the operation result of the computing power resource atomic operation, and the operation result is used as the processing result of the processing action to be executed. Optionally, the computing power resource atomic operation is used to perform operations such as query, allocation, end of computing power service, restoration of service, and transaction settlement on computing power resources. Among them, the computing power query operation is used to obtain a snapshot of the currently available computing power resources. The computing power allocation operation is used to determine whether the number of currently available computing power resources is greater than or equal to the resource demand indicated by the computing power allocation operation. When the number of currently available computing power resources is greater than or equal to the resource demand, the available computing power resources are allocated to the user according to the resource demand, and the identification information of the available computing power resources allocated to the user is obtained. Optionally, the computing power allocation operation is also used to generate notification information when it is determined that the number of currently available computing power resources is less than the resource demand, and the notification information is used to indicate that the currently available computing power resources are insufficient. The computing power service end operation is used to stop the computing power resources indicated by the computing power service end operation. The computing power service recovery operation is used to restore the computing power resources indicated by the computing power service recovery operation. If the computing power resources indicated by the computing power recovery operation have not stopped service, the computing power service recovery operation will not affect the computing power resources. The transaction settlement operation is used to settle the computing power resources indicated by the computing power transaction settlement operation according to the preset settlement rules and determine the service fees corresponding to the computing power resources indicated by the computing power transaction settlement operation.

[0059] Therefore, when the processing action to be executed is an atomic operation of computing resources, the agent executes the atomic operation of computing resources and obtains the operation result of the atomic operation of computing resources. The operation result is used as the processing result of the processing action to be executed, including: When the computing power resource atomic operation includes a computing power query operation, the computing power query operation is performed to obtain a snapshot of the currently available computing power resources. The snapshot of the available computing power resources is the operation result of the computing power query operation. In the case where the computing power resource atomic operation includes a computing power allocation operation, performing the computing power allocation operation to determine whether the amount of currently available computing power resources is greater than or equal to the resource demand indicated by the computing power allocation operation; When the current number of available computing resources is greater than or equal to the resource demand, the available computing resources are allocated to the user according to the resource demand, and identification information of the available computing resources allocated to the user is obtained, where the identification information is the operation result of the computing power allocation operation; when the current number of available computing resources is less than the resource demand, notification information is generated, where the notification information is used to indicate that the current available computing resources are insufficient; When the computing power resource atomic operation includes a computing power service termination operation, the computing power service termination operation is executed to stop the computing power resource indicated by the computing power service termination operation; In the case where the computing power resource atomic operation includes a computing power service recovery operation, executing the computing power service recovery operation to restore the computing power resource indicated by the computing power service recovery operation to service; In the case where the atomic operation of computing power resources includes a computing power transaction settlement operation, the computing power resources indicated by the computing power transaction settlement operation are settled according to the preset settlement rules, and the service fees corresponding to the computing power resources indicated by the computing power transaction settlement operation are determined. The service fees are the operation results of the computing power transaction settlement operation.

[0060] The computing power trading service system provided by the embodiment of the present invention abstracts computing power resource operations into five different computing power resource atomic operations, and uses the ability of the intelligent agent thinking chain to map the command text input by the user into a sequence of computing power resource atomic operations, thereby completing the task submitted by the user to the system.

[0061] Figure 3 FIG. 2 shows a schematic diagram of the structure of a computing power trading service system provided by another embodiment of the present invention. Figure 3 As shown, the computing power trading service system 300 includes a receiving module 301, a tool management module 302, an intelligent agent 303 and an output module 304.

[0062] Among them, the receiving module 301 is used to receive first text data input by a user, and the first text data includes a question text for consulting computing power resource configuration and / or a command text for operating a target computing power resource.

[0063] The tool management module 302 is used to manage a preset tool set, which includes multiple tools that the agent 303 can call.

[0064] In an optional embodiment, the tools managed by the tool management module 302 are mainly divided into two categories: knowledge retrieval tools and computing resource operation tools. Specifically, the tools managed by the tool management module 302 include: search enhancement generation tools, computing power query tools, computing power allocation tools, computing power termination tools, computing power recovery tools, and computing power settlement tools.

[0065] Among them, the retrieval enhancement generation tool is used to perform the retrieval enhancement generation action and obtain the target knowledge related to the retrieval statement. For example, the retrieval enhancement generation tool is used to calculate the semantic similarity between the retrieval statement indicated by the retrieval enhancement generation action and the knowledge in the preset knowledge base; according to the semantic similarity, the target knowledge related to the retrieval statement is determined, and the target knowledge is used as the processing result of executing the retrieval enhancement generation action. Among them, the semantic similarity between the retrieval statement and the knowledge document is determined according to the distance between the retrieval vector corresponding to the retrieval statement and the index vector of each knowledge document in the knowledge base. Specifically, the retrieval enhancement generation tool inputs the retrieval statement indicated by the retrieval enhancement generation action into the Tokenizer of the base model, performs word segmentation on the retrieval statement, and obtains a retrieval word sequence. The retrieval word sequence is input into the sentence vector model of the base model, and the retrieval words are vectorized to obtain the vectors corresponding to each retrieval word. The vectors corresponding to each retrieval word are input into the multi-layer perceptron (MLP) network with meanpooling input to obtain the retrieval vector corresponding to the retrieval statement. Then, the search vector corresponding to the search statement is input into the vector database, and the vector search method (vector_search) is called to obtain several knowledge documents with the highest cosine similarity between the index vector and the search vector. Several knowledge documents with the highest cosine similarity constitute a document set. Finally, through RAG_Prompt = "By searching in the knowledge base, please answer the user's question based on the following professional knowledge as background information: splice with the document set to obtain the search enhanced context representation." The obtained search enhanced context representation is used as the target knowledge corresponding to the search statement.

[0066] The computing power query tool is used to perform a computing power query operation to obtain a snapshot of the currently available computing power resources. Optionally, the computing power query tool filters the currently available computing power resources according to the attributes indicated by the computing power query operation.

[0067] The computing power allocation tool is used to perform computing power allocation operations to determine whether the current number of available computing power resources is greater than or equal to the resource demand indicated by the computing power allocation operation; when the current number of available computing power resources is greater than or equal to the resource demand, the available computing power resources are allocated to the user according to the resource demand, and the identification information of the available computing power resources allocated to the user is obtained and returned; when the current number of available computing power resources is less than the resource demand, a notification message is generated and returned, and the notification message is used to indicate that the current number of available computing power resources is insufficient. Among them, the identification information of the available computing power resources allocated to the user may include the identifier and access credentials of the computing power instance container. The user accesses the computing power resources based on the identifier and access credentials of the computing power instance container.

[0068] The computing power termination tool is used to execute the computing power service termination operation, so that the computing power resources indicated by the computing power service termination operation stop the service.

[0069] The computing power recovery tool is used to perform computing power service recovery operations to restore the computing power resources indicated by the computing power service recovery operations.

[0070] The computing power settlement service is used to perform transaction settlement operations. According to the preset settlement rules, the computing power resources indicated by the computing power transaction settlement operation are settled, and the service fees corresponding to the computing power resources indicated by the computing power transaction settlement operation are determined.

[0071] When the agent 303 is initialized, the tool management module 302 initializes the name (tool name), natural language description (description) and interface (Application Programming Interface, API interface) of the managed tool as an instance of the corresponding tool, and packages it into a tool collection class and passes it to the agent. The agent determines whether to call the tool based on the natural language description of each tool. In an optional embodiment, the computing power trading service system implements the computing power resource operation tool call through Web services (web services refer to Web Services, which are platform-independent, low-coupled, self-contained, programmable global wide area network web-based applications). When the agent calls the tool, it will send a request to the computing power resource management system (reference Figure 8 )'s Web service. POST request and GET request are two HTTP (Hypertext Transfer Protocol) request methods. For example, when calling the computing power query tool, a GET request is sent to the computing power resource management system. When calling the computing power allocation tool, the computing power query tool is first called once to send a GET request to the computing power resource management system, and then a POST request is sent to the computing power resource management system to obtain the identification information of the available computing power resources allocated to the user. When calling the computing power termination tool, a POST request is sent to the computing power resource management system. When calling the computing power recovery tool, a POST request is sent to the computing power resource management system. When calling the computing power settlement tool, a POST request is sent to the computing power resource management system.

[0072] The intelligent agent 303 is used to disassemble the first text data according to the prompt word template corresponding to the first text data, obtain multiple sub-texts to be processed, generate the thinking texts to be processed corresponding to each sub-text to be processed, determine the processing action to be executed corresponding to at least one thinking text to be processed; call the target tool corresponding to the processing action to be executed in the tool management module 302, use the target tool to execute the processing action to be executed, obtain the execution result, and obtain the second text data according to the execution result. The second text data is the reply text to the first text data.

[0073] Optionally, the prompt word template is as follows: {CPCGS=For questions raised by customers, please refer to the following examples to disassemble and analyze them step by step, and finally summarize the processing results of all actions to generate the final answer: Question 1: I need a computing resource instance that can run a large model Z. Can it meet my needs? Consideration 1: The computing resources required for full parameter training, fine-tuning, and inference of a large model Z at different precisions are different, so it is necessary to search for relevant answers in different situations. When full parameter training uses float32, the resource demand is large, while bf16 is more economical. Fine-tuning usually uses bf16 or int8 for LoRA. In the inference stage, you can consider using bf16 or int8.

[0074] Action 1: Call the retrieval enhancement generation tool to retrieve the computing power resources required for full parameter training of large model Z, the computing power resources required for fine-tuning of large model Z, and the computing power resources required for inference of large model Z.

[0075] Execution result 1: The large model Z full parameter training requires 98.96GB of video memory at float32 precision and 49.48GB of video memory at bf16 precision. When fine-tuning 25% of LoRA parameters, 30.7GB of video memory is required at bf16 precision and 23.28GB of video memory is required at int8 precision. In the inference state, 14.84GB of video memory is required at bf16 precision and 6.18GB of video memory is required at int8 precision.

[0076] Thinking 2: After obtaining the operating resource requirements, you need to query the currently available computing resources.

[0077] Action 2: Call the computing power query tool and execute the computing power query operation to query the currently available computing power resources.

[0078] Execution result 2: The current number of available GPU configuration information is as follows R=[{gpu name: A100 80GB, memorysize: 80, memory size unit: GB, available number: 24}; {gpu name: L40S 48GB, memory size: 48, memory size unit: GB, available number: 48}; {gpu name: RTX4090, memory size: 24, memory size unit: GB, available number: 96}]. Other configurations recommended are 64-core CPU, 256GB memory, and 2TB SSD.

[0079] Thinking 3: Integrate all the above information to generate user solutions.

[0080] Action 3: Summarize all execution results and generate answer text.

[0081] } The output module 304 is configured to output the second text data.

[0082] The computing power trading service system provided by the embodiment of the present invention manages the tools that can be called by the intelligent agent in a unified manner through the tool management module, decoupling the intelligent agent from the tools. When it is necessary to maintain the tools, such as updating the tools or adding new tools, it is only necessary to update the tools managed by the tool management module, without modifying the intelligent agent, thereby reducing the maintenance cost and difficulty of the computing power trading service system.

[0083] Figure 4 FIG. 2 shows a schematic diagram of the structure of a computing power trading service system provided by another embodiment of the present invention. Figure 4 As shown, the computing power trading service system 400 includes a receiving module 401, a tool management module 402, an agent 403, a session memory module 404, an agent role definition module 405, and an output module 406. The receiving module 401, the tool management module 402, the agent 403, and the output module 406 can refer to Figure 1 and Figure 3 To avoid repetition, the present invention will not be described in detail in the embodiments shown.

[0084] The session memory module 404 is used to record the first text data, the second text data, the subtext to be processed, the thought text to be processed, the processing action to be executed, and the processing result. The session memory module 404 is used to store the history of the current session between the user and the computing power trading service system, such as the message content of the current session between the user and the agent, the role information of the message sender, the data output by the agent's intermediate reasoning process, and the target knowledge generated based on the knowledge base retrieval enhancement.

[0085] When the computing power trading service system receives the first session initiated by the user, it initializes the session memory module, for example, initializes the session memory module to the specified object, and the recording format of the session memory module uses the ChatML format. ChatML (Chat Markup Language) is a large language model interaction format standard that aims to provide a unified and standardized interaction paradigm for large language model applications. This format records the role identity of the message sender while recording the content of each message, making it easier for the intelligent agent to identify which requests are sent by the user and which are replies output by itself when recalling the memory. As an optional example, the content recorded by the session memory module is as follows: [ {``token``:``<im_start> ``},``User 1\n I want to fine-tune the Llama-2-4b model. Which computing resource combination should I choose? ``, {``token``:``<im_end> ``}, ``\n``, {``token``:``<im_start> ``}, ``System\n You need at least one computing instance with a 40GB or 48GB GPU. The current number of available nodes is xxxxx. ``, {``token``:``<im_end> ``} ] Among them, ``token``:``<im_start> ``and {``token``:``<im_end> The text between ``} indicates the start (start) and end (end) of the message content output by a role. User1 and system respectively represent the roles of the message sender. ``\n`` indicates a line break.

[0086] When the intelligent agent 403 performs step-by-step reasoning on the first text data input by the user, it also obtains the historical record of the user's current session from the session memory module 404, and uses the historical record of the current session as the context of the first text data; it performs step-by-step reasoning on the first text data by combining the historical record of the current session and the prompt word template corresponding to the first text data.

[0087] The agent role definition module 405 is used to manage the agent role information and the agent task information. The agent role information and the agent task information are used to initialize the agent.

[0088] The agent provided by the embodiment of the present invention is responsible for analyzing the computing power requirements of users, querying computing power resources that meet the requirements, and executing the computing power transaction operations expected by users. Therefore, the role of the agent can be a customer service robot that intelligently answers and analyzes user questions and executes the computing power transaction operations expected by customers. The agent role information is used to indicate that the role of the agent is a customer service robot and describe the functions of the customer service robot. The agent task information is used to define and describe the tasks of the agent. Optionally, the agent task information includes the definition and description information of the task, the selection of the planning reasoning mode, and the descriptive file of the application interface of the callable tool.

[0089] In this embodiment, an initialization agent prompt word is generated based on the agent role information and agent task information managed by the agent role definition module 405, the agent is initialized based on the initialization agent prompt word, and the initialization agent prompt word remains in the current session as a system prompt word until the current session ends.

[0090] As an optional example, the prompt words for initializing the agent include: You are a helpful intelligent customer service robot. You have professional knowledge in the fields of high-performance computing, scientific computing, and deep learning. You are familiar with the scale and number of parameters of common model applications in these fields and the demand for computing resources in these fields. Your task is to listen patiently and carefully to the questions that customers ask you about computing power applications, computing power queries, and computing power transactions, and answer the user's questions based on your professional knowledge.

[0091] The computing power trading service system provided by the embodiment of the present invention uses an intelligent agent to gradually infer the question text of the user's consulting computing power resource configuration and / or the command text of the target computing power resource operation, and obtains the computing power resource configuration information corresponding to the question text and / or the execution result information corresponding to the command text, so as to provide users with appropriate and diverse computing power resource selections, realize intelligent matching of user needs and automatic operation of computing power resources, effectively reduce the difficulty of users in selecting appropriate computing power resources, and improve the efficiency of computing power resource configuration and computing power resource operation. Specifically, the intelligent agent of the computing power trading service system of the embodiment of the present invention is constructed based on a base model with pre-trained model structure and parameters and configured in reasoning mode, and does not require additional training, thereby reducing costs.

[0092] Figure 5 The flowchart of the initialization process of the computing power trading service system provided by the embodiment of the present invention is shown. Figure 5 As shown, the process of initializing the computing power trading service system includes: Step S501: Initialize the agent: load the base model file, which includes the structure file and weight file of the base model, build the agent based on the base model, and configure the agent to run in the evaluation mode.

[0093] Step S502: Initialize the agent role definition module: load the agent role definition file, which includes the agent role information and the agent task information.

[0094] Step S503: Initialize the session memory module: initialize the session memory module as a specified object, and the recording format of the session memory module uses the ChatML format.

[0095] Step S504: Initialize the tool management module: define the name, descriptive file and API interface of each tool, instantiate it according to the name, descriptive file and API interface of the tool, package it into a tool collection class and register it to the intelligent agent, that is, register it as an intelligent agent tool.

[0096] Step S505: Load the knowledge base and determine whether there is an index vector corresponding to each knowledge document in the knowledge base.

[0097] Step S506: In the case where there is no vector index, an index vector is constructed and the index vector is stored in the knowledge base. Optionally, the index vector is written into a vector database and the vector database is also used as a knowledge base.

[0098] Figure 6 The following is a timing diagram of the computing power transaction service system provided by the embodiment of the present invention processing the computing power resource configuration consulting business. Figure 6 As shown in the figure, after the initialization of the computing power trading service system is completed, the user inputs a question, and the user input question is asynchronously updated to the session memory module. At the same time, the user question will also be input into the intelligent agent, requesting the intelligent agent to answer the question. After receiving the input question, the intelligent agent will internally execute the thought chain process, and then generate a call request for calling the retrieval enhancement generation tool. The retrieval enhancement generation tool uses the vector database and dense retrieval model to retrieve and return the top K relevant documents, format them, and form the tool call result to feed back to the intelligent agent. The intelligent agent generates an answer to the user's question based on the tool call result and returns it to the user, and at the same time asynchronously updates the generated answer to the session memory module.

[0099] Figure 7 The following is a timing diagram showing the processing of computing resource operation services by the computing power transaction service system provided by the embodiment of the present invention. Figure 7As shown in the figure, after the computing power trading service system is initialized, the user inputs a request to operate the computing power resources, and the user request is asynchronously updated to the session memory module. At the same time, the user request will also be input into the intelligent agent. After the intelligent agent receives the user request, it will form an understanding of the user operation through the internal execution thought chain process, map the user request to a computing power resource atomic operation sequence, call the corresponding computing power resource atomic operation tool, and execute the computing power resource atomic operation sequence. The intelligent agent generates an execution result feedback reply based on the returned result, and asynchronously updates the execution result feedback reply to the session memory module.

[0100] Figure 8 FIG. 1 shows a schematic diagram of the structure of a computing power trading platform provided by an embodiment of the present invention. Figure 8 As shown, the computing power trading platform 800 includes a computing power resource management system 801 and a computing power trading service system 802. The computing power resource management system 801 is coupled with the computing power trading service system 802. For example, the computing power resource management system 801 is coupled with the computing power trading service system 802 through an agreed API interface of a computing power resource atomic operation tool.

[0101] The computing power resource management system 801 is used to manage computing power resources. Optionally, the computing power resource management system 801 organizes and manages the resources of different computing power nodes and network clusters through blockchain technology, and in order to improve resource utilization efficiency, it uses smart contracts to efficiently organize computing resources to serve users.

[0102] The computing power trading service system 802 receives first text data input by a user, where the first text data includes a command text for operating a target computing power resource. The command text is reasoned step by step according to a prompt word template corresponding to the command text to operate the target computing power resource indicated by the command text, thereby obtaining execution result information corresponding to the command text.

[0103] Fig. 9 FIG. 1 is a flow chart showing a computing power transaction service method provided by an embodiment of the present invention. Fig. 9 As shown, the computing power transaction service method includes: Step S901: receiving first text data input by a user, where the first text data includes a question text for consulting computing resource configuration and / or a command text for operating a target computing resource; Step S902: According to the prompt word template corresponding to the first text data, the first text data is gradually inferred to obtain second text data, where the second text data includes computing resource configuration information corresponding to the question text and / or execution result information corresponding to the command text; wherein the preset prompt word template includes a question sample and a thinking chain reasoning logic corresponding to the question sample; Step S903: outputting the second text data.

[0104] The computing power trading service method provided by the embodiment of the present invention gradually infers the question text of the user input for consulting the computing power resource configuration and / or the command text for operating the target computing power resources, obtains the computing power resource configuration information corresponding to the question text and / or the execution result information corresponding to the command text, provides the user with appropriate and diverse computing power resource choices, realizes intelligent matching of user needs and automated operation of computing power resources, effectively reduces the difficulty of users selecting appropriate computing power resources, and improves the efficiency of computing power resource configuration and the efficiency of computing power resource operation.

[0105] Fig.10 FIG. 1 is a schematic diagram showing the structure of an electronic device according to an embodiment of the present invention. Fig.10 As shown, the electronic device includes: Processor 1001, communication interface 1002, memory 1003 and communication bus 1004, wherein processor 1001, communication interface 1002, memory 1003 communicate with each other via communication bus 1004. Memory 1003, used for storing computer programs; The processor 1001 is used to execute the program stored in the memory 1003, and implements the following steps: Receive first text data input by a user, where the first text data includes a question text for consulting computing resource configuration and / or a command text for operating a target computing resource; According to the prompt word template corresponding to the first text data, the first text data is gradually inferred to obtain second text data, wherein the second text data includes computing resource configuration information corresponding to the question text and / or execution result information corresponding to the command text; wherein the preset prompt word template includes a question sample and a thinking chain reasoning logic corresponding to the question sample; The second text data is output.

[0106] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0107] The communication interface is used for communication between the above terminal and other devices.

[0108] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0109] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0110] In another embodiment provided by the present invention, a computer-readable storage medium is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the computing power trading service method described in any of the above embodiments.

[0111] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the computing power trading service method described in any one of the above embodiments.

[0112] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0113] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A computing power trading service system, characterized in that: include: A receiving module, configured to receive first text data input by a user, wherein the first text data includes a question text for consulting computing power resource configuration and / or a command text for operating a target computing power resource; An intelligent agent, configured to perform step-by-step reasoning on the first text data according to a prompt word template corresponding to the first text data to obtain second text data, wherein the second text data includes computing resource configuration information corresponding to the question text and / or execution result information corresponding to the command text; wherein the prompt word template includes a question sample and a thinking chain reasoning logic corresponding to the question sample; An output module is used to output the second text data.

2. The system according to claim 1, characterized in that The agent is used to: According to the prompt word template corresponding to the first text data, the first text data is disassembled to obtain multiple sub-texts to be processed, and a to-be-processed thinking text corresponding to each of the to-be-processed sub-texts is generated. A to-be-executed processing action corresponding to at least one of the to-be-processed thinking texts is determined, and the to-be-executed processing action is executed to obtain a processing result. According to the processing result, the second text data is obtained.

3. The system according to claim 2, characterized in that The agent is used to: In the case where the processing action to be executed is a search enhancement generation action, calculating the semantic similarity between the search statement indicated by the search enhancement generation action and the knowledge documents in the preset knowledge base; According to the semantic similarity, target knowledge related to the search sentence is determined, and the target knowledge serves as the processing result.

4. The system according to claim 3, characterized in that The agent is used to: Obtaining a search vector corresponding to the search sentence indicated by the to-be-executed processing action; The semantic similarity between the search statement and the knowledge document is determined according to the distance between the search vector and the index vector of each knowledge document in the knowledge base.

5. The system according to claim 4, characterized in that The system also includes a building block for: Obtaining a document word sequence and a keyword sequence of the knowledge document; Vectorizing the document word sequence and the keyword sequence respectively to obtain multiple document word vectors and multiple keyword vectors; Based on the multiple document word vectors and the multiple keyword vectors, an index vector of the knowledge document is constructed.

6. The system according to claim 5, characterized in that The building blocks are used to: Filtering the knowledge document according to a preset filtering strategy; Obtain the document word sequence and keyword sequence of the filtered knowledge document.

7. The system according to claim 2, characterized in that The agent is used to: In the case where the processing action to be executed is an atomic operation of computing power resources, the atomic operation of computing power resources is executed, and an operation result of the atomic operation of computing power resources is obtained, and the operation result is used as the processing result.

8. The system according to claim 7, characterized in that The agent is used to: In the case where the computing power resource atomic operation includes a computing power query operation, the computing power query operation is executed to obtain a snapshot of the currently available computing power resources, and the snapshot of the available computing power resources is the operation result of the computing power query operation.

9. The system according to claim 7, characterized in that The agent is used to: In the case where the computing power resource atomic operation includes a computing power allocation operation, performing the computing power allocation operation to determine whether the amount of currently available computing power resources is greater than or equal to the resource demand indicated by the computing power allocation operation; When the number of currently available computing resources is greater than or equal to the resource demand, available computing resources are allocated to the user according to the resource demand, and identification information of the available computing resources allocated to the user is obtained, where the identification information is the operation result of the computing power allocation operation.

10. The system according to claim 7, characterized in that The agent is used to: In the case where the computing power resource atomic operation includes a computing power service termination operation, the computing power service termination operation is executed to stop the computing power resource indicated by the computing power service termination operation.

11. The system according to claim 7, characterized in that The agent is used to: In the case where the computing power resource atomic operation includes a computing power service recovery operation, the computing power service recovery operation is executed to enable the computing power resource indicated by the computing power service recovery operation to resume service.

12. The system according to claim 7, characterized in that The agent is used to: In the case where the computing power resource atomic operation includes a computing power transaction settlement operation, the computing power resources indicated by the computing power transaction settlement operation are settled according to the preset settlement rules, and the service fee corresponding to the computing power resources indicated by the computing power transaction settlement operation is determined, and the service fee is the operation result of the computing power transaction settlement operation.

13. The system according to any one of claims 2 to 12, characterized in that: The system also includes a tool management module for managing a preset tool set; The intelligent agent is also used to call a target tool corresponding to the processing action to be executed from a preset tool set, and use the target tool to execute the processing action to be executed.

14. The system according to claim 2, characterized in that The system further comprises a session memory module for recording the first text data, the second text data, the subtext to be processed, the thinking text to be processed, the processing action to be executed, and the processing result; The intelligent agent is also used to: obtain the historical record of the user's current session from the session memory module; and perform step-by-step reasoning on the first text data in combination with the historical record of the current session and the prompt word template corresponding to the first text data.

15. The system according to claim 1, characterized in that The system also includes an agent role definition module for managing agent role information and agent task information, and the agent role information and the agent task information are used to initialize the agent.

16. A computing power trading service method, characterized in that: include: Receive first text data input by a user, wherein the first text data includes a question text for consulting computing power resource configuration and / or a command text for operating a target computing power resource; According to the prompt word template corresponding to the first text data, the first text data is gradually inferred to obtain second text data, wherein the second text data includes computing resource configuration information corresponding to the question text and / or execution result information corresponding to the command text; wherein the prompt word template includes a question sample and a thinking chain reasoning logic corresponding to the question sample; The second text data is output.

17. A computing power trading platform, comprising a computing power resource management system and a computing power trading service system according to any one of claims 1 to 15; the computing power resource management system is coupled with the computing power trading service system; The computing power resource management system is used to manage computing power resources; The computing power trading service system receives first text data input by a user, wherein the first text data includes a command text for operating a target computing power resource, and performs step-by-step reasoning on the command text according to a prompt word template corresponding to the command text to operate the target computing power resource indicated by the command text, thereby obtaining execution result information corresponding to the command text.

18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to claim 16 are implemented.

19. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the steps of the method as claimed in claim 16 when executing the program stored in the memory.

20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 16 are implemented.

Citation Information

Patent Citations

  • Entity retrieval method and device, equipment and storage medium

    CN114117007A

  • Conversation method and device

    CN116561286A

  • Computing power transaction method, device and system, electronic equipment and storage medium

    CN117057921A

  • Resource demand analysis method and device, electronic equipment and storage medium

    CN117493530A

  • Large model resource allocation and transaction settlement method oriented to application calling

    CN117909078A

Cited By

  • Document analysis method and device based on computing power resources of intelligent computing center

    CN119206752A

  • Computing power demand analysis system and method thereof

    TWI928765B