Intelligent parking data question and answer method and system based on business rule constraint

By performing semantic and structured parsing on user-input parking service query requests and generating controlled query statements in conjunction with parking service rules, the problems of incorrect query object selection and inaccurate data association in existing technologies are solved, achieving highly accurate and reliable smart parking data query.

CN123048569APending Publication Date: 2026-11-06深圳市前海智慧园区有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611149997.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing smart parking data query methods lack business rule constraints, leading to incorrect selection of query objects, inconsistent field statistical standards, and inaccurate data correlations, which affect the accuracy and reliability of queries.

Method used

The system performs semantic parsing on user-input parking service query requests to generate parking data query statements. It then performs structured parsing and adjusts preset constraint rules in conjunction with parking service rules to generate controlled query statements, accesses the parking service database, and processes the query results.

Benefits of technology

It improves the accuracy and reliability of smart parking data queries, adapts to complex parking business scenarios, reduces data query errors caused by misunderstandings of business, and enhances data access control and the readability of query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123048569A_ABST
    Figure CN123048569A_ABST
Patent Text Reader

Abstract

This application relates to a smart parking data question-answering method and system based on business rule constraints. The method includes: acquiring a parking business query request input by a user and performing semantic parsing to obtain the query object, query indicators, and query conditions; generating a parking data query statement based on parking business rules; performing structured parsing on the parking data query statement and adjusting it according to preset constraint rules to obtain a controlled query statement; accessing the parking business database based on the controlled query statement to obtain the parking business query results, determining the result processing method based on the query results, and generating data analysis results. The system includes a query processing module, a query control module, a data access module, and a result processing module. This application can improve the accuracy, security, and business adaptability of parking data queries by combining parking business rule constraints with the query generation and execution process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart parking data processing, and in particular to a smart parking data question-and-answer method and system based on business rule constraints. Background Technology

[0002] With the development of smart parking systems, a large amount of business data, such as parking orders, vehicle entry and exit records, payment records, and parking space usage, is generated during parking lot management. Existing parking data analysis usually relies on fixed query interfaces or preset reports, requiring users to manually set query conditions according to the database structure, which is difficult to meet the need for quickly obtaining business data through natural language.

[0003] Currently, natural language-based question answering technology can convert user input into database query statements to achieve business data retrieval. However, smart parking data has strong business relevance, and different parking lots have different data structures, field definitions, and statistical methods. Existing methods lack constraint mechanisms for parking business rules, which can easily lead to problems such as incorrect selection of query objects, inconsistent field statistical methods, and inaccurate data relationships.

[0004] Furthermore, existing data question answering methods lack a mechanism for verifying and dynamically adjusting the execution process of query statements. This makes it difficult to combine user permissions, business rules, and execution feedback to correct the query process, resulting in insufficient accuracy and reliability of data queries and affecting the overall practical application effect. Summary of the Invention

[0005] The purpose of this application is to solve the problem of low accuracy in parking data queries.

[0006] According to one aspect of this application, a smart parking data question-answering method based on business rule constraints is provided, comprising: Obtain the parking service query request input by the user, and perform semantic parsing on the parking service query request to obtain the query object, query index and query conditions; Based on the query object, the query index, and the query conditions, and in conjunction with parking business rules, a parking data query statement is generated. The parking data query statement is parsed in a structured manner, and adjusted according to preset constraint rules to obtain a controlled query statement; Access the parking business database based on the controlled query statement to obtain the parking business query results; The result processing method is determined based on the parking service query results, and data analysis results are generated based on the result processing method.

[0007] Preferably, the step of performing structured parsing on the parking data query statement and adjusting the parking data query statement according to preset constraint rules includes: Convert the parking data query statement into a query structure; Identify the data object nodes, field nodes, association nodes, and condition nodes in the query structure; The data object node, the field node, the association node, and the condition node are detected according to the preset constraint rules. When the data object node, the field node, the association node, or the condition node does not meet the preset constraint rules, the data relationship between the corresponding nodes is adjusted to obtain the controlled query statement.

[0008] Preferably, the process of generating the preset constraint rules includes: Determine the target parking service data domain based on the parking service query request; Obtain the set of data rules corresponding to the target parking service data domain; The preset constraint rules are generated based on the data rule set; The data rule set includes data object rules, field rules, and execution rules. The data object rules are used to limit the scope of data objects corresponding to parking business data and the relationships between data objects. The field rules are used to limit the business meaning and statistical methods corresponding to parking business fields. The execution rules are used to limit the query execution methods and data access conditions.

[0009] Preferably, generating the preset constraint rule based on the data rule set includes: Obtain the data object description information corresponding to the target parking business data domain; Based on the data object description information, the accessible data objects and the relationships between them are determined, and the data object rules are generated. Obtain the field description information corresponding to the accessible data object; Based on the field description information, determine the meaning of the fields and the field statistical methods, and generate the field rules; Obtain query execution restriction information, and generate the execution rule based on the query execution restriction information.

[0010] Preferably, generating the preset constraint rule according to the execution rule includes: Obtain the user's corresponding data access permissions; The scope of data that is allowed to be accessed is determined based on the aforementioned data access permissions; Generate access restrictions based on the permitted data range; The access restrictions are added to the condition nodes or related nodes in the query structure to adjust the query structure.

[0011] Preferably, the step of generating a parking data query statement based on the query object, the query index, and the query conditions, combined with parking business rules, includes: Determine the query scope based on the query object; Determine the query target based on the query scope; Generate query planning information based on the query objective, the query indicators, and the query conditions; The data objects, data fields, and data filtering conditions are determined based on the query planning information. The parking data query statement is generated based on the data object, the data fields, and the data filtering conditions.

[0012] Preferably, determining the data object, data field, and data filtering conditions based on the query planning information includes: Determine whether the query object corresponds to a preset query scenario; When the query object corresponds to the preset query scenario, the data object, the data field, and the data filtering conditions are determined according to the query template corresponding to the preset query scenario. When the query object does not correspond to the preset query scenario, the data object, the data field, and the data filtering conditions are determined based on the query planning information.

[0013] Preferably, determining the data object, the data field, and the data filtering conditions based on the query planning information includes: The query processing flow is determined based on the query planning information; The data source is determined according to the query processing flow described above; The query calculation method is determined based on the data source; The parking data query statement is generated according to the query calculation method.

[0014] Preferably, the step of accessing the parking business database based on the controlled query statement to obtain parking business query results includes: Obtain the execution feedback information generated during the execution of the controlled query statement; Based on the execution feedback information, determine the abnormal data object, abnormal field, or abnormal relationship; Adjust the parking data query statement according to the abnormal data object, the abnormal field, or the abnormal relationship, and regenerate the controlled query statement; Retrieve the parking service query results after re-execution; The result processing method is determined based on the amount of data in the parking service query results. When the amount of data reaches a preset threshold, the parking service query results are statistically processed to generate a result summary, and the data analysis results are generated based on the result summary.

