Key generation method, device and electronic equipment

By classifying optical data and generating keys through calculation, the problem of low key security in the existing technology is solved, and key generation with high security is achieved.

CN115913542BActive Publication Date: 2025-10-10CHINA TELECOM CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211511263.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2025-10-10
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

The random number used in the key generation process in the prior art has low pseudo-randomness and cannot guarantee the security of the key.

Method used

By acquiring the optical data collected by the acquisition device, dividing it into multiple categories according to type, and using preset functions for calculation, the data of the target length is selected for arrangement and combination to generate key data.

Benefits of technology

The security of the key is improved, and the generated key is unique, timely and random, which enhances the security and uniqueness of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115913542B_ABST
    Figure CN115913542B_ABST
Patent Text Reader

Abstract

The application discloses a key generation method, device and electronic equipment. Wherein, the method comprises: acquiring light data collected by a collection device; dividing the light data according to the type thereof to obtain multiple types of light data; calculating the multiple types of light data respectively through a preset function to obtain multiple calculation results corresponding to the multiple types of light data; selecting data of a target length from the multiple calculation results respectively to arrange and combine to obtain target data, and determining the target data as key data. The application solves the technical problem of low security in the related art method of generating a key.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data security, in particular to a key generation method and device and electronic equipment. BACKGROUND

[0002] In the field of data security, for example, when two programs interact, in order to ensure the uniqueness of the request sequence number, a random number generated by splicing can be added, and random numbers are also needed in file encryption and decryption, system interaction parameter key, and the like. The random numbers used in the key generation process of the prior art mostly meet the standard of pseudo-randomness of random numbers, and cannot guarantee the security of the key.

[0003] No effective solution has been proposed for the above problems. SUMMARY

[0004] Embodiments of the present application provide a key generation method, device and electronic equipment to at least solve the technical problem of low security in the related art method of generating a key.

[0005] According to an aspect of an embodiment of the present application, a key generation method is provided, including: obtaining light data collected by a collection device; dividing the light data according to the type thereof to obtain multiple types of light data; calculating the multiple types of light data respectively through a preset function to obtain multiple calculation results corresponding to the multiple types of light data; selecting data of a target length from the multiple calculation results respectively to arrange and combine to obtain target data, and determining the target data as key data.

[0006] Optionally, obtaining the light data collected by the collection device includes: sending a first collection instruction to a first collection device, wherein the first collection instruction is used to control the first collection device to determine the incident point of light; sending a second collection instruction to a second collection device, wherein the second collection instruction is used to control the second collection device to collect the angle data of light; and determining the light data according to the incident point and the angle data.

[0007] Optionally, obtaining the light data collected by the collection device includes: obtaining a first time corresponding to the incident point of light determined by the first collection device; obtaining a second time corresponding to the angle data of light collected by the second collection device; obtaining the distance between the first collection device and the second collection device; determining the propagation speed of light according to the first time, the second time and the distance; and determining the wavelength of light according to the propagation speed of light and the frequency of light, wherein the light data includes the propagation speed and the wavelength.

[0008] Optionally, multiple categories of light data include incident light data, reflected light data, and refracted light data. The light data are divided according to their types to obtain multiple categories of light data, including: dividing the light data according to incident light to obtain a first category of light data, wherein the first category of light data at least includes the angle between the incident light and the normal, the wavelength of the incident light, and the propagation speed of the incident light; dividing the light data according to reflected light to obtain a second category of light data, wherein the second category of light data at least includes the angle between the reflected light and the normal, the wavelength of the reflected light, and the propagation speed of the reflected light; dividing the light data according to refracted light to obtain a third category of light data, wherein the third category of light data at least includes the angle between the refracted light and the normal, the wavelength of the refracted light, and the propagation speed of the refracted light.

[0009] Optionally, multiple types of light data are calculated separately through preset functions to obtain multiple calculation results corresponding to the multiple types of light data, including: receiving input instructions from the target object, determining the constant term in the preset function; substituting the angle between the incident light and the normal, the wavelength of the incident light, and the propagation speed of the incident light in the first type of light data into the preset function for calculation, to obtain a first calculation result corresponding to the first type of light data; substituting the angle between the reflected light and the normal, the wavelength of the reflected light, and the propagation speed of the reflected light in the second type of light data into the preset function for calculation, to obtain a second calculation result corresponding to the second type of light data; substituting the angle between the refracted light and the normal, the wavelength of the refracted light, and the propagation speed of the refracted light in the third type of light data into the preset function for calculation, to obtain a third calculation result corresponding to the third type of light data.

[0010] Optionally, data of a target length are selected from multiple calculation results and arranged and combined to obtain target data, including: when the length of the target calculation result is greater than a preset length, dividing the target calculation result into multiple groups to obtain multiple groups of data, wherein the target calculation result is any one of the multiple calculation results; selecting one data from each group of data according to a first preset order to combine to obtain data of the target length; combining the data of the target length corresponding to the multiple calculation results according to a second preset order to obtain the target data.

