CN117150537B - Database data encryption and decryption method and system - Google Patents

Database data encryption and decryption method and system Download PDF

Info

Publication number
CN117150537B
CN117150537B CN202311438923.0A CN202311438923A CN117150537B CN 117150537 B CN117150537 B CN 117150537B CN 202311438923 A CN202311438923 A CN 202311438923A CN 117150537 B CN117150537 B CN 117150537B
Authority
CN
China
Prior art keywords
data
storage
video
video data
encrypted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311438923.0A
Other languages
Chinese (zh)
Other versions
CN117150537A (en
Inventor
邢波波
张群轼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ruihang Zhizhen Technology Co ltd
Original Assignee
Beijing Ruihang Zhizhen Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Ruihang Zhizhen Technology Co ltd filed Critical Beijing Ruihang Zhizhen Technology Co ltd
Priority to CN202311438923.0A priority Critical patent/CN117150537B/en
Publication of CN117150537A publication Critical patent/CN117150537A/en
Application granted granted Critical
Publication of CN117150537B publication Critical patent/CN117150537B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Television Signal Processing For Recording (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides a database data encryption and decryption method and a system, which relate to the technical field of video data encryption processing, and the method comprises the following steps: dividing video data to be encrypted into a plurality of storage data packets based on preset data dividing information; dividing a plurality of storage area indexes based on the storage amount of video data to be encrypted and the number of storage data packets; receiving an encrypted file which is input by an encrypted user or randomly generated and carries first ordering information, and storing a plurality of storage data packets in a database based on the encrypted file; after receiving the decoding file carrying the second ordering information input by the decryption user, ordering the storage area indexes according to the decoding file, and reading the storage data packets from the database according to the storage indexes of the current ordering to generate the decrypted video data. According to the video encryption method and device, the video storage data of each part are disordered, the video to be encrypted is difficult to restore only through the video source code, and the privacy and the safety of the video data are enhanced.

Description

Database data encryption and decryption method and system
Technical Field
The invention relates to the technical field of video data encryption processing, in particular to a database data encryption and decryption method and system.
Background
With the rapid development of network informatization, information storage, information transmission and information reading are one of the main circulation modes of modern information interaction. However, with the rapid development of informatization, the privacy and security of information are particularly important.
In the related art, in order to facilitate enhancement of security and privacy of video data, an access file is carried in the video data, and a user can achieve the purpose of accessing the video data by inputting an access password into the access file.
However, the related technology can only enhance the privacy of the data video when the user accesses the video, and the data of the video can still be carried out by extracting the data, so that the privacy and the security of the video data are not high.
Disclosure of Invention
In order to enhance the privacy and security of video data, the application provides a database data encryption and decryption method and system.
In a first aspect, the present application provides a method for encrypting and decrypting database data, which adopts the following technical scheme:
a method of encrypting and decrypting database data, the method comprising:
dividing video data to be encrypted into a plurality of storage data packets based on preset data dividing information, and establishing video storage indexes corresponding to the storage data packets;
dividing a plurality of storage area indexes based on the storage amount of the video data to be encrypted and the number of the storage data packets;
receiving an encrypted file which is input by an encrypted user or randomly generated and carries first ordering information, and reordering a plurality of video storage indexes based on the encrypted file;
establishing one-to-one correspondence between the reordered plurality of video storage indexes and the plurality of storage area indexes, and storing a plurality of storage data packets in a database based on the correspondence between the video storage indexes and the storage area indexes;
after receiving a decoding file carrying second ordering information input by a decryption user, ordering a plurality of storage area indexes according to the decoding file, and reading a plurality of storage data packets from a database according to the currently ordered storage indexes to generate decrypted video data.
Optionally, after receiving the encrypted file carrying the first ordering information, the method further includes:
generating misleading duration according to misleading data quantity carried in the encrypted file;
reading target video content information in a target storage data packet, and generating head video data and tail video data based on the target video content information and the misleading time length;
and updating the target storage data packet according to the head video data and the tail video data.
Optionally, after the reading the plurality of storage data packets from the database according to the storage index of the current ordering to generate the decrypted video data, the method further includes:
and if the head video data and/or the tail video data are/is included in the read decrypted video data, deleting the current decrypted video data and a plurality of stored data packets stored in a database from the database.
Optionally, the generating header video data and trailer video data based on the target video content information and the misleading duration includes:
capturing tail picture data and head picture data from the target video content information;
and generating head video data and tail video data according to the tail picture data, the head picture data and the misleading time length.
Optionally, after generating the header video data and the trailer video data according to the trailer picture data, the header picture data and the misleading duration, the method further includes;
adding identification data carried in the encrypted file into a plurality of head video data and a plurality of tail video data, adding the identification data into one of the identification storage data packets, and recording encryption position information of the identification data in the video data to be encrypted;
after receiving the decoded file carrying the second ordering information input by the decryption user, the method further comprises the following steps:
deleting header video data and trailer video data in a plurality of the stored data packets based on the decoded file;
after reading the plurality of stored data packets from the database according to the currently ordered stored index to generate decrypted video data, further comprising:
reading identification data from the decrypted video data based on the identification data and the decoding position information carried by the decoded file;
when the decrypted video data includes a plurality of the identification data, the decrypted video data and a plurality of the storage data packets are deleted from the database.
Optionally, the method further comprises:
capturing a plurality of video guide information existing in the video to be encrypted;
extracting and deleting a plurality of video guide information in the video to be encrypted, adding a plurality of blank space occupying information at a deleting position in the video data to be encrypted, wherein a one-to-one mapping relation exists between the plurality of blank space occupying information and the plurality of video guide information;
and carrying out data division and reordering on a plurality of video instruction information based on the encrypted file and the data division information.
Optionally, after the reading the plurality of storage data packets from the database according to the storage index of the current ordering to generate the decrypted video data, the method further includes:
reading a plurality of video guide information from a database based on the decoded file;
and capturing blank space occupying information in the decrypted video data, and updating the decrypted video data according to a plurality of video guiding information and a plurality of blank space occupying information in the decrypted video data.
In a second aspect, the present application provides a database data encryption and decryption system, which adopts the following technical scheme:
a database data encryption and decryption system, the database data encryption and decryption system comprising:
the data dividing module divides video data to be encrypted into a plurality of storage data packets based on preset data dividing information, and establishes video storage indexes corresponding to the storage data packets;
the index establishing module is used for dividing a plurality of storage area indexes based on the storage amount of the video data to be encrypted and the number of the storage data packets;
the information ordering module is used for receiving an encrypted file which is input by an encrypted user or randomly generated and carries first ordering information, and reordering a plurality of video storage indexes based on the encrypted file;
the data storage module is used for establishing one-to-one correspondence between the reordered plurality of video storage indexes and the storage area indexes and storing a plurality of storage data packets in a database based on the correspondence between the video storage indexes and the storage area indexes;
and the decryption reading module is used for sorting the storage area indexes according to the decoding file after receiving the decoding file carrying the second sorting information input by the decryption user, and reading a plurality of storage data packets from the database according to the storage indexes which are currently sorted to generate decrypted video data.
In a third aspect, the present application provides an intelligent terminal, which adopts the following technical scheme:
a smart terminal comprising a processor and a memory, wherein at least one instruction, at least one program, a code set, or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the processing of the smart terminal in the database data encryption and decryption method according to the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium, which adopts the following technical scheme:
a computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by a processor to implement the processing of the intelligent terminal in the database data encryption and decryption method according to the first aspect.
In summary, the present application includes at least one of the following beneficial technical effects:
after receiving video data to be encrypted input by a user, the intelligent terminal divides the video data to be encrypted into a plurality of data segments based on pre-stored data dividing information, wherein the data segments are storage data packets; further, in order to facilitate searching for suitable storage data packets, a video storage index is established for each data packet; the intelligent terminal divides a plurality of preparation storage areas and storage area indexes of the preparation storage areas according to the storage amount of the encrypted video data and the size of a storage data packet; then the intelligent terminal sorts the video storage indexes according to the encryption files, establishes a one-to-one mapping relation between the video storage indexes and the storage area indexes according to the sorted video storage indexes, and stores a plurality of storage data packets in a preparation storage area in a database based on the mapping relation, so that each part of video storage data of original video data to be encrypted is disturbed, the video to be encrypted is difficult to restore only by reading a video source code, and the privacy and the safety of the video data are enhanced; after the decryption user inputs the decoding file into the intelligent terminal, the intelligent terminal sorts the storage area indexes by the second sorting information in the decoding file, and reads the storage data packets in turn according to the sorted storage area indexes to generate decryption video data so as to achieve the purpose of decrypting the encrypted video.
Drawings
Fig. 1 is a flow chart of a database data encryption and decryption method provided in an embodiment of the present application.
Fig. 2 is a schematic flow chart of encrypting a storage data packet according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating an encryption method for inserting identification data according to an embodiment of the present application.
FIG. 4 is a flowchart of updating the historical habit scoring coefficients according to one embodiment of the present application.
Fig. 5 is a schematic flow chart of removing video guiding information and encrypting according to an embodiment of the present application.
Fig. 6 is a system block diagram of a database data encryption and decryption system according to an embodiment of the present application.
Fig. 7 is a block diagram of an intelligent terminal according to an embodiment of the present application.
Reference numerals illustrate: 601. a data dividing module; 602. an index establishing module; 603. an information ordering module; 604. a data storage module; 605. a decryption reading module; 606. an information reading module; 607. a data updating module; 608. a data deletion module; 609. a capture module; 610. a data extension module; 611. and a data insertion module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in further detail with reference to the accompanying drawings 1 to 7.
The embodiment of the application provides a database data encryption and decryption method which can be applied to a database data encryption and decryption system. The embodiment of the application describes encryption and decryption in video data, and other cases, such as document encryption and decryption, are similar to the description of the embodiment of the application and will not be repeated.
The process flow shown in fig. 1 will be described in detail with reference to the specific embodiments, and the following may be included:
s101, dividing video data to be encrypted into a plurality of storage data packets based on preset data dividing information, and establishing video storage indexes corresponding to the storage data packets.
In implementation, the intelligent terminal in the data encryption and decryption system may be a host terminal of a computer, or may be a server terminal of a certain server in a network, which is used for encrypting and decrypting video data.
After receiving video data to be encrypted input by a user, the intelligent terminal divides the video data to be encrypted into a plurality of storage data packets by combining preset data division information, wherein the preset data division information comprises data division levels and the number of data divisions of each level, so that the video data to be encrypted is divided into a plurality of data segments, and the plurality of data segments can be called as a plurality of storage data packets for storage.
The intelligent terminal establishes a video storage index corresponding to each storage data packet so as to facilitate the intelligent terminal to search the database for the corresponding storage data packet. And the plurality of video storage indexes which are currently established are ordered according to the playing sequence of the video data to be encrypted.
S102, dividing a plurality of storage area indexes based on the storage amount of video data to be encrypted and the number of storage data packets.
In implementation, the intelligent terminal divides a plurality of preparation storage areas in the database according to the storage amount of the video to be encrypted and the amount of the stored data, and then establishes storage area indexes of the preparation storage areas, wherein the storage area indexes are ordered according to the storage positions.
S103, receiving an encrypted file which is input by an encrypted user or randomly generated and carries first ordering information, and reordering a plurality of video storage indexes based on the encrypted file.
In implementation, in the process of encrypting video data to be encrypted by the intelligent terminal, firstly, an encrypted file input by a user or randomly generated by the intelligent terminal is required to be received, wherein the user can be called an encrypted user, and the generated encrypted file carries first ordering information.
The intelligent terminal then sorts the video storage index by the first sorting information in the encrypted file, for example, according to the data division information, the video data to be encrypted is divided into a-part data, B-part data, C-part data, D-part data, etc. according to the first layer of the division information, and then the a-part data is subdivided into a-data segment, B-data segment, C-data segment, D-data segment, etc., thereby dividing the video data to be encrypted into a plurality of data segments. When the plurality of data segments are ordered, the data segments in the data of the part B, the data of the part C, the data of the part D and the like are reordered according to the first ordering information, and the data segments in the data of the part B, the data of the part C, the data of the part D and the like are reordered according to the first ordering information at the same time. In the actual implementation process, in order to reduce the difficulty of the intelligent terminal in data processing, the intelligent terminal part can replace the reordering of the data segments by reordering the video storage index.
S104, establishing a one-to-one mapping relation between the plurality of reordered video storage indexes and the plurality of storage area indexes, and storing the plurality of storage data packets in a database based on the correspondence relation between the video storage indexes and the storage area indexes.
In implementation, the intelligent terminal sequentially establishes a one-to-one mapping relation between the reordered video storage index and the storage area indexes according to the current arrangement sequence.
And then the intelligent terminal stores the storage data packet corresponding to the video storage index in a preparation storage area corresponding to the database according to the corresponding relation between the video storage index and the storage area index.
After a plurality of data segments are stored in a database in a rearranged manner, it is difficult to restore the data to be encrypted even by only reading the data source code, thereby enhancing the privacy and security of the video data. Meanwhile, in order to reduce the decryption of video data to be encrypted by identifying video storage indexes and other modes for tracing encryption marks, after a plurality of storage data packets are stored in a database, the intelligent terminal deletes the video storage indexes, encrypted files and the like adopted in the video encryption process from a memory of the intelligent terminal.
S105, after receiving the decoding file carrying the second ordering information input by the decryption user, ordering the storage area indexes according to the decoding file, and reading the storage data packets from the database according to the storage indexes of the current ordering to generate the decrypted video data.
In implementation, the intelligent terminal can simultaneously encode the decoding file corresponding to the encryption file while receiving the encryption file, so that a subsequent user needing to decrypt the encrypted video data can decrypt the encrypted video data based on the decoding file, and the user needing to decrypt is referred to as a decryption user herein.
After receiving the decoding file input by the user, the intelligent terminal sorts the storage area indexes according to the second sorting information in the decoding file, and then sequentially reads a plurality of storage data packets according to the sorted storage area indexes so as to form decrypted video data, thereby achieving the purpose of decrypting and reading the encrypted video.
It should be noted that the encryption and decryption of video data may be performed in the same intelligent terminal, or may be performed in different intelligent terminals, where the essence of the intelligent terminals is that the encryption and decryption of video data is implemented by reading the video encryption and decryption header file, so that the same intelligent terminal is used for performing encryption and decryption in this application for illustration.
Optionally, after step S103, there is also a process as shown in fig. 2, and specific operation contents are as follows:
s201, generating misleading time length according to misleading data quantity carried in the encrypted file.
In implementation, the intelligent terminal generates a misleading duration from a misleading data amount carried in the encrypted file, where the misleading data amount is a size used to form the data.
S202, reading target video content information in a target storage data packet, and generating head video data and tail video data based on the target video content information and misleading time length.
In practice, the intelligent terminal further performs encryption processing for each storage data packet, where the storage data packet is selected for illustration, and the storage data packet is referred to herein as a target storage data packet.
The intelligent terminal reads target video content information corresponding to the target storage data packet, then creates head video data positioned at the front end of the storage data packet and tail video data positioned at the rear end of the storage data packet from the target video content information, wherein the head video data and the tail video data can be video screenshot of the front end and the rear end of the target video content information or video data assembled by rationalizing video extension.
S203, updating the storage data packet according to the head video data and the tail video data.
In the implementation, the intelligent terminal combines the target storage data packet with the corresponding head video data and tail video data, so as to achieve the purpose of updating the storage data packet. Therefore, when splicing and reorganizing a plurality of storage data packets according to the consistency and reasonable speculation of video actions, on one hand, a large amount of head video data and tail video data can be carried in the spliced and reorganized video, so that the accuracy of reading the video data is affected, and on the other hand, the intelligent terminal can delete the existing plurality of storage data packets in a mode of identifying the head video data or the tail video data, so that the privacy and the safety of the video data are further enhanced.
Optionally, following step 105, there is also the following process, the specific operation is as follows:
if the read decrypted video data includes header video data and/or trailer video data, the current decrypted video data and a plurality of stored data packets stored in the database are deleted from the database.
In implementation, after the intelligent terminal generates the decrypted video data, if the intelligent terminal identifies the header video data or the tail video data from the decrypted video data, the intelligent terminal deletes the decrypted video data generated by current decryption and a plurality of storage data packets in the database from the database, so that the decryption error video data can be timely eliminated, and the privacy and the safety of the video data are enhanced.
Optionally, in step S202, there is a processing manner shown in fig. 3, and specific operation contents are as follows:
s301, capturing tail picture data and head picture data from target video content information.
In an implementation, in the process of generating the head video data and the tail video data for each target storage data packet, the intelligent terminal firstly reads the target video content information of the target storage data packet. And then the intelligent terminal captures the tail picture data and the head picture data of the target video content information, so that the intelligent terminal can generate tail video data by combining the tail picture data and generate head video data by combining the head picture data.
S302, generating head video data and tail video data according to the tail picture data, the head picture data and the misleading time length.
In the implementation, the intelligent terminal generates tail picture data which only has tail pictures and has the misleading time length as misleading time length according to the misleading time length, and simultaneously generates head video data which only has head pictures and has the misleading time length as misleading time length according to the misleading time length.
Optionally, after step S302, there is also a process as shown in fig. 4, in the following manner:
s401, adding identification data carried in an encrypted file to a plurality of head video data and a plurality of tail video data, adding the identification data to one of the identification storage data packets, and recording encryption position information of the identification data in the video data to be encrypted.
In implementation, the smart terminal randomly extracts one of the storage data packets from the plurality of storage data packets, or the smart terminal receives a request from a user to specify one of the storage data packets from the plurality of storage data packets, where the storage data packets may be referred to as identification storage data packets.
The encrypted file received by the intelligent terminal carries identification data, and the intelligent terminal adds the identification data into all the head video data and all the tail video data. Meanwhile, the intelligent terminal also adds the identification data into the identification storage data packet.
Further, in order to facilitate the generation of the decoding file, the decoding file captures and identifies the identification data from the plurality of storage data packets, and the intelligent terminal records the identification storage data packets and the location information of the identification data in the identification storage data packets in the video data to be encrypted, where the location information is called encryption location information, so as to facilitate adding the encryption location to the standard decoding file.
After receiving the decoded file carrying the second ordering information input by the decryption user, the following processing still exists, and the specific processing flow is as follows:
and S402, deleting the head video data and the tail video data in the plurality of storage data packets based on the decoding file.
In implementation, after receiving the decrypted file, the intelligent terminal deletes the head video data and the tail video data in the plurality of storage data packets according to misleading time carried in the decrypted file, so that the head video and the tail video are not carried in the decrypted video data combined by reading the plurality of storage data packets.
After step 105, the following processes are also present, the specific process flows are as follows:
s403, based on the identification data carried by the decoding file and the decoding position information, reading the identification data from the decrypted video data.
In implementation, the intelligent terminal captures a feature identification data segment from the decrypted video data according to the decoding position information carried in the decoding file, and searches the identification data from the feature data segment, and the following three conditions exist in the searching result:
case one: if the characteristic identification data segment contains identification data and the rest part of the decrypted video data does not contain identification data, the intelligent terminal judges that the current decryption is correct;
and a second case: if the characteristic identification data segment does not contain identification data, the intelligent terminal judges that the decryption is wrong currently;
and a third case: if the characteristic identification data segment contains identification data and the rest part of the decrypted video data contains identification data, the intelligent terminal judges the current decryption error.
S404, when the decrypted video data comprises a plurality of identification data, deleting the decrypted video data and a plurality of storage data packets from the database.
In an implementation, when the intelligent terminal identifies that the decrypted video data includes a plurality of identification data, the intelligent terminal determines that the decrypted video data is currently in error, and then the intelligent terminal deletes the decrypted video data and the plurality of storage data packets from the database so as to further enhance the privacy and the security of the video data.
Meanwhile, when the intelligent terminal searches the characteristic identification data segment and does not contain identification data, the intelligent terminal also judges the current decryption error, and then the intelligent terminal deletes the decrypted video data and a plurality of stored data packets from the database.
Optionally, in this application, there is also a process as shown in fig. 5, and a specific process flow is as follows:
s501, capturing a plurality of video guide information existing in a video to be encrypted.
In implementation, the intelligent terminal captures video guiding information in the video to be encrypted, wherein the video guiding information comprises video subtitles, video audio and the like, and has time straightness information.
S502, extracting and deleting a plurality of video guide information in the video to be encrypted, adding a plurality of blank space occupying information at a deleting position in the video data to be encrypted, and enabling a one-to-one mapping relation to exist between the plurality of blank space occupying information and the plurality of video guide information.
In the implementation, the intelligent terminal extracts video guide information from the video to be encrypted, and deletes the video guide information in the video to be encrypted. And adding blank space occupying information with the same information length at the same position in the video to be encrypted according to the deleted video guide information length, wherein a one-to-one mapping relation exists between the plurality of blank space occupying information and the plurality of video guide information.
S503, based on the encrypted file and the data dividing information, the plurality of video instruction information is subjected to data dividing and reordering.
In the implementation, the intelligent terminal divides and reorders the plurality of video guiding information according to the first ordering information and the data dividing information in the encrypted file in the same mode as the video data to be encrypted and stores the video guiding information in the database, so that the data stealing program can be reduced conveniently, and the video to be encrypted can be traced according to the video instruction information.
Optionally, after step S503, the following processing manner exists, and the specific processing flow is as follows:
reading a plurality of video guide information from a database based on the decoded file;
and capturing the blank space occupying information in the decrypted video data, and updating the decrypted video data according to the plurality of video guiding information and the plurality of blank space occupying information in the decrypted video data.
In an implementation, the intelligent terminal decodes the second ordering information in the file for a longer time, and reads a plurality of video guide information from the database. And then the intelligent terminal captures the blank space occupying information in the decrypted video data, and replaces the plurality of blank space occupying information in the current decrypted video data with a plurality of video guide information according to the mapping relation of the video guide information and the blank space occupying information one by one, so that the purpose of updating the decrypted video data is achieved.
As shown in fig. 6, in implementation, the embodiment of the present application further discloses a system for encrypting and decrypting database data, where the system for encrypting and decrypting database data includes:
the data dividing module 601 divides video data to be encrypted into a plurality of storage data packets based on preset data dividing information, and establishes video storage indexes corresponding to the storage data packets;
the index establishing module 602 divides a plurality of storage area indexes based on the storage amount of the video data to be encrypted and the number of the storage data packets;
an information sorting module 603, configured to receive an encrypted file carrying first sorting information input by an encrypted user or generated randomly, and reorder a plurality of video storage indexes based on the encrypted file;
a data storage module 604, configured to establish a one-to-one mapping relationship between the reordered plurality of video storage indexes and the plurality of storage area indexes, and store the plurality of storage data packets in the database based on the correspondence relationship between the video storage indexes and the storage area indexes;
the decryption reading module 605, after receiving the decoded file carrying the second ordering information input by the decryption user, orders the plurality of storage area indexes according to the decoded file, and reads the plurality of storage data packets from the database according to the currently ordered storage indexes to generate decrypted video data.
Optionally, the database data encryption and decryption system may be further configured to:
the information reading module 606 is configured to generate misleading duration according to the misleading data amount carried in the encrypted file;
an information reading module 606, configured to read target video content information in the target storage data packet, and generate header video data and trailer video data based on the target video content information and the misleading duration;
a data updating module 607 for updating the target storage data packet according to the head video data and the tail video data.
Optionally, the database data encryption and decryption system may be further configured to:
the data deleting module 608 deletes the current decrypted video data and the plurality of stored data packets stored in the database from the database if the header video data and/or the trailer video data are included in the read decrypted video data.
Optionally, the database data encryption and decryption system is specifically configured to:
a capturing module 609 for capturing trailer picture data and header picture data from the target video content information;
the data extension module 610 is configured to generate header video data and trailer video data according to the trailer picture data, the header picture data, and the misleading duration.
Optionally, the database data encryption and decryption system may be further configured to:
a data insertion module 611, configured to add identification data carried in the encrypted file to the plurality of header video data and the plurality of trailer video data, and add the identification data to one of the identification storage data packets, and record encryption position information of the identification data in the video data to be encrypted;
the database data encryption and decryption system can also be used for:
a data deletion module 608 that deletes header video data and trailer video data in the plurality of stored data packets based on the decoded file;
the database data encryption and decryption system can also be used for:
an information reading module 606 for reading the identification data from the decrypted video data based on the identification data and the decoding position information carried by the decoded file;
the data deletion module 608 deletes the decrypted video data and the plurality of stored data packets from the database when the plurality of identification data is included in the decrypted video data.
Optionally, the database data encryption and decryption system may be further configured to:
a capturing module 609, configured to capture a plurality of video guidance information existing in the video to be encrypted;
the data deleting module 608 is configured to extract and delete a plurality of video guide information in the video to be encrypted, and add a plurality of blank space occupying information at a deleting position in the video data to be encrypted, where a mapping relationship exists between the plurality of blank space occupying information and the plurality of video guide information;
the data dividing module 601 performs data division and reordering on the plurality of video instruction information based on the encrypted file and the data division information.
Optionally, the database data encryption and decryption system may be further configured to:
an information reading module 606 that reads a plurality of video guide information from the database based on the decoded file;
the data updating module 607 is configured to capture the blank space information in the decrypted video data, and update the decrypted video data according to the plurality of video guide information and the plurality of blank space information in the decrypted video data.
Fig. 7 is a schematic structural diagram of an intelligent terminal provided in an embodiment of the present application. The intelligent terminal may vary considerably in configuration or performance and may include one or more central processors (e.g., one or more processors) and memory, one or more storage media (e.g., one or more mass storage devices) that store applications or data. The memory and storage medium may be transitory or persistent. The program stored on the storage medium may include one or more modules (not shown), each of which may include a series of instruction operations in the intelligent terminal.
The intelligent terminal may also be used for one or more power supplies, one or more wired or wireless network interfaces, one or more input/output interfaces, one or more keyboards, and/or one or more operating systems.
The intelligent terminal can comprise a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising a process for performing the intelligent terminal in the database data encryption and decryption method.
Those of ordinary skill in the art will appreciate that all or a portion of the steps implementing the above-described embodiments may be implemented by hardware, or may be implemented by a program for instructing the relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read only memory or the like.
The foregoing are all preferred embodiments of the present application, and are not intended to limit the scope of the present application in any way, therefore: all equivalent changes in structure, shape and principle of this application should be covered in the protection scope of this application.

Claims (10)

1. A method for encrypting and decrypting database data, the method comprising:
dividing video data to be encrypted into a plurality of storage data packets based on preset data dividing information, and establishing video storage indexes corresponding to the storage data packets;
dividing a plurality of storage area indexes based on the storage amount of the video data to be encrypted and the number of the storage data packets, namely dividing a plurality of preparation storage areas in a database according to the storage amount of the video data to be encrypted and the number of the storage data, then establishing a plurality of storage area indexes of the preparation storage areas by the intelligent terminal, and sequencing the plurality of storage area indexes according to the storage positions of the storage area indexes;
receiving an encrypted file which is input by an encrypted user or randomly generated and carries first ordering information, and reordering a plurality of video storage indexes based on the encrypted file;
establishing a one-to-one correspondence between the reordered plurality of video storage indexes and the plurality of storage area indexes, and storing a plurality of storage data packets in a database based on the correspondence between the video storage indexes and the storage area indexes, namely storing the storage data packets corresponding to the video storage indexes in the preparation storage areas corresponding to the database according to the correspondence between the video storage indexes and the storage area indexes;
after receiving a decoding file carrying second ordering information input by a decryption user, ordering a plurality of storage area indexes according to the decoding file, and reading a plurality of storage data packets from a database according to the currently ordered storage indexes to generate decrypted video data.
2. The method of claim 1, further comprising, after receiving the encrypted user-entered or randomly generated encrypted file carrying the first ordering information:
generating misleading duration according to misleading data quantity carried in the encrypted file;
reading target video content information in a target storage data packet, and generating head video data and tail video data based on the target video content information and the misleading time length;
and updating the target storage data packet according to the head video data and the tail video data.
3. The method of claim 2, further comprising, after said reading a plurality of stored data packets from a database according to said stored index of the current ordering to generate decrypted video data:
and if the head video data and/or the tail video data are/is included in the read decrypted video data, deleting the current decrypted video data and a plurality of stored data packets stored in a database from the database.
4. The method of claim 2, wherein the generating header video data and trailer video data based on the target video content information and the misleading time period comprises:
capturing tail picture data and head picture data from the target video content information;
and generating head video data and tail video data according to the tail picture data, the head picture data and the misleading time length.
5. The method of claim 4, further comprising, after said generating header video data and trailer video data from said trailer picture data, header picture data, and misleading duration;
adding identification data carried in the encrypted file into a plurality of head video data and a plurality of tail video data, adding the identification data into one of the identification storage data packets, and recording encryption position information of the identification data in the video data to be encrypted;
after receiving the decoded file carrying the second ordering information input by the decryption user, the method further comprises the following steps:
deleting header video data and trailer video data in a plurality of the stored data packets based on the decoded file;
after reading the plurality of stored data packets from the database according to the currently ordered stored index to generate decrypted video data, further comprising:
reading identification data from the decrypted video data based on the identification data and the decoding position information carried by the decoded file;
when the decrypted video data includes a plurality of the identification data, the decrypted video data and a plurality of the storage data packets are deleted from the database.
6. The method according to claim 1, wherein the method further comprises:
capturing a plurality of video guide information existing in the video to be encrypted;
extracting and deleting a plurality of video guide information in the video to be encrypted, adding a plurality of blank space occupying information at a deleting position in the video data to be encrypted, wherein a one-to-one mapping relation exists between the plurality of blank space occupying information and the plurality of video guide information;
and carrying out data division and reordering on a plurality of video instruction information based on the encrypted file and the data division information.
7. The method of claim 6, further comprising, after said reading a plurality of stored data packets from a database according to said stored index of the current ordering to generate decrypted video data:
reading a plurality of video guide information from a database based on the decoded file;
and capturing blank space occupying information in the decrypted video data, and updating the decrypted video data according to a plurality of video guiding information and a plurality of blank space occupying information in the decrypted video data.
8. A database data encryption and decryption system, the database data encryption and decryption system comprising:
the data dividing module divides video data to be encrypted into a plurality of storage data packets based on preset data dividing information, and establishes video storage indexes corresponding to the storage data packets;
the index establishing module is used for dividing a plurality of storage area indexes based on the storage amount of the video data to be encrypted and the number of the storage data packets, namely dividing a plurality of preparation storage areas in a database according to the storage amount of the video data to be encrypted and the number of the storage data, then establishing storage area indexes of the preparation storage areas by the intelligent terminal, and sequencing the storage area indexes according to the storage positions of the storage area indexes;
the information ordering module is used for receiving an encrypted file which is input by an encrypted user or randomly generated and carries first ordering information, and reordering a plurality of video storage indexes based on the encrypted file;
the data storage module is used for establishing one-to-one correspondence between the reordered video storage indexes and the storage area indexes, storing the storage data packets in a database based on the correspondence between the video storage indexes and the storage area indexes, namely storing the storage data packets corresponding to the video storage indexes in the preparation storage areas corresponding to the database according to the correspondence between the video storage indexes and the storage area indexes;
and the decryption reading module is used for sorting the storage area indexes according to the decoding file after receiving the decoding file carrying the second sorting information input by the decryption user, and reading a plurality of storage data packets from the database according to the storage indexes which are currently sorted to generate decrypted video data.
9. An intelligent terminal, characterized in that the intelligent terminal comprises a processor and a memory, wherein at least one instruction, at least one section of program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by the processor to realize the processing of the intelligent terminal in the database data encryption and decryption method according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein at least one instruction, at least one program, a code set, or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the processing of the intelligent terminal in the database data encryption and decryption method according to any one of claims 1 to 7.
CN202311438923.0A 2023-11-01 2023-11-01 Database data encryption and decryption method and system Active CN117150537B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311438923.0A CN117150537B (en) 2023-11-01 2023-11-01 Database data encryption and decryption method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311438923.0A CN117150537B (en) 2023-11-01 2023-11-01 Database data encryption and decryption method and system

Publications (2)

Publication Number Publication Date
CN117150537A CN117150537A (en) 2023-12-01
CN117150537B true CN117150537B (en) 2024-01-09

Family

ID=88908591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311438923.0A Active CN117150537B (en) 2023-11-01 2023-11-01 Database data encryption and decryption method and system

Country Status (1)

Country Link
CN (1) CN117150537B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867153A (en) * 2012-08-30 2013-01-09 腾讯科技(深圳)有限公司 Methods and devices for encrypting and decrypting video file and mobile terminal
CN104009838A (en) * 2014-05-07 2014-08-27 上海文广互动电视有限公司 Multimedia content piecewise encryption method
CN105391966A (en) * 2015-11-30 2016-03-09 四川诚品电子商务有限公司 Vehicle video storage method facilitating query
CN113014956A (en) * 2019-12-20 2021-06-22 腾讯科技(深圳)有限公司 Video playing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110138716B (en) * 2018-02-09 2020-11-27 网宿科技股份有限公司 Key providing method, video playing method, server and client

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867153A (en) * 2012-08-30 2013-01-09 腾讯科技(深圳)有限公司 Methods and devices for encrypting and decrypting video file and mobile terminal
CN104009838A (en) * 2014-05-07 2014-08-27 上海文广互动电视有限公司 Multimedia content piecewise encryption method
CN105391966A (en) * 2015-11-30 2016-03-09 四川诚品电子商务有限公司 Vehicle video storage method facilitating query
CN113014956A (en) * 2019-12-20 2021-06-22 腾讯科技(深圳)有限公司 Video playing method and device

Also Published As

Publication number Publication date
CN117150537A (en) 2023-12-01

Similar Documents

Publication Publication Date Title
CN109885577B (en) Data processing method, device, terminal and storage medium
EP2778953A1 (en) Encoded-search database device, method for adding and deleting data for encoded search, and addition/deletion program
CN102664967A (en) Method and system for interacting cross-platform personal information and background server
CN105027071A (en) Managing operations on stored data units
CN101763397A (en) Device and method for processing expanding information in image file
CN113901006A (en) Large-scale gene sequencing data storage and query system
CN108009049B (en) MYISAM storage engine deleted record offline recovery method and storage medium
CN110716739A (en) Code change information statistical method, system and readable storage medium
CN117150537B (en) Database data encryption and decryption method and system
CN105009068A (en) Managing operations on stored data units
CN116126997B (en) Document deduplication storage method, system, device and storage medium
JP5448428B2 (en) Data management system, data management method, and data management program
CN113448946A (en) Data migration method and device and electronic equipment
US20180307758A1 (en) Methods and systems for real-time updating of encoded search indexes
CN110222046B (en) List data processing method, device, server and storage medium
CN111897828A (en) Data batch processing implementation method, device, equipment and storage medium
CN104090924A (en) Method and device for cleaning up privacy data
US20090077133A1 (en) System and method for efficient rule updates in policy based data management
CN114201496A (en) Data updating method and device, electronic equipment, system and storage medium
US20170053677A1 (en) Information processing apparatus, information processing method, and non-transitory computer readable medium
CN112394876A (en) Large file storage/reading method, storage/reading device and computer equipment
US9418140B2 (en) Method of updating an inverted index, and a server implementing the method
CN111628996A (en) Electronic data communication method and system based on Internet of things
US10037148B2 (en) Facilitating reverse reading of sequentially stored, variable-length data
CN116055589B (en) Data management method and device and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant