Security protection method and device based on 5G slice communication system and storage medium

By adopting automatic key generation and intelligent identification technology in the 5G slice communication system, combined with the TLS/DTLS protocol, the problems of inefficient key management and security vulnerabilities in network slice technology are solved, and efficient and secure key management is achieved. Improves the security and operation efficiency of the communication system.

CN119255233APending Publication Date: 2025-01-03GUANGZHOU HANTELE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411339973.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

New security vulnerabilities and privacy protection challenges introduced by network slicing technology in 5G networks, especially data leakage problems caused by insufficient isolation, and existing key management methods are inefficient in rapidly changing network environments and are difficult to cope with large number of device access.

Method used

Use key automatic generation technology to generate a unique key for each 5G slice, and intelligently identify it through artificial intelligence and machine learning technology, and combine TLS/DTLS protocol for secure transmission to ensure the security of the key generation, transmission and identification process. Sex and efficiency.

Benefits of technology

Improve the efficiency and security of key management, dynamically adjust key policies, effectively prevent unauthorized access and data leakage, improve the security and operation efficiency of communication systems, and ensure the security of user data and network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119255233A_ABST
    Figure CN119255233A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of network slicing, and particularly relates to a security protection method and device based on a 5G slice communication system and a storage medium. The security protection method comprises the following steps: S1, generating a key for each 5G slice by adopting an automatic key generation technology; s2, transmitting the key from the source device to a target device through a key secure transmission technology; and S3, performing feature extraction on the keys received by the target equipment by adopting artificial intelligence and machine learning technologies, classifying the keys, and performing security processing measures according to a classification result. The security protection device comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and the processor implements the security protection method when executing the program. A computer program is stored on the computer readable storage medium, and the security protection method is realized when the computer program is executed by a processor. The present invention is helpful to improve the security of a communication system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of network slicing, and specifically relates to a security protection method, device and storage medium for a communication system based on 5G slicing. Background Art

[0002] With the development of the fifth generation mobile communication (5G) technology, the global communication network is facing unprecedented changes. 5G technology not only provides higher data transmission rates and lower latency, but also supports large-scale device connections and high-reliability services, which makes it possible to realize various emerging applications and services. However, the complexity and heterogeneity of 5G networks also bring new security challenges. Especially in network slicing technology, how to ensure data security and privacy protection between different slices has become an urgent problem to be solved.

[0003] In traditional wireless communication systems, key generation and management usually rely on pre-distribution or computation-based security mechanisms, which may no longer be applicable in 5G environments.

[0004] Network slicing is a key technology in 5G networks. Although this technology improves resource utilization and network flexibility, it also increases the complexity of security management. As an emerging network architecture, 5G slicing technology aims to create multiple logical networks on a single physical network through virtualization technology. With its widespread application, it also brings new security challenges and vulnerabilities. Although 5G technology provides higher data rates and lower latency, it also brings new security challenges. For example, although network slicing technology can improve the flexibility and efficiency of the network, it may also introduce new security vulnerabilities, such as insufficient isolation that may lead to data leakage between different users. In addition, although 3GPP has enhanced security and privacy protection measures in the 5G standard, there are still some unresolved security and privacy issues.

[0005] Therefore, a more efficient and secure key management solution is needed to cope with the rapidly changing network environment and the access of a large number of devices. It is particularly important to develop a method that can automatically generate, transmit and intelligently identify keys in a 5G slicing environment. Summary of the invention

[0006] To solve technical problems: Although 5G technology provides higher data rates and lower latency, it also brings new security challenges. For example, although network slicing technology can improve the flexibility and efficiency of the network, it may also introduce new security vulnerabilities, such as insufficient isolation that may lead to data leakage between different users. In addition, although 3GPP has enhanced security and privacy protection measures in the 5G standard, there are still some unresolved security and privacy issues.

[0007] The present invention provides the following technical solutions:

[0008] First,

[0009] The security protection method based on the 5G slicing communication system of the present invention comprises the following steps:

[0010] Step S1: Generate a key for each 5G slice using automatic key generation technology;

[0011] Step S2: transmitting the key from the source device to the target device through a key security transmission technology;

