Smart city data classification, grading and encryption method, device, equipment and medium
By dynamically adjusting the encryption strength using a weighted scoring model and an environmental threat index, the problem of accuracy and resource waste in smart city data classification, grading, and encryption is solved, providing flexible and accurate data security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGRUI COMM PLANNING & DESIGN
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-05
AI Technical Summary
In existing smart city data security governance, data classification and grading rely on manually predefined rules, which are difficult to cover the dynamic changes in data characteristics and lead to a decline in classification accuracy; encryption strategies adopt a one-size-fits-all static model, resulting in wasted resources or insufficient protection.
The data sensitivity score S is calculated using a weighted scoring model, and the encryption strength E is dynamically determined by combining the environmental threat index T. The corresponding encryption algorithm is then selected, and the encrypted data is stored in a hierarchical storage architecture, which is integrated into the entire data governance lifecycle process.
It has improved the accuracy of data classification, reduced the false judgment rate, optimized the consumption of encrypted resources, and improved the response speed of high-risk events to the second level, thus meeting the security requirements of the smart city big data platform.
Smart Images

Figure CN121984718A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data security, and in particular to a method, apparatus, device, and medium for data classification, grading, and encryption in smart cities. Background Technology
[0002] Currently, with the continuous advancement of smart city construction, massive amounts of multi-source information, including government data, enterprise data, and personal data, are being centrally aggregated into a unified big data platform. This has played a crucial role in promoting efficient urban operation and improving public service levels, enabling city managers to gain a more comprehensive understanding of urban operations and make more informed decisions; providing enterprises with more data resources to support innovative development; and bringing citizens a more convenient living experience. However, throughout the entire lifecycle of data collection, storage, exchange, and application, these data face increasingly severe security challenges, making data security governance a critical issue that urgently needs to be addressed in the development of smart cities.
[0003] In the current field of smart city data security governance, the mainstream approach typically employs traditional methods. Regarding data classification and grading, most rely on rigid strategies based on manually predefined rules. For example, specific fields like "ID number" are hard-coded to be directly assigned a high sensitivity level. Common predefined rules have explicit conditional judgment patterns, such as rules like "IF field name = 'ID number' THEN sensitivity level = high" or "IF data subject = 'public map' THEN sensitivity level = low." In terms of data encryption strategies, a "one-size-fits-all" static encryption model is often adopted, applying the same strength encryption algorithm to all data. For instance, some solutions use a fixed-strength encryption algorithm for all data, such as AES-256 encryption for all data.
[0004] Data classification and grading methods based on manually predefined rules are difficult to cover the dynamic changes in data features. As the system complexity increases, the classification accuracy decreases significantly, and single-dimensional judgment ignores contextual information, resulting in inaccurate data classification. Summary of the Invention
[0005] To enhance the flexibility of data encryption during data transmission in smart cities, this application provides a method, apparatus, device, and medium for data classification, grading, and encryption in smart cities.
[0006] The above-mentioned objective of this application is achieved through the following technical solution: A method for classifying, grading, and encrypting smart city data, the method comprising: Multi-source heterogeneous data is obtained from multiple government business systems through data interfaces. The multi-source heterogeneous data includes at least one of basic population information, legal person registration information, and spatial geographic information. The multi-source heterogeneous data is classified and graded in real time, and the data sensitivity score S is calculated based on the weighted scoring model, where S = w1·A + w2·B + w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients. The encryption strength E is dynamically determined based on the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, k and γ are scaling factors, and the corresponding encryption algorithm is selected based on the value of E. The encrypted data is stored in a tiered storage architecture and integrated into the entire data governance lifecycle process, including data standardization, quality inspection, and asset operation.
[0007] By adopting the above technical solution, multi-source heterogeneous data is acquired from multiple government business systems, comprehensively covering basic population information, legal entity registration information, and spatial geographic information, providing rich and extensive data sources for subsequent data processing. Real-time classification and grading of the multi-source heterogeneous data is performed, and a weighted scoring model is used to calculate the data sensitivity score S. The field sensitivity base value A is determined by matching data fields according to a predefined sensitive field dictionary, providing a basis for classification; the access frequency factor B is calculated based on historical access logs, reflecting the dynamic situation of data usage; and the compliance weight C is automatically assigned according to the business theme to which the data belongs, comprehensively considering business compliance. These multiple factors are combined and weighted by adjustable weight coefficients w1, w2, and w3, which can more accurately quantify data sensitivity, avoid the limitations of single-rule classification, improve the accuracy and adaptability of classification, and increase the classification accuracy rate while reducing the false positive rate to below 5%. The encryption strength E is dynamically determined based on the sensitivity score S and the environmental threat index T. The environmental threat index T is calculated by real-time monitoring of system security logs, reflecting the real-time security status of the system. Encryption strength E combines the sensitivity of the data itself with real-time environmental threats. By selecting the appropriate encryption algorithm based on the E value, a dynamic correlation between encryption strength, data value, and real-time risks can be achieved. This avoids the resource waste or insufficient protection problems caused by a static, one-size-fits-all encryption model, reducing encryption resource consumption and shortening high-risk event response time to the second level, thus lowering the incidence of security incidents. Encrypted data is stored in a hierarchical storage architecture and integrated into the entire data governance lifecycle. Adding secure metadata tags to data standardization facilitates data management and traceability. Integrity verification of encrypted fields during quality checks ensures data quality and security, achieving deep integration of security measures and the data processing chain. This provides quantifiable and evolvable security guarantees for smart city big data platforms.
[0008] In a preferred embodiment, this application can be further configured as follows: The real-time classification and grading of the multi-source heterogeneous data is performed, and a data sensitivity score S is calculated based on a weighted scoring model, where S = w1·A + w2·B + w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients, specifically including: The sensitivity base value A of a field is determined by matching data fields through a predefined sensitive field dictionary, wherein the sensitivity base value A of a field includes an ID number field, a name field, and an address field; The access frequency factor B is calculated based on historical access logs, using the formula B=log 10 (1+F)×20, where F is the average number of visits per day; The compliance weight C is automatically assigned based on the business theme to which the data belongs. The compliance weight C includes legally sensitive data and general data.
[0009] By adopting the above technical solution, a predefined sensitive field dictionary is used to match data fields to determine the field sensitivity baseline value A. This allows for differentiation based on the inherent sensitivity characteristics of different fields. For example, the ID number field typically has high sensitivity, followed by the name field, and the address field also has some sensitivity, thus laying the foundation for accurate subsequent calculation of sensitivity scores. The access frequency factor B is calculated based on historical access logs using the formula B=log 10 (1+F)×20, where the average daily access frequency F reflects the activity level of the data. The higher the access frequency, the more important or attention-grabbing the data may be. Logarithmic calculation can reasonably transform the access frequency into a factor that affects the sensitivity score, avoiding excessive increase in the sensitivity score due to excessive access frequency. A compliance weight C is automatically assigned based on the business theme to which the data belongs, distinguishing between legally sensitive data and general data. Because legally sensitive data is subject to stricter legal protection, it needs to be given a higher weight. This comprehensive consideration of data compliance requirements ensures that the final calculated data sensitivity score S can fully and accurately reflect the true sensitivity of multi-source heterogeneous data, thereby providing a reliable basis for dynamically determining encryption strength and improving the accuracy of data classification, grading, and encryption.
[0010] In a preferred embodiment, this application can be further configured such that, after automatically assigning a compliance weight C based on the business subject to which the data belongs, wherein the compliance weight C includes legally sensitive data and general data, the smart city data classification, grading, and encryption method further includes: A time decay factor D(t) = e^(-0.1t) is introduced to adjust the sensitivity score, where t is the number of days the data is stored. The association risk value R is calculated based on data lineage, and the sensitivity level is automatically increased when data is associated with a highly sensitive table.
[0011] By adopting the above technical solution, a time decay factor D(t)=e^(-0.1t) is introduced to adjust the sensitivity score, where t is the number of days of data storage. As the time t increases, since the exponential function e^(-0.1t) decreases as t increases, the value of the time decay factor becomes smaller as the data storage time becomes longer, thereby causing the sensitivity score to decrease correspondingly. This can prevent historical data from remaining in a highly sensitive state for a long time and occupying a large amount of resources. At the same time, the associated risk value is calculated based on the data lineage relationship and introduced to adjust the sensitivity score. When the data is associated with a highly sensitive table, the associated risk value will increase, thereby automatically increasing the sensitivity level. Through this association analysis, indirect data leakage can be effectively prevented.
[0012] In a preferred example of the present application, it can be further configured that: the encryption strength E is dynamically determined according to the sensitivity score S and the environmental threat index T, where E=k·S+γ·T, k and γ are scaling factors, and the corresponding encryption algorithm is selected based on the value of E. Specifically, it includes: Real-time monitor the system security log and calculate the environmental threat index T, where T=(number of abnormal accesses / total number of accesses)×100; Obtain the value of the encryption strength E and the corresponding algorithm determination threshold, and map the encryption algorithm according to the value of the encryption strength E: select the ChaCha20-128 algorithm when E≤the first threshold, select the AES-256 algorithm when the first threshold 0<E≤the second threshold, and select the RSA-3072 algorithm when E>the second threshold.
[0013] By adopting the above technical solution, the real-time monitoring system security log and calculating the environmental threat index T can accurately obtain the current security threat level faced by the system. Incorporating the environmental threat index T into the calculation formula of the encryption strength E, E = k·S + γ·T, and combining it with the data sensitivity score S, the determination of the encryption strength comprehensively considers the characteristics of the data itself and the real-time security status of the system. For data with a relatively low sensitivity score S but a relatively high environmental threat index T, the encryption strength E will also be correspondingly increased, so as to select a higher-level encryption algorithm; conversely, for data with a relatively high sensitivity score S but a relatively low environmental threat index T, on the premise of ensuring a certain security level, the encryption strength can be appropriately reduced to avoid resource waste caused by excessive encryption. According to the mapping between the encryption strength E value and the corresponding algorithm determination threshold, when E ≤ the first threshold, the ChaCha20-128 algorithm is selected. This algorithm belongs to a lightweight encryption algorithm and is suitable for low-risk scenarios. It can reduce the consumption of computing resources while ensuring basic security and improve the system processing efficiency; when the first threshold 0 < E ≤ the second threshold, the AES-256 algorithm is selected. This is a standard encryption algorithm that can provide moderate security protection and meet the security requirements of most data; when E > the second threshold, the RSA-3072 algorithm is selected. This algorithm is a strong encryption algorithm that can effectively resist advanced persistent threats and ensure the security of highly sensitive data in a high-risk environment. This way of dynamically determining the encryption strength and selecting the corresponding encryption algorithm realizes the optimal allocation of encryption resources, reduces the consumption of encryption resources, enables the system to quickly respond to high-risk events, and effectively reduces the incidence of security events.
[0014] In a preferred example of the present application, it can be further configured that: storing the encrypted data into a hierarchical storage architecture and integrating it into the entire life cycle process of data governance, including data standardization, quality inspection, and asset operation links, specifically including: In the data standardization, adding security metadata tags to the encrypted data, including sensitivity level, encryption algorithm type, and key version number; In the quality inspection, performing integrity verification on the encrypted fields and comparing them through a hash algorithm.
[0015] By adopting the above technical solution, adding security metadata tags to the encrypted data in data standardization can clearly record the sensitivity level, encryption algorithm type, and key version number of the data, facilitating data management and traceability; performing integrity verification on the encrypted fields in quality inspection and comparing them through a hash algorithm can ensure that the encrypted data has not been tampered with during storage and processing, guaranteeing the integrity of the data.
[0016] The above second invention object of the present application is achieved through the following technical solutions: A smart city data classification, grading, and encryption device, comprising: The data acquisition module is used to acquire multi-source heterogeneous data from multiple government business systems through a data interface. The multi-source heterogeneous data includes at least one of basic population information, legal person registration information, and spatial geographic information. The data classification and grading module is used to perform real-time classification and grading of the multi-source heterogeneous data, and calculate the data sensitivity score S based on the weighted scoring model, where S=w1·A+w2·B+w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients. The data encryption module is used to dynamically determine the encryption strength E based on the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, k and γ are scaling factors, and select the corresponding encryption algorithm based on the value of E. The encrypted transmission and storage module is used to store encrypted data in a hierarchical storage architecture and integrate it into the entire data governance lifecycle process, including data standardization, quality inspection, and asset operation.
[0017] By adopting the above technical solution, multi-source heterogeneous data is obtained from multiple government business systems, comprehensively covering basic population information, legal entity registration information, and spatial geographic information, providing rich and extensive data sources for subsequent data processing. Real-time classification and grading of the multi-source heterogeneous data is performed, and a weighted scoring model is used to calculate the data sensitivity score S. The field sensitivity base value A is determined by matching data fields according to a predefined sensitive field dictionary, providing a basis for classification; the access frequency factor B is calculated based on historical access logs, reflecting the dynamic situation of data usage; and the compliance weight C is automatically assigned according to the business theme to which the data belongs, comprehensively considering business compliance. These multiple factors are combined and weighted by adjustable weight coefficients w1, w2, and w3, which can more accurately quantify data sensitivity, avoid the limitations of single-rule classification, improve the accuracy and adaptability of classification, and increase classification accuracy while reducing the false positive rate. The encryption strength E is dynamically determined based on the sensitivity score S and the environmental threat index T. The environmental threat index T is calculated by real-time monitoring of system security logs, reflecting the real-time security status of the system. Encryption strength E combines the sensitivity of the data itself with real-time environmental threats. By selecting the appropriate encryption algorithm based on the E value, a dynamic correlation between encryption strength, data value, and real-time risks can be achieved. This avoids the resource waste or insufficient protection problems caused by a static, one-size-fits-all encryption model, reducing encryption resource consumption and shortening high-risk event response time to the second level, thus lowering the incidence of security incidents. Encrypted data is stored in a hierarchical storage architecture and integrated into the entire data governance lifecycle. Adding secure metadata tags to data standardization facilitates data management and traceability. Integrity verification of encrypted fields during quality checks ensures data quality and security, achieving deep integration of security measures and the data processing chain. This provides quantifiable and evolvable security guarantees for smart city big data platforms.
[0018] The above-mentioned objective three of this application is achieved through the following technical solution: A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described smart city data classification, grading, and encryption method.
[0019] The fourth objective of this application is achieved through the following technical solution: A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described smart city data classification, grading, and encryption method.
[0020] In summary, this application includes at least one of the following beneficial technical effects: 1. Improved accuracy: The classification formula reduces the false positive rate of sensitivity, reduces the waste of encryption resources, improves the accuracy of data classification, and avoids over-protection of low-value data or insufficient protection of highly sensitive data. 2. Adaptive enhancement: Dynamic formulas enable real-time adjustments, improving threat response speed to the second level. It can adaptively adjust the protection level according to real-time risks to cope with sudden threats. 3. Resource optimization: By using the efficiency factor P, performance loss is reduced when CPU load is high, avoiding high-strength encryption from consuming a large amount of computing resources on public or low-sensitivity data, and improving the platform's processing efficiency. Attached Figure Description
[0021] Figure 1 This is a flowchart of a smart city data classification, grading, and encryption method in one embodiment of this application; Figure 2 This is a schematic diagram of a smart city data classification, grading, and encryption device according to an embodiment of this application; Figure 3 This is a schematic diagram of a device according to one embodiment of this application. Detailed Implementation
[0022] The present application will be further described in detail below with reference to the accompanying drawings.
[0023] In one embodiment, such as Figure 1 As shown, this application discloses a method for data classification, grading, and encryption in smart cities, which specifically includes the following steps: S10: Obtain multi-source heterogeneous data from multiple government business systems through data interfaces. Multi-source heterogeneous data includes at least one of basic population information, legal person registration information, and spatial geographic information.
[0024] Specifically, multi-source heterogeneous data is acquired from multiple government service systems through data interfaces. This heterogeneous data includes at least one of the following: basic population information, legal entity registration information, and spatial geographic information. In the construction of smart cities, numerous government service systems exist, generating data of varying types and formats. Data acquisition through data interfaces enables data interaction and integration between different government service systems. Basic population information contains rich personal information, such as ID numbers, names, and addresses, which is crucial for urban population management and public service provision. Legal entity registration information involves the registration status of enterprises and institutions, essential for economic management and market supervision. Spatial geographic information includes the city's topography, landforms, and building distribution, providing basic data support for urban planning and traffic management. The integration of multi-source heterogeneous data provides a more comprehensive and accurate data foundation for various smart city operations.
[0025] S20: Perform real-time classification and grading of multi-source heterogeneous data, and calculate the data sensitivity score S based on the weighted scoring model, where S=w1·A+w2·B+w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients.
[0026] Specifically, the acquired multi-source heterogeneous data undergoes real-time classification and grading. A data sensitivity score S is calculated based on a weighted scoring model, where S = w1·A + w2·B + w3·C. This formula is the core of the entire data classification and grading process, comprehensively evaluating data sensitivity by introducing multiple factors. The field sensitivity base value A is determined by matching data fields according to a predefined sensitive field dictionary. For example, the ID number field, due to its inclusion of important personal identification information, typically has high sensitivity, and its corresponding field sensitivity base value A will also be relatively high; while the name field has relatively low sensitivity, and its corresponding A value will be smaller. The access frequency factor B is calculated based on historical access logs, with the formula B = log 10 (1+F)×20, where F is the average daily number of visits. Visit frequency reflects data usage; frequently accessed data may have higher business value and sensitivity. The compliance weight C is automatically assigned based on the business theme to which the data belongs; the compliance weight C for legally sensitive data is 1, and the compliance weight C for general data is 0.5. Adjustable weight coefficients w1, w2, and w3 default to 0.5, 0.3, and 0.2 respectively, and can be optimized through machine learning. The weight coefficients are dynamically adjusted using gradient descent, with the formula wᵢ⁽ᵗ⁺¹⁾=wᵢ⁽ᵗ⁾-η·(∂L / ∂wᵢ), where L is the loss function (e.g., classification error rate), and η is the learning rate. This optimization method allows the model to adaptively learn data features and continuously improve classification accuracy. Compared to traditional rigid strategies based on manually predefined rules, this weighted scoring model has higher flexibility and adaptability. Traditional methods are static and have a single dimension, which cannot cover the dynamic changes in data features. In contrast, this method introduces multiple dynamic factors, which can be adjusted in real time according to the actual situation of the data. This avoids the problem of overprotecting low-value data or underprotecting highly sensitive data, significantly improving the accuracy of classification. The classification accuracy is higher than that of the rule engine, and the misjudgment rate is reduced.
[0027] S30: The encryption strength E is dynamically determined based on the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, k and γ are scaling factors, and the corresponding encryption algorithm is selected based on the value of E.
[0028] Specifically, the encryption strength E is dynamically determined according to the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, and k and γ are scaling factors. By default, k = 1 and γ = 0.5. The environmental threat index T is calculated based on the intrusion detection log, and the formula is T = (number of abnormal accesses / total number of accesses) × 100. This formula establishes a dynamic association mechanism between the encryption strength and data sensitivity and real-time risk. By continuously monitoring the system security log, abnormal access behaviors can be detected in a timely manner, thereby accurately calculating the environmental threat index T. Map the encryption algorithm according to the value of the encryption strength E. When E ≤ 40, select the ChaCha20-128 algorithm; when 40 < E ≤ 70, select the AES-256 algorithm; when E > 70, select the RSA-3072 algorithm. This dynamic encryption strategy avoids the defects of the traditional "one-size-fits-all" static encryption mode. The traditional mode applies the encryption algorithm with a unified strength to all data, which will consume a large amount of computing resources for public or low-sensitivity data and reduce the platform processing efficiency; for core sensitive data, if a low-strength encryption is used, it cannot effectively resist advanced persistent threat attacks. This method can adaptively adjust the encryption strength according to the actual sensitivity and real-time risk of the data, reduce the consumption of encryption resources, shorten the response time of high-risk events to the second level, and decrease the incidence of security incidents. To further balance security and performance, an efficiency optimization factor can be added. The optimized formula is E' = E - λ·P, where P is the processing efficiency weight, P = (current CPU load of the system / 100), and λ is the efficiency coefficient, with a default value of 0.2. When the system CPU load is high, appropriately reduce the encryption strength to avoid encrypting and dragging down the system performance and ensure business continuity. In addition, to proactively address quantum computing attacks, a quantum-resistant factor Q can be introduced, and the formula is extended to E'' = E' + δ·Q, where Q is based on the quantum computing threat assessment and δ is the adjustment coefficient.
[0029] S40: Store the encrypted data in a hierarchical storage architecture and integrate it into the entire life cycle process of data governance, including data standardization, quality inspection, and asset operation.
[0030] Specifically, encrypted data is stored in a tiered storage architecture and integrated into the entire data governance lifecycle process, including data standardization, quality inspection, and asset operation. In data standardization, secure metadata tags are added to encrypted data, including sensitivity level, encryption algorithm type, and key version number. These security metadata tags provide crucial information for data management and use, facilitating subsequent data processing and security auditing. In quality inspection, the integrity of encrypted fields is verified through hash algorithm comparison. The hash algorithm generates a unique hash value for the data; comparing hash values ensures that the data has not been tampered with during storage and transmission. Integrating this method into the entire data governance lifecycle process achieves deep integration of security measures and business processes, avoiding the existence of security control points as isolated add-on modules. This truly achieves proactive protection and meets the requirements of GDPR, cybersecurity laws, and other regulations for measurable and auditable data security.
[0031] This smart city data classification, grading, and encryption method, through a formulaic algorithm, achieves intelligent and adaptive data classification, grading, and encryption, providing comprehensive, efficient, and quantifiable security guarantees for smart city big data platforms. It effectively addresses issues such as poor adaptability, low resource efficiency, and weak compliance support in the field of smart city data security, thus promoting the development of smart city data security governance.
[0032] In one embodiment, step S20 involves real-time classification and grading of multi-source heterogeneous data, calculating a data sensitivity score S based on a weighted scoring model, where S = w1·A + w2·B + w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients. Specifically, this includes: S21: Match data fields using a predefined sensitive field dictionary to determine the field sensitivity baseline value A, where the field sensitivity baseline value A includes the ID number field, name field, and address field.
[0033] Specifically, in determining the sensitivity baseline value A for a field, a predefined sensitive field dictionary is used to match data fields. This allows for accurate and efficient identification of different types of data fields and the assignment of corresponding sensitivity baseline values. The predefined sensitive field dictionary is built upon a large amount of historical data and actual business needs. During dictionary construction, detailed analysis and evaluation of various data fields are required. For the ID card number field, due to its high sensitivity as it contains important personal identification information, a high sensitivity baseline value is assigned, such as 90. This is because the ID card number is a crucial piece of information uniquely identifying an individual; its leakage could lead to serious consequences such as privacy violations and identity theft.
[0034] The name field has relatively low sensitivity, but it is still part of basic personal information and is usually assigned a moderate sensitivity threshold, such as 60. Names are commonly used identifiers in social interactions, but compared to ID numbers, the risk of their leakage is relatively smaller. The address field, however, contains information such as an individual's residential or work location and also has a certain degree of sensitivity, with a sensitivity threshold possibly set at 70. Leaking address information may expose individuals to risks such as harassment or stalking.
[0035] In practice, after acquiring heterogeneous data from multiple sources, the system performs a word-by-word matching of the fields in the data against a predefined sensitive field dictionary. If a match is successful, the sensitivity baseline value A corresponding to that field is directly retrieved from the dictionary. This matching method is simple and direct, quickly determining the sensitivity of each field and providing a foundation for subsequent calculation of the data sensitivity score S. Moreover, the predefined sensitive field dictionary can be dynamically updated according to actual conditions. As business develops and data types change, new sensitive fields may emerge, or the sensitivity of some fields may change. In such cases, the dictionary can be adjusted promptly to ensure the accuracy and effectiveness of the sensitivity baseline values.
[0036] S22: Calculate the access frequency factor B based on historical access logs, using the formula B=log 10 (1+F)×20, where F is the average number of visits per day.
[0037] Specifically, calculating the access frequency factor B based on historical access logs is another important step in this technical solution. Access frequency is a key factor in measuring the importance and sensitivity of data. This is achieved by using the formula B=log 10 The access frequency factor B is calculated using (1+F)×20, where F is the average number of daily accesses. This formula is designed to fully consider the characteristics of access frequency.
[0038] Increasing the average daily access frequency F by 1 is to avoid the logarithmic operation becoming meaningless when F is 0. Then, taking the base-10 logarithm compresses the range of access frequencies, making the differences between different access frequencies more reasonable in the calculation results. Multiplying by 20 adjusts the calculation result to a suitable range so that it can be used in conjunction with other factors in the calculation of the data sensitivity score S.
[0039] In the actual calculation process, the system extracts access records for each data field from the historical access log and calculates the average daily access count F. For example, if a data field was accessed a total of 300 times in the past 30 days, then its average daily access count F = 300 ÷ 30 = 10. Substituting F = 10 into the formula B = log 10 From (1+F)×20, we can obtain B=log10 (1+10)×20≈log 10 (11)×20≈1.041×20=20.82.
[0040] In this way, the frequency of data access can be converted into a specific numerical value, reflected in the data sensitivity score S. Data with a high access frequency indicates its high importance in the business and may contain more important information; therefore, the increased sensitivity is reflected in the score S through the access frequency factor B. This makes data sensitivity assessment not only depend on the nature of the field itself but also consider the usage of the data.
[0041] S23: Automatically assign compliance weight C based on the business theme to which the data belongs. Compliance weight C includes legally sensitive data and general data.
[0042] Specifically, automatically assigning a compliance weight C based on the business theme to which the data belongs is also crucial. Compliance weight C is mainly divided into two categories: legally sensitive data and general data. The definition of legally sensitive data and general data must be based on relevant laws, regulations, and industry standards. For example, in certain government business scenarios, data involving personal privacy and national security are often defined as legally sensitive data, while some publicly available public service information falls under the category of general data.
[0043] For legally sensitive data, due to its strict legal and regulatory protection and high security requirements, the compliance weight C is set to 1. This means that when calculating the data sensitivity score S, legally sensitive data will have its sensitivity weight increased on top of other factors. For general data, the compliance weight C is set to 0.5, indicating that its sensitivity is relatively low.
[0044] In practice, the system determines whether data is legally sensitive or general based on its business theme. This may require a series of rule matching and logical judgments. For example, if the data is related to an individual's medical and health information, it is usually considered legally sensitive data according to relevant laws and regulations, and the system will automatically set its compliance weight C to 1. However, if the data is about urban public transportation routes, which is publicly available public service data, the system will set its compliance weight C to 0.5.
[0045] This automatic allocation of compliance weights (C) ensures that data sensitivity assessments comply with legal and regulatory requirements, avoiding insufficient protection for legally sensitive data or excessive protection for general data. Simultaneously, the introduction of adjustable weight coefficients w1, w2, and w3 makes the entire weighted scoring model more flexible and adaptive. These weight coefficients can be adjusted according to different business scenarios and security needs. For example, in business scenarios with extremely high requirements for personal privacy protection, the value of w1 can be appropriately increased to strengthen the role of the field sensitivity baseline value A in calculating the data sensitivity score S; while in scenarios where the frequency of data use is more important, the value of w2 can be increased to highlight the impact of the access frequency factor B.
[0046] This method, which calculates the data sensitivity score S based on a weighted scoring model, comprehensively considers three important factors: the field sensitivity baseline value A, the access frequency factor B, and the compliance weight C, and allows for flexible adjustment through adjustable weight coefficients w1, w2, and w3. Compared to traditional single-rule judgment methods, it can more accurately reflect the actual sensitivity of the data.
[0047] Traditional methods often determine data sensitivity based on only one feature, such as classifying sensitivity levels solely by field name. However, this approach lacks flexibility and adaptability, failing to cover dynamic changes in data characteristics and complex business scenarios. This technical solution, by introducing multi-dimensional factors and a weighted scoring model, can comprehensively assess data sensitivity and improve classification accuracy.
[0048] In practical applications, this real-time classification and grading method can promptly identify highly sensitive data, allowing for the implementation of appropriate encryption and protection measures. Data with a high sensitivity score of S will be encrypted using a more advanced encryption algorithm to ensure data security. Conversely, data with a low sensitivity score of S can be encrypted using a lighter-weight encryption method, avoiding unnecessary resource consumption and improving system processing efficiency.
[0049] Furthermore, this method exhibits excellent scalability and adaptability. As business grows and data types evolve, the predefined sensitive field dictionary can be updated, the calculation method for access frequency can be adjusted according to new business needs, and the criteria for compliance weighting can be modified based on changes in laws and regulations. Moreover, the adjustable weight coefficients w1, w2, and w3 can be dynamically optimized using machine learning and other methods, enabling the weighted scoring model to continuously learn and adapt to new data characteristics, thereby continuously improving the accuracy of data classification and grading.
[0050] In summary, the data classification, grading, and encryption methods for smart cities employ a scientific, accurate, flexible, and efficient approach. This approach involves real-time classification and grading of multi-source heterogeneous data, and the calculation of data sensitivity scores (S) based on a weighted scoring model. The various steps work together to comprehensively assess data sensitivity from different perspectives, effectively addressing the complexity and dynamism of multi-source heterogeneous data and meeting the high data security requirements of smart city construction.
[0051] In one embodiment, after step S23, the smart city data classification, grading, and encryption method further includes: S24: Introduce a time decay factor D(t)=e^(-0.1t) to adjust the sensitivity score, where t is the number of days for data storage.
[0052] Specifically, in the step of introducing a time decay factor D(t) = e^(-0.1t) to adjust the sensitivity score, where t is the number of days the data is stored, it is first necessary to clarify the working principle of the time decay factor. As the number of days the data is stored increases, the timeliness and sensitivity of the data typically decrease gradually. For example, some news and information data have high attention and sensitivity in the early stages of publication, but their value gradually diminishes over time. By introducing a time decay factor, the assessment of data sensitivity can be made more consistent with reality.
[0053] In practice, the system records the storage start time of each piece of data during the data storage process. When it is necessary to calculate the data sensitivity score, the number of days t for data storage is determined based on the difference between the current time and the storage start time. Then, the time decay factor D(t) = e^(-0.1t) is applied to the previously calculated sensitivity score S to obtain the adjusted sensitivity score S'. For example, for a piece of data stored for 10 days, t = 10, D(t) is calculated to be approximately 0.368. Assuming the original sensitivity score S is 60, the adjusted sensitivity score S' = S + α·D(t) (α is an adjustment coefficient, defaulting to 0.1), i.e., S' = 60 + 0.1 × 0.368 = 60.0368. In this way, the sensitivity score is dynamically adjusted based on the data storage time.
[0054] This approach avoids the excessive system resource consumption caused by historical data remaining in a highly sensitive state for extended periods. It also makes data sensitivity assessment more accurate, better reflecting the true value of data at different points in time. For example, the sensitivity of some long-stored, cold data automatically decreases over time, allowing for the use of lower-strength encryption methods and reducing encryption overhead.
[0055] S25: Calculate the association risk value R based on data lineage, and automatically increase the sensitivity level when data is associated with a highly sensitive table.
[0056] Specifically, in the step of calculating the association risk value R based on data lineage and automatically increasing the sensitivity level when data is associated with a highly sensitive table, data lineage reflects the source, flow, and usage of the data. By analyzing data lineage, potential associations and risks between data can be discovered.
[0057] The system constructs a data lineage graph, recording the source, processing, and destination of each piece of data. In this graph, nodes represent data, and edges represent the relationships between data. For example, a piece of basic population information may be related to data in multiple business systems; the data lineage graph can clearly show these relationships.
[0058] When calculating the association risk value R, the degree of association between the data and the high-sensitivity table is analyzed based on the data lineage graph. If a piece of data has a direct or indirect association with a high-sensitivity table, its association risk value R will increase accordingly. For example, suppose a high-sensitivity table stores a user's biometric information, and another piece of data is associated with that high-sensitivity table through an intermediate table, then the association risk value R of this data will be calculated based on the strength of the association.
[0059] When the associated risk value R increases to a certain level, the system will automatically upgrade the sensitivity level of the data. For example, if the original sensitivity level of the data is L2 (low sensitivity), but it is associated with a highly sensitive table and the associated risk value R is high, the system will upgrade its sensitivity level to L3 (medium sensitivity). In this way, potential security risks can be identified in advance through data lineage analysis, and corresponding protective measures can be taken in a timely manner to prevent indirect leakage events.
[0060] By introducing a time decay factor to adjust sensitivity scores and calculating association risk values based on data lineage to enhance sensitivity levels, smart city data classification, grading, and encryption methods can be made more intelligent and adaptive, providing more reliable security for smart city big data platforms. In practical applications, this method can effectively improve the efficiency and effectiveness of data security governance, meeting the characteristics of frequent data flow and high heterogeneity in smart cities, and providing strong support for the construction and development of smart cities.
[0061] In one embodiment, in step S30, the encryption strength E is dynamically determined based on the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, and k and γ are scaling factors. The corresponding encryption algorithm is then selected based on the E value, specifically including: S31: Monitor system security logs in real time and calculate the environmental threat index T, where T = (number of abnormal accesses / total number of accesses) × 100.
[0062] Specifically, system security logs need to be collected from multiple data sources. These data sources include, but are not limited to, network devices (such as firewalls, intrusion detection systems, etc.), servers, and applications. Different data sources may use different log formats and storage methods, therefore, corresponding log collection tools need to be developed to ensure that all relevant security logs can be collected efficiently and accurately. For example, open-source log collection tools such as Fluentd or Logstash can be used, which support multiple log formats and data sources and can be flexibly configured to send logs to specified storage locations.
[0063] Raw security logs often contain a large amount of redundant information and noise, requiring preprocessing to extract useful information. Preprocessing steps include log cleaning, parsing, and normalization. Log cleaning removes useless characters and duplicate records; parsing breaks down the logs according to certain rules to extract key information such as timestamps, event types, source IP addresses, and destination IP addresses; normalization unifies the format of log information from different data sources for subsequent analysis and processing. For example, firewall logs and intrusion detection system logs may need to have their event types uniformly encoded for easier statistical analysis.
[0064] In the preprocessed logs, it is necessary to identify abnormal access behavior. This can be achieved through various methods, such as rule matching and machine learning algorithms. Rule matching determines whether access behavior in the logs is abnormal based on predefined rules. For example, if an IP address repeatedly attempts to log in to the system and fails within a short period of time, it can be identified as abnormal access. Machine learning algorithms, on the other hand, can automatically identify abnormal access patterns by learning from a large amount of normal and abnormal log data. Commonly used machine learning algorithms include clustering algorithms and classification algorithms. For example, the K-Means clustering algorithm can be used to cluster log data, and access behavior that deviates from the normal cluster centers can be identified as abnormal.
[0065] Furthermore, after identifying abnormal access behavior, the environmental threat index T can be calculated using the formula T = (number of abnormal accesses / total number of accesses) × 100. The total number of accesses can be obtained by statistically analyzing all access records in the logs, while the number of abnormal accesses is determined by counting the identified abnormal access behaviors. The calculated environmental threat index T can reflect the level of security threats faced by the system in real time, providing an important basis for subsequent adjustments to encryption strength.
[0066] S32: Obtain the encryption strength value E and the corresponding algorithm determination threshold, and map the encryption algorithm according to the encryption strength value E: When E ≤ the first threshold, select the ChaCha20-128 algorithm; when the first threshold 0 < E ≤ the second threshold, select the AES-256 algorithm; when E > the second threshold, select the RSA-3072 algorithm.
[0067] Specifically, after calculating the environmental threat index T, combine it with the previously calculated sensitivity score S, and calculate the encryption strength value E according to the formula E = k·S + γ·T (where k and γ are scaling factors). The scaling factors k and γ can be adjusted according to the actual situation to balance the influence of the sensitivity score and the environmental threat index on the encryption strength.
[0068] In order to select a suitable encryption algorithm based on the encryption strength value E, it is necessary to preset the algorithm determination threshold in advance. The setting of these thresholds needs to consider multiple factors, such as the importance of the data, the performance requirements of the system, the requirements of security regulations, etc. For example, for highly sensitive data, the threshold may need to be set lower to ensure that a stronger encryption algorithm can be selected even at a lower encryption strength; for low-sensitive data, the threshold can be set higher to reduce the encryption overhead. In practical applications, the appropriate threshold can be determined through experiments and experience.
[0069] As the data environment changes and security threats evolve, the algorithm determination threshold also needs to be adjusted dynamically. For example, when the security threats faced by the system increase, the threshold can be appropriately lowered to increase the encryption strength; when the performance pressure of the system increases, the threshold can be appropriately raised to reduce the encryption strength. The dynamic adjustment of the threshold can be achieved through an automated policy engine, which automatically adjusts the threshold according to the real-time environmental threat index and system performance metrics.
[0070] Select a suitable encryption algorithm according to the calculated encryption strength value E and the preset algorithm determination threshold. The specific mapping rules are as follows: The ChaCha20-128 algorithm is a lightweight encryption algorithm with high performance and low resource consumption. When the encryption strength E is low, it indicates that the security threats faced by the data are small or the sensitivity of the data is low. At this time, selecting the ChaCha20-128 algorithm can reduce the encryption overhead and improve the processing efficiency of the system while ensuring a certain level of security. For example, for some public or low-sensitive data, such as public service information, using the ChaCha20-128 algorithm can avoid resource waste caused by high-intensity encryption.
[0071] AES-256 is a widely used symmetric encryption algorithm with high security and performance. When the encryption strength E is at a medium level, it indicates that the data faces certain security threats, requiring the selection of a more secure encryption algorithm. AES-256 can meet the security needs of most data types while maintaining a good balance in performance. For example, for moderately sensitive data, such as business data, AES-256 can provide sufficient security protection.
[0072] The RSA-3072 algorithm is an asymmetric encryption algorithm with high security, especially suitable for protecting highly sensitive data. A high encryption strength E indicates a significant security threat to the data, necessitating the selection of an encryption algorithm capable of resisting advanced attacks. The RSA-3072 algorithm provides stronger security protection, preventing data from being illegally stolen and tampered with. For example, for some core sensitive data, such as personal biometric information and core business secrets, using the RSA-3072 algorithm can ensure data security. In this embodiment, the first threshold is 40, and the second threshold is 70.
[0073] In one embodiment, in step S40, the encrypted data is stored in a hierarchical storage architecture and integrated into the entire data governance lifecycle process, including data standardization, quality inspection, and asset operation. Specifically, this includes: S41: In data standardization, add security metadata tags to encrypted data, including sensitivity level, encryption algorithm type, and key version number.
[0074] Specifically, in the data standardization process, adding secure metadata tags to encrypted data is a crucial step in ensuring data security and manageability. First, the sensitivity level is determined based on the data sensitivity score S calculated using a weighted scoring model. This model comprehensively considers multiple factors, including the field sensitivity baseline value A, the access frequency factor B, and the compliance weight C. A is determined by matching data fields through a predefined sensitive field dictionary; fields such as ID number, name, and address each have corresponding sensitivity baseline values. B is calculated based on historical access logs using the formula B = log[…]. 10(1 + F) × 20, where F is the average daily access count; C is automatically assigned according to the business theme of the data and is divided into legally sensitive data and general data. Based on the sensitivity score S calculated from these, the data is classified into different sensitivity levels, such as public data, low sensitivity, medium sensitivity, high sensitivity, and core sensitivity, etc. When adding security metadata tags, accurately mark the sensitivity level of the encrypted data, which helps with subsequent data management and the formulation of security policies. Different sensitivity levels of data can adopt different access control and protection measures. For example, high-sensitivity and core-sensitivity data may require more stringent access permissions and higher-level encryption algorithms.
[0075] For the annotation of the encryption algorithm type, it is carried out based on the encryption strength E that was dynamically determined previously according to the sensitivity score S and the environmental threat index T. The system security log is monitored in real-time to calculate the environmental threat index T, where T = (number of abnormal accesses / total number of accesses) × 100, and then the encryption strength E value is calculated according to the formula E = k·S + γ·T (k and γ are scaling factors). Different encryption algorithms are mapped according to the E value. When E ≤ the first threshold, the ChaCha20-128 algorithm is selected; when the first threshold < E ≤ the second threshold, the AES-256 algorithm is selected; when E > the second threshold, the RSA-3072 algorithm is selected. When adding security metadata tags, clearly record the encryption algorithm type used. In subsequent data usage and management processes, the encryption method of the data can be clearly understood, facilitating decryption operations and security assessments.
[0076] When annotating the key version number, as time goes by and security requirements change, the encryption key may be updated and upgraded. During the data standardization process, record the key version number currently used for the encrypted data, which can ensure that when decrypting the data, the correct key is used for the operation. At the same time, the recording of the key version number also helps with key management and updates. When it is found that a certain key version has security risks, the data encrypted with that key version can be re-encrypted in a timely manner to ensure the security of the data.
[0077] S42: In quality inspection, perform integrity verification on encrypted fields by comparing them through a hash algorithm.
[0078] Specifically, in the quality inspection stage, verifying the integrity of encrypted fields is a crucial step in ensuring data quality and security. Comparison using hash algorithms is an efficient and reliable verification method. First, before data encryption, a hash value is calculated for the original data and recorded. A hash algorithm is an algorithm that converts data of arbitrary length into a fixed-length hash value, possessing uniqueness and irreversibility. When integrity verification of encrypted fields is required, the hash value of the decrypted data is calculated again and compared with the previously recorded hash value. If the two hash values are the same, it indicates that the data has not been tampered with during encryption, storage, and transmission, maintaining its integrity; if the hash values are different, it indicates that the data may have been damaged or tampered with, requiring further investigation and processing. This integrity verification mechanism can promptly detect data anomalies, ensuring data quality and security, and providing a reliable foundation for subsequent data governance and asset operation. In practical applications, for large-scale, multi-source heterogeneous data, this hash algorithm-based integrity verification method can efficiently process large amounts of data, ensuring data accuracy and reliability, thereby better supporting the classification, grading, and encrypted management of smart city data, and providing strong data security guarantees for the construction and development of smart cities. These detailed steps and measures enable effective management of encrypted data in the data standardization and quality inspection stages, improve data security, manageability, and usability, and provide a solid foundation for the entire lifecycle of data governance in smart cities.
[0079] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0080] In one embodiment, a smart city data classification, grading, and encryption device is provided, which corresponds one-to-one with the smart city data classification, grading, and encryption methods described in the above embodiments. For example... Figure 2 As shown, the smart city data classification, grading, and encryption device includes a data acquisition module, a data classification and grading module, a data encryption module, and an encrypted transmission and storage module. Detailed descriptions of each functional module are as follows: The data acquisition module is used to acquire multi-source heterogeneous data from multiple government business systems through data interfaces. The multi-source heterogeneous data includes at least one of basic population information, legal person registration information, and spatial geographic information. The data classification and grading module is used to classify and grade multi-source heterogeneous data in real time. It calculates the data sensitivity score S based on the weighted scoring model, where S = w1·A + w2·B + w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients. A data encryption module, which is used to dynamically determine the encryption intensity E according to the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, k and γ are scaling factors, and select the corresponding encryption algorithm based on the E value; An encrypted transmission and storage module, which is used to store the encrypted data in a hierarchical storage architecture and integrate it into the entire life cycle process of data governance, including data standardization, quality inspection, and asset operation links.
[0081] Optionally, the data classification and grading module includes: A data field matching sub-module, which is used to match data fields through a predefined sensitive field dictionary to determine the field sensitivity base value A. Among them, the field sensitivity base value A includes ID number fields, name fields, and address fields; An access factor calculation sub-module, which is used to calculate the access frequency factor B based on historical access logs, using the formula B = log 10 (1 + F) × 20, where F is the average daily access times; A weight setting sub-module, which is used to automatically assign compliance weights C according to the business theme to which the data belongs. The compliance weights C include legally sensitive data and general data.
[0082] Optionally, the data classification and grading module also includes: An attenuation factor calculation sub-module, which is used to introduce a time attenuation factor D(t) = e^(-0.1t) to adjust the sensitivity score, where t is the number of days the data is stored; A risk value calculation sub-module, which is used to calculate the associated risk value R based on the data lineage, and automatically raise the sensitivity level when the data is associated with a highly sensitive table.
[0083] Optionally, the data encryption module includes: An index calculation sub-module, which is used to monitor the system security log in real time and calculate the environmental threat index T. Among them, T = (number of abnormal accesses / total number of accesses) × 100; An encryption algorithm determination sub-module, which is used to obtain the encryption intensity E value and the corresponding algorithm determination threshold, and map the encryption algorithm according to the encryption intensity E value: when E ≤ the first threshold, select the ChaCha20-128 algorithm; when 0 < E ≤ the second threshold, select the AES-256 algorithm; when E > the second threshold, select the RSA-3072 algorithm.
[0084] Optionally, the encrypted transmission and storage module includes: A label adding sub-module, which is used to add security metadata labels to the encrypted data during data standardization, including sensitivity level, encryption algorithm type, and key version number; A data verification sub-module, which is used to perform integrity verification on the encrypted fields during quality inspection and compare them through a hash algorithm.
[0085] Specific limitations regarding the smart city data classification, grading, and encryption devices can be found in the limitations on smart city data classification, grading, and encryption methods described above, and will not be repeated here. Each module in the aforementioned smart city data classification, grading, and encryption device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0086] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a smart city data classification, grading, and encryption method.
[0087] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Multi-source heterogeneous data is obtained from multiple government business systems through data interfaces. The multi-source heterogeneous data includes at least one of basic population information, legal person registration information, and spatial geographic information. Real-time classification and grading of multi-source heterogeneous data is performed, and the data sensitivity score S is calculated based on the weighted scoring model, where S = w1·A + w2·B + w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients. The encryption strength E is dynamically determined based on the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, k and γ are scaling factors, and the corresponding encryption algorithm is selected based on the value of E. The encrypted data is stored in a tiered storage architecture and integrated into the entire data governance lifecycle process, including data standardization, quality inspection, and asset operation.
[0088] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Multi-source heterogeneous data is obtained from multiple government business systems through data interfaces. The multi-source heterogeneous data includes at least one of basic population information, legal person registration information, and spatial geographic information. Real-time classification and grading of multi-source heterogeneous data is performed, and the data sensitivity score S is calculated based on the weighted scoring model, where S = w1·A + w2·B + w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients. The encryption strength E is dynamically determined based on the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, k and γ are scaling factors, and the corresponding encryption algorithm is selected based on the value of E. The encrypted data is stored in a tiered storage architecture and integrated into the entire data governance lifecycle process, including data standardization, quality inspection, and asset operation.
[0089] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0090] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0091] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for data classification, grading, and encryption in smart cities, characterized in that, The smart city data classification, grading and encryption method includes: Obtaining multi-source heterogeneous data from multiple government affairs business systems through a data interface, where the multi-source heterogeneous data includes at least one of population basic information, legal person registration information, and spatial geographic information; Performing real-time classification and grading processing on the multi-source heterogeneous data, calculating the data sensitivity score S based on a weighted scoring model, where S = w1·A + w2·B + w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients; Dynamically determining the encryption intensity E according to the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, k and γ are scaling coefficients, and selecting the corresponding encryption algorithm based on the E value; Storing the encrypted data into a hierarchical storage architecture and integrating it into the full life cycle process of data governance, including data standardization, quality inspection, and asset operation links.
2. The smart city data classification, grading, and encryption method according to claim 1, characterized in that, The performing real-time classification and grading processing on the multi-source heterogeneous data, calculating the data sensitivity score S based on a weighted scoring model, where S = w1·A + w2·B + w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients, specifically includes: Matching data fields through a predefined sensitive field dictionary to determine the field sensitivity base value A, where the field sensitivity base value A includes an ID card number field, a name field, and an address field; The access frequency factor B is calculated based on historical access logs, using the formula B=log 10 (1+F)×20, where F is the average number of visits per day; Automatically assigning the compliance weight C according to the business theme to which the data belongs, and the compliance weight C includes legally sensitive data and general data.
3. The smart city data classification, grading, and encryption method according to claim 2, characterized in that, After the automatically assigning the compliance weight C according to the business theme to which the data belongs, and the compliance weight C includes legally sensitive data and general data, the smart city data classification, grading and encryption method further includes: Introducing a time decay factor D(t)=e^(-0.1t) to adjust the sensitivity score, where t is the number of days the data is stored; Calculating the associated risk value R based on the data lineage, and automatically increasing the sensitivity level when the data is associated with a highly sensitive table.
4. The smart city data classification, grading, and encryption method according to claim 1, characterized in that, The dynamically determining the encryption intensity E according to the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, k and γ are scaling coefficients, and selecting the corresponding encryption algorithm based on the E value, specifically includes: Real-time monitoring the system security log and calculating the environmental threat index T, where T = (number of abnormal accesses / total number of accesses) × 100; Obtaining the encryption intensity E value and the corresponding algorithm determination threshold, and mapping the encryption algorithm according to the encryption intensity E value: when E ≤ the first threshold, select the ChaCha20-128 algorithm, when the first threshold 0 < E ≤ the second threshold, select the AES-256 algorithm, and when E > the second threshold, select the RSA-3072 algorithm.
5. The smart city data classification, grading, and encryption method according to claim 1, characterized in that, The storing the encrypted data into a hierarchical storage architecture and integrating it into the full life cycle process of data governance, including data standardization, quality inspection, and asset operation links, specifically includes: In the data standardization, adding security metadata tags to the encrypted data, including the sensitivity level, the encryption algorithm type, and the key version number; In the quality check, the integrity of the encrypted fields is verified by comparing them using a hash algorithm.
6. A smart city data classification, grading, and encryption device, characterized in that, The smart city data classification, grading, and encryption device includes: The data acquisition module is used to acquire multi-source heterogeneous data from multiple government business systems through a data interface. The multi-source heterogeneous data includes at least one of basic population information, legal person registration information, and spatial geographic information. The data classification and grading module is used to perform real-time classification and grading of the multi-source heterogeneous data, and calculate the data sensitivity score S based on the weighted scoring model, where S=w1·A+w2·B+w3·C, where A is the field sensitivity base value, B is the access frequency factor, C is the compliance weight, and w1, w2, and w3 are adjustable weight coefficients. The data encryption module is used to dynamically determine the encryption strength E based on the sensitivity score S and the environmental threat index T, where E = k·S + γ·T, k and γ are scaling factors, and select the corresponding encryption algorithm based on the value of E. The encrypted transmission and storage module is used to store encrypted data in a hierarchical storage architecture and integrate it into the entire data governance lifecycle process, including data standardization, quality inspection, and asset operation.
7. The smart city data classification, grading, and encryption device according to claim 6, characterized in that, The data classification and grading module includes: The data field matching submodule is used to match data fields through a predefined sensitive field dictionary to determine the field sensitivity base value A, wherein the field sensitivity base value A includes the ID number field, the name field, and the address field; The access factor calculation submodule is used to calculate the access frequency factor B based on historical access logs, using the formula B=log 10 (1+F)×20, where F is the average number of visits per day; The weight setting submodule is used to automatically assign compliance weight C based on the business theme to which the data belongs. The compliance weight C includes legally sensitive data and general data.
8. The smart city data classification, grading, and encryption device according to claim 6, characterized in that, The data classification and grading module also includes: The decay factor calculation submodule is used to introduce a time decay factor D(t)=e^(-0.1t) to adjust the sensitivity score, where t is the number of days for data storage; The risk value calculation submodule is used to calculate the associated risk value R based on data lineage. When data is associated with a highly sensitive table, the sensitivity level is automatically increased.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the smart city data classification, grading and encryption method as described in any one of claims 1 to 5.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the smart city data classification, grading and encryption method as described in any one of claims 1 to 5.