Data processing method and device, electronic equipment and storage medium

By dividing the information flow into time slices and multi-level cache offloading, encryption processing, and combining with virtual machine addition technology, the problem of insufficient data transmission security is solved and more efficient information protection is achieved.

CN118540106APending Publication Date: 2024-08-23CHINA TELECOM NETWORK SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410530357.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively improve the security of data transmission, causing users to face risks such as telecommunications fraud and communication harassment on network platforms.

Method used

By dividing the information flow to be encrypted into multiple groups of information segments according to the preset time slice, and inputting the preset cache respectively, the first and second sets are determined according to the cache amount, and the encryption machine and the national secret database are used for encryption processing, combined with multi-level Cache and virtual machine addition technology realize offload encryption of information flow to be encrypted.

Benefits of technology

It improves the overall security of data transmission, reduces the risk of information leakage, and enhances the protection of encrypted information flows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540106A
    Figure CN118540106A
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a data processing method and device, electronic equipment and a storage medium. The method comprises the following steps: receiving a to-be-encrypted information stream; dividing the to-be-encrypted information flow into a plurality of groups of to-be-encrypted information segments according to a preset time section, and inputting each group of to-be-encrypted information segments into a preset cache according to a receiving time sequence; determining whether the current cache amount of the preset cache is greater than a threshold value or not every preset time interval, and if the current cache amount of the preset cache is greater than the threshold value, determining a first set and a second set in the preset cache; encrypting the to-be-encrypted information in the first set by using a cipher machine to obtain an encrypted first information set; and encrypting the to-be-encrypted information in the second set by adopting a national secret library to obtain an encrypted second information set.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the continuous development of science and technology and the continuous expansion of network services, more and more people use online platforms for shopping, payment, entertainment, etc. This allows online platforms to obtain various data of users. Once the data is leaked, it may cause telecommunications fraud, communication harassment, etc. to users, reducing the user experience.

[0003] Therefore, how to improve the security of data transmission has become an urgent problem to be solved. Summary of the invention

[0004] Embodiments of the present invention provide a data processing method, device, electronic device and storage medium for improving the security of data transmission.

[0005] In a first aspect, an embodiment of the present invention provides a data processing method, which is applied to an electronic device, and the method includes:

[0006] receiving an information stream to be encrypted;

[0007] Dividing the information stream to be encrypted into multiple groups of information segments to be encrypted according to a preset time slice, and inputting each group of information segments to be encrypted into a preset cache in a receiving time sequence;

[0008] At each preset time interval, determining whether a current cache amount in the preset cache is greater than a threshold, and if the current cache amount in the preset cache is greater than the threshold, determining a first set and a second set in the preset cache;

[0009] The information to be encrypted in the first set is encrypted using a cryptographic machine to obtain an encrypted first information set; and the information to be encrypted in the second set is encrypted using a national cryptographic library to obtain an encrypted second information set.

[0010] In a possible implementation manner, if the current cache amount in the preset cache is greater than the threshold, determining the first set and the second set in the preset cache includes:

[0011] Inputting each group of the information segments to be encrypted into a first-level cache in the preset cache in order of receiving time;

[0012] When it is determined that the current cache amount in the first-level cache is greater than the first threshold, the information segments to be encrypted in the first-level cache are screened out according to the first-in-first-out principle to obtain the information segments to be encrypted for hierarchical processing; the information segments to be encrypted for hierarchical processing are the first N information segments in the first-level cache arranged from front to back according to the receiving time, where N is a positive integer;

[0013] Inputting the hierarchically processed information segments to be encrypted into the secondary cache in the preset cache in the order of receiving time;

[0014] When it is determined that the current cache amount in the secondary cache is greater than the second threshold, the hierarchically processed information segments to be encrypted in the secondary cache are screened out according to the first-in-first-out principle to obtain the information segments to be encrypted for diversion processing, and a second set is determined based on the information segments to be encrypted for diversion processing; the information segments to be encrypted for diversion processing are the first M information segments in the secondary cache arranged from the front to the back in terms of receiving time, where M is a positive integer; wherein the second threshold is less than the first threshold;

[0015] A first set is constructed based on the information segments to be encrypted in the secondary cache except for the offloaded information segments.

[0016] In a possible implementation manner, encrypting the information to be encrypted in the second set using a national encryption library to obtain an encrypted second information set includes:

[0017] Perform the following operations on each piece of information to be encrypted in the second set:

[0018] Acquire a first key from a first cache area in the electronic device, and obtain first secret information based on the first key and signature secret information; the first cache area is used to store the key in the configuration file;