[0012] Step S3: Use artificial intelligence and machine learning technology to extract features of the keys received by the target device. After feature extraction, use the machine learning model to classify the keys, and perform security processing measures based on the classification results.

[0013] Further, step S1 includes:

[0014] Step S11, collecting entropy sources: obtaining several entropy sources from physical devices or software algorithms;

[0015] Step S12, generating random numbers: using a random number generator based on a physical entropy source to generate random numbers;

[0016] Step S13, key expansion: converting the random number into a key of a set length through a key expansion function KDF;

[0017] Step S14, business and security level considerations: adjust the length and complexity of the key according to the business requirements and security level of the slice.

[0018] Furthermore, in step S13, the key expansion function generates the final key depending on the random number, the expected key length and the number of iterations.

[0019] Further, step S2 includes:

[0020] Step S21, establishing a secure connection: establishing a TLS / DTLS connection between the source device and the target device;

[0021] Step S22, key encapsulation: encapsulate the key in a TLS / DTLS message;

[0022] Step S23, encrypted transmission: transmitting the encapsulated key via a secure connection;

[0023] Step S24, verification and reception: the target device verifies the integrity and authenticity of the message and extracts the key.

[0024] Furthermore, step S21 includes: establishing a secure connection to initiate a TLS / DTLS handshake process for the source device, the target device responds and completes the handshake, and during the handshake process, the two parties negotiate security parameters, which include encryption algorithms, key exchange methods, and identity authentication mechanisms.

[0025] Further, step S24 includes: target device verification includes checking the signature, hash or MAC value of the message, and confirming that the key identifier matches the expected identifier. If the verification is successful, the key is extracted and returned. If the returned key is the same as the expected key, the key transmission is successful.

[0026] Further, step S3 includes:

[0027] Step S31, feature extraction: extracting features from the received key;

[0028] Step S32, model prediction: using the trained machine learning model to predict the category or attribute of the key based on the extracted features;

[0029] Step S33, processing measures: take corresponding measures according to the category or attribute result of the key, including acceptance, rejection, and alarm.

[0030] Second,

[0031] The security protection device based on the 5G slicing communication system proposed in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the aforementioned security protection method based on the 5G slicing communication system is implemented.

[0032] Thirdly,

[0033] The present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the aforementioned security protection method based on the 5G slicing communication system is implemented.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] The present invention realizes the automatic generation, transmission and intelligent identification of keys by utilizing the characteristics of wireless channels. This can not only improve the efficiency and security of key management, but also dynamically adjust the key strategy according to different network slicing requirements, thereby better protecting user data and network resources.

[0036] The present invention helps to improve the security of the communication system. By generating independent keys for each 5G slice and using converged communication technology for secure transmission and intelligent identification, security incidents such as unauthorized access and data leakage can be effectively prevented. This is crucial for protecting personal privacy and corporate secrets.

[0037] The present invention helps to improve the efficiency of communication operation. Traditional key management methods often have problems such as low efficiency and poor scalability. The key management method based on 5G slicing and converged communication technology can realize automatic generation, rapid transmission and intelligent identification of keys, thereby greatly improving the operation efficiency of the communication system.

[0038] Providing important technical support for the security and reliability of 5G networks will help promote the application and development of 5G technology in a wider range of fields; it can provide reliable solutions for related industries and promote the development and innovation of related industries. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a flow chart of the security protection method based on the 5G slicing communication system of the present invention. DETAILED DESCRIPTION

[0040] The technical solution of the present invention will be clearly described below in conjunction with the accompanying drawings. Obviously, the described embodiments are not all embodiments of the present invention, and all other embodiments obtained by ordinary technicians in the field without making creative work are within the protection scope of the present invention.

[0041] like Figure 1 As shown, the present invention provides a security protection method based on a 5G slicing communication system, comprising:

[0042] Step S1: Use automatic key generation technology to generate a unique and secure key for each 5G slice.

[0043] Automatic key generation technology uses advanced algorithms to generate unique and secure keys for each 5G slice. These keys will be used to protect communication data between slices, ensuring the confidentiality, integrity and availability of data.

