A method and apparatus for generating encrypted data, an electronic device, and a storage medium

By generating encrypted data through splitting and quadratic surface formulas, and combining timestamps and byte streams, the problem of existing encryption methods being easily cracked is solved, achieving higher-security encryption processing.

CN115481416BActive Publication Date: 2026-05-19CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD
Filing Date
2022-09-01
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing password encryption methods are easily cracked, increasing the risk of user information leakage. How can we improve the security of encrypted data?

Method used

By acquiring the data to be encrypted, the first time information, and the second time information, the data is split according to a preset ratio to generate multiple sub-encrypted data. The encrypted data is then generated using the single-leaf hyperboloid formula in quadratic surfaces and encrypted by combining timestamps and byte streams.

Benefits of technology

It enhances the security of encrypted data, strengthens the protection of encrypted data, prevents reverse engineering, and ensures the security and privacy of user information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115481416B_ABST
    Figure CN115481416B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of encrypted data generation method, device, electronic equipment and storage medium, by obtaining to-be-encrypted data, first time information and second time information;According to the preset proportion, the to-be-encrypted data is split, to generate first sub to-be-encrypted data and second sub to-be-encrypted data;Using the first sub to-be-encrypted data and the first time information generates first sub encrypted data;Using the second sub to-be-encrypted data and the second time information generates second sub encrypted data;Through the to-be-encrypted data generates third sub encrypted data;Using the first sub encrypted data, the second sub encrypted data and the third sub encrypted data generate encrypted data based on single leaf hyperboloid formula in quadratic surface, to realize in the encryption process, the security of to-be-encrypted data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data encryption technology, and in particular to an encrypted data generation method, an encrypted data generation device, an electronic device, and a computer-readable storage medium. Background Technology

[0002] With the development of computer and internet technology, a large amount of people's sensitive personal information has been collected and stored in many social public service fields such as finance, telecommunications, transportation, medical care, property management, accommodation services, and express delivery.

[0003] Therefore, how to encrypt sensitive information to improve its security is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] The present invention provides an encrypted data generation method, apparatus, electronic device, and computer-readable storage medium to address the problem of improving the security of data to be encrypted during the encryption process.

[0005] This invention discloses a method for generating encrypted data, which may include:

[0006] Obtain the data to be encrypted, first-time information, and second-time information;

[0007] The data to be encrypted is split according to a preset ratio to generate a first sub-data to be encrypted and a second sub-data to be encrypted.

[0008] The first sub-encrypted data is generated using the first sub-data to be encrypted and the first time information;

[0009] The second sub-encrypted data is generated using the second sub-data to be encrypted and the second time information;

[0010] A third sub-encrypted data is generated from the data to be encrypted;

[0011] Encrypted data is generated based on the formula for a single-leaf hyperboloid in a quadratic surface using the first sub-encrypted data, the second sub-encrypted data, and the third sub-encrypted data.

[0012] Optionally, the first time information is a timestamp in milliseconds, and the step of generating the first sub-encrypted data using the first sub-data to be encrypted and the first time information may include:

[0013] The first sub-data to be encrypted and the timestamp millisecond value are concatenated to generate the first sub-encrypted data.

[0014] Optionally, the second time information is a timestamp in days, and the step of generating the second sub-encrypted data using the second sub-data to be encrypted and the second time information may include:

[0015] The second sub-data to be encrypted is concatenated with the timestamp day value to generate the second sub-encrypted data.

[0016] Optionally, the data to be encrypted is a string, and the step of generating third sub-encrypted data from the data to be encrypted may include:

[0017] The string is converted into a byte stream, and the byte stream is used as the third sub-encrypted data.

[0018] Optionally, the first time information and the second time information are the time information when the data to be encrypted was acquired.

[0019] This invention also discloses an encrypted data generation apparatus, which may include:

[0020] The module for acquiring data to be encrypted is used to acquire the data to be encrypted, first-time information, and second-time information.

[0021] The data to be encrypted splitting module is used to split the data to be encrypted according to a preset ratio to generate a first sub-data to be encrypted and a second sub-data to be encrypted.