[0019] Acquire a second key from a second cache area in the electronic device, and obtain second secret information based on the second key and the first secret information; the second cache area is used to store the key in the code file;

[0020] Obtaining a third key from a third cache area in the electronic device, and obtaining third secret information based on the third key and the second secret information; the third cache area is used to store keys in the software project;

[0021] The third secret information and the information to be encrypted are input into the national secret library for encryption to obtain the encrypted second information.

[0022] In a possible implementation manner, before receiving the information stream to be encrypted, the method further includes:

[0023] Determine the login information of the system that sends the information flow to be encrypted; after the system is logged in, trigger the information flow to be encrypted;

[0024] The keys are obtained respectively from a plurality of storage areas of the electronic device for storing keys of various types, and the login information is encrypted based on a chained additional signature method and the keys to obtain the encrypted login information.

[0025] In a possible implementation manner, before encrypting the information to be encrypted in the first set using a cryptographic machine and obtaining the encrypted first information set, the method further includes:

[0026] Determine information of the virtual machine to be added according to the amount of information to be encrypted in the first set and the carrying capacity of the cipher machine cluster;

[0027] Based on the information of the virtual machine to be added, a virtual machine is added to the target cryptographic machine; the virtual machine is used to store the backup key information.

[0028] In a second aspect, an embodiment of the present invention provides a data processing device, applied to an electronic device, the device comprising:

[0029] A receiving unit, used for receiving an information stream to be encrypted;

[0030] A block division unit, used for dividing the information stream to be encrypted into a plurality of groups of information segments to be encrypted according to a preset time slice, and inputting each group of information segments to be encrypted into a preset cache in a receiving time sequence;

[0031] a decision unit, configured to determine, at each preset time interval, whether a current cache amount in the preset cache is greater than a threshold, and if the current cache amount in the preset cache is greater than the threshold, determine a first set and a second set in the preset cache;

[0032] The encryption unit is used to encrypt the information to be encrypted in the first set by using a cipher machine to obtain an encrypted first information set; and to encrypt the information to be encrypted in the second set by using a national secret library to obtain an encrypted second information set.

[0033] In a possible implementation manner, the decision unit is used to:

[0034] Inputting each group of the information segments to be encrypted into a first-level cache in the preset cache in order of receiving time;

[0035] When it is determined that the current cache amount in the first-level cache is greater than the first threshold, the information segments to be encrypted in the first-level cache are screened out according to the first-in-first-out principle to obtain the information segments to be encrypted for hierarchical processing; the information segments to be encrypted for hierarchical processing are the first N information segments in the first-level cache arranged from front to back according to the receiving time, where N is a positive integer;

[0036] Inputting the hierarchically processed information segments to be encrypted into the secondary cache in the preset cache in the order of receiving time;

[0037] When it is determined that the current cache amount in the secondary cache is greater than the second threshold, the hierarchically processed information segments to be encrypted in the secondary cache are screened out according to the first-in-first-out principle to obtain the information segments to be encrypted for diversion processing, and a second set is determined based on the information segments to be encrypted for diversion processing; the information segments to be encrypted for diversion processing are the first M information segments in the secondary cache arranged from the front to the back in terms of receiving time, where M is a positive integer; wherein the second threshold is less than the first threshold;

[0038] A first set is constructed based on the information segments to be encrypted in the secondary cache except for the offloaded information segments.

[0039] In a possible implementation manner, the encryption unit is used to:

[0040] Perform the following operations on each piece of information to be encrypted in the second set:

[0041] Acquire a first key from a first cache area in the electronic device, and obtain first secret information based on the first key and signature secret information; the first cache area is used to store the key in the configuration file;

[0042] Acquire a second key from a second cache area in the electronic device, and obtain second secret information based on the second key and the first secret information; the second cache area is used to store the key in the code file;

[0043] Obtaining a third key from a third cache area in the electronic device, and obtaining third secret information based on the third key and the second secret information; the third cache area is used to store keys in the software project;

[0044] The third secret information and the information to be encrypted are input into the national secret library for encryption to obtain the encrypted second information.

[0045] In a possible implementation manner, the encryption unit is further used for:

[0046] Determine the login information of the system that sends the information flow to be encrypted; after the system is logged in, trigger the information flow to be encrypted;

[0047] The keys are obtained respectively from a plurality of storage areas of the electronic device for storing keys of various types, and the login information is encrypted based on a chained additional signature method and the keys to obtain the encrypted login information.

[0048] In a possible implementation manner, the device further includes a backup unit, configured to:

[0049] Determine information of the virtual machine to be added according to the amount of information to be encrypted in the first set and the carrying capacity of the cipher machine cluster;

