Key management method and system based on security check
By generating and securely verifying a set of keys, distributing them, and monitoring their usage, the security and standardization issues of key management in the gas station monitoring system are resolved, ensuring the security and effectiveness of data and tax supervision.
Patent Information
- Application Number
- CN202511115806.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-08-11
AI Technical Summary
Traditional gas station monitoring systems suffer from problems such as easily cracked key generation, insecure distribution processes, and lack of monitoring in key usage, which affect data security and the effectiveness of tax supervision.
An initial key set is generated and security verified. The keys are then distributed to the terminal devices of the gas station monitoring system, and their usage status is monitored. The keys are updated or revoked in real time.
This improved the security and standardization of key distribution, reduced the risk of leakage, and ensured the accuracy of refueling data and the effectiveness of tax supervision.
Smart Images

Figure CN120915441B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of gas station monitoring technology, and more specifically, to a key management method and system based on security verification. Background Technology
[0002] In gas station monitoring systems, key management is a crucial element in ensuring the system's secure and stable operation. Traditional key management methods have several drawbacks. On the one hand, during the key generation phase, there is often a lack of effective assessment of key security, and the generated keys may be vulnerable to being cracked. For example, using simple generation algorithms results in insufficient randomness and complexity in the keys, making them easy for malicious attackers to obtain through brute-force attacks or cryptanalysis.
[0003] On the other hand, the key distribution process lacks standardization and security. Traditional methods may simply send the key to the terminal device without encrypting the transmission, making the key vulnerable to theft or tampering during transit. Furthermore, the lack of real-time monitoring of key usage by terminal devices makes it impossible to detect abnormal key usage, such as unauthorized copying or misuse. Once a key is leaked, it poses a serious threat to the data security and normal operation of the gas station monitoring system, affecting the accuracy of refueling data and the effectiveness of tax supervision. Therefore, a more secure and reliable key management method is needed. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a key management method and system based on security verification.
[0005] According to a first aspect of this application, a key management method based on security verification is provided, the method comprising:
[0006] Generate an initial key set, which contains multiple key units with unique identifiers;
[0007] The initial key set is subjected to security verification to obtain the target key set that passes the verification.
[0008] The target key set is sent to multiple terminal devices of the gas station monitoring system according to a preset distribution rule. The terminal devices include a gas station data acquisition terminal and a tax supervision docking terminal.
[0009] Monitor the process of the terminal device using the target key set and record the key usage status information;
[0010] Based on the key usage status information, a key update operation or a key revocation operation is triggered to generate an updated key set or a revoked key set.
[0011] According to a second aspect of this application, a key management system based on security verification is provided. The key management system based on security verification includes a processor and a readable storage medium. The readable storage medium stores a program that, when executed by the processor, implements the aforementioned key management method based on security verification.
[0012] Based on any of the above aspects, by generating an initial key set with unique identifiers and performing security verification on this initial key set, keys that meet security standards can be effectively filtered out, resulting in a target key set that passes verification. This significantly improves key security and reduces the risk of key cracking. The target key set is sent to multiple terminal devices of the gas station monitoring system, including gas station data acquisition terminals and tax supervision docking terminals, according to preset distribution rules. This ensures the standardization and security of key distribution and prevents key leakage and tampering during transmission. Monitoring the terminal devices' use of the target key set and recording key usage status information allows for real-time monitoring of key usage and timely detection of abnormal behavior. Based on the key usage status information, key update or revocation operations are triggered, generating updated or revoked key sets. This achieves dynamic key management, further ensuring the security of the gas station monitoring system and guaranteeing the accuracy of gas station data collection and the effectiveness of tax supervision. Attached Figure Description
[0013] Figure 1 A flowchart illustrating the key management method based on security verification provided in an embodiment of this application is shown.
[0014] Figure 2 This illustration shows a schematic diagram of the component structure of a key management system based on security verification provided in an embodiment of this application. Detailed Implementation
[0015] Figure 1 The diagram illustrates a flowchart of a key management method based on security verification provided in an embodiment of this application. It should be understood that in other embodiments, the order of some steps in the key management method based on security verification can be interchanged as needed, or some steps can be omitted or deleted. The detailed steps of this key management method based on security verification are described below.
[0016] Step S110: Generate an initial key set, which contains multiple key units with unique identifiers.
[0017] This embodiment focuses on key management in a gas station monitoring system. During gas station operation, to ensure the security of data collection and tax regulatory integration, relevant information needs to be encrypted, making key management crucial. Generating an initial key set is the starting point of the entire key management process. It must ensure that the generated key units meet the system's security requirements and are compatible with various operations and equipment within the gas station monitoring system.
[0018] Step S111: Obtain the basic parameter set of the gas station monitoring system. The basic parameter set includes system identification code, equipment type identifier and business scenario classification information.
[0019] The gas station monitoring system employs dedicated data interfaces for interaction with various devices and business modules. By calling these interfaces, the system's basic parameter set can be obtained. The system identifier code is a unique identifier for the gas station monitoring system within the entire network environment; it consists of a specific combination of characters used to distinguish different gas station monitoring systems. Device type identifiers differentiate between different devices within the gas station monitoring system, such as refueling data acquisition terminals and tax supervision docking terminals; each device has its own corresponding identifier. The business scenario classification information clarifies the types of business involved in the gas station monitoring system. For example, refueling data acquisition involves collecting data such as refueling volume and time; tax supervision docking primarily involves data interaction and supervision with tax authorities.
[0020] Step S112: Based on the basic parameter set, perform key unit generation processing to generate candidate key units that include system identifier code association field, device type identifier association field and business scenario classification information association field.
[0021] After obtaining the basic parameter set, candidate key units can be generated. This process requires extracting and transforming various pieces of information from the basic parameter set.
[0022] Step S1121: Extract the system identifier code from the basic parameter set, and convert the system identifier code into a character sequence of a preset length as the system identifier code associated field.
[0023] After extracting the system identifier code from the basic parameter set, it needs to be converted into a character sequence of a preset length to conform to the format requirements of the key unit. This may involve operations such as truncation, padding, or encoding conversion of the system identifier code. For example, if the system identifier code is originally a long string, it may be necessary to truncate key parts and then pad it according to preset rules to reach the preset length, ultimately forming the system identifier code association field. This system identifier code association field can accurately reflect the gas station monitoring system to which the key unit belongs.
[0024] Step S1122: Extract the device type identifier from the basic parameter set, map the device type identifier to the preset device type code table, and generate a device type identifier associated field.
[0025] The predefined device type code table is a mapping table that records the codes corresponding to various device types. After extracting the device type identifier from the basic parameter set, it is compared with the device type code table. If the device type identifier matches an entry in the code table, the corresponding code is used as the associated field of the device type identifier. For example, a refueling data acquisition terminal has a specific code in the device type code table. When the extracted device type identifier indicates that it is a refueling data acquisition terminal, that code is used as the associated field of the device type identifier. The purpose of this is to standardize the representation of device types, facilitating subsequent key management and device identification.
[0026] Step S1123: Extract business scenario classification information from the basic parameter set, match the business scenario classification information with the preset business scenario code table, and generate business scenario classification information association fields.
[0027] A pre-defined business scenario code table records the codes corresponding to various business scenarios involved in the gas station monitoring system. After extracting business scenario classification information from the basic parameter set, it is matched against the business scenario code table. If the business scenario classification information matches an item in the code table, the corresponding code is used as the associated field for the business scenario classification information. For example, the refueling data collection business has a corresponding code in the business scenario code table; when the extracted business scenario classification information is refueling data collection business, that code is used as the associated field for the business scenario classification information. This helps to clarify the business scenarios to which the key unit is applicable.
[0028] Step S1124: Concatenate the system identifier code associated field, the device type identifier associated field, and the business scenario classification information associated field according to the preset field order to generate an initial key character sequence.
[0029] After generating the system identifier code associated field, device type identifier associated field, and business scenario classification information associated field, they are concatenated together in a preset order. This preset field order is determined according to key management specifications and requirements; for example, the system identifier code associated field can be placed first, followed by the device type identifier associated field, and finally the business scenario classification information associated field. By concatenating these fields, the initial key character sequence is obtained.
[0030] Step S1125: Insert a preset delimiter character into the initial key character sequence to generate a candidate key unit containing a system identifier encoding associated field, a device type identifier associated field, and a business scenario classification information associated field.
[0031] To make the structure of the candidate key unit clearer and facilitate subsequent identification and processing, a preset delimiter character is inserted into the initial key character sequence. The preset delimiter character can be a specific symbol, such as a comma or a period. After inserting the delimiter, a candidate key unit is formed that includes a system identifier code association field, a device type identifier association field, and a business scenario classification information association field.
[0032] Step S113: Perform unique identifier allocation processing on the candidate key units, and generate a unique identifier code for each candidate key unit, which is a combination of system identifier code, device type identifier and business scenario classification information.
[0033] To ensure the uniqueness of each candidate key unit, a unique identifier code needs to be assigned to it. This unique identifier code is composed of a system identifier code, a device type identifier, and business scenario classification information. Specifically, these three pieces of information can be concatenated in a predetermined order, such as first concatenating the system identifier code, then the device type identifier, and finally the business scenario classification information. The unique identifier code generated in this way can accurately identify each candidate key unit, facilitating subsequent management and retrieval.
[0034] Step S114: Perform a format specification check on the candidate key unit to verify whether the character composition structure, field length and delimiter usage of the candidate key unit conform to the preset key format specification.
[0035] The predefined key format specifications have clear requirements for the character structure, field length, and delimiter usage of candidate key units. During the format compliance check, the character structure is checked first to ensure that all characters in the candidate key unit are valid and do not contain illegal or special characters. Next, the field lengths are checked to verify that the lengths of the system identifier code associated field, device type identifier associated field, and business scenario classification information associated field meet the predefined requirements. Finally, the delimiter usage is checked to ensure that the position and number of delimiters are correct. Only when the character structure, field length, and delimiter usage of a candidate key unit all conform to the predefined key format specifications is the candidate key unit considered to have passed the format compliance check.
[0036] Step S115: Summarize the candidate key units that have passed the format specification check to form an initial key set, which contains multiple key units with unique identification codes and standard format.
[0037] All candidate key units that pass the format specification check are grouped together to form the initial key set. Each key unit in this initial key set has a unique identifier code and its format conforms to the preset key format specification.
[0038] Step S120: Perform security verification on the initial key set to obtain the target key set that passes the verification.
[0039] After the initial key set is generated, it needs to undergo security verification to ensure that the key units within it meet security requirements. Security verification mainly involves validating the various associated fields of each key unit, including encryption strength, collision detection, and compliance checks.
[0040] Step S121: Extract the system identifier code associated field, device type identifier associated field, and business scenario classification information associated field for each key unit from the initial key set.
[0041] During security verification, the first step is to extract key information for each key unit from the initial key set. This includes the system identification code associated field, the device type identifier associated field, and the business scenario classification information associated field. These fields contain the core information of the key unit and form the basis for security verification. By extracting these fields, each key unit can be subjected to targeted checks.
[0042] Step S122: Perform encryption strength verification on the system identifier encoding associated field to verify whether it contains a random character segment of preset length and an anti-collision hash value.
[0043] A pre-defined random character field and a collision-resistant hash value are crucial indicators for measuring the encryption strength of the system identifier encoding associated field. During encryption strength verification, it is checked whether the system identifier encoding associated field contains a pre-defined random character field. The presence of a random character field increases the randomness and security of the key, preventing it from being cracked. Simultaneously, it is verified whether the field contains a collision-resistant hash value. The collision-resistant hash value is calculated using a pre-defined hash algorithm, ensuring the uniqueness and integrity of the system identifier encoding associated field. Only when the system identifier encoding associated field contains both a pre-defined random character field and a collision-resistant hash value is the encryption strength of that field considered to meet the requirements.
[0044] Step S123: Perform conflict detection processing on the device type identifier associated field, and check whether there is a device type identifier associated field of an activated key unit that is completely consistent with the field in the current gas station monitoring system.
[0045] To avoid conflicts between key units, conflict detection needs to be performed on the device type identifier associated field. The specific steps are as follows:
[0046] Step S1231: Access the key management database of the gas station monitoring system and obtain the set of device type identifier associated fields for all key units that are currently active.
[0047] The key management database of the gas station monitoring system records relevant information for all key units, including the device type identifier associated field. By accessing this database, the set of device type identifier associated fields for all currently active key units can be retrieved. This set of device type identifier associated fields contains the device type information of the key unit currently in use.
[0048] Step S1232: Extract field records from the set of associated fields of the device type identifier that are the same as the associated field of the device type identifier of the current key unit to be detected.
[0049] The device type identifier associated field of the key unit to be detected is compared with the set of device type identifier associated fields obtained from the database, and the records with the same field as the device type identifier associated field of the key unit to be detected are extracted. These records with the same field may indicate a conflicting key unit.
[0050] Step S1233: Count the number of records with the same field and generate a conflict count result.
[0051] The number of records with identical fields extracted is counted to obtain the conflict count result. This conflict count result reflects the conflict between the device type identifier associated field of the currently detected key unit and the device type identifier associated field of the activated key unit.
[0052] Step S1234: If the number of conflicts is greater than zero, it is determined that the device type identifier associated field of the key unit has a conflict; if the number of conflicts is equal to zero, it is determined that the device type identifier associated field of the key unit has no conflict.
[0053] The determination is based on the conflict count. If the conflict count is greater than zero, it indicates a conflict between the device type identifier associated field of the key unit being tested and the device type identifier associated field of an activated key unit, and the key unit may need to be adjusted or regenerated. If the conflict count is equal to zero, it indicates that there is no conflict in the device type identifier associated field of the key unit, and subsequent verification can continue.
[0054] Step S124: Perform compliance verification on the business scenario classification information associated fields to verify whether they match the preset scenario classification information tables for tax supervision docking business and refueling data collection business.
[0055] The pre-defined scenario classification information table for tax supervision docking and refueling data collection records the legitimate business scenario classification information. During compliance verification, the associated fields of the business scenario classification information are compared with the scenario classification information table. If a field of the business scenario classification information matches an item in the scenario classification information table, that field is considered to meet the compliance requirements; if they do not match, it means that the key unit may not be suitable for the current business scenario and needs to be adjusted.
[0056] Step S125: Summarize the key units that have passed encryption strength verification, conflict detection without conflict, and compliance verification to form a set of verified target keys.
[0057] After verifying the encryption strength of the system identifier encoding associated fields, detecting conflicts in the device type identifier associated fields, and verifying the compliance of the business scenario classification information associated fields, all key units that pass each verification are aggregated to form a target key set that has passed verification. The key units in this target key set meet the security requirements and can be used for subsequent distribution and use.
[0058] Step S130: Send the target key set to multiple terminal devices of the gas station monitoring system according to the preset distribution rules. The terminal devices include a gas station data acquisition terminal and a tax supervision docking terminal.
[0059] After the target key set is generated, the key units within it need to be distributed to various terminal devices of the gas station monitoring system to ensure that these devices can use the keys to encrypt and process data normally.
[0060] Step S131: Extract the unique identifier code of each key unit from the target key set, and parse the system identifier code, device type identifier and business scenario classification information in the unique identifier code.
[0061] To accurately distribute key units to the corresponding terminal devices, it is first necessary to extract the unique identification code of each key unit from the target key set and parse the system identification code, device type identifier, and business scenario classification information within it. This information helps determine the applicable scope of the key unit and the corresponding terminal devices.
[0062] Step S132: Match the target terminal device type according to the device type identifier, classify the key unit of the refueling data collection terminal corresponding to the device type identifier into the first distribution subset, and classify the key unit of the tax supervision docking terminal corresponding to the device type identifier into the second distribution subset.
[0063] Based on the parsed device type identifiers, the key units in the target key set are categorized. Key units corresponding to the device type identifiers of the refueling data collection terminals are classified into the first subset; these key units will be used for data encryption and processing at the refueling data collection terminals. Key units corresponding to the device type identifiers of the tax supervision docking terminals are classified into the second subset; these key units will be used for data interaction and supervision between the tax supervision docking terminals and the tax authorities.
[0064] Step S133: Perform transmission encryption processing on the first distribution subset and the second distribution subset respectively, and generate an encrypted transmission packet containing timestamp information for the key unit in each distribution subset.
[0065] To ensure the security of the key unit during transmission, the first and second distribution subsets need to be encrypted during transmission. The specific operations are as follows:
[0066] Step S1331: Obtain the current system time as timestamp information, and convert the timestamp information into a time character sequence in a preset format.
[0067] The current system time is obtained as a timestamp, which records the transmission time of the key unit. The timestamp is then converted into a time character sequence in a preset format for subsequent concatenation and encryption processing.
[0068] Step S1332: Extract the unique identifier code and key content of each key unit from the first distribution subset, and concatenate the unique identifier code, key content and time character sequence to generate the first original transmission data.
[0069] The unique identifier code and key content of each key unit are extracted from the first subset. Then, the unique identifier code, key content, and time character sequence are concatenated in a predetermined order to generate the first raw transmission data. This raw transmission data contains key information of the key unit and the transmission time.
[0070] Step S1333: Encrypt the first original transmission data using a preset symmetric encryption algorithm to generate a first encrypted transmission packet.
[0071] The preset symmetric encryption algorithm is a commonly used encryption method that uses the same key for both encryption and decryption. This symmetric encryption algorithm is used to encrypt the first original transmitted data, generating a first encrypted transmission packet. This encrypted transmission packet ensures that the key unit is not stolen or tampered with during transmission.
[0072] Step S1334: Extract the unique identifier code and key content of each key unit from the second distribution subset, and concatenate the unique identifier code, key content and time character sequence to generate the second original transmission data.
[0073] Similar to processing the first distribution subset, the unique identifier code and key content of each key unit are extracted from the second distribution subset. Then, the unique identifier code, key content, and time character sequence are concatenated to generate the second original transmission data.
[0074] Step S1335: Encrypt the second original transmission data using a preset asymmetric encryption algorithm to generate a second encrypted transmission packet.
[0075] The preset asymmetric encryption algorithm uses a pair of keys, namely a public key and a private key. This asymmetric encryption algorithm is used to encrypt the second original transmitted data, generating a second encrypted transmission packet. Asymmetric encryption algorithms offer higher security and are suitable for tax regulatory and data exchange processes with high security requirements.
[0076] Step S134: Obtain the online status information of the refueling data collection terminal and the tax supervision docking terminal, and filter the target terminal devices that are online.
[0077] Before distributing the key units, it is necessary to obtain the online status information of the refueling data collection terminal and the tax supervision interface terminal. This is done by communicating with the terminal devices or querying the relevant device management system to obtain their online status. Target terminal devices that are online are then selected; only these devices can receive and use the key units.
[0078] Step S135: Send the encrypted transmission packet to the corresponding target terminal device and record the binding relationship information between the key unit and the target terminal device.
[0079] The generated first and second encrypted transmission packets are sent to their respective target terminal devices: the refueling data collection terminal and the tax supervision docking terminal. During transmission, the accuracy and integrity of the encrypted transmission packets are ensured. Simultaneously, the binding relationship information between the key unit and the target terminal device is recorded for subsequent management and retrieval.
[0080] Step S140: Monitor the process of the terminal device using the target key set and record the key usage status information.
[0081] To ensure the secure use and effective management of the key unit, it is necessary to monitor the process of the terminal device using the target key set and record the relevant key usage status information.
[0082] Step S141: Deploy a key usage monitoring module in the terminal device. The monitoring module is used to capture key unit call operation events.
[0083] Deploy a key usage monitoring module in the fuel data collection terminal and the tax supervision docking terminal. This monitoring module can be a software program that can monitor key unit call operation events in the terminal device in real time. When the terminal device calls the key unit to encrypt or decrypt data, the monitoring module can capture these operation events and record relevant information.
[0084] Step S142: Parse and process the call operation event to extract the unique identifier code of the key unit, the call timestamp, the identity identifier of the call initiator, and the call business type information.
[0085] After the monitoring module captures the call operation event, it needs to parse and process these events. Through parsing, the unique identification code of the key unit can be extracted to accurately identify the key unit being called; the call timestamp records the specific time the key unit was called; the call initiator's identity identifier is used to determine which user or program initiated the key unit call; and the call business type information clarifies the specific business for which the key unit is called, such as refueling data collection or tax supervision docking.
[0086] Step S143: Perform compliance judgment processing on the called business type information to verify whether it is consistent with the business type indicated by the associated field of the key unit business scenario classification information.
[0087] The extracted call business type information is compared with the business type indicated by the associated field of the key unit's business scenario classification information. For example, if the business type indicated by the associated field of the key unit's business scenario classification information is refueling data collection, but the call business type information shows it as tax supervision docking, then the call does not comply with the key unit's usage rules and has a compliance issue. Only when the call business type information matches the business type indicated by the associated field of the key unit's business scenario classification information is the call deemed compliant.
[0088] Step S144: Perform frequency statistics processing on the call operation events, and calculate the number of times each key unit is called within a preset time window and the time interval between adjacent calls.
[0089] First, the call operation events are grouped and processed according to the unique identification code of the key unit. Because each key unit has its own unique identification code, the call operation events of different key units can be distinguished by this unique identification code, thus obtaining the call event sequence corresponding to each key unit.
[0090] Next, the call timestamps in each call event sequence are sorted. The purpose of sorting is to arrange the call timestamps in chronological order, which facilitates subsequent statistics and calculations. The sorted list generates a chronologically ordered list of call timestamps.
[0091] Then, the number of timestamps in the call timestamp list is counted, and this number is taken as the number of times the key unit is called within the preset time window. The preset time window is a period of time set according to the business needs and security requirements of the gas station monitoring system, during which the call status of the key unit is counted.
[0092] Finally, the call timestamp list is traversed, and the time difference between any two adjacent timestamps is calculated. For example, for a call timestamp list arranged chronologically, the difference between the second and first timestamps, the difference between the third and second timestamps, and so on, is calculated sequentially to generate a list of adjacent call intervals. The call count and the list of adjacent call intervals are stored as frequency statistics, associated with the unique identifier code of the corresponding key unit. This allows for a clear understanding of the usage frequency of each key unit.
[0093] Step S145: Summarize the unique identifier code, call timestamp, call initiator identity identifier, call business type information, compliance judgment result, number of calls and adjacent call time intervals to form key usage status information.
[0094] The unique identifier code, call timestamp, call initiator's identity, call business type information, compliance judgment result, number of calls, and time interval between adjacent calls obtained through the above steps are aggregated to form key usage status information. This key usage status information comprehensively reflects various situations during the use of each key unit.
[0095] Step S150: Trigger a key update operation or a key revocation operation based on the key usage status information, and generate an updated key set or a revoked key set.
[0096] The key usage status information records the usage of the key unit. Based on this information, it can be determined whether the key needs to be updated or revoked to ensure the security and validity of the key.
[0097] For example, step S151: extract the compliance judgment result of each key unit from the key usage status information, and filter out key units with non-compliant business type calls as candidate keys to be revoked.
[0098] The compliance assessment results in the key usage status information clearly indicate whether the invocation of each key unit complies with the business type requirements. By extracting these compliance assessment results, key units with non-compliant business type invocations are filtered out. These key units may have been misused or pose security risks, and they are designated as candidate keys for revocation.
[0099] Step S152: Extract the number of calls and the time interval between adjacent calls for each key unit from the key usage status information, and filter out key units whose number of calls exceeds a preset threshold or whose time interval between adjacent calls is less than a preset threshold as candidate keys to be updated.
[0100] The preset threshold is a standard set based on the security strategy and business needs of the gas station monitoring system. The system extracts the call count and the time interval between adjacent calls for each key unit from the key usage status information. Key units with a call count exceeding the preset threshold are filtered out, as excessive call counts may indicate overuse and security risks. Simultaneously, key units with adjacent call intervals less than the preset threshold are also filtered out, as this may indicate frequent key usage or other anomalies. These key units meeting the criteria are designated as candidate keys for update.
[0101] Step S153: Perform invalidation marking processing on the candidate keys to be revoked, generate revocation key units containing invalidation timestamps, and summarize the revocation key units to form a revocation key set.
[0102] The candidate keys for revocation are marked as invalid, and during this process, the expiration timestamp of the key unit is recorded. The expiration timestamp is used to determine when the key unit becomes invalid. After the invalidation marking process, revocation key units containing the expiration timestamps are generated. All revocation key units are aggregated to form a revocation key set. The key units in this revocation key set will no longer be used by the terminal equipment of the gas station monitoring system.
[0103] Step S154: Based on the unique identifier code of the candidate key to be updated, obtain the corresponding system identifier code, device type identifier and business scenario classification information.
[0104] The unique identifier code of the candidate key to be updated contains its corresponding system identifier code, device type identifier, and business scenario classification information. This information can be obtained from the relevant database or storage module of the gas station monitoring system using the unique identifier code. This information forms the basis for generating the new key unit, ensuring that the new key unit is consistent with the original key unit in terms of applicable systems, devices, and business scenarios.
[0105] Step S155: Using the same generation rules and format specifications as the initial key set, generate new key units as update key units based on the system identifier code, device type identifier, and business scenario classification information, and summarize the update key units to form an update key set.
[0106] Based on the obtained system identifier code, device type identifier, and business scenario classification information, new key units are generated according to the generation rules and format specifications used when generating the initial key set. These new key units will replace the original candidate keys to be updated, providing secure encryption services for the terminal devices of the gas station monitoring system. All generated updated key units are then aggregated to form an updated key set. The key units in this updated key set will be distributed to the corresponding terminal devices to update the original keys.
[0107] In the above embodiments, various privacy protection and anti-leakage technologies are employed in the data collection, storage, and usage stages to protect potentially sensitive data. During the data collection phase, the collected sensitive data is encrypted, for example, using symmetric encryption algorithms to encrypt sensitive data containing user identity information, ensuring data security during transmission. For data storage, a secure storage system is used to store the encrypted data, with strict access control; only authorized personnel can access this data. Simultaneously, the stored data is backed up regularly to prevent data loss. During data usage, operations involving access to and use of sensitive data are audited and recorded to promptly detect and handle anomalies. Through these privacy protection and anti-leakage technologies, the security and confidentiality of sensitive data in the gas station monitoring system are ensured, preventing data leaks and other security issues.
[0108] Furthermore, Figure 2 A schematic diagram of the hardware structure of a key management system 100 based on security verification for implementing the methods provided in the embodiments of this application is shown. Figure 2 As shown, the key management system 100 based on security verification may include at least one processor 102 (the processor 102 may be, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, a transmission device 106 for communication functions, and a controller 108. Those skilled in the art will understand that... Figure 2 The structure shown is for illustrative purposes only and does not limit the structure of the security-verification-based key management system 100. For example, the security-verification-based key management system 100 may also include... Figure 2 The more or fewer components shown, or having the same Figure 2 The different configurations shown.
[0109] The memory 104 can be used to store software programs and modules of application software, such as the program instructions corresponding to the method embodiments described above in this application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-described key management method based on security verification. The transmission device 106 is used to acquire or send data via a network.
[0110] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
Claims
1. A key management method based on security verification, characterized in that, The method includes: Generate an initial key set, which contains multiple key units with unique identifiers; The initial key set is subjected to security verification to obtain the target key set that passes the verification. The target key set is sent to multiple terminal devices of the gas station monitoring system according to a preset distribution rule. The terminal devices include a gas station data acquisition terminal and a tax supervision docking terminal. Monitor the process of the terminal device using the target key set and record the key usage status information; Based on the key usage status information, a key update operation or a key revocation operation is triggered to generate an updated key set or a revoked key set.
2. The key management method based on security verification according to claim 1, characterized in that, The generation of an initial key set, which contains multiple key units with unique identifiers, includes: Obtain the basic parameter set of the gas station monitoring system, which includes system identification code, equipment type identifier and business scenario classification information; Based on the aforementioned set of basic parameters, a key unit generation process is performed to generate candidate key units that include a system identifier code associated field, a device type identifier associated field, and a business scenario classification information associated field. The candidate key units are assigned unique identifiers, and a unique identifier code is generated for each candidate key unit, which is a combination of system identifier code, device type identifier and business scenario classification information. The candidate key unit is subjected to a format specification check to verify whether the character composition structure, field length and delimiter usage of the candidate key unit conform to the preset key format specification. Candidate key units that pass the format specification check are aggregated to form an initial key set, which contains multiple key units with unique identification codes and standard format.
3. The key management method based on security verification according to claim 2, characterized in that, The key unit generation process based on the aforementioned basic parameter set generates candidate key units containing system identifier encoding associated fields, device type identifier associated fields, and business scenario classification information associated fields, including: Extract the system identifier code from the set of basic parameters, and convert the system identifier code into a character sequence of a preset length as the system identifier code associated field; The device type identifier is extracted from the set of basic parameters, and the device type identifier is mapped to a preset device type code table to generate a device type identifier associated field. Business scenario classification information is extracted from the basic parameter set, and the business scenario classification information is matched with the preset business scenario code table to generate business scenario classification information association fields. The system identifier encoding associated field, the device type identifier associated field, and the business scenario classification information associated field are concatenated according to a preset field order to generate an initial key character sequence. A preset delimiter character is inserted into the initial key character sequence to generate a candidate key unit containing a system identifier encoding associated field, a device type identifier associated field, and a business scenario classification information associated field.
4. The key management method based on security verification according to claim 1, characterized in that, The step of performing security verification on the initial key set to obtain a target key set that passes the verification includes: Extract the system identifier code associated field, device type identifier associated field, and business scenario classification information associated field for each key unit from the initial key set; The encryption strength of the system identifier encoding associated field is verified to check whether it contains a random character segment of a preset length and an anti-collision hash value. The device type identifier associated field is subjected to conflict detection processing to check whether there is a device type identifier associated field in the current gas station monitoring system that is completely consistent with the activated key unit. The relevant fields of the business scenario classification information are subjected to compliance verification to verify whether they match the preset scenario classification information tables for tax supervision docking business and refueling data collection business. Key units that pass encryption strength verification, conflict detection without conflict, and compliance verification are aggregated to form a set of verified target keys.
5. The key management method based on security verification according to claim 4, characterized in that, The conflict detection process for the device type identifier associated field, which checks whether there is a device type identifier associated field in the current gas station monitoring system that is completely identical to the field of the activated key unit, includes: Access the key management database of the gas station monitoring system to obtain the set of device type identifier associated fields for all key units that are currently active. Extract the field record that is the same as the device type identifier associated field of the current key unit to be detected from the set of device type identifier associated fields; Count the number of records with the same field and generate a conflict count result; If the number of conflicts is greater than zero, it is determined that there is a conflict in the device type identifier associated field of the key unit. If the number of conflicts is zero, then the device type identifier associated field of the key unit is determined to be conflict-free.
6. The key management method based on security verification according to claim 1, characterized in that, The process involves sending the target key set to multiple terminal devices of the gas station monitoring system according to a preset distribution rule. These terminal devices include a gas station data acquisition terminal and a tax supervision interface terminal. Extract the unique identifier code of each key unit from the target key set, and parse the system identifier code, device type identifier and business scenario classification information in the unique identifier code; Based on the device type identifier, the target terminal device type is matched, and the key unit of the refueling data collection terminal corresponding to the device type identifier is classified into the first distribution subset, and the key unit of the tax supervision docking terminal corresponding to the device type identifier is classified into the second distribution subset. The first and second distribution subsets are respectively subjected to transmission encryption processing, and an encrypted transmission packet containing timestamp information is generated for the key unit in each distribution subset; Obtain the online status information of the refueling data collection terminal and the tax supervision docking terminal, and filter the target terminal devices that are online; The encrypted transmission packet is sent to the corresponding target terminal device, and the binding relationship information between the key unit and the target terminal device is recorded.
7. The key management method based on security verification according to claim 6, characterized in that, The step of performing transmission encryption processing on the first and second distribution subsets respectively, and generating an encrypted transmission packet containing timestamp information for the key unit in each distribution subset, includes: Obtain the current system time as timestamp information and convert the timestamp information into a time character sequence in a preset format; Extract the unique identifier code and key content of each key unit from the first distribution subset, and concatenate the unique identifier code, key content and time character sequence to generate the first original transmission data; The first original transmitted data is encrypted using a preset symmetric encryption algorithm to generate a first encrypted transmission packet; Extract the unique identifier code and key content of each key unit from the second distribution subset, and concatenate the unique identifier code, key content and time character sequence to generate the second original transmission data; The second original transmitted data is encrypted using a preset asymmetric encryption algorithm to generate a second encrypted transmission packet.
8. The key management method based on security verification according to claim 1, characterized in that, The process of monitoring the terminal device's use of the target key set includes recording key usage status information, including: A key usage monitoring module is deployed in the terminal device, and the monitoring module is used to capture key unit invocation operation events; The call operation event is parsed and processed to extract the unique identifier code of the key unit, the call timestamp, the identity identifier of the call initiator, and the call business type information; The business type information is processed for compliance judgment to verify whether it is consistent with the business type indicated by the associated field of the business scenario classification information of the key unit; The call operation events are subjected to frequency statistics processing to calculate the number of times each key unit is called within a preset time window and the time interval between adjacent calls; The unique identifier code, call timestamp, call initiator identity identifier, call business type information, compliance judgment result, number of calls and time interval between adjacent calls are summarized to form key usage status information.
9. The key management method based on security verification according to claim 8, characterized in that, The frequency statistics processing of the call operation events, calculating the number of calls to each key unit within a preset time window and the time interval between adjacent calls, includes: The invocation operation events are grouped according to the unique identification code of the key unit to obtain the invocation event sequence corresponding to each key unit; Sort the call timestamps in each call event sequence to generate a list of call timestamps arranged in chronological order; The number of timestamps in the call timestamp list is counted as the number of times the key unit is called within a preset time window; Iterate through the list of call timestamps, calculate the time difference between two adjacent timestamps, and generate a list of adjacent call time intervals; The number of calls and the list of adjacent call time intervals are used as frequency statistics results and stored in association with the unique identifier code of the corresponding key unit.
10. A key management system based on security verification, characterized in that, The device includes a processor and a readable storage medium storing a program that, when executed by the processor, implements the key management method based on security verification as described in any one of claims 1-9.
Citation Information
Patent Citations
Key management method and system based on security verification device
CN120012160A
Asset Management Service for Distributed Computing Environments
US20140131434A1