[0022] The first sub-encrypted data generation module is used to generate first sub-encrypted data using the first sub-encrypted data and the first time information;

[0023] The second sub-encrypted data generation module is used to generate second sub-encrypted data using the second sub-encrypted data and the second time information;

[0024] The third sub-encrypted data generation module is used to generate third sub-encrypted data from the data to be encrypted;

[0025] An encrypted data generation module is used to generate encrypted data based on the formula for a single-leaf hyperboloid in a quadratic surface using the first sub-encrypted data, the second sub-encrypted data, and the third sub-encrypted data.

[0026] Optionally, the first time information is a timestamp in milliseconds, and the first sub-encrypted data generation module may include:

[0027] The first sub-encrypted data generation submodule is used to concatenate the first sub-encrypted data and the timestamp millisecond value to generate the first sub-encrypted data.

[0028] Optionally, the second time information is a timestamp in days, and the second sub-encrypted data generation module may include:

[0029] The second sub-encrypted data generation submodule is used to concatenate the second sub-encrypted data and the timestamp day value to generate the second sub-encrypted data.

[0030] Optionally, the data to be encrypted is a string, and the third sub-encrypted data generation module may include:

[0031] The third sub-encrypted data generation submodule is used to convert the string into a byte stream and use the byte stream as the third sub-encrypted data.

[0032] Optionally, the first time information and the second time information are the time information when the data to be encrypted was acquired.

[0033] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0034] The memory is used to store computer programs;

[0035] When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.

[0036] This invention also discloses a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.

[0037] The embodiments of the present invention have the following advantages:

[0038] In this embodiment of the invention, the security of the data to be encrypted is improved during the encryption process by acquiring the data to be encrypted, first time information, and second time information; splitting the data to be encrypted according to a preset ratio to generate first sub-data to be encrypted and second sub-data to be encrypted; generating first sub-encrypted data using the first sub-data to be encrypted and the first time information; generating second sub-encrypted data using the second sub-data to be encrypted and the second time information; generating third sub-encrypted data using the data to be encrypted; and generating encrypted data based on the formula for a hyperboloid in a quadratic surface using the first sub-encrypted data, the second sub-encrypted data, and the third sub-encrypted data. Attached Figure Description

[0039] Figure 1 This is a flowchart of the steps of an encrypted data generation method provided in an embodiment of the present invention;

[0040] Figure 2This is a flowchart of another encrypted data generation method provided in an embodiment of the present invention;

[0041] Figure 3 This is a structural block diagram of an encrypted data generation device provided in an embodiment of the present invention;

[0042] Figure 4 This is a hardware structure block diagram of an electronic device provided in various embodiments of the present invention. Detailed Implementation

[0043] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0044] In today's information age, internet technology is no longer unfamiliar. However, as user information is increasingly used online, the risk of information leakage is also increasing. If a user accidentally discloses their password during registration, it can have significant negative consequences, such as account theft leading to financial losses. Therefore, how to encrypt passwords has become a problem that those skilled in the art need to overcome. However, in practical applications, most existing password encryption methods use common methods, which are susceptible to cracking. This invention provides an encrypted data generation method, an encrypted data generation device, an electronic device, and a computer-readable storage medium. By combining byte streams and timestamps, and based on the hyperboloid formula in quadratic surfaces, the password is split and encrypted to improve the security of the data to be encrypted.

[0045] Reference Figure 1 The diagram illustrates a flowchart of an encrypted data generation method provided in an embodiment of the present invention, which may specifically include the following steps:

[0046] Step 101: Obtain the data to be encrypted, the first time information, and the second time information;

[0047] Step 102: Split the data to be encrypted according to a preset ratio to generate a first sub-data to be encrypted and a second sub-data to be encrypted;

[0048] Step 103: Generate first sub-encrypted data using the first sub-data to be encrypted and the first time information;

[0049] Step 104: Generate second sub-encrypted data using the second sub-data to be encrypted and the second time information;

[0050] Step 105: Generate third sub-encrypted data using the data to be encrypted;