[0011] Optionally, the method further includes: when the length of the target calculation result is less than a preset length, obtaining an identifier corresponding to the target calculation result; and combining the identifier and the target calculation result to obtain data of the target length.

[0012] According to another aspect of the embodiments of the present application, a key generation apparatus is further provided, comprising: an acquisition module configured to acquire light data collected by a collection device; a division module configured to divide the light data according to types to which the light data belongs, to obtain multi-type light data; a calculation module configured to calculate the multi-type light data respectively by using a preset function, to obtain a plurality of calculation results corresponding to the multi-type light data; and a determination module configured to select data of a target length from the plurality of calculation results respectively, to arrange and combine the data, to obtain target data, and to determine the target data as key data.

[0013] According to still another aspect of the embodiments of the present application, an electronic device is further provided, comprising: a memory configured to store program instructions; and a processor connected with the memory, configured to execute the program instructions to realize the following functions: acquiring light data collected by a collection device; dividing the light data according to types to which the light data belongs, to obtain multi-type light data; calculating the multi-type light data respectively by using a preset function, to obtain a plurality of calculation results corresponding to the multi-type light data; selecting data of a target length from the plurality of calculation results respectively, to arrange and combine the data, to obtain target data, and to determine the target data as key data.

[0014] According to still another aspect of the embodiments of the present application, a non-volatile storage medium is further provided, comprising a stored computer program, wherein a device in which the non-volatile storage medium is located executes the key generation method by running the computer program.

[0015] In the embodiments of the present application, by acquiring light data collected by a collection device, dividing the light data according to types to which the light data belongs, to obtain multi-type light data, calculating the multi-type light data respectively by using a preset function, to obtain a plurality of calculation results corresponding to the multi-type light data, selecting data of a target length from the plurality of calculation results respectively, to arrange and combine the data, to obtain target data, and determining the target data as key data, the purpose of determining key data according to light data is achieved, technical effects of improving the security of generating keys are realized, and the technical problem of low security of the method of generating keys in the related art is solved. BRIEF DESCRIPTION OF DRAWINGS

[0016] The accompanying drawings, which are included to provide a further understanding of the present application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and serve to explain the present application, and do not limit the present application in any manner. In the drawings:

[0017] Figure 1 is a hardware structure block diagram of a computer terminal (or electronic device) for implementing the key generation method according to the embodiments of the present application;

[0018] Figure 2 is a flowchart of a key generation method according to the embodiments of the present application;

[0019] Figure 3 is a schematic diagram of a process for determining target data according to an embodiment of the present application;

[0020] Figure 4 It is a structural diagram of a key generation device according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0023] The key generation method embodiment provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG1 shows a hardware structure block diagram of a computer terminal (or electronic device) for implementing a key generation method. Figure 1 As shown, the computer terminal 10 (or electronic device 10) may include one or more (illustrated by 102a, 102b, ..., 102n in the figure) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0024] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single, independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or electronic device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0025] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the key generation method in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned key generation method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0026] The transmission module 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission module 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission module 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0027] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or electronic device).

[0028] It should be noted that, in some optional embodiments, the above Figure 1The computer device (or electronic device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer device (or electronic device) described above.

[0029] In the above-mentioned operating environment, an embodiment of the present application provides an embodiment of a key generation method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0030] Figure 2 is a flowchart of a key generation method according to an embodiment of the present application, such as Figure 2 As shown, the method includes the following steps:

[0031] Step S202, obtaining light data collected by a collection device;

[0032] Step S204, dividing the optical data according to its type to obtain multiple types of optical data;

[0033] Step S206, calculating the multiple types of light data using a preset function to obtain multiple calculation results corresponding to the multiple types of light data;

[0034] Step S208: Select data of target length from multiple calculation results, perform permutations and combinations, obtain target data, and determine the target data as key data.

[0035] In the above steps S202 to S208, due to the refraction angle of light in different time periods and the different media in the air, the angles of refracted light, reflected light and incident light are different. When performing calculations, various conditions such as the angle of refracted light, the angle of incident light, the angle of reflected light, and the speed of light are comprehensively considered to obtain multiple types of light data. The multiple types of light data are respectively substituted into the preset function for calculation to obtain the final target data.

[0036] In step S202 of the above-mentioned key generation method, light data collected by the collection device is obtained, which specifically includes the following steps: sending a first collection instruction to the first collection device, wherein the first collection instruction is used to control the first collection device to determine the incident point of light; sending a second collection instruction to the second collection device, wherein the second collection instruction is used to control the second collection device to collect angle data of light; and determining the light data based on the incident point and the angle data.

