Data query method and device, computer equipment and storage medium
Through semantic analysis and automated data source matching, field extraction and statistical logic construction, big data retrieval statements are generated, which solves the problem of inefficient existing data query analysis and realizes efficient and accurate data query processing.
Patent Information
- Application Number
- CN202510356284.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-06-27
AI Technical Summary
The existing data query and analysis process is inefficient and relies on manual operations, resulting in low processing efficiency.
By receiving query information input by users, perform semantic analysis, match data sources and extracting data fields, build statistical logic, generate big data retrieval statements, and perform query processing to obtain results.
It realizes efficient and accurate understanding of user queries, automatically generates big data retrieval statements that meet user needs, and quickly and accurately completes data query processing, improves the processing efficiency of data query and ensures the accuracy of query results.
Smart Images

Figure CN120216555A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and can be applied to fields such as fintech and digital healthcare, and particularly relates to a data query method, apparatus, computer device, and storage medium. Background Art
[0002] Currently, in many industries, with the continuous expansion and deepening of business, data has become the core element driving decision-making. Enterprises increasingly rely on in-depth query analysis based on data to evaluate business performance, predict market trends, optimize operation strategies, and improve service quality. This trend requires being able to quickly and accurately extract valuable information from massive data to support the reasonable judgment of business needs and the effectiveness evaluation of value conversion.
[0003] Traditionally, the process of implementing data query analysis relies on the in-depth intervention of data analysis experts. They identify the required data fields according to the specific requirements put forward by the business department, and then use complex big data processing technologies and query languages for data extraction and analysis. Although this process can generate customized reports and insights for specific business problems, its efficiency is significantly limited. The reason is that the entire process highly depends on manual operations: from understanding business requirements, designing query statements, executing data extraction, to result parsing and feedback, each step requires the direct participation of data analysis personnel, thus resulting in low processing efficiency of data query analysis. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to propose a data query method, apparatus, computer device, and storage medium to solve the technical problem of low processing efficiency in the existing data query analysis process.
[0005] In a first aspect, a data query method is provided, including:
[0006] Receiving query information input by a user through a preset interaction interface;
[0007] Performing semantic analysis on the query information to obtain a corresponding semantic analysis result;
[0008] Based on the semantic analysis result, performing data source matching and data field extraction processing on a preset meta-database to obtain corresponding data source location results and data field extraction results;
[0009] Constructing a corresponding statistical logic based on the semantic analysis result and the data field extraction result;
[0010] Obtaining a corresponding target retrieval statement template based on the semantic analysis result;
[0011] Performing parameter filling processing on the target retrieval statement template based on the semantic analysis result, the data source location result, and the statistical logic to obtain a corresponding big data retrieval statement;
[0012] Performing query processing on preset business data based on the big data retrieval statement to obtain a corresponding query result;
[0013] Sending the query result to the user.
[0014] In a second aspect, a data query device is provided, including:
[0015] A receiving module, configured to receive query information input by a user through a preset interaction interface;
[0016] A first analysis module, configured to perform semantic analysis on the query information to obtain a corresponding semantic analysis result;
[0017] A first processing module, configured to perform data source matching and data field extraction processing on a preset meta-database based on the semantic analysis result to obtain a corresponding data source location result and data field extraction result;
[0018] A construction module, configured to construct a corresponding statistical logic based on the semantic analysis result and the data field extraction result;
[0019] A first obtaining module, configured to obtain a corresponding target retrieval statement template based on the semantic analysis result;
[0020] A second processing module, configured to perform parameter filling processing on the target retrieval statement template based on the semantic analysis result, the data source location result, and the statistical logic to obtain a corresponding big data retrieval statement;
[0021] A query module, configured to perform query processing on preset business data based on the big data retrieval statement to obtain a corresponding query result;
[0022] A first sending module, configured to send the query result to the user.
[0023] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above data query method are implemented.
[0024] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above data query method are implemented.
[0025] In the solution implemented by the above data query method, device, computer device, and storage medium, after receiving the query information input by the user through the interaction interface, semantic analysis is performed on the query information to obtain a semantic analysis result. Based on the semantic analysis result, data source matching and data field extraction processing are performed on the preset meta database to obtain corresponding data source location results and data field extraction results. Then, a corresponding statistical logic is constructed based on the semantic analysis result and the data field extraction result, and a corresponding target retrieval statement template is obtained based on the semantic analysis result. Subsequently, parameter filling processing is performed on the target retrieval statement template based on the semantic analysis result, the data source location result, and the statistical logic to obtain a corresponding big data retrieval statement. The preset business data is queried based on the big data retrieval statement to obtain a corresponding query result, and then the query result is sent to the user. In this way, through the present application, the user's query can be efficiently and accurately understood, and a big data retrieval statement that meets the user's query requirements can be automatically generated. Furthermore, by executing the big data retrieval statement, the data query processing corresponding to the user's query can be quickly and accurately completed, effectively improving the processing efficiency of data query and ensuring the accuracy of the generated query result. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the solutions in the present application, the following will briefly introduce the drawings required for the description of the embodiments of the present application. Obviously, the following described drawings are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0027] Figure 1 is an exemplary system architecture diagram to which the present application can be applied;
[0028] Figure 2 is a flowchart of an embodiment of the data query method according to the present application;
[0029] Figure 3 is a schematic structural diagram of an embodiment of the data query device according to the present application;
[0030] Figure 4 is a schematic structural diagram of an embodiment of the computer device according to the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs; the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion. The terms "first", "second", etc. in the specification and claims of this application or the above drawings are used to distinguish different objects and not to describe a specific order.
[0032] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the application. The phrase appears in various places in the specification and is not necessarily referring to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive of other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0033] To enable those skilled in the technical field to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0034] As Figure 1 shown, the system architecture 100 may include a terminal device 101, a network 102, and a server 103. The terminal device 101 may be a laptop computer 1011, a tablet computer 1012, or a mobile phone 1013. The network 102 is a medium for providing a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0035] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications may be installed on the terminal device 101, such as a web browser application, a shopping application, a search application, an instant messaging tool, an email client, a social platform software, etc.
[0036] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing. In addition to the laptop 1011, the tablet computer 1012, or the mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer, a desktop computer, and so on.
[0037] The server 103 can be a server that provides various services, such as a background server that supports the pages displayed on the terminal device 101.
[0038] It should be noted that the data query method provided by the embodiments of the present application is generally executed by the server / terminal device. Correspondingly, the data query device is generally set in the server / terminal device.
[0039] It should be understood that Figure 1 the numbers of the terminal devices, the network, and the servers in
[0040] Continue to refer to Figure 2 , which shows a flowchart of an embodiment of the data query method according to the present application. According to different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted. The data query method provided by the embodiments of the present application can be applied to any scenario that requires product recommendation. Then, the data query method can be applied to the products in these scenarios. For example, data query in the financial field or the medical field. The data query method includes the following steps:
[0041] Step S201, receive the query information input by the user through a preset interaction interface.
[0042] In this embodiment, the electronic device on which the data query method runs (such as Figure 1The server / terminal device shown can obtain query information through wired connection or wireless connection. It should be noted that the above wireless connection methods can include, but are not limited to, 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods known now or developed in the future. The execution entity of this application can specifically be a data query system, or also known as an intelligent retrieval system, which can be abbreviated as the system. Among them, the above interaction interface is a user-friendly interaction interface pre-designed in the system, supporting natural language or voice input, and providing instant feedback and optimization suggestions. Specifically, the interaction interface is a visual retrieval language interface, providing functions such as query syntax highlighting and error prompts to help users ensure the correctness of input. During the user input process, instant feedback is provided, such as query syntax error prompts and possible query suggestions.
[0043] The system of this application can be applied to data query processing in multiple fields, such as the financial field, the medical field, and so on. In the financial field and the medical field, user queries can be transformed into various specific big data retrieval or analysis requirements. Exemplarily, in the financial field, the query information input by the user may include query information corresponding to the personal bank account transaction records where the query purpose is that the user hopes to view the transaction records of his / her bank account within a certain period, including information such as transaction date, transaction amount, and transaction type. The query information input by the user may also include query information corresponding to analyzing the stock market trend where the query purpose is that the user hopes to understand the historical trends of specific stocks or the stock market in order to make investment decisions. The query information input by the user may or may also include query information corresponding to evaluating personal credit risk where the query purpose is that a bank or financial institution hopes to evaluate the credit risk of an individual customer to determine whether to approve their loan application.
[0044] In the medical field, the query information input by the user may include query information corresponding to personal medical records where the query purpose is that a patient hopes to view his / her medical records in a hospital or clinic, including information such as medical history, examination results, and diagnosis reports. The query information input by the user may also include query information corresponding to analyzing the disease prevalence trend where the query purpose is that a public health department or research institution hopes to understand the disease prevalence trend in a specific region or population in order to formulate prevention measures and response strategies. The query information input by the user may or may also include query information corresponding to assisting doctors in disease diagnosis where the query purpose is that a doctor hopes to use artificial intelligence technology to assist himself / herself in disease diagnosis to improve the accuracy and efficiency of diagnosis.
[0045] Step S202, perform semantic analysis on the query information to obtain the corresponding semantic analysis result.
[0046] In this embodiment, the semantic analysis result includes the data type and the query condition. The specific implementation process of performing semantic analysis on the query information to obtain the corresponding semantic analysis result will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated here too much.
[0047] Step S203: Based on the semantic analysis result, perform data source matching and data field extraction processing on the preset metadata database to obtain the corresponding data source location result and data field extraction result.
[0048] In this embodiment, the above metadata database is a metadata management system that pre - constructs metadata such as table structures, field information, and data types in a storage database. The above data source matching processing includes: according to the data type identified from the above semantic analysis result, searching for the corresponding table name and field name in the metadata management system to obtain the corresponding data source location result. The above data field extraction processing includes: according to the query condition identified from the above semantic analysis result, extracting relevant data field information from the metadata management system, including field name, data type, belonging table, etc., to obtain the corresponding data field extraction result.
[0049] Step S204: Based on the semantic analysis result and the data field extraction result, construct the corresponding statistical logic.
[0050] In this embodiment, according to the query condition and data type included in the above semantic analysis result, appropriate logical statistical methods can be selected, such as sorting (ORDER BY), aggregation (SUM, COUNT, AVG, MAX, MIN), grouping (GROUP BY), etc. Then, according to the query condition and the above data field extraction result, construct the logical statistical logic to determine the specific application method and parameters of the above logical statistical method, so as to obtain the corresponding statistical logic.
[0051] Step S205: Based on the semantic analysis result, obtain the corresponding target retrieval statement template.
[0052] In this embodiment, the specific implementation process of obtaining the corresponding target retrieval statement template based on the semantic analysis result will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated here too much.
[0053] Step S206: Based on the semantic analysis result, the data source location result, and the statistical logic, perform parameter filling processing on the target retrieval statement template to obtain the corresponding big data retrieval statement.
[0054] In this embodiment, for the specific implementation process of filling parameters for the target retrieval statement template based on the semantic analysis result, the data source location result, and the statistical logic to obtain the corresponding big data retrieval statement, this application will further describe the details in subsequent specific embodiments and will not elaborate too much here.
[0055] Step S207: Query the preset business data based on the big data retrieval statement to obtain the corresponding query result.
[0056] In this embodiment, according to the specific requirements of the above query information, the data fields to be synchronized can be determined in advance, and then a structured data graph can be constructed based on the provided data fields and used as the above business data to ensure the relevance and integrity of the data. By using a data synchronization tool, real-time dynamic synchronization of the business data can be achieved to ensure the accuracy and timeliness of the data. Among them, the generated big data retrieval statement can be submitted to the corresponding big data platform for execution to query the data result corresponding to the big data retrieval statement from the above business data to obtain the above query result.
[0057] Step S208: Send the query result to the user.
[0058] In this embodiment, for the specific implementation process of sending the query result to the user, this application will further describe the details in subsequent specific embodiments and will not elaborate too much here.
[0059] This application first receives the query information input by the user through a preset interaction interface; then performs semantic analysis on the query information to obtain the corresponding semantic analysis result; then performs data source matching and data field extraction processing on a preset meta-database based on the semantic analysis result to obtain the corresponding data source location result and data field extraction result; subsequently constructs the corresponding statistical logic based on the semantic analysis result and the data field extraction result; and obtains the corresponding target retrieval statement template based on the semantic analysis result; further performs parameter filling processing on the target retrieval statement template based on the semantic analysis result, the data source location result and the statistical logic to obtain the corresponding big data retrieval statement; and performs query processing on the preset business data based on the big data retrieval statement to obtain the corresponding query result; finally, sends the query result to the user. After this application receives the query information input by the user through the interaction interface, it obtains the semantic analysis result by performing semantic analysis on the query information, and performs data source matching and data field extraction processing on the preset meta-database based on the semantic analysis result to obtain the corresponding data source location result and data field extraction result. Furthermore, it constructs the corresponding statistical logic based on the semantic analysis result and the data field extraction result, and obtains the corresponding target retrieval statement template based on the semantic analysis result. Subsequently, it performs parameter filling processing on the target retrieval statement template based on the semantic analysis result, the data source location result and the statistical logic to obtain the corresponding big data retrieval statement, and performs query processing on the preset business data based on the big data retrieval statement to obtain the corresponding query result, and then sends the query result to the user. In this way, through this application, it can efficiently and accurately understand the user's query, and can automatically generate a big data retrieval statement that meets the user's query requirements. Furthermore, by executing the big data retrieval statement, it can quickly and accurately complete the data query processing corresponding to the user's query, effectively improving the processing efficiency of data query and ensuring the accuracy of the generated query result.
[0060] In some alternative implementation manners, step S202 includes the following steps:
[0061] Preprocess the query information to obtain the corresponding target query information.
[0062] In this embodiment, the above preprocessing may include steps such as word segmentation, stop word removal, stemming or lemmatization to improve the accuracy of semantic analysis.
[0063] Exemplarily, in the financial field, the query information input by the user may include information such as transaction date, transaction amount, transaction type, etc. in querying personal bank account transaction records.
[0064] In the medical field, the query information input by the user may include information such as medical history, examination results, diagnosis reports, etc. in querying personal medical records.
[0065] Invoke a preset processing tool.
[0066] In this embodiment, the above-mentioned processing tool can adopt a natural language processing (NLP) tool, and this processing tool has the function of semantic analysis of user input. Among them, the selection of the above-mentioned processing tool is not specifically limited, and it can be selected according to actual business needs.
[0067] Perform semantic role labeling processing on the target query information based on the processing tool to obtain a corresponding semantic role labeling result.
[0068] In this embodiment, semantic role labeling can be performed on the input target query information by using the above-mentioned processing tool to identify key components such as the subject, predicate, and object in the query, as well as the semantic relationships between them, so as to obtain a corresponding semantic role labeling result.
[0069] Identify the data type and query conditions corresponding to the target query information based on the semantic role labeling result.
[0070] In this embodiment, content analysis can be performed on the above-mentioned semantic role labeling result to identify the data types (such as table names and field names) and query conditions (such as equal to, greater than, less than, contains, etc.) involved in the target query information.
[0071] Generate the semantic analysis result based on the data type and the query condition.
[0072] In this embodiment, the above-mentioned data type and query condition can be integrated to obtain a corresponding semantic analysis result. Among them, the semantic analysis result includes the data type and the query condition.
[0073] In this application, the query information is preprocessed to obtain corresponding target query information; then a preset processing tool is invoked; and semantic role labeling processing is performed on the target query information based on the processing tool to obtain a corresponding semantic role labeling result; then the data type and query conditions corresponding to the target query information are identified based on the semantic role labeling result; subsequently, the semantic analysis result is generated based on the data type and the query condition. In this application, the query information is preprocessed to obtain corresponding target query information, then semantic role labeling processing is performed on the target query information based on the use of the processing tool to obtain a corresponding semantic role labeling result, and then the data type and query conditions corresponding to the target query information are identified based on the semantic role labeling result, and the semantic analysis result is generated based on the data type and the query condition, so that automatic and accurate semantic analysis processing of the query information can be achieved based on the use of the processing tool, effectively improving the processing accuracy and intelligence of semantic analysis, and ensuring the accuracy of the obtained semantic analysis result.
[0074] In some alternative implementation manners of this embodiment, the semantic analysis result includes the data type and the query condition; step S205 includes the following steps:
[0075] Call a preset retrieval statement template library.
[0076] In this embodiment, according to actual processing requirements, a database for storing retrieval statement templates under different data types and query conditions is pre-constructed, that is, the above-mentioned retrieval statement template library.
[0077] Query a specified retrieval statement template that matches the data type and the query condition from the retrieval statement template library.
[0078] In this embodiment, by analyzing the obtained semantic analysis result, a retrieval statement template that matches the query condition and data type included in the semantic analysis result can be selected from the retrieval statement template library, that is, the above-mentioned specified retrieval statement template is obtained.
[0079] Use the specified retrieval statement template as the target retrieval statement template.
[0080] This application calls a preset retrieval statement template library; then queries a specified retrieval statement template that matches the data type and the query condition from the retrieval statement template library; subsequently, uses the specified retrieval statement template as the target retrieval statement template. By calling the preset retrieval statement template library, and based on the use of the retrieval statement template library, this application can quickly and accurately query a specified retrieval statement template that matches the data type and query condition included in the semantic analysis result and use it as the target retrieval statement template, improving the acquisition efficiency and acquisition accuracy of the retrieval statement template.
[0081] In some alternative implementation manners, step S206 includes the following steps:
[0082] Extract specified parameters that meet the requirements from the semantic analysis result, the data source location result, and the statistical logic.
[0083] In this embodiment, the above-specified parameters refer to the parameters extracted from the above semantic analysis results, data source location results, and statistical logic that need to be filled into the retrieval statement template, including table names, field names, statistical methods, sorting fields, sorting methods, etc. Specifically, the semantic analysis results corresponding to the user query can be parsed by using natural language processing (NLP) technology to identify keywords and phrases, and determine the query intent, such as which fields to select, what kind of statistics to perform, whether sorting is required, etc. Then, according to the data source name or context mentioned in the data source location results corresponding to the user query, locate the specific data table. If the query involves multiple data sources, determine the association relationship between them, and analyze the statistical requirements in the statistical logic corresponding to the user query, such as summation, average value, maximum value, minimum value, etc., and determine the sorting field and sorting direction (ascending or descending). Furthermore, organize the information identified in the above steps into a parameter list, including table names, field names, statistical methods, sorting fields, and sorting directions, etc.
[0084] Perform formatting processing on the specified parameters to obtain the corresponding target parameters.
[0085] In this embodiment, the above formatting processing includes data type conversion, adding quotes or parentheses, special character processing, and parameter verification processing. Specifically, data type conversion includes: checking the data type of each parameter to ensure that they match the types expected in the retrieval statement template. For example, field names usually need to be converted to string type and quotes are added. Adding quotes or parentheses includes: adding quotes to string-type parameters and adding necessary parentheses to functions or subqueries according to the syntax rules of the big data retrieval language. Special character processing includes: if the parameter contains special characters, such as spaces, percent signs, etc., then escape processing is required. Parameter verification processing includes: verifying the formatted parameters to ensure that they have no syntax errors or logical contradictions.
[0086] Fill the target parameters into the corresponding positions in the target retrieval statement template to obtain the filled target retrieval statement template.
[0087] In this embodiment, by finding the parameter placeholders in the above target retrieval statement template, and then replacing the formatted target parameters into the corresponding placeholder positions in the above target retrieval statement template, the filled target retrieval statement template is obtained.
[0088] Use the filled target retrieval statement template as the big data retrieval statement.
[0089] In this embodiment, after obtaining the filled target retrieval statement template, the filled target retrieval statement template can be further subjected to syntax verification to ensure that there are no syntax errors, so as to obtain the final big data retrieval statement.
[0090] This application extracts specified parameters that meet the requirements from the semantic analysis result, the data source location result, and the statistical logic; then formats the specified parameters to obtain corresponding target parameters; then fills the target parameters into the corresponding positions in the target retrieval statement template to obtain a filled target retrieval statement template; subsequently, the filled target retrieval statement template is used as the big data retrieval statement. This application extracts specified parameters that meet the requirements from the semantic analysis result, the data source location result, and the statistical logic, formats the specified parameters to obtain target parameters, and then fills the target parameters into the corresponding positions in the target retrieval statement template, so as to efficiently and accurately complete the parameter filling process of the target retrieval statement template, effectively improving the generation efficiency of the big data retrieval statement and ensuring the statement accuracy of the generated big data retrieval statement.
[0091] In some alternative implementation manners, step S208 includes the following steps:
[0092] Obtain a preset data verification policy.
[0093] In this embodiment, the policy content of the above data verification policy includes: checking whether the query result contains all necessary data fields and records.
[0094] Verify the query result based on the data verification policy.
[0095] In this embodiment, the query result can be verified according to the policy content of the above data verification policy. If it is detected that the query result contains all necessary data fields and records, it is determined that the query result passes the verification; if it is detected that the query result does not contain all necessary data fields and records, it is determined that the query result fails the verification.
[0096] If the query result passes the verification, obtain a preset target sending method.
[0097] In this embodiment, there is no specific limitation on the selection of the above target sending method, which can be determined according to actual business requirements. For example, any one of the methods such as email sending, SMS sending, report sending, chart sending, and presentation sending can be adopted.
[0098] Based on the target sending method, send the query result to the user.
[0099] In this embodiment, the feedback process of automatically sending the above query result to the user can be executed according to the obtained target sending method, so as to complete the response process for the user's data query.
[0100] This application obtains a preset data verification policy; then verifies the query result based on the data verification policy; if the query result passes the verification, it obtains a preset target sending method; subsequently, based on the target sending method, the query result is sent to the user. After this application performs query processing on business data based on the use of big data retrieval statements to obtain the corresponding query result, it will also intelligently verify the query result based on the use of the data verification policy, and after detecting that the query result passes the verification, it will automatically send the query result to the user based on the use of the target sending method, thereby effectively ensuring the data accuracy of the query result sent to the user, improving the intelligence of the feedback processing of the query result, and being beneficial to improving the user experience.
[0101] In some alternative implementation manners of this embodiment, after step S207, the above electronic device may further perform the following steps:
[0102] Obtain a preset analysis target.
[0103] In this embodiment, the above analysis target may be an analysis target preset according to actual business analysis requirements. For example, it may include understanding the distribution of specific content among different audience groups, or evaluating the popularity of a certain content strategy, and so on.
[0104] Obtain relevant data corresponding to the analysis target from the query result.
[0105] In this embodiment, all data related to the above analysis target can be extracted from the above query result. Specifically, it may include user behavior data (such as clicks, shares, comments), user attribute data (such as age, gender, geographical location), and content attribute data (such as type, theme, release time), etc., and be used as the above relevant data.
[0106] Obtain a preset multi-dimensional analysis strategy.
[0107] In this embodiment, the strategy content of the above multi-dimensional analysis strategy includes: Dimension analysis corresponding to audience distribution: Analyze the preferences and participation degrees of different audience groups for content according to user attribute data. Charts (such as pie charts, bar charts) can be used to display the proportions and distributions of different audience groups. Dimension analysis corresponding to content popularity: Evaluate the popularity of content according to user behavior data. This may involve calculating indicators such as the click-through rate, share rate, and number of comments of the content, and using trend charts to display the changes of these indicators over time. Other dimensions: According to business requirements, other dimensions such as content type, release time, and device type can also be analyzed for their impacts on the audience and content popularity.
[0108] Analyze and process the relevant data based on the multi-dimensional analysis strategy to obtain corresponding analysis results.
[0109] In this embodiment, the relevant data can be analyzed and processed according to the dimension analysis steps corresponding to the strategy content of the above multi-dimensional analysis strategy, so as to obtain corresponding analysis results. In addition, the obtained analysis results can be interpreted to identify key insights and trends, such as a certain audience group being particularly interested in a specific type of content, or the popularity of content increasing significantly during a certain period.
[0110] Store the analysis results.
[0111] In this embodiment, the storage method of the above analysis results is not specifically limited and can be determined according to actual storage requirements. For example, any one of local database storage, disk storage, cloud disk, blockchain storage, etc. can be used.
[0112] This application obtains a preset analysis target; then obtains relevant data corresponding to the analysis target from the query results; then obtains a preset multi-dimensional analysis strategy; subsequently, analyzes and processes the relevant data based on the multi-dimensional analysis strategy to obtain corresponding analysis results, and stores the analysis results. After this application performs query processing on preset business data based on big data retrieval statements to obtain corresponding query results, it will also automatically and intelligently obtain relevant data corresponding to the preset analysis target from the query results, and then perform analysis and processing on the relevant data based on the use of the multi-dimensional analysis strategy to obtain corresponding analysis results, so as to quickly and intelligently complete the accurate and comprehensive analysis of the query results, improve the processing efficiency and intelligence of the analysis and processing of the query results, and is conducive to supporting subsequent business decisions and continuous improvement based on the obtained analysis results. In addition, it will automatically store the analysis results to ensure the data security of the analysis results.
[0113] In some alternative implementation manners of this embodiment, after step S207, the above electronic device may further perform the following steps:
[0114] Invoke a preset big data model.
[0115] In this embodiment, the underlying AI big data model (such as machine learning model, deep learning model) can be used in advance and appropriate algorithms and model parameters can be selected to ensure the accuracy and reliability of the model, and then the query sample data is trained to identify the mapping relationship between the query result data and the business value data included in the query sample data, so as to construct a model with the function of performing business value analysis on the query result data, that is, the above big data model.
[0116] Perform business value analysis and processing on the query results based on the big data model to obtain corresponding business value analysis results.
[0117] In this embodiment, the generated query results can be evaluated through the above big data model for business value analysis, and based on the evaluation results, it can be determined which content, audience, or strategy in the query results has higher business value, and the obtained information can be integrated to obtain corresponding business value analysis results.
[0118] Generate corresponding optimization suggestions based on the business value analysis results.
[0119] In this embodiment, corresponding optimization suggestions can be generated according to the business value analysis results output by the big data model and business requirements, specifically including suggestions for adjusting content strategies, optimizing audience positioning, improving user experience, etc.
[0120] Send the business value analysis results and the optimization suggestions to relevant personnel.
[0121] In this embodiment, the above business value analysis results and the generated optimization suggestions can be presented to relevant personnel in an easy-to-understand manner, such as using reports, charts, or presentations, so as to improve the intelligence of data presentation and the usage experience of relevant personnel.
[0122] This application calls a preset big data model; then performs business value analysis and processing on the query results based on the big data model to obtain corresponding business value analysis results; then generates corresponding optimization suggestions based on the business value analysis results; subsequently, sends the business value analysis results and the optimization suggestions to relevant personnel. After this application performs query processing on preset business data based on a big data retrieval statement to obtain corresponding query results, it will also automatically and intelligently perform business value analysis and processing on the query results based on the use of the big data model to obtain corresponding business value analysis results, and then generate corresponding optimization suggestions based on the business value analysis results, and send the business value analysis results and the optimization suggestions to relevant personnel, so that it can automatically and accurately implement business value analysis and processing for query results based on the use of the big data model, and provide valuable optimization suggestions, thereby helping to support business decision-making and continuous improvement.
[0123] In some alternative implementation manners, the obtained user information has obtained the user's consent and complies with the provisions of relevant laws and relevant policies.
[0124] In addition, the non-company software tools or components that appear in the embodiments of this application are only introduced by way of example and do not represent actual use.
[0125] It should be understood that the sequence numbers of the steps in the above embodiments do not indicate the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0126] It should be emphasized that to further ensure the privacy and security of the above query results, the above query results can also be stored in a node of a blockchain.
[0127] The blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer, etc.
[0128] The embodiments of this application can obtain and process relevant data based on artificial intelligence technology. Among them, Artificial Intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results of theory, methods, technologies, and application systems.
[0129] Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0130] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above embodiments of the method can be completed by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above embodiments of each method. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disc, a Read-Only Memory (ROM), or a Random Access Memory (RAM), etc.
[0131] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the sequence indicated by the arrows. Unless otherwise clearly stated in this document, there is no strict order restriction for the execution of these steps, and they can be executed in other sequences. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0132] Further referring to Figure 3 , as an implementation of the method shown above Figure 2 , an embodiment of a data query device is provided in this application. This device embodiment corresponds to Figure 2 the method embodiment shown, and this device can be specifically applied to various electronic devices.
[0133] As Figure 3 shown, the data query device 300 described in this embodiment includes: a receiving module 301, a first analysis module 302, a first processing module 303, a construction module 304, a first acquisition module 305, a second processing module 306, a query module 307, and a first sending module 308. Among them:
[0134] The receiving module 301 is configured to receive query information input by a user through a preset interaction interface;
[0135] The first analysis module 302 is configured to perform semantic analysis on the query information to obtain a corresponding semantic analysis result;
[0136] The first processing module 303 is configured to perform data source matching and data field extraction processing on a preset meta-database based on the semantic analysis result to obtain a corresponding data source location result and data field extraction result;
[0137] The construction module 304 is configured to construct a corresponding statistical logic based on the semantic analysis result and the data field extraction result;
[0138] The first acquisition module 305 is configured to obtain a corresponding target retrieval statement template based on the semantic analysis result;
[0139] The second processing module 306 is configured to perform parameter filling processing on the target retrieval statement template based on the semantic analysis result, the data source location result, and the statistical logic to obtain a corresponding big data retrieval statement;
[0140] A query module 307, configured to perform a query process on preset service data based on the big data retrieval statement to obtain a corresponding query result;
[0141] A first sending module 308, configured to send the query result to the user.
[0142] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the data query method in the foregoing embodiment, and will not be elaborated herein.
[0143] In some optional implementation manners of this embodiment, the first analysis module 302 includes:
[0144] A preprocessing sub-module, configured to preprocess the query information to obtain corresponding target query information;
[0145] A first calling sub-module, configured to call a preset processing tool;
[0146] An annotation sub-module, configured to perform semantic role annotation processing on the target query information based on the processing tool to obtain a corresponding semantic role annotation result;
[0147] An identification sub-module, configured to identify a data type and a query condition corresponding to the target query information based on the semantic role annotation result;
[0148] A generation sub-module, configured to generate the semantic analysis result based on the data type and the query condition.
[0149] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the data query method in the foregoing embodiment, and will not be elaborated herein.
[0150] In some optional implementation manners of this embodiment, the semantic analysis result includes the data type and the query condition; the first acquisition module 305 includes:
[0151] A second calling sub-module, configured to call a preset retrieval statement template library;
[0152] A query sub-module, configured to query a specified retrieval statement template that matches the data type and the query condition from the retrieval statement template library;
[0153] A first determination sub-module, configured to use the specified retrieval statement template as the target retrieval statement template.
[0154] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the data query method in the foregoing embodiment, and will not be elaborated herein.
[0155] In some alternative implementation manners of this embodiment, the second processing module 306 includes:
[0156] An extraction sub-module, configured to extract specified parameters that meet requirements from the semantic analysis result, the data source location result, and the statistical logic;
[0157] A processing sub-module, configured to perform formatting processing on the specified parameters to obtain corresponding target parameters;
[0158] A filling sub-module, configured to fill the target parameters into corresponding positions in the target retrieval statement template to obtain a filled target retrieval statement template;
[0159] A second determination sub-module, configured to use the filled target retrieval statement template as the big data retrieval statement.
[0160] In this embodiment, the operations respectively performed by the foregoing modules or units correspond one by one to the steps of the data query method in the foregoing implementation manner, and will not be elaborated herein.
[0161] In some alternative implementation manners of this embodiment, the first sending module 308 includes:
[0162] A first acquisition sub-module, configured to acquire a preset data verification policy;
[0163] A verification sub-module, configured to verify the query result based on the data verification policy;
[0164] A second acquisition sub-module, configured to acquire a preset target sending manner if the query result passes the verification;
[0165] A sending sub-module, configured to send the query result to the user based on the target sending manner.
[0166] In this embodiment, the operations respectively performed by the foregoing modules or units correspond one by one to the steps of the data query method in the foregoing implementation manner, and will not be elaborated herein.
[0167] In some alternative implementation manners of this embodiment, the data query device further includes:
[0168] A second acquisition module, configured to acquire a preset analysis target;
[0169] A third acquisition module, configured to acquire relevant data corresponding to the analysis target from the query result;
[0170] A fourth acquisition module, configured to acquire a preset multi-dimensional analysis policy;
[0171] A second analysis module, configured to analyze and process the relevant data based on the multi-dimensional analysis strategy to obtain corresponding analysis results;
[0172] A storage module, configured to store the analysis results.
[0173] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the data query method in the foregoing embodiment, and will not be elaborated herein.
[0174] In some optional implementation manners of this embodiment, the data query device further includes:
[0175] An invocation module, configured to invoke a preset big data model;
[0176] A third analysis module, configured to perform business value analysis and processing on the query results based on the big data model to obtain corresponding business value analysis results;
[0177] A generation module, configured to generate corresponding optimization suggestions based on the business value analysis results;
[0178] A second sending module, configured to send the business value analysis results and the optimization suggestions to relevant personnel.
[0179] In this embodiment, the operations respectively performed by the above modules or units correspond one by one to the steps of the data query method in the foregoing embodiment, and will not be elaborated herein.
[0180] To solve the above technical problems, an embodiment of the present application further provides a computer device. Specifically, please refer to Figure 4 , Figure 4 which is a basic structural block diagram of the computer device in this embodiment.
[0181] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are communicatively connected to each other through a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented. Among them, those skilled in the art of the present technology can understand that a computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0182] The computer device may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The computer device may perform human-computer interaction with a user through means such as a keyboard, a mouse, a remote control, a touchpad, or a voice control device.
[0183] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a FlashCard, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and the external storage device of the computer device 4. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed in the computer device 4, such as computer-readable instructions of the data query method. In addition, the memory 41 may also be used to temporarily store various types of data that have been output or will be output.
[0184] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as running the computer-readable instructions of the data query method.
[0185] The network interface 43 may include a wireless network interface or a wired network interface, and the network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0186] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:
[0187] In an embodiment of the present application, after receiving the query information input by the user through the interaction interface, the present application performs semantic analysis on the query information to obtain a semantic analysis result, and based on the semantic analysis result, performs data source matching and data field extraction processing on a preset meta-database to obtain corresponding data source location results and data field extraction results. Then, based on the semantic analysis result and the data field extraction result, a corresponding statistical logic is constructed, and a corresponding target retrieval statement template is obtained based on the semantic analysis result. Subsequently, parameter filling processing is performed on the target retrieval statement template based on the semantic analysis result, the data source location result, and the statistical logic to obtain a corresponding big data retrieval statement, and query processing is performed on the preset business data based on the big data retrieval statement to obtain a corresponding query result, and then the query result is sent to the user. In this way, through the present application, the user query can be efficiently and accurately understood, and a big data retrieval statement that meets the user's query requirements can be automatically generated. Furthermore, by executing the big data retrieval statement, the data query processing corresponding to the user query can be quickly and accurately completed, effectively improving the processing efficiency of data query and ensuring the accuracy of the generated query result.
[0188] The present application also provides another implementation manner, that is, to provide a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor, so that the at least one processor executes the steps of the data query method as described above.
[0189] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:
[0190] In an embodiment of the present application, after receiving the query information input by the user through the interaction interface, the present application performs semantic analysis on the query information to obtain a semantic analysis result, and based on the semantic analysis result, performs data source matching and data field extraction processing on a preset meta-database to obtain corresponding data source location results and data field extraction results. Then, based on the semantic analysis result and the data field extraction result, a corresponding statistical logic is constructed, and a corresponding target retrieval statement template is obtained based on the semantic analysis result. Subsequently, parameter filling processing is performed on the target retrieval statement template based on the semantic analysis result, the data source location result, and the statistical logic to obtain a corresponding big data retrieval statement, and query processing is performed on the preset business data based on the big data retrieval statement to obtain a corresponding query result, and then the query result is sent to the user. In this way, through the present application, the user query can be efficiently and accurately understood, and a big data retrieval statement that meets the user's query requirements can be automatically generated. Furthermore, by executing the big data retrieval statement, the data query processing corresponding to the user query can be quickly and accurately completed, effectively improving the processing efficiency of data query and ensuring the accuracy of the generated query result.
[0191] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0192] Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The accompanying drawings show the preferred embodiments of the present application, but do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosed content of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions recorded in the foregoing specific embodiments, or perform equivalent replacements for some of the technical features. Any equivalent structure directly or indirectly using the content of the specification and drawings of the present application in other related technical fields shall be within the scope of the patent protection of the present application by the same token.
Claims
1. A data query method, characterized in that: The steps include: Receiving query information input by a user through a preset interactive interface; Performing semantic analysis on the query information to obtain corresponding semantic analysis results; Based on the semantic analysis result, a data source matching and data field extraction process is performed on a preset metadata database to obtain a corresponding data source positioning result and data field extraction result; Constructing corresponding statistical logic based on the semantic analysis result and the data field extraction result; Acquire a corresponding target search sentence template based on the semantic analysis result; Based on the semantic analysis result, the data source location result and the statistical logic, parameter filling processing is performed on the target search statement template to obtain a corresponding big data search statement; Based on the big data search statement, query the preset business data to obtain corresponding query results; The query result is sent to the user.
2. The data query method according to claim 1, characterized in that: The step of performing semantic analysis on the query information to obtain corresponding semantic analysis results specifically includes: Preprocessing the query information to obtain corresponding target query information; Call the preset processing tool; Performing semantic role labeling processing on the target query information based on the processing tool to obtain corresponding semantic role labeling results; Identifying the data type and query condition corresponding to the target query information based on the semantic role labeling result; The semantic analysis result is generated based on the data type and the query condition.
3. The data query method according to claim 2, characterized in that: The semantic analysis result includes the data type and the query condition; The step of acquiring the corresponding target search statement template based on the semantic analysis result specifically includes: Call the preset search statement template library; Querying a specified search statement template that matches the data type and the query condition from the search statement template library; The designated search sentence template is used as the target search sentence template.
4. The data query method according to claim 1, characterized in that: The step of performing parameter filling processing on the target search statement template based on the semantic analysis result, the data source location result and the statistical logic to obtain the corresponding big data search statement specifically includes: Extracting specified parameters that meet the requirements from the semantic analysis results, the data source location results, and the statistical logic; Formatting the specified parameters to obtain corresponding target parameters; Fill the target parameter into the corresponding position in the target search statement template to obtain a filled target search statement template; The filled target search statement template is used as the big data search statement.
5. The data query method according to claim 1, characterized in that: The step of sending the query result to the user specifically includes: Get the preset data verification strategy; Verifying the query result based on the data verification strategy; If the query result passes the verification, the preset target sending method is obtained; Based on the target sending mode, the query result is sent to the user.
6. The data query method according to claim 1, characterized in that: After the step of querying the preset business data based on the big data search statement to obtain the corresponding query result, the method further includes: Get the preset analysis target; Acquire relevant data corresponding to the analysis target from the query result; Obtain preset multi-dimensional analysis strategies; Analyze and process the relevant data based on the multi-dimensional analysis strategy to obtain corresponding analysis results; The analysis result is stored.
7. The data query method according to claim 1, characterized in that: After the step of querying the preset business data based on the big data search statement to obtain the corresponding query result, the method further includes: Call the preset big data model; Performing business value analysis on the query results based on the big data model to obtain corresponding business value analysis results; Generate corresponding optimization suggestions based on the business value analysis results; The business value analysis results and the optimization suggestions are sent to relevant personnel.
8. A data query device, characterized in that: include: A receiving module, used to receive query information input by a user through a preset interactive interface; A first analysis module, used to perform semantic analysis on the query information to obtain corresponding semantic analysis results; A first processing module, configured to perform data source matching and data field extraction processing on a preset metadata database based on the semantic analysis result, and obtain corresponding data source location results and data field extraction results; A construction module, used to construct corresponding statistical logic based on the semantic analysis result and the data field extraction result; A first acquisition module, used to acquire a corresponding target search sentence template based on the semantic analysis result; A second processing module is used to perform parameter filling processing on the target search statement template based on the semantic analysis result, the data source location result and the statistical logic to obtain a corresponding big data search statement; A query module, used to query the preset business data based on the big data search statement to obtain corresponding query results; The first sending module is used to send the query result to the user.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the data query method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the data query method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Data processing method and device based on artificial intelligence, computer equipment and medium
CN120832364A
Data query method and device based on interface generation, equipment and medium
CN120873072A
Data query method, device and equipment based on interface generation and medium
CN120873072B
Data query method and device, computer equipment and storage medium
CN121705331A
