Multi-source data management method and system for smart park, and storage medium
By encrypting and storing multi-source data in the smart park in blocks, the problems of data loss and single storage point failure in traditional security management systems are solved, and secure data transmission and storage are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA TELECOM CONSTR 4TH ENG
- Filing Date
- 2025-12-16
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional security management systems rely on a single data source, making it difficult to comprehensively address complex and ever-changing security threats, and there is a risk of data loss due to the failure of a single storage point.
By collecting and transforming multi-source data, encryption keys are used to encrypt the target data to ensure data transmission security. Data is also stored in blocks on multiple storage servers for backup, and different encryption keys are used to encrypt different types of data.
It achieves data security during transmission and storage, reduces the risk of data loss due to failure of a single storage point, and improves data security and reliability.
Smart Images

Figure CN121935933A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, specifically relating to a multi-source data management method, system, and storage medium for smart parks. Background Technology
[0002] With the development of smart cities and smart parks, data security issues are becoming increasingly prominent. Traditional security management systems often rely on a single data source, making it difficult to comprehensively address complex and ever-changing security threats. Therefore, a new type of security management system is needed that can integrate data from multiple sources and provide comprehensive security protection.
[0003] A similar prior art patent application, CN118332568A, discloses a method and system for multi-source data security management based on big data and cloud computing. The method includes: pre-establishing a multi-source data processing framework for each enterprise on a cloud platform; acquiring multi-source data from the enterprise and storing it in corresponding data storage blocks under the multi-source data processing framework according to the data's category; acquiring the relationships between enterprises and establishing open sharing channels for specified types of multi-source data between enterprises on the cloud platform based on these relationships; extracting data to be analyzed from the cloud platform according to the content of the analysis task and temporarily storing the analysis task and the data to be analyzed in an analysis task list; and performing distributed computing processing on the analysis task through an allocated distributed server.
[0004] Similar existing technologies include Chinese patent application CN116028974A, which discloses a data security management platform. This platform can uniformly manage and control database operations and data files to ensure the security and integrity of the database. The platform includes: a database module designed for data confidentiality, integrity, and availability; a multi-data source module supporting operations from various data sources; a basic operation module for judging operations, queries, and error messages, and determining if there are compilation failures; a misoperation module that uses SQL type to determine the rules triggering misoperations and takes corresponding measures or provides warnings to prevent them; an SQL transaction mechanism module that allows users to choose rollback or commit to complete transaction operations; a concurrent file export module to prevent file leakage and unauthorized transfer; a file import module that uses both input stream and read buffer to read file data; and a file encryption / decryption module to ensure that files are not leaked or arbitrarily tampered with.
[0005] However, neither of the above two documents considered the risk of data loss due to the failure of a single storage point. Therefore, this invention provides a multi-source data management method, system, and storage medium for smart parks. Summary of the Invention
[0006] This invention collects and transforms multi-source data into target data in a unified format. A first encryption key is used to encrypt the target data, ensuring its security during transmission. Upon receiving the encrypted data, the storage module decrypts it using a first decryption key for further processing. The decrypted data is then categorized to implement different security measures for different data types. A different second encryption key is assigned to each data type, and the data is encrypted again to ensure its security during storage. The categorized data is then divided into multiple data blocks based on a predetermined number of segments. Multiple storage servers are accessed, and a certain number of storage servers are allocated to each tagged data block. The data blocks are then encrypted and transmitted to the corresponding storage servers, achieving distributed data backup.
[0007] To achieve the aforementioned objectives, this invention provides a multi-source data management method for smart parks, which is implemented by performing the following steps: Step S1: Collect multi-source data of the smart park, including static model data, dynamic management data, IoT sensing data and park business data; analyze the data structure of the multi-source data; define the data format of the target data; determine the mapping rules from the multi-source data to the target data; and convert the multi-source data into the target data based on the mapping rules. Step S2: Convert the target data into first data, obtain the data volume of the first data, extract second data from the first data based on the data volume, and also obtain third data in the first data other than the second data. Use the data volume as a first encryption key, process the first encryption key with a first processing function to generate a first processing value, encrypt the second data with the first processing value to generate first encrypted data, generate fourth data from the first encrypted data and the third data, and transmit the fourth data and the data volume to the storage module. Step S3: After receiving the encrypted fourth data, the storage module decrypts and restores the fourth data to obtain the target data. Then, the target data is classified to obtain multiple different types of target data. A corresponding hash value is generated based on the type of the target data. The hash value is used as the second encryption key. The second encryption key is used to encrypt the target data of the corresponding type. The encrypted target data is stored in the memory space. Step S4: Obtain the classified target data, further divide the target data into multiple data blocks based on a predetermined number of segments, obtain multiple storage servers, mark the multiple data blocks, add data tagging information, allocate a first number of storage servers to each marked data block, encrypt the data block and transmit it to the corresponding storage server, wherein the first number is greater than or equal to two.
[0008] As a preferred embodiment of the present invention, after storing the encrypted target data in memory space, the following steps are further performed: The decryption key for the second encryption key is generated. For users with access rights to the target data, a first decryption key, a second decryption key, and a third decryption key are generated based on the decryption key. The first decryption key, the second decryption key, and the target data are associated and stored. The second decryption key is sent to the user. For users who have lost access rights to the target data, the storage module deletes the first decryption key corresponding to the user.
[0009] As a preferred embodiment of the present invention, generating a first decryption key, a second decryption key, and a third decryption key based on the decryption key includes the following steps: Two arbitrary values are randomly generated. The two arbitrary values are used as coefficients. The decryption key is used as a constant to generate a polynomial. Three arbitrary positive integers are randomly selected. The three positive integers are substituted into the polynomial to obtain three corresponding result values. The positive integers and the corresponding result values are combined to generate three data pairs. The three data pairs are respectively used as the first decryption key, the second decryption key, and the third decryption key.
[0010] As a preferred embodiment of the present invention, encrypting the target data of the corresponding type using the second encryption key includes the following steps: Step S31: Preset replacement rules, divide the target data into multiple fixed-byte data segments, process the second encryption key to generate a second processing value, generate multiple derivative keys based on the second processing value, and initialize the first auxiliary data, wherein the number of bytes in the first auxiliary data is the same as that in the data segment; Step S32: Based on the second processing value, the replacement rule, and the first auxiliary data, encrypt the first data segment to generate an encrypted data segment; Step S33: Replace the first auxiliary data with the encrypted data segment generated in step S32, and encrypt the next data segment. Repeat this step until all data segments are encrypted.
[0011] As a preferred embodiment of the present invention, encrypting the first data segment to generate an encrypted data segment includes the following steps: Step S321: Perform an XOR operation on the first data segment and the first auxiliary data to obtain the first intermediate data, and perform an XOR operation on the first intermediate data and the first derived key to obtain the second intermediate data; Step S322: Based on the replacement rule, the second intermediate data is converted to generate the third intermediate data. The third intermediate data is divided into a preset number of sub-intermediate data. Each sub-intermediate data is numbered from the beginning. Each data of each sub-intermediate data is cyclically moved to the left by the corresponding number of positions. The moved sub-intermediate data are recombined in the order of the numbers to generate the fourth intermediate data. Step S323: Perform an XOR operation on the fourth intermediate data and the next derived key to obtain the fifth intermediate data. Use the fifth intermediate data as the second intermediate data to execute steps S321 to S322. Repeat this step until all the derived keys have been used.
[0012] As a preferred embodiment of the present invention, generating multiple derived keys based on the second processed value includes the following steps: Initialize the second auxiliary data, obtain the second processing value, move the last byte of the second processing value to the beginning of the second processing value to generate a first intermediate value, transform the first intermediate value based on the replacement rule to obtain a second intermediate value, perform an XOR operation on the second processing value and the second intermediate value to obtain a third intermediate value, use the value obtained by performing an XOR operation on the third intermediate value and the second auxiliary data as the derivative key, repeat this step, generate a new derivative key based on the generated derivative key, until the number of generated derivative keys reaches a preset number.
[0013] As a preferred embodiment of the present invention, extracting second data from the first data based on the data volume includes the following steps: A first threshold and a second threshold are preset, as well as a first value, a second value, and a third value. If the amount of data is less than or equal to the preset first threshold, one data point is extracted from the first data every first value bit as the second data. If the amount of data is greater than the first threshold but less than or equal to the preset second threshold, one data point is extracted from the first data every second value bit as the second data. If the amount of data is greater than the second threshold, one data point is extracted from the first data every third value bit as the second data.
[0014] This invention also provides a multi-source data management system for smart parks, comprising the following modules: An integration module is used to collect multi-source data of the smart park, including static model data, dynamic management data, IoT sensing data and park business data. The module analyzes the data structure of the multi-source data, defines the data format of the target data, determines the mapping rules from the multi-source data to the target data, and converts the multi-source data into the target data based on the mapping rules. The transmission module is used to convert the target data into first data, obtain the data volume of the first data, extract second data from the first data based on the data volume, and also obtain third data in the first data other than the second data, use the data volume as a first encryption key, process the first encryption key with a first processing function to generate a first processing value, encrypt the second data with the first processing value to generate first encrypted data, generate fourth data by combining the first encrypted data and the third data, and transmit the fourth data and the data volume to the storage module. The storage module is used to decrypt and restore the fourth data after receiving the encrypted fourth data to obtain the target data, then classify the target data to obtain multiple different types of target data, generate a corresponding hash value based on the type of the target data, use the hash value as a second encryption key, use the second encryption key to encrypt the target data of the corresponding type, and store the encrypted target data in memory space. The backup module is used to acquire the classified target data, divide the target data into multiple data blocks based on a predetermined number of segments, acquire multiple storage servers, mark the multiple data blocks, add data tagging information, allocate a first number of storage servers to each marked data block, encrypt the data block and transmit it to the corresponding storage server, wherein the first number is greater than or equal to two.
[0015] The present invention also provides a storage medium storing program instructions, wherein the program instructions, when executed, control the device where the storage medium is located to execute any one of the above-described multi-source data management methods for smart parks.
[0016] Compared with the prior art, the beneficial effects of the present invention are at least as follows: In this invention, firstly, the standardization and unification of multi-source data facilitates management and analysis. Through mapping rules, data from different sources and formats are flexibly processed and converted. The target data is encrypted using a first encryption key to ensure data security during transmission. The storage module stores the encrypted target data in memory space and uses different encryption keys for complex encryption of different types of data, increasing the difficulty of decryption and further enhancing data security. Finally, the target data is divided into blocks and stored on at least two storage servers, ensuring that each data block is backed up on at least two storage servers. This allows the target data to be restored based on the data blocks on the other storage server even if one storage server fails, improving the security and reliability of the target data. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the steps of the multi-source data management method for smart parks according to the present invention. Figure 2 This is a structural diagram of the multi-source data management system for smart parks according to the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0019] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this application, a first script may be referred to as a second script, and similarly, a second script may be referred to as a first script.
[0020] This invention provides, for example Figure 1 The multi-source data management method for smart parks shown is implemented by performing the following steps: Step S1: Collect multi-source data for the smart park, including static model data, dynamic management data, IoT sensing data, and park business data. Analyze the data structure of the multi-source data, define the data format of the target data, determine the mapping rules from multi-source data to target data, and convert the multi-source data into target data based on the mapping rules.
[0021] Specifically, because unified data is easier to manage and protect, in order to improve the efficiency and accuracy of data processing and facilitate management and analysis, multi-source data from different sources within the smart park is first collected. This includes static model data such as terrain models, building models (e.g., house models), facility models (e.g., water supply, drainage, electricity, lighting, fire protection), and intelligent device models (e.g., environmental sensing devices, building facility sensing devices, intelligent identification devices, security monitoring devices, etc.). Dynamic management datasets include personnel information and vehicle management information (e.g., personnel and vehicle entry / exit) within the smart park. IoT sensing data includes monitoring data (e.g., equipment operation monitoring, energy consumption monitoring), meteorological monitoring data, and park security data (…). For applications such as vehicle monitoring, access control sensing, and personnel monitoring, different data sources may have different data structures. Some are in XML format, while others are in key-value pair format. Furthermore, data with the same meaning may be expressed differently in different sources, such as using "fullName" to represent the name field in some cases and "name" in others. Therefore, to ensure data format consistency, we analyze the data structure of multi-source data, define the data format of the target data, and determine the mapping rules from multi-source data to the target data. Through the mapping rules, we can flexibly process and transform data of different formats from different sources. By achieving data unification and standardization, we can facilitate management and analysis, as well as subsequent encryption, transmission, and storage.
[0022] Step S2: Convert the target data into first data, obtain the data volume of the first data, extract the second data from the first data based on the data volume, and also obtain the third data in the first data other than the second data. Use the data volume as the first encryption key, process the first encryption key using the first processing function to generate the first processing value, encrypt the second data using the first processing value to generate the first encrypted data, generate the fourth data from the first encrypted data and the third data, and transmit the fourth data and the data volume to the storage module.
[0023] Specifically, to ensure data security during transmission, the target data is encrypted using an encryption key. First, the target data is converted into first data, which refers to binary or hexadecimal data. This embodiment uses hexadecimal. The amount of the first data is obtained. Since data encryption takes time, encrypting a large amount of data could significantly increase the encryption time. Therefore, to minimize encryption time, a portion of the first data is extracted for encryption based on its size. The specific extraction method will be explained in detail later. The second data is the extracted portion. The remaining data after extraction is used as the third data. The amount of the first data is used as the first encryption key. Then... The first processing function processes the first encryption key to generate a first processing value, then uses the first processing value to encrypt the second data to generate the first encrypted data. The first encrypted data and the third data are then combined to generate the fourth data. After that, the fourth data and the data volume are transmitted to the storage module, so that after receiving the encrypted data, the storage module can restore the fourth data based on the data volume to obtain the original target data. The above method reduces the encryption time by encrypting only part of the data instead of all the data. Generally, encryption algorithms will increase the amount of encrypted data. The above method can also relatively reduce the increase in the amount of encrypted data, thereby reducing the encryption time and the amount of encrypted data while ensuring the security of data transmission.
[0024] It is important to note that the above data volume is a number. Directly using the data volume as the key would simplify encryption. To increase the complexity of encryption, the first processing function first obtains the corresponding hash value based on the data volume, then converts the hash value into hexadecimal data, and uses the generated hexadecimal data to encrypt the second data. This increases the complexity of encryption and ensures the security of data during transmission.
[0025] Step S3: After receiving the encrypted fourth data, the storage module decrypts and restores the fourth data to obtain the target data. Then, the target data is classified to obtain multiple different types of target data. A corresponding hash value is generated based on the type of the target data. The hash value is used as the second encryption key. The target data of the corresponding type is encrypted using the second encryption key. The encrypted target data is stored in the memory space.
[0026] Specifically, after receiving the fourth data, the storage module decrypts and restores the data based on the data volume to obtain the original target data, facilitating the analysis and processing of the target data. Based on the analysis of the target data, the status of the park can be obtained, which facilitates the management of the park. Then, to ensure the storage security of the target data, the target data is first classified, for example, according to different types, the target data is divided into equipment-related data and personnel-related data. For different types of target data, a corresponding hash value is generated based on the type, and the hash value is used as the second encryption key. Then, the second encryption key is used to encrypt the target data of the corresponding type. The specific encryption process will be explained in detail later. The encrypted target data is stored in the memory space. The above method uses different encryption keys for different types of data for complex encryption, which increases the difficulty of decrypting the data even if the data is stolen, further enhancing the data security.
[0027] Step S4: Obtain the classified target data, further divide the target data into multiple data blocks based on a predetermined number of segments, obtain multiple storage servers, mark the multiple data blocks, add data tagging information, allocate a first number of storage servers to each marked data block, encrypt the data block and transmit it to the corresponding storage server, the first number being greater than or equal to two.
[0028] Specifically, to reduce the risk of data loss due to a single storage point failure, after acquiring the categorized target data, a backup process is performed on the target data. Based on a predetermined number of segments, each type of target data is divided into multiple data blocks, and each data block is marked to facilitate subsequent restoration of the target data based on the marking information. Then, multiple storage servers capable of storing the data are acquired, and at least two storage servers are allocated to each data block. The data block is encrypted and then transmitted to the allocated storage servers. The above method first divides the target data into blocks, and then stores the data blocks on at least two storage servers, ensuring that each data block is backed up on at least two storage servers. Even if one storage server fails, the target data can be restored based on the data blocks on the other storage server, thus improving the security and reliability of the target data.
[0029] Through the coordination of the above steps, standardized data processing, encrypted transmission, encrypted storage, and multi-server backup are achieved, improving the security, integrity, availability, and management efficiency of multi-source data in the smart park.
[0030] Furthermore, after storing the encrypted target data in memory, the following steps are performed: The decryption key for the second encryption key is generated. For users with access rights to the target data, a first decryption key, a second decryption key, and a third decryption key are generated based on the decryption key. The first decryption key, the second decryption key, and the target data are associated and stored. The second decryption key is sent to the user. For users who have lost access rights to the target data, the storage module deletes the first decryption key corresponding to the user.
[0031] Specifically, after storing the encrypted target data in memory, a decryption key corresponding to the second encryption key is generated. For users with access rights to the target data, a first decryption key, a second decryption key, and a third decryption key are generated based on the decryption key. The first and second decryption keys, along with the target data, are managed and stored. The third decryption key is sent to the user. The user can access the target data in the storage module based on the received third decryption key. After receiving the user's third decryption key, the storage module retrieves the corresponding first and second decryption keys based on the third decryption key. The complete decryption key is then restored based on the first, second, and third decryption keys, and the user accesses the target data based on the decryption key. For users who have lost access rights, the storage module deletes the user's corresponding first and second decryption keys. If the corresponding first and second decryption keys cannot be found after receiving the user's third decryption key, then the corresponding user is not granted access to the target data. Through the above method, only users with authorized access are allowed to access the target data. Because the decryption key is converted, only the converted decryption key is sent to users with authorized access to the target data, without transmitting the complete decryption key, thus ensuring the security of the decryption key and further guaranteeing the security of the data.
[0032] Furthermore, generating a first decryption key, a second decryption key, and a third decryption key based on the decryption key includes the following steps: Two arbitrary values are randomly generated and used as coefficients. The decryption key is used as a constant to generate a polynomial. Three random positive integers are selected and substituted into the polynomial to obtain three corresponding result values. The positive integers and the corresponding result values are combined to generate three data pairs, which are used as the first decryption key, the second decryption key, and the third decryption key, respectively.
[0033] Specifically, to protect the security of the decryption key, three decryption keys are generated based on the decryption key. Only one of them is sent to the user. First, two arbitrary values are generated, such as 3 and 5. The decryption key is assumed to be 10. The decryption key is used as a constant, and the two arbitrary values are used as coefficients to generate a polynomial, for example, f(x) = 10 + 3x + 5x. 2Randomly select any three positive integers, such as 2, 5, and 7, and calculate f(2) = 36, f(5) = 150, and f(7) = 276. Then (2, 36), (5, 150), and (7, 276) are three data pairs. Subsequently, one of the data pairs will be sent to the user as the third decryption key. The user can then obtain the corresponding first and second decryption keys based on the third decryption key and restore the decryption key 10. Subsequently, the user can access the target data based on the decryption key.
[0034] Further, the target data of the corresponding type is encrypted using the second encryption key, including the following steps: Step S31: Preset replacement rules, divide the target data into multiple fixed-byte data segments, process the second encryption key to generate a second processing value, generate multiple derivative keys based on the second processing value, and initialize the first auxiliary data, which has the same number of bytes as the data segment; Step S32: Encrypt the first data segment based on the second processing value, the replacement rule, and the first auxiliary data to generate an encrypted data segment; Step S33: Replace the first auxiliary data with the encrypted data segment generated in step S32, and encrypt the next data segment. Repeat this step until all data segments are encrypted.
[0035] Specifically, to ensure the security of the target data in the storage module, the target data of the corresponding type is encrypted using a second encryption key. A preset replacement rule is used, which means setting a corresponding replacement value for each number and letter. For example, when encountering the number 2, 2 is replaced with the letter 'c'. The target data is divided into multiple fixed-byte data segments, such as data segments with 16 bytes each. To facilitate subsequent encryption processing, the second encryption key is processed to generate a second processed value with 16 bytes. Then, multiple derivative keys are generated based on the second processed value. The number of derivative keys can be set arbitrarily. The more derivative keys there are, the more complex the encryption process becomes. The generation process of derivative keys will be explained in detail later. A first auxiliary data is also initialized. To facilitate encryption processing, the number of bytes in the first auxiliary data is the same as the number of bytes in the data segment. Then, the first data segment is encrypted based on the second processed value, the replacement rule, and the first auxiliary data. After the encryption of the first data segment is completed, this step is repeated to encrypt the subsequent data segments in the same way until all data segments are encrypted.
[0036] Further, the first data segment is encrypted to generate an encrypted data segment, including the following steps: Step S321: Perform an XOR operation on the first data segment and the first auxiliary data to obtain the first intermediate data, and perform an XOR operation on the first intermediate data and the first derived key to obtain the second intermediate data; Step S322: Based on the replacement rule, transform the second intermediate data to generate the third intermediate data. Divide the third intermediate data into a preset number of sub-intermediate data. Number each sub-intermediate data from the beginning. Move each data of each sub-intermediate data to the left in a cyclic manner according to the corresponding number of positions. Recombine the moved sub-intermediate data in the order of the numbers to generate the fourth intermediate data. Step S323: Perform an XOR operation on the fourth intermediate data and the next derived key to obtain the fifth intermediate data. Use the fifth intermediate data as the second intermediate data to execute steps S321 to S322. Repeat this step until all derived keys have been used.
[0037] Specifically, to encrypt the data segment, a complex encryption process is used as much as possible, making it difficult to recover the original data even if it is stolen, thus protecting data security. First, the first data segment and the first auxiliary data are XORed to obtain the first intermediate data. Then, the first intermediate data and the first derived key are XORed to obtain the second intermediate data. Next, the data in the second intermediate data is replaced according to the above replacement rules to generate the third intermediate data. Then, the third intermediate data is divided into a predetermined number of sub-intermediate data. For ease of explanation, a simple data example is used, assuming it is divided into 4 sub-intermediate data, one of which is aa1122bbccdd00ee889966dd77cc36be. Each sub-intermediate data is then shifted. Let's assume the above sub-intermediate data is numbered 1. Then, each of the above sub-intermediate data is shifted one position to the left. The first data 'a' is the leftmost one position, and after shifting one position, it is moved after the last 'e', becoming a1122bbccdd00ee889966dd77cc36bea. The other sub-intermediate data are shifted in the same way. The shifted sub-intermediate data are then recombined to generate the fourth intermediate data. Then, the fourth intermediate data and the next derived key are XORed to obtain the fifth intermediate data. The fifth intermediate data is used as the second intermediate data to execute steps S321 to S322. This process is repeated until all derived keys have been used, thus completing the encryption of a data segment. By encrypting each data segment through the above complex calculation and shifting process, the data segment cannot be easily decrypted, thereby ensuring data security.
[0038] Furthermore, multiple derived keys are generated based on the second processing value, including the following steps: Initialize the second auxiliary data, obtain the second processing value, move the last byte of the second processing value to the beginning of the second processing value to generate the first intermediate value, transform the first intermediate value based on the substitution rule to obtain the second intermediate value, perform an XOR operation on the second processing value and the second intermediate value to obtain the third intermediate value, and use the value obtained by performing an XOR operation on the third intermediate value and the second auxiliary data as the derivative key. Repeat this step to generate a new derivative key based on the generated derivative key until the number of generated derivative keys reaches the preset number.
[0039] Specifically, to perform complex encryption on the data segment and prevent it from being easily cracked, multiple derivative keys are generated based on the second processing value to implement the encryption process of the data segment. First, a second auxiliary data is initialized. The second auxiliary data has the same number of bits as the second processing value. The last byte of the second processing value is moved to the beginning of the second processing value. For example, if the second processing value is ea1100bb5cdd005e770088dd45cc36be, and one byte is 8 bits, then the moved second processing value, which is also the first intermediate value, is 45cc36beea1100bb. The process begins with the first intermediate value (5cdd005e770088dd) being processed. Then, based on the substitution rule, the first intermediate value is transformed to obtain the second intermediate value. Next, an XOR operation is performed on the second intermediate value and the second intermediate value to obtain the third intermediate value. Finally, an XOR operation is performed on the third intermediate value and the second auxiliary data to obtain the derived key. This derived key then replaces the second intermediate value, and the process is repeated to obtain new derived keys. This continues until the number of generated derived keys reaches a preset number. Through this method, multiple different derived keys can be generated based on the substitution rule, the second intermediate value, and the second auxiliary data, providing data support for the encryption of data segments.
[0040] Furthermore, extracting the second data from the first data based on the data volume includes the following steps: A first threshold and a second threshold are preset, as well as a first value, a second value, and a third value. If the amount of data is less than or equal to the preset first threshold, one data point is extracted from the first data every first value position as the second data. If the amount of data is greater than the first threshold but less than or equal to the preset second threshold, one data point is extracted from the first data every second value position as the second data. If the amount of data is greater than the second threshold, one data point is extracted from the first data every third value position as the second data.
[0041] Specifically, to reduce the amount of data in the encrypted target data, a portion of the data needs to be extracted from the first data and encrypted only. To ensure the amount of extracted second data is reasonable, the data volume of the first data is determined. If the data volume is less than or equal to a preset first threshold, it indicates that the amount of data in the first data is not too large, so the first value is set relatively small, for example, to 1. In this case, one data point is extracted from the first data as the second data point every other data point. If the data volume is greater than the first threshold but less than or equal to the second threshold, it indicates that the amount of data in the first data is relatively large, but not excessive. Therefore, the second value is set relatively large, for example, to 3. In this case, one data point is extracted from the first data as the second data point every three data points. If the data volume is greater than the second threshold, it indicates that the amount of data in the first data is relatively large, so the third value is set even larger, for example, to 5. In this case, one data point is extracted from the first data as the second data point every five data points. By extracting the second data using the above method and encrypting only the second data point, the data encryption time is reduced. Some encryption algorithms may result in the encrypted data being larger than the original data. The above method can also relatively reduce the amount of data after encryption and reduce the communication pressure during data transmission.
[0042] According to another aspect of the embodiments of the present invention, reference is made to... Figure 2 As shown, a multi-source data management system for smart parks is also provided, including an integration module, a transmission module, a storage module, and a backup module, to implement the multi-source data management method for smart parks as described above. The specific functions of each module are as follows: The integration module is used to collect multi-source data of the smart park, including static model data, dynamic management data, IoT sensing data and park business data. It analyzes the data structure of the multi-source data, defines the data format of the target data, determines the mapping rules from multi-source data to target data, and transforms the multi-source data into target data based on the mapping rules. The transmission module is used to convert target data into first data, obtain the data volume of the first data, extract second data from the first data based on the data volume, obtain third data other than the second data in the first data, use the data volume as the first encryption key, use the first processing function to process the first encryption key to generate a first processing value, use the first processing value to encrypt the second data to generate first encrypted data, generate fourth data from the first encrypted data and the third data, and transmit the fourth data and the data volume to the storage module. The storage module is used to decrypt and restore the fourth encrypted data after receiving it to obtain the target data. Then, the target data is classified to obtain multiple different types of target data. A corresponding hash value is generated based on the type of the target data. The hash value is used as the second encryption key. The target data of the corresponding type is encrypted using the second encryption key. The encrypted target data is stored in the memory space. The backup module is used to acquire the classified target data, divide the target data into multiple data blocks based on a predetermined number of segments, acquire multiple storage servers, mark the multiple data blocks, add data tagging information, allocate a first number of storage servers to each marked data block, encrypt the data block and transmit it to the corresponding storage server, and the first number is greater than or equal to two.
[0043] According to another aspect of the present invention, a storage medium is also provided, which stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute any of the above-described multi-source data management methods for smart parks.
[0044] In summary, the present invention provides a multi-source data management method, system, and storage medium for smart parks. The method includes collecting multi-source data from the smart park; converting the multi-source data into target data based on mapping rules; converting the target data into first data; extracting second data from the first data based on data volume; combining the encrypted second data with the remaining third data into fourth data and sending it to a storage module; the storage module classifies the target data to obtain multiple different types of target data; encrypts the corresponding type of target data using a second encryption key; divides the target data into multiple data blocks based on a predetermined number of segments; obtains multiple storage servers; allocates a first number of storage servers to each tagged data block; and encrypts the data block before transmitting it to the allocated storage servers. The present invention can improve the security, availability, and management efficiency of multi-source data.
[0045] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0046] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The 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 may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may 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.
[0047] 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.
[0048] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
[0049] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A multi-source data management method for smart parks, characterized in that, Includes the following steps: Step S1: Collect multi-source data of the smart park, including static model data, dynamic management data, IoT sensing data and park business data; analyze the data structure of the multi-source data; define the data format of the target data; determine the mapping rules from the multi-source data to the target data; and convert the multi-source data into the target data based on the mapping rules. Step S2: Convert the target data into first data, obtain the data volume of the first data, extract second data from the first data based on the data volume, and also obtain third data in the first data other than the second data. Use the data volume as a first encryption key, process the first encryption key with a first processing function to generate a first processing value, encrypt the second data with the first processing value to generate first encrypted data, generate fourth data from the first encrypted data and the third data, and transmit the fourth data and the data volume to the storage module. Step S3: After receiving the encrypted fourth data, the storage module decrypts and restores the fourth data to obtain the target data. Then, the target data is classified to obtain multiple different types of target data. A corresponding hash value is generated based on the type of the target data. The hash value is used as the second encryption key. The second encryption key is used to encrypt the target data of the corresponding type. The encrypted target data is stored in the memory space. Step S4: Obtain the classified target data, further divide the target data into multiple data blocks based on a predetermined number of segments, obtain multiple storage servers, mark the multiple data blocks, add data tagging information, allocate a first number of storage servers to each marked data block, encrypt the data block and transmit it to the corresponding storage server, wherein the first number is greater than or equal to two.
2. The method according to claim 1, characterized in that, After storing the encrypted target data in memory, the following steps are also performed: The decryption key for the second encryption key is generated. For users with access rights to the target data, a first decryption key, a second decryption key, and a third decryption key are generated based on the decryption key. The first decryption key, the second decryption key, and the target data are associated and stored. The second decryption key is sent to the user. For users who have lost access rights to the target data, the storage module deletes the first decryption key corresponding to the user.
3. The method according to claim 2, characterized in that, Generating a first decryption key, a second decryption key, and a third decryption key based on the decryption key includes the following steps: Two arbitrary values are randomly generated. The two arbitrary values are used as coefficients. The decryption key is used as a constant to generate a polynomial. Three arbitrary positive integers are randomly selected. The three positive integers are substituted into the polynomial to obtain three corresponding result values. The positive integers and the corresponding result values are combined to generate three data pairs. The three data pairs are respectively used as the first decryption key, the second decryption key, and the third decryption key.
4. The method according to claim 1, characterized in that, Encrypting the target data of the corresponding type using the second encryption key includes the following steps: Step S31: Preset replacement rules, divide the target data into multiple fixed-byte data segments, process the second encryption key to generate a second processing value, generate multiple derivative keys based on the second processing value, and initialize the first auxiliary data, wherein the number of bytes in the first auxiliary data is the same as that in the data segment; Step S32: Based on the second processing value, the replacement rule, and the first auxiliary data, encrypt the first data segment to generate an encrypted data segment; Step S33: Replace the first auxiliary data with the encrypted data segment generated in step S32, and encrypt the next data segment. Repeat this step until all data segments are encrypted.
5. The method according to claim 4, characterized in that, The process of encrypting the first data segment to generate an encrypted data segment includes the following steps: Step S321: Perform an XOR operation on the first data segment and the first auxiliary data to obtain the first intermediate data, and perform an XOR operation on the first intermediate data and the first derived key to obtain the second intermediate data; Step S322: Based on the replacement rule, the second intermediate data is converted to generate the third intermediate data. The third intermediate data is divided into a preset number of sub-intermediate data. Each sub-intermediate data is numbered from the beginning. Each data of each sub-intermediate data is cyclically moved to the left by the corresponding number of positions. The moved sub-intermediate data are recombined in the order of the numbers to generate the fourth intermediate data. Step S323: Perform an XOR operation on the fourth intermediate data and the next derived key to obtain the fifth intermediate data. Use the fifth intermediate data as the second intermediate data to execute steps S321 to S322. Repeat this step until all the derived keys have been used.
6. The method according to claim 4, characterized in that, Multiple derived keys are generated based on the second processed value, including the following steps: Initialize the second auxiliary data, obtain the second processing value, move the last byte of the second processing value to the beginning of the second processing value to generate a first intermediate value, transform the first intermediate value based on the replacement rule to obtain a second intermediate value, perform an XOR operation on the second processing value and the second intermediate value to obtain a third intermediate value, use the value obtained by performing an XOR operation on the third intermediate value and the second auxiliary data as the derivative key, repeat this step, generate a new derivative key based on the generated derivative key, until the number of generated derivative keys reaches a preset number.
7. The method according to claim 1, characterized in that, Extracting the second data from the first data based on the data volume includes the following steps: A first threshold and a second threshold are preset, as well as a first value, a second value, and a third value. If the amount of data is less than or equal to the preset first threshold, one data point is extracted from the first data every first value bit as the second data. If the amount of data is greater than the first threshold but less than or equal to the preset second threshold, one data point is extracted from the first data every second value bit as the second data. If the amount of data is greater than the second threshold, one data point is extracted from the first data every third value bit as the second data.
8. A multi-source data management system for smart parks, used to implement the multi-source data management method for smart parks as described in any one of claims 1-7, characterized in that, Includes the following modules: An integration module is used to collect multi-source data of the smart park, including static model data, dynamic management data, IoT sensing data and park business data. The module analyzes the data structure of the multi-source data, defines the data format of the target data, determines the mapping rules from the multi-source data to the target data, and converts the multi-source data into the target data based on the mapping rules. The transmission module is used to convert the target data into first data, obtain the data volume of the first data, extract second data from the first data based on the data volume, and also obtain third data in the first data other than the second data, use the data volume as a first encryption key, process the first encryption key with a first processing function to generate a first processing value, encrypt the second data with the first processing value to generate first encrypted data, generate fourth data by combining the first encrypted data and the third data, and transmit the fourth data and the data volume to the storage module. The storage module is used to decrypt and restore the fourth data after receiving the encrypted fourth data to obtain the target data, then classify the target data to obtain multiple different types of target data, generate a corresponding hash value based on the type of the target data, use the hash value as a second encryption key, use the second encryption key to encrypt the target data of the corresponding type, and store the encrypted target data in memory space. The backup module is used to acquire the classified target data, divide the target data into multiple data blocks based on a predetermined number of segments, acquire multiple storage servers, mark the multiple data blocks, add data tagging information, allocate a first number of storage servers to each marked data block, encrypt the data block and transmit it to the corresponding storage server, wherein the first number is greater than or equal to two.
9. A storage medium, characterized in that, The storage medium stores program instructions, wherein, when the program instructions are executed, the device where the storage medium is located is controlled to execute a multi-source data management method for a smart park as described in any one of claims 1-7.
Citation Information
Patent Citations
Data security management platform
CN116028974A
Multi-source data security management method and system based on big data and cloud computing
CN118332568A