[0051] Step 106: Generate encrypted data based on the formula for a single-leaf hyperboloid in a quadratic surface using the first sub-encrypted data, the second sub-encrypted data, and the third sub-encrypted data.

[0052] In a specific implementation, the data to be encrypted in this embodiment of the invention can be a user password.

[0053] In practical applications, a user password can be a string of characters. For example, the string "abc123." can be used as a user password.

[0054] In practical applications, to improve the immediacy of encryption, real-time information can be used. Therefore, in an optional embodiment of the present invention, the first time information and the second time information can be time information at the time of acquiring the data to be encrypted, and the first time information and the second time information can be different time information. For example, when acquiring the data to be encrypted, an instant timestamp for the data to be encrypted can be generated. This instant timestamp can express the time when the data to be encrypted was acquired, and then the instant timestamp can be used as time information. Specifically, the instant timestamp can be a millisecond-level timestamp containing millisecond values ​​or a timestamp containing dates, etc. That is, the first time information can be a microsecond value or a millisecond value. The first time information can be expressed in units of time such as centiseconds, minutes, seconds, minutes, hours, days, weeks, months, and years. Similarly, the second time information can also be expressed in units of time such as microseconds, milliseconds, centiseconds, minutes, seconds, minutes, hours, days, weeks, months, and years. However, the first time information is different from the second time information. For example, in a timestamp, if the first time information is the timestamp millisecond value, then the second timestamp is the day value. Of course, the above examples are only examples, and those skilled in the art can use any unit of time as the first or second time information. In this regard, the embodiments of the present invention do not limit this.

[0055] Of course, the first time information and the second time information can also be any other time information. For example, when acquiring data to be encrypted, a timestamp for the data to be encrypted can be generated. This timestamp can represent any time, and then the timestamp is used as time information. Specifically, the timestamp can be a millisecond-level timestamp containing a millisecond value or a timestamp containing a date, etc. This embodiment of the invention does not limit this.

[0056] In a specific implementation, the embodiments of the present invention can split the data to be encrypted according to a preset ratio. For example, the user password can be a string "abc123." composed of characters. Then, "abc123." can be split into two parts according to a percentage. The first part is 60% of the percentage, and the second part is 40% of the percentage. That is, the first part is "abc1" and the second part is "23." Then, the first part "abc1" can be used as the first sub-data to be encrypted, and the second part "23." can be used as the second sub-data to be encrypted.

[0057] Of course, the above examples are merely illustrative. Those skilled in the art can use any other percentage value to split the data to be encrypted, thereby generating the first sub-data to be encrypted and the second sub-data to be encrypted. In this regard, the embodiments of the present invention do not impose any limitations.

[0058] After obtaining the first time information and generating the first sub-data to be encrypted, embodiments of the present invention can use the first sub-data to be encrypted and the first time information to generate the first sub-encrypted data.

[0059] In a specific implementation, the embodiments of the present invention can extract the time value of the first time information, for example, extract the millisecond value of the instant timestamp, assuming that the millisecond value is 11658120633856, and use this as the first time information. The first sub-data to be encrypted is "abc1". Therefore, the embodiments of the present invention can concatenate the first sub-data to be encrypted and the first time information to generate the first sub-encrypted data abc11658120633856.

[0060] After obtaining the second time information and generating the second sub-data to be encrypted, embodiments of the present invention can use the second sub-data to be encrypted and the second time information to generate the second sub-encrypted data.

[0061] In a specific implementation, the embodiments of the present invention can extract the time value of the second time information, for example, extract the number of days of the instant timestamp, assuming that the number of days is 319853, and use this as the second time information. The second sub-data to be encrypted is "23." Therefore, the embodiments of the present invention can concatenate the second sub-data to be encrypted and the second time information to generate the second sub-encrypted data 23.319853.

[0062] In this embodiment of the invention, a third sub-encrypted data can be generated from the data to be encrypted. Specifically, the third sub-encrypted data can be encrypted data that is different from the first and second sub-encrypted data. For example, if the data to be encrypted is "abc123.", "abc123." can be directly used as the third sub-encrypted data, or "abc123." can be converted into other strings through any algorithm. These strings can be different from both the first and second sub-encrypted data.