[0015] This application also provides a smart parking data question-and-answer system based on business rule constraints, which executes the smart parking data question-and-answer method as described in any of the above claims during runtime, including: The query processing module is used to receive query requests and generate query data based on the query requests; A query control module, connected to the query processing module, is used to perform constraint processing on the query data to generate controlled query data; A data access module, connected to the query control module, is used to access the business database based on the controlled query data and obtain query results; The result processing module is connected to the data access module and is used to process the query results and generate output results.

[0016] This application offers the following advantages: By semantically parsing user-input parking service query requests, the query objects, query indicators, and query conditions are obtained. Combined with parking service rules, a parking data query statement is generated, enabling the natural language query process to adapt to the parking service data structure and business statistical logic, reducing the user's reliance on database structures for queries. Furthermore, by performing structured parsing of the parking data query statement, it is converted into a query structure containing data object nodes, field nodes, association nodes, and condition nodes. Based on preset constraint rules, the query structure is adjusted to ensure that the generated query statement meets the requirements of parking service data scope, field meaning, and data association relationships, thereby improving the accuracy of the query results.

[0017] Meanwhile, this application generates access restrictions based on user access permissions and adds these restrictions to the condition nodes or related nodes in the query structure. This integrates data access permissions into the query generation process, preventing data access issues that exceed the scope of permissions during the query. Furthermore, by obtaining execution feedback information during the query execution process and adjusting the query statement based on abnormal data objects, abnormal fields, or abnormal relationships, dynamic correction of the query process can be achieved, improving the stability of query execution in complex parking business scenarios.

[0018] Furthermore, this application determines the corresponding result processing method based on the data volume of parking business query results, and performs statistical processing on the query results when the data volume reaches a preset threshold to generate a result summary, enabling users to quickly obtain key business information and reducing information redundancy caused by the output of large amounts of raw data. Through the above methods, this application can improve the business adaptability, query accuracy, and data processing efficiency in the smart parking data question-and-answer process. Attached Figure Description

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

[0020] Figure 1 This is a logic block diagram of the smart parking data question-answering method based on business rule constraints according to one embodiment of this application. Detailed Implementation

[0021] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. Preferred embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of this application.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.

[0023] Please refer to Figure 1 One embodiment of this application provides a smart parking data question-answering method based on business rule constraints, including: S10. Obtain the parking service query request input by the user, and perform semantic parsing on the parking service query request to obtain the query object, query index and query conditions.

[0024] In this step, it's important to note that parking service query requests are data query needs proposed by users regarding parking service data. These can include different types of data query needs such as parking lot operation status, vehicle traffic status, charging status, and parking space utilization status. By semantically parsing the parking service query requests, the user's query needs, described in natural language, can be transformed into structured query elements. The query object represents the range of data to be queried, such as the target parking lot, parking area, or parking service type; the query metric represents the statistical content to be obtained, such as order quantity, parking duration, charging amount, or parking space occupancy rate; and the query conditions limit the data filtering range, such as time range, area range, and service status. By parsing the business meaning in the query request, the subsequent query process can generate corresponding data processing flows based on the parking service semantics, without requiring the user to directly understand the underlying database structure.

[0025] S20. Generate parking data query statements based on the query object, query indicators, and query conditions, combined with parking business rules.

[0026] In this step, it's important to note that parking business rules describe the relationships between data and the statistical logic within a parking business scenario, enabling the query generation process to determine the corresponding data access method based on business semantics. Specifically, the corresponding business data range can be determined based on the query object, the corresponding data calculation method can be determined based on the query indicators, and the data filtering logic can be determined in conjunction with the query conditions, thereby generating parking data query statements that correspond to parking business needs. Unlike methods that directly generate query statements based on natural language, this implementation introduces parking business rules to constrain the query generation process, ensuring that the generated query statements conform to the organization and statistical standards of parking business data, reducing data query errors caused by misunderstandings of business needs.

[0027] S30. Perform structured parsing on the parking data query statement and adjust the parking data query statement according to preset constraint rules to obtain a controlled query statement.

[0028] In this step, it's important to note that structured parsing transforms parking data query statements into a recognizable data relationship structure, enabling the processing of data objects, field references, data associations, and query conditions in a structured manner. Preset constraint rules limit the allowed data range, field usage, and data relationships during parking business data queries. When a data access relationship in a parking data query statement is detected as not meeting preset constraint rules, the corresponding data relationships can be adjusted to ensure the adjusted query statement meets parking business data processing requirements. For example, data objects involved in the query can be replaced, field reference relationships can be corrected, or data association conditions can be supplemented, thereby forming a controlled query statement that meets business rule restrictions. By structurally adjusting the generated query statement, directly accessing data relationships that do not meet business requirements can be avoided.

[0029] In one implementation, when the query structure includes association nodes between multiple data objects, preset constraint rules can also detect these association nodes to determine whether the association relationships between different data objects comply with the current user permissions and parking business rules. For example, when a user is only allowed to access parking data in a specified area, even if the query statement also includes parking data objects from other areas, the system can adjust the data association relationships based on the data range restrictions corresponding to the association nodes, ensuring that the final controlled query statement only involves the data range that the user is allowed to access.

[0030] S40. Access the parking business database based on controlled query statements to obtain parking business query results.

[0031] In this step, it's important to note that the parking business database stores business data generated during parking operations, including parking record data, fee data, vehicle data, and operational statistics. Controlled query statements are query instructions that have been constrained by business rules and structurally adjusted, used to access the parking business database and retrieve target data. During query execution, the current query process can be assessed based on the execution status returned by the database and the query results. If the query statement exhibits data structure mismatches, abnormal field references, or incorrect relationships, the query process can be adjusted based on the execution feedback information to ensure that the query process adapts to the actual parking business data environment.

[0032] S50. Determine the result processing method based on the parking service query results, and generate data analysis results based on the result processing method.

[0033] In this step, it's important to note that parking service query results can be output in different scales and formats depending on the query requirements. When the query result data volume is small, the results can be output directly. When the query result data volume is large, statistical analysis, data summarization, or result abstraction can be performed on the results to generate data analysis results that are easy for users to understand. By selecting the appropriate processing method based on the data characteristics of the query results, information redundancy caused by directly outputting large amounts of raw data can be avoided, enabling users to quickly obtain key business information from the parking service query results.

[0034] Furthermore, during the generation of data analysis results, corresponding data processing tools can be invoked based on the user's further processing requirements to extend the processing of parking service query results. Specifically, tool description information can be pre-established, which describes the processing type, input parameters, and output results corresponding to different data processing tools. When it is determined that the parking service query results require further processing, the corresponding data processing tool can be matched according to the processing requirements, and tool invocation parameters can be generated based on the parking service query results. These tool invocation parameters are then sent to the corresponding data processing tool to obtain the further processed results.

[0035] For example, if a user queries the parking revenue statistics for a certain area and then requests the generation of a revenue trend chart, the system can match the chart generation tool according to the processing needs and convert the parking revenue statistics into the corresponding tool input parameters, so that the chart generation tool can generate the visualization analysis results. When a user requests the generation of an operation analysis report, the system can call the report generation tool to further organize the query results and form the corresponding data analysis file.

[0036] By linking query results with external data processing tools, the system can expand its data processing capabilities according to user needs, enabling parking business data query results to not only be output in text form, but also to be further generated into charts, reports, and other forms of data analysis results.