[0044] The algorithms used in the automatic key generation technology include:

[0045] Random number generation algorithm: A random number generator (TRNG) based on physical entropy sources, such as thermal noise, electromagnetic noise, etc., is used to ensure that the generated random numbers are highly random and unpredictable.

[0046] Encryption algorithm: Use a symmetric encryption algorithm such as AES (Advanced Encryption Standard) or ChaCha20, combined with a key expansion function (such as KDF) to derive the final key from the random number.

[0047] AES (Advanced Encryption Standard), also known as Rijndael encryption, is a symmetric key encryption algorithm officially adopted by the National Institute of Standards and Technology (NIST) in 2001. KDF is an algorithm specially designed to derive keys from given inputs (such as passwords, random numbers, etc.). ChaCha20 is a stream cipher algorithm that encrypts data by generating an infinitely long pseudo-random byte stream.

[0048] Step S1 includes:

[0049] Step S11, collecting entropy sources: obtaining several entropy sources from physical devices or software algorithms.

[0050] This step is mainly to collect randomness from physical or software sources, which can be expressed as: H = CollectEntropy(), where the main purpose of the CollectEntropy() function is to collect randomness from physical or software sources. This randomness (also called entropy) is the basis for generating high-quality random numbers or keys. H represents the collected entropy source.

[0051] Step S12, generating random numbers: inputting the collected entropy source into a random number generator (TRNG) of a physical entropy source, and the random number generator (TRNG) of a physical entropy source generates random numbers using the randomness of the physical entropy source.

[0052] This can be expressed as: R=TRNG(H), where R is the generated random number and TRNG is a random number generation function based on the entropy source H.

[0053] Step S13, key expansion: convert the random number into a key of a set length through KDF.

[0054] This can be expressed as: K = KDF(R, length, iterations), where K is the final generated key and KDF is the key expansion function, which depends on the random number R, the expected key length (length) and the number of iterations (iterations).

[0055] Step S14, business and security level considerations: adjust the length and complexity of the key according to the business requirements and security level of the slice.

[0056] This step mainly adjusts the key parameters, such as length and complexity, according to business needs and security levels. This can be represented by an adjustment function:

[0057] Kadjusted=AdjustKey(K,business_needs,security_level),

[0058] Kadjusted is the adjusted key, and AdjustKey is a function that adjusts the key based on business needs (business_needs) and security level (security_level).

[0059] In actual applications, these functions (such as CollectEntropy, TRNG, KDF, AdjustKey) will be implemented by specific algorithms and programs.

[0060] Additionally, the generate_key function performs the key expansion process, which can be summarized by the following formula:

[0061] K=PBKDF2(password,salt,key_length,iterations)

[0062] PBKDF2 is a specific key expansion function that relies on the initial key material (password), salt value (salt), expected key length (key_length) and number of iterations (iterations) to generate the final key K.

[0063] Pseudocode example of step S1:

[0064] import os

[0065] from Crypto.Random import get_random_bytes

[0066] from Crypto.Protocol.KDF import PBKDF2

[0067] def generate_key(password,salt,key_length,iterations):

[0068] Generate a key from a password and a salt using the PBKDF2 algorithm

[0069] :param password: Initial key material

[0070] :param salt: salt value

[0071] :param key_length: expected key length (bytes)

[0072] :param iterations: number of iterations

[0073] :return: Generated key

[0074] return PBKDF2(password,salt,dkLen=key_length,count=iterations).read()

[0075] #Example Usage

[0076] salt=get_random_bytes(16)#Generate random salt

[0077] password = os.urandom(16) #Use random numbers as initial key material

[0078] key_length=32 #AES-256 key length

[0079] iterations=100000#number of iterations

[0080] key = generate_key (password, salt, key_length, iterations) # Generate key

[0081] print("Generated Key:",key.hex())

[0082] Step S2: The key is transmitted from the source device to the target device through a key security transmission technology.

[0083] Key security transmission technology ensures that the generated key can be securely transmitted from the source device to the target device. The isolation and encryption protocols of 5G slices are used to ensure the security of the transmission channel.

