CN115270161A - Encryption method and device based on encryption plug-in and related product - Google Patents
Encryption method and device based on encryption plug-in and related product Download PDFInfo
- Publication number
- CN115270161A CN115270161A CN202210974687.3A CN202210974687A CN115270161A CN 115270161 A CN115270161 A CN 115270161A CN 202210974687 A CN202210974687 A CN 202210974687A CN 115270161 A CN115270161 A CN 115270161A
- Authority
- CN
- China
- Prior art keywords
- data
- encrypted
- encryption
- plug
- characteristic vector
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/31—Indexing; Data structures therefor; Storage structures
- G06F16/316—Indexing structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/237—Lexical tools
- G06F40/242—Dictionaries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Bioethics (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses an encryption method and device based on an encryption plug-in and a related product, and data to be encrypted is determined by acquiring a data encryption request and analyzing the data encryption request; analyzing the data to be encrypted, and determining the category of the data to be encrypted; calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted; the feature vector of the data to be encrypted is transmitted to a mirror image warehouse for managing the encryption plug-ins, so that the mirror image warehouse calls the encryption plug-ins in the mirror image warehouse in a plug-in prefix matching mode, the feature vector of the data to be encrypted is encrypted to obtain ciphertext of the data to be encrypted, and encryption is achieved rapidly.
Description
Technical Field
The present application relates to the field of block chain technologies, and in particular, to an encryption method and apparatus based on an encryption plug-in, and a related product.
Background
The block chain is a chain of blocks, each block stores certain information, and the blocks are connected into the chain according to the time sequence generated by the blocks. This chain is maintained in all servers, and as long as one server can work in the entire system, the entire blockchain is secure. These servers, referred to as nodes in the blockchain system, provide storage space and computational support for the entire blockchain system. If the information in the block chain is to be modified, more than half of the nodes must be authenticated and the information in all the nodes must be modified, and the nodes are usually held in different hands of different subjects, so that the information in the block chain is extremely difficult to tamper with.
In the application process of the block chain technology, block nodes of a terminal are involved, each block node is equivalent to a terminal, and necessary codes and resource packages must be loaded on the block nodes to participate in the operation of the whole system of the block chain. Among these, the encryption algorithm is a very important function for the blockchain. How to realize encryption quickly based on an encryption algorithm becomes a technical problem to be solved urgently.
Disclosure of Invention
Based on the above problems, the embodiments of the present application provide an encryption method and apparatus based on an encryption plug-in, and a related product.
The embodiment of the application discloses the following technical scheme:
an encryption plug-in based encryption method, comprising:
acquiring a data encryption request, and analyzing the data encryption request to determine data to be encrypted;
analyzing the data to be encrypted, and determining the category of the data to be encrypted;
calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-ins, so that the mirror image warehouse calls the encryption plug-ins in the mirror image warehouse in a plug-in prefix matching mode, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
Optionally, the obtaining the data encryption request and analyzing the data encryption request includes: and polling regularly based on a set API (application program interface) to obtain the data encryption request, and performing type analysis and entity content analysis on the data encryption request to determine the data to be encrypted.
Optionally, the analyzing the data to be encrypted and determining the category of the data to be encrypted includes:
analyzing the data to be encrypted, and performing instantiation processing on an analysis result to obtain a data example to be encrypted; and determining the category of the data to be encrypted according to the data to be encrypted.
Optionally, the invoking a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain the feature vector of the data to be encrypted includes: and calling a text vectorization component, removing the non-entity meaning words from the data to be encrypted, performing word segmentation on the data to be encrypted after the non-entity meaning words are removed to obtain a plurality of participles, constructing a dictionary with a unique index based on the participles, and obtaining the feature vector of the data to be encrypted based on the dictionary.
An encryption plug-in based encryption device, comprising:
the first program unit is used for acquiring a data encryption request and analyzing the data encryption request to determine data to be encrypted;
the second program unit is used for analyzing the data to be encrypted and determining the category of the data to be encrypted;
the third program unit is used for calling a corresponding vectorization component according to the category of the data to be encrypted, vectorizing the data to be encrypted and obtaining a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
and the fourth program unit is used for transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in unit, so that the mirror image warehouse calls the encryption plug-in unit in the mirror image warehouse in a plug-in unit prefix matching mode, and the characteristic vector of the data to be encrypted is encrypted to obtain a ciphertext of the data to be encrypted.
Optionally, the first program element is further configured to: and polling regularly based on a set API (application program interface) to obtain the data encryption request, and performing type analysis and entity content analysis on the data encryption request to determine the data to be encrypted.
Optionally, the second program element is further configured to:
analyzing the data to be encrypted, and performing instantiation processing on an analysis result to obtain a data example to be encrypted; and determining the category of the data to be encrypted according to the data to be encrypted.
Optionally, the third program element is further configured to: calling a text vectorization component, performing entity-free meaning word removal processing on the data to be encrypted, performing word segmentation processing on the data to be encrypted after the entity-free meaning word removal processing to obtain a plurality of segmented words, constructing a dictionary with a unique index based on the segmented words, and obtaining a feature vector of the data to be encrypted based on the dictionary.
An electronic device comprising a memory having an executable program stored thereon and a processor that, when running the executable program, performs the steps of:
acquiring a data encryption request, and analyzing the data encryption request to determine data to be encrypted;
analyzing the data to be encrypted, and determining the category of the data to be encrypted;
calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in unit, so that the mirror image warehouse calls the encryption plug-in unit in the mirror image warehouse in a plug-in unit prefix matching mode, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
A computer storage medium storing a computer-executable program that, when executed, performs the steps of:
acquiring a data encryption request, and analyzing the data encryption request to determine data to be encrypted;
analyzing the data to be encrypted, and determining the category of the data to be encrypted;
calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-ins, so that the mirror image warehouse calls the encryption plug-ins in the mirror image warehouse in a plug-in prefix matching mode, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
In the technical scheme of the embodiment of the application, data to be encrypted is determined by acquiring a data encryption request and analyzing the data encryption request; analyzing the data to be encrypted, and determining the category of the data to be encrypted; calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted; if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text feature vector of the data to be encrypted, wherein the feature vector of the data to be encrypted comprises at least one of the keyword vector index and the text feature vector; and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in unit, so that the mirror image warehouse calls the encryption plug-in unit in the mirror image warehouse in a plug-in unit prefix matching mode, and the characteristic vector of the data to be encrypted is encrypted to obtain a ciphertext of the data to be encrypted, thereby quickly realizing encryption.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments of the present application, and for those skilled in the art, other drawings may be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic flowchart of an encryption method based on an encryption plug-in according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an encryption method and apparatus based on an encryption plug-in an embodiment of the present application;
FIG. 3 is a schematic structural diagram of an electronic device in an embodiment of the present application;
fig. 4 is a schematic diagram of a hardware structure of an electronic device in the embodiment of the present application.
Detailed Description
It is not necessary for any particular embodiment of the invention to achieve all of the above advantages at the same time.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the technical scheme of the embodiment of the application, data to be encrypted is determined by acquiring a data encryption request and analyzing the data encryption request; analyzing the data to be encrypted, and determining the category of the data to be encrypted; calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted; if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text feature vector of the data to be encrypted, wherein the feature vector of the data to be encrypted comprises at least one of the keyword vector index and the text feature vector; and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-ins, so that the mirror image warehouse calls the encryption plug-ins in the mirror image warehouse in a plug-in prefix matching mode, and the characteristic vector of the data to be encrypted is encrypted to obtain the ciphertext of the data to be encrypted, thereby quickly realizing encryption.
Fig. 1 is a schematic flowchart of an encryption method based on an encryption plug-in according to an embodiment of the present application; as shown in fig. 1, it includes:
s101, acquiring a data encryption request, and analyzing the data encryption request to determine data to be encrypted;
s102, analyzing the data to be encrypted, and determining the category of the data to be encrypted;
s103, calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
s104, transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in unit, so that the mirror image warehouse calls the encryption plug-in unit in the mirror image warehouse in a plug-in unit prefix matching mode, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
Optionally, the obtaining the data encryption request and analyzing the data encryption request includes: and polling regularly based on a set API (application program interface) to obtain the data encryption request, and performing type analysis and entity content analysis on the data encryption request to determine the data to be encrypted, so that the timeliness of request processing is improved, and network congestion is avoided.
Optionally, the analyzing the data to be encrypted and determining the category of the data to be encrypted includes:
analyzing the data to be encrypted, and performing instantiation processing on an analysis result to obtain a data example to be encrypted; and determining the category of the data to be encrypted according to the example of the data to be encrypted, thereby quickly realizing the determination of the category of the data to be encrypted.
Optionally, the invoking a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain the feature vector of the data to be encrypted includes: and calling a text vectorization component, removing the non-entity meaning words from the data to be encrypted, performing word segmentation on the data to be encrypted after the non-entity meaning words are removed to obtain a plurality of participles, constructing a dictionary with a unique index based on the participles, and obtaining the characteristic vector of the data to be encrypted based on the dictionary, so that the data processing amount is reduced, and the data processing efficiency is improved.
Optionally, the invoking a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain the feature vector of the data to be encrypted includes: based on the regular expression, carrying out fluidization processing on the data to be encrypted to obtain a data stream; and calling a corresponding vectorization component according to the category of the data to be encrypted, vectorizing the data stream, and obtaining the characteristic vector of the data to be encrypted, so that the data processing efficiency is improved, and the real-time performance of the algorithm is ensured.
Optionally, the transmitting the feature vector of the data to be encrypted to a mirror warehouse for managing the encryption plug-in, so that the mirror warehouse calls the encryption plug-in the mirror warehouse in a plug-in prefix matching manner, and encrypts the feature vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted, includes: the encryption plug-in is mirrored to the mirror image warehouse from a central warehouse, and the characteristic vector of the data to be encrypted is transmitted to the mirror image warehouse for managing the encryption plug-in based on local dependence, so that the mirror image warehouse calls the encryption plug-in the mirror image warehouse in a plug-in prefix matching mode, the characteristic vector of the data to be encrypted is encrypted, and the ciphertext of the data to be encrypted is obtained, and therefore rapid encryption processing is achieved.
Optionally, the transmitting the feature vector of the data to be encrypted to a mirror warehouse for managing the encryption plug-in, so that the mirror warehouse calls the encryption plug-in the mirror warehouse in a plug-in prefix matching manner, and encrypts the feature vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted, includes: and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in, so that the mirror image warehouse analyzes the plug-in coordinate statement to obtain a plug-in prefix and then performs matching, calling the encryption plug-in the mirror image warehouse, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted, thereby realizing rapid encryption processing.
Optionally, the transmitting the feature vector of the data to be encrypted to a mirror warehouse for managing the encryption plug-in, so that the mirror warehouse calls the encryption plug-in the mirror warehouse in a plug-in prefix matching manner, and encrypts the feature vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted, includes: and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-ins, so that the mirror image warehouse determines the ID of the encryption plug-ins in a plug-in prefix matching mode, accesses a storage directory of the encryption plug-ins based on the ID of the encryption plug-ins, calls the encryption plug-ins in the mirror image warehouse, and encrypts the characteristic vector of the data to be encrypted to obtain the ciphertext of the data to be encrypted.
Therefore, when the plug-in is created, the mapping relation between the plug-in prefix and the encryption plug-in ID is established, so that the encryption plug-in ID can be quickly and accurately determined in a plug-in prefix matching mode.
Fig. 2 is a schematic structural diagram of an encryption apparatus based on an encryption plug-in according to an embodiment of the present application; as shown in fig. 2, it includes:
a first program unit 201, configured to obtain a data encryption request, and parse the data encryption request to determine data to be encrypted;
a second program unit 202, configured to parse the data to be encrypted, and determine a category of the data to be encrypted;
a third program unit 203, configured to invoke a corresponding vectorization component according to the category of the data to be encrypted, and perform vectorization on the data to be encrypted to obtain a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
a fourth program unit 204, configured to transmit the feature vector of the data to be encrypted to a mirror image warehouse that manages the encryption plug-in, so that the mirror image warehouse invokes the encryption plug-in the mirror image warehouse in a plug-in prefix matching manner, and encrypts the feature vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
Optionally, the first program element is further configured to: and polling regularly based on a set API (application program interface) to obtain the data encryption request, and performing type analysis and entity content analysis on the data encryption request to determine the data to be encrypted.
Optionally, the second program element is further configured to:
analyzing the data to be encrypted, and instantiating an analysis result to obtain an example of the data to be encrypted; and determining the category of the data to be encrypted according to the data to be encrypted.
Optionally, the third program element is further configured to: and calling a text vectorization component, removing the non-entity meaning words from the data to be encrypted, performing word segmentation on the data to be encrypted after the non-entity meaning words are removed to obtain a plurality of participles, constructing a dictionary with a unique index based on the participles, and obtaining the feature vector of the data to be encrypted based on the dictionary.
Optionally, the third program element further: based on the regular expression, carrying out fluidization processing on the data to be encrypted to obtain a data stream; and calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data stream to obtain the feature vector of the data to be encrypted.
Optionally, the fourth program element is further configured to: and mirroring the encryption plug-in from a central warehouse to the mirror warehouse, and transmitting the characteristic vector of the data to be encrypted to a mirror warehouse for managing the encryption plug-in based on local dependence, so that the mirror warehouse calls the encryption plug-in the mirror warehouse in a plug-in prefix matching mode, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
Optionally, the fourth program element is further configured to: and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in, so that the mirror image warehouse analyzes the plug-in coordinate statement to obtain a plug-in prefix and then performs matching, calling the encryption plug-in the mirror image warehouse, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
Optionally, the fourth program element is further configured to: and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-ins, so that the mirror image warehouse determines the ID of the encryption plug-ins in a plug-in prefix matching mode, accesses a storage directory of the encryption plug-ins based on the ID of the encryption plug-ins, calls the encryption plug-ins in the mirror image warehouse, and encrypts the characteristic vector of the data to be encrypted to obtain the ciphertext of the data to be encrypted.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application; as shown in fig. 3, it includes a memory 301 and a processor 302, the memory stores an executable program, and the processor executes the executable program and executes the following steps:
acquiring a data encryption request, and analyzing the data encryption request to determine data to be encrypted;
analyzing the data to be encrypted, and determining the category of the data to be encrypted;
calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in unit, so that the mirror image warehouse calls the encryption plug-in unit in the mirror image warehouse in a plug-in unit prefix matching mode, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
An embodiment of the present application further provides a computer storage medium, where a computer executable program is stored in the computer storage medium, and when the computer executable program is executed, the following steps are performed:
acquiring a data encryption request, and analyzing the data encryption request to determine data to be encrypted;
analyzing the data to be encrypted, and determining the category of the data to be encrypted;
calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in unit, so that the mirror image warehouse calls the encryption plug-in unit in the mirror image warehouse in a plug-in unit prefix matching mode, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
FIG. 4 is a schematic diagram of a hardware structure of an electronic device in an embodiment of the present application; as shown in fig. 4, the hardware structure of the electronic device may include: the electronic device 400 includes a computing unit 401 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 402 or a computer program loaded from a storage unit 406 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The calculation unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
A number of components in the electronic device 400 are connected to the I/O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 may be any type of device capable of inputting information to the electronic device 400, and the input unit 406 may receive input numeric or character information and generate key signal inputs related to user settings and/or function control of the electronic device. Output unit 407 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. The storage unit 404 may include, but is not limited to, a magnetic disk, an optical disk. The communication unit 409 allows the electronic device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and/or chipsets, such as bluetooth (TM) devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The electronic device of the embodiments of the present application exists in various forms, including but not limited to:
(1) Mobile communication devices, which are characterized by mobile communication capabilities and are primarily targeted at providing voice and data communications. Such terminals include smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) The ultra-mobile personal computer equipment belongs to the category of personal computers, has the functions of calculation and processing, and generally has the mobile internet access characteristic. Such terminals include PDA, MID, and UMPC devices, such as ipads.
(3) Portable entertainment devices such devices may display and play multimedia content. Such devices include audio and video players (e.g., ipods), handheld game consoles, electronic books, as well as smart toys and portable car navigation devices.
(4) The server is similar to a general computer architecture, but has higher requirements on processing capability, stability, reliability, safety, expandability, manageability and the like because of the need of providing highly reliable services.
(5) And other electronic devices with data interaction functions.
It should be noted that, in the present specification, all the embodiments are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described embodiments of the apparatus and system are merely illustrative, and the modules illustrated as separate components may or may not be physically separate, and the components suggested as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement without inventive effort.
The above description is only one specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
1. An encryption method based on an encryption plug-in, comprising:
acquiring a data encryption request, and analyzing the data encryption request to determine data to be encrypted;
analyzing the data to be encrypted, and determining the category of the data to be encrypted;
calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in unit, so that the mirror image warehouse calls the encryption plug-in unit in the mirror image warehouse in a plug-in unit prefix matching mode, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
2. The method of claim 1, wherein obtaining the data encryption request and parsing the data encryption request comprises: and polling regularly based on a set API (application program interface) to obtain the data encryption request, and performing type analysis and entity content analysis on the data encryption request to determine the data to be encrypted.
3. The method according to claim 1, wherein the parsing the data to be encrypted and determining the category of the data to be encrypted comprises:
analyzing the data to be encrypted, and instantiating an analysis result to obtain an example of the data to be encrypted; and determining the category of the data to be encrypted according to the data to be encrypted.
4. The method according to claim 1, wherein the invoking a corresponding vectorization component according to the category of the data to be encrypted, vectorizing the data to be encrypted to obtain the feature vector of the data to be encrypted, includes: and calling a text vectorization component, removing the non-entity meaning words from the data to be encrypted, performing word segmentation on the data to be encrypted after the non-entity meaning words are removed to obtain a plurality of participles, constructing a dictionary with a unique index based on the participles, and obtaining the feature vector of the data to be encrypted based on the dictionary.
5. An encryption device based on an encryption plug-in, comprising:
the first program unit is used for acquiring a data encryption request and analyzing the data encryption request to determine data to be encrypted;
the second program unit is used for analyzing the data to be encrypted and determining the category of the data to be encrypted;
the third program unit is used for calling a corresponding vectorization component according to the category of the data to be encrypted, vectorizing the data to be encrypted and obtaining a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
and the fourth program unit is used for transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in unit, so that the mirror image warehouse calls the encryption plug-in unit in the mirror image warehouse in a plug-in unit prefix matching mode, and the characteristic vector of the data to be encrypted is encrypted to obtain a ciphertext of the data to be encrypted.
6. The apparatus of claim 5, wherein the first program unit is further configured to: and polling regularly based on a set API (application program interface) to obtain the data encryption request, and performing type analysis and entity content analysis on the data encryption request to determine the data to be encrypted.
7. The apparatus of claim 5, wherein the second program unit is further configured to:
analyzing the data to be encrypted, and performing instantiation processing on an analysis result to obtain a data example to be encrypted; and determining the category of the data to be encrypted according to the data to be encrypted.
8. The apparatus according to claim 5, characterized in that the third program element is further adapted to: and calling a text vectorization component, removing the non-entity meaning words from the data to be encrypted, performing word segmentation on the data to be encrypted after the non-entity meaning words are removed to obtain a plurality of participles, constructing a dictionary with a unique index based on the participles, and obtaining the feature vector of the data to be encrypted based on the dictionary.
9. An electronic device, comprising a memory and a processor, wherein the memory stores an executable program, and the processor executes the executable program to perform the following steps:
acquiring a data encryption request, and analyzing the data encryption request to determine data to be encrypted;
analyzing the data to be encrypted, and determining the category of the data to be encrypted;
calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in unit, so that the mirror image warehouse calls the encryption plug-in unit in the mirror image warehouse in a plug-in unit prefix matching mode, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
10. A computer storage medium storing a computer-executable program that, when executed, performs the steps of:
acquiring a data encryption request, and analyzing the data encryption request to determine data to be encrypted;
analyzing the data to be encrypted, and determining the category of the data to be encrypted;
calling a corresponding vectorization component according to the category of the data to be encrypted, and vectorizing the data to be encrypted to obtain a feature vector of the data to be encrypted;
if the data to be encrypted is text data, calling a corresponding word segmentation component to establish a keyword vector index of the data to be encrypted; if the data to be encrypted is picture data, calling a corresponding fragmentation component to establish a text characteristic vector of the data to be encrypted, wherein the characteristic vector of the data to be encrypted comprises at least one of the keyword vector index and the text characteristic vector;
and transmitting the characteristic vector of the data to be encrypted to a mirror image warehouse for managing the encryption plug-in unit, so that the mirror image warehouse calls the encryption plug-in unit in the mirror image warehouse in a plug-in unit prefix matching mode, and encrypting the characteristic vector of the data to be encrypted to obtain a ciphertext of the data to be encrypted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210974687.3A CN115270161A (en) | 2022-08-15 | 2022-08-15 | Encryption method and device based on encryption plug-in and related product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210974687.3A CN115270161A (en) | 2022-08-15 | 2022-08-15 | Encryption method and device based on encryption plug-in and related product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115270161A true CN115270161A (en) | 2022-11-01 |
Family
ID=83750150
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210974687.3A Pending CN115270161A (en) | 2022-08-15 | 2022-08-15 | Encryption method and device based on encryption plug-in and related product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115270161A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116204910A (en) * | 2023-04-27 | 2023-06-02 | 暗链科技(深圳)有限公司 | Plug-in hash encryption method, nonvolatile readable storage medium and electronic device |
-
2022
- 2022-08-15 CN CN202210974687.3A patent/CN115270161A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116204910A (en) * | 2023-04-27 | 2023-06-02 | 暗链科技(深圳)有限公司 | Plug-in hash encryption method, nonvolatile readable storage medium and electronic device |
CN116204910B (en) * | 2023-04-27 | 2023-08-18 | 暗链科技(深圳)有限公司 | Plug-in hash encryption method, nonvolatile readable storage medium and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110868377B (en) | Method and device for generating network attack graph and electronic equipment | |
CN107329916A (en) | A kind of USB device control method, device and computing device | |
US20170155712A1 (en) | Method and device for updating cache data | |
US20170150214A1 (en) | Method and apparatus for data processing | |
CN110727782A (en) | Question and answer corpus generation method and system | |
CN115270161A (en) | Encryption method and device based on encryption plug-in and related product | |
CN116308350A (en) | Privacy transaction method and device based on homomorphic encryption and related products | |
CN115269056A (en) | Encryption module plug-in method and device based on class loader and related product | |
US20170279777A1 (en) | File signature system and method | |
CN115348087A (en) | Rapid encryption method and device based on metadata and related products | |
CN115248930A (en) | Encryption method and device applied to block chain and related product | |
CN114328619A (en) | Multi-factor data matching method and device | |
CN113806730A (en) | Safe password input method, system, equipment and medium | |
CN116248408A (en) | Encryption method and device based on mirror image warehouse and related products | |
CN109656535B (en) | Voice skill off-line development method based on browser | |
CN109669956B (en) | Memory, user relationship determination method, device and equipment | |
CN115618384A (en) | Method and device for encrypting uplink data in alliance chain and electronic equipment | |
CN115618383A (en) | Method and device for storing sensitive data in alliance chain and electronic equipment | |
CN116225341A (en) | Homomorphic encryption-based data cleaning method and device and related products | |
CN115618382A (en) | Storage method and device for shared data in alliance chain and electronic equipment | |
CN115248931A (en) | Plug-in method and device for encryption algorithm in block chain technology and related product | |
CN116484202A (en) | Data anomaly detection method and device and related products | |
CN116226922A (en) | Data security processing method and device and related products | |
CN116244653A (en) | Data anomaly detection method and device and related products | |
CN115618411A (en) | Access method and device for shared data in alliance chain and electronic 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 |