[0050] Based on the information of the virtual machine to be added, a virtual machine is added to the target cryptographic machine; the virtual machine is used to store the backup key information.

[0051] In a third aspect, an embodiment of the present invention provides an electronic device, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any method provided in the embodiment of the first aspect of the present invention.

[0052] In a fourth aspect, an embodiment of the present invention provides a computer storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to enable a computer to execute any method provided by the embodiment of the first aspect of the present invention.

[0053] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising: a computer program code, when the computer program code is run on a computer, the computer executes any one of the methods provided in the embodiment of the first aspect.

[0054] The beneficial effects of the present invention are as follows:

[0055] In an embodiment of the present invention, the information stream to be encrypted can be divided into multiple groups of information segments to be encrypted according to a preset time slice, and each group of information segments to be encrypted can be input into a preset cache in the order of receiving time; at each preset time interval, determine whether the current cache amount of the preset cache is greater than a threshold, and if the current cache amount in the preset cache is greater than the threshold, determine the first set and the second set in the preset cache; encrypt the information to be encrypted in the first set using a cipher machine to obtain an encrypted first information set; and encrypt the information to be encrypted in the second set using a national secret library to obtain an encrypted second information set. In this way, by diverting the information stream to be encrypted, and encrypting the information to be encrypted in the diverted first set and second set using different encryption methods, the overall security of the transmitted information stream to be encrypted is improved.

[0056] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings introduced below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0058] Figure 1 A schematic diagram of an application scenario in an embodiment of the present invention;

[0059] Figure 2 A schematic diagram of a data processing method according to an embodiment of the present invention;

[0060] Figure 3 is a schematic diagram of an information segment to be encrypted in an embodiment of the present invention;

[0061] Figure 4 A schematic diagram of a process for processing an information flow to be encrypted in an embodiment of the present invention;

[0062] Figure 5 This is a schematic diagram of encryption in an embodiment of the present invention;

[0063] Figure 6 is a schematic diagram of the structure of a data processing device in an embodiment of the present invention;

[0064] Figure 7 The figure is a schematic diagram of a hardware structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In the absence of conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other arbitrarily. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.

[0066] The term "comprising" and any variations thereof in the specification and claims of the present invention are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0067] In the embodiments of the present invention, one or more, "many" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or plural.

[0068] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, which includes various details of the embodiments of the present invention to facilitate understanding, and they should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present invention. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present invention, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present invention, but it does not mean that the applicant has or will necessarily use the solution.

[0069] In the technical solution of the present invention, the collection, dissemination, and use of data are in compliance with the requirements of relevant national laws and regulations.

[0070] As mentioned above, how to improve the security of data transmission has become an urgent problem to be solved.

[0071] In view of this, an embodiment of the present invention provides a data processing method, through which the information stream to be encrypted can be divided into multiple groups of information segments to be encrypted according to a preset time section, and each group of information segments to be encrypted is input into a preset cache in the order of receiving time; at each preset time interval, determine whether the current cache amount of the preset cache is greater than a threshold, if the current cache amount in the preset cache is greater than the threshold, determine the first set and the second set in the preset cache; encrypt the information to be encrypted in the first set using a cipher machine to obtain an encrypted first information set; and encrypt the information to be encrypted in the second set using a national secret library to obtain an encrypted second information set. In this way, by diverting the information stream to be encrypted, and encrypting the information to be encrypted in the diverted first set and second set using different encryption methods, the overall security of the transmitted information stream to be encrypted is improved.

[0072] After introducing the design concept of the embodiment of the present invention, the following briefly introduces the application scenarios to which the technical solution of the embodiment of the present invention can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiment of the present invention and are not limited. In the specific implementation process, the technical solution provided by the embodiment of the present invention can be flexibly applied according to actual needs.

[0073] The solution provided by the embodiment of the present invention can be applied to any business scenario for data processing, such as financial payment business scenario, communication business scenario, etc.

[0074] See also Figure 1 As shown, a scenario diagram provided by an embodiment of the present invention may include multiple terminal devices 101 and electronic devices 102, wherein terminal device 101-1, terminal device 101-2, ..., terminal device 101-n may be used by different users, and n is a positive integer.

[0075] In the embodiment of the present invention, when the user uses various applications and / or web pages in the terminal device to perform various services, the system corresponding to the various applications and / or web pages will generate corresponding information streams to be encrypted. And the system needs to be connected to the electronic device 102, which is used to receive the information stream to be encrypted and encrypt the information stream to be encrypted.

