Base station and network element fault analysis method and device based on large language model and RAG

By constructing a knowledge base of base station and network element faults, and using large language models and RAG for intent recognition and database querying, the problem of high cost and low efficiency in base station fault analysis is solved, achieving low-cost and efficient fault detection and early warning.

CN120956583APending Publication Date: 2025-11-14INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510534443.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing base station fault analysis methods are costly and inefficient, making it difficult to achieve efficient and low-cost base station and network element detection and early warning.

Method used

A base station and network element fault knowledge base is constructed using a large language model and RAG-based approach. SQL statements are generated through intent recognition and Prompt templates to query the database and perform fault analysis, including historical fault queries, real-time fault queries, fault root cause analysis, and solution generation.

Benefits of technology

It enables low-cost and efficient fault detection of base stations and network elements, reduces manpower and material resources consumption, and improves the efficiency and accuracy of fault analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956583A_ABST
    Figure CN120956583A_ABST
Patent Text Reader

Abstract

The invention discloses a base station and network element fault analysis method and device based on a large language model and an RAG, belongs to the technical field of communication, and aims to solve the technical problem of how to realize base station and network element detection and early warning with high efficiency and low cost. A base station fault and network element fault knowledge base is collected and made, the intention of a user to input questions is recognized, and different operations are carried out according to different intentions; for historical fault inquiry and real-time fault inquiry, Text2SQL is realized in an RAG mode, and a corresponding data table is inquired; for fault root cause analysis and solution generation, a Promt template is used to construct input, and a knowledge base is retrieved to generate a result and output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, specifically to a method and apparatus for base station and network element fault analysis based on large language models and RAG. Background Technology

[0002] Base station fault analysis is a crucial part of wireless communication network maintenance, primarily aimed at ensuring the stability and reliability of mobile communication networks. With the development of mobile internet and the increasing demand for high-quality communication services, the operational status of base stations, as a vital component of mobile communication networks, directly impacts users' communication experience and service quality.

[0003] Modern mobile communication networks are becoming increasingly complex, with different generations of technologies coexisting, including but not limited to 5G, 4G LTE, and 3G. Each generation of technology has its specific technical requirements and challenges, such as spectrum efficiency, coverage, and capacity management, which increases the difficulty of network management and troubleshooting. Natural environmental factors (such as severe weather), human sabotage (such as theft of base station equipment), and electromagnetic interference can also cause base station failures, requiring effective fault analysis methods to identify and resolve these issues.

[0004] Consumers are increasingly demanding higher data transmission speeds, connection stability, and service quality. Any network outage or performance degradation can lead to a poor user experience, which in turn affects the operator's brand image and service evaluation. Quickly and accurately locating and resolving base station faults can help operators reduce unnecessary maintenance costs, avoid economic losses caused by prolonged service interruptions, and optimize resource allocation.

[0005] Current base station fault analysis methods include the following:

[0006] (1) Physical inspection: Go directly to the base station site for on-site inspection and check whether the hardware equipment (such as antenna, RRU / BBU unit, power supply, etc.) is intact;

[0007] (2) Environmental assessment: Consider the impact of external factors on the base station, such as weather conditions, building obstruction or electromagnetic interference, etc.

[0008] (3) Alarm Logs: Base stations generate various types of alarm information. By analyzing these logs, the problem can be quickly located. For example, certain specific alarms may indicate hardware failure or configuration errors;

[0009] (4) Operation log: Records the operation history of the base station, which can help track operation steps or change events that may cause failure;

[0010] (5) KPI monitoring: Key performance indicators (KPIs), such as call drop rate, handover success rate, connection establishment time, etc., can reflect the overall health status of the base station.

[0011] (6) Real-time data analysis: Use the real-time data stream provided by the Network Management System (NMS) to monitor base station performance and detect abnormal fluctuations in a timely manner.

[0012] However, on-site inspections are costly and inefficient. Sending technicians to base stations for inspection is not only time-consuming but also increases manpower and material costs. For large-scale networks, inspecting each site one by one is neither practical nor efficient. Log analysis suffers from information overload; as the network scales, the amount of logs generated grows exponentially, making manual analysis of massive amounts of logs nearly impossible. Moreover, many alarms may be caused by temporary issues or non-critical factors, causing the real problems to be buried among a large number of irrelevant alarms.

[0013] How to efficiently and cost-effectively implement base station and network element detection and early warning is a technical problem that needs to be solved. Summary of the Invention

[0014] The technical objective of this invention is to address the above-mentioned shortcomings by providing a base station and network element fault analysis method and system based on large language models and RAG, in order to solve the technical problem of how to efficiently and cost-effectively achieve base station and network element detection and early warning.