[0037] In the embodiments of the present application, the collection of light data is transmitted by N light sensing collection devices distributed in different areas, the light sensing collection devices include a first collection device and a second collection device, the first collection device can be a ground device for example, which is used to capture the incident point of the calculation light, and the second collection device can be an aerial device for example, which is used to capture the angle data of the incident, reflection and refraction of the light. When collecting light data each time, the light sensing devices distributed in different areas will transmit light data, the light data at least includes the current time stamp and the angle of the refracted light, the angle of the incident light, the angle of the reflected light and other light data. The collection device transmits the collected light data to the processor, and the target data is obtained after the processor processes the light data.

[0038] In another optional embodiment, the collection frequency can be set in the collection device, and the collection device automatically collects light data according to the set collection frequency, without receiving the collection instruction sent by the processor.

[0039] In step S202 of the above key generation method, the light data collected by the collection device is obtained, specifically including the following steps: obtaining the first time corresponding to the incident point of the light determined by the first collection device; obtaining the second time corresponding to the angle data of the light collected by the second collection device; obtaining the distance between the first collection device and the second collection device; determining the propagation speed of the light according to the first time, the second time and the distance; and determining the wavelength of the light according to the propagation speed of the light and the frequency of the light, wherein the light data includes the propagation speed and the wavelength.

[0040] In an embodiment of the present application, the acquisition device also needs to obtain the propagation speed of light. Specifically, the time when the first acquisition device (such as a ground device) determines the incident point of the light is used as the first time, and the time when the second acquisition device (such as an aerial device) collects the light (that is, the time when the angle data of the light is collected) is used as the second time. In an optional embodiment, when collecting light data at the same time, one first acquisition device can be used, and multiple second acquisition devices can be used. The second acquisition device is used to collect incident light, reflected light, and refracted light respectively, and then multiple second times are determined based on the time corresponding to the incident light, the time corresponding to the reflected light, and the time corresponding to the refracted light. That is, the second time includes the second time corresponding to the incident light, the second time corresponding to the reflected light, and the second time corresponding to the refracted light. In the above embodiment, it is necessary to determine the distance between the first acquisition device and the multiple second acquisition devices respectively. For example, the distance between the first acquisition device and the second acquisition device that collects the incident light is the first distance, the distance between the first acquisition device and the second acquisition device that collects the reflected light is the second distance, and the distance between the first acquisition device and the second acquisition device that collects the refracted light is the third distance. The propagation speed of light is calculated according to the calculation formula between distance, time, and speed. For example, the propagation time of the incident light is determined based on the absolute value of the difference between the second time and the first time corresponding to the incident light, and the propagation velocity of the incident light is then determined based on the first distance and the propagation time of the incident light. Similarly, the propagation time of the reflected light is determined based on the absolute value of the difference between the second time and the first time corresponding to the reflected light, and the propagation velocity of the reflected light is then determined based on the second distance and the propagation time of the reflected light. Similarly, the propagation time of the refracted light is determined based on the absolute value of the difference between the second time and the first time corresponding to the refracted light, and the propagation velocity of the refracted light is then determined based on the third distance and the propagation time of the refracted light.

[0041] Since the frequency of light remains constant during transmission, the wavelength of light can be calculated using the formula between the propagation speed, frequency, and wavelength of light. Specifically, the wavelength of the incident light can be obtained from the propagation speed and frequency of the incident light, the wavelength of the reflected light can be obtained from the propagation speed and frequency of the reflected light, and the wavelength of the refracted light can be obtained from the propagation speed and wavelength of the refracted light. The calculated propagation speed and wavelength of light are stored as optical data.

[0042] In step S204 of the above-mentioned key generation method, multiple categories of light data include incident light data, reflected light data, and refracted light data. The light data are divided according to their types to obtain multiple categories of light data, specifically including the following steps: dividing the light data according to the incident light to obtain the first category of light data, wherein the first category of light data at least includes the angle between the incident light and the normal, the wavelength of the incident light, and the propagation speed of the incident light; dividing the light data according to the reflected light to obtain the second category of light data, wherein the second category of light data at least includes the angle between the reflected light and the normal, the wavelength of the reflected light, and the propagation speed of the reflected light; dividing the light data according to the refracted light to obtain the third category of light data, wherein the third category of light data at least includes the angle between the refracted light and the normal, the wavelength of the refracted light, and the propagation speed of the refracted light.

[0043] In an embodiment of the present application, the incidence, refraction, and reflection of light are collected in multiple locations in combination with different regional differences and time differences, and three types of data are collected each time. Each type of light data is stored in the following categories: a) The first type of light data is incident light data, including: {the angle between the incident light and the normal, the wavelength of the incident light, and the propagation speed of the incident light}; b) The second type of light data is reflected light data, including: {the angle between the reflected light and the normal, the wavelength of the reflected light, and the propagation speed of the reflected light}; c) The third type of data is refracted light data, including: {the angle between the refracted light and the normal, the wavelength of the refracted light, and the propagation speed of the refracted light}.