[0084] The transmission protocols of key security transmission technology include:

[0085] TLS / DTLS: For wired and wireless transmission, TLS and DTLS protocols are used respectively. TLS is mainly used for encryption on application layer protocols such as HTTP, while DTLS is a protocol variant of TLS designed for unreliable transmission protocols such as UDP. These protocols provide encryption, integrity verification and authentication mechanisms.

[0086] Independent transmission channel: Establish an independent transmission channel for each slice, using different ports or tunnels.

[0087] Step S2 includes:

[0088] Step S21, establish a secure connection: establish a TLS / DTLS connection between the source device and the target device. This step mainly establishes a TLS / DTLS connection between the source device and the target device, which is expressed as:

[0089] C=EstablishSecureConnection(S,T,P),

[0090] Where C represents the established secure connection, S is the source device, T is the target device, and P is the selected transport protocol (TLS or DTLS).

[0091] The EstablishSecureConnection function implements the TLS / DTLS handshake process initiated by the source device S, and the target device T responds and completes the handshake. During the handshake process, both parties negotiate security parameters such as encryption algorithm, key exchange method and identity authentication mechanism.

[0092] Step S22, key encapsulation: encapsulate the key in a TLS / DTLS message. It can be expressed as:

[0093] M=EncapsulateKey(K,P),

[0094] Where M is the encapsulated encrypted message, K is the key to be transmitted, and P is the transmission protocol.