[0015] In a first aspect, the present invention provides a base station and network element fault analysis method based on large language models and RAG, comprising the following steps:

[0016] Knowledge base construction: A base station network element knowledge base is constructed based on knowledge documents in the base station database and network element database and persisted locally; a fault knowledge base is constructed based on base station fault knowledge documents and network element fault knowledge documents and persisted locally.

[0017] Intent recognition: For user-input questions, intent recognition is performed using a preset Prompt template to obtain intent recognition results;

[0018] Fault Analysis: If the intent type in the intent recognition result is a historical fault inquiry, import it into the base station network element knowledge base, construct a query SQL statement using the historical fault query Prompt template, query the fault alarm table, and use the retrieved fault alarm results as the answer; if the intent type in the intent recognition result is a real-time fault inquiry, construct a query SQL statement using the real-time fault query Prompt template, query base station performance data, perform root cause classification based on the base station performance data, and use the root cause classification results as the answer; if the intent type in the intent recognition result is fault root cause classification, construct the input using the real-time fault query Prompt template, retrieve the fault knowledge base, and generate root cause analysis results; if the intent type in the intent recognition result is solution generation, construct the input using the solution generation Prompt template, retrieve the fault knowledge base, and generate a solution.

[0019] As a preferred approach, constructing a base station network element knowledge base includes the following steps:

[0020] For historical fault inquiries, the database tables related to base station and network element alarms stored in the network management system or operation support system are involved. For base stations, these include base station alarm record table, base station fault report table, base station information table, and maintenance log table. The base station alarm record table contains fields including alarm ID, base station ID, alarm type, occurrence time, recovery time, and severity. The base station fault report table contains fields including fault ID, base station ID, fault description, detection time, and repair time. The base station information table contains fields including base station ID, base station name, location, type, and current status. The base station maintenance log table contains fields including maintenance ID, base station ID, executed operation, operation time, and result.

[0021] For real-time fault inquiries, specific performance management database tables in the network management system are involved. For base stations, there are base station performance data tables and base station information tables. The base station performance data table contains fields such as base station ID, timestamp, uplink throughput, downlink throughput, number of connected users, CPU utilization, handover success rate, PRB utilization, and SINR. The base station information table contains fields such as base station ID, base station name, location, type, and current status.

[0022] To support the generation of SQL statements for both historical and real-time fault inquiries, we collect the table creation statements of base station and network element alarm-related database tables stored in the network management system or operation support system, as well as specific performance management database tables in the network management system.

[0023] When slicing knowledge documents, custom functions `split_text` and `split_documents` are used. In the `split_text` function, each document is split into several document slices according to the delimiter. Each document slice contains a complete table creation statement. In the `split_documents` function, the metadata of each document slice is assigned the corresponding table name. When searching and calling the base station metadata knowledge base, the metadata of the document is also output and displayed to inform the user who asked the question about the document content referenced in this Q&A. After processing the knowledge documents, a vector database is established and persisted locally.

[0024] As a preferred approach, constructing a fault knowledge base includes the following steps:

[0025] For root cause analysis and solution generation, knowledge documents and case documents are prepared respectively. The knowledge documents contain knowledge documents on base station faults and network element faults, and the case documents contain case documents on base station faults and network element faults.

[0026] The knowledge documents and case documents are sliced ​​and persisted locally to a vector database.

[0027] As a preferred embodiment, intent recognition includes the following steps:

[0028] For questions input by users, the intelligent agent identifies the user's intent, which includes historical fault inquiries, real-time fault inquiries, root cause analysis of faults, and solution generation.

[0029] After the user inputs a question, the question is merged with a preset Prompt template, and the merged result is input into the larger model.

[0030] The output of the large model is matched with intent using regular expressions. If the matching result belongs to one of the following categories: historical fault inquiry, real-time fault inquiry, fault root cause analysis, and solution generation, then subsequent processing and calculation are performed. If it does not belong to any of these categories, a prompt message is output.

[0031] As a preferred approach, during fault analysis, if the identified intent is a historical fault inquiry, the base station network element knowledge base is invoked, and the corresponding prompt template is used to construct prompt words. After constructing the prompt words, the prompt words are input into the large model to generate SQL, and then the data table is queried to output the query results.

[0032] As a preferred approach, during fault analysis, if the identified intent is a real-time fault inquiry, the base station network element knowledge base is invoked, and the corresponding Prompt template is used to construct prompt words. After constructing the prompt words, the prompt words are input into the large model to generate SQL predictions, and then the data table is queried to obtain the base station's performance data.