[0044] In step S206 of the above-mentioned key generation method, multiple types of light data are calculated respectively by a preset function to obtain multiple calculation results corresponding to the multiple types of light data, which specifically includes the following steps: receiving an input instruction of the target object and determining the constant term in the preset function; substituting the angle between the incident light and the normal, the wavelength of the incident light and the propagation speed of the incident light in the first type of light data into the preset function for calculation, to obtain a first calculation result corresponding to the first type of light data; substituting the angle between the reflected light and the normal, the wavelength of the reflected light and the propagation speed of the reflected light in the second type of light data into the preset function for calculation, to obtain a second calculation result corresponding to the second type of light data; substituting the angle between the refracted light and the normal, the wavelength of the refracted light and the propagation speed of the refracted light in the third type of light data into the preset function for calculation, to obtain a third calculation result corresponding to the third type of light data.

[0045] In an embodiment of the present application, the storage forms of the above three types of optical data can be, for example: {a1, b1, s1}, {a2, b2, s2}, {a3, b3, s3}, where a1 can be expressed as the angle between the incident light and the normal, b1 can be expressed as the wavelength of the incident light, c1 can be expressed as the propagation speed of the incident light, a2 can be expressed as the angle between the reflected light and the normal, b2 can be expressed as the wavelength of the reflected light, c2 can be expressed as the propagation speed of the reflected light, a3 can be expressed as the angle between the refracted light and the normal, b3 can be expressed as the wavelength of the refracted light, and c3 can be expressed as the propagation speed of the refracted light.

[0046] In an optional embodiment, the preset function obtained after receiving the input instruction of the target object is as follows:

[0047] G=a+a^3 / 3+2a^5 / 15+17a^7 / 315+62a^9 / 2+[2^(2b)*(2^(2b)-1)*s1(2b-1)*

[0048] x^(2b-1)] / (2b)! +.(|a|<π / 2)

[0049] Among them, G represents the calculation result, a represents the angle between light and the normal, b represents the wavelength of light, and c represents the propagation speed of light. In the actual calculation process, a can be substituted for a1, a2, a3, b can be substituted for b1, b2, b3, and c can be substituted for c1, c2, c3.

[0050] It should be noted that the data used in the calculation must be of the same type of light. For example, when calculating the calculation result G1 corresponding to the incident light, a1, b1, and c in the above preset function are used, respectively. When calculating the calculation result G2 corresponding to the reflected light, a2, b2, and c2 in the above preset function are used, respectively. When calculating the calculation result G3 corresponding to the refracted light, a3, b3, and c3 in the above preset function are used, respectively.

[0051] In step S208 of the above-mentioned key generation method, data of a target length are respectively selected from multiple calculation results for arrangement and combination to obtain target data, which specifically includes the following steps: when the length of the target calculation result is greater than the preset length, the target calculation result is divided into multiple groups to obtain multiple groups of data, wherein the target calculation result is any one of the multiple calculation results; one data is selected from each group of data according to a first preset order for combination to obtain data of the target length; the data of the target length corresponding to the multiple calculation results are combined according to a second preset order to obtain the target data.

[0052] In the above-mentioned key generation method, the method further includes the following steps: when the length of the target calculation result is less than a preset length, obtaining an identifier corresponding to the target calculation result; combining the identifier and the target calculation result to obtain data of the target length.

[0053] In the embodiment of this application, Figure 3 The diagram shown in the figure explains the above steps. Figure 3 In the example, the first calculation result G1 is 879382739, the second calculation result G2 is 18, and the third calculation result G3 is 7847982987. Any one of the first, second, and third calculation results is the target calculation result. Taking the first calculation result as an example, the first calculation result is divided into multiple groups of data. The division results are: first group data: 879, second group data: 382, ​​and third group data: 739. A data item is selected from each group of data, for example, 8 is selected from the first group of data, 2 is selected from the second group of data, and 9 is selected from the third group of data. After combining them according to a first preset order, the data of the first target length of 982 is obtained. In an optional embodiment, the first preset order can also be a random order. When dividing the second calculation result, if the length of the second calculation result is less than the preset length, which can be set to 6, for example, it is necessary to obtain the identifier corresponding to the second calculation result, that is, G2. The identifier and the second calculation result are combined. For example, the random combination results in data of the second target length of 81G2. When the third calculation result is divided into multiple groups of data, the division results can be the first group of data: 784, the second group of data: 7982, and the third group of data: 987. One data item is selected from each group of data, for example, 4 is selected from the first group of data, 2 is selected from the second group of data, and 7 is selected from the third group of data. The data of the third target length 274 is obtained by combining them in a first preset order or a random order. The data of the first target length, the data of the second target length, and the data of the third target length are combined in a second preset order or a random order to obtain the target data G298218247. It should be noted that when the target data is obtained by random combination, the data of the first target length 982, the data of the second target length 81G2, and the data of the third target length 274 can be shuffled and reassembled to obtain the target data. This target data is a set of time-sensitive random number key data.