[0076] In the embodiment of the present invention, the terminal device 101 may be, for example, a mobile phone, a tablet computer (PAD), a personal computer (PC), a smart TV, a smart car device, a wearable device, etc., which is not limited in the embodiment of the present invention.

[0077] In an embodiment of the present invention, the electronic device 102 may be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. It may also be a physical server or a server cluster, but is not limited to these.

[0078] The terminal device 101 and the electronic device 102, as well as each terminal device 101, can be directly or indirectly connected to each other through one or more networks 103. The network 103 can be a wired network or a wireless network, for example, a mobile cellular network, or a wireless fidelity (Wireless-Fidelity, WIFI) network, and of course other possible networks, which are not limited in the embodiment of the present invention.

[0079] Certainly, the method provided by the embodiments of the present invention is not limited to Figure 1 the application scenarios shown. It can also be used in other possible application scenarios, and the embodiments of the present invention do not impose any restrictions. For Figure 1 the functions that can be achieved by each device in the application scenarios shown will be described together in the subsequent method embodiments, and will not be elaborated here for the time being.

[0080] To further illustrate the technical solutions provided by the embodiments of the present invention, the following will be described in detail in conjunction with the accompanying drawings and specific implementation manners. Although the method operation steps provided by the embodiments of the present invention are as shown in the following embodiments or drawings, based on routine or non-creative labor, more or fewer operation steps may be included in the method. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present invention. When the method is actually processed or executed by a device, it can be executed in the method order shown in the embodiments or drawings or executed in parallel.

[0081] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a data processing method in the embodiments of the present invention. The process of the method can be executed by an electronic device, for example. The electronic device can be Figure 1 the electronic device 102 in

[0082] Step 201: Receive the information stream to be encrypted.

[0083] In the embodiments of the present invention, before the electronic device receives the information stream to be encrypted sent by the terminal device, considering that when the system sending the information stream to be encrypted accesses the electronic device, it needs to log in to the system, which may cause the login information of the system to be leaked. Therefore, the electronic device can encrypt the login information of the system.

[0084] In the embodiments of the present invention, the electronic device can determine the login information of the system sending the information stream to be encrypted; then, from multiple storage areas of the electronic device for storing various types of keys, obtain the keys respectively, and encrypt the login information based on the chained append signature method and the keys to obtain the encrypted login information. For example, if the login information is xxx, the key determined based on the chained append signature method is <key, ciphertext key, signature>, where signature = SM3(String(key + ciphertext key)), ciphertext key = SM4(key, system key), SM4 is a national secret symmetric encryption and decryption algorithm, and SM3 is a national secret digest algorithm.

[0085] Step 202: Divide the information stream to be encrypted into multiple groups of information segments to be encrypted according to a preset time slice, and input each group of information segments to be encrypted into a preset cache in a receiving time sequence.

[0086] For example, see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an information segment to be encrypted in an embodiment of the present invention. Assuming that the preset time slice is 5 seconds, the information stream to be encrypted can be divided into multiple groups of information segments to be encrypted, with 5 seconds as one group. For example, Figure 3 The n groups of information segments to be encrypted are shown in , where n is a positive integer.

[0087] Step 203: at each preset time interval, determine whether the current buffer size of the preset buffer is greater than a threshold; if the current buffer size of the preset buffer is greater than the threshold, determine the first set and the second set in the preset buffer.

[0088] In an embodiment of the present invention, the electronic device can respectively input each group of information segments to be encrypted into a first-level cache in a preset cache in the order of receiving time; when it is determined that the current cache amount in the first-level cache is greater than a first threshold, the information segments to be encrypted in the first-level cache are screened out according to the first-in-first-out principle to obtain information segments to be encrypted for hierarchical processing; the hierarchical processing of information segments to be encrypted are the first N information segments in the first-level cache arranged from front to back according to the receiving time, where N is a positive integer; the hierarchical processing of information segments to be encrypted are input into the second-level cache in the preset cache in the order of receiving time.

[0089] For example, see Figure 4 As shown, Figure 4 The figure is a schematic diagram of a processing process for an information stream to be encrypted in an embodiment of the present invention. When an electronic device receives multiple groups of information segments to be encrypted, it can input them into the first-level cache in sequence according to the order of receiving time. The first-level cache is provided with a core queue and a non-core queue. The cache capacity of the core queue is represented by coreLength, for example, and the cache capacity of the non-core queue is represented by ordinaryLengt, for example. The first threshold threshold is determined based on coreLength and ordinaryLengt. Optionally, When the current cache size of the first-level cache is greater than the first threshold, the information segments to be encrypted to be processed in a hierarchical manner are determined from the first-level cache, and the information segments to be encrypted to be processed in a hierarchical manner are input into the second-level cache.