[0037] The technical solution implemented in this embodiment can semantically parse user-input parking service query requests and generate corresponding parking data query statements in conjunction with parking service rules, enabling the natural language query process to adapt to the parking service data structure and business statistical logic. By performing structured parsing on the generated parking data query statements and adjusting them based on preset constraint rules, the query process is constrained by data range, field relationships, and business rules, reducing data anomalies caused by query logic errors. By executing controlled query statements and processing results based on query result characteristics, the accuracy, reliability, and readability of parking service data queries can be improved, meeting the data analysis needs of complex parking operation scenarios.

[0038] In one specific embodiment, the parking data query statement is structured and parsed, and adjusted according to preset constraint rules, including: Convert parking data query statements into query structures.

[0039] In this step, it's important to note that the query structure is used to convert the original parking data query statement into a recognizable representation of data relationships, enabling the analysis and adjustment of business object references within the query statement. Specifically, this can be achieved by parsing the parking data query statement to extract data access objects, field reference relationships, data associations, and filtering logic, and then organizing them according to a preset data structure to form the corresponding query structure. Compared to directly matching the query statement text, this implementation method, by establishing a query structure, allows subsequent constraint processing to adjust for different components within the query statement, improving the accuracy of the query adjustment process.

[0040] Identify data object nodes, field nodes, association nodes, and condition nodes in the query structure.

[0041] In this step, it's important to note that data object nodes represent the data source objects involved in the query process, such as parking lot data tables, order data tables, and vehicle record data tables; field nodes represent the data fields called during the query process, such as amount fields, time fields, and status fields; association nodes represent the data connection relationships between different data objects; and condition nodes represent the filtering and limiting conditions during the query process. By breaking down the query structure into different types of nodes, the data access scope, field usage methods, and data association logic in the query statement can be determined separately, thus providing a structured processing foundation for subsequent constraint adjustments based on business rules.

[0042] Data object nodes, field nodes, association nodes, and condition nodes are detected according to preset constraint rules.

[0043] In this step, it's important to note that the preset constraint rules describe the restrictions in the parking business data query process, including the data object access scope, field usage rules, data association requirements, and query condition restrictions. Specifically, the information of each node in the query structure can be matched against the preset constraint rules to determine whether the data objects in the current query statement meet the business data scope requirements, whether field calls meet business statistical requirements, whether the relationships between data objects conform to business association logic, and whether the query conditions meet access restriction requirements. By performing rule detection based on the node dimension, the problem of insufficient business meaning identification caused by relying solely on the database structure for query judgment can be avoided.

[0044] When a data object node, field node, association node, or condition node does not meet the preset constraint rules, the data relationship between the corresponding nodes is adjusted to obtain a controlled query statement.

[0045] In this step, it's important to clarify that adjusting the data relationships between corresponding nodes refers to modifying the node connection methods, data reference relationships, or conditional restriction relationships in the query structure according to preset constraint rules, ensuring that the adjusted query structure meets the requirements of parking business data processing. For example, when the data object called by the query statement does not conform to the current business scope, the corresponding data object node can be adjusted; when the field statistical method in the query statement does not match the business rules, the data processing relationship corresponding to the field node can be adjusted; when the association method between different data objects does not meet the business association logic, the connection relationship between the associated nodes can be adjusted. After completing the node adjustment, a controlled query statement is regenerated based on the adjusted query structure, ensuring that the query statement executes data querying while satisfying the business rule constraints.

[0046] The above method avoids simply validating the generated query statement. Instead, it transforms the query statement into a query structure that includes data objects, fields, associations, and conditional relationships. The query structure is then adjusted based on parking business rules, enabling the query process to adapt to complex parking business data environments.

[0047] The technical solution implemented in this embodiment can convert the generated parking data query statement into a structured query relationship, and perform rule detection and adjustment for different types of data relationships, so that the query statement can meet the requirements of parking business data objects, field meanings, and business relationships. At the same time, by constraining the query structure, it reduces the problems of data object errors, field reference errors, and abnormal relationships caused by business misunderstandings during the generation of query statements from natural language, thereby improving the accuracy and reliability of parking business data queries.

[0048] In one specific embodiment, the process of generating preset constraint rules includes: The target parking service data domain is determined based on the parking service query request.

[0049] In this step, it's important to note that the target parking business data domain characterizes the data scope and business domain corresponding to the current parking business query request. Specifically, based on the query object, query indicators, and query conditions in the parking business query request, the business content involved in the user's needs can be identified, determining the data scope corresponding to the current query requirement. For example, when the parking business query request is for querying parking fees, the fee data domain can be determined; when the parking business query request is for querying parking space usage, the parking space operation data domain can be determined. By first determining the target parking business data domain, the subsequent rule acquisition process can match the corresponding data constraints to the current business scenario, avoiding the use of general rules unrelated to the current query requirement.

[0050] Obtain the set of data rules corresponding to the target parking business data domain.

[0051] In this step, it's important to note that the data rule set describes the constraints corresponding to data objects, data fields, and the query execution process within the target parking business data domain. Specifically, multiple data rule sets can be pre-established based on the organization method, business statistical requirements, and data access requirements of the parking business data, and the corresponding data rule set can be matched according to the target parking business data domain. The data rule set includes data object rules, field rules, and execution rules. Data object rules describe the scope of data objects that can participate in the query within the parking business data, as well as the allowed data relationships between different data objects; field rules describe the business meaning, statistical scope, and calculation method of parking business fields; and execution rules describe the allowed data access methods and access restrictions during query execution.

[0052] Preset constraint rules are generated based on the set of data rules.

[0053] In this step, it should be noted that the preset constraint rules are used to restrict and correct the data relationships involved in the parking data query statement during its generation and adjustment. Specifically, data object rules, field rules, and execution rules in the data rule set can be integrated to form constraint relationships corresponding to the target parking business data domain, and these constraint relationships are used as the basis for judgment during the query statement adjustment process. When the data objects, field reference relationships, data association methods, or execution conditions involved in the generated parking data query statement do not conform to the preset constraint rules, the query structure can be adjusted based on the corresponding rules to ensure that the final generated query statement meets the requirements of parking business data processing.

[0054] The data rule set includes data object rules, field rules, and execution rules. Data object rules are used to limit the scope of data objects corresponding to parking business data and the relationships between data objects. Field rules are used to limit the business meaning and statistical methods of parking business fields. Execution rules are used to limit the query execution methods and data access conditions.

[0055] The technical solution implemented in this embodiment can determine the corresponding data domain based on the parking business query request, and match the corresponding data rule set for different business data domains, so that the query generation process can be constrained in combination with the parking business scenario; by unifying the management of data object rules, field rules and execution rules, preset constraint rules for the parking business data query process are formed, so that the generated query statement can simultaneously meet the requirements of data range, business statistics and access execution, reducing the problems of data object errors, inconsistent statistical standards and abnormal data access caused by the misunderstanding of business in the natural language query process, and improving the accuracy and reliability of the smart parking data question and answer process.