[0033] When querying the data table, the API interface of the root cause classification mini-model is called, and base station information and performance data are passed as parameters to the root cause classification model. The model returns the root cause classification results. For the root cause classification mini-model, the XGBoost classification model is selected. The training data includes fields such as uplink throughput, downlink throughput, number of connected users, CPU utilization, memory utilization, call drop rate, handover success rate, PRB utilization, SINR, and access failure rate, which are consistent with the prompt words. The label field of the training data is the name of various alarms. After the XGBoost classification model is trained, it is persisted locally. For the trained XGBoost classification model, a RESTful interface is established. The input parameter of the interface is a JSON, which contains base station performance data including uplink throughput, downlink throughput, and number of connected users. The return parameter of the interface is the name of the alarm, including LAPD alarm and VSWR alarm.

[0034] As a preferred approach, during fault analysis, if the identified intent is fault root cause analysis, fault knowledge base fragments are retrieved using the similarity_score_threshold method. The maximum number of retrieved fragments is set to 5, and the minimum similarity threshold is set to 0.5. Then, prompt words are constructed using the corresponding prompt template. After constructing the prompt words, they are input into the large model, and the large model outputs the root cause analysis results.

[0035] As a preferred approach, during fault analysis, if the identified intent is fault root cause analysis, fault knowledge base fragments are retrieved using the similarity_score_threshold method. The maximum number of retrieved fragments is set to 3, and the minimum similarity threshold is set to 0.7. The corresponding prompt template is used to construct prompt words. After constructing the prompt words, the prompt words are input into the large model, and the large model outputs the fault solution.

[0036] In a second aspect, the present invention provides an apparatus comprising: at least one memory and at least one processor;

[0037] The at least one memory is used to store a machine-readable program;

[0038] The at least one processor is configured to invoke the machine-readable program to execute any of the methods described in the first aspect.

[0039] The base station and network element fault analysis method and apparatus based on a large language model and RAG of the present invention have the following advantages: It collects and creates a knowledge base of base station and network element faults, identifies the intent of user input questions, and performs different operations for different intents; for historical and real-time fault inquiries, it uses RAG to implement Text2SQL and query the corresponding data tables; for fault root cause analysis and solution generation, it uses Promt templates to construct inputs, retrieves results from the knowledge base, and outputs the results; the entire process does not require fine-tuning of the large model, greatly saving manpower and financial resources for preparing training data and fine-tuning training, and enabling the implementation of a base station fault analysis intelligent agent with low resource consumption. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] The invention will be further described below with reference to the accompanying drawings.

[0042] Figure 1 This is a flowchart of a base station and network element fault analysis method based on a large language model and RAG, as shown in Example 1. Detailed Implementation

[0043] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0044] This invention provides a method and apparatus for base station and network element fault analysis based on large language models and RAG, which is used to solve the technical problem of how to efficiently and cost-effectively achieve base station and network element detection and early warning.

[0045] Example 1:

[0046] This invention provides a base station and network element fault analysis method based on a large language model and RAG, comprising three steps: knowledge base construction, intent recognition, and fault analysis.

[0047] Step S100 Knowledge Base Construction: Construct a base station network element knowledge base based on knowledge documents in the base station database and network element database, and persist it locally. Construct a fault knowledge base based on base station fault knowledge documents and network element fault knowledge documents, and persist it locally.

[0048] As a specific implementation of knowledge base construction, the construction of a base station network element knowledge base includes the following steps:

[0049] (1) For historical fault inquiries, it involves database tables related to base station and network element alarms stored in the network management system or operation support system. For base stations, it includes base station alarm record table, base station fault report table, base station information table and maintenance log table. The base station alarm record table includes fields such as alarm ID, base station ID, alarm type, occurrence time, recovery time and severity. The base station fault report table includes fields such as fault ID, base station ID, fault description, detection time and repair time. The base station information table includes fields such as base station ID, base station name, location, type and current status. The base station maintenance log table includes fields such as maintenance ID, base station ID, executed operation, operation time and result.

[0050] (2) For real-time fault inquiries, specific performance management database tables in the network management system are involved. For base stations, there are base station performance data tables and base station information tables. The base station performance data table contains fields including base station ID, timestamp, uplink throughput, downlink throughput, number of connected users, CPU utilization, handover success rate, PRB utilization and SINR. The base station information table contains fields including base station ID, base station name, location, type and current status.

[0051] (3) In order to support the generation of SQL statements for both historical fault inquiry and real-time fault inquiry, collect the database tables related to base station and network element alarms stored in the network management system or operation support system, as well as the table creation statements of specific performance management database tables in the network management system.