[0095] The EncapsulateKey function uses the message format defined in the TLS / DTLS protocol to encapsulate the key K in the appropriate message type. If supported by the protocol, a key encapsulation mechanism (such as TLS's key update message or a similar mechanism for DTLS) can also be used to securely transmit the key.

[0096] Step S23, encrypted transmission: Transmit the encapsulated key through a secure connection. It can be expressed as:

[0097] TransmitEncryptedKey(C,M),

[0098] The TransmitEncryptedKey function implements sending the encapsulated encrypted message M to the target device T through the secure connection C. This step does not require additional encryption processing because the channel itself is already encrypted.

[0099] Step S24, verification and reception: The target device verifies the integrity and authenticity of the message and extracts the key. It is expressed as:

[0100] K′=VerifyAndReceiveKey(C,M,KeyID)

[0101] Where K′ is the received and verified key, which should be the same as the original key K, and KeyID is the expected key identifier for verification.

[0102] The VerifyAndReceiveKey function implements the process by which the target device T verifies the integrity and authenticity of the received encapsulated encrypted message M and extracts the key. Verification typically involves checking the signature, hash, or MAC value of the message, and confirming that the key identifier KeyID matches the expected identifier. If verification is successful, the key K' is extracted and returned. If K' is the same as the expected key K (or satisfies a certain verification relationship), the key transfer is successful.

[0103] In addition, the function in the pseudocode (such as

[0104] EstablishSecureConnection, EncapsulateKey, TransmitEncryptedKey, VerifyAnd ReceiveKey) will depend on specific TLS / DTLS libraries and 5G slicing technology details in actual implementation.

[0105] In general, mathematical formulas are used more to abstract and summarize technical processes rather than provide specific calculation steps. In actual engineering practice, these processes will be transformed into specific code implementations.

[0106] Core pseudo code example of step S2:

[0107] / / 1. Technical Overview and Initialization

[0108] / / Assume that 5G slice configuration and TLS / DTLS library are available

[0109] / / 2.Transmission protocol selection

[0110] / / Select TLS or DTLS according to the connection method

[0111] function selectProtocol(isWireless):

[0112] if isWireless:

[0113] return "DTLS"

[0114] else:

[0115] return "TLS"

[0116] / / 3. Transmission process

[0117] / / 3.1 Establish a secure connection

[0118] function establishSecureConnection(source,target,protocol):

[0119] if protocol=="TLS":

[0120] connection=TLS.createConnection(source,target)

[0121] else if protocol=="DTLS":

[0122] connection=DTLS.createConnection(source,target)

[0123] if connection.isEstablished():

[0124] return connection

[0125] else:

[0126] raise Exception("Failed to establish secure connection")

[0127] / / 3.2 Key Encapsulation

[0128] function encapsulateKey(key,protocol):

[0129] / / Create a TLS / DTLS message, including the key

[0130] message=Message()

[0131] message.addHeader("KeyTransmission","1.0")

[0132] message.addPayload(key)

[0133] / / Encrypt and verify integrity according to the protocol

[0134] if protocol=="TLS":

[0135] encryptedMessage=TLS.encryptMessage(message)

[0136] else if protocol == "DTLS":

[0137] encryptedMessage = DTLS.encryptMessage(message)

[0138] return encryptedMessage

[0139] / / 3.3 Encrypted transmission

[0140] function transmitEncryptedKey(connection, encryptedMessage): connection.send(encryptedMessage)

[0141] if connection.waitForAck():

[0142] return True else:

[0143] return False

[0144] / / 3.4 Verification and reception

[0145] function verifyAndReceiveKey(targetConnection, expectedKeyId): receivedMessage = targetConnection.receive()

[0146] if receivedMessage.isValid():

[0147] decryptedKey = decryptMessage(receivedMessage)

[0148] if decryptedKey.hasHeader("KeyTransmission"): key = decryptedKey.getPayload()

[0149] if key.id == expectedKeyId:

[0150] return key

[0151] raise Exception("Failed to verify or receive key")

[0152] / / Complete process call

[0153] function secureKeyTransmission(source,target,key,isWireless):

[0154] protocol=selectProtocol(isWireless)

[0155] connection=establishSecureConnection(source,target,protocol)

[0156] encryptedKey=encapsulateKey(key,protocol)

[0157] if transmitEncryptedKey(connection,encryptedKey):

[0158] return verifyAndReceiveKey(connection,key.id)

[0159] else:

[0160] return None

[0161] / / The TLS.encryptMessage, DTLS.encryptMessage, decryptMessage and other functions in the above pseudocode need to be implemented according to the actual library

[0162] / / At the same time, error handling and logging are also essential in a production environment

[0163] The above pseudo code provides a basic framework for key security transmission technology, but the actual TLS / DTLS implementation, specific operations of 5G slices, error handling and logging, etc. need to be written according to the specific environment and library. In addition, to simplify the description, some functions (such as decryptMessage) are not defined in the pseudo code because they need to rely on specific TLS / DTLS libraries.

[0164] Step S3: Use intelligent identification and processing technology to intelligently identify and process the received key.

[0165] Intelligent identification and processing technology uses artificial intelligence and machine learning technology to intelligently identify and process received keys. Through training models, it distinguishes between legitimate keys and illegal keys and takes corresponding measures.

[0166] Algorithm selection using intelligent recognition and processing techniques, including:

[0167] Machine Learning Model: Use classification algorithms (such as random forests, neural networks) to classify keys.

[0168] Feature extraction: Extract useful features from the key, such as key length, entropy value, specific pattern, etc.

[0169] Key length: Different systems or protocols usually use fixed-length keys. Therefore, key length can be used as a simple but effective feature to distinguish legitimate from illegitimate keys.

[0170] Entropy: Entropy is a measure of the randomness or uncertainty of data. For encryption keys, a high entropy value generally means the key is more random and difficult to predict, and therefore more likely to be legitimate.

[0171] Specific patterns: Illegal keys may contain specific patterns or sequences (such as repeated characters, predictable sequences, etc.). Detecting these patterns can help identify illegal keys.

[0172] Step S3 includes:

[0173] Step S31, feature extraction: extract features from the received key.

[0174] Feature extraction is the process of extracting useful information from the received key. This information may include key length, entropy value, specific pattern, etc. Although feature extraction itself does not contain a direct mathematical formula, it can be formally described as:

[0175] F = extract_features(K)

[0176] Among them, F represents the extracted feature set, K represents the input key, and extract_features is the integrated feature extraction function, which accepts a key as input and outputs a feature set.

[0177] Specifically, if the key length (L), entropy value (E) and specific mode (P) are considered as features, the feature set can be expressed as:

[0178] F={L,E,P}

[0179] Among them, L = len(K) represents the length of the key. E = calculate_entropy(K) represents the entropy value of the key, which is an indicator of the complexity of the key. P = find_patterns(K) represents the specific patterns found in the key. Specific patterns refer to recognizable regular structures or sequences that may exist in the key. These patterns may be unintentional (such as caused by defects in the algorithm for generating the key) or intentional (such as deliberately embedded for some purpose). Extracting these patterns may require more in-depth analysis of the key, such as using pattern recognition algorithms, statistical tests, or specialized cryptanalysis tools.

[0180] Step S32, model prediction: use the trained model to classify the key.

[0181] Model prediction is the process of classifying the extracted features using a trained machine learning model, that is, using various machine learning algorithms to train a model that can predict the category or attribute of the key based on the key's features (such as length, entropy value, specific pattern, etc.). This process can be expressed as:

[0182] Y^=model_predict(F)

[0183] Among them, Y^ represents the prediction result of the model, F is the feature set extracted from the key, and model_predict is a function that accepts the feature set as input and outputs a prediction result.

[0184] In practical applications, model predictions are usually based on certain mathematical and statistical principles, such as random forests, neural networks, etc. The internal calculation process of these models is complex, but they will eventually output a classification result.

[0185] Step S33, processing measures: take corresponding measures (such as acceptance, rejection, and alarm) according to the classification results.

[0186] The treatment measures are determined based on the prediction results of the model. This process can be expressed as:

[0187] A=decide_action(Y^)

[0188] Among them, A represents the treatment measures taken (such as acceptance, rejection, alarm, etc.), Y^ is the prediction result of the model, and decide_action is a function that decides what treatment measures to take based on the prediction results.

[0189] In the context of machine learning or data processing, taking appropriate actions based on the model's predictions is a common process. Specifically, the decide_action function is a key part of this process, which decides the next action based on the model's predictions Y^.

[0190] Model prediction: First, a model (which may be a classification model, regression model, or other type of prediction model) predicts the input data and produces a prediction result Y^. This prediction result can be a category label (in classification problems), a numerical value (in regression problems), or other forms of output, depending on the type of model and task requirements.

[0191] Decision function: The decide_action function is an implementation of decision logic. It receives the model's prediction result Y^ as input and decides the treatment measure A to be taken according to the preset rules or logic. This decision function may contain multiple conditional statements (such as if-else statements) or a more complex logic or strategy to map the prediction results to specific treatment measures.

[0192] Action: Based on the output of the decide_action function, i.e. action A, the system or application will perform the corresponding action. These actions may include accepting an input (such as approving a loan application in an automated approval system), rejecting a request (such as deleting an email in a spam filter), and alerting (such as discovering an anomaly in an anomaly detection system and notifying the administrator).

[0193] In summary, the entire process of intelligent identification and key processing technology can be summarized by the following mathematical expression:

[0194] F = extract_features(K)

[0195] Y^=model_predict(F)

[0196] A=decide_action(Y^)

[0197] The core pseudo code example of step S3 is as follows:

[0198] #Pseudo code to implement intelligent identification and key processing technology

[0199] # Initialization part

[0200] # Load the trained machine learning model

[0201] load_model(model_path)

[0202] #Key processing function

[0203] def process_key(key):

[0204] #1. Feature extraction

[0205] features=extract_features(key)

[0206] #2. Model prediction

[0207] prediction=model_predict(features)

[0208] #3. Treatment measures

[0209] action=decide_action(prediction)

[0210] return action

[0211] #Feature extraction function

[0212] def extract_features(key):

[0213] #Example feature extraction, specific implementation depends on the key type

[0214] features = {}

[0215] features['length'] = len(key)

[0216] features['entropy'] = calculate_entropy(key) #Assume calculate_entropy is the function for calculating entropy

[0217] features['patterns'] = find_patterns(key) #Assume find_patterns is a function for finding specific patterns

[0218] return features

[0219] #Model prediction function

[0220] def model_predict(features):

[0221] #Use the loaded model to make predictions

[0222] prediction = loaded_model.predict(features) #Note: You may need to convert features into a format accepted by the model

[0223] return prediction

[0224] #Determine the processing function

[0225] def decide_action(prediction):

[0226] #Decide on treatment measures based on prediction results

[0227] if prediction=='legal':

[0228] return 'accept'

[0229] elif prediction=='illegal':

[0230] return 'reject'

[0231] else:

[0232] return 'alarm'

[0233] #Example Usage

[0234] if__name__=="__main__":

[0235] test_key="your_test_key_here"

[0236] action=process_key(test_key)

[0237] print("Action:",action)

[0238] #The specific implementation of the functions in the above pseudocode (such as calculate_entropy, find_patterns) and the loaded model needs to be written according to the actual situation.

[0239] #Similarly, the input to the predict function may need to be adjusted depending on the machine learning library used.

[0240] The pseudo code above provides a framework, but some of the functions (such as calculate_entropy and find_patterns) and the specific implementation details of the loaded model need to be written according to the actual technology and key type used. In addition, the loaded_model.predict call in the model_predict function also needs to be adjusted according to the API of the machine learning library used (such as scikit-learn, TensorFlow, etc.).

[0241] The above technical features constitute the best embodiment of the present invention, which has strong adaptability and best implementation effect. Non-essential technical features can be added or reduced according to actual needs to meet the needs of different situations.

[0242] Finally, it should be noted that the above content is only used to illustrate the technical solution of the present invention, rather than to limit the scope of protection of the present invention. Simple modifications or equivalent substitutions of the technical solution of the present invention by ordinary technicians in this field do not deviate from the essence and scope of the technical solution of the present invention.

Claims

1. A security protection method based on a 5G slicing communication system, characterized in that: The steps include: Step S1: Generate a key for each 5G slice using automatic key generation technology; Step S2: transmitting the key from the source device to the target device through a key security transmission technology; Step S3: Use artificial intelligence and machine learning technology to extract features of the keys received by the target device. After feature extraction, use the machine learning model to classify the keys, and perform security processing measures based on the classification results.

2. The security protection method according to claim 1, characterized in that: Step S1 includes: Step S11, collecting entropy sources: obtaining several entropy sources from physical devices or software algorithms; Step S12, generating random numbers: using a random number generator based on a physical entropy source to generate random numbers; Step S13, key expansion: converting the random number into a key of a set length through a key expansion function KDF; Step S14, business and security level considerations: adjust the length and complexity of the key according to the business requirements and security level of the slice.

3. The security protection method according to claim 2, characterized in that: In step S13, the key expansion function generates the final key based on the random number, the expected key length and the number of iterations.

4. The security protection method according to claim 1, characterized in that: Step S2 includes: Step S21, establishing a secure connection: establishing a TLS / DTLS connection between the source device and the target device; Step S22, key encapsulation: encapsulate the key in a TLS / DTLS message; Step S23, encrypted transmission: transmitting the encapsulated key via a secure connection; Step S24, verification and reception: the target device verifies the integrity and authenticity of the message and extracts the key.

5. The security protection method according to claim 4, characterized in that: Step S21 includes: Establishing a secure connection is a TLS / DTLS handshake process initiated by the source device, and the target device responds and completes the handshake. During the handshake process, both parties negotiate security parameters, including encryption algorithms, key exchange methods, and identity authentication mechanisms.

6. The security protection method according to claim 4, characterized in that: Step S24 includes: Target device authentication includes checking the signature, hash or MAC value of the message and confirming that the key identifier matches the expected identifier. If the authentication is successful, the key is extracted and returned. If the returned key is the same as the expected key, the key transfer is successful.

7. The security protection method according to claim 1, characterized in that: Step S3 includes: Step S31, feature extraction: extracting features from the received key; Step S32, model prediction: using the trained machine learning model to predict the category or attribute of the key based on the extracted features; Step S33, processing measures: take corresponding measures according to the category or attribute result of the key, including acceptance, rejection, and alarm.

8. The security protection method according to claim 7, characterized in that: In step S31, Feature extraction is the process of extracting key length and entropy value from the received key.

9. A security protection device based on a 5G slicing communication system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the security protection method based on the 5G slicing communication system as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the security protection method based on the 5G slicing communication system as described in any one of claims 1 to 8.