[0063] After generating the first sub-encrypted data, the second sub-encrypted data, and the third sub-encrypted data, embodiments of the present invention can use the first sub-encrypted data, the second sub-encrypted data, and the third sub-encrypted data to generate encrypted data based on the formula for a single-leaf hyperboloid in a quadratic surface.

[0064] In practical implementation, the formula for a hyperboloid with one sheet in a quadratic surface is as follows:

[0065]

[0066] Where a, b, and c can be constants. In this embodiment of the invention, the first sub-encrypted data can be used as the x value, the second sub-encrypted data as the y value, and the third sub-encrypted data as the z value, and then the encrypted data H can be calculated.

[0067] In this embodiment of the invention, the security of the data to be encrypted is improved during the encryption process by acquiring the data to be encrypted, first time information, and second time information; splitting the data to be encrypted according to a preset ratio to generate first sub-data to be encrypted and second sub-data to be encrypted; generating first sub-encrypted data using the first sub-data to be encrypted and the first time information; generating second sub-encrypted data using the second sub-data to be encrypted and the second time information; generating third sub-encrypted data using the data to be encrypted; and generating encrypted data based on the formula for a hyperboloid in a quadratic surface using the first sub-encrypted data, the second sub-encrypted data, and the third sub-encrypted data.

[0068] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.

[0069] In an optional embodiment of the present invention, the first time information is a timestamp in milliseconds, and the step of generating the first sub-encrypted data using the first sub-data to be encrypted and the first time information includes:

[0070] The first sub-data to be encrypted and the timestamp millisecond value are concatenated to generate the first sub-encrypted data.

[0071] In practical applications, the stronger the randomness of the generated encrypted data, the stronger the security of the data to be encrypted. Shorter time units tend to correspond to higher randomness in time information. For example, if two different pieces of data to be encrypted are obtained on the same day, and the timestamp is in days, then the time information corresponding to these two pieces of data to be encrypted will be the same. If the timestamp is in seconds, even if two different pieces of data to be encrypted are obtained on the same day, the time information of these two pieces of data to be encrypted will most likely not be the same.

[0072] As can be seen from the above, millisecond-level time values ​​often have high randomness. In specific implementations, the first time information in this embodiment of the invention can be a timestamp millisecond value. This embodiment of the invention can concatenate the first sub-data to be encrypted and the timestamp millisecond value to generate the first sub-encrypted data. For example, the first sub-data to be encrypted is "abc1", and the timestamp millisecond value is 11658120633856. Therefore, this embodiment of the invention can concatenate the first sub-data to be encrypted and the first time information to generate the first sub-encrypted data abc11658120633856.

[0073] This invention improves the randomness of the first sub-encrypted data and further enhances the security of the data to be encrypted by concatenating the first sub-encrypted data with the timestamp millisecond value.

[0074] In an optional embodiment of the present invention, the second time information is a timestamp in days, and the step of generating the second sub-encrypted data using the second sub-data to be encrypted and the second time information includes:

[0075] The second sub-data to be encrypted is concatenated with the timestamp day value to generate the second sub-encrypted data.

[0076] In practical applications, to enhance the randomness of encrypted data, different time information can be used to generate encrypted data. In actual production, data is usually archived and saved using days as the time unit. Therefore, in this embodiment of the invention, when acquiring data to be encrypted, a timestamp for the data to be encrypted is generated, and the number of days of the timestamp is taken as the second time information. Then, the second sub-data to be encrypted and the number of days of the timestamp are concatenated to generate the second sub-encrypted data. For example, if the number of days of the timestamp is 319853 and the second sub-data to be encrypted is "23.", then this embodiment of the invention can concatenate the second sub-data to be encrypted and the second time information to generate the second sub-encrypted data 23.319853.

[0077] In this embodiment of the invention, the security of the data to be encrypted is further improved by concatenating the second sub-data to be encrypted and the timestamp day value to generate the second sub-encrypted data.