[0052] (4) When splitting knowledge documents, the custom functions split_text and split_documents are used. In the split_text function, each document is split into several document slices according to the delimiter. Each document slice contains a complete table creation statement. In the split_documents function, the metadata of each document slice is assigned the corresponding table name. When the base station metadata knowledge base is searched and called, the metadata of the document is output and displayed to inform the user who asked the question about the document content referenced in this Q&A. After the knowledge documents are processed, a vector database is established and persisted locally.

[0053] In this embodiment, taking the base station alarm record table as an example, Table 1 records the table structure of the base station alarm record table and the table creation statements. By writing the table creation statements of the relevant data tables into a Word document and adding a custom separator "----------" in the middle of each table creation statement, the knowledge document is completed.

[0054] Table 1. Base Station Alarm Record Table Structure

[0055]

[0056]

[0057] The statement for creating the base station alarm record table is as follows:

[0058] CREATE TABLE alarms(

[0059] alarm_id VARCHAR2(32)NOT NULL,

[0060] base_station_id VARCHAR2(255),

[0061] alarm_type VARCHAR2(255),

[0062] occurrence time DATE,

[0063] recovery time DATE

[0064] severity level VARCHAR2(255),

[0065] description VARCHAR2(255),

[0066] description VARCHAR2(255),

[0067] PRIMARY KEY(alarm_id) );

[0069] COMMENT ON TABLE alarms IS 'Base Station Alarm Record Table';

[0070] COMMENT ON COLUMN alarms.alarm_id IS'alarm ID';

[0071] COMMENT ON COLUMN alarms.base_station_id IS'base station ID';

[0072] COMMENTON COLUMN alarms.alarm_type_IS'alarm type';

[0073] COMMENTON COLUMN alarms.occurrence_time IS 'alarm occurrence time';

[0074] COMMENT ON COLUMN alarms.recovery_time IS 'alarm recovery time';

[0075] COMMENT ON COLUMN alarms.severity_level IS 'alarm severity';

[0076] COMMENT ON COLUMN alarms.description IS 'Alarm Description';

[0077] In this embodiment, custom `split_text` and `split_documents` functions are used to slice knowledge documents. The `split_text` function splits each document into several document slices according to the delimiter "----------". This ensures that each document slice contains a complete table creation statement, guaranteeing semantic integrity. The `split_documents` function assigns the corresponding table name to the metadata of each document slice. When retrieving data from the knowledge base, the document metadata can be output and displayed, informing the user who asked the question which documents were referenced in their answer. After processing the knowledge documents, a vector database can be built and persisted locally. The vector database uses the open-source Chroma, and the embedding model chosen is the bge-large-zh-v1.5 model. bge-large-zh-v1.5 is a Chinese embedding model developed by BAAI, which performs excellently in sentence similarity and text retrieval tasks, making it suitable as an embedding model for knowledge base retrieval.

[0078] Building a fault knowledge base includes the following steps:

[0079] (1) For root cause analysis and solution generation, prepare knowledge documents and case documents respectively. The knowledge documents contain base station fault knowledge documents and network element fault knowledge documents, and the case documents contain base station fault case documents and network element fault case documents.

[0080] (2) Slice the knowledge documents and case documents and persist them locally to a vector database.

[0081] In this embodiment, knowledge documents and case documents are prepared for root cause analysis and solution generation, respectively. The knowledge documents include base station fault knowledge documents and network element fault knowledge documents, while the case documents include base station fault case documents and network element fault case documents. Taking the base station alarm knowledge document as an example, it is necessary to collect the alarm name, possible causes, and handling suggestions. Adding a custom separator "----------" in the middle of each alarm completes the creation of the knowledge document. Taking the base station alarm case document as an example, it is necessary to collect the alarm name, phenomenon, analyzed cause, and troubleshooting cause. Adding a custom separator "----------" in the middle of each case completes the creation of the case document. The knowledge documents and case documents are sliced ​​and locally persisted into a vector database in the same way as the base station network element knowledge base construction.

[0082] The base station alarm knowledge document includes the following content:

[0083] LAPD Alert:

[0084] 1. Possible reasons:

[0085] (1) Abnormal transmission line connection.

[0086] (2) Data configuration error.

[0087] (3) Rack top connector failure (for BTS312 type racks).

[0088] (4) Base station hardware failure.

[0089] 2. Recommendations:

[0090] (1) Check relevant alarm information: Check whether the alarm console simultaneously reports local E1 alarms and whether there are any error codes;

[0091] (2) Check if the data configuration is correct, mainly checking whether the data configuration is consistent with the physical configuration. Also check if the matching connectors on the top of the rack are installed and intact.

