CN107644168B - Information extraction method, terminal and computer readable storage medium - Google Patents

Information extraction method, terminal and computer readable storage medium Download PDF

Info

Publication number
CN107644168B
CN107644168B CN201710655644.8A CN201710655644A CN107644168B CN 107644168 B CN107644168 B CN 107644168B CN 201710655644 A CN201710655644 A CN 201710655644A CN 107644168 B CN107644168 B CN 107644168B
Authority
CN
China
Prior art keywords
information
target
encryption
encryption key
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
CN201710655644.8A
Other languages
Chinese (zh)
Other versions
CN107644168A (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.)
Shenzhen Koudai Network Technology Co ltd
Original Assignee
Shenzhen Koudai Network 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 Shenzhen Koudai Network Technology Co ltd filed Critical Shenzhen Koudai Network Technology Co ltd
Priority to CN201710655644.8A priority Critical patent/CN107644168B/en
Publication of CN107644168A publication Critical patent/CN107644168A/en
Application granted granted Critical
Publication of CN107644168B publication Critical patent/CN107644168B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an information extraction method, a terminal and a computer readable storage medium, wherein the method comprises the following steps: responding to an information extraction request input by a user, and acquiring a preset password; reading a first encryption key from a target picture according to the preset password; and extracting target information from the target picture according to the first encryption key. The first encryption key is decrypted and read through the preset password, and the target information is decrypted and extracted through the first encryption key, so that the target information is filled in at one time, the filling efficiency of the target information is improved, and the target information is extracted by using the double passwords, so that the extraction safety of the target information is ensured.

Description