[0056] In one specific embodiment, generating preset constraint rules based on a set of data rules includes: Obtain the data object description information corresponding to the target parking business data domain.

[0057] In this step, it should be noted that the data object description information is used to describe the business data objects contained in the target parking business data domain and the corresponding data attributes of each business data object. Specifically, the data object description information corresponding to the target parking business data domain can be obtained based on a pre-established parking business data model. This data object description information may include data object identifiers, data object types, data fields contained in the data object, and descriptions of the relationships between data objects. For example, for the parking order business data domain, description information corresponding to parking order objects, vehicle objects, parking lot objects, and payment record objects can be obtained. By obtaining the data object description information, the basic data objects available for querying within the current business data domain can be determined, providing a basis for subsequently establishing constraint relationships between data objects.

[0058] Based on the data object description information, determine the accessible data objects and the relationships between them, and generate data object rules.

[0059] In this step, it's important to note that data object rules are used to limit the range of data objects allowed to be accessed during the query process and the association methods between different data objects. Specifically, the data object description information can be parsed to determine the data objects allowed to participate in the query within the current target parking business data domain, and the corresponding association relationships can be determined based on the data association descriptions between the data objects. For example, it can be determined that parking order objects and vehicle objects are associated through vehicle identifiers, and parking order objects and parking lot objects are associated through parking lot identifiers. Data object rules are generated based on the determined accessible data objects and association relationships, ensuring that subsequent generation or adjustment of parking data query statements can only be performed based on data objects that conform to the business relationships, avoiding abnormal query results due to incorrect data object selection or incorrect association relationships.

[0060] Retrieve the field description information corresponding to the accessible data object.

[0061] In this step, it's important to note that the field description information is used to describe the business meaning and data processing method of each data field in the accessible data object. Specifically, the corresponding field description information can be obtained based on the identified accessible data object. This field description information may include field identifier, field name, field business meaning, field data type, and calculation relationships between fields. For example, for the amount field in a parking order object, the field description information can determine that this field represents the order fee; for the time field, it can determine its corresponding business meaning, such as parking time, entry time, or exit time. By obtaining the field description information, the problem of misunderstanding the business meaning when querying solely based on field names can be avoided.

[0062] Based on the field description information, determine the meaning of the fields and the field statistical methods, and generate field rules.

[0063] In this step, it's important to note that field rules are used to define the business meaning and statistical methods for parking business fields. Specifically, the actual meaning of different fields in the parking business scenario can be determined based on the field description information, and the corresponding data statistical methods can be further determined. For example, for the parking duration field, it can be determined that it is statistically calculated based on the vehicle's dwell time; for the fee amount field, it can be determined that it is statistically calculated based on the order amount. Generating field rules based on the field meaning and statistical methods ensures that field calls and statistical calculations in the query statement conform to the statistical standards of the parking business, avoiding deviations in query results due to the different meanings of the same field in different business scenarios.

[0064] Obtain query execution restriction information and generate execution rules based on the query execution restriction information.

[0065] In this step, it's important to note that the query execution restriction information describes the execution constraints during the parking business data query process, including user access permissions, data access scope, query execution restrictions, and data security requirements. Specifically, query execution restriction information can be obtained based on the data management requirements corresponding to the current parking business data domain. Based on this information, the allowed data access scope, allowed data operations, and restrictions during the query process are determined, thereby generating execution rules. These execution rules restrict data access behavior during query statement generation and execution, ensuring that the query process not only meets business logic requirements but also complies with data access security requirements.

[0066] The above method converts the data object description information, field description information, and query execution restriction information corresponding to the target parking business data domain into data object rules, field rules, and execution rules, respectively, forming a complete set of preset constraint rules. This ensures that subsequent parking data query statements are simultaneously constrained by data object relationships, field business meanings, and execution conditions.

[0067] The technical solution implemented in this embodiment can establish corresponding data object rules, field rules, and execution rules based on the target parking business data domain, so that the parking data query process has constraints corresponding to the business scenario. By uniformly describing the data object association, field statistical methods, and query execution conditions, query anomalies caused by insufficient understanding of the database structure, incorrect identification of field meanings, and unclear access scope during natural language generation query can be reduced, thereby improving the accuracy and stability of the parking business data question and answer process.

[0068] In one specific embodiment, generating preset constraint rules based on execution rules includes: Obtain the user's corresponding data access permissions.

[0069] In this step, it's important to note that data access permissions characterize the scope of a user's access to parking service data and the data operations they can perform. Specifically, based on the user's identity information initiating the parking service query request, the corresponding permission configuration relationship can be obtained. This permission configuration relationship can include the range of parking lots the user can access, the range of service data, and the types of data allowed to be queried. For example, parking lot managers can access the operational data of their assigned parking lot, while area managers can access aggregated data from multiple parking lots. By obtaining the user's corresponding data access permissions, subsequent query processes can be constrained according to the user's actual permission range, preventing users with different permissions from accessing data beyond their authorized scope.

[0070] The scope of data that can be accessed is determined based on data access permissions.

[0071] In this step, it's important to note that the allowed data access scope is used to limit the data objects and corresponding data content that the current user can query. Specifically, the permission scope information in the data access permissions is matched with data objects in the target parking business data domain to determine the data objects, data fields, and data record range that the user is allowed to access. For example, the allowed parking lot data objects can be determined based on the user's management region, and the allowed fee data or operational statistics data can be determined based on the user's role. By associating user permissions with parking business data objects, a data access boundary corresponding to the user's identity can be formed.

[0072] Generate access restrictions based on the range of data that are allowed to be accessed.

[0073] In this step, it's important to note that access restrictions are used to convert the data range corresponding to user permissions into data constraints that can be enforced during the query process. Specifically, corresponding data filtering conditions, association restrictions, or field access restrictions can be generated based on the allowed data range, ensuring that subsequent queries only retrieve data that meets the permission requirements. For example, when a user is only allowed to query data for a specific parking lot, filtering conditions targeting parking lot identifiers can be generated; when a user is only allowed to access certain business fields, corresponding field restrictions can be generated. By converting permission information into query constraints, access control can be transformed from external access judgments into data relationship constraints during the query process.

[0074] Add access restrictions to the condition or related nodes in the query structure to adjust the query structure.

[0075] In this step, it's important to note that the query structure represents the structural relationships between data objects, fields, associations, and query conditions in a parking data query statement. Specifically, access restrictions can be added to the condition node or association node in the query structure based on the data constraint type corresponding to the access restriction conditions. When access restrictions are used to limit the range of data records, they can be added to the condition node; when access restrictions involve the data access range between different data objects, they can be added to the association node, thereby adjusting the data association relationships in the query structure. The adjusted query structure can generate controlled query statements that meet user access permission requirements, ensuring that the query execution process simultaneously satisfies business rule constraints and data access security requirements.

[0076] The technical solution implemented in this embodiment can convert user data access permissions into data constraint relationships that can be applied to the query structure, and embed access restrictions into condition nodes or related nodes in the query structure, so that permission control is transformed from the traditional data access interception method to structured constraints in the query generation process; by combining user permissions, business data objects and query structure for unified control, the problem of unauthorized access when generating query statements can be avoided, and the security and reliability of the parking business data query process can be improved.