[0078] In an optional embodiment of the present invention, the data to be encrypted is a string, and the step of generating third sub-encrypted data from the data to be encrypted includes:

[0079] The string is converted into a byte stream, and the byte stream is used as the third sub-encrypted data.

[0080] In practical applications, generating encrypted data with a fixed number of bits may pose a risk of reverse engineering. Therefore, this embodiment of the invention can convert the string into a byte stream and use the byte stream as the third sub-encrypted data. For example, the obtained data to be encrypted, “abc123.”, can be converted into the byte stream “dfdfa35afas21asadas9dskjasfas0w236faasas2355z2asdaas2df94sdasd2123123asda1szc... (the following part is omitted)”, and this byte stream can be used as the third sub-encrypted data.

[0081] For example, embodiments of the present invention can convert a string into a byte stream using the following code:

[0082]

[0083]

[0084]

[0085]

[0086]

[0087] Of course, the above examples are merely illustrative. Those skilled in the art can use other methods to convert strings into byte streams according to actual needs. In this regard, the embodiments of the present invention do not impose any limitations.

[0088] In this embodiment of the invention, by converting the string into a byte stream and using the byte stream as the third sub-encrypted data, the third sub-encrypted data becomes an infinite-length non-cyclic character stream, thus preventing the encrypted data from being reverse-engineered and further improving the security of the data to be encrypted.

[0089] To enable those skilled in the art to better understand the embodiments of the present invention, a complete example is provided below to illustrate the embodiments of the present invention.

[0090] refer to Figure 2 , Figure 2This is a flowchart of another encrypted data generation method provided in this embodiment of the invention. When the user enters a password (the password consists of letters, numbers, and underscores), the password is obtained. This password is in string form, for example: "abc123.". The obtained password is split into two parts according to a percentage: the first part is 60% and the second part is 40%. For example, the password "abc123." 60% = "abc1", 40% = "23.". The first part of the string is concatenated with the current timestamp in milliseconds to obtain a new string. This new string is used as A in the formula for a hyperboloid of one leaf in quadratic surfaces. For example, the password for 60% is: abc1 + the current timestamp in milliseconds: 11658120633856, resulting in: abc11658120633856. The second part of the string is concatenated with the current timestamp in days to obtain a new string. This new string is used as B in the formula for a hyperboloid of one leaf in quadratic surfaces. For example: 40% of the password: 23. + the current timestamp of days: 319853. The result is: 23.319853. The obtained password string ("abc123.") is converted into a byte stream (dfdfa35afas21asadas9dskjasfas0w236faasas2355z2asdaas2df94sdasd2123123asda1szc.........(the following is omitted)). The byte stream is used as C in the formula for a hyperboloid of one leaf in quadratic surface. A is used as X, B as Y, and C as Z in the formula. The formula is called to obtain H, which is the final encrypted password result.

[0091] Formula for a hyperboloid with one sheet in a quadratic surface:

[0092]

[0093] Compared to existing encryption technologies, the encryption technology in this invention is irreversible, thus providing greater security and ensuring the safety of user identity information, thereby greatly improving data security and user privacy.

[0094] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0095] Reference Figure 3The diagram shows a structural block diagram of an encrypted data generation device provided in an embodiment of the present invention, which may specifically include the following modules:

[0096] The module 301 for acquiring data to be encrypted is used to acquire the data to be encrypted, first time information, and second time information.

[0097] The data to be encrypted splitting module 302 is used to split the data to be encrypted according to a preset ratio to generate a first sub-data to be encrypted and a second sub-data to be encrypted.

[0098] The first sub-encrypted data generation module 303 is used to generate first sub-encrypted data using the first sub-encrypted data and the first time information;

[0099] The second sub-encrypted data generation module 304 is used to generate second sub-encrypted data using the second sub-encrypted data and the second time information;

[0100] The third sub-encrypted data generation module 305 is used to generate third sub-encrypted data from the data to be encrypted;

[0101] The encrypted data generation module 306 is used to generate encrypted data based on the formula for a single-leaf hyperboloid in a quadratic surface using the first sub-encrypted data, the second sub-encrypted data, and the third sub-encrypted data.