[0090] Furthermore, when it is determined that the current cache amount in the secondary cache is greater than the second threshold, the information segments to be encrypted that are processed in a hierarchical manner in the secondary cache are screened out according to the first-in-first-out principle, and the second set is determined based on the information segments to be encrypted that are processed in a diverted manner; the information segments to be encrypted that are processed in a diverted manner are the first M information segments arranged from front to back in terms of receiving time in the secondary cache, where M is a positive integer; wherein the second threshold is less than the first threshold; and the electronic device can also construct the first set based on the information segments to be encrypted in the secondary cache except for the diverted information segments.

[0091] Step 204: Encrypt the information to be encrypted in the first set using a cryptographic machine to obtain an encrypted first information set; and encrypt the information to be encrypted in the second set using a national cryptographic library to obtain an encrypted second information set.

[0092] In an embodiment of the present invention, before using a cryptographic machine to encrypt the information to be encrypted in the first set, it is considered that the overload of the cryptographic machine may cause a failure, thereby causing the information to be encrypted to be leaked. The electronic device can determine the information of the virtual machine to be added based on the amount of information to be encrypted in the first set and the load capacity of the cryptographic machine cluster; based on the information of the virtual machine to be added, add a virtual machine to the target cryptographic machine; the virtual machine is used to store the backup key information. In other words, it can be determined first how many virtual machines need to be added, and then which cryptographic machine in the cryptographic machine cluster is determined as the target cryptographic machine, and a virtual machine is added for it.

[0093] Optionally, considering that the failure of the cryptographic machine will cause the loss of all encryption keys in the virtual machine (VSM), resulting in the inability to decrypt the existing data. Therefore, the electronic device can receive the key synchronization command triggered by the cryptographic machine; determine the mirror backup information of the key corresponding to the cryptographic machine, and store the mirror backup information and the corresponding virtual machine index in the backup area of ​​the electronic device. In this way, when the cryptographic machine is restored from failure, the key stored in the virtual machine of the cryptographic machine can be restored by importing the mirror backup information, thereby improving the security of the transmission of encrypted information.

[0094] In the embodiment of the present invention, after the virtual machine is added, the electronic device can encrypt the information to be encrypted in the first set using a cryptographic machine to obtain an encrypted first information set.

[0095] In the embodiment of the present invention, the electronic device may perform the following operations on each piece of information to be encrypted in the second set respectively to obtain an encrypted second information set.

[0096] Step A: obtaining a first key from a first cache area in the electronic device, and obtaining first secret information based on the first key and signature secret information; the first cache area is used to store the key in the configuration file;

[0097] Step B: Obtaining a second key from a second cache area in the electronic device, and obtaining second secret information based on the second key and the first secret information; the second cache area is used to store the key in the code file;

[0098] Step C: Obtain a third key from a third cache area in the electronic device, and obtain third secret information based on the third key and the second secret information; the third cache area is used to store keys in the software project; input the third secret information and the information to be encrypted into the national secret library for encryption to obtain the encrypted second information.