[0077] In one specific embodiment, a parking data query statement is generated based on the query object, query indicators, and query conditions, combined with parking business rules, including: Determine the scope of the query based on the query object.

[0078] In this step, it's important to note that the query object represents the parking service content the user wishes to query, and the query scope defines the data coverage corresponding to the current query request. Specifically, semantic recognition can be performed on the query object to determine the business entities involved in the query request and the corresponding data scope. For example, when the query object is the parking operation status of a certain area, the data scope of parking lots within that area can be determined; when the query object is the vehicle entry and exit status of a specific parking lot, the vehicle record data scope of that parking lot can be determined. By determining the query scope based on the query object, irrelevant data access can be avoided when directly generating query statements based on user input, improving the accuracy of subsequent query planning.

[0079] Determine the query target based on the query scope.

[0080] In this step, it's important to clarify that the query objective is used to further define the data content and analysis direction required for the current query task. Specifically, based on the data objects included in the query scope, business relationships, and user query needs, the data subjects to be queried and their corresponding data processing objectives can be determined. For example, for a parking revenue query, the query objective can be the statistical correlation between parking order data and fee data within a specified range; for a parking space utilization query, the query objective can be the statistical relationship between parking lot status data and vehicle parking records. By further converting the query scope into a query objective, the subsequent query planning process can revolve around a clearly defined data processing purpose.

[0081] Generate query planning information based on the query target, query indicators, and query conditions.

[0082] In this step, it's important to note that the query planning information describes the data processing steps required to achieve the current query objective, including data source selection, data processing logic, and the combination of query conditions. Specifically, the data content to be included in the calculation can be determined based on the query objective, the corresponding data calculation method can be determined based on the query indicators, and the data filtering logic can be determined in conjunction with the query conditions, thus forming the query planning information. For example, when a user queries parking revenue within a specified time range, the query planning information may include obtaining parking order data, filtering order records within the target time range, and performing statistical calculations on the charging field. By pre-generating query planning information, the problem of lacking business logic analysis when directly generating query statements can be avoided.

[0083] Determine the data objects, data fields, and data filtering conditions based on the query planning information.

[0084] In this step, it's important to note that data objects represent the data sources accessed during query execution, data fields represent the data content retrieved from the data objects, and data filtering conditions limit the data range of the query results. Specifically, based on the data processing logic in the query planning information, corresponding data objects can be matched, and the data fields to be accessed and the corresponding data filtering conditions can be determined according to business rules. For example, based on the query objective, it can be determined that parking order objects and payment record objects need to be accessed; based on the query indicators, it can be determined that the order amount field needs to be accessed; and based on the query conditions, time range filtering conditions can be determined. By determining specific query elements based on the query planning information, the generated query statement can simultaneously meet business needs and data structure requirements.

[0085] Generate parking data query statements based on data objects, data fields, and data filtering conditions.

[0086] In this step, it's important to note that the parking data query statement is used to send a data access request to the parking business database to obtain data results that meet the user's query requirements. Specifically, data access relationships can be established based on defined data objects, query content can be generated based on data fields, data filtering logic can be generated based on data filtering conditions, and data association methods and statistical calculation methods can be determined in conjunction with parking business rules, thereby generating the corresponding parking data query statement. The generated parking data query statement is not directly derived from natural language, but rather formed based on the determination of the query scope, analysis of the query objectives, and query planning, ensuring that the query statement is adapted to the parking business data structure and business statistical requirements.

[0087] Additionally, it should be noted that during the generation of parking data query statements, multiple related data processing procedures can be executed based on the query planning information to progressively determine the data access logic corresponding to the parking business query request. Specifically, business semantic recognition can be performed on the query object to determine the corresponding data range; the corresponding data source and data association relationship can be matched according to the data range; the data calculation method can be determined according to the data source and query indicators; and the parking data query statement can be generated according to the data calculation method.

[0088] Different data processing procedures can correspond to different query processing tasks. These tasks are executed sequentially according to a pre-defined data transfer relationship, with the output of one task serving as the input for the next. For example, the data range determination process can output a target parking business data domain; the data source determination process can determine the corresponding data object based on the target parking business data domain; the query logic determination process can determine the data association method and calculation method based on the data object; and the query generation process can generate a parking data query statement based on the data association method and calculation method.

[0089] By using the above method, the natural language query requirements entered by users can be gradually converted into query execution logic that conforms to the parking business data structure, avoiding problems such as incorrect data object selection, missing query logic, or statistical methods that do not meet business requirements caused by directly generating query statements based on natural language.

[0090] The technical solution implemented in this embodiment can determine the query scope based on the user's query object before generating parking data query statements, and further determine the query target and query planning information, so that natural language query requirements can be gradually converted into a data processing process that conforms to parking business logic; by combining query indicators, query conditions and parking business rules to determine data objects, data fields and data filtering conditions, the generated query statements can be adapted to the parking business data structure and statistical caliber, reducing data query deviations caused by insufficient understanding of business semantics, and improving the accuracy and reliability of query generation in the smart parking data question and answer process.

[0091] In one specific embodiment, determining the data object, data fields, and data filtering conditions based on query planning information includes: Determine whether the query object corresponds to the preset query scenario.

[0092] In this step, it's important to note that preset query scenarios represent business scenarios within the parking service that have fixed query requirements and data processing logic. Specifically, multiple preset query scenarios can be established based on historical parking service query records, operational needs, and pre-configured query rules. Each preset query scenario corresponds to one or more parking service query modes. For example, business scenarios such as parking fee statistics, vehicle entry and exit statistics, and parking space utilization analysis typically have fixed data sources, statistical indicators, and query logic. By determining whether the query object corresponds to a preset query scenario, it can be determined whether the current query request can utilize the pre-configured data query method, thereby improving query generation efficiency.

[0093] When the query object corresponds to a preset query scenario, the data object, data fields, and data filtering conditions are determined according to the query template corresponding to the preset query scenario.

[0094] In this step, it's important to note that the query template describes the data query structure for a predefined query scenario, including the associated data objects, the data fields to be called, and the corresponding data filtering logic. Specifically, when a query object matches a predefined query scenario, the corresponding query template can be invoked, and the data objects, data fields, and data filtering conditions corresponding to the current query requirement can be determined based on the template. For example, for a parking fee statistics scenario, the query template can predefine parking order data objects, fee amount fields, and time range filtering conditions. By using query templates to generate query elements, the dynamic parsing process in repetitive business queries can be reduced, improving the response efficiency and stability of frequently used parking business queries.

[0095] When the query object does not correspond to the preset query scenario, the data object, data fields, and data filtering conditions are determined based on the query planning information.

[0096] In this step, it's important to note that when the query object doesn't belong to the preset query scenario, it indicates that the current query requirement is a non-fixed business query scenario, and existing query templates cannot be directly invoked. In this case, the accessible data objects can be matched based on the query objective, data processing logic, and parking business rules in the query planning information, and the corresponding data fields and data filtering conditions can be further determined. Specifically, the business data objects to be accessed can be determined based on the query objective, the corresponding data fields can be determined based on the query metrics, and the data filtering conditions can be determined based on the query conditions, thereby generating a query structure adapted to the current query requirement. By dynamically planning for non-fixed query scenarios, the system's adaptability to complex parking business query requirements can be improved.