[0102] Optionally, the first time information is a timestamp in milliseconds, and the first sub-encrypted data generation module may include:

[0103] The first sub-encrypted data generation submodule is used to concatenate the first sub-encrypted data and the timestamp millisecond value to generate the first sub-encrypted data.

[0104] Optionally, the second time information is a timestamp in days, and the second sub-encrypted data generation module may include:

[0105] The second sub-encrypted data generation submodule is used to concatenate the second sub-encrypted data and the timestamp day value to generate the second sub-encrypted data.

[0106] Optionally, the data to be encrypted is a string, and the third sub-encrypted data generation module may include:

[0107] The third sub-encrypted data generation submodule is used to convert the string into a byte stream and use the byte stream as the third sub-encrypted data.

[0108] Optionally, the first time information and the second time information are the time information when the data to be encrypted was acquired.

[0109] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0110] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described encrypted data generation method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0111] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described encrypted data generation method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0112] Figure 4 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0113] The electronic device 400 includes, but is not limited to, components such as: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, a processor 410, and a power supply 411. Those skilled in the art will understand that... Figure 4 The electronic device structures shown are not intended to limit the electronic device. An electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. In embodiments of the present invention, the electronic device includes, but is not limited to, mobile phones, tablet computers, laptops, PDAs, in-vehicle terminals, wearable devices, and pedometers.

[0114] It should be understood that, in this embodiment of the invention, the radio frequency unit 401 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink data from the base station and processes it with the processor 410; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. Furthermore, the radio frequency unit 401 can also communicate with networks and other devices through a wireless communication system.

[0115] The electronic device provides users with wireless broadband internet access through network module 402, such as helping users send and receive emails, browse web pages, and access streaming media.

[0116] The audio output unit 403 can convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into audio signals and output them as sound. Furthermore, the audio output unit 403 can also provide audio output related to specific functions performed by the electronic device 400 (e.g., call signal reception sound, message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, and a receiver, etc.

[0117] Input unit 404 is used to receive audio or video signals. Input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042. The GPU 4041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on display unit 406. The image frames processed by GPU 4041 can be stored in memory 409 (or other storage medium) or transmitted via radio frequency unit 401 or network module 402. Microphone 4042 can receive sound and process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via radio frequency unit 401 in telephone call mode.

[0118] The electronic device 400 also includes at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 4061 according to the ambient light level, and the proximity sensor can turn off the display panel 4061 and / or backlight when the electronic device 400 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used to identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. The sensor 405 may also include a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be described in detail here.

[0119] The display unit 406 is used to display information input by the user or information provided to the user. The display unit 406 may include a display panel 4061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0120] User input unit 407 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of electronic devices. Specifically, user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 4071). Touch panel 4071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 410, which receives and executes commands from the processor 410. In addition, touch panel 4071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. Besides touch panel 4071, user input unit 407 may also include other input devices 4072. Specifically, other input devices 4072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.

[0121] Furthermore, the touch panel 4071 can cover the display panel 4061. When the touch panel 4071 detects a touch operation on or near it, it transmits the information to the processor 410 to determine the type of touch event. Subsequently, the processor 410 provides corresponding visual output on the display panel 4061 based on the type of touch event. Although in Figure 4 In this embodiment, the touch panel 4071 and the display panel 4061 are two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 4071 and the display panel 4061 can be integrated to realize the input and output functions of the electronic device. The specific implementation is not limited here.

[0122] Interface unit 408 serves as an interface for connecting external devices to electronic device 400. For example, external devices may include a wired or wireless headphone port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 408 can be used to receive input from external devices (e.g., data, power, etc.) and transmit the received input to one or more components within electronic device 400, or it can be used to transmit data between electronic device 400 and external devices.

[0123] The memory 409 can be used to store software programs and various data. The memory 409 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 409 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0124] The processor 410 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 409, and by calling data stored in the memory 409, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. The processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 410.

[0125] The electronic device 400 may also include a power supply 411 (such as a battery) for supplying power to various components. Preferably, the power supply 411 can be logically connected to the processor 410 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system.