[0092] (3) Replace the carrier frequency.

[0093] E1 local alarm:

[0094] 1. Possible reasons:

[0095] (1) Transmission line malfunction;

[0096] (2) The base station's DIP switch is faulty.

[0097] 2. Base station hardware failure

[0098] Recommended course of action:

[0099] (1) Check whether the transmission lines of this base station are normal;

[0100] (2) Check if the transmission line at the other end is normal;

[0101] (3) Check the DIP switch of the base station;

[0102] (4) Check the settings of DIP switches S1, S2, S10, and S11 on the TMU board. After correctly setting the DIP switches, observe whether the alarm is restored. Refer to the following instructions for setting the DIP switches:

[0103] S1: Matching impedance selection for the 3rd and 4th E1 interfaces: ON is 75 ohms impedance, OFF is 120 ohms impedance;

[0104] S2: Matching impedance selection for E1 interfaces 1 and 2, ON is 75 ohms impedance, OFF is 120 ohms impedance;

[0105] S10: Channels 1 and 2; S11: Channels 3 and 4. E1 transmission line housing grounding selection: ON for grounding, OFF for no grounding.

[0106] The base station alarm case document includes the following content:

[0107] 1. DDPU single-board communication alarm

[0108] Phenomenon: A certain base station is a BTS3012 macro base station, and the DDPUs of three cells have single-board communication alarms.

[0109] Analysis of the reasons:

[0110] (1) Hardware not installed;

[0111] (2) The base station's DIP switch is faulty;

[0112] (3) Base station hardware failure.

[0113] Troubleshooting: The DCSU board DIP switch was incorrect (the original DIP switches were S1-S5 set to 0FF, but they should have been set to 0N).

[0114] 2. CDU single-board communication alarm

[0115] Phenomenon: A base station is a BTS312, configured with S646, and the second CDU of the three cells has a single-board communication alarm.

[0116] Analysis of the reasons:

[0117] (1) Hardware not installed;

[0118] (2) The base station's DIP switch is faulty;

[0119] (3) Base station hardware failure;

[0120] (4) The matching head is faulty or not installed.

[0121] Cause of the problem: The misinstallation of the matching head caused a communication alarm to occur on the terminal board inside the cabinet.

[0122] Step S200 Intent Recognition: For the question input by the user, intent recognition is performed using a preset Prompt template to obtain the intent recognition result.

[0123] As a specific implementation of intent recognition, intent recognition includes the following steps:

[0124] (1) For questions input by users, the intelligent agent identifies the user's intent. The intent types include historical fault inquiries, real-time fault inquiries, fault root cause analysis, and solution generation.

[0125] (2) After the user inputs a question, the question is merged with the preset Prompt template, and the merged result is input into the large model;

[0126] (3) Use regular expressions to match the intent of the large model output. If the matching result belongs to one of the following: historical fault inquiry, real-time fault inquiry, fault root cause analysis and solution generation, then perform subsequent processing calculations. If it does not belong to any of these, then output a prompt.

[0127] In this embodiment, DeepSeek-R1-Distill-Qwen-32B is selected as the large model. The output of the large model is matched for intent using the regular expression (r'\{([^}]+)\}'). If the matching result belongs to one of the above intents, subsequent processing and calculation are performed; otherwise, the following message is output: "Sorry, I did not recognize your intent. Please rephrase your message. These are sample questions for your reference: Query the number of outages in Jinan City yesterday, How to resolve the xx alarm that occurred at xx base station, Analyze the cause of the xx alarm at xx base station."

[0128] The Promt template for intent recognition is as follows:

[0129] "You are an NLP expert. Based on the following descriptions of multiple intents, please ensure that the [input] in the question is mapped to one of the intents."

[0130] The intent categories are: historical fault inquiry | real-time fault inquiry | solution generation | root cause analysis.

[0131] The descriptions and keywords for each intent are as follows, where {} represents the intent name and () represents the keywords:

[0132] {Historical Fault Inquiry}: Analyze the main subject of the problem and query the data in the base station's historical database, including keywords (search, query, yesterday, last week, last month);

[0133] {Real-time Fault Inquiry}: Analyze the main subject of the problem and query data in the base station's historical database, including keywords (search, query, today, now);

[0134] {Solution Generation}: Analyzes the main entities involved in the problem and generates a solution, including keywords (generate solution, output solution, solve);

[0135] {Root Cause Analysis}: Analyze the causes of the phenomena mentioned in the problem, including keywords (root cause, reason, why);