[0097] By using the above methods, depending on whether the query object corresponds to a preset query scenario, the data object, data field, and data filtering conditions are determined by either a query template method or a dynamic generation method based on query planning information. This ensures that both fixed and complex business queries can obtain suitable data query solutions, avoiding the limitation of applicability caused by using a fixed template for all query requests, and also avoiding the reduction in query efficiency caused by dynamically generating all query requests.

[0098] The technical solution implemented in this embodiment can select the corresponding data query generation method according to different types of parking business query needs. For query scenarios with fixed business logic, query elements can be quickly determined through query templates to improve query processing efficiency. For non-fixed query scenarios, data objects, data fields, and data filtering conditions can be dynamically determined based on query planning information to improve the data query adaptability under complex business scenarios, so that the generated parking data query statement can take into account both query efficiency and business adaptability.

[0099] In one specific embodiment, determining the data object, data fields, and data filtering conditions based on query planning information includes: The query processing flow is determined based on the query planning information.

[0100] In this step, it's important to note that the query processing flow describes the data processing steps required to achieve the current query objective. Specifically, based on the query objective, query metrics, and query conditions in the query planning information, the data processing logic corresponding to the current query request can be determined, including the required data acquisition methods, data association methods, and data calculation methods. For example, for a parking revenue statistics query, it can be determined that parking order data needs to be acquired first, then associated with payment record data, and statistical calculations performed based on the target time range. By determining the query processing flow based on the query planning information, user query requirements can be further transformed into executable data processing procedures, providing a basis for subsequently determining data sources and query calculation methods.

[0101] The data source is determined based on the query processing flow.

[0102] In this step, it's important to note that the data source refers to the data objects accessed during the query processing flow. Specifically, the data source can be determined based on the data processing requirements within the query flow, combined with parking business rules. This includes the business data objects to be accessed and their corresponding data relationships. For example, when the query flow involves vehicle parking duration analysis, vehicle entry and exit records can be identified as the data source; when the query flow involves parking revenue analysis, parking order data and fee data can be identified as the data source. By determining the data source according to the query processing flow, data object matching errors caused by directly selecting data tables based on field names can be avoided, improving the adaptability between the query generation process and the parking business data structure.

[0103] The query calculation method is determined based on the data source.

[0104] In this step, it's important to clarify that the query calculation method represents the data processing logic used to obtain the target query results based on the data source. Specifically, the corresponding data calculation method can be determined based on the data structure corresponding to the data source, the query indicators, and the business statistical requirements. This includes data association methods, data filtering methods, data aggregation methods, and data statistical methods. For example, for parking lot utilization calculation, the occupancy ratio calculation method can be determined based on parking space status data and vehicle parking records; for parking revenue statistics, the amount summary calculation method can be determined based on order data and fee data. By combining the data source to determine the query calculation method, the query process can conform to the parking business statistical logic, rather than simply relying on a combination of database fields.

[0105] The parking data query statement is generated based on the query calculation method.

[0106] In this step, it's important to note that the parking data query statement is used to access the parking business database based on the determined data source and query calculation method to obtain query results that meet the user's needs. Specifically, the data objects involved in the query can be determined based on the data source, the data relationships, field calling methods, and data processing logic can be determined based on the query calculation method, and the corresponding query statement can be generated by combining these with the query conditions. The generated parking data query statement reflects the complete processing from data acquisition to data calculation, ensuring that the query statement not only meets the database execution requirements but also conforms to the needs of parking business data analysis.

[0107] The technical solution implemented in this embodiment can further determine the query processing flow based on the query planning information, and determine the corresponding data source and query calculation method based on the query processing flow, so that the generation process of parking data query statement has clear data processing logic; by converting the query requirement into a process of selecting data source and determining calculation method, the query deviation caused by incorrect data object selection and mismatch of calculation logic in the natural language query process can be reduced, and the accuracy and reliability of data question and answer results in complex parking business scenarios can be improved.

[0108] In one specific embodiment, accessing the parking service database based on a controlled query statement to obtain parking service query results includes: Obtain execution feedback information generated during the execution of controlled query statements.

[0109] In this step, it's important to note that the execution feedback information reflects the execution status and results of the controlled query statement in the parking business database. Specifically, during the process of executing the controlled query statement and accessing the parking business database, the database can return execution status information, query exception information, and data return information. The execution status information can be used to determine whether the current query has completed successfully. Query exception information indicates situations such as non-existent data objects, field mismatches, incorrect associations, or query conditions not meeting execution requirements. Data return information helps determine whether the current query results meet the user's needs. By obtaining execution feedback information, the query process can not only rely on the initially generated query statement but also be dynamically adjusted based on the actual execution situation.

[0110] The abnormal data object, abnormal field, or abnormal relationship is determined based on the execution feedback information.

[0111] In this step, it's important to note that abnormal data objects, abnormal fields, and abnormal relationships are used to indicate specific query structure problems that cause controlled queries to fail to execute correctly or to produce unexpected query results. Specifically, execution feedback information can be parsed to determine the location of the exception and identify the corresponding data object, field reference relationship, or relationship between data objects. For example, if the execution feedback indicates that the accessed data table does not exist, the corresponding data object is abnormal; if the execution feedback indicates that a field does not exist or the field type does not match, the corresponding field is abnormal; if the execution feedback indicates that a join condition cannot be executed, the corresponding join relationship is abnormal. By structurally locating the cause of the exception, a clear basis can be provided for subsequent query adjustments.

[0112] Adjust the parking data query statement based on abnormal data objects, abnormal fields, or abnormal relationships, and regenerate the controlled query statement.

[0113] In this step, it's important to note that adjusting the parking data query statement refers to correcting the data access relationships, field call relationships, or association logic in the original query statement based on the problem type determined by the execution feedback information. Specifically, when abnormal data objects exist, the data objects involved in the query can be adjusted; when abnormal fields exist, the field reference relationships can be adjusted; and when abnormal association relationships exist, the association methods between different data objects can be adjusted. After adjusting the parking data query statement, the adjusted query statement is then constrained using preset constraint rules to regenerate a controlled query statement, ensuring that the new controlled query statement meets the parking business rules and database execution requirements.

[0114] Retrieve the parking service query results after re-execution.

[0115] In this step, it's important to note that the re-executed parking service query result is the data obtained by re-accessing the parking service database based on the adjusted controlled query statement. Specifically, the regenerated controlled query statement can be sent to the parking service database for execution, and the corresponding data return result can be obtained. By correcting the query process based on execution feedback, query failures due to initial query statement generation deviations can be avoided, enabling the query process to adaptively adjust to the actual database environment.

[0116] The processing method for the results is determined based on the amount of data in the parking service query results.