[0126] In addition, the electronic device 400 includes some functional modules not shown, which will not be described in detail here.

[0127] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0129] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

[0130] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0131] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0132] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0133] The units described as separate components may or may not be physically separate. 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 network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0134] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0135] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0136] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for generating encrypted data, characterized in that, include: Obtain the data to be encrypted, first-time information, and second-time information; The data to be encrypted is split according to a preset ratio to generate a first sub-data to be encrypted and a second sub-data to be encrypted. The first sub-encrypted data is generated using the first sub-data to be encrypted and the first time information; The second sub-encrypted data is generated using the second sub-data to be encrypted and the second time information; A third sub-encrypted data is generated from the data to be encrypted; Encrypted data is generated based on the formula for a single-sheet hyperboloid in a quadratic surface using the first sub-encrypted data, the second sub-encrypted data, and the third sub-encrypted data. The formula for a single-sheet hyperboloid in the quadratic surface is as follows: Where a, b, and c are constants, the first sub-encrypted data is taken as the x value, the second sub-encrypted data as the y value, and the third sub-encrypted data as the z value, and then the encrypted data H is calculated.

2. The method according to claim 1, characterized in that, The first time information is a timestamp in milliseconds. The step of generating the first sub-encrypted data using the first sub-data to be encrypted and the first time information includes: The first sub-data to be encrypted and the timestamp millisecond value are concatenated to generate the first sub-encrypted data.

3. The method according to claim 1, characterized in that, The second time information is a timestamp in days. The step of generating the second sub-encrypted data using the second sub-data to be encrypted and the second time information includes: The second sub-data to be encrypted is concatenated with the timestamp day value to generate the second sub-encrypted data.

4. The method according to claim 1, characterized in that, The data to be encrypted is a string, and the step of generating third sub-encrypted data from the data to be encrypted includes: The string is converted into a byte stream, and the byte stream is used as the third sub-encrypted data.

5. The method according to claim 1, characterized in that, The first time information and the second time information are the time information when the data to be encrypted was acquired.

6. An encrypted data generation device, characterized in that, include: The module for acquiring data to be encrypted is used to acquire the data to be encrypted, first-time information, and second-time information. The data to be encrypted splitting module is used to split the data to be encrypted according to a preset ratio to generate a first sub-data to be encrypted and a second sub-data to be encrypted. The first sub-encrypted data generation module is used to generate first sub-encrypted data using the first sub-encrypted data and the first time information; The second sub-encrypted data generation module is used to generate second sub-encrypted data using the second sub-encrypted data and the second time information; The third sub-encrypted data generation module is used to generate third sub-encrypted data from the data to be encrypted; An encrypted data generation module is used to generate encrypted data based on the formula for a single-leaf hyperboloid in a quadratic surface using the first sub-encrypted data, the second sub-encrypted data, and the third sub-encrypted data. The formula for a single-sheet hyperboloid in the quadratic surface is as follows: Where a, b, and c are constants, the first sub-encrypted data is taken as the x value, the second sub-encrypted data as the y value, and the third sub-encrypted data as the z value, and then the encrypted data H is calculated.

7. The apparatus according to claim 6, characterized in that, The first time information is a timestamp in milliseconds, and the first sub-encrypted data generation module includes: The first sub-encrypted data generation submodule is used to concatenate the first sub-encrypted data and the timestamp millisecond value to generate the first sub-encrypted data.

8. The apparatus according to claim 6, characterized in that, The second time information is a timestamp in days, and the second sub-encrypted data generation module includes: The second sub-encrypted data generation submodule is used to concatenate the second sub-encrypted data and the timestamp day value to generate the second sub-encrypted data.

9. The apparatus according to claim 6, characterized in that, The data to be encrypted is a string, and the third sub-encryption data generation module includes: The third sub-encrypted data generation submodule is used to convert the string into a byte stream and use the byte stream as the third sub-encrypted data.

10. The apparatus according to claim 6, characterized in that, The first time information and the second time information are the time information when the data to be encrypted was acquired.

11. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-5.

12. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-5.