[0054] The purpose of the key generation method provided in the embodiment of the present application is to generate a set of time-sensitive true random numbers so that the generated random numbers are secure when used as keys. In addition, the target data needs to be updated periodically to ensure the security of the data; when the data in the system is persistent, the primary key ID generation strategy can also add the target data to the splicing, so that the uniqueness of the primary key is greatly guaranteed. The present application is a random number generation strategy that is designed to provide data security, uniqueness, and randomness at the same time, and provides a relatively practical lightweight key true random number generation method.

[0055] The key generation method provided by the embodiment of the present application has the following advantages: 1. It provides a key generation strategy that simultaneously satisfies multiple excellent characteristics of the target data, such as uniqueness, timeliness, randomness and security. The natural conditions, propagation media, time and collection locations in the process of collecting light reflection, refraction and incident data are random, which are almost impossible to imitate, and data security is greatly improved; 2. In the periodic key maintenance of the project, the target data of this application can be used, and because of the data characteristics, the key security is greatly improved; 3. Because the randomness of the data is bound to complex weather reasons and different natural propagation media, the target data can be directly used as the primary key of the database.

[0056] The key generation method provided in the embodiment of the present application has a wide range of application scenarios. It can not only be used as a key generation strategy, but can also be used to participate in the generation of primary keys of databases in actual development and to generate signatures for transferred files in projects.

[0057] Figure 4 is a structural diagram of a key generation device according to an embodiment of the present application, such as Figure 4 As shown, the device includes:

[0058] An acquisition module 402 is used to acquire light data collected by a collection device;

[0059] A classification module 404 is used to classify the optical data according to its type to obtain multiple types of optical data;

[0060] A calculation module 406 is configured to calculate the multiple types of light data using a preset function to obtain multiple calculation results corresponding to the multiple types of light data;

[0061] The determination module 408 is used to select data of target length from multiple calculation results, perform permutations and combinations, obtain target data, and determine the target data as key data.

[0062] In the above-mentioned key generation device, due to the refraction angle of light in different time periods and the different media in the air, the angles of refracted light, reflected light and incident light are different. When performing calculations, various conditions such as the angle of refracted light, the angle of incident light, the angle of reflected light, the speed of light, etc. are comprehensively considered to obtain multiple types of light data. The multiple types of light data are substituted into the preset function for calculation to obtain the final target data.

[0063] In the acquisition module in the above-mentioned key generation device, the light data collected by the acquisition device is acquired, which specifically includes the following processes: sending a first acquisition instruction to the first acquisition device, wherein the first acquisition instruction is used to control the first acquisition device to determine the incident point of light; sending a second acquisition instruction to the second acquisition device, wherein the second acquisition instruction is used to control the second acquisition device to collect angle data of light; and determining the light data based on the incident point and the angle data.

[0064] In an optional embodiment, light data is collected and transmitted by N light-sensing collection devices distributed in different areas. The light-sensing collection devices include a first collection device and a second collection device. The first collection device can be, for example, a ground device, which is used to capture and calculate the incident point of light. The second collection device can be, for example, an aerial device, which is used to capture the angle data of incidence, reflection, and refraction of light. Each time light data is collected, the light-sensing devices distributed in various places will transmit light data. The light data includes at least the current timestamp and multiple light data such as the angle of refracted light, the angle of incident light, and the angle of reflected light. The collection device transmits the collected light data to the processor, which processes the light data to obtain the target data.

[0065] In another optional embodiment, a collection frequency may be set in the collection device, and the collection device automatically collects light data according to the set collection frequency without receiving a collection instruction sent by the processor.

[0066] In the acquisition module in the above-mentioned key generation device, the light data collected by the acquisition device is obtained, which specifically includes the following processes: obtaining the first time corresponding to the incident point of the light determined by the first acquisition device; obtaining the second time corresponding to the angle data of the light collected by the second acquisition device; obtaining the distance between the first acquisition device and the second acquisition device; determining the propagation speed of the light based on the first time, the second time and the distance; determining the wavelength of the light based on the propagation speed of the light and the frequency of the light, wherein the light data includes the propagation speed and the wavelength.