[0117] In this step, it's important to note that the result processing method determines the data processing approach used before outputting the parking service query results. Specifically, the amount of data corresponding to the parking service query results can be obtained and compared with a preset threshold. When the amount of data in the parking service query results is small, the query results can be output directly; when the amount of data in the parking service query results is large, further data processing and analysis are required. By selecting the appropriate processing method based on the data size of the query results, information redundancy caused by directly returning a large amount of raw data can be avoided, improving the readability of the query results.

[0118] When the amount of data reaches a preset threshold, the parking service query results are statistically processed to generate a result summary, and data analysis results are generated based on the result summary.

[0119] In this step, it's important to note that the result summary is used to summarize and process large-scale parking business query results to extract key data features that reflect the query requirements. Specifically, when the volume of parking business query results reaches a preset threshold, the data in the query results can be summarized, classified, or statistically processed according to query indicators, statistical rules, and business analysis needs to generate corresponding result summaries. The final data analysis results are then formed based on these result summaries. For example, for a large number of parking order query results, order quantity trend analysis, fee amount statistics, or regional parking situation analysis results can be generated. By summarizing large-scale query results, the cost for users to obtain and understand business data can be reduced.

[0120] The technical solution implemented in this embodiment can identify anomalies in data objects, fields, or relationships during the query process based on execution feedback information from the controlled query statement execution process, and adjust the query statement based on the anomaly information to achieve dynamic correction of the query process. Simultaneously, different result processing methods are selected according to the data scale of the query results, and statistical analysis and summary generation are performed on large-scale query results, enabling parking business data to be presented in a clearer and more effective manner. Therefore, this embodiment can improve the query success rate, result accuracy, and data analysis efficiency in the smart parking data question-and-answer process.

[0121] In this embodiment, it should be noted that the intelligent parking data question-and-answer system based on business rule constraints is used to execute the aforementioned intelligent parking data question-and-answer method. Through data interaction between different functional modules, it realizes a complete processing flow from receiving parking business query requests, processing query constraints, accessing data, to outputting results. Specifically, the query processing module, query control module, data access module, and result processing module form a data transmission relationship, enabling the query process to be controlled in conjunction with parking business rules, rather than directly accessing the parking business database based on user input.

[0122] The query processing module is used to receive query requests and generate query data based on the query requests.

[0123] Specifically, the query processing module acquires parking service query requests input by the user, parses and processes the query requests, and extracts query elements such as query objects, query indicators, and query conditions. Further, the query processing module can determine the corresponding query scope and query targets based on the parking service query requirements, and generate query data for subsequent query processing. By performing business-oriented parsing of the user's natural language query requests, user needs can be converted into data structures that the system can process, enabling subsequent modules to perform data processing based on explicit query information.

[0124] The query control module is connected to the query processing module and is used to perform constraint processing on the query data to generate controlled query data.

[0125] Specifically, the query control module is used to constrain the query data output by the query processing module according to parking business rules. The query control module can detect and adjust the data access scope, field call relationships, and data association methods in the query data based on preset data object rules, field rules, and execution rules, ensuring that the generated controlled query data meets the parking business data processing requirements. Simultaneously, the query control module can also restrict the access scope of the query data based on the user's corresponding data access permissions, ensuring that data query requests from users with different permissions can be executed within their respective data access ranges.

[0126] The data access module is connected to the query control module and is used to access the business database based on the controlled query data to obtain query results.

[0127] Specifically, the data access module receives controlled query data output by the query control module and generates corresponding data access requests based on the controlled query data to access the parking business database. The parking business database stores business data generated during parking operations, such as parking order data, vehicle passage data, fee data, and parking space status data. During the process of obtaining query results, the data access module can also obtain execution feedback information returned by the database and feed this feedback information back to the query control module, enabling the query control module to adjust the query process based on the execution status.

[0128] The result processing module is connected to the data access module and is used to process the query results and generate output results.

[0129] Specifically, the result processing module receives the query results output by the data access module and determines the corresponding data processing method based on the data size, data type, and user query requirements of the query results. When the query result data volume is small, the query results can be directly processed and output; when the query result data volume is large, statistical analysis, data summarization, or abstract processing can be performed on the query results to generate data analysis results that are easy for users to understand. By further processing the query results through the result processing module, information redundancy caused by directly outputting large amounts of business data can be reduced, and the readability of the query results can be improved.

[0130] Through the cooperation of the above modules, the query processing module is responsible for converting user query requirements into processable query data, the query control module is responsible for constraining the query process in conjunction with parking business rules, the data access module is responsible for executing controlled queries and obtaining business data, and the result processing module is responsible for organizing and analyzing the query results, thereby forming a data question and answer processing system for smart parking business scenarios.

[0131] The technical solution implemented in this embodiment enables users to complete parking business data queries based on natural language through the collaborative work of the query processing module, query control module, data access module, and result processing module. Furthermore, it continuously incorporates parking business rules for control during query generation, execution, and result output. By integrating business rule constraints, data access control, and query result processing into the same system architecture, it reduces the reliance on manual configuration of query statements and manual data analysis in traditional data query processes, thereby improving the accuracy, security, and intelligence of parking business data queries.

[0132] In one specific embodiment, taking the data query scenario of a smart parking management platform in a certain city as an example, the smart parking data question-and-answer method based on business rule constraints described in this application will be explained.

[0133] A city's parking operations management personnel need to analyze the operational status of each parking lot in June 2026. The personnel log into the smart parking data Q&A system and enter the query request: "Statistics on parking revenue, number of orders, and average parking duration for all parking lots in Area A in June, sorted by revenue from highest to lowest."

[0134] After the system obtains the parking service query request input by the user, it performs semantic parsing on the query request and identifies the query object as "parking lot operation data in area A". The query indicators include "parking revenue, number of orders and average parking duration". The query conditions include "time range is June 2026, area range is area A and sorting method is descending order of revenue".

[0135] Furthermore, the system determines the query scope based on the query object. Since the query object corresponds to a regional parking operation analysis scenario, the query scope is determined to be the business data of multiple parking lots in Area A that have been connected to the smart parking platform. Based on the query scope, the system determines the query target, namely, to obtain the operational statistics results of each parking lot in Area A within a specified time range.

[0136] After determining the query target, the system generates query planning information based on parking business rules. Specifically, the system determines that it needs to access parking order data, payment data, and vehicle entry and exit record data according to the query indicators. It also determines that it needs to obtain revenue statistics by analyzing the correlation between parking order data and payment data, and calculate the average parking duration using vehicle entry and exit record data.

[0137] Based on the query planning information, the system further determines the corresponding data objects, data fields, and data filtering conditions. For example, it determines the order amount and order time fields in the parking order data object, the fee amount field in the fee data object, and the entry time and exit time fields in the vehicle entry and exit record data object; at the same time, it generates time range filtering conditions so that the query process only processes data generated in June 2026.

[0138] After generating the parking data query statement, the system performs structured parsing, converting the query statement into a query structure that includes data object nodes, field nodes, association nodes, and condition nodes. The system then checks the query structure according to preset constraint rules.

[0139] For example, if the system detects that the current user only has data access permissions for parking lots in area A, but the query statement includes data access range for parking lots throughout the entire city, the system will generate access restriction conditions based on the execution rules corresponding to the user's permissions, add the access restriction conditions to the condition node in the query structure, and adjust the query range to parking lots in area A.