[0099] For example, see Figure 5 As shown, Figure 5 This is a schematic diagram of an encryption provided in an embodiment of the present invention. First, the national secret library can generate signature secret information and obtain the first key in the configuration file from the first cache area, such as Figure 5 The key key in the ciphertext is used, and SM4 encryption is performed based on the first key and the signature secret information to obtain the first secret information. The first secret information is, for example, Figure 5 Then, obtain the second key in the code file from the second cache area, for example Figure 5 The key1 in the code is encrypted by SM4 based on the second key and the first secret information to obtain the second secret information. The second secret information is, for example, Figure 5 Further, the software project (e.g. Figure 5 The third key in jekins is as follows Figure 5 key2 in, and based on the third key and the second secret information (i.e. Figure 5 The key1 ciphertext in the key1 is encrypted by SM4 to obtain the third secret information. Further, the information to be encrypted and the third secret information can be input into the national secret library for encryption, thereby obtaining the encrypted second information. It should be noted that the aforementioned steps AC can be understood as a chained append signature method. In other words, the encryption of the aforementioned login information can also use the aforementioned steps AC to obtain the corresponding encrypted login information.

[0100] In an embodiment of the present invention, the first total encryption time of the information to be encrypted in the first set and the second total encryption time of the information to be encrypted in the second set can also be determined respectively. If the first total encryption time is longer than the historical first encryption time, the information to be encrypted in the new first set determined by the next preset interval time is shunted to the new second set; if the second total encryption time is longer than the historical second encryption time, the information to be encrypted in the new second set determined by the next preset interval time is shunted to the new first set. In addition, if the total encryption time determined according to the first total encryption time and the second total encryption time is longer than the historical total time, the information of the virtual machine to be added is determined; based on the information of the virtual machine to be added, a virtual machine is added to the target cryptographic machine. In this way, on the basis of realizing the coordinated work of the national secret library and the encryption machine to ensure the security of data transmission, data backlog is also reduced, and the efficiency of data encryption transmission is improved.

[0101] It can be seen that the embodiment of the present invention introduces the concept of time slices to divide the encrypted information flow, i.e., a large amount of continuous data, into ordered sets to reduce the difficulty of data processing. A multi-level cache mechanism is introduced to divert data, and different encryption methods are used to encrypt the encrypted information, further improving the security of data transmission.

[0102] Based on the same inventive concept, an embodiment of the present invention also provides a data processing device. Figure 6 As shown, it is a schematic diagram of the structure of the data processing device 600, which may include:

[0103] The receiving unit 601 is used to receive the information stream to be encrypted;

[0104] The division unit 602 is used to divide the information stream to be encrypted into multiple groups of information segments to be encrypted according to a preset time slice, and input each group of information segments to be encrypted into a preset cache according to a receiving time sequence;

[0105] A decision unit 603 is configured to determine, at each preset time interval, whether a current cache amount in the preset cache is greater than a threshold, and if the current cache amount in the preset cache is greater than the threshold, determine a first set and a second set in the preset cache;

[0106] The encryption unit 604 is used to encrypt the information to be encrypted in the first set using a cryptographic machine to obtain an encrypted first information set; and to encrypt the information to be encrypted in the second set using a national cryptographic library to obtain an encrypted second information set.

[0107] In a possible implementation manner, the decision unit 603 is configured to:

[0108] Inputting each group of the information segments to be encrypted into a first-level cache in the preset cache in order of receiving time;

[0109] When it is determined that the current cache amount in the first-level cache is greater than the first threshold, the information segments to be encrypted in the first-level cache are screened out according to the first-in-first-out principle to obtain the information segments to be encrypted for hierarchical processing; the information segments to be encrypted for hierarchical processing are the first N information segments in the first-level cache arranged from front to back according to the receiving time, where N is a positive integer;

[0110] Inputting the hierarchically processed information segments to be encrypted into the secondary cache in the preset cache in the order of receiving time;

[0111] When it is determined that the current cache amount in the secondary cache is greater than the second threshold, the hierarchically processed information segments to be encrypted in the secondary cache are screened out according to the first-in-first-out principle to obtain the information segments to be encrypted for diversion processing, and a second set is determined based on the information segments to be encrypted for diversion processing; the information segments to be encrypted for diversion processing are the first M information segments in the secondary cache arranged from the front to the back in terms of receiving time, where M is a positive integer; wherein the second threshold is less than the first threshold;

[0112] A first set is constructed based on the information segments to be encrypted in the secondary cache except for the offloaded information segments.

[0113] In a possible implementation manner, the encryption unit 604 is used to:

[0114] Perform the following operations on each piece of information to be encrypted in the second set:

[0115] Acquire a first key from a first cache area in the electronic device, and obtain first secret information based on the first key and signature secret information; the first cache area is used to store the key in the configuration file;

[0116] Acquire a second key from a second cache area in the electronic device, and obtain second secret information based on the second key and the first secret information; the second cache area is used to store the key in the code file;

[0117] Obtaining a third key from a third cache area in the electronic device, and obtaining third secret information based on the third key and the second secret information; the third cache area is used to store keys in the software project;

[0118] The third secret information and the information to be encrypted are input into the national secret library for encryption to obtain the encrypted second information.

[0119] In a possible implementation manner, the encryption unit 604 is further configured to:

[0120] Determining login information of a system that sends the information stream to be encrypted;

[0121] The keys are obtained respectively from a plurality of storage areas of the electronic device for storing keys of various types, and the login information is encrypted based on a chained additional signature method and the keys to obtain the encrypted login information.

[0122] In a possible implementation manner, the device further includes a backup unit, configured to:

[0123] Determine information of the virtual machine to be added according to the amount of information to be encrypted in the first set and the carrying capacity of the cipher machine cluster;

[0124] Based on the information of the virtual machine to be added, a virtual machine is added to the target cryptographic machine; the virtual machine is used to store the backup key information.

[0125] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing the present invention, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0126] After introducing the data processing method and apparatus according to the exemplary embodiment of the present invention, next, an electronic device according to another exemplary embodiment of the present invention is introduced.

[0127] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0128] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present invention. In this embodiment, the structure of the electronic device can be as follows Figure 7 As shown, the electronic device is, for example, the aforementioned Figure 1 The electronic device 102, such as Figure 7 As shown, the electronic device in the embodiment of the present invention includes at least one processor 701, and a memory 702 and a communication interface 703 connected to the at least one processor 701. The specific connection medium between the processor 701 and the memory 702 is not limited in the embodiment of the present invention. Figure 7 In the example, the processor 701 and the memory 702 are connected via the system bus 700. Figure 7The connections between other components are shown in bold lines, and are not intended to be limiting. The system bus 700 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0129] In the embodiment of the present invention, the memory 702 stores instructions that can be executed by at least one processor 701. The at least one processor 701 can execute the steps included in the aforementioned data processing method by executing the instructions stored in the memory 702.