[0067] In an optional embodiment, the acquisition device also needs to obtain the propagation speed of light. Specifically, the time when the first acquisition device (such as a ground device) determines the incident point of the light is used as the first time, and the time when the second acquisition device (such as an aerial device) collects the light (i.e., the time when the above-mentioned light angle data is collected) is used as the second time. In an optional embodiment, when collecting light data at the same time, one first acquisition device can be used, and multiple second acquisition devices can be used. The second acquisition devices are used to collect incident light, reflected light, and refracted light respectively. Then, based on the collected time corresponding to the incident light, the time corresponding to the reflected light, and the time corresponding to the refracted light, multiple second times are determined. That is, the above-mentioned second time includes the second time corresponding to the collection of incident light, the second time corresponding to the collection of reflected light, and the second time corresponding to the collection of refracted light. In the above embodiment, it is necessary to determine the distance between the first acquisition device and the multiple second acquisition devices respectively. For example, the distance between the first acquisition device and the second acquisition device collecting incident light is the first distance, the distance between the first acquisition device and the second acquisition device collecting reflected light is the second distance, and the distance between the first acquisition device and the second acquisition device collecting refracted light is the third distance. The propagation speed of light is calculated according to the calculation formula between distance, time, and speed. For example, the propagation time of the incident light is determined based on the absolute value of the difference between the second time and the first time corresponding to the incident light, and the propagation velocity of the incident light is then determined based on the first distance and the propagation time of the incident light. Similarly, the propagation time of the reflected light is determined based on the absolute value of the difference between the second time and the first time corresponding to the reflected light, and the propagation velocity of the reflected light is then determined based on the second distance and the propagation time of the reflected light. Similarly, the propagation time of the refracted light is determined based on the absolute value of the difference between the second time and the first time corresponding to the refracted light, and the propagation velocity of the refracted light is then determined based on the third distance and the propagation time of the refracted light.

[0068] Since the frequency of light remains constant during transmission, the wavelength of light can be calculated using the formula between the propagation speed, frequency, and wavelength of light. Specifically, the wavelength of the incident light can be obtained from the propagation speed and frequency of the incident light, the wavelength of the reflected light can be obtained from the propagation speed and frequency of the reflected light, and the wavelength of the refracted light can be obtained from the propagation speed and wavelength of the refracted light. The calculated propagation speed and wavelength of light are stored as optical data.

[0069] In the division module in the above-mentioned key generation device, multiple categories of optical data include incident light data, reflected light data and refracted light data. The optical data are divided according to their types to obtain multiple categories of optical data, which specifically includes the following processes: dividing the optical data according to the incident light to obtain the first category of optical data, wherein the first category of optical data at least includes the angle between the incident light and the normal, the wavelength of the incident light and the propagation speed of the incident light; dividing the optical data according to the reflected light to obtain the second category of optical data, wherein the second category of optical data at least includes the angle between the reflected light and the normal, the wavelength of the reflected light and the propagation speed of the reflected light; dividing the optical data according to the refracted light to obtain the third category of optical data, wherein the third category of optical data at least includes the angle between the refracted light and the normal, the wavelength of the refracted light and the propagation speed of the refracted light.

[0070] In an optional embodiment, the incidence, refraction, and reflection of light are collected in multiple locations in combination with different regional differences and time differences, and three types of data are collected each time. Each type of light data is stored in the following categories: a) The first type of light data is incident light data, including: {the angle between the incident light and the normal, the wavelength of the incident light, and the propagation speed of the incident light}; b) The second type of light data is reflected light data, including: {the angle between the reflected light and the normal, the wavelength of the reflected light, and the propagation speed of the reflected light}; c) The third type of data is refracted light data, including: {the angle between the refracted light and the normal, the wavelength of the refracted light, and the propagation speed of the refracted light}.

[0071] In the calculation module in the above-mentioned key generation device, multiple types of light data are calculated respectively by preset functions to obtain multiple calculation results corresponding to the multiple types of light data, which specifically includes the following processes: receiving an input instruction of the target object and determining the constant term in the preset function; substituting the angle between the incident light and the normal, the wavelength of the incident light and the propagation speed of the incident light in the first type of light data into the preset function for calculation, to obtain a first calculation result corresponding to the first type of light data; substituting the angle between the reflected light and the normal, the wavelength of the reflected light and the propagation speed of the reflected light in the second type of light data into the preset function for calculation, to obtain a second calculation result corresponding to the second type of light data; substituting the angle between the refracted light and the normal, the wavelength of the refracted light and the propagation speed of the refracted light in the third type of light data into the preset function for calculation, to obtain a third calculation result corresponding to the third type of light data.

[0072] In an optional embodiment, the storage form of the above three types of optical data can be, for example: {a1, b1, s1}, {a2, b2, s2}, {a3, b3, s3}, a1 can be expressed as the angle between the incident light and the normal, b1 can be expressed as the wavelength of the incident light, c1 can be expressed as the propagation speed of the incident light, a2 can be expressed as the angle between the reflected light and the normal, b2 can be expressed as the wavelength of the reflected light, c2 can be expressed as the propagation speed of the reflected light, a3 can be expressed as the angle between the refracted light and the normal, b3 can be expressed as the wavelength of the refracted light, and c3 can be expressed as the propagation speed of the refracted light.

[0073] In an optional embodiment, the preset function obtained after receiving the input instruction of the target object is as follows:

[0074] G=a+a^3 / 3+2a^5 / 15+17a^7 / 315+62a^9 / 2+[2^(2b)*(2^(2b)-1)*s1(2b-1)*

[0075] x^(2b-1)] / (2b)! +.(|a|<π / 2)