[0136] Note that keyword matching is prioritized, and the reasoning process should not be output. Finally, output one of the intent categories mentioned above according to the structure in the example. Please strictly follow the structure in the example for output.

[0137] Example as follows:

[0138] [Input]: Query the number of outages in Jinan City yesterday.

[0139] [Output]: {Historical Fault Queries}

[0140] [Input]: How to resolve the xx alarm that occurred at xx base station.

[0141] [Output]: {Solution Generation}

[0142] [Input]: Analyze the cause of the xx alarm at xx base station.

[0143] [Output]: {Root Cause Analysis}

[0144] question:

[0145] [Input]: %s"""%(query).

[0146] Step S300 Fault Analysis: If the intent type in the intent recognition result is a historical fault inquiry, import the base station network element knowledge base, construct a query SQL statement using the Prompt template for historical fault queries, query the fault alarm table, and use the queried fault alarm results as the answer; if the intent type in the intent recognition result is a real-time fault inquiry, construct a query SQL statement using the Prompt template for real-time fault queries, query base station performance data, perform root cause classification based on the base station performance data, and use the root cause classification results as the answer; if the intent type in the intent recognition result is fault root cause classification, construct the input using the Prompt template for real-time fault queries, retrieve the fault knowledge base, and generate root cause analysis results; if the intent type in the intent recognition result is solution generation, construct the input using the Prompt template for solution generation, retrieve the fault knowledge base, and generate a solution.

[0147] In this embodiment, during fault analysis, if the identified intent is a historical fault inquiry, the base station network element knowledge base is called, and the corresponding prompt template is used to construct prompt words. After constructing the prompt words, the prompt words are input into the large model to generate SQL, and then the data table is queried to output the query results.

[0148] If the identified intent is a query about historical faults, the prompt template will construct the following prompt:

[0149]

[0150] During fault analysis, if the identified intent is a real-time fault inquiry, the base station network element knowledge base is called, and the corresponding Prompt template is used to construct prompt words. After constructing the prompt words, the prompt words are input into the large model to generate SQL predictions, and then the data table is queried to obtain the base station's performance data. When querying the data table, the API interface of the root cause classification mini-model is called, and base station information and performance data are passed as parameters to the root cause classification model. The model returns the root cause classification results. For the root cause classification mini-model, the XGBoost classification model is selected. The training data includes fields such as uplink throughput, downlink throughput, number of connected users, CPU utilization, memory utilization, call drop rate, handover success rate, PRB utilization, SINR, and access failure rate, which are consistent with the prompt words. The label field of the training data is the name of various alarms. After the XGBoost classification model is trained, it is persisted locally. For the trained XGBoost classification model, a RESTful interface is established. The input parameter of the interface is a JSON, which contains base station performance data including uplink throughput, downlink throughput, and number of connected users. The return parameter of the interface is the name of the alarm, including LAPD alarm and VSWR alarm.

[0151] In this embodiment, if the identified intent is a real-time fault inquiry, the knowledge base of the base station and network element database tables is retrieved first, limiting the maximum number of returned documents to 3. Then, the prompt text template of the above-mentioned historical fault query is used to construct prompt words. In this case, qusetion_class represents a real-time fault inquiry, and prompt_text represents the requirements for SQL generation, such as: "Please at least query the uplink throughput, downlink throughput, number of connected users, CPU utilization, memory utilization, call drop rate, handover success rate, PRB utilization, SINR, and access failure rate, etc., which can represent the performance of the base station."

[0152] After constructing the prompt words, the prompt words are input into the large model to generate SQL. Then, the Agent queries the data table to obtain the base station performance data. The Agent calls the API interface of the root cause classification small model, passing the base station information and performance data as parameters to the root cause classification model, which returns the root cause classification results. This paper pre-trains the root cause classification small model and persists it locally, then starts the service. For the root cause classification small model, this paper chooses the XGBoost classification model. The training data includes fields such as uplink throughput, downlink throughput, number of connected users, CPU utilization, memory utilization, call drop rate, handover success rate, PRB utilization, SINR, and access failure rate, which are consistent with the prompt words. The label field of the training data contains various alarm names, such as LAPD alarm and VSWR alarm, which are consistent with the alarm names in the base station alarm knowledge document. After the XGBoost classification model is trained, it is persisted locally. A RESTful interface is created, with the input parameter being a JSON object containing base station performance data such as uplink throughput, downlink throughput, and number of connected users. The return parameter of the interface is the name of the alarm, such as: LAPD alarm and VSWR alarm.

[0153] During fault analysis, if the identified intent is fault root cause analysis, fault knowledge base fragments are retrieved using the similarity_score_threshold method. The maximum number of retrieved fragments is set to 5, and the minimum similarity threshold is set to 0.5. Then, prompt words are constructed using the corresponding prompt template. After constructing the prompt words, the prompt words are input into the large model, and the large model outputs the root cause analysis results.

[0154] If the identified intent is root cause analysis, the first step is to recall knowledge base fragments using the `similarity_score_threshold` method, setting the maximum number of recalled fragments to 5 and the minimum similarity threshold to 0.5. Then, prompt terms are constructed using the `promt` template. `context` represents several retrieved knowledge base fragments, `qusetion_class` is for root cause analysis, and `promt_text` represents the requirements for SQL generation, such as: "Analyze the fault information mentioned in the question and output the possible causes of the fault; there can be multiple causes." After constructing the prompt terms, they are input into the main model, which outputs the root cause analysis results.

[0155] During fault analysis, if the identified intent is fault root cause analysis, fault knowledge base fragments are retrieved using the similarity_score_threshold method. The maximum number of retrieved fragments is set to 3, and the minimum similarity threshold is 0.7. The corresponding prompt template is used to construct prompt words. After constructing the prompt words, the prompt words are input into the large model, and the large model outputs the fault solution.

[0156] If the identified intent is root cause analysis, the first step is to recall knowledge base fragments using the `similarity_score_threshold` method, setting the maximum number of recalled fragments to 3 and the minimum similarity threshold to 0.7. Then, prompt terms are constructed using the `promt` template. `context` represents several retrieved knowledge base fragments, `qusetion_class` is now root cause analysis, and `promt_text` represents the requirements for SQL generation, such as: "Analyze the fault information mentioned in the problem, analyze the given case, generate and output the corresponding solution." After constructing the prompt terms, they are input into the large model, which outputs the solution to the fault.

[0157] The method in this embodiment first collects knowledge documents on base station faults and network element faults, as well as knowledge documents on base station databases and network element databases, and creates a knowledge base, which is then saved to a vector database and persisted locally. After preparation, the question-and-answer process can begin. When the user inputs a question, intent recognition is performed, which is divided into four types: historical fault inquiry, real-time fault inquiry, root cause analysis, and solution generation. For historical fault inquiries, the corresponding Promt template is used to construct the query SQL and query the fault alarm table. For real-time fault inquiries, the corresponding Promt template is used to construct the query SQL and query the base station performance data table. Then, the root cause classification API is called based on the base station performance data. For root cause analysis, the root cause analysis Promt template is used to construct the input, and the knowledge base is retrieved to generate the root cause analysis results. For solution generation, the solution generation Promt template is used to construct the input, and the knowledge base is retrieved to generate a solution. The answer is output to the customer, ending this round of question-and-answer.

[0158] Example 2:

[0159] This invention also provides an apparatus comprising: at least one memory and at least one processor; the at least one memory for storing a machine-readable program; and at least one processor for invoking the machine-readable program to execute the method disclosed in Embodiment 1.

[0160] The above provides a detailed description of the base station and network element fault analysis method and apparatus based on large language model and RAG provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for base station and network element fault analysis based on large language models and RAG, characterized in that, Includes the following steps: Knowledge base construction: A base station network element knowledge base is constructed based on knowledge documents in the base station database and network element database and persisted locally; a fault knowledge base is constructed based on base station fault knowledge documents and network element fault knowledge documents and persisted locally. Intent recognition: For user-input questions, intent recognition is performed using a preset Prompt template to obtain intent recognition results; Fault Analysis: If the intent type in the intent recognition result is historical fault inquiry, import it into the base station network element knowledge base, construct a query SQL statement through the Prompt template of historical fault query and query the fault alarm table, and make the query fault alarm result into an answer; If the intent type in the intent recognition result is real-time fault inquiry, construct a query SQL statement using the real-time fault query Prompt template and query the base station performance data, perform root cause classification based on the base station performance data, and use the root cause classification result as the answer. If the intent type in the intent recognition result is fault root cause classification, the input is constructed using the Prompt template of real-time fault query, and the fault knowledge base is retrieved to generate the root cause analysis result; if the intent type in the intent recognition result is solution generation, the input is constructed using the Prompt template of solution generation, and the fault knowledge base is retrieved to generate the solution.

2. The base station and network element fault analysis method based on large language model and RAG according to claim 1, characterized in that, Building a base station network element knowledge base includes the following steps: For historical fault inquiries, the database tables related to base station and network element alarms stored in the network management system or operation support system are involved. For base stations, these include base station alarm record table, base station fault report table, base station information table, and maintenance log table. The base station alarm record table contains fields including alarm ID, base station ID, alarm type, occurrence time, recovery time, and severity. The base station fault report table contains fields including fault ID, base station ID, fault description, detection time, and repair time. The base station information table contains fields including base station ID, base station name, location, type, and current status. The base station maintenance log table contains fields including maintenance ID, base station ID, executed operation, operation time, and result. For real-time fault inquiries, specific performance management database tables in the network management system are involved. For base stations, there are base station performance data tables and base station information tables. The base station performance data table contains fields such as base station ID, timestamp, uplink throughput, downlink throughput, number of connected users, CPU utilization, handover success rate, PRB utilization, and SINR. The base station information table contains fields such as base station ID, base station name, location, type, and current status. To support the generation of SQL statements for both historical and real-time fault inquiries, we collect the table creation statements of base station and network element alarm-related database tables stored in the network management system or operation support system, as well as specific performance management database tables in the network management system. When slicing knowledge documents, custom functions `split_text` and `split_documents` are used. In the `split_text` function, each document is split into several document slices according to the delimiter. Each document slice contains a complete table creation statement. In the `split_documents` function, the metadata of each document slice is assigned the corresponding table name. When searching and calling the base station metadata knowledge base, the metadata of the document is also output and displayed to inform the user who asked the question about the document content referenced in this Q&A. After processing the knowledge documents, a vector database is established and persisted locally.

3. The base station and network element fault analysis method based on large language model and RAG according to claim 1, characterized in that, Building a fault knowledge base includes the following steps: For root cause analysis and solution generation, knowledge documents and case documents are prepared respectively. The knowledge documents contain knowledge documents on base station faults and network element faults, and the case documents contain case documents on base station faults and network element faults. The knowledge documents and case documents are sliced ​​and persisted locally to a vector database.

4. The base station and network element fault analysis method based on large language model and RAG according to claim 1, characterized in that, Intent recognition includes the following steps: For questions input by users, the intelligent agent identifies the user's intent, which includes historical fault inquiries, real-time fault inquiries, root cause analysis of faults, and solution generation. After the user enters a question, the question is merged with a preset Prompt template, and the merged result is input into the large model. The output of the large model is matched with intent using regular expressions. If the matching result belongs to one of the following categories: historical fault inquiry, real-time fault inquiry, fault root cause analysis, and solution generation, then subsequent processing and calculation are performed. If it does not belong to any of these categories, a prompt message is output.

5. The base station and network element fault analysis method based on large language model and RAG according to claim 1, characterized in that, During fault analysis, if the identified intent is a real-time fault inquiry, the base station network element knowledge base is called, and the corresponding Prompt template is used to construct prompt words. After constructing the prompt words, the prompt words are input into the large model to generate SQL predictions, and then the data table is queried to obtain the base station performance data. When querying the data table, the API interface of the root cause classification mini-model is called, and base station information and performance data are passed as parameters to the root cause classification model. The model returns the root cause classification results. For the root cause classification mini-model, the XGBoost classification model is selected. The training data includes fields such as uplink throughput, downlink throughput, number of connected users, CPU utilization, memory utilization, call drop rate, handover success rate, PRB utilization, SINR, and access failure rate, which are consistent with the prompt words. The label field of the training data is the name of various alarms. After the XGBoost classification model is trained, it is persisted locally. For the trained XGBoost classification model, a RESTful interface is established. The input parameter of the interface is a JSON, which contains base station performance data including uplink throughput, downlink throughput, and number of connected users. The return parameter of the interface is the name of the alarm, including LAPD alarm and VSWR alarm.

6. The base station and network element fault analysis method based on large language model and RAG according to claim 1, characterized in that, During fault analysis, if the identified intent is fault root cause analysis, fault knowledge base fragments are retrieved using the similarity_score_threshold method. The maximum number of retrieved fragments is set to 5, and the minimum similarity threshold is set to 0.

5. Then, prompt words are constructed using the corresponding prompt template. After constructing the prompt words, the prompt words are input into the large model, and the large model outputs the root cause analysis results.

7. The base station and network element fault analysis method based on large language model and RAG according to claim 1, characterized in that, During fault analysis, if the identified intent is fault root cause analysis, fault knowledge base fragments are retrieved using the similarity_score_threshold method. The maximum number of retrieved fragments is set to 3, and the minimum similarity threshold is 0.

7. The corresponding prompt template is used to construct prompt words. After constructing the prompt words, the prompt words are input into the large model, and the large model outputs the fault solution.

8. An apparatus, characterized in that, include: At least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to perform the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Alarm studying and judging method and device, electronic equipment and computer readable storage medium

    CN121659108A