[0130] Among them, the processor 701 is the control center of the electronic device, and can use various interfaces and lines to connect various parts of the entire electronic device. By running or executing instructions stored in the memory 702 and calling data stored in the memory 702, various functions of the electronic device can be realized. Optionally, the processor 701 may include one or more processing units, and the processor 701 may integrate an application processor and a modem processor, wherein the processor 701 mainly processes the operating system, the customer interface and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 701. In some embodiments, the processor 701 and the memory 702 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.

[0131] The processor 701 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present invention may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0132] The memory 702 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 702 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 702 is any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 702 in the embodiment of the present invention can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0133] The communication interface 703 is a transmission interface that can be used for communication, and data can be received or sent through the communication interface 703 .

[0134] In addition, the electronic device also includes a basic input / output system (I / O system) 704 for facilitating information transmission between various components within the electronic device, and a large-capacity storage device 708 for storing an operating system 705, application programs 706 and other program modules 707.

[0135] The basic input / output system 704 includes a display 709 for displaying information and an input device 710 such as a mouse and a keyboard for a client to input information. The display 709 and the input device 710 are connected to the processor 701 through the basic input / output system 704 connected to the system bus 700. The basic input / output system 704 may also include an input / output controller for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller also provides output to a display screen, a printer, or other types of output devices.

[0136] Specifically, the mass storage device 708 is connected to the processor 701 via a mass storage controller (not shown) connected to the system bus 700. The mass storage device 708 and its associated computer-readable medium provide non-volatile storage for the server package. That is, the mass storage device 708 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM drive.

[0137] According to various embodiments of the present invention, the electronic device can also be connected to a remote computer on the network through a network such as the Internet to run. That is, the electronic device can be connected to the network 711 through the communication interface 703 connected to the system bus 700, or in other words, the communication interface 703 can also be used to connect to other types of networks or remote computer systems (not shown).

[0138] An embodiment of the present invention further provides a computer storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to enable a computer to execute the technical solution of the data processing method of the above embodiment.

[0139] An embodiment of the present invention further provides a computer program product, which includes: a computer program code, and when the computer program code runs on a computer, the computer can implement the technical solution of the data processing method in the above embodiment when executing the computer program.

[0140] It can be understood by those skilled in the art that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions, the aforementioned program instructions belong to a computer program, the computer program can be stored in a computer-readable storage medium, and when the computer program is executed, the steps of the above method embodiments are executed; the readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0141] The program product of the embodiment of the present invention can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a computing device. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with a command execution system, device or device.

[0142] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.

[0143] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0144] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the client computing device, partially on the client device, as a separate software package, partially on the client computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the client computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0145] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0146] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A data processing method, characterized in that: Applied to electronic equipment, the method comprises: receiving an information stream to be encrypted; Dividing the information stream to be encrypted into multiple groups of information segments to be encrypted according to a preset time slice, and inputting each group of information segments to be encrypted into a preset cache in a receiving time sequence; At each preset time interval, determining whether a current cache amount in the preset cache is greater than a threshold, and if the current cache amount in the preset cache is greater than the threshold, determining a first set and a second set in the preset cache; The information to be encrypted in the first set is encrypted using a cryptographic machine to obtain an encrypted first information set; and the information to be encrypted in the second set is encrypted using a national cryptographic library to obtain an encrypted second information set.