[0076] Among them, G represents the calculation result, a represents the angle between light and the normal, b represents the wavelength of light, and c represents the propagation speed of light. In the actual calculation process, a can be substituted for a1, a2, a3, b can be substituted for b1, b2, b3, and c can be substituted for c1, c2, c3.

[0077] It should be noted that the data used in the calculation must be of the same type of light. For example, when calculating the calculation result G1 corresponding to the incident light, a1, b1, and c in the above preset function are used, respectively. When calculating the calculation result G2 corresponding to the reflected light, a2, b2, and c2 in the above preset function are used, respectively. When calculating the calculation result G3 corresponding to the refracted light, a3, b3, and c3 in the above preset function are used, respectively.

[0078] In the determination module in the above-mentioned key generation device, data of a target length are selected from multiple calculation results for arrangement and combination to obtain target data, which specifically includes the following process: when the length of the target calculation result is greater than the preset length, the target calculation result is divided into multiple groups to obtain multiple groups of data, wherein the target calculation result is any one of the multiple calculation results; one data is selected from each group of data according to a first preset order for combination to obtain data of the target length; the data of the target length corresponding to the multiple calculation results are combined according to a second preset order to obtain the target data.

[0079] In the determination module in the above-mentioned key generation device, the determination module is also used to obtain an identifier corresponding to the target calculation result when the length of the target calculation result is less than a preset length; and combine the identifier and the target calculation result to obtain data of the target length.

[0080] In an optional embodiment, Figure 3 The schematic diagram shown in FIG. 1 illustrates the steps performed by the above-mentioned determination module. Figure 3 In the example, the first calculation result G1 is 879382739, the second calculation result G2 is 18, and the third calculation result G3 is 7847982987. Any one of the first, second, and third calculation results is the target calculation result. Taking the first calculation result as an example, the first calculation result is divided into multiple groups of data. The division results are: first group data: 879, second group data: 382, ​​and third group data: 739. A data item is selected from each group of data, for example, 8 is selected from the first group of data, 2 is selected from the second group of data, and 9 is selected from the third group of data. After combining them according to a first preset order, the data of the first target length of 982 is obtained. In an optional embodiment, the first preset order can also be a random order. When dividing the second calculation result, if the length of the second calculation result is less than the preset length, which can be set to 6, for example, it is necessary to obtain the identifier corresponding to the second calculation result, that is, G2. The identifier and the second calculation result are combined. For example, the random combination results in data of the second target length of 81G2. When the third calculation result is divided into multiple groups of data, the division results can be the first group of data: 784, the second group of data: 7982, and the third group of data: 987. One data item is selected from each group of data, for example, 4 is selected from the first group of data, 2 is selected from the second group of data, and 7 is selected from the third group of data. The data of the third target length 274 is obtained by combining them in a first preset order or a random order. The data of the first target length, the data of the second target length, and the data of the third target length are combined in a second preset order or a random order to obtain the target data G298218247. It should be noted that when the target data is obtained by random combination, the data of the first target length 982, the data of the second target length 81G2, and the data of the third target length 274 can be shuffled and reassembled to obtain the target data. This target data is a set of time-sensitive random number key data.

[0081] It should be noted that Figure 4 The key generating device shown is used to perform Figure 2 The key generation method shown in the figure, therefore the relevant explanations in the above key generation method are also applicable to the key generation device and will not be repeated here.

[0082] An embodiment of the present application also provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the following key generation method by running the computer program: obtaining light data collected by an acquisition device; dividing the light data according to its type to obtain multiple categories of light data; calculating the multiple categories of light data respectively through preset functions to obtain multiple calculation results corresponding to the multiple categories of light data; selecting data of a target length from the multiple calculation results, and performing permutations and combinations to obtain target data, and determining the target data as key data.

[0083] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0084] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0085] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, 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, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0086] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0087] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0088] If the 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 storage medium. 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 storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0089] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A key generation method, characterized in that: include: Obtaining light data collected by a collection device; Classifying the optical data according to their types to obtain multiple types of optical data; Calculating the multiple types of light data respectively using a preset function to obtain multiple calculation results corresponding to the multiple types of light data; Selecting data of target lengths from the plurality of calculation results, performing permutations and combinations thereof, to obtain target data, and determining the target data as key data; The multiple categories of light data include incident light data, reflected light data, and refracted light data. The light data are divided according to their types to obtain multiple categories of light data, including: dividing the light data according to incident light to obtain a first category of light data, wherein the first category of light data at least includes the angle between the incident light and the normal, the wavelength of the incident light, and the propagation speed of the incident light; dividing the light data according to reflected light to obtain a second category of light data, wherein the second category of light data at least includes the angle between the reflected light and the normal, the wavelength of the reflected light, and the propagation speed of the reflected light; dividing the light data according to refracted light to obtain a third category of light data, wherein the third category of light data at least includes the angle between the refracted light and the normal, the wavelength of the refracted light, and the propagation speed of the refracted light.

