Intelligent question answering system construction method based on Shenwei platform
By building an intelligent question-and-answer system on the Shenwei platform, the problem of existing systems relying on non-domestic hardware and foreign technology has been solved, achieving system localization and improved security. By leveraging the high-performance characteristics of the Shenwei platform, the risk of information leakage has been reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-31
AI Technical Summary
Existing intelligent question-answering systems rely on non-domestic hardware and foreign core technologies, resulting in insufficient security, especially posing a risk of information leakage in critical information infrastructure.
The intelligent question-answering system is built using the Shenwei platform. By containerizing middleware, deploying AI application development software, installing Shenwei-compatible GPU cards and large language models on a domestic platform, and combining vectorization processing and retrieval enhancement generation technology, the entire process from the underlying hardware to the upper-layer application is made domestically, ensuring the system's security and controllability.
The localization of the intelligent question-and-answer system has been achieved, improving the system's security and stability, fully leveraging the high-performance advantages of the Shenwei platform, and reducing the risk of information leakage.
Smart Images

Figure CN121764524A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method for constructing an intelligent question-answering system based on the Shenwei platform. Background Technology
[0002] The industrialization of Shenwei processors continues to advance, playing a crucial role in various industries thanks to their domestic production and high-performance advantages. While the field of artificial intelligence is developing rapidly, the coverage of domestically produced solutions is insufficient. Intelligent question-answering systems based on artificial intelligence have not yet achieved full domestic production. Given the high performance and independent characteristics of the Shenwei approach, its promotion in the field of artificial intelligence is of great significance.
[0003] Most current intelligent question-answering platforms are deployed on x86 platforms, running on non-domestic hardware, which poses security risks to the underlying instruction set. Secondly, their core algorithm architecture relies on foreign technology, even using large foreign models and commercial software, and employing commercial inference models through API calls, thus lacking security in the model usage process. This is particularly problematic in applications involving critical national information infrastructure, where such system architectures pose significant risks of system vulnerabilities and data breaches.
[0004] Therefore, there is an urgent need for a more secure and reliable fully domestically produced intelligent question-answering system construction method to solve information security problems, while giving full play to the security, autonomy and high performance characteristics of the Shenwei platform to promote the application and promotion of the Shenwei approach in the field of artificial intelligence. Summary of the Invention
[0005] The purpose of this invention is to provide a method for constructing an intelligent question-answering system based on the Shenwei platform, in order to solve the problems of existing intelligent question-answering systems relying on non-domestic hardware and foreign core technologies, and insufficient security. This invention leverages the hardware architecture and high-performance computing capabilities of the Shenwei approach to achieve complete domestic production of the intelligent question-answering system from the underlying hardware to the upper-layer applications, ensuring the security, stability, and controllability of the system operation.
[0006] To address the aforementioned technical problems, this invention provides a method for constructing an intelligent question-answering system based on the Shenwei platform, comprising: Step 1: Containerize and run the relevant middleware in the container image of the domestic platform server, and confirm that the middleware is running normally; Step 2: Deploy the AI application development software in a containerized manner on a domestic platform, modify the configuration file in the AI application development software, and start the AI application development software by running the startup script; Step 3: Deploy the LLM large language model privately on a domestic platform server; Step 4: Open the AI application development platform on the web management terminal, create several local knowledge databases, and perform vectorization processing on the data, converting the text data into a numerical vector representation; Step 5: Design an intelligent question-answering system. This system will acquire user questions and answers through a user interface and analyze and respond to these questions and answers using a large-scale model. In step four, several local knowledge databases are created through the following steps: Data collection and preprocessing: collect high-quality knowledge base corpora and transform them into question-and-answer formats or unified standard formats; Create a new knowledge base, which consists of one or more knowledge vectors. Upload the preprocessed knowledge document, select the appropriate segmentation mode according to the document type to parse the document, and divide the document into smaller blocks. It incorporates retrieval enhancement generation technology, using Prompt prompts as guidance to effectively retrieve related information within the knowledge base and assist the model's reasoning process. The constructed professional knowledge base is used as the dataset for retrieval enhancement generation technology. The open-source bge-emnedding model is used as the model for retrieval enhancement generation technology. Document blocks are automatically input into the embedding model. The embedding model transforms natural language text into dense vectors in a high-dimensional vector space, generating the first vector data and storing it in the vector database.
[0007] In one implementation, in step one, the host machine used to run the middleware is a Shenwei server, and the relevant image is ported and deployed on the Shenwei platform server; the containerized component is a Shenwei platform-specific version, the middleware is a ported version of the Shenwei platform, and the middleware is confirmed to be working properly by running the test script that comes with the middleware script.
[0008] In one implementation, in step two, the configuration file is a customized version of the Shenwei architecture. The configuration file includes the call address of the model and other parameters, and is modified according to the characteristics of the Shenwei architecture.
[0009] In one implementation, in step three, the GPU card used to deploy the LLM large model is a GPU card adapted to the Shenwei platform. The driver files that support the Shenwei architecture are replaced, the driver is installed on the Shenwei platform server, the relevant Shenwei architecture script files are run in the driver file path, the large model image file is mounted on the server disk, the model startup command is run to start the model, and the interface that can be accessed by the model is exposed to the outside world.
[0010] In one implementation, step five, designing the intelligent question-answering system, includes: The user input question query is obtained through the front-end dialog window. The user input question query is vectorized through the embedding model to generate second vector data and stored in the vector database. Calculate the cosine similarity between the question vector and the knowledge vector in the knowledge base. Sort the knowledge vectors according to the matching similarity from high to low. Obtain the first vector data that is closest to the second vector data in the vector database. Return the text blocks corresponding to the texts of the first k knowledge vectors. The text corresponding to k knowledge vectors and the input question are fed into the Deepseek large model to build a prompt template. This prompt template is then fed into the Deepseek large model, where it is used for reasoning, analysis, and summarization through an LLM large language model to generate the final answer. Furthermore, if the question exceeds the scope of the knowledge base, the model is prohibited from automatically generating an answer to avoid misleading the user. The output obtained from the reasoning is sent to the front-end page and displayed to the user.
[0011] In one implementation, step five, the intelligent question-answering system includes: The retrieval enhancement generation technology module is used to create several knowledge bases, and to vectorize the data in the knowledge bases, converting text data into numerical vector representations. The user interaction module obtains user demand data and returns model-generated answers through the user interaction interface. The large model module contains role positioning guidance words, ability positioning guidance words, task objectives, and output requirements. The guidance data and vector representations are input into the large model to obtain the output data.
[0012] This invention provides a method for building an intelligent question-answering system based on the Shenwei platform. It utilizes open-source AI application development software, modifies the underlying code through customized development, and ports the software to the Shenwei platform. Modifications to the software's peripheral middleware and deployment scripts enable the entire platform to run on the Shenwei platform's domestic server platform. Through secondary development of the AI application software, the high performance and strong security features of the Shenwei platform can be fully utilized. Attached Figure Description
[0013] Figure 1 This is a schematic diagram of a method for constructing an intelligent question-answering system based on the Shenwei platform provided by the present invention. Detailed Implementation
[0014] The following detailed description, in conjunction with the accompanying drawings and specific embodiments, provides a more detailed explanation of the intelligent question-answering system construction method based on the Shenwei platform proposed in this invention. The advantages and features of this invention will become clearer from the following description. It should be noted that the accompanying drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of this invention.
[0015] like Figure 1 As shown, this invention provides a method for constructing an intelligent question-answering system based on the Shenwei platform, specifically including the following steps: Step 1: Port and deploy the relevant images on the Shenwei platform server, containerize and run the relevant middleware services in the Shenwei platform's container image engine, and confirm that the middleware is working properly by running the test scripts that come with the middleware scripts. Step 2: Port and deploy AI application development software and its components on the Shenwei platform. The porting process involves compiling and installing various software packages such as SecretStorage-3.3.3, rust-1.8.0, maturin, cryptography44.0.2, poetry, and rpds-py on the Shenwei platform server, and adding Shenwei architecture information during the compilation of various open source software packages. Step 3: Modify the configuration file in the Shenwei platform container configuration file, add the calling address of the model and other parameters to the configuration file, modify the configuration file according to the characteristics of the Shenwei architecture, and run the script to start the main service of the AI application development software; Step 4: Install the GPU card driver on the Shenwei platform server, run the relevant Shenwei architecture script file in the driver file path, mount the large model image file on the server disk, run the model startup command to start the model, and expose the interface for accessing the model to the outside world. Step 5: Open the AI application software web interface on the web management terminal, import the model according to the model running path and interface number. After the model is imported, the model name will be displayed on the web main interface. You can use the web interface to view the model and adjust its detailed rule parameters. Step Six: Access the Shenwei server application via the web on the client side, and build an intelligent question answering system in the application system. The system includes: RAG (Retrieval Augmented Generation) module, user interaction module, and large model module.
[0016] The RAG module is used to create several knowledge bases, and to vectorize the data in the knowledge bases, converting text data into numerical vector representations. The user interaction module obtains user demand data and returns model-generated answers through the user interaction interface; The large model module includes role positioning guidance words, ability positioning guidance words, task objectives, and output requirements; the guidance data and vector representations are input into the large model to obtain the output data.
[0017] This invention provides a method for constructing an intelligent question-answering system based on the Shenwei platform. The process includes: the server is a Shenwei platform server equipped with a Shenwei chip, the chip model of which is Shenwei H8000, and it is pre-installed with the domestic operating system SWOS1.3.0. The middleware and LLM large model of the entire software system are deployed on the Shenwei platform through scripts that have been modified for the Shenwei platform, and the WEB management page is configured.
[0018] This invention ports the open-source AI application development platform to the Shenwei platform, and fully covers all components of the software for secondary development of scripts, database software, middleware, and container images. In actual use, the server can be a Shenwei platform server, a Shenwei platform virtual machine, or a Shenwei container environment.
[0019] This invention is based on an open-source AI application development platform. By customizing and modifying its underlying code, the software is ported to the Shenwei platform. Modifications to its components and deployment scripts further enable the entire platform to run on the Shenwei platform's domestically developed server platform. The intelligent question-answering system built using this method can fully leverage the high performance and strong security features of the Shenwei platform.
[0020] The above description is merely a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure shall fall within the protection scope of the claims.
Claims
1. A method for constructing an intelligent question-answering system based on a Sunway platform, characterized in that, Comprise: Step one: in the container image of the Sunway platform server, containerized running related middleware, and confirming the normal operation of the middleware; Step two: containerized deployment of AI application development software in the Sunway platform, modify the configuration file in the configuration file of the AI application development software, and start the AI application development software by running the startup script; Step three: private deployment of LLM large language model in Sunway platform server; Step four: open the AI application development platform in the WEB management end, create several local knowledge databases, and perform vectorization processing on the data to convert the text form data into numerical vector representation; Step five: design an intelligent question and answer system, obtain the user's question and answer content through the user interaction interface, and analyze and answer the question and answer content through the large model; wherein, In step four, several local knowledge databases are created by the following steps: Data collection and preprocessing, collect high-quality knowledge base corpus and convert it into question and answer format or unified standard format; New knowledge base, the knowledge base is composed of more than one knowledge vector, upload the preprocessed knowledge document, select the appropriate segmentation mode according to the document type to parse the document, and cut the document into smaller blocks; Integrate retrieval enhancement generation technology, use Prompt prompt as a guide to effectively retrieve related information in the knowledge base and assist model reasoning process; Use the constructed professional knowledge base as the retrieval enhancement generation technology dataset, use the open source bge-emnedding model as the retrieval enhancement generation technology model, input the document block into the embedding model automatically, the embedding model converts natural language text into dense vectors in high-dimensional vector space, generates first vector data and stores it in the vector database.
2. The method of claim 1, wherein the method is based on a Sunway platform. In step one, the host machine for running middleware is Sunway server, and the related image is transplanted and deployed in Sunway platform server; The containerized component is a special version for Sunway platform, the middleware is a transplanted version for Sunway platform, and the test script of the middleware script is run to confirm the normal work of the middleware.
3. The method of claim 1, wherein the method is based on a Sunway platform. In step two, the running configuration file is a customized version for Sunway architecture, the calling address of the model and other parameters are added in the configuration file, and the configuration file is modified according to the characteristics of Sunway architecture.
4. The Shenwei platform-based intelligent question answering system construction method of claim 1, wherein, In step three, the GPU card used to deploy LLM large model is the GPU card adapted to Sunway platform, replace the part of the driver file supporting Sunway architecture, complete the driver installation on Sunway platform server, run the related Sunway architecture script file in the driver file path, mount the large model image file in the server disk, run the model startup command to start the model, and expose the interface for accessing the model to the outside.
5. The Shenwei platform-based intelligent question answering system construction method of claim 1, wherein, In step five, the steps of designing an intelligent question and answer system include: Use the front-end dialogue window to obtain user input question query, convert the user input question query into second vector data through embedding model vectorization and store it in vector database; The cosine similarity of the problem vector and the knowledge vector of the knowledge base is calculated, the knowledge vectors are sorted according to the matching similarity from high to low, the first vector data closest to the matching degree of the second vector data is obtained in the vector database, and the text corresponding to the first k knowledge vectors is returned. The k knowledge vectors corresponding to the text and the input question are input into the deepseek large model, a prompt template is constructed, which is input into the deepseek large model, and inference analysis and summary are performed through the LLM large language model to generate a final answer, and if the question is beyond the scope of the knowledge base, the model is prohibited from automatically generating an answer to mislead the user. The output content obtained by reasoning is transmitted to the front-end page and displayed to the user.
6. The Shenwei platform-based intelligent question and answer system construction method of claim 5, wherein, The intelligent question and answer system includes: A retrieval enhancement generation technology module is used to create a plurality of knowledge bases, vectorize the data in the knowledge bases, and convert the text form data into numerical vector representation; A user interaction module acquires user demand data and returns the answer generated by the model through a user interaction interface; A large model module includes role positioning guide words, capability positioning guide words, task targets and output requirements, and inputs the guide data and vector representation into the large model to obtain output data.