2. The method according to claim 1, characterized in that If the current buffer amount in the preset buffer is greater than the threshold, determining the first set and the second set in the preset buffer comprises: Inputting each group of the information segments to be encrypted into a first-level cache in the preset cache in order of receiving time; When it is determined that the current cache amount in the first-level cache is greater than the first threshold, the information segments to be encrypted in the first-level cache are screened out according to the first-in-first-out principle to obtain the information segments to be encrypted for hierarchical processing; the information segments to be encrypted for hierarchical processing are the first N information segments in the first-level cache arranged from front to back according to the receiving time, where N is a positive integer; Inputting the hierarchically processed information segments to be encrypted into the secondary cache in the preset cache in the order of receiving time; When it is determined that the current cache amount in the secondary cache is greater than the second threshold, the hierarchically processed information segments to be encrypted in the secondary cache are screened out according to the first-in-first-out principle to obtain the information segments to be encrypted for diversion processing, and a second set is determined based on the information segments to be encrypted for diversion processing; the information segments to be encrypted for diversion processing are the first M information segments in the secondary cache arranged from the front to the back in terms of receiving time, where M is a positive integer; wherein the second threshold is less than the first threshold; A first set is constructed based on the information segments to be encrypted in the secondary cache except for the offloaded information segments.

3. The method according to claim 2, characterized in that The information to be encrypted in the second set is encrypted using the national encryption library to obtain an encrypted second information set, including: Perform the following operations on each piece of information to be encrypted in the second set: Acquire a first key from a first cache area in the electronic device, and obtain first secret information based on the first key and signature secret information; the first cache area is used to store the key in the configuration file; Acquire a second key from a second cache area in the electronic device, and obtain second secret information based on the second key and the first secret information; the second cache area is used to store the key in the code file; Obtaining a third key from a third cache area in the electronic device, and obtaining third secret information based on the third key and the second secret information; the third cache area is used to store keys in the software project; The third secret information and the information to be encrypted are input into the national secret library for encryption to obtain the encrypted second information.

4. The method according to any one of claims 1 to 3, characterized in that: Before receiving the information stream to be encrypted, the method further includes: Determine the login information of the system that sends the information flow to be encrypted; after the system is logged in, trigger the information flow to be encrypted; The keys are obtained respectively from a plurality of storage areas of the electronic device for storing keys of various types, and the login information is encrypted based on a chained additional signature method and the keys to obtain the encrypted login information.

5. The method according to any one of claims 1 to 3, characterized in that: Before encrypting the information to be encrypted in the first set using a cryptographic machine to obtain the encrypted first information set, the method further includes: Determine information of the virtual machine to be added according to the amount of information to be encrypted in the first set and the carrying capacity of the cipher machine cluster; Based on the information of the virtual machine to be added, a virtual machine is added to the target cryptographic machine; the virtual machine is used to store the backup key information.

6. A data processing device, characterized in that: Applied to electronic equipment, the device comprises: A receiving unit, used for receiving an information stream to be encrypted; A block division unit, used for dividing the information stream to be encrypted into a plurality of groups of information segments to be encrypted according to a preset time slice, and inputting each group of information segments to be encrypted into a preset cache in a receiving time sequence; a decision unit, configured to determine, at each preset time interval, whether a current cache amount in the preset cache is greater than a threshold, and if the current cache amount in the preset cache is greater than the threshold, determine a first set and a second set in the preset cache; The encryption unit is used to encrypt the information to be encrypted in the first set by using a cipher machine to obtain an encrypted first information set; and to encrypt the information to be encrypted in the second set by using a national secret library to obtain an encrypted second information set.

7. The device according to claim 6, characterized in that The decision making unit is used to: Inputting each group of the information segments to be encrypted into a first-level cache in the preset cache in order of receiving time; When it is determined that the current cache amount in the first-level cache is greater than the first threshold, the information segments to be encrypted in the first-level cache are screened out according to the first-in-first-out principle to obtain the information segments to be encrypted for hierarchical processing; the information segments to be encrypted for hierarchical processing are the first N information segments in the first-level cache arranged from front to back according to the receiving time, where N is a positive integer; Inputting the hierarchically processed information segments to be encrypted into the secondary cache in the preset cache in the order of receiving time; When it is determined that the current cache amount in the secondary cache is greater than the second threshold, the hierarchically processed information segments to be encrypted in the secondary cache are screened out according to the first-in-first-out principle to obtain the information segments to be encrypted for diversion processing, and a second set is determined based on the information segments to be encrypted for diversion processing; the information segments to be encrypted for diversion processing are the first M information segments in the secondary cache arranged from the front to the back in terms of receiving time, where M is a positive integer; wherein the second threshold is less than the first threshold; A first set is constructed based on the information segments to be encrypted in the secondary cache except for the offloaded information segments.

8. An electronic device, characterized in that: The invention comprises at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the method as described in any one of claims 1 to 5.

9. A computer storage medium, characterized in that The computer storage medium stores a computer program, and the computer program is used to enable a computer to execute the method according to any one of claims 1 to 5.

10. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 5.