[0140] For example, if the system detects that the query statement uses a relationship between parking order data and vehicle trajectory data, but the parking business rules stipulate that parking duration statistics should be calculated based on vehicle entry and exit record data, then the system will adjust the associated nodes according to the data object rules, replace the vehicle trajectory data with the vehicle entry and exit record data, and regenerate the controlled query statement.

[0141] After constraint adjustment, the system generates a controlled query statement that meets the business rules and access permission requirements, and accesses the parking business database based on the controlled query statement to obtain the parking business query results.

[0142] During execution, the system obtains execution feedback information returned by the database. For example, the system discovers that the preset "fee amount" field does not exist in a parking lot database, while the actual stored field is "actual amount received". In this case, the system identifies the abnormal field based on the execution feedback information, adjusts the field reference relationships in the parking data query statement, replaces the "fee amount" field with the "actual amount received" field, and then generates a new controlled query statement according to the preset constraint rules and re-executes the query.

[0143] After successful re-execution, the system retrieves the query results. For example, the system obtains the statistical results for three parking lots in area A in June 2026: Because the query results contain a large amount of operational data from multiple parking lots, the system determines that the data volume has reached a preset threshold. Therefore, instead of directly outputting all the raw data, it performs statistical processing on the query results to generate a result summary. For example, it generates "Parking Operation Analysis Results for Area A in June," including information such as total area revenue, average order volume, peak parking times, and revenue ranking, and outputs the result summary to the user's device.

[0144] Furthermore, when users raise more complex questions, such as "analyze the main reasons for the decline in parking revenue in area A", the system can generate further analysis requirements based on existing query results, call the corresponding data processing flow according to user needs, perform correlation analysis on data such as changes in the number of parking orders, changes in average parking duration, and changes in parking lot utilization, and output the causal analysis results.

[0145] As can be seen from the above application scenarios, users do not need to understand the specific data table structure and field relationships in the parking business database. They only need to input their natural language query requirements, and the system can complete business semantic parsing, query planning generation, business rule constraints, query execution correction, and result analysis and output, realizing data-driven intelligent question answering for smart parking business scenarios.

[0146] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A smart parking data question-answering method based on business rule constraints, characterized in that, include: Obtain the parking service query request input by the user, and perform semantic parsing on the parking service query request to obtain the query object, query index and query conditions; Based on the query object, the query index, and the query conditions, and in conjunction with parking business rules, a parking data query statement is generated. The parking data query statement is structured and parsed, and adjusted according to preset constraint rules to obtain a controlled query statement; Access the parking business database based on the controlled query statement to obtain the parking business query results; The result processing method is determined based on the parking service query results, and data analysis results are generated based on the result processing method.

2. The intelligent parking data question-and-answer method according to claim 1, characterized in that, The step of performing structured parsing of the parking data query statement and adjusting the parking data query statement according to preset constraint rules includes: Convert the parking data query statement into a query structure; Identify the data object nodes, field nodes, association nodes, and condition nodes in the query structure; The data object node, the field node, the association node, and the condition node are detected according to the preset constraint rules. When the data object node, the field node, the association node, or the condition node does not meet the preset constraint rules, the data relationship between the corresponding nodes is adjusted to obtain the controlled query statement.

3. The intelligent parking data question-and-answer method according to claim 2, characterized in that, The process of generating the preset constraint rules includes: Determine the target parking service data domain based on the parking service query request; Obtain the set of data rules corresponding to the target parking service data domain; The preset constraint rules are generated based on the data rule set; The data rule set includes data object rules, field rules, and execution rules. The data object rules are used to limit the scope of data objects corresponding to parking business data and the relationships between data objects. The field rules are used to limit the business meaning and statistical methods corresponding to parking business fields. The execution rules are used to limit the query execution methods and data access conditions.

4. The intelligent parking data question-and-answer method according to claim 3, characterized in that, The step of generating the preset constraint rule based on the data rule set includes: Obtain the data object description information corresponding to the target parking business data domain; Based on the data object description information, the accessible data objects and the relationships between them are determined, and the data object rules are generated. Obtain the field description information corresponding to the accessible data object; Based on the field description information, determine the meaning of the fields and the field statistical methods, and generate the field rules; Obtain query execution restriction information, and generate the execution rule based on the query execution restriction information.

5. The intelligent parking data question-and-answer method according to claim 4, characterized in that, The step of generating the preset constraint rule according to the execution rule includes: Obtain the user's corresponding data access permissions; The scope of data that is allowed to be accessed is determined based on the aforementioned data access permissions; Generate access restrictions based on the permitted data range; The access restrictions are added to the condition nodes or related nodes in the query structure to adjust the query structure.

6. The intelligent parking data question-and-answer method according to claim 1, characterized in that, The step of generating a parking data query statement based on the query object, the query index, and the query conditions, combined with parking business rules, includes: Determine the query scope based on the query object; Determine the query target based on the query scope; Generate query planning information based on the query objective, the query indicators, and the query conditions; The data objects, data fields, and data filtering conditions are determined based on the query planning information. The parking data query statement is generated based on the data object, the data fields, and the data filtering conditions.

7. The intelligent parking data question-and-answer method according to claim 6, characterized in that, The step of determining the data object, data field, and data filtering conditions based on the query planning information includes: Determine whether the query object corresponds to a preset query scenario; When the query object corresponds to the preset query scenario, the data object, the data field, and the data filtering conditions are determined according to the query template corresponding to the preset query scenario. When the query object does not correspond to the preset query scenario, the data object, the data field, and the data filtering conditions are determined based on the query planning information.

8. The intelligent parking data question-and-answer method according to claim 7, characterized in that, The step of determining the data object, the data field, and the data filtering conditions based on the query planning information includes: The query processing flow is determined based on the query planning information; The data source is determined according to the query processing flow described above; The query calculation method is determined based on the data source; The parking data query statement is generated according to the query calculation method.

9. The intelligent parking data question-and-answer method according to claim 1, characterized in that, The step of accessing the parking business database based on the controlled query statement and obtaining the parking business query results includes: Obtain the execution feedback information generated during the execution of the controlled query statement; Based on the execution feedback information, determine the abnormal data object, abnormal field, or abnormal relationship; Adjust the parking data query statement according to the abnormal data object, the abnormal field, or the abnormal relationship, and regenerate the controlled query statement; Retrieve the parking service query results after re-execution; The result processing method is determined based on the amount of data in the parking service query results. When the amount of data reaches a preset threshold, the parking service query results are statistically processed to generate a result summary, and the data analysis results are generated based on the result summary.

10. A smart parking data question-and-answer system based on business rule constraints, characterized in that, The runtime execution of the smart parking data question-and-answer method as described in any one of claims 1-9 includes: The query processing module is used to receive query requests and generate query data based on the query requests; A query control module, connected to the query processing module, is used to perform constraint processing on the query data to generate controlled query data; A data access module, connected to the query control module, is used to access the business database based on the controlled query data and obtain query results; The result processing module is connected to the data access module and is used to process the query results and generate output results.