2. The method according to claim 1, characterized in that Obtain light data collected by the acquisition device, including: Sending a first acquisition instruction to a first acquisition device, wherein the first acquisition instruction is used to control the first acquisition device to determine an incident point of light; Sending a second acquisition instruction to a second acquisition device, wherein the second acquisition instruction is used to control the second acquisition device to collect angle data of light; The light data is determined according to the incident point and the angle data.

3. The method according to claim 2, characterized in that Obtain light data collected by the acquisition device, including: Acquire a first time corresponding to the incident point of light determined by the first acquisition device; Acquire a second time corresponding to the angle data of light collected by the second collection device; Acquire the distance between the first acquisition device and the second acquisition device; determining a propagation speed of light based on the first time, the second time, and the distance; The wavelength of the light is determined according to the propagation speed of the light and the frequency of the light, wherein the light data includes the propagation speed and the wavelength.

4. The method according to claim 1, wherein Calculating the multiple types of light data respectively using a preset function to obtain multiple calculation results corresponding to the multiple types of light data, including: receiving an input instruction from a target object and determining a constant term in the preset function; Substituting the angle between the incident light and the normal, the wavelength of the incident light, and the propagation speed of the incident light in the first type of light data into the preset function for calculation, to obtain a first calculation result corresponding to the first type of light data; Substituting the angle between the reflected light and the normal, the wavelength of the reflected light, and the propagation speed of the reflected light in the second type of light data into the preset function for calculation, to obtain a second calculation result corresponding to the second type of light data; Substitute the angle between the refracted light and the normal, the wavelength of the refracted light, and the propagation speed of the refracted light in the third type of light data into the preset function for calculation to obtain a third calculation result corresponding to the third type of light data.

5. The method according to claim 4, characterized in that Selecting data of target length from the multiple calculation results and performing permutations and combinations to obtain target data includes: In the case where the length of the target calculation result is greater than a preset length, dividing the target calculation result into multiple groups to obtain multiple groups of data, wherein the target calculation result is any one of the multiple calculation results; Selecting one data from each set of data and combining them according to a first preset order to obtain data of the target length; The target length data corresponding to the plurality of calculation results are combined in a second preset order to obtain the target data.

6. The method according to claim 5, characterized in that The method further comprises: When the length of the target calculation result is less than the preset length, obtaining an identifier corresponding to the target calculation result; The identifier and the target calculation result are combined to obtain data of the target length.

7. A key generation device, characterized in that: include: An acquisition module, used to acquire light data collected by an acquisition device; a classification module, configured to classify the optical data according to its type to obtain multiple types of optical data; The multiple types of light data include incident light data, reflected light data, and refracted light data. The light data are divided according to their types to obtain the multiple types of light data, including: dividing the light data according to incident light to obtain first type of light data, wherein the first type of light data at least includes the angle between the incident light and the normal, the wavelength of the incident light, and the propagation speed of the incident light; dividing the light data according to reflected light to obtain second type of light data, wherein the second type of light data at least includes the angle between the reflected light and the normal, the wavelength of the reflected light, and the propagation speed of the reflected light; dividing the light data according to refracted light to obtain third type of light data, wherein the third type of light data at least includes the angle between the refracted light and the normal, the wavelength of the refracted light, and the propagation speed of the refracted light; a calculation module, configured to calculate the plurality of types of light data respectively using a preset function to obtain a plurality of calculation results corresponding to the plurality of types of light data; The determination module is used to select data of target length from the multiple calculation results, perform permutations and combinations, obtain target data, and determine the target data as key data.

8. An electronic device, characterized in that: include: a memory for storing program instructions; a processor, connected to the memory, and configured to execute program instructions that implement the following functions: acquiring light data collected by a collection device; classifying the light data according to its type to obtain multiple types of light data; performing calculations on the multiple types of light data using a preset function to obtain multiple calculation results corresponding to the multiple types of light data; selecting data of a target length from the multiple calculation results, performing permutations and combinations, and obtaining target data, and determining the target data as key data; The multiple categories of light data include incident light data, reflected light data, and refracted light data. The light data are divided according to their types to obtain multiple categories of light data, including: dividing the light data according to incident light to obtain a first category of light data, wherein the first category of light data at least includes the angle between the incident light and the normal, the wavelength of the incident light, and the propagation speed of the incident light; dividing the light data according to reflected light to obtain a second category of light data, wherein the second category of light data at least includes the angle between the reflected light and the normal, the wavelength of the reflected light, and the propagation speed of the reflected light; dividing the light data according to refracted light to obtain a third category of light data, wherein the third category of light data at least includes the angle between the refracted light and the normal, the wavelength of the refracted light, and the propagation speed of the refracted light.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the key generation method according to any one of claims 1 to 6 by running the computer program.

Citation Information

Patent Citations

  • Dynamic key generation method and device, storage medium and electronic device

    CN114268436A