Intelligent number asking method and device for communication operator and storage medium
By constructing a knowledge graph and large language model for multi-source heterogeneous data, the problems of high business threshold, inaccurate semantic understanding, lack of context, difficulty in dynamic adaptation, weak security control, and difficulty in interpreting results in data query and analysis for telecommunications operators have been solved, thus realizing intelligent data insight and efficient business decision-making.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNICOM (SHANGHAI) IND INTERNET CO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-24
AI Technical Summary
Telecommunications operators face challenges in data querying and analysis, including high business thresholds, inaccurate semantic understanding, lack of context, difficulty in dynamic adaptation, weak security control, and difficulty in interpreting results. Existing technologies cannot effectively solve these problems.
By constructing a knowledge graph based on multi-source heterogeneous data for entity linking, and combining an intent classifier and a large language model, SQL statements are generated and validated to achieve accurate conversion of natural language questions into structured queries, supporting intelligent data insights for scenarios such as network operation and maintenance, marketing, and customer service.
It improves the ease of use, accuracy, adaptability, and security of data queries, reduces operating costs, and supports the efficient execution of business decisions.
Smart Images

Figure CN121919239A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and big data technology, and in particular to an intelligent data query method, device and storage medium for telecommunications operators. Background Technology
[0002] Currently, telecommunications operators primarily rely on the following technologies for data querying and analysis: (1) Traditional BI (Business Intelligence) tools: Based on predefined reports and dashboards, users obtain data by dragging and dropping dimension metrics or writing SQL statements. Typical systems include Tableau, Power BI, and data portals developed by telecom operators.
[0003] (2) Pure large language model solution: directly use general large models such as DeepSeek and Wenxin Yiyan to perform Text2SQL, and implement natural language query through the Prompt project.
[0004] (3) Simple knowledge graph application: Construct a term dictionary or static ontology in the field of communication to assist in the identification of query intent, but deep collaboration with large models has not been achieved.
[0005] The applicant found the following drawbacks in the existing technology: (1) High business threshold: Communication data involves three major areas: B domain (business), O domain (network), and M domain (management), and includes a large number of standard indicators (such as DOU, MOU, ARPU) and technical terms (such as PDCP layer packet loss rate, TA anomaly rate). Traditional BI requires users to be proficient in data dictionaries and SQL, which ordinary business personnel cannot use directly.
[0006] (2) Inaccurate semantic understanding: The general NL2SQL model lacks knowledge of the telecommunications industry and cannot recognize telecommunications-specific expressions. For example, when a user asks "the ratio of high-value users who have switched from 5G to 4G in the past week", the model cannot understand business semantics such as "high-value users" (ARPU>300 yuan and online for more than 6 months) and "networking ratio" (5G dwell time / total online time), resulting in low accuracy.
[0007] (3) Missing context: Communication analysis has strong context dependencies. For example, "comparing the DOU of top packages" requires implicit association with the province permissions of the currently logged-in user, the analysis time period (the package change period is the calendar month), and the definition of top packages (the top 10 best-selling packages in the region). Pure large model solutions cannot understand these business constraints and often generate SQL queries that exceed the authority of other provinces or have incorrect time granularity.
[0008] (4) Poor real-time and dynamic performance: The communication network structure changes dynamically (such as base station cutover and frequency band adjustment), and business rules are frequently updated (such as marketing activity rules and tariff strategies). Static knowledge graphs cannot perceive real-time changes, resulting in query results being out of touch with the actual network.
[0009] (5) Lack of security and access control: Communication data involves user privacy and corporate secrets. Existing solutions are unable to achieve fine-grained access control based on roles (network administrator / city manager / customer service representative), data domains (B domain / O domain), and line levels (province / city / grid), which poses a risk of data leakage.
[0010] (6) The "last mile" problem: Even if the SQL is correct, the query results still need to be manually interpreted. For example, after querying "base station outage caused user churn" and returning the raw data, business personnel need to determine the "churn" criteria themselves (no data traffic for 3 consecutive days and call duration <1 minute). The general solution cannot provide a closed business loop. Summary of the Invention
[0011] This invention provides an intelligent data query method, device, and storage medium for telecommunications operators, enabling accurate conversion from natural language questions to structured query statements, and supporting intelligent data insights in scenarios such as network operation and maintenance, marketing, customer service, and business analysis.
[0012] According to one aspect of the present invention, a smart data query method for telecommunications operators is provided, comprising: The process involves acquiring a problem to be processed, performing entity linking based on a pre-built knowledge graph, and obtaining a target subgraph matching the problem. The knowledge graph is constructed based on multi-source heterogeneous data corresponding to telecommunications operators. The intent classifier determines the intent category of the question to be processed, and based on the question to be processed, the target subgraph, and the intent category, similar historical query questions are retrieved in the knowledge graph, and SQL skeleton templates of similar historical query questions are extracted. Based on the problem to be processed, the target subgraph, and the SQL skeleton template, prompt information is constructed, and the target large model is prompted to output the candidate SQL corresponding to the problem to be processed. The candidate SQL is validated, and the validated candidate SQL is used as the target SQL. The target result corresponding to the problem to be processed is obtained by querying the target SQL.
[0013] According to another aspect of the present invention, a smart data query device for telecommunications operators is provided, comprising: The entity linking module is used to acquire the problem to be processed, and perform entity linking on the problem to be processed based on a pre-built knowledge graph to obtain a target subgraph matching the problem to be processed; wherein, the knowledge graph is constructed based on multi-source heterogeneous data corresponding to communication operators; The intent classification and template extraction module is used to determine the intent category of the question to be processed through an intent classifier, and based on the question to be processed, the target subgraph and the intent category, to retrieve similar historical query questions in the knowledge graph, and to extract the SQL skeleton template of the historical query questions; The prompt construction and SQL generation module is used to construct prompt information based on the problem to be processed, the target subgraph and the SQL skeleton template, so as to prompt the target large model to output the candidate SQL corresponding to the problem to be processed based on the prompt information; The SQL validation and execution module is used to validate the candidate SQL, take the validated candidate SQL as the target SQL, and obtain the target result corresponding to the problem to be processed by querying the target SQL.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and memory that is communicatively connected to at least one processor; The memory stores a computer program that can be executed by at least one processor, which enables the at least one processor to execute the intelligent query method for communication operators according to any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement a smart query method for communication operators according to any embodiment of the present invention.
[0016] The technical solution of this invention addresses six core problems faced by telecommunications operators in data querying and analysis: high business thresholds, inaccurate semantic understanding, missing context, difficulty in dynamic adaptation, weak security control, and difficulty in interpreting results. The knowledge graph is constructed based on multi-source heterogeneous data corresponding to telecommunications operators. An intent classifier determines the intent category of the problem, and based on the problem, target subgraph, and intent category, similar historical query questions are retrieved from the knowledge graph, along with their SQL skeleton templates. Hint information is constructed based on the problem, target subgraph, and SQL skeleton templates, prompting the target model to output candidate SQL statements corresponding to the problem. The candidate SQL statements are validated, and the validated ones are used as the target SQL. The target result corresponding to the problem is obtained through querying the target SQL. This solution addresses six core problems faced by telecommunications operators in data querying and analysis: high business thresholds, inaccurate semantic understanding, lack of context, difficulty in dynamic adaptation, weak security control, and difficulty in interpreting results. It not only breaks through the barrier of traditional queries relying on professional SQL skills, but also makes up for the shortcomings of semantic understanding and contextual support by using knowledge graph entity links and intent classification. Furthermore, it achieves dynamic business adaptation by relying on domain fine-tuning large models and SQL skeleton templates, strengthens security control by combining permission constraint injection and multi-verification, and reduces the difficulty of result interpretation by precise SQL generation and target result output. Ultimately, it has achieved the beneficial effect of comprehensively improving the ease of use, accuracy, adaptability and security of intelligent data query for telecommunications operators, efficiently supporting business decision-making and reducing operating costs.
[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0019] Figure 1 A flowchart illustrating an intelligent data query method for telecommunications operators, provided as an embodiment of the present invention; Figure 2 A flowchart illustrating another intelligent data query method for telecommunications operators provided in an embodiment of the present invention; Figure 3 A flowchart illustrating a preferred intelligent data query method for telecommunications operators, provided as an embodiment of the present invention; Figure 4A schematic diagram of the structure of an intelligent data query device for telecommunications operators provided in an embodiment of the present invention; Figure 5 A schematic diagram of the structure of an electronic device for implementing the intelligent data query method for telecommunications operators according to an embodiment of the present invention. Detailed Implementation
[0020] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0022] It should also be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in this disclosed technical solution all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security.
[0023] Figure 1 This is a flowchart illustrating an intelligent data collection method for telecommunications operators, provided as an embodiment of the present invention. This embodiment is applicable to data analysis and business decision-making scenarios for telecommunications operators. The method can be executed by an intelligent data collection device for telecommunications operators, which can be implemented in hardware and / or software and can be configured in a computer device. Figure 1 As shown, the method specifically includes the following steps: S110. Obtain the problem to be processed, and perform entity linking on the problem to be processed based on the pre-built knowledge graph to obtain the target subgraph matching the problem to be processed.
[0024] The problem to be processed can be a natural language question raised by a user based on a communication operation scenario. This natural language question requires an SQL query to obtain the data needed to answer it. The knowledge graph can be constructed based on multi-source heterogeneous data corresponding to communication operators, and it integrates entity, relationship, and attribute information from the communication domain. The target subgraph can be the part of the knowledge graph related to the problem to be processed.
[0025] Specifically, it can receive user input of a problem to be processed, and use a pre-built knowledge graph to link entities of the technical terms in the problem to be processed; specifically, it can match the technical terms in the problem to be processed with entities in the knowledge graph, and determine the target subgraph that matches the problem to be processed based on the matching results.
[0026] In some implementations, knowledge graphs can be constructed in the following ways: Multi-source heterogeneous data from telecommunications operators is acquired in advance. Metadata parsing is performed on the multi-source heterogeneous data. Based on the parsed metadata, entities are extracted and assigned attributes through field matching and log mining. Entity relationships are constructed based on primary and foreign keys and spatial associations in the metadata. A graph schema corresponding to the knowledge graph is designed, and entities, entity relationships and attributes are structured and organized based on the graph schema to obtain the knowledge graph.
[0027] Among them, multi-source heterogeneous data includes at least one of the following: B-domain data from the enterprise data warehouse, O-domain data from the big data platform, and M-domain data from the CRM system.
[0028] B-domain data can be data related to the business support system, including but not limited to 300+ tables such as user information table (tbl_user_info), package library (tbl_product_lib), and billing table (tbl_bill_fee). O-domain data can be data related to the operations support system, including but not limited to 500+ tables such as performance data (perf_fj_cell_5gmr), alarm data (alarm_5g_base), and signaling data (xdr_http). M-domain data can be data related to the management domain, including business rules and pricing policies.
[0029] Specifically, multi-source heterogeneous data such as B domain, O domain, and M domain of communication operators can be collected in advance. Metadata parsing is performed on the multi-source heterogeneous data to obtain information such as table structure and primary and foreign keys. Based on the parsing results, entities are extracted and assigned attributes through field matching and log mining. Entity relationships are constructed based on primary and foreign keys and spatial associations.
[0030] Furthermore, a knowledge graph schema is designed for the communications domain, and entities, entity relationships, and attributes are then organized in a structured manner according to the schema to form a knowledge graph. This process enables the structured integration of multi-source data, allowing the knowledge graph to accurately map communications business logic.
[0031] In a preferred implementation, multi-source data access and knowledge graph establishment can be achieved through the following process: (1) Access to multi-source heterogeneous data Accessing B-domain data from the operator's EDW (Enterprise Data Warehouse): 300+ tables including user information table (tbl_user_info), package database (tbl_product_lib), and billing table (tbl_bill_fee); Access O-domain data from the big data platform: performance data (perf_fj_cell_5gmr), alarm data (alarm_5g_base), signaling data (xdr_http), and more than 500 other tables; Access business rules from the CRM system: Marketing activity rule table (act_rule_config) and Fee policy table (fee_policy); Real-time access network change work orders: Base station network entry (t_workorder_in) and parameter adjustment (t_workorder_param) stream data.
[0032] (2) Automatic metadata parsing Every day at dawn, the data platform is scanned to automatically extract table structure (table name, field name, field type), partition information (dt / hour / province_code), and primary and foreign key relationships; By using regular expression matching of field names and mining historical SQL logs, we can identify standard metric fields (such as dou, arpu, drop_rate) and dimension fields (city_id, user_type).
[0033] (3) Atlas Schema Design Body structure: Entity types: User, Product, Base Station, Cell, Indicator, Event, Organization Relationship types: subscribe, cover, generate, belong to, trigger Attributes: Entity attributes (e.g., User.arpu_level), Relational attributes (e.g., subscribe.start_date), Business rules (e.g., Indicator.formula) (4) Map construction process Entity extraction: Identify entities from the data dictionary, such as the package entity select product_id,product_namefrom tbl_product_lib, which is mapped to the graph node Product:12345, with attributes including {name:"5G Enjoyable Ice Cream Package",price:129,flow:30GB}.
[0034] Relationship building: Analyze foreign key constraints and SQL logs to automatically discover relationships between tables. For example, establish a subscribe relationship between tbl_user_info.product_id and tbl_product_lib.product_id; establish a belong_to spatial relationship between BaseStation and City using base station latitude and longitude and city boundary geo data.
[0035] Indicator calculation logic embedding: The calculation logic from the indicator library is stored as an attribute in the graph. For example, the indicator DOU is defined as: Indicator:DOU { formula: "sum(data_volume_4g + data_volume_5g) / count(distinct user_id)", unit: "GB / household", dimensions: ["province","city","user_type","date"], sql_template: "SELECT city_id, dt, SUM(data_volume_5g+data_volume_4g) / COUNT(DISTINCT user_id) as dou FROM tbl_user_traffic WHERE ..." } In practical applications, to ensure the dynamic updating of the knowledge graph, network work order data can be monitored. When the base station status changes (cut-off, network shutdown), the graph transaction is updated, the BaseStation entity status is marked, and the relevant indicator cache is automatically invalidated.
[0036] In some implementations, entity linking is performed on the problem to be processed based on the knowledge graph to obtain a target subgraph that matches the problem to be processed. This includes: identifying communication domain terms in the problem to be processed based on BERT and CRF models, associating and matching the communication domain with entities in the knowledge graph to obtain the successfully matched target entities; and expanding the target entity as the center in the knowledge graph to form a target subgraph by expanding the neighbor nodes and associations with a preset number of hops.
[0037] Among them, BERT and CRF models can be used to identify communication domain terms in the problem to be addressed; communication domain terms can be understood as professional terms in communication operation scenarios, including but not limited to indicator names, business names, etc.
[0038] The target entity can be a knowledge graph entity that successfully matches the terms in the problem to be processed; the preset hop count can be a pre-set number of levels for expanding the associated nodes outward from the target entity; neighboring nodes can refer to knowledge graph nodes that have a direct or indirect association with the target entity.
[0039] Specifically, semantic analysis of the problem to be processed can be performed using BERT and CRF models to identify communication domain terms. These terms can then be matched with entities in the knowledge graph to determine the target entity. Furthermore, with the target entity as the center, the knowledge graph is expanded with a preset number of neighboring nodes and their relationships to form a target subgraph containing relevant business information.
[0040] For example, after a user enters question Q, entity linking is performed first: BERT+CRF is used to identify communication terms in the question, such as “5G fallback to 4G” linking to Indicator:fall_back_ratio, and “high-value user” linking to the rule node Rule:high_value_user (defined as ARPU>300 AND network duration>180 days).
[0041] Subgraph retrieval: Centered on the identified entity, expand the 2-hop neighbor subgraph G_sub, which includes relevant dimensions, indicator calculation formulas, and mandatory filtering conditions (such as province codes).
[0042] S120. Determine the intent category of the problem to be processed through the intent classifier, and based on the problem to be processed, the target subgraph, and the intent category, retrieve similar historical query questions in the knowledge graph, and extract the SQL skeleton template of similar historical query questions.
[0043] The intent category can be the query purpose category corresponding to the problem to be processed. It should be noted that the knowledge graph in this embodiment of the invention can also store some historical query questions, that is, some questions queried in the past; correspondingly, historical query questions similar to the problem to be processed are called similar historical query questions; the SQL skeleton template can be an SQL structure framework containing placeholders extracted from similar historical queries.
[0044] Specifically, the intent classifier can be used to determine the intent category of the question, and by combining the question to be processed, the target subgraph, and the intent category, similar historical queries can be retrieved in the knowledge graph to extract the corresponding SQL skeleton template.
[0045] In some implementations, before determining the intent category of the problem to be processed through the intent classifier, the following steps are also included: obtaining historical problems and labeling the intent categories of the historical problems; constructing a training dataset based on the historical problems and their corresponding intent categories; training an initial classification model using the training dataset; and obtaining the intent classifier when training is complete.
[0046] The intent categories can include categories such as indicator query, root cause analysis, comparative analysis, trend prediction, and detailed drill-down; historical questions can be natural language questions about various types of data queries from the past of telecommunications operators; and the initial classification model can be an untrained basic classification model.
[0047] Specifically, historical questions from telecommunications operators can be collected, and intent labels can be assigned to these historical questions according to categories such as indicator queries and root cause analysis to construct a training dataset. This training dataset can then be used to train the initial classification model, optimize the model's intent recognition capability, and obtain an intent classifier after training.
[0048] For example, an intent classification model in the communications domain is trained to categorize questions into five types: indicator query, root cause analysis, comparative analysis, trend prediction, and detail drill-down. For instance, "Why are there more 5G complaints in Shanghai?" is classified as root cause analysis.
[0049] S130. Construct prompt information based on the problem to be processed, the target subgraph, and the SQL skeleton template, and output candidate SQL corresponding to the problem to be processed based on the prompt information to prompt the target large model.
[0050] The prompt information is used to guide the target large model to generate SQL statements corresponding to the problem to be processed; the target large language model can be a large language model, preferably a large language model adapted to the data query needs of the communication field; the candidate SQL can be the SQL statements initially output by the target large model.
[0051] Specifically, the problem to be processed, the target subgraph, and the SQL skeleton template can be assembled into a prompt message to guide the target large model to output candidate SQL, thus achieving the initial conversion from natural language to SQL.
[0052] S140. Validate the candidate SQL, take the candidate SQL that passes the validation as the target SQL, and obtain the target result corresponding to the problem to be processed by querying the target SQL.
[0053] The target SQL can refer to the SQL statement that can be executed after verification; the target result can refer to the data obtained by querying the target SQL to solve the problem to be processed.
[0054] Specifically, candidate SQL queries can be validated, and qualified candidate SQL queries can be used as target SQL queries to obtain the target results. This process does not require users to have professional SQL skills, which greatly reduces the business threshold and improves query accuracy.
[0055] The technical solution of this invention addresses six core problems faced by telecommunications operators in data querying and analysis: high business thresholds, inaccurate semantic understanding, missing context, difficulty in dynamic adaptation, weak security control, and difficulty in interpreting results. The knowledge graph is constructed based on multi-source heterogeneous data corresponding to telecommunications operators. An intent classifier determines the intent category of the problem, and based on the problem, target subgraph, and intent category, similar historical query questions are retrieved from the knowledge graph, along with their SQL skeleton templates. Hint information is constructed based on the problem, target subgraph, and SQL skeleton templates, prompting the target model to output candidate SQL statements corresponding to the problem. The candidate SQL statements are validated, and the validated ones are used as the target SQL. The target result corresponding to the problem is obtained through querying the target SQL. This solution addresses six core problems faced by telecommunications operators in data querying and analysis: high business thresholds, inaccurate semantic understanding, lack of context, difficulty in dynamic adaptation, weak security control, and difficulty in interpreting results. It not only breaks through the barrier of traditional queries relying on professional SQL skills, but also makes up for the shortcomings of semantic understanding and contextual support by using knowledge graph entity links and intent classification. Furthermore, it achieves dynamic business adaptation by relying on domain fine-tuning large models and SQL skeleton templates, strengthens security control by combining permission constraint injection and multi-verification, and reduces the difficulty of result interpretation by precise SQL generation and target result output. Ultimately, it has achieved the beneficial effect of comprehensively improving the ease of use, accuracy, adaptability and security of intelligent data query for telecommunications operators, efficiently supporting business decision-making and reducing operating costs.
[0056] Figure 2This is a flowchart illustrating another intelligent data query method for telecommunications operators provided in this embodiment of the invention. Based on the above embodiments, the generation and validation of candidate SQL statements and the fine-tuning process of the target large model are further optimized. For example... Figure 2 As shown, the method specifically includes the following steps: S210. Obtain the problem to be processed, and perform entity linking on the problem to be processed based on the pre-built knowledge graph to obtain the target subgraph matching the problem to be processed.
[0057] S220. Determine the intent category of the problem to be processed through the intent classifier, identify the historical query questions stored in the knowledge graph that match the intent category, and calculate the embedding similarity between the problem to be processed and the historical query questions.
[0058] Embedding similarity can be understood as the similarity value calculated after converting the problem to be processed and the historical query problem into vectors.
[0059] S230. Filter historical query questions whose embedding similarity meets the preset threshold and use them as similar historical query questions.
[0060] The preset threshold can be a pre-defined value used to determine whether the similarity meets the requirements. For example, the preset threshold could be 95% similarity.
[0061] S240. Extract the structural framework of the SQL statements corresponding to similar historical query questions to obtain the SQL skeleton template.
[0062] Among them, the structural framework can refer to the fixed syntax structure of an SQL statement after removing specific parameters; the SQL skeleton template can refer to a template that retains the SQL structural framework and replaces specific parameters with placeholders.
[0063] Specifically, based on the intent category of the question to be processed, historical query questions of the same category in the knowledge graph are filtered, and the embedding similarity between the question to be processed and these historical query questions is calculated. Historical query questions whose similarity meets a preset threshold are selected as similar historical query questions, and then the structural framework of the corresponding SQL statements for similar historical query questions is extracted to obtain the SQL skeleton template. In this way, the search scope can be narrowed, the efficiency of similar query matching can be improved, and the SQL skeleton template can be highly adapted to the intent of the question to be processed.
[0064] S250: Construct prompt information based on the problem to be processed, the target subgraph, and the SQL skeleton template, and output candidate SQL corresponding to the problem to be processed based on the prompt information to prompt the target large model.
[0065] like Figure 3The diagram shows a flowchart of a preferred intelligent data collection method for telecommunications operators provided by an embodiment of the present invention.
[0066] Specifically, candidate SQL can be generated in the following two stages: Phase 1: Template Generation Input: Problem Q + subgraph G_sub Processing: Retrieve similar historical queries from the knowledge graph (based on question embedding similarity) and extract the SQL skeleton template. For example, "Query the trend of {indicator} for province in the last n days" → 'SELECT dt, {indicator}_sql FROM table WHERE provinceid= {province_id} AND dt>=...' Output: Query template T with placeholders, parsed set of dimensions D, indicator mapping M Phase 2: SQL Generation and Validation Prompt Construction: Assemble the template T, subgraph G_sub, dimension D, and user context (role, province permissions) into a structured Prompt. [System Command] You are a communications data analysis expert. Generate SQL strictly following these constraints: 1. Only allow querying data with province_id IN (21,22) (user permissions) 2. The time field must be filtered if dt >= DATE_SUB(CURRENT_DATE, 7). 3. The DOU metric must be calculated using the formula: SUM(data_volume_5g+data_volume_4g) / COUNT(DISTINCT user_id) [Knowledge Context] {G_sub Serialization} [Historical Examples] {Similar Query Cases} [User Question] {Q} [Output Requirements] Return only standard SQL, without comments. Large model call: Call the fine-tuned large language model to generate candidate SQL.
[0067] In some implementations, after outputting candidate SQL statements corresponding to the problem to be processed based on the prompt information in the target large model, the following is also included: Obtain user role information, data domain permission information, and row-level permission information from the unified identity authentication system; convert the user role information, data domain permission information, and row-level permission information into hard constraints for query conditions; inject the hard constraints for query conditions into the filtering logic of candidate SQL.
[0068] The unified identity authentication system can be a system used by telecommunications operators to manage user identities and permissions; user role information can be identity roles within the operator's system, such as network administrator or city manager; data domain permission information can be the domain permissions of the data that a user can access, such as B domain or O domain; row-level permission information can be the range of data rows that a user can access, such as province or city. Hard constraints on query conditions can be understood as conditions that are forcibly embedded in SQL statements to limit the scope of the query.
[0069] Specifically, user role information, data domain permission information, and row-level permission information can be obtained from the unified identity authentication system. This permission information can be transformed into hard constraints for query conditions, and then the hard constraints can be injected into the filtering logic of candidate SQL to achieve three-dimensional permission control at the field level, row level, and operation level. This fundamentally eliminates unauthorized access, ensures data security, and meets the data security management needs of telecommunications operators.
[0070] S260. Verify the candidate SQL, take the candidate SQL that passes the verification as the target SQL, and obtain the target result corresponding to the problem to be processed by querying the target SQL.
[0071] In some implementations, candidate SQL queries are validated, including: using SQLGlot to parse the syntax tree of the candidate SQL queries and performing syntax correctness checks; based on business rules in the knowledge graph, validating the consistency of the candidate SQL queries' metric calculation logic, time granularity, and dimensions; evaluating the query complexity and resource consumption of the candidate SQL queries and performing performance and security checks; if the validation fails, extracting the error reason and adjusting the prompt message, and re-triggering the target large model to generate candidate SQL queries until the validation passes or the preset number of retries is reached.
[0072] Here, SQLGlot refers to the tool used to parse SQL syntax trees; syntax correctness verification can be used to check whether SQL statements conform to syntax specifications; business rules can be preset rules in the communications field regarding indicator calculation, data dimensions, etc.; indicator calculation logic can refer to the formulas and methods for calculating business indicators; time granularity can refer to the time unit for data statistics; dimension consistency can refer to the degree of matching between the dimensions of the SQL query and the dimensions required by the business rules; query complexity can refer to the computing resources and time required to execute the SQL statement; performance and security verification can refer to the process of checking whether the SQL statement has the risk of excessive resource consumption; preset retries can refer to the maximum number of times the candidate SQL is regenerated in advance.
[0073] Specifically, SQLGlot is used to parse the syntax tree of candidate SQL and perform syntax correctness verification; based on business rules in the knowledge graph, the consistency of the indicator calculation logic, time granularity and dimension of the candidate SQL is verified to avoid invalid calculations; the query complexity and resource consumption of the candidate SQL are evaluated to perform performance and safety verification; if the verification fails, the error reason can be extracted and the prompt message can be adjusted, and the target large model can be retried to generate candidate SQL until the verification passes or the preset number of retries is reached. This process can ensure that the generated SQL is syntactically correct, conforms to business rules and is performance and safe, and reduces query errors and resource waste.
[0074] For example, the following triple validation is performed on the candidate SQL: Syntax validation: SQLGlot is used to parse the syntax tree to ensure there are no syntax errors; Business rule validation: Check whether it includes province filtering (to avoid exceeding authority), time partitioning (to avoid full table scan), and whether the indicator calculation conforms to the map definition (e.g., DOU cannot be summarized by hour); Performance verification: Evaluate the query complexity. If it involves table joins of 1 billion+ tables and there is no partitioning filter, it will be automatically rejected and the message "Query range is too large, please narrow down the time range" will be displayed.
[0075] Automatic error correction: If the verification fails, extract the error information (such as "missing city_id dimension"), regenerate the Prompt and call the large model again, and retry a maximum of 2 times.
[0076] In some implementations, the target large model is a model fine-tuned with data from the communications domain. The fine-tuning process of the target large model includes: collecting anonymized historical SQL logs from operators to construct a natural language-SQL instruction fine-tuning dataset; using LoRA to fine-tune the open-source large model based on the fine-tuning dataset; and constructing a reinforcement learning reward model based on user adoption results of generated SQL and manual modification records, and periodically performing incremental fine-tuning on the model.
[0077] Specifically, anonymized historical SQL logs from telecom operators can be collected to construct a Natural Language-SQL command fine-tuning dataset. Based on this dataset, LoRA technology is used to fine-tune the open-source large model to adapt it to query patterns in the communications domain. Furthermore, based on user adoption results and manual modification records of generated SQL, a reinforcement learning reward model is constructed, and incremental fine-tuning is performed on the model periodically. This approach enables the target large model to accurately adapt to the SQL generation needs of the communications domain, continuously improving the model's query generation quality and adaptability.
[0078] For example, fine-tuning can be performed through the following process: (1) Domain fine-tuning Collect 500,000 historical SQL logs (anonymized) from the operator and construct a fine-tuning dataset of <natural language, SQL> commands; LoRA technology is used to fine-tune the open-source DeepSeek model and learn communication-specific patterns, such as rlf_status='1' representing "active users on the network".
[0079] (2) Online learning mechanism Record the query results adopted / modified by users and build a reinforcement learning reward model. If the generated SQL is used directly, a positive reward is given; if the user manually modifies it, the diff is extracted as a negative sample, and the model is incrementally fine-tuned weekly.
[0080] In some optional implementations, permission management, result post-processing, and interactive follow-up questions can also be performed: (1) Permission management Before SQL generation, user roles (network operations / market analysis / customer service), data domain permissions (B domain + O domain), and row-level permissions (can query the list of provinces) are obtained from the unified identity authentication system and injected into the hard constraints of Prompt.
[0081] (2) Post-processing of results Intelligent Interpretation: After the query results are returned, if they are indicator values, they will be automatically compared with the historical baseline (the month-on-month threshold stored in the knowledge graph) to generate the conclusion: "Shanghai's 5G DOU is 15.2GB, a month-on-month decrease of 8%, which is lower than the provincial company's average (18.5GB)".
[0082] Visualization Recommendations: If the query results are multidimensional data, the system will automatically recommend the following chart types: Geographic data → Mapbox heatmap; Time series data → ECharts trend chart; Comparative data → Funnel chart.
[0083] (3) Interactive follow-up questions The session state machine is built based on the dialogue context, supporting follow-up questions such as "What is the definition of a high-value user in the previous query?" → directly returning the definition node content of Rule:high_value_user in the knowledge graph.
[0084] In a preferred embodiment, for network operation and maintenance scenarios, the intelligent data query method for telecommunications operators of the present invention may include the following steps: Network Operation and Maintenance Scenario – “Analyzing the Reasons for Poor 5G Quality in Area A” S1 Knowledge Graph Construction Phase: S1.1 Multi-source data access and semantic alignment Structured data access: Performance data (perf_cell_5g table), alarm data (alarm_5g table), and work order data (work_order table) are collected from the northbound interface of the network management system. The table structure is automatically mapped to classes in the graph ontology through the data virtualization layer, and foreign key relationships are identified as object attributes. Knowledge Accumulation: By using a pre-trained language model to extract entities and relationships from historical operation and maintenance reports and fault case libraries, expert experience is transformed into experience rule nodes.
[0085] S1.2 constructs a domain-specific ontology, whose core entities include: Spatial entities: a three-level topology of Region→BaseStation→Cell, linked by the hasCell relationship; geocoding of cell_id is performed using GeoHash spatial index; Time entity: Discretize time into 1-hour granularity and associate performance metrics through the observedAt relationship; Metric Entities: Classes instantiate specific metrics (such as rrc_setup_success_rate), with each metric node having built-in dynamic metrics; Threshold attribute: (hasThresholdRule:{threshold:95%,comparator:"<"}), supports hot updating of threshold rules; Event entity: Alarm class, pointing to the affected cell through the influence relationship, and pointing to the root cause type through the hash root node relationship; S1.3 Consistent Relationship Extraction and Graph Filling: Topology construction: The neighbor cell relationship is automatically established and the spatial distance attribute is calculated using the neighbor cell configuration table exported from the network management system. Experience rule injection: Allows operation and maintenance experts to manually add experience rule nodes through a visual graph editor, such as the relationship between HighPRBUtilization (defined: prb_utilization>80%) and CallDropRate, which the system automatically converts into a query template.
[0086] S1.4 Fine-grained data permission model and entity-level access control: Permission ontology extension: Construct data permission classes, bind each Cell node to the owner label (owner: department_A), and store the permission model in the graph as entity attributes; SQL constraint pre-generation: During the graph construction phase, a whitelist view, such as VIEW_dept_A_cell_ids, is generated for the set of cell_ids under the jurisdiction of each department and stored in the PermissionPolicy node of the graph. When querying data later, the system obtains the user's cell_id whitelist in real time through graph query and injects it into the IN clause of SQL to achieve query-level row permission control.
[0087] S1.5 map quality assessment and incremental update mechanism: Time-series metric anchoring: Performance metric data is not directly and fully imported into the graph. Instead, it is stored in the graph using a virtualized linking method. Only the metric metadata (indicator_name, table_location, update_frequency) is stored in the graph, while the actual data is stored in the time-series database. Federated queries are used to achieve joint queries, reducing the storage pressure on the graph. Incremental update: Log-based CDC listens to the source database binlog. When the base station configuration changes, a subgraph update is triggered instead of a full reconstruction, with an update delay of less than 5 minutes.
[0088] S2 Intelligent Questioning Stage S2.1 User Input: Network Optimization Expert Input: "What is the reason why the 5G cell wireless connection rate in Area A has been below 95% in the past week?" 2. Knowledge Graph Deep Retrieval Entity links: "Area A" is matched to 5 base stations via spatial index; "Wireless connection success rate" → Indicator:rrc_setup_success_rate; "Below 95%" → Threshold rule.
[0089] Subgraph expansion: Retrieve index-related factors → cover nodes related to interference (Indicator:interference), fault (Event:alarm), capacity (Indicator:prb_utilization), etc.
[0090] S2.3 Root Cause Analysis Intended Processing The system automatically generates a root cause analysis query package: Query 1: Indicator Trend SELECT dt, AVG(rrc_setup_success_rate) FROM perf_cell_5g WHERE cell_id IN (...) GROUP BY dt Query 2: Related Alarms SELECT alarm_type, COUNT(*) FROM alarm_5g WHERE cell_idIN (...) AND start_time > ... GROUP BY alarm_type Query 3: Interference Analysis SELECT cell_id, interference_power FROM perf_cell_5g WHERE dt=... ORDER BY interference_power DESC S2.4 Multiple SQL Generation and Parallel Execution The large model generates 3 SQL statements, each with a hard constraint on the cell_id list to prevent unauthorized queries to other regions.
[0091] Results aggregation: The average wireless connection rate was 92.3% (below the threshold), and "AAU optical module failure" accounted for 67% of the associated alarms. The top 3 cells with the highest interference values were located in the same geographical locations as the fault alarms.
[0092] S2.5 Intelligent Conclusion Output The system generates a natural language report: "The poor 5G quality in Area A is mainly due to a hardware failure of the AAU optical module, involving 3 cells. It is recommended to prioritize processing the AAU replacement work order (work order number WO2024xxxxxxx) for cell_502." The report includes a link to the handling plan for the AAU optical module failure node in the knowledge graph.
[0093] The technical solutions of the embodiments of the present invention include at least the following technical effects: (1) Improved business efficiency: Actual tests show that after ordinary customer service personnel use this system, the average time spent on data query is reduced from tens of minutes (including asking data engineers for help) to a few minutes, which improves the self-service query rate.
[0094] (2) Breakthrough in query accuracy: In complex communication scenarios (cross-domain association, nested indicators), the SQL generation accuracy has been improved from traditional NL2SQL to 93%, and the intent recognition accuracy is 96%, significantly reducing manual error correction.
[0095] (3) Enhanced data security: By embedding permissions in advance, "zero-trust" queries are achieved, fundamentally eliminating unauthorized access. After the system went live, data security audit incidents decreased, meeting the Level 3 requirements of the Information Security Protection Standard 2.0.
[0096] (4) Knowledge Accumulation and Inheritance: The knowledge graph automatically accumulates the query experience of data engineers (such as optimal association paths and performance optimization techniques), allowing newcomers to get started quickly and preventing the loss of expert experience. By structuring and storing the optimization experience of experts into the graph, the query efficiency of new employees is greatly improved.
[0097] (5) "Last Mile" Closed Loop: Not only does it return data, but it also provides business insights. When the marketing department analyzes the "5G package migration rate", the system automatically associates it with the marketing activities in the same period and identifies that "the 3pp increase in migration rate mainly comes from campus market promotions", thus improving decision-making efficiency.
[0098] (6) Dynamically adapt to changes in the existing network: After changes in services such as base station cutover and new package launch, the knowledge graph is synchronized within 2 hours, and the query results are always consistent with the existing network, avoiding analysis errors caused by the lag in metadata.
[0099] Figure 4 This is a schematic diagram of the structure of a smart data collection device for telecommunications operators, provided as an embodiment of the present invention. Figure 4 As shown, the device includes: The entity linking module 410 is used to acquire the problem to be processed, perform entity linking on the problem to be processed based on a pre-built knowledge graph, and obtain a target subgraph matching the problem to be processed; wherein, the knowledge graph is constructed based on multi-source heterogeneous data corresponding to communication operators; The intent classification and template extraction module 420 is used to determine the intent category of the problem to be processed by an intent classifier, and based on the problem to be processed, the target subgraph and the intent category, retrieve similar historical query questions in the knowledge graph, and extract the SQL skeleton template of the historical query questions; The prompt construction and SQL generation module 430 is used to construct prompt information based on the problem to be processed, the target subgraph and the SQL skeleton template, so as to prompt the target large model to output the candidate SQL corresponding to the problem to be processed based on the prompt information; The SQL verification and execution module 440 is used to verify the candidate SQL, take the candidate SQL that passes the verification as the target SQL, and obtain the target result corresponding to the problem to be processed by querying the target SQL.
[0100] In some implementations, the apparatus further includes a knowledge graph construction module, used for: The multi-source heterogeneous data of the telecommunications operator is acquired in advance, wherein the multi-source heterogeneous data includes at least one of the B-domain data of the enterprise data warehouse, the O-domain data of the big data platform, and the M-domain data of the CRM system. Automatic metadata parsing is performed on the multi-source heterogeneous data. Based on the parsed metadata, entities are extracted and assigned attributes through field matching and log mining. Entity relationships are constructed based on the primary and foreign keys and spatial associations in the metadata. Design the graph schema corresponding to the knowledge graph, and organize the entities, entity relationships and attributes in a structured manner based on the graph schema to obtain the knowledge graph.
[0101] In some implementations, the entity linking module 410 includes: The terminology recognition and matching submodule is used to identify communication domain terms in the problem to be processed based on BERT and CRF models, and to associate and match the communication domain with entities in the knowledge graph to obtain the successfully matched target entities. The subgraph expansion submodule is used to expand the target entity as the center in the knowledge graph by a preset number of neighboring nodes and their relationships to form the target subgraph.
[0102] In some implementations, the device further includes an intent classifier training module, used for: Obtain historical questions and label the intent categories of the historical questions, wherein the intent categories include at least one of indicator query, root cause analysis, comparative analysis, trend prediction, and detail drill-down; A training dataset is constructed based on the historical questions and the corresponding intent categories. An initial classification model is trained using the training dataset, and the intent classifier is obtained upon completion of training.
[0103] In some implementations, the intent classification and template extraction module 420 includes: The similarity query retrieval submodule is used to determine the historical query questions stored in the knowledge graph that match the intent category, and to calculate the embedding similarity between the question to be processed and the historical query questions; and to filter the historical query questions whose embedding similarity meets a preset threshold as the similar historical query questions. The SQL skeleton extraction submodule is used to extract the structural framework of the SQL statements corresponding to the similar historical query questions in order to obtain the SQL skeleton template.
[0104] In some implementations, the method further includes an access control module, used for: Obtain user role information, data domain permission information, and row-level permission information from the unified identity authentication system; The user role information, the data domain permission information, and the row-level permission information are converted into hard constraints for query conditions. The hard constraints of the query conditions are injected into the filtering logic of the candidate SQL.
[0105] In some implementations, the SQL verification and execution module 440 includes: The syntax verification submodule is used to parse the syntax tree of the candidate SQL using SQLGlot and perform syntax correctness verification. The business rule verification submodule is used to verify the consistency of the indicator calculation logic, time granularity and dimension of the candidate SQL based on the business rules in the knowledge graph. The performance and security verification submodule is used to evaluate the query complexity and resource consumption of the candidate SQL and perform performance and security verification. The verification retry submodule is used to extract the error reason and adjust the prompt information if the verification fails, and re-trigger the target large model to generate candidate SQL until the verification passes or the preset number of retries is reached.
[0106] In some implementations, the device further includes a large model fine-tuning module for: Collect anonymized historical SQL logs from telecom operators to construct a Natural Language-SQL command fine-tuning dataset; Based on the fine-tuning dataset, LoRA was used to perform domain-specific fine-tuning on the open-source large model. Furthermore, based on user adoption results of the generated SQL and manual modification records, a reinforcement learning reward model is constructed, and incremental fine-tuning is performed on the model periodically. The intelligent data collection device for telecommunications operators provided in this embodiment of the invention can execute the intelligent data collection method for telecommunications operators provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0107] Figure 5 This is a schematic diagram of an electronic device for implementing the intelligent query method for telecommunications operators according to embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptops, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0108] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0109] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0110] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as intelligent data querying methods for telecommunications operators.
[0111] In some embodiments, the intelligent querying method for telecommunications operators can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the intelligent querying method for telecommunications operators described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the intelligent querying method for telecommunications operators by any other suitable means (e.g., by means of firmware).
[0112] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0113] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0114] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0115] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0116] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0117] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0118] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0119] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A smart data collection method for telecommunications operators, characterized in that, include: The process involves acquiring a problem to be processed, performing entity linking on the problem based on a pre-built knowledge graph, and obtaining a target subgraph matching the problem; wherein the knowledge graph is constructed based on multi-source heterogeneous data corresponding to communication operators. The intent classifier determines the intent category of the problem to be processed, and based on the problem to be processed, the target subgraph, and the intent category, similar historical query questions are retrieved in the knowledge graph, and the SQL skeleton template of the similar historical query questions is extracted. Based on the problem to be processed, the target subgraph, and the SQL skeleton template, a prompting message is constructed to prompt the target large model to output the candidate SQL corresponding to the problem to be processed. The candidate SQL is validated, and the candidate SQL that passes the validation is used as the target SQL. The target result corresponding to the problem to be processed is obtained by querying the target SQL.
2. The method according to claim 1, characterized in that, The knowledge graph is constructed in the following manner: The multi-source heterogeneous data of the telecommunications operator is acquired in advance, wherein the multi-source heterogeneous data includes at least one of the B-domain data of the enterprise data warehouse, the O-domain data of the big data platform, and the M-domain data of the CRM system. Automatic metadata parsing is performed on the multi-source heterogeneous data. Based on the parsed metadata, entities are extracted and assigned attributes through field matching and log mining. Entity relationships are constructed based on the primary and foreign keys and spatial associations in the metadata. Design the graph schema corresponding to the knowledge graph, and organize the entities, entity relationships and attributes in a structured manner based on the graph schema to obtain the knowledge graph.
3. The method according to claim 2, characterized in that, The step of linking entities in the problem to be processed based on a knowledge graph to obtain a target subgraph matching the problem to be processed includes: Based on BERT and CRF models, communication domain terms in the problem to be processed are identified, and the communication domain is associated and matched with entities in the knowledge graph to obtain the successfully matched target entities; In the knowledge graph, the target entity is taken as the center, and neighboring nodes and their relationships are expanded by a preset number of hops to form the target subgraph.
4. The method according to claim 1, characterized in that, Before determining the intent category of the problem to be processed by the intent classifier, the process also includes: Obtain historical questions and label the intent categories of the historical questions, wherein the intent categories include at least one of indicator query, root cause analysis, comparative analysis, trend prediction, and detail drill-down; A training dataset is constructed based on the historical questions and the corresponding intent categories. An initial classification model is trained using the training dataset, and the intent classifier is obtained upon completion of training.
5. The method according to claim 1, characterized in that, The step of retrieving similar historical query questions from the knowledge graph based on the question to be processed, the target subgraph, and the intent category, and extracting the SQL skeleton template of the similar historical query questions, includes: Identify the historical query questions stored in the knowledge graph that match the intent category, and calculate the embedding similarity between the question to be processed and the historical query questions; Historical query questions whose embedding similarity meets a preset threshold are selected as the similar historical query questions; Extract the structural framework of the SQL statement corresponding to the similar historical query question to obtain the SQL skeleton template.
6. The method according to claim 5, characterized in that, After prompting the target large model to output the candidate SQL corresponding to the problem to be processed based on the prompting information, the method further includes: Obtain user role information, data domain permission information, and row-level permission information from the unified identity authentication system; The user role information, the data domain permission information, and the row-level permission information are converted into hard constraints for query conditions. The hard constraints of the query conditions are injected into the filtering logic of the candidate SQL.
7. The method according to claim 1, characterized in that, The validation of the candidate SQL includes: SQLGlot is used to parse the syntax tree of the candidate SQL and perform syntax correctness verification; Based on the business rules in the knowledge graph, verify the consistency of the indicator calculation logic, time granularity and dimension of the candidate SQL; Evaluate the query complexity and resource consumption of the candidate SQL statements, and perform performance and safety checks. If the verification fails, the error reason is extracted and the prompt message is adjusted. The target large model is then retried to generate candidate SQL until the verification passes or the preset number of retries is reached.
8. The method according to claim 1, characterized in that, The target large model is a model fine-tuned using data from the communications field. The fine-tuning process of the target large model includes: Collect anonymized historical SQL logs from telecom operators to construct a Natural Language-SQL command fine-tuning dataset; Based on the fine-tuning dataset, LoRA was used to perform domain-specific fine-tuning on the open-source large model. Furthermore, based on user adoption results of generated SQL and manual modification records, a reinforcement learning reward model is constructed, and incremental fine-tuning of the model is performed periodically.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to execute the intelligent query method for communication operators as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the intelligent query method for communication operators as described in any one of claims 1-8.