Information extraction method, terminal and computer readable storage medium
Technical Field
The present invention relates to the field of information extraction, and in particular, to a method, a terminal, and a computer-readable storage medium for information extraction.
Background
In work, a report is usually written regularly, and when the report is written, a report template is generally fixed, and report content information filled by a user is mostly fixed content information for the user. The user needs to manually input the fixed content information every time of filling, or a content information template is stored by the user, the fixed content information needing to be filled is copied and pasted every time of writing the work report, and no convenient scheme is provided for filling the fixed content information needing to be filled in the work report at one time. And for the way that the user stores a content information template, the information storage way is unsafe and is easy to read and use by other users. Therefore, for the filling of such fixed content information, the current method is inefficient in filling and cannot ensure the safety of the information.
The above information is only for assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above information is prior art.
Disclosure of Invention
The invention mainly aims to provide an information extraction method, a terminal and a computer readable storage medium, and aims to solve the technical problems of low filling efficiency and insecurity of fixed content information.
In order to achieve the above object, the present invention provides an information extraction method, including the steps of:
responding to an information extraction request input by a user, and acquiring a preset password;
reading a first encryption key from a target picture according to the preset password;
and extracting target information from the target picture according to the first encryption key.
Preferably, the extracting target information from the target picture according to the first encryption key specifically includes:
reading first coded data from the target picture;
decoding the first coded data according to a preset coding rule to obtain encrypted information;
and decrypting the encrypted information according to the first encryption key to obtain the target information.
Preferably, before reading the first encoded data from the target picture, the method further includes:
and acquiring a second encryption key input by a current user, judging whether the second encryption key is consistent with the first encryption key, and executing the step of reading first coded data from the target picture when the second encryption key is consistent with the first encryption key.
Preferably, after the preset password is acquired in response to the information extraction request input by the user, the method further includes:
reading a first encryption state of the target information from a target picture according to the preset password;
judging whether the target information is encrypted according to the first encryption state;
when the first encryption state is not encrypted, reading second coded data from the target picture, and decoding the second coded data according to a preset coding rule to obtain the target information;
and when the first encryption state is encrypted, executing the step of reading the first encryption key from the target picture according to the preset password.
Preferably, before the preset password is acquired in response to the information extraction request input by the user, the method further includes:
responding to an information storage request input by a user, and acquiring target information, a first encryption key input by the user and an encryption request for the target information;
when the encryption request is required to be encrypted, encrypting the target information according to the first encryption key to obtain encrypted information, and generating a target picture according to the encrypted information;
generating a second encryption state of the target information according to the encryption request of the target information;
and symmetrically encrypting the second encryption state and the first encryption key according to a preset password to obtain an encrypted second encryption state and an encrypted first encryption key, and storing the encrypted second encryption state and the encrypted first encryption key in the target picture.
Preferably, the generating a target picture according to the encrypted information specifically includes:
according to a preset coding rule, coding the encrypted information to obtain first coded data;
and generating a target picture according to the first coded data.
Preferably, after the target information, the first encryption key input by the user and the encryption request for the target information are obtained in response to the information storage request input by the user, the method further includes:
and when the encryption request is not encrypted, encoding the target information according to a preset encoding rule to obtain second encoded data, and generating a target picture according to the second encoded data.
Preferably, before the generating the second encryption state of the target information according to the encryption request of the target information, the method further includes:
and acquiring a picture name input by a user, and adding the picture name to the target picture in a watermark mode.
In addition, to achieve the above object, the present invention further provides a terminal, including: a memory, a processor and an information extraction program stored on the memory and executable on the processor, the information extraction program being configured to implement the steps of the information extraction method as described above.
Furthermore, to achieve the above object, the present invention also proposes a computer-readable storage medium having stored thereon an information extraction program which, when executed by a processor, implements the steps of the information extraction method as described above.
The method comprises the steps of responding to an information extraction request input by a user to obtain a preset password; reading a first encryption key from a target picture according to the preset password; and extracting target information from the target picture according to the first encryption key. The first encryption key is decrypted and read through the preset password, and then the target information is decrypted and extracted through the first encryption key, so that the target information is filled in at one time, the filling efficiency of the target information is improved, the double passwords are used for extracting the target information, and the extraction safety of the target information is ensured.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of a method for extracting information of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of an information extraction method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of an information extraction method according to the present invention;
fig. 4 is a flowchart illustrating an information extraction method according to a third embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an information extraction program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting a server and performing data communication with the server; the terminal may be: the present embodiment is not limited to the device such as a smart phone, a desktop computer, a tablet computer, a notebook computer, or an intelligent bracelet.
The user interface 1003 is mainly used for receiving input instructions of a user, for example: an information extraction request input by a user, an information storage request input by the user, an encryption request input by the user or a second encryption key input by the user and the like; the mobile terminal calls the information extraction program stored in the memory 1005 through the processor 1001 and performs the following operations:
responding to an information extraction request input by a user, and acquiring a preset password;
reading a first encryption key from a target picture according to the preset password;
and extracting target information from the target picture according to the first encryption key.
Further, the processor 1001 may call the information extraction program stored in the memory 1005, and also perform the following operations:
reading first coded data from the target picture;
decoding the first coded data according to a preset coding rule to obtain encrypted information;
and decrypting the encrypted information according to the first encryption key to obtain the target information.
Further, the processor 1001 may call the information extraction program stored in the memory 1005, and also perform the following operations:
and acquiring a second encryption key input by a current user, judging whether the second encryption key is consistent with the first encryption key, and executing the step of reading first coded data from the target picture when the second encryption key is consistent with the first encryption key.
Further, the processor 1001 may call the information extraction program stored in the memory 1005, and also perform the following operations:
reading a first encryption state of the target information from a target picture according to the preset password;
judging whether the target information is encrypted according to the first encryption state;
when the first encryption state is not encrypted, reading second coded data from the target picture, and decoding the second coded data according to a preset coding rule to obtain the target information;
and when the first encryption state is encrypted, executing the step of reading the first encryption key from the target picture according to the preset password.
Further, the processor 1001 may call the information extraction program stored in the memory 1005, and also perform the following operations:
responding to an information storage request input by a user, and acquiring target information, a first encryption key input by the user and an encryption request for the target information;
when the encryption request is required to be encrypted, encrypting the target information according to the first encryption key to obtain encrypted information, and generating a target picture according to the encrypted information;
generating a second encryption state of the target information according to the encryption request of the target information;
and symmetrically encrypting the second encryption state and the first encryption key according to a preset password to obtain an encrypted second encryption state and an encrypted first encryption key, and storing the encrypted second encryption state and the encrypted first encryption key in the target picture.
Further, the processor 1001 may call the information extraction program stored in the memory 1005, and also perform the following operations:
according to a preset coding rule, coding the encrypted information to obtain first coded data;
and generating a target picture according to the first coded data.
Further, the processor 1001 may call the information extraction program stored in the memory 1005, and also perform the following operations:
and when the encryption request is not encrypted, encoding the target information according to a preset encoding rule to obtain second encoded data, and generating a target picture according to the second encoded data.
Further, the processor 1001 may call the information extraction program stored in the memory 1005, and also perform the following operations:
and acquiring a picture name input by a user, and adding the picture name to the target picture in a watermark mode.
According to the scheme, the preset password is acquired in response to the information extraction request input by the user; reading a first encryption key from a target picture according to the preset password; and extracting target information from the target picture according to the first encryption key. The first encryption key is decrypted and read through the preset password, and then the target information is decrypted and extracted through the first encryption key, so that the target information is filled in at one time, the filling efficiency of the target information is improved, the double passwords are used for extracting the target information, and the extraction safety of the target information is ensured.
Based on the above hardware structure, an embodiment of the information extraction method of the present invention is provided.
Referring to fig. 2, a first embodiment of an information extraction method according to the present invention is provided.
In this embodiment, the information extraction method includes the following steps:
step S10, responding to the information extraction request input by the user, and acquiring a preset password;
it should be understood that, the user may input the information extraction request on the terminal, may input the information extraction request in the information extraction APP in the terminal, and may also input the information extraction request on an interface such as a web page version or a micro message service number for information extraction through the terminal, which is not limited in this embodiment.
It should be noted that the preset password is an identification string inside the program, that is, an identification string inside the program of the information extraction APP, the webpage version, or the wechat public number, where the identification string is an identification indicating the self-embedded program of the information extraction APP, the webpage version, or the wechat public number, and the preset password cannot be obtained from other programs.
For example: the user uses the information extraction APP to fill in the work report, the contents of the work post, the post responsibility, the name, the quarterly target or the annual target and the like which need to be filled in by the user are fixed when the user fills in the work report for multiple times, the user can store a fixed content template, the information is specifically the fixed content template, and the preset password is an identification string which indicates the user in the information extraction APP program.
Step S20, reading a first encryption key from the target picture according to the preset password;
it should be understood that the target picture is a picture storing information that the user needs to extract, and is usually a regular picture capable of being stored and read, such as: two-dimensional codes, bar codes, or two-dimensional codes in a self-created format, etc., which are not limited in this embodiment. The pictures are convenient to transmit among the terminals, and compared with common files, the pictures are more convenient to store and use on the current popular intelligent mobile terminals (such as photo albums of smart phones), the pictures are convenient to store more information at one time, and more information can be recovered from the pictures at one time.
It can be understood that the first encryption key is stored in the target picture after being encrypted by the preset password, and the first encryption key can be decrypted and read from the target picture only through the preset password. The reading mode may be to scan a target picture, for example: when the terminal is a smart phone, the target picture can be stored in an album of the smart phone, and when a user needs to extract information, the target picture in the album of the smart phone can be scanned by a camera of the smart phone, so that a first encryption key is read.
It should be noted that the first encryption key is content that is steganographically written in the target picture, and is encrypted by using a designated program fingerprint (preset password), for example, an identification string indicating itself inside a program such as an information extraction App, a web page version, or a wechat public number, and the program fingerprint is the preset password. Only under a specified program, the steganographically written content can be read.
Such as: and the user fills in the work report by using the information extraction webpage edition, the identification string indicating the user self in the information extraction webpage edition program is a preset password, and only in the information extraction webpage edition can the first encryption key be read from the target picture according to the preset password. And if the identification string indicating the self in the webpage version program is extracted as the preset password according to the information, reading the target picture in other application programs, and not obtaining the first encryption key.
And step S30, extracting target information from the target picture according to the first encryption key.
It should be noted that, in order to ensure the security of the target information, the target information in the target picture is usually encrypted and cannot be directly extracted, and the target information stored in the target picture can be decrypted by the first encryption key and extracted, that is, the target information is filled into a form that a user needs to fill in at one time.
For example, a user uses the information extraction APP to fill in a work report form, the fixed content template is used as target information to be stored as a target picture for fixed contents such as a work post, a post responsibility, a name, a quarterly target or an annual target and the like which need to be filled by the user, when the user needs to fill in the fixed contents again, the fixed content template is extracted from the target picture according to the first encryption key, the fixed content template is filled into the work report form at one time, and therefore filling efficiency of the fixed content template is high, accuracy is high, and safety is achieved.
According to the scheme, the preset password is acquired in response to the information extraction request input by the user; reading a first encryption key from a target picture according to the preset password; and extracting target information from the target picture according to the first encryption key. The first encryption key is decrypted and read through the preset password, and then the target information is decrypted and extracted through the first encryption key, so that the target information is filled in at one time, the filling efficiency of the target information is improved, the double passwords are used for extracting the target information, and the extraction safety of the target information is ensured.
Further, as shown in fig. 3, a second embodiment of the information extraction method according to the present invention is proposed based on the first embodiment.
In this embodiment, the step S30 specifically includes the following steps:
step S301, reading first coded data from the target picture;
it should be noted that, information is usually stored in a picture form, and the information needs to be encoded and stored, so when reading the target picture, first obtained is first encoded data, where the first encoded data is obtained after the target information is encoded according to a preset encoding rule.
For example: the user uses the information extraction APP to fill in the work report, the content such as the work post, the post responsibility, the name, the quarterly target or the annual target which needs to be filled by the user is fixed when the user fills in the work report for multiple times, the user can store a fixed content template, the information is specifically the fixed content template, the fixed content template is stored as a target picture, the fixed content template needs to be stored after being coded, when the target picture is read, first coded data is obtained firstly, and the first coded data is data obtained after the fixed content template is coded by a preset coding rule.
Step S302, decoding the first coded data according to a preset coding rule to obtain encrypted information;
it can be understood that the preset encoding rule is an encoding rule used in storing information, the encoding rule may be a BASE64 encoding rule, and when decoding, the BASE64 encoding rule is used to decode the first encoded data, and the encrypted information is obtained after decoding. The preset encoding rule may also be other encoding rules, and may be used to encode or decode the target information so that the target information is stored and extracted in the form of a picture, which is not limited in this embodiment.
It should be understood that the encrypted information is the information obtained by encrypting the target information with the first encryption key, and when the target information is stored on the target picture, the target information (e.g. a fixed content template of a work post, work responsibility, etc. in a work report form) is encrypted with the first encryption key to ensure the information security, so that the encrypted information is obtained after decoding the first encoded data.
The encrypted information is obtained after decoding, and the target information is not directly obtained, so that the safety of target information extraction is ensured.
Step S303, decrypting the encrypted information according to the first encryption key to obtain the target information.
It should be noted that, the encrypted information is obtained by encrypting the target information with the first encryption key, and the first encryption key is a decryption key of the encrypted information, and the encrypted information is decrypted according to the first encryption key to obtain the target information, so as to implement one-time filling of the target information.
Further, the encrypted information is decrypted according to the first encryption key to obtain data in a corresponding format, and the data in the corresponding format is restored to the target information according to a preset rule.
It can be understood that the target information needs to follow the same protocol as the program of the information extraction APP, the web page version or the wechat public number version when stored, so that when stored, the target information is converted into data in a corresponding format according to a preset rule, and when the encrypted information is decrypted according to the first encryption key, the data in the corresponding format is obtained, and then the data in the corresponding format is restored into the target information according to the preset rule, so as to realize the extraction of the target information. The preset rule is a format rule of information storage predefined according to a protocol followed by the information extraction APP, the web page version, or the wechat version, for example:
information content: ss:// aes-256-cfb:1234567890123456789@127.0.0.1:8388,
the corresponding format is as follows: format header (ss://) encryption algorithm (aes-256-cfb) @ password (1234567890123456789) @ IP address (127.0.0.1): port (8388).
In this embodiment, the preset encoding rule adopts a BASE64 encoding rule, which is simple and convenient, and meanwhile, the preset encoding rule has non-readability, that is, the encoded data cannot be directly seen by human eyes, the encoded data is decoded to obtain encrypted information, the encrypted information needs to be decrypted by an encryption key to obtain target information, and the security of the information is ensured.
Before step S301, the following steps are also included:
step 201: acquiring a second encryption key input by a current user, judging whether the second encryption key is consistent with the first encryption key, and executing step S301 when the second encryption key is consistent with the first encryption key.
It can be understood that the current user is a user who performs an operation of requesting to extract input information, since the target information is encrypted, the user identity of the current user can be verified to ensure information security, and by obtaining a second encryption key input by the current user, which is required to be input by the current user for verifying the current user identity, it is determined whether the second encryption key is consistent with the first encryption key, since the first encryption key is set by the user when the target information is stored in the target picture by being encrypted by the first encryption key, when the second encryption key input by the current user is consistent with the first encryption key, the current user can be determined as the user who originally stores the target information, and the verification is passed.
It should be understood that, when the obtained second encryption key input by the current user is inconsistent with the first encryption key, it may prompt that the authentication of the current user fails, request the current user to input the second encryption key again, and when the number of times of authentication failure exceeds a preset threshold (for example, 3 times), the current user is determined not to be the user who originally stored the target information, the verification fails, and no subsequent information extraction step is performed, that is, the information extraction fails.
It should be noted that, when the second encryption key is consistent with the first encryption key, the current user is determined as the user who originally stores the target information, the user identity of the current user passes verification, and step S301 is executed, that is, the step of reading the first encoded data from the target information is executed to extract the target information.
Furthermore, the user identity mark can be read from the target picture according to a preset password.
It should be understood that the user id is an id of a user who initially stores the target information, and the user id is read from the target picture according to a preset password, so that the user who generates the target picture can be known, and the user who extracts the target information can also be authenticated through the user id, thereby further ensuring the security of information extraction.
In this embodiment, the identity of the current user is verified by determining whether the second encryption key input by the current user is consistent with the first encryption key, and the subsequent information extraction related steps can be executed only after the verification is passed, thereby further ensuring the security of information extraction.
After step S10, the method further includes the steps of:
step S101: reading a first encryption state of the target information from a target picture according to the preset password;
it can be understood that, in order to improve the efficiency of information extraction, a user may encrypt target information without using an encryption key when storing the target information, and the target information stored in a target picture may be in two encryption states, one is encrypted and the other is unencrypted, i.e. the first encryption state of the target information.
Step S102: judging whether the target information is encrypted according to the first encryption state;
it should be understood that the first encrypted state of the target information stored in the target picture has two encrypted states, one is encrypted and the other is unencrypted, and the target information is extracted by judging whether the first encrypted state is encrypted or not and then executing corresponding steps according to the encrypted state of the target information.
For example: and the user uses the information extraction wechat board to fill in the work report, fixed content information such as a work post, post responsibility, a name and the like which needs to be filled by the user is arranged in the work report, and if the user thinks that the content does not need to be encrypted and then is stored, the user does not set an encryption key to encrypt the fixed content information.
Step S103: when the first encryption state is not encrypted, reading second coded data from the target picture, and decoding the second coded data according to a preset coding rule to obtain the target information;
it can be understood that, when the first encryption state is unencrypted, and the target information is stored in the target picture without being encrypted by using an encryption key, the second encoded data is read from the target picture, where the second encoded data is data obtained by encoding the target information according to a preset encoding rule, where the preset encoding rule may be a BASE64 encoding rule, and the second encoded data is decoded according to the BASE64 encoding rule, so that the target information can be obtained without using an encryption key, and thus, the target information is extracted more efficiently. The preset encoding rule may also be other encoding rules, and may be used to encode or decode the target information so that the target information is stored and extracted in the form of a picture, which is not limited in this embodiment.
In this embodiment, the preset encoding rule adopts a BASE64 encoding rule, which is simple and convenient, and meanwhile, the encoding rule has non-readability, that is, the encoded data cannot be directly seen by human eyes, the encoded data is decoded to obtain the target information, and the extraction efficiency of the target information is high.
Furthermore, the second coded data is decoded according to a preset coding rule to obtain data in a corresponding format, and the data in the corresponding format is restored into the target information according to the preset rule.
It can be understood that the target information needs to follow the same protocol as the information extraction APP, the web page version or the wechat version, so that during storage, the target information is converted into data in a corresponding format according to a preset rule, and then the second encoded data is decoded according to the preset encoding rule to obtain the data in the corresponding format, and then the data in the corresponding format is restored into the target information according to the preset rule, so as to extract the target information. The preset rule is a format rule of information storage predefined according to a protocol followed by the information extraction APP, the web page version, or the wechat version, for example:
information content: ss:// aes-256-cfb:1234567890123456789@127.0.0.1:8388,
the corresponding format is as follows: format header (ss://) encryption algorithm (aes-256-cfb) @ password (1234567890123456789) @ IP address (127.0.0.1): port (8388).
Step S104: when the first encryption status is encrypted, step S20 is executed.
It should be understood that when the first encryption status is encrypted, that is, the target information is stored in the target picture and encrypted by using the first encryption key, step S20 is executed, that is, the step of reading the first encryption key from the target picture according to the preset password.
In the embodiment, the encryption state of the target information is read from the target picture through the preset password, when the encryption state is not encrypted, the target information can be obtained without using an encryption key, the information which is considered not to be encrypted by using the encryption key can be stored without being encrypted by a user, the information extraction is more convenient and efficient, when the encryption state is encrypted, the identity of the user needs to be verified during the information extraction, the subsequent step of the information extraction can be continued only after the verification is passed, and the safety of the information extraction is further ensured.
Further, as shown in fig. 4, a third embodiment of an information extraction method according to the present invention is proposed based on the second embodiment.
In this embodiment, before the step S10, the method further includes the following steps:
step S001, responding to an information storage request input by a user, and acquiring target information, a first encryption key input by the user and an encryption request for the target information;
it can be understood that when a user fills in a work report or other forms, part of fixed content information is required in the content information filled by the user, and the user needs to use the information when filling in a related form next time, so that the user can input an information storage request in an information extraction APP, a webpage version or a wechat version interface in the terminal.
For example: the user uses the information extraction APP to fill in the work report, the contents of the work post, the post responsibility, the name, the quarterly target or the annual target and the like which are required to be filled by the user are fixed in the information extraction APP, the user can store a fixed content template when the user fills in the work report for multiple times, the target information is specifically the fixed content template, and the first encryption key is set by the user and used for encrypting or decrypting the fixed content template in the subsequent steps.
It can be understood that when a user inputs an information storage request, an encryption request for the target information is input at the same time according to the importance of the information to be stored, when the user considers that the target information is important, a request for encrypting the target information can be input, when the user considers that the target information can not be encrypted, a request for not encrypting the target information can be input, so the encryption request for the target information is generally two, one is needed to be encrypted, and the other is not.
Step S002, when the encryption request is in need of encryption, encrypting the target information according to the first encryption key to obtain encrypted information, and generating a target picture according to the encrypted information;
it can be understood that, in order to ensure the security of information storage, before the target information is stored, the target information is encrypted according to the first encryption key set by the user, so that encrypted information is obtained, and then the encrypted information is generated into a target picture.
Further, step S002 specifically includes: traversing a form filled by a user, and converting target information into data in a corresponding format according to a preset rule; and encrypting the data with the corresponding format according to the first encryption key to obtain encrypted information.
It can be understood that the target information needs to follow the same protocol as the program for extracting the APP, the webpage version or the wechat version of the information when being stored, so that the target information is converted into data in a corresponding format according to a preset rule when being stored, wherein the preset rule is a rule predefined according to the protocol followed by the program for extracting the APP, the webpage version or the wechat public number of the information. For example:
information content: ss:// aes-256-cfb:1234567890123456789@127.0.0.1:8388,
the corresponding format is as follows: format header (ss://) encryption algorithm (aes-256-cfb) @ password (1234567890123456789) @ IP address (127.0.0.1): port (8388).
It should be understood that, the data in the corresponding format is encrypted according to the first encryption key to obtain encrypted information, and then the encrypted information is stored in the form of a picture, and the target picture may be a regular picture capable of being stored and read, such as: two-dimensional codes, bar codes, or two-dimensional codes in a self-created format, etc., which are not limited in this embodiment.
Step S003, according to the encryption request of the said target information, produce the second encryption state of the said target information;
it can be understood that, when the encryption request of the target information is to be encrypted, the target information is encrypted first to regenerate a picture, so that the second encryption state capable of generating the target information is encrypted. When the encryption request of the target information is not encrypted, so that the second encryption state capable of generating the target information is not encrypted. And for the same target picture, the first encryption state is the same as the second encryption state. For different target pictures, the first encryption state and the second encryption state may be the same or different, and there is no direct relationship between the two.
Step S004, symmetrically encrypting the second encryption state and the first encryption key according to a preset password to obtain an encrypted second encryption state and an encrypted first encryption key, and storing the encrypted second encryption state and the encrypted first encryption key in the target picture.
Understandably, the first encryption key is symmetrically encrypted according to a preset password and then stored in the target picture, when the target information is extracted, the first encryption key needs to be decrypted and read through the preset password, then the target information is extracted according to the first encryption key, and the encrypted storage of the first encryption key ensures the security of the first encryption key, so that the security of the storage and extraction processes of the target information is ensured.
It can be understood that, according to the encryption request input by the user, the target information is processed with or without encryption, and then the second encryption state of the target information includes: encrypted and unencrypted. And symmetrically encrypting the second encryption state according to a preset password, and storing the symmetrically encrypted second encryption state in the target picture, so that the second encryption state of the target information can be read according to the preset password during information extraction, and subsequent corresponding steps can be executed according to the second encryption state. And the second encryption state is symmetrically encrypted according to a preset password and then stored in the target picture, so that the safety of information extraction is ensured.
Furthermore, the user identity can be symmetrically encrypted according to a preset password, and the symmetrically encrypted user identity is stored in the target picture.
It should be understood that the user id is an id of the user requesting the input information storage, and the symmetrically encrypted user id is stored in the target picture, so that when the target information is subsequently extracted, the user id is read from the target picture according to a preset password, the user generating the target picture can be known, and the user who subsequently extracts the target information can also be authenticated through the user id, thereby further ensuring the security of information extraction.
The generating a target picture according to the encrypted information specifically includes:
step M: according to a preset coding rule, coding the encrypted information to obtain first coded data;
it should be understood that the text information in the normal format cannot be directly stored in the form of pictures, so the encrypted information is encoded first, and the encoding rule may be a BASE64 encoding rule, and the first encoded data is obtained by encoding the encrypted information according to a BASE64 encoding rule. The preset encoding rule may also be other encoding rules, and may be used to encode or decode the target information so that the target information is stored and extracted in the form of a picture, which is not limited in this embodiment.
And step N: and generating a target picture according to the first coded data.
It is understood that the first encoded data is encoded encrypted information, and the first encoded data is stored in a picture form, that is, target information subjected to encryption processing is stored in the target picture.
After the step S001, the method further comprises the steps of:
and S0011, when the encryption request is not encrypted, encoding the target information according to a preset encoding rule to obtain second encoded data, and generating a target picture according to the second encoded data.
It should be understood that, when the encryption request input by the user is unencrypted, the content of the acquired first encryption key is usually empty, and the text information in the general format cannot be directly stored in the form of pictures, so the encrypted information is encoded first. And coding the target information according to a preset coding rule, wherein the coding rule can be a BASE64 coding rule, coding the target information according to a BASE64 coding rule to obtain second coded data, and generating a target picture according to the second coded data, namely, the target information is stored in a picture form, so that the target information can be extracted from the target picture when the target information needs to be used next time. The preset encoding rule may also be other encoding rules, and may be used to encode or decode the target information so as to store and extract the target information in the form of a picture, which is not limited in this embodiment.
In this embodiment, the preset encoding rule is a BASE64 encoding rule, which is simple and convenient, and meanwhile, the preset encoding rule is not readable, that is, the encoded data cannot be directly seen by human eyes, and the target information is encoded to generate a picture, so that the target information is extracted more conveniently and efficiently, and the safety is high.
Further, step S0011 specifically includes: when the encryption request is not encrypted, traversing a form filled by a user, and converting target information into data in a corresponding format according to a preset rule; and coding the data in the corresponding format according to a preset coding rule to obtain second coded data, and generating a target picture according to the second coded data.
It can be understood that the target information needs to follow the same protocol as the information extraction APP, the web page version or the wechat version when stored, so that the target information is converted into data in a corresponding format according to a preset rule when stored, and then the data in the corresponding format is encoded according to a preset encoding rule to obtain second encoded data, and a target picture is generated according to the second encoded data. The preset rule is a format rule of information storage predefined according to a protocol followed by the information extraction APP, the web page version, or the wechat public number, for example:
information content: ss:// aes-256-cfb:1234567890123456789@127.0.0.1:8388,
the corresponding format is as follows: format header (ss://) encryption algorithm (aes-256-cfb) @ password (1234567890123456789) @ IP address (127.0.0.1): port (8388).
Before step S003, the method further includes:
step S0021: and acquiring a picture name input by a user, and adding the picture name to the target picture in a watermark mode.
It can be understood that, generally, in order to distinguish a target picture, a user sets a picture name of the target picture according to target information content stored in the target picture, and adds the picture name to the target picture in a watermark manner, so that the user can subsequently distinguish the picture according to the picture name.
Such as: when a user uses the information extraction APP to fill in the work report, the content of the work post, the work position responsibility, the name, the quarterly target or the annual target and the like which are required to be filled by the user are fixed in the information extraction APP, the user can store a fixed content template when the user fills in the work report for multiple times, the information is specifically the fixed content template, the fixed content template is stored as a target picture, the user can name the picture as the work report, and the picture can be quickly found by the user when the user fills in the work report next time.
The following steps are repeated: the user generates a picture by taking the mailbox user name and the password as target information, the picture can be named as a mailbox, and the picture can be quickly found when the user logs in the mailbox next time.
The embodiment provides an information extraction method, which includes acquiring target information, a first encryption key and an encryption request input by a user when the user inputs an information storage request, generating a target picture after the target information is correspondingly processed, generating an encryption state from the encryption request, encrypting and storing the encryption state and the first encryption key through a preset password, acquiring the preset password when the user inputs the information extraction request, reading the first encryption key from the target picture through the preset password, and extracting the target information from the target picture according to the first encryption key so as to achieve automatic filling of the target information, improve filling efficiency of fixed content information, achieve double encryption of the information by using the preset password and the first encryption key, and ensure information safety.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where an information extraction program is stored on the computer-readable storage medium, and when executed by a processor, the information extraction program implements the following operations:
responding to an information extraction request input by a user, and acquiring a preset password;
reading a first encryption key from a target picture according to the preset password;
and extracting target information from the target picture according to the first encryption key.
Further, the information extraction program when executed by the processor further performs the following operations:
reading first coded data from the target picture;
decoding the first coded data according to a preset coding rule to obtain encrypted information;
and decrypting the encrypted information according to the first encryption key to obtain the target information.
Further, the information extraction program when executed by the processor further performs the following operations:
and acquiring a second encryption key input by a current user, judging whether the second encryption key is consistent with the first encryption key, and executing the step of reading first coded data from the target picture when the second encryption key is consistent with the first encryption key.
Further, the information extraction program when executed by the processor further performs the following operations:
reading a first encryption state of the target information from a target picture according to the preset password;
judging whether the target information is encrypted according to the first encryption state;
when the first encryption state is not encrypted, reading second coded data from the target picture, and decoding the second coded data according to a preset coding rule to obtain the target information;
and when the first encryption state is encrypted, executing the step of reading the first encryption key from the target picture according to the preset password.
Further, the information extraction program when executed by the processor further performs the following operations:
responding to an information storage request input by a user, and acquiring target information, a first encryption key input by the user and an encryption request for the target information;
when the encryption request is required to be encrypted, encrypting the target information according to the first encryption key to obtain encrypted information, and generating a target picture according to the encrypted information;
generating a second encryption state of the target information according to the encryption request of the target information;
and symmetrically encrypting the second encryption state and the first encryption key according to a preset password to obtain an encrypted second encryption state and an encrypted first encryption key, and storing the encrypted second encryption state and the encrypted first encryption key in the target picture.
Further, the information extraction program when executed by the processor further performs the following operations:
according to a preset coding rule, coding the encrypted information to obtain first coded data;
and generating a target picture according to the first coded data.
Further, the information extraction program when executed by the processor further performs the following operations:
and when the encryption request is not encrypted, encoding the target information according to a preset encoding rule to obtain second encoded data, and generating a target picture according to the second encoded data.
Further, the information extraction program when executed by the processor further performs the following operations:
and acquiring a picture name input by a user, and adding the picture name to the target picture in a watermark mode.
The embodiment provides an information extraction method, which includes acquiring a preset password when a user inputs an information extraction request, reading a first encryption key from a target picture through the preset password, and extracting target information from the target picture according to the first encryption key, so as to achieve automatic filling of the target information, improve filling efficiency of fixed content information, achieve double encryption of the information by using the preset password and the first encryption key, and ensure information security.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The usage of the words first, second, third, etcetera herein does not indicate any ordering. These words may be interpreted as names.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the information in the specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for information extraction, characterized by an information extraction procedure applied to the same terminal, the method comprising the steps of:
responding to an information storage request input by a user, and acquiring target information, a first encryption key input by the user and an encryption request for the target information; the target information is a fixed content template;
encrypting the target information according to the first encryption key to obtain encrypted information, and generating a target picture according to the encrypted information;
symmetrically encrypting the first encryption key according to a preset password, and storing the encrypted first encryption key in the target picture; responding to an information extraction request input by a user, and acquiring the preset password;
reading a first encryption key from a target picture according to the preset password;
and extracting the target information from the target picture according to the first encryption key so as to realize automatic filling of the target information.
2. The method according to claim 1, wherein the extracting target information from the target picture according to the first encryption key specifically includes:
reading first coded data from the target picture;
decoding the first coded data according to a preset coding rule to obtain encrypted information;
and decrypting the encrypted information according to the first encryption key to obtain the target information.
3. The method of claim 2, wherein prior to reading the first encoded data from the target picture, the method further comprises:
and acquiring a second encryption key input by a current user, judging whether the second encryption key is consistent with the first encryption key, and executing the step of reading first coded data from the target picture when the second encryption key is consistent with the first encryption key.
4. The method according to any one of claims 1 to 3, wherein after acquiring the preset password in response to the information extraction request input by the user, the method further comprises:
reading a first encryption state of the target information from a target picture according to the preset password;
judging whether the target information is encrypted according to the first encryption state;
when the first encryption state is not encrypted, reading second coded data from the target picture, and decoding the second coded data according to a preset coding rule to obtain the target information;
and when the first encryption state is encrypted, executing the step of reading the first encryption key from the target picture according to the preset password.
5. The method of claim 4, in response to a user-entered information storage request, further comprising:
acquiring an encryption request for the target information;
correspondingly, when the encryption request is to be encrypted, the method further comprises the following steps:
generating a second encryption state of the target information according to the encryption request of the target information;
and symmetrically encrypting the second encryption state according to a preset password to obtain an encrypted second encryption state, and storing the encrypted second encryption state in the target picture.
6. The method according to claim 5, wherein the generating the target picture according to the encrypted information specifically comprises:
according to a preset coding rule, coding the encrypted information to obtain first coded data;
and generating a target picture according to the first coded data.
7. The method of claim 5, wherein after obtaining the target information, the first encryption key input by the user, and the encryption request for the target information in response to the information storage request input by the user, the method further comprises:
and when the encryption request is not encrypted, encoding the target information according to a preset encoding rule to obtain second encoded data, and generating a target picture according to the second encoded data.
8. The method of claim 5, wherein prior to generating the second encryption status of the target information based on the encryption request for the target information, the method further comprises:
and acquiring a picture name input by a user, and adding the picture name to the target picture in a watermark mode.
9. A terminal, characterized in that the terminal comprises: memory, a processor and an information extraction program stored on the memory and executable on the processor, the information extraction program being configured to implement the steps of the information extraction method of any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon an information extraction program which, when executed by a processor, implements the steps of the information extraction method according to any one of claims 1 to 8.
CN201710655644.8A 2017-08-01 2017-08-01 Information extraction method, terminal and computer readable storage medium Active CN107644168B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710655644.8A CN107644168B (en) 2017-08-01 2017-08-01 Information extraction method, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710655644.8A CN107644168B (en) 2017-08-01 2017-08-01 Information extraction method, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107644168A CN107644168A (en) 2018-01-30
CN107644168B true CN107644168B (en) 2021-08-13

Family

ID=61110992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710655644.8A Active CN107644168B (en) 2017-08-01 2017-08-01 Information extraction method, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107644168B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108923916A (en) * 2018-06-22 2018-11-30 武汉彤科电力科技有限公司 A kind of terminal symmetric key update exchange method
CN110943834B (en) * 2019-12-06 2023-02-28 歌尔科技有限公司 Network device, password processing method thereof, control device and readable storage medium
CN114978723B (en) * 2022-05-26 2023-03-17 中国电子信息产业集团有限公司第六研究所 Safety authentication method for programmable logic controller

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100538537C (en) * 2006-06-28 2009-09-09 富士施乐株式会社 Image processing system and image forming method
CN104134022A (en) * 2014-07-31 2014-11-05 北京深境智能科技有限公司 Information hiding and protecting method based on image
CN106027259A (en) * 2016-05-10 2016-10-12 河南理工大学 Two-dimensional code encryption method for logistics confidential information

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9489671B2 (en) * 2002-10-01 2016-11-08 Andrew H B Zhou Systems and methods for mobile application, wearable application, transactional messaging, calling, digital multimedia capture and payment transactions

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100538537C (en) * 2006-06-28 2009-09-09 富士施乐株式会社 Image processing system and image forming method
CN104134022A (en) * 2014-07-31 2014-11-05 北京深境智能科技有限公司 Information hiding and protecting method based on image
CN106027259A (en) * 2016-05-10 2016-10-12 河南理工大学 Two-dimensional code encryption method for logistics confidential information

Also Published As

Publication number Publication date
CN107644168A (en) 2018-01-30

Similar Documents

Publication Publication Date Title
CN105099692B (en) Security verification method and device, server and terminal
CN104765999B (en) Method, terminal and server for processing user resource information
CN104903904B (en) Bar code authentication for resource request
CN102103669B (en) Automatic safe control system and computer implemented method
US9059858B1 (en) User characteristic based digital signature of documents
CN107786331B (en) Data processing method, device, system and computer readable storage medium
CN104468531A (en) Authorization method, device and system for sensitive data
CN102970307B (en) Cipher safety system and password safety method
KR20140042905A (en) Identity authentication and management device and method thereof
CN107644168B (en) Information extraction method, terminal and computer readable storage medium
CN107992759B (en) Apparatus, method and computer readable storage medium for implementing electronic seal
WO2015039589A1 (en) User identity authorization system and authorization method based on bar codes
CN104517065A (en) Encrypting images on a client device for secure transmission and storage on a storage device
WO2016025756A1 (en) Form filling method and related terminal
US9166788B2 (en) Method and device for obtaining a security key
WO2020233047A1 (en) Page test method and apparatus
US20140115674A1 (en) Wireless communication system, portable terminal, digital camera, communication method, and computer-readable storage device
CN111193725B (en) Configuration-based combined login method and device and computer equipment
CN104253689A (en) User identity module card generated dynamic password authentication method and system based on QR (quick response) code
CN105162604A (en) Feature image identification based verification method and system, and verification server
CN104252613A (en) Method, device and terminal for obtaining virtual object
CN104951714A (en) Constellation based on device binding
CN115795538A (en) Desensitization document anti-desensitization method, apparatus, computer device and storage medium
CN109118187B (en) Block chain wallet recovery method and device and computer readable storage medium
CN112671796B (en) Google Driver cloud service authentication acquisition method, device, equipment and storage medium

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