Data encryption transmission method and related device, equipment, medium and program product
By using dynamic parameters and hash tables to generate keys in the wireless alarm system, and combining the encryption chip to encrypt and transmit alarm information, the problem of security risks in alarm information transmission is solved and higher security and reliability are achieved.
Patent Information
- Application Number
- CN202111505535.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-04
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-12-04
AI Technical Summary
In wireless alarm systems, the transmission of alarm information is easily intercepted or tampered with, leading to security risks, and it is difficult to effectively ensure network security with existing technology.
By randomly generating dynamic parameters in the alarm, combining the hash table to obtain the key, and using encryption chips and encryption algorithms to encrypt and transmit alarm information, the security and reliability of data transmission are improved.
It effectively avoids the risk of alarm information being intercepted and tampered with, improves the security and reliability of the alarm system, and ensures the accuracy and timeliness of information transmission.
Smart Images

Figure CN114338095B
Abstract
Description
Technical Field
[0001] The present application relates to the field of security alarm technology, and in particular to a data encryption transmission method and related devices, equipment, media and program products. Background Art
[0002] With the improvement of people's living standards and the increase of security awareness, various types of security alarms have also emerged, such as the well-known smoke alarms, carbon monoxide (CO) alarms, natural gas alarms, flood alarms, etc. In the era of the Internet of Things, wireless interconnection of all things is a major trend in society, the intelligence of alarms is getting higher and higher, and the use of wireless networks is becoming more and more common. However, wireless secure data transmission is imminent, and how to ensure network security in wireless systems is a difficult problem before us. For data transmission between alarms, if it is intercepted or tampered with in the middle, it may cause the alarm to be unable to alarm accurately and effectively, leading to safety hazards. Summary of the invention
[0003] The embodiments of the present application provide a data encryption transmission method and related products, which improve the security of the alarm system by encrypting the alarm information transmitted between alarms, and further improve the reliability of the encryption process by combining key encryption and hardware chip encryption.
[0004] In a first aspect, an embodiment of the present application provides a data encryption transmission method, the method comprising: a first alarm obtains alarm information, the alarm information is used to notify the current danger-related situation; the first alarm randomly generates dynamic parameters, and obtains a key through the dynamic parameters and a hash table; the first alarm obtains an encryption function, and encrypts the key through the encryption function to generate a first encryption parameter; the first alarm inputs the first encryption parameter into an encryption chip, so that the encryption chip encrypts part of the alarm information according to the first encryption parameter to obtain encrypted alarm information; the first alarm sends the encrypted alarm information.
[0005] It can be seen that in the embodiment of the present application, by encrypting the alarm information sent by the first alarm, the potential safety hazard caused by the alarm information sent by the alarm being intercepted can be avoided, thereby improving the safety of the alarm system. In addition, by generating encryption parameters through dynamic parameters and search algorithms, and then encrypting the alarm information through an encryption algorithm combined with an encryption chip, the reliability of encrypting the alarm information can be further improved.
[0006] In a possible example, the dynamic parameters randomly generated by the first alarm include a first parameter, a second parameter and a third parameter. The first parameter is used to obtain a key in combination with a hash table to obtain an encryption function, including: determining the encryption function through the second parameter and the third parameter in combination with a selected encryption function framework.
[0007] In one possible example, the encryption chip encrypts part of the alarm information generated by the alarm according to a first encryption parameter to obtain encrypted alarm information, including: selecting at least one encryption algorithm from multiple encryption algorithms in the encryption chip as the target encryption algorithm; determining the second encryption parameter in the target encryption algorithm according to the first encryption parameter; encrypting part of the alarm information according to the target encryption algorithm and the second encryption parameter to obtain encrypted alarm information.
[0008] In one possible example, encrypting part of the alarm information in the alarm information includes: obtaining danger parameters and current time in the alarm information; determining the danger level according to the danger parameters, the danger levels including mild danger, moderate danger and severe danger; determining the notification area according to the current time, when the current time is rest time, the notification area is the alarm area in the alarm system, when the current time is working time, the notification area is the control area in the alarm system, the alarm area includes at least one alarm, the control area includes a control center connected to at least one alarm, and the notification area or the control area includes a second alarm; determine the part of the alarm information for encryption according to the danger level and / or alarm area.
[0009] In one possible example, part of the alarm information for encryption is determined based on the danger level and / or alarm area, including: when the danger level is mild danger, the notification area is the control area, and part of the alarm information is the alarm audio and the location information of the alarm; when the danger level is moderate danger and the notification area is the alarm area, the alarm information is the alarm audio and the destination alarm that receives the alarm information; when the danger level is moderate danger and the notification area is the control area, the alarm information is the alarm audio and the location information of the alarm; when the danger level is severe danger, the notification area is the alarm area and the control area, the alarm information is the alarm audio, the alarm location and prompt information, and the prompt information is used to prompt the control area to send a distress signal.
[0010] In a possible example, the method also includes: when the danger level is mild danger or moderate danger, and the first alarm fails to complete the sending of the encrypted alarm information within a first preset time, the first alarm discards the encrypted alarm information and regenerates dynamic parameters for re-encrypting and sending the alarm information.
[0011] In a possible example, the method also includes: when the danger level is severe and the first alarm fails to complete the sending of the encrypted alarm information within a first preset time, the first alarm discards the encrypted alarm information and resends the unencrypted alarm information until it is determined that the unencrypted alarm information is sent successfully.
[0012] In a second aspect, an embodiment of the present application provides a data encryption transmission device, the device comprising:
[0013] A processing unit is used to obtain alarm information, where the alarm information is used to notify the current danger-related situation; randomly generate dynamic parameters to obtain an encryption function; obtain a key through the dynamic parameters, and encrypt the key through the encryption function to generate an encrypted key; input the first encryption parameter into an encryption chip, so that the encryption chip encrypts part of the alarm information generated by the alarm according to the first encryption parameter to obtain encrypted alarm information;
[0014] The sending unit is used to send the encrypted alarm information to the second alarm.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps of any method in the first aspect of the embodiment of the present application.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in any method of the first aspect of the embodiment of the present application.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiment of the present application. The computer program product may be a software installation package. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A schematic diagram of the hardware structure of the alarm system provided in the embodiment of the present application;
[0020] Figure 2A A flowchart of data encryption transmission is provided for an embodiment of the present application;
[0021] Figure 2B A DEA encryption flow chart provided for an embodiment of the present application;
[0022] Figure 2C A schematic diagram of the division of notification areas provided in an embodiment of the present application;
[0023] Figure 3 A flow chart of another data encryption transmission method provided in an embodiment of the present application;
[0024] Figure 4 A flow chart of another data encryption transmission method provided in an embodiment of the present application;
[0025] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0026] Figure 6 A block diagram of the functional units of a data encryption transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0029] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0030] The electronic devices involved in the embodiments of the present application may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, as well as various forms of user equipment (UE), mobile stations (MS), terminal devices, etc.
[0031] The present application embodiment relates to an alarm system. Figure 1 , Figure 1 The hardware structure diagram of the alarm system provided in the embodiment of the present application is as follows: Figure 1 As shown, the alarm system includes at least two alarms that can communicate with each other by radio frequency, and a control center that can communicate with the alarm by radio frequency. The alarm includes sensors for users to obtain various parameters, a microcontroller unit (MCU) for data processing, and a radio frequency (RF) module for communication. In addition, the alarm also includes an encryption chip for encrypting the alarm information generated by the alarm. The control center includes a gateway module, an MCU and an RF module for high-level communication with other processing centers. Similarly, the control center also includes an encryption chip that can decrypt the received encrypted transmission alarm information. The modules in the above-mentioned devices are at least the modules included. In other cases, the device may also include other more modules.
[0032] The alarm of the embodiment of the present application can be an intelligent alarm including an artificial intelligence chip, and the intelligent alarm can also include a microprocessor. The microprocessor and the artificial intelligence chip in the intelligent alarm are interconnected and communicated through a dedicated channel. The microprocessor can independently control the operation of the intelligent alarm. In addition, the microprocessor can also control the operation of the intelligent alarm under the guidance of the artificial intelligence chip, wherein the artificial intelligence chip can output some intelligent control strategies to the microprocessor to guide the microprocessor to work better. The microprocessor can construct a microprocessor software platform, and the artificial intelligence chip can construct an artificial intelligence chip software platform. The microprocessor software platform and the artificial intelligence chip software platform are two independent software platforms, and the artificial intelligence chip software platform is connected to the microprocessor software platform.
[0033] Among them, both the artificial intelligence chip and the microprocessor can communicate and connect with other alarms, control centers or other devices through a Bluetooth communication module or a wired link, and two or more alarms can form an alarm group. Among them, the mobile terminal can control the microprocessor from the awake state to the dormant state by sending a sleep instruction to the microprocessor of any smart alarm in the smart alarm group (the smart alarm group includes at least two paired alarms). When the microprocessor of the smart alarm is in the dormant state, the alarm function (such as audio alarm function or photoelectric alarm function) of the smart alarm will be invalid. The main control center can also send a wake-up instruction to the artificial intelligence chip of the smart alarm to instruct the artificial intelligence chip to notify the microprocessor to enter the awake state from the dormant state. In some possible implementations, the artificial intelligence chip can always be in the awake state when the power supply is normal. In some possible implementations, the microprocessor in the dormant state can only receive instructions from the artificial intelligence chip, that is, the dedicated channel between the microprocessor and the artificial intelligence chip is not closed at this time, but all other communication channels of the microprocessor are in a closed state, wherein the microprocessor in the dormant state can only receive instructions from the artificial intelligence chip, that is, the microprocessor in the dormant state can only be awakened by the artificial intelligence chip. When the artificial intelligence chip fails to wake up the microprocessor in dormant state, the artificial intelligence chip can switch to microprocessor working mode to temporarily replace the microprocessor to control the operation of the smart alarm. When the artificial intelligence chip switches to microprocessor working mode, at this time, for other components in the smart alarm, the artificial intelligence chip is equivalent to the role of a microprocessor.
[0034] The system of the embodiment of the present application is introduced in detail below.
[0035] See also Figure 2A , Figure 2A The present invention provides a flowchart of data encryption transmission, which includes the following steps:
[0036] S101, a first alarm device obtains alarm information, where the alarm information is used to notify the current danger-related situation;
[0037] S102, the first alarm randomly generates dynamic parameters, and obtains a key through the dynamic parameters and a hash table;
[0038] S103, the first alarm obtains an encryption function, and encrypts the key using the encryption function to generate a first encryption parameter;
[0039] S104, the first alarm inputs the first encryption parameter into the encryption chip, so that the encryption chip encrypts part of the alarm information according to the first encryption parameter to obtain encrypted alarm information;
[0040] S105, the first alarm sends encrypted alarm information.
[0041] In an alarm system, all alarms are in a monitoring state at all times, and the sensors therein can obtain danger parameters at any time. For example, for a CO alarm, the CO concentration can be detected, and for a smoke alarm, the smoke concentration can be detected. When the danger parameter is greater than a certain preset threshold, the alarm can determine that it is currently in a dangerous state. Then the alarm can further obtain other danger parameters, such as the identification information and location information of the first alarm that is in a dangerous state, or the current time, the identification information or location information of the next hop alarm that wants to communicate, etc.
[0042] In the process of alarm data transmission, in order to prevent the alarm information from being intercepted and tampered with, an encryption algorithm can be used to encrypt the alarm information. Common encryption algorithms can be divided into three categories: symmetric encryption algorithms, asymmetric encryption algorithms and hash algorithms. Each encryption algorithm has its own advantages and disadvantages. The alarm system is a low-power wireless network, which is a small local area network. Its hardware resources and software functions are greatly limited. Complex algorithms and large amounts of data cannot adapt to small local area networks. For example, specific encryption algorithms include advanced encryption standard (AES), data encryption standard (DEA), triple data encryption algorithm (3DES), Rivest cipher 4 (RC4), error checking and correction (ECC), etc. Taking DEA as an example, please refer to Figure 2B , Figure 2B A DEA encryption flow chart provided in the embodiment of the present application is as follows: Figure 2B As shown in the figure, the encryption process includes input data, which is 64-bit plaintext, and key k, which includes 7 bytes and 56 bits; then the 64-bit plaintext is subjected to 16 rounds of initial permutation through the permutation rule and key k to obtain the permutation result, and then the reverse permutation is performed in the opposite direction of the initial permutation process to finally obtain the output ciphertext. This process requires a large amount of data processing, which may not be possible in a small local area network such as an alarm system.
[0043] In order to solve the problem of resources and efficiency, the embodiment of the present application combines hardware encryption with software encryption for data encryption transmission in the alarm system. First, the alarm randomly generates dynamic parameters, which are used to obtain a value of a fixed byte length from a target position in a hash table as a key. Therefore, the value range of the dynamic parameter is the index value 0 to Ll-1 in the hash table, where L represents the total length of the hash table and l represents a fixed byte. After obtaining the fixed-byte key, the key is encrypted by an encryption function. The encryption function can be, for example, y=3x+2, where the key is input as x and the output y value is the first encrypted parameter after encryption.
[0044] Optionally, the dynamic parameters randomly generated by the first alarm include a first parameter, a second parameter and a third parameter. The first parameter is used to obtain a key in combination with a hash table to obtain an encryption function, including: determining the encryption function through the second parameter and the third parameter in combination with a selected encryption function framework.
[0045] For example, the first parameter generated by the alarm is H=8, the second parameter is k=3, and the third parameter is b=1. Assume that the hash table is hash
[255] ={1,2,3,…,255}, and the 255 non-repeating bytes included in the hash table are H=5, that is, the key is obtained from the 5th byte in the hash table, specifically key[8]={5,6,7,8,9,10,11,12,13}. Assume that the selected encryption function framework is y=kx+b, then according to the second and third parameters, the encryption function can be determined to be y=3x+1, and the key is encrypted according to the encryption function to generate the first encryption parameter key[8]'={16,19,22,25,28,31,34,37,40}.
[0046] The first encryption parameter is input into the encryption chip to configure the algorithm in the encryption chip so that the encryption chip encrypts the alarm information input by the alarm according to the configuration. The first encryption parameter can be used, for example, to determine which encryption algorithm is used in the encryption chip for encryption and to determine the key length when encrypting the alarm information.
[0047] Optionally, the encryption chip encrypts part of the alarm information generated by the alarm according to a first encryption parameter to obtain encrypted alarm information, including: selecting at least one encryption algorithm from multiple encryption algorithms in the encryption chip as a target encryption algorithm; determining a second encryption parameter in the target encryption algorithm according to the first encryption parameter; encrypting part of the alarm information according to the target encryption algorithm and the second encryption parameter to obtain encrypted alarm information.
[0048] Since the memory capacity of the encryption chip is relatively small, the alarm may only send the most important part of the alarm information to the encryption chip for encryption. Important alarm information may be, for example, the address of the first alarm (the alarm that obtains the alarm parameters and determines the alarm), and the address or identifier of the target alarm to send the encrypted data. Before encryption, it is necessary to select one of the multiple encryption algorithms in the encryption chip, such as AES and DEA. The encryption algorithm to be used is determined based on the parity of the first value of the first encryption parameter input. When the first value is an odd number, AES is used, and when the first value is an even number, DEA is used. According to the input key[8]', key[8] is obtained by decryption. The first value is 5, which is an odd number, so AES is used. Then, the key length used when AES encrypts the alarm information can be determined based on the last value in the first encryption parameter. There are three AES encryption schemes: AES-128, AES-192 and AES-256. AES-128 means that the key length is 16 bytes, i.e., 16*8=128 bits, AES-192 means that the key length is 24 bytes, and AES-256 means that the key length is 32 bytes. The selected key length can be determined based on the remainder of the last value in the first encryption parameter divided by 3. For example, if the last value in key[8] is 13 and the remainder divided by 3 is 1, then AES-192 is selected to encrypt the alarm information. After encryption, the generated encrypted alarm information is transmitted to the RF module in the alarm, and then sent to the RF module of the next alarm or control center through the RF module, so that the next alarm or control center can decrypt the encrypted alarm information and obtain the alarm information.
[0049] It can be seen that in the embodiment of the present application, by encrypting the alarm information sent by the first alarm, the potential safety hazard caused by the alarm information sent by the alarm being intercepted can be avoided, thereby improving the safety of the alarm system. In addition, by generating encryption parameters through dynamic parameters and search algorithms, and then encrypting the alarm information through an encryption algorithm combined with an encryption chip, the reliability of encrypting the alarm information can be further improved.
[0050] Optionally, encrypting part of the alarm information in the alarm information includes: obtaining danger parameters and current time in the alarm information; determining the danger level according to the danger parameters, the danger level includes mild danger, moderate danger and severe danger; determining the notification area according to the current time, when the current time is rest time, the notification area is the alarm area in the alarm system, when the current time is working time, the notification area is the control area in the alarm system, the alarm area includes at least one alarm, and the control area includes a control center connected to at least one alarm; determine the part of the alarm information for encryption according to the danger level and / or alarm area.
[0051] Since the alarm generates a lot of alarm information during the alarm process, and the processing capacity of the encryption chip is relatively limited, only part of the alarm information can be input into the encryption chip for encryption. Assuming that the alarm information obtained includes danger parameters, different danger parameter values correspond to different danger levels. For example, for CO concentration, when the CO concentration value is less than 30mg / m 3 (milligrams per cubic meter) is a safe concentration, and the alarm can determine that the current state is non-hazardous. 3 ~100 mg / m 3 When the CO concentration is 100 mg / m 3 ~1g / m 3 When the CO concentration is greater than 1g / m 3 When it is detected, it may cause human poisoning in a very short time, and the danger level can be determined as severe danger. For different danger levels, different alarm information may be generated. For example, for mild danger, only an alarm audio may be generated, and the alarm audio is sent by the alarm that detects the dangerous parameters to warn the user. Alternatively, a prompt message can also be generated to prompt the control center to send the prompt message to the user terminal. For moderate danger, in addition to generating an alarm audio, the address information of the next alarm may also be obtained as an alarm message. If the first alarm that makes an alarm cannot be directly communicated with the next alarm, the second alarm that is directly communicated with the first alarm can be addressed and transmit the alarm message through the address information of the next alarm. After receiving the alarm message, the next alarm broadcasts according to the alarm audio in the alarm message, so that multiple alarms in the alarm system all sound an alarm, which can play a better alarm role.
[0052] On the other hand, the alarm parameters can also include the current time, which is the time corresponding to the time after the danger parameters are obtained and the current state is determined to be dangerous according to the danger parameters. For different time periods within a day, it can be divided into rest time and working time. For example, 19:00 pm to 7:00 am is rest time, and 7:00 am to 19:00 pm is working time. During working time and rest time, the corresponding notification area may be different. For details, please refer to Figure 2C , Figure 2C A schematic diagram of a notification area division provided in an embodiment of the present application, such as Figure 2CAs shown, it is an alarm system, which includes a plurality of interconnected alarms 1 to 15, and a control center capable of sending control information to these alarms. Assume that the first alarm that obtains the danger parameter and determines that the current state is dangerous is alarm 3, and alarm 3 is the alarm in bedroom A. The living room (corresponding to alarm 9) and bedroom B (corresponding to alarm 12) are close to bedroom A, and the bathroom (corresponding to alarm 14) and bedroom C (corresponding to alarm 8) are far from bedroom A. Then alarm 3, alarm 9 and alarm 12 form an alarm area 220. The shortest communication link between the first alarm and the control center can be formed, and all the devices included constitute a control area. For example Figure 2C In the example, the control area 210 corresponding to the alarm area where the alarm 3 is located includes: the alarm 3, the alarm 6 and the control center. Alternatively, the alarm area where the first alarm is located and the control center can form a control area with the devices included in the shortest communication link, for example Figure 3 The control areas in are: alarm 3, alarm 9, alarm 12, alarm 6 and control center. During working hours, since the user is most likely not at home, the alarm information needs to be transmitted to the control center, and then the control center sends the alarm information to the user's electronic device so that the user can take the next step. Therefore, the notification area corresponds to the control area. During rest time, the user is most likely at home. In some cases, the alarm information can be transmitted to the alarm near the first alarm for notification, so that the user can pay enough attention. Therefore, the notification area may correspond to the alarm area.
[0053] Based on the above description, the alarm can determine part of the alarm information for encryption according to the danger level or alarm area, so as to reduce the data that the alarm needs to encrypt, while ensuring the accurate transmission of the alarm information and the quality of the alarm.
[0054] Optionally, part of the alarm information for encryption is determined according to the danger level and / or alarm area, including: when the danger level is mild danger and the notification area is a control area, part of the alarm information is the alarm audio and the location information of the alarm; when the danger level is moderate danger and the notification area is an alarm area, the alarm information is the alarm audio and the destination alarm that receives the alarm information; when the danger level is moderate danger and the notification area is a control area, the alarm information is the alarm audio and the location information of the alarm; when the danger level is severe danger and the notification area is an alarm area and a control area, the alarm information is the alarm audio, the location of the alarm and prompt information, and the prompt information is used to prompt the control area to send a distress signal.
[0055] Specifically, when the danger level is mild, whether during rest time or working time, it may only be necessary for the first alarm to send out an alarm audio, and then notify the control center of the alarm information, and the control center uploads the prompt information to the user terminal so that the user can respond to the alarm information. When the danger level is moderate, during rest time, the notification area is the alarm area, then the first alarm sends the alarm audio to other alarms in the alarm area, so that other alarms in the alarm area also alarm according to the alarm audio, so as to wake up the resting user and solve the danger of the alarm. When the danger level is moderate, during working hours, the notification area is the control area, then the first alarm sends the alarm audio and the location information of the first alarm to the next jump alarm until it is sent to the control center. If possible, the first alarm is directly connected to the control center, so the first alarm sends the alarm information directly to the control center. Other alarms in the control area alarm according to the alarm audio in the alarm information, so that more people outdoors can hear the alarm audio and respond accordingly. The control center determines the location of the alarm danger based on the location information of the first alarm in the alarm information, and then sends a prompt message to the user device to remind the user that a danger has occurred at home and the specific location of the danger, so that users who are not at home can make the next response. When the danger level is severe, in this case, enough alarm audio is needed to attract the attention of indoor and outdoor users, and prompt information needs to be sent to users who are not at home so that users can seek help from professionals. Therefore, the notification area in this case is the alarm area and the control area, and the alarm information is the alarm audio, the location of the alarm and the prompt information. The prompt information is used to prompt the control area to send a distress signal. Other alarms in the alarm area and the control area that receive the alarm information will sound an alarm based on the alarm audio. At the same time, the control center can determine the specific location of the danger based on the location information of the first alarm in the alarm information. In this way, indoor and outdoor users can respond to and handle the severe danger in a timely manner.
[0056] It can be seen that in the embodiment of the present application, the alarm information is determined by the difference in the current danger level and the notification area, so that in different situations, the alarm information can be processed with the minimum memory and processing resources, while taking into account the accuracy of the alarm based on the alarm information, thereby improving the working efficiency of the alarm system.
[0057] Optionally, the method also includes: when the danger level is mild danger or moderate danger, and the first alarm fails to complete sending the encrypted alarm information to the second alarm within the first preset time, the first alarm discards the encrypted alarm information and regenerates dynamic parameters for re-encrypting the alarm information.
[0058] In some cases, since the first parameter used to obtain the key and the second and third parameters used to determine the encryption function are all randomly generated, these randomly generated parameters also have a certain time limit. After the time limit has expired, the receiving end may assume that the parameters have changed and thus cannot decrypt the alarm information encrypted with the expired random parameters. Therefore, the first alarm fails to successfully send the alarm information within the first preset time, possibly because the second alarm fails to decrypt the alarm information, and the first alarm therefore regenerates the alarm information and sends it to the second alarm.
[0059] The above situation is when the danger level is moderate or mild, and the security of the alarm information needs to be considered. In the case of severe danger, the first thing to consider is to send the alarm information. Therefore, if the encryption and decryption process is too cumbersome, or the alarm receiving the encrypted alarm information cannot decrypt it, the second alarm cannot successfully obtain the alarm information within the first preset time, but the alarm information requires the second alarm to alarm in time, or forward the alarm information in time, and the transmission delay is too long, which may lead to more safety hazards, such as failure to notify outdoor users in time to control danger, and the control center cannot notify the user equipment in time, resulting in users who are far away from the time being unable to seek help in time. Therefore, if the first alarm has not completed the sending of the encrypted alarm information within the first preset time, the first alarm discards the encrypted alarm information and resends the unencrypted alarm information until it is determined that the second alarm has successfully received the alarm information.
[0060] It can be seen that in the embodiment of the present application, if the first alarm fails to send the encrypted alarm information to the second alarm within the first preset time, if it is in moderate or mild danger, the first alarm regenerates the dynamic parameters and re-encrypts the alarm information based on the security of the information. If it is in severe danger, the first alarm re-sends the unencrypted alarm information based on the information transmission until it is determined that the second alarm successfully receives the alarm information. This allows the first alarm to flexibly determine the method of sending the alarm information according to the current degree of danger, improve the security of the alarm system, and ensure the alarm timeliness of the alarm system.
[0061] See also Figure 3 , Figure 3 is another data encryption transmission method flow chart provided in an embodiment of the present application, such as Figure 3 As shown, the method comprises the following steps:
[0062] S201, a first alarm device acquires alarm information, where the alarm information is used to notify the current danger-related situation;
[0063] S202, the first alarm randomly generates dynamic parameters, and obtains a key through the dynamic parameters and a hash table;
[0064] S203, the first alarm obtains an encryption function, and encrypts the key using the encryption function to generate a first encryption parameter;
[0065] S204, the first alarm obtains the danger parameter and the current time in the alarm information; determines the danger level according to the danger parameter, and the danger level includes mild danger, moderate danger and severe danger;
[0066] S205, determining a notification area according to the current time, when the current time is rest time, the notification area is an alarm area in the alarm system, when the current time is working time, the notification area is a control area in the alarm system, the alarm area includes at least one alarm, and the control area includes a control center connected to the at least one alarm;
[0067] S206, determining part of the alarm information for encryption according to the danger level and / or the alarm area;
[0068] S207, the first alarm inputs the first encryption parameter into the encryption chip, so that the encryption chip encrypts part of the alarm information according to the first encryption parameter to obtain encrypted alarm information;
[0069] S208, the first alarm sends encrypted alarm information.
[0070] The implementation of the above steps can be found in Figure 2A to Figure 2C The corresponding description will not be repeated here.
[0071] It can be seen that in the embodiment of the present application, the alarm information is determined by the current danger level and the notification area, so that in different situations, the alarm information can be processed with the minimum memory and processing resources, while taking into account the accuracy of the alarm based on the alarm information, thereby improving the working efficiency of the alarm system.
[0072] See also Figure 4 , Figure 4 is another data encryption transmission method flow chart provided in an embodiment of the present application, such as Figure 4 As shown, the method comprises the following steps:
[0073] S301, the first alarm obtains the danger parameter in the alarm information, and determines the danger level according to the danger parameter, and the danger level includes mild danger, moderate danger and severe danger;
[0074] S302, the first alarm randomly generates dynamic parameters, and obtains a key through the dynamic parameters and a hash table;
[0075] S303, the first alarm obtains an encryption function, and encrypts the key using the encryption function to generate a first encryption parameter;
[0076] S304, the first alarm inputs the first encryption parameter into the encryption chip, so that the encryption chip encrypts part of the alarm information according to the first encryption parameter to obtain encrypted alarm information;
[0077] S305, the first alarm sends encrypted alarm information;
[0078] S306, when the danger level is mild danger or moderate danger, and the first alarm fails to complete sending the encrypted alarm information within the first preset time, the first alarm discards the encrypted alarm information and regenerates dynamic parameters for re-encrypting and sending the alarm information.
[0079] S307, when the danger level is severe and the first alarm fails to complete sending of the encrypted alarm information within the first preset time, the first alarm discards the encrypted alarm information and resends the unencrypted alarm information until it is determined that the unencrypted alarm information is sent successfully.
[0080] The implementation of the above steps can be found in Figure 2A to Figure 2C The corresponding description will not be repeated here.
[0081] It can be seen that in the embodiment of the present application, if the first alarm fails to send the encrypted alarm information to the second alarm within the first preset time, if it is in moderate or mild danger, the first alarm regenerates the dynamic parameters and re-encrypts the alarm information, and if it is in severe danger, the first alarm re-sends the unencrypted alarm information until it is determined that the second alarm successfully receives the alarm information. This allows the first alarm to flexibly determine the sending method of the alarm information according to the current danger level, improve the safety of the alarm system, and ensure the alarm timeliness of the alarm system.
[0082] With the above Figure 2A , Figure 3 , Figure 4 For details on the embodiments shown in the drawings, please refer to Figure 5 , Figure 5 4 is a structural diagram of an electronic device 400 provided in an embodiment of the present application. As shown in the figure, the electronic device is used for a first alarm, and the electronic device 400 includes a processor 410, a memory 420, a communication interface 430, and one or more programs 421, wherein the one or more programs 421 are stored in the above-mentioned memory 420 and are configured to be executed by the above-mentioned processor 410, and the one or more programs 421 include instructions for executing the following steps:
[0083] Acquire alarm information, where the alarm information is used to notify the current danger-related situation; randomly generate dynamic parameters, and obtain the key through the dynamic parameters and the hash table; obtain the encryption function, and encrypt the key through the encryption function to generate a first encryption parameter; input the first encryption parameter into the encryption chip, so that the encryption chip encrypts part of the alarm information according to the first encryption parameter to obtain the encrypted alarm information; and send the encrypted alarm information.
[0084] In one possible example, the randomly generated dynamic parameters include a first parameter, a second parameter, and a third parameter, the first parameter is used to obtain a key in combination with a hash table, and obtaining the encryption function includes: determining the encryption function through the second parameter and the third parameter in combination with a selected encryption function framework.
[0085] In one possible example, the encryption chip encrypts part of the alarm information generated by the alarm according to a first encryption parameter to obtain encrypted alarm information, including: selecting at least one encryption algorithm from multiple encryption algorithms in the encryption chip as the target encryption algorithm; determining the second encryption parameter in the target encryption algorithm according to the first encryption parameter; encrypting part of the alarm information according to the target encryption algorithm and the second encryption parameter to obtain encrypted alarm information.
[0086] In one possible example, before encrypting part of the alarm information in the alarm information, one or more programs 421 include instructions for performing the following steps: obtaining danger parameters and current time in the alarm information; determining the danger level based on the danger parameters, the danger level including mild danger, moderate danger and severe danger; determining the notification area based on the current time, when the current time is rest time, the notification area is the alarm area in the alarm system, when the current time is working time, the notification area is the control area in the alarm system, the alarm area includes at least one alarm, and the control area includes a control center connected to at least one alarm; determining part of the alarm information for encryption based on the danger level and / or alarm area.
[0087] In one possible example, part of the alarm information for encryption is determined based on the danger level and / or alarm area, including: when the danger level is mild danger, the notification area is the control area, and part of the alarm information is the alarm audio and the location information of the alarm; when the danger level is moderate danger and the notification area is the alarm area, the alarm information is the alarm audio and the destination alarm that receives the alarm information; when the danger level is moderate danger and the notification area is the control area, the alarm information is the alarm audio and the location information of the alarm; when the danger level is severe danger, the notification area is the alarm area and the control area, the alarm information is the alarm audio, the alarm location and prompt information, and the prompt information is used to prompt the control area to send a distress signal.
[0088] In one possible example, the one or more programs 421 further include instructions for performing the following steps:
[0089] When the danger level is mild danger or moderate danger, and the first alarm fails to complete the sending of the encrypted alarm information within the first preset time, the encrypted alarm information is discarded, and dynamic parameters are regenerated for re-encrypting and sending the alarm information.
[0090] In one possible example, the one or more programs 421 further include instructions for performing the following steps:
[0091] When the danger level is severe and the first alarm fails to complete sending of the encrypted alarm information within the first preset time, the encrypted alarm information is discarded and the unencrypted alarm information is resent until it is determined that the unencrypted alarm information is sent successfully.
[0092] It can be seen that in the embodiment of the present application, by encrypting the alarm information sent by the electronic device, the potential safety hazard caused by the interception of the alarm information sent by the electronic device can be avoided, and the safety of the alarm system can be improved. In addition, by generating encryption parameters through dynamic parameters and search algorithms, and then encrypting the alarm information through encryption algorithms combined with encryption chips, the reliability of encrypting the alarm information can be further improved.
[0093] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0094] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0095] Figure 65 is a functional unit block diagram of a data encryption transmission device 500 involved in an embodiment of the present application. The device 500 includes a processing unit 501 and a sending unit 502, wherein:
[0096] The processing unit 501 is used to obtain alarm information, where the alarm information is used to notify the current danger-related situation; randomly generate dynamic parameters, and obtain a key through the dynamic parameters and a hash table; obtain an encryption function, and encrypt the key through the encryption function to generate a first encryption parameter; input the first encryption parameter into an encryption chip, so that the encryption chip encrypts part of the alarm information according to the first encryption parameter to obtain encrypted alarm information;
[0097] The sending unit 502 is used to send the encrypted alarm information.
[0098] It can be seen that the data encryption transmission device in the embodiment of the present application can avoid the potential safety hazards caused by the interception of the sent alarm information by encrypting the alarm information, thereby improving the safety of the alarm system. In addition, by generating encryption parameters through dynamic parameters and search algorithms, and then encrypting the alarm information through encryption algorithms combined with encryption chips, the reliability of encrypting the alarm information can be further improved.
[0099] In a possible example, the randomly generated dynamic parameters include a first parameter, a second parameter, and a third parameter. The first parameter is used to obtain a key in combination with a hash table. Obtaining the encryption function includes:
[0100] The encryption function is determined by the second parameter and the third parameter in combination with the selected encryption function framework.
[0101] In a possible example, the encryption chip encrypts part of the alarm information generated by the alarm according to the first encryption parameter to obtain the encrypted alarm information, including:
[0102] Selecting at least one encryption algorithm from a plurality of encryption algorithms in the encryption chip as a target encryption algorithm;
[0103] Determining a second encryption parameter in a target encryption algorithm based on the first encryption parameter;
[0104] Part of the alarm information is encrypted according to the target encryption algorithm and the second encryption parameter to obtain encrypted alarm information.
[0105] In a possible example, before encrypting part of the alarm information, the processing unit 501 is further configured to:
[0106] Get the dangerous parameters and current time in the alarm information;
[0107] Determine the danger level according to the danger parameters, and the danger level includes slight danger, moderate danger and severe danger;
[0108] Determine a notification area according to the current time. When the current time is rest time, the notification area is the alarm area in the alarm system. When the current time is working time, the notification area is the control area in the alarm system. The alarm area includes at least one alarm, and the control area includes a control center connected to at least one alarm.
[0109] Part of the alarm information used for encryption is determined based on the danger level and / or the alarm area.
[0110] In one possible example, part of the alarm information for encryption is determined based on the danger level and / or alarm area, including: when the danger level is mild danger, the notification area is the control area, and part of the alarm information is the alarm audio and the location information of the alarm; when the danger level is moderate danger and the notification area is the alarm area, the alarm information is the alarm audio and the destination alarm that receives the alarm information; when the danger level is moderate danger and the notification area is the control area, the alarm information is the alarm audio and the location information of the alarm; when the danger level is severe danger, the notification area is the alarm area and the control area, the alarm information is the alarm audio, the alarm location and prompt information, and the prompt information is used to prompt the control area to send a distress signal.
[0111] In one possible example, the processing unit 501 is also used for: when the danger level is mild danger or moderate danger, and the first alarm fails to complete the sending of the encrypted alarm information within a first preset time, the first alarm discards the encrypted alarm information and regenerates dynamic parameters for re-encrypting and sending the alarm information.
[0112] In one possible example, the processing unit 501 is also used for: when the danger level is severe and the first alarm fails to complete the sending of the encrypted alarm information within a first preset time, the first alarm discards the encrypted alarm information and resends the unencrypted alarm information until it is determined that the unencrypted alarm information is sent successfully.
[0113] In a possible example, the data encryption transmission device 500 further includes a receiving unit 503 for receiving alarm information sent by other devices.
[0114] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.
[0115] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.
[0116] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.
[0117] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0118] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0119] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0120] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0122] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0123] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.
[0124] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data encryption transmission method, characterized in that: The method comprises: The first alarm device acquires alarm information, wherein the alarm information is used to notify the current danger-related situation; The first alarm randomly generates a dynamic parameter, and obtains a key through the dynamic parameter and a hash table; the dynamic parameter is used to obtain a value of a fixed byte length from a target position in the hash table as the key; The first alarm obtains an encryption function, and encrypts the key by using the encryption function to generate a first encryption parameter; The first alarm inputs the first encryption parameter into an encryption chip, and the encryption chip is used to encrypt part of the alarm information according to the first encryption parameter to obtain encrypted alarm information; The first alarm device sends the encrypted alarm information; in, Before encrypting part of the alarm information, the method further includes: Obtaining the danger parameter and current time in the alarm information; Determining a risk level according to the risk parameter, wherein the risk level includes a slight risk, a moderate risk, and a severe risk; Determine a notification area according to the current time, when the current time is rest time, the notification area is an alarm area in the alarm system, when the current time is working time, the notification area is a control area in the alarm system, the alarm area includes at least one alarm, and the control area includes a control center connected to the at least one alarm; Determining the portion of alarm information for encryption according to the danger level and / or the alarm area; For moderate danger, in addition to generating alarm audio, the address information of the next alarm is also obtained as alarm information. If the first alarm that issues the alarm cannot communicate directly with the next alarm, the second alarm that is directly communicated with the first alarm is addressed through the address information of the next alarm and transmits the alarm information; after receiving the alarm information, the next alarm broadcasts it according to the alarm audio in the alarm information.
2. The method according to claim 1, characterized in that: The dynamic parameters randomly generated by the first alarm include a first parameter, a second parameter and a third parameter. The first parameter is used to obtain a key in combination with a hash table. The encryption function includes: The encryption function is determined by using the second parameter and the third parameter in combination with a selected encryption function framework.
3. The method according to claim 1 or 2, characterized in that: The encryption chip encrypts part of the alarm information generated by the alarm according to the first encryption parameter to obtain the encrypted alarm information, including: Selecting at least one encryption algorithm from a plurality of encryption algorithms in the encryption chip as a target encryption algorithm; Determine a second encryption parameter in the target encryption algorithm according to the first encryption parameter; The part of the alarm information is encrypted according to the target encryption algorithm and the second encryption parameter to obtain encrypted alarm information.
4. The method according to claim 1, characterized in that: The part of the alarm information determined for encryption according to the danger level and / or the alarm area includes: When the danger level is a slight danger, the notification area is the control area, and the partial alarm information is the alarm audio and the location information of the alarm; When the danger level is moderate danger and the notification area is the alarm area, the alarm information is the alarm audio and the destination alarm receiving the alarm information; When the danger level is moderate danger and the notification area is the control area, the alarm information is the alarm audio and the location information of the alarm; When the danger level is severe danger, the notification area is the alarm area and the control area, the alarm information is the alarm audio, the alarm location and prompt information, and the prompt information is used to prompt the control area to send a distress signal.
5. The method according to claim 4, characterized in that The method further includes: when the danger level is a slight danger or a moderate danger, and the first alarm does not complete the sending of the encrypted alarm information within a first preset time, the first alarm discards the encrypted alarm information and regenerates a dynamic parameter for re-encrypting and sending the alarm information; or, The method also includes: when the danger level is severe danger and the first alarm fails to complete the sending of the encrypted alarm information within a first preset time, the first alarm discards the encrypted alarm information and resends the unencrypted alarm information until it is determined that the unencrypted alarm information is sent successfully.
6. A data encryption transmission device, characterized in that: The device comprises: A processing unit is used to obtain alarm information, wherein the alarm information is used to notify the current danger-related situation; randomly generate dynamic parameters, and obtain a key through the dynamic parameters and a hash table; the dynamic parameters are used to obtain a value of a fixed byte length from a target position in the hash table as the key; obtain an encryption function, and encrypt the key through the encryption function to generate a first encryption parameter; input the first encryption parameter into an encryption chip, and the encryption chip is used to encrypt part of the alarm information according to the first encryption parameter to obtain encrypted alarm information; A sending unit, used for sending the encrypted alarm information; Before encrypting part of the alarm information, the device is further configured to: Obtaining the danger parameter and current time in the alarm information; Determining a risk level according to the risk parameter, wherein the risk level includes a slight risk, a moderate risk, and a severe risk; Determine a notification area according to the current time, when the current time is rest time, the notification area is an alarm area in the alarm system, when the current time is working time, the notification area is a control area in the alarm system, the alarm area includes at least one alarm, and the control area includes a control center connected to the at least one alarm; Determining the portion of alarm information for encryption according to the danger level and / or the alarm area; For moderate danger, in addition to generating alarm audio, the address information of the next alarm is also obtained as alarm information. If the first alarm that issues the alarm cannot communicate directly with the next alarm, the second alarm that is directly communicated with the first alarm is addressed through the address information of the next alarm and transmits the alarm information; after receiving the alarm information, the next alarm broadcasts it according to the alarm audio in the alarm information.
7. An electronic device, characterized in that: The method comprises a processor, a memory and a communication interface, wherein one or more programs are stored in the memory and configured to be executed by the processor, wherein the programs include instructions for executing the steps in the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 5.
9. A computer program product, characterized in that The computer program product is used to enable a computer to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Dynamic secret key generating method and device
CN103546281A
Key protection method and device
CN108429719A
Dynamic cipher key acquisition method, dynamic cipher key acquisition device, terminal equipment, and storage medium
CN108462686A
Multi-encryption data encryption method and device and mobile terminal
CN110176986A
Information encryption method and device and electronic device
CN111245811A
