CN108694326A - Text encryption method, apparatus and server - Google Patents
Text encryption method, apparatus and server Download PDFInfo
- Publication number
- CN108694326A CN108694326A CN201710233051.2A CN201710233051A CN108694326A CN 108694326 A CN108694326 A CN 108694326A CN 201710233051 A CN201710233051 A CN 201710233051A CN 108694326 A CN108694326 A CN 108694326A
- Authority
- CN
- China
- Prior art keywords
- word
- text
- cryptogam
- mentioned
- correspondence
- 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
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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Bioethics (AREA)
- Information Transfer Between Computers (AREA)
- Document Processing Apparatus (AREA)
Abstract
This application discloses text encryption method, apparatus and servers.This method includes:Obtain text to be shown;Display text is treated to be encrypted to obtain protection file;It determines text to be shown and protects the word correspondence between file, cryptogam is obtained by word correspondence.Protection file and cryptogam are only sent to terminal device, improve the safety confidentiality of text by the embodiment in the display request for receiving the text to be shown that terminal device is sent;After only being inquired protection file by cryptogam, just shows the word that text to be shown includes, further improve the safety confidentiality of text to be shown.
Description
Technical field
This application involves computer application technologies, and in particular to technical field of information processing more particularly to text add
Decryption method, device and server.
Background technology
Currently, the information of magnanimity is present on network, and people can find the information of needs by network.If these are believed
Breath provides free, and people can get off these free information preservations directly from network;If these information are not
Free (the problems such as being such as related to copyright), then user generally can not directly acquire these information.It is corresponding, informant to
Network with information there are many reason, the first kind the reason is that in order to other people free sharing informations, these information allow user to protect
It deposits;Second class is the reason is that publicize the information of oneself by network, it is contemplated that the factors such as copyright, this category information are generally gone through at encryption
Reason only allows the operations such as part is read, payment is read or payment is downloaded.
However, existing there is also some problems the encrypted method of information.For example, existing to the encrypted method of information
Typically text is sent to after client decryption and protects file using forbidding carrying out text by the way of duplication operation again, this
The ciphertext that class encryption method obtains is typically easy to by checking web page source code, intercepting the data of network transmission or to solution
Close software carries out the methods of converse works analyzing and obtains text before encrypting, and the safety of information is not high.
Invention content
In view of drawbacks described above in the prior art, the embodiment of the present application provides text encryption method, apparatus and server,
To solve the technical issues of background section above is mentioned.
In a first aspect, the embodiment of the present application provides a kind of text encryption method, the above method includes:Obtain text to be shown
This;Above-mentioned text to be shown is encrypted to obtain protection file;It determines between above-mentioned text to be shown and above-mentioned protection file
Word correspondence, cryptogam is obtained by above-mentioned word correspondence.
In some embodiments, above-mentioned to be encrypted to obtain protection file to above-mentioned text to be shown and include:Pass through pre-selection
The code-transferring method word that includes to above-mentioned text to be shown carry out word for word transcoding and obtain transcoding word, pass through above-mentioned transcoding word
Obtain protection file.
In some embodiments, the word correspondence between the above-mentioned text to be shown of above-mentioned determination and above-mentioned protection file
Including:Word for word determine the word pair between the transcoding word that the above-mentioned text to be shown word for including and above-mentioned protection file include
It should be related to, obtain initial word correspondence set;The word repeated in above-mentioned initial word correspondence set is deleted to correspond to
Relationship obtains secondary word correspondence set.
In some embodiments, the secondary word correspondence in above-mentioned secondary word correspondence set is to map one by one
Relationship.
In some embodiments, obtaining cryptogam above by above-mentioned word correspondence includes:By above-mentioned secondary
Word correspondence determines the character image with transcoding characters matching;It is given birth to by above-mentioned secondary word correspondence and character image
At cryptogam.
In some embodiments, the above method further includes:The query link between protection file and cryptogam is established, on
It states query link and is used to indicate the above-mentioned above-mentioned cryptogam of protection file polling.
In some embodiments, the above method further includes:When the word quantity that above-mentioned text to be shown includes is more than setting
When threshold value, above-mentioned text to be shown is divided into multiple Ziwen sheets to be shown;For turning for each this configuration of Ziwen pre-selection to be shown
Code method.
In some embodiments, the code-transferring method of the pre-selection between above-mentioned Ziwen sheet to be shown is different.
In some embodiments, the above method further includes:It above-mentioned waits showing for obtaining when receiving that terminal device sends
When showing the display request of text, above-mentioned protection file and cryptogam are sent to above-mentioned terminal device.
Second aspect, this application provides a kind of text encryption device, above-mentioned apparatus includes:Acquiring unit, for obtaining
Text to be shown;File obtaining unit is protected, protection file is obtained for above-mentioned text to be shown to be encrypted;Cryptogam
Generation unit passes through above-mentioned word for determining the word correspondence between above-mentioned text to be shown and above-mentioned protection file
Correspondence obtains cryptogam.
In some embodiments, above-mentioned protection file obtaining unit includes:It waits showing to above-mentioned by the code-transferring method of pre-selection
Show that word that text includes carries out word for word transcoding and obtains transcoding word, protection file is obtained by above-mentioned transcoding word.
In some embodiments, above-mentioned cryptogam generation unit includes:It is single that initial word correspondence set obtains son
Member, for word for word determining that the word that above-mentioned text to be shown includes is corresponding with the word between the transcoding word of above-mentioned protection file
Relationship obtains initial word correspondence set;Secondary word correspondence set obtains subelement, above-mentioned initial for deleting
The word correspondence repeated in word correspondence set, obtains secondary word correspondence set.
In some embodiments, the secondary word correspondence in above-mentioned secondary word correspondence set is to map one by one
Relationship.
In some embodiments, above-mentioned cryptogam generation unit further includes:Character image obtains subelement, for passing through
Above-mentioned secondary word correspondence determines the character image with transcoding characters matching;Cryptogam generates subelement, for passing through
Above-mentioned secondary word correspondence and character image generate cryptogam.
In some embodiments, above-mentioned apparatus further includes:Query link establishes unit, for establishing protection file and password
Query link between file, above-mentioned query link are used to indicate the above-mentioned above-mentioned cryptogam of protection file polling.
In some embodiments, above-mentioned apparatus further includes:Text division unit, for including in above-mentioned text to be shown
When word quantity is more than given threshold, above-mentioned text to be shown is divided into multiple Ziwen sheets to be shown;Code-transferring method configuration is single
Member, for the code-transferring method for each this configuration of Ziwen pre-selection to be shown.
In some embodiments, the code-transferring method of the pre-selection between above-mentioned Ziwen sheet to be shown is different.
In some embodiments, above-mentioned apparatus further includes:Information push unit, for receiving what terminal device was sent
When display for obtaining above-mentioned text to be shown is asked, above-mentioned protection file and cryptogam are sent to above-mentioned terminal and set
It is standby.
The third aspect, this application provides a kind of servers, including:One or more processors;Memory, for storing
One or more programs, when said one or multiple programs are executed by said one or multiple processors so that said one
Or multiple processors execute the text encryption method of above-mentioned first aspect.
Fourth aspect, this application provides a kind of computer readable storage mediums, are stored thereon with computer program, special
Sign is that the program realizes the text encryption method of above-mentioned first aspect when being executed by processor.
Text conversion to be shown is protection file, realized by text encryption method, apparatus provided by the present application and server
The protection for treating display text only will protection text when the display for receiving text to be shown that terminal device is sent is asked
Part and cryptogam are sent to terminal device, improve the safety of text to be shown;Only by cryptogam to protection text
After part is inquired, just shows the word that text to be shown includes, further improve the safety of text to be shown.
Description of the drawings
Non-limiting embodiment is described in detail with reference to made by the following drawings by reading, other features,
Objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the text encryption method of the application;
Fig. 3 is the flow chart according to one embodiment of the text display method of the application;
Fig. 4 is a schematic diagram according to the application scenarios of the text encryption method and text display method of the application;
Fig. 5 be corresponding diagram 4 be by text conversion to be shown protect file and cryptogam flow chart;
Fig. 6 is the flow chart of the word that text to be shown is shown by protection file and cryptogam of corresponding diagram 4;
Fig. 7 is the structural schematic diagram according to one embodiment of the text encryption device of the application;
Fig. 8 is the structural schematic diagram according to one embodiment of the textual display device of the application;
Fig. 9 is the structural schematic diagram according to one embodiment of the server of the application.
Specific implementation mode
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, is illustrated only in attached drawing and invent relevant part with related.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the exemplary system that can apply the text encryption method of the application or the embodiment of text encryption device
System framework 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105.
Network 104 between terminal device 101,102,103 and server 105 provide communication link medium.Network 104 can be with
Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
Terminal device 101,102,103 is interacted by network 104 with server 105, to obtain text to be shown etc..Terminal
Various data handling utilities, such as browser application, text display applications etc. can be installed in equipment 101,102,103.
Terminal device 101,102,103 can be operation application various electronic equipments, including but not limited to smart mobile phone,
Tablet computer, pocket computer on knee and desktop computer etc..
Server 105 can treat display text to be handled, and according to the request of terminal device 101,102,103,
Text to be shown is sent to the server that terminal device 101,102,103 is shown.For example, server 105 can be treated
Display text is encrypted, and obtains the protection file and cryptogam that correspond to text to be shown, and set receiving terminal
After standby 101,102,103 send acquisition text request to be shown, the corresponding protection file of text to be shown and ciphertext are sent out
Give terminal device 101,102,103.
It should be noted that the text encryption method that the embodiment of the present application is provided is executed by server 105.Correspondingly,
Text encryption device is generally positioned in server 105.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server.
Fig. 2, it illustrates a kind of flow chart 200 of one embodiment of text encryption method, text encryption method packets
It includes:
Step 201, text to be shown is obtained.
In the present embodiment, the equipment (such as in server shown in FIG. 1 105) of text encryption method operation thereon can
With by wired or wireless network, keyboard, speech recognition, Text region equipment, can the hard disk USB flash disk of plug or similar non-volatile
Property storage device etc. obtain text to be shown, or include the file of text to be shown, and with terminal device 101,102,103 into
Part of composing a piece of writing transmits.Text to be shown is destined to server 105, and terminal device 101,102,103 is allowed to be read
Text.The text to be shown of the present embodiment needs to be encrypted due to copyright etc..Server 105 can be text
Server or other servers that can be preserved and text is handled.Server 105 has for storing text to be shown
Storage device (such as hard disk), and be equipped with and treat the application that display text is encrypted.
Step 202, above-mentioned text to be shown is encrypted to obtain protection file.
After server 105 gets text to be shown, needs to treat display text and be encrypted, it can after encryption
To obtain corresponding to the protection file of text to be shown.
In some optional realization methods of the present embodiment, above-mentioned above-mentioned text to be shown is encrypted is protected
File may include:Word for word transcoding is carried out to the word that above-mentioned text to be shown includes by the code-transferring method of pre-selection and obtains transcoding
Word obtains protection file by above-mentioned transcoding word.
The code-transferring method of pre-selection can be any one concentrated based on various characters.In addition, the code-transferring method of pre-selection is also
User-defined character set can be used.It should be noted that pre-selection code-transferring method can be based on a certain character set with
The mode of machine transcoding still can be other modes, as long as other modes meet following conditions:1, text to be shown
Do not have between protection file it is apparent, can be by word correspondence that simple mathematical formula describes;2, in text to be shown
Any one word only corresponds to a transcoding word in protection file.3, protect any one transcoding word in file only right
Answer a word in text to be shown.4, there is the code-transferring method of different pre-selections for different texts to be shown, i.e., not
The word correspondence that the code-transferring method of same pre-selection provides should be not exactly the same.
The word that display text is treated by the code-transferring method of pre-selection carries out word for word transcoding, and the word of text to be shown is led to
The character set for crossing the code-transferring method of pre-selection finds corresponding transcoding word, and protection file is built by transcoding word.At this point, can not
By protecting the content of file directly to determine the content of text to be shown, the protection for treating display text is realized.For example, waiting showing
Show the word of text be " in ", the code-transferring method of pre-selection is random transcoding, based on character set be Unicode.Inquiry it is found that
" in " in Unicode it is encoded to 4e2d.Then 4e00,4e00 have been selected in Unicode by way of random transcoding
Word " one " is corresponded in Unicode, then will " in " replace with " one " (that is, establish " and in " word correspondence " one " between
Relationship).Similar, the word in text to be shown is all subjected to transcoding, has just obtained protection file.It should be noted that
When text transmits between server and terminal device, the content of text is all existing in an encoded form.For example, text exists
When being transmitted between server and terminal device, word that text includes be " in " show as coding 4e2d, only in protection file
Be opened display when, the system of server or terminal device can just search the corresponding character images of 4e2d (be shown as " and in " text
Word image), and be displayed on the screen, at this point, user see be only word " in ".Above-mentioned transcoding word is exactly each volume
Code.
Step 203, it determines the word correspondence between above-mentioned text to be shown and above-mentioned protection file, passes through above-mentioned text
Word correspondence obtains cryptogam.
Obtain protection file during, it may be determined that text to be shown and protection file between word it is correspondings pass
System, these word correspondences are saved to obtain cryptogam.
In some optional realization methods of the present embodiment, the above-mentioned above-mentioned text to be shown of determination and above-mentioned protection file
Between word correspondence may comprise steps of:
The first step, word for word determine transcoding word that the above-mentioned text to be shown word that includes includes with above-mentioned protection file it
Between word correspondence, obtain initial word correspondence set.
In the literal code-transfer that text to be shown is included by the character set of the code-transferring method above by pre-selection to protection file
When, it may be determined that the word correspondence between the word that text to be shown includes and the transcoding word for protecting file, that is, one
The word of text to be shown corresponds to the transcoding word of a protection file.Whole word correspondences is built into initial word
Correspondence set.
Second step deletes the word correspondence repeated in above-mentioned initial word correspondence set, obtains secondary word
Correspondence set.
Initial word correspondence set contains complete between the word of text to be shown and the transcoding word for protecting file
The word correspondence in portion.In general, comprising the word much repeated in text to be shown, it is corresponding to have the text much repeated
Word correspondence.And when by protecting the transcoding word of file to obtain the word of text to be shown, as long as each turn can be found
The word correspondence of code word.Therefore, the word repeated in initial word correspondence set can be deleted and correspond to pass
System, the word correspondence in the initial word correspondence set after word correspondence by deleting repetition, structure two
Secondary word correspondence set.I.e. secondary word correspondence set is that the text of repetition is deleted in initial word correspondence set
It is obtained after word correspondence.In order to ensure the accuracy of transcoding, the secondary word in above-mentioned secondary word correspondence set
Correspondence is mapping relations one by one.
In some optional realization methods of the present embodiment, obtaining cryptogam by above-mentioned word correspondence can be with
Include the following steps:
The first step determines the character image with transcoding characters matching by above-mentioned secondary word correspondence.
Cryptogam provides word correspondence for protection file, and by foregoing description, this word correspondence is character
Correspondence after the correspondence of coding and character image changes in collection Unicode.Therefore, it is necessary to according to secondary word
Correspondence determines the character image with transcoding characters matching.
The code-transferring method of pre-selection based on the character set character that includes be typically magnanimity, and for determining text to be shown
For this, many characters in the character set that the code-transferring method of pre-selection includes are not used.So text to be shown can be passed through
The word correspondence of this and protection file, selects text to be shown to use from the corresponding character set of code-transferring method of pre-selection
Character obtains cryptogam.Also by the word of above-mentioned text to be shown be " in " for, it is seen from the above description, to be shown
Word in text be " in " word " one " in corresponding protection file, that is, by word original in character set Unicode " in "
Corresponding coding 4e2d, the corresponding coding 4e00 of word " one ", be revised as word " in " corresponding coding 4e00, that is, establish and be different from
The word of character set Unicode and the correspondence of coding.Then, preserve word " in " character image, and establish the word
The correspondence of image and coding 4e00.That is, cryptogam only have recorded it is encrypted coding it is corresponding with the word of character image
Relationship (i.e. word " in " character image with coding 4e00 correspondence), there is no before recording of encrypted encode and encrypt after compile
Correspondence (correspondence i.e. without record coding 4e2d and encoding 4e00) between code.Therefore, even if user obtains
Cryptogam also voluntarily can not decrypt text to be shown by cryptogam.
Second step generates cryptogam by above-mentioned secondary word correspondence and character image.
Cryptogam can be generated after obtaining secondary word correspondence and character image.
In some optional realization methods of the present embodiment, the above method can also include:Establish protection file with it is close
Query link between code file, above-mentioned query link are used to indicate the above-mentioned above-mentioned cryptogam of protection file polling.
It is cryptogam that this word correspondence and character image of the word of text to be shown, which are packaged and (are generated),
And it establishes cryptogam and protects the query link of file.The query link is used to indicate the above-mentioned above-mentioned password of protection file polling
File.That is, protection file is when opening, it is necessary to which the word correspondence in the cryptogam indicated by query link is to protection
The word of file is inquired, and the character image for including by cryptogam is shown the word in protection file.Example
Such as, the word that the system of server or terminal device is found in protection file is encoded to 4e00, and then finds in cryptogam
Word correspondence be:4e00 correspond to word " in ", then from found in cryptogam word " in " character image, and will
" in " character image be displayed on the screen, what user saw be exactly word " in ".
In some optional realization methods of the present embodiment, the above method can also include the following steps:
The first step, when the word quantity that above-mentioned text to be shown includes is more than given threshold, by above-mentioned text to be shown
It is divided into multiple Ziwen sheets to be shown.
When the word quantity that text to be shown includes is more, and is more than given threshold, text to be shown can be divided
For multiple texts to be shown.For example, text to be shown includes 10000 words, this 10000 strokes can be divided into 10 and wait showing
Show Ziwen sheet.
Second step, for the code-transferring method of each this configuration of Ziwen pre-selection to be shown.
It can be respectively the code-transferring method of each this configuration of Ziwen pre-selection to be shown.Further, Ziwen sheet to be shown it
Between pre-selection code-transferring method it is different, improve the safety of Ziwen sheet to be shown.
In some optional realization methods of the present embodiment, the above method can also include:When receiving terminal device
When the display request for obtaining above-mentioned text to be shown sent, above-mentioned protection file and cryptogam are sent to above-mentioned end
End equipment.
The text to be shown of the present embodiment needs to be supplied to reader in the case that shielded.When reader get it is to be shown
After the relevant information of text, the display that can be sent to server 105 for obtaining above-mentioned text to be shown is asked.At this point, being
Text to be shown is not directly sent to terminal device by protection text to be shown, server 105, but will be with text to be shown
Corresponding protection file and cryptogam are sent to terminal device 101,102,103.Since terminal device 101,102,103 does not have
Text to be shown is obtained, and is only that of obtaining protection file and cryptogam, this improves the protections for treating display text.
Fig. 3, it illustrates a kind of flow chart 300 of one embodiment of text display method, text display methods packets
It includes:
Step 301, the display request for obtaining text to be shown is sent to text server.
Terminal device 101,102,103 can have browser application and various text applications.When user is set by terminal
After standby 101,102,103 get the relevant information of text to be shown, it can be taken to text by terminal device 101,102,103
Business device sends the display request for obtaining text to be shown.
Step 302, the protection file and cryptogam of the above-mentioned text to be shown of correspondence that text server is sent are received.
After server 105 receives the display request for obtaining text to be shown, it can will be obtained according to text to be shown
Protection file and cryptogam are sent to terminal device 101,102,103.Wherein, above-mentioned protection file is above-mentioned text to be shown
Content it is encrypted after obtained text, above-mentioned cryptogam includes the text between above-mentioned text to be shown and above-mentioned protection file
Word correspondence and character image.
Step 303, it is shown after being inquired above-mentioned protection file by above-mentioned cryptogam.
After terminal device 101,102,103 obtains cryptogam and protection file, need through cryptogam to protection text
Part can just obtain the word of text to be shown after being inquired, and by the text importing of text to be shown terminal device 101,
102, on 103 screen.The display format of the word of text to be shown can be a variety of, such as webpage format, display format can
It is not another herein to be the multiple format that can be supported according to the software of the hardware conditions such as the screen of terminal device or terminal device
One repeats.
In some optional realization methods of the present embodiment, above by above-mentioned cryptogam to above-mentioned protection file into
It shows and may comprise steps of after row inquiry:
The first step inquires the word of above-mentioned protection file by above-mentioned cryptogam to obtain above-mentioned text to be shown
Word.
Protection file is to treat the content transcode of display text according to the code-transferring method of above-mentioned pre-selection to obtain.Cryptogam
Then save word correspondence and character image.After terminal device 101,102,103 obtains protection file and cryptogam, lead to
Cryptogam is crossed to protecting the word of file to inquire, the word of text to be shown can be obtained.
The word of above-mentioned text to be shown is presented on above-mentioned terminal device by second step.
After obtaining the word of text to be shown, it will be able to by the word of text to be shown be presented on terminal device 101,102,
On 103 screen.
In some optional realization methods of the present embodiment, above by above-mentioned cryptogam to above-mentioned protection file
The word that word is inquired to obtain above-mentioned text to be shown may comprise steps of:
The first step extracts the transcoding word of above-mentioned protection file.
Protection file is treated display text and is word for word obtained after transcoding, and the word of text to be shown, needs in order to obtain
The transcoding word of extraction protection file first on terminal device 101,102,103.
Second step, according to the word correspondence in above-mentioned cryptogam to the transcoding word of above-mentioned protection file carry out by
Word is inquired to obtain the word of above-mentioned text to be shown.
Also by taking above-mentioned protection file and cryptogam as an example.Due to having inquiry chain between protection file and cryptogam
It connects, so, when opening protection file, the browser on terminal device must pass through query link and call password text terminal device
Part later inquires protection file by cryptogam, obtains the word of above-mentioned text to be shown.For example, protection file
In have coding 4e00, check that the word correspondence of cryptogam has:4e00 correspond to word " in ", then looked into from cryptogam
Look for word " in " character image, and by word " in " character image be shown on the screen of terminal device.At this point, user sees
Arrive be exactly text to be shown word " in ".And when user's copy protection file, due to being coding 4e00 in protection file,
When the content of duplication is pasted the place except protection file by user, the system on terminal device can show coding 4e00
For word " one ", to play the purpose for protecting text to be shown.
Support using operating system and web browser to cryptogam can ensure correctly to show text to be shown
While, it avoids other people from obtaining the corresponding actual computer system coding of word of text to be shown, prevents from copying, propagate, go out
Version text to be shown, improves the degree of protection to copyright.
It is a schematic diagram according to the application scenarios of the text encryption method of the present embodiment with continued reference to Fig. 4, Fig. 4.Fig. 4
In, text to be shown is supplied to text server by text provider to be shown.The code-transferring method that text server passes through pre-selection
It treats display text and carries out transcoding, obtain protection file and cryptogam.For example, treat display text content " in ", " text ",
" showing " and " example ", encryption obtain the protection content " one " of file, " fourth ", " Yu " corresponding with the word of " seven " and cryptogam pass
System:" 4e00 (one):In ", " 4e01 (fourth):Text ", " 4e02 (Yu):Show " and " 4e03 (seven):Example ".It should be noted that bracket
Interior content is only used for prompt under Unicode character set, what corresponding word is to these numbers originally;Content in bracket
In cryptogam and it is not present.When premises equipment requests text to be shown, by the protection file of correspondence text to be shown and
Cryptogam is sent to terminal device.Terminal device inquires protection file by cryptogam, obtains text to be shown
Word, by browsing device net page include on the screen of terminal device by the word of text to be shown.
In one embodiment, by text conversion to be shown be protect file and cryptogam flow chart as shown in figure 5,
Server obtains urtext (text i.e. to be shown).Then each character being successively read in text to be shown, and by pre-
The corresponding character set of code-transferring method of choosing by the character in text to be shown be converted to ciphertext Chinese character (such as above-mentioned " one ", " fourth ",
" Yu " and " seven "), protection file is constituted by ciphertext Chinese character, and generate corresponding cryptogam.
Show the flow chart of the word of text to be shown as shown in fig. 6, terminal device by protection file and cryptogam
The request for obtaining text to be shown is sent to server;Later, server is by the corresponding protection file of text to be shown and password
File is sent to terminal device, and terminal device obtains the word of text to be shown according to protection file and cryptogam, and will wait for
The word of display text is shown in by the form of webpage on the screen of terminal device.
Text conversion to be shown is protection file by text encryption method provided by the present application and text display method, when
When receiving the display request for the text to be shown that terminal is sent, protection file and cryptogam are only sent to terminal, improved
The confidentiality of text;Cryptogam only has recorded word correspondence and character image, there is no before recording of encrypted coding and
Correspondence between being encoded after encryption.It therefore, even if can not be voluntarily by cryptogam solution if user has obtained cryptogam
It is close go out text to be shown content.Cryptogam and protection file combine, and are only used for the figure of display original character, nothing
Protection file is decrypted in method, improves the safety of text.
With further reference to Fig. 7, as the realization to method shown in above-mentioned each figure, this application provides a kind of text encryption dresses
The one embodiment set, the device embodiment is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to respectively
In kind electronic equipment.
As shown in fig. 7, the above-mentioned text encryption device 700 of the present embodiment may include:Acquiring unit 701, protection file
Acquiring unit 702 and cryptogam generation unit 703.Wherein, acquiring unit 701, for obtaining text to be shown;Protect file
Acquiring unit 702 obtains protection file for above-mentioned text to be shown to be encrypted;Cryptogam generation unit 703, is used for
It determines the word correspondence between above-mentioned text to be shown and above-mentioned protection file, is obtained by above-mentioned word correspondence close
Code file.
In some optional realization methods of the present embodiment, above-mentioned protection file obtaining unit 702 may include passing through
The code-transferring method of pre-selection carries out word for word transcoding to the word that above-mentioned text to be shown includes and obtains transcoding word, passes through above-mentioned transcoding
Word obtains protection file.
In some optional realization methods of the present embodiment, above-mentioned cryptogam generation unit 703 may include:Initially
Word correspondence set obtains subelement (not shown) and secondary word correspondence set obtains subelement (in figure not
It shows).Wherein, initial word correspondence set obtains subelement, the text for including for word for word determining above-mentioned text to be shown
Word correspondence between word and the transcoding word of above-mentioned protection file obtains initial word correspondence set;Secondary text
Word correspondence set obtains subelement, and pass is corresponded to for deleting the word repeated in above-mentioned initial word correspondence set
System, obtains secondary word correspondence set.
In some optional realization methods of the present embodiment, the secondary word in above-mentioned secondary word correspondence set
Correspondence is mapping relations one by one.
In some optional realization methods of the present embodiment, above-mentioned cryptogam generation unit 703 can also include:Text
Word image obtains subelement (not shown) and cryptogam generates subelement (not shown).Wherein, character image obtains
Take subelement for determining the character image with transcoding characters matching by above-mentioned secondary word correspondence;Cryptogam generates
Subelement is used to generate cryptogam by above-mentioned secondary word correspondence and character image.
In some optional realization methods of the present embodiment, text encryption device 700 can also include:Query link is built
Vertical unit (not shown), for establishing the query link between protection file and cryptogam, above-mentioned query link is used for
Indicate the above-mentioned above-mentioned cryptogam of protection file polling.
In some optional realization methods of the present embodiment, text encryption device 700 can also include:Text divides single
First (not shown) and code-transferring method dispensing unit (not shown).Wherein, text division unit above-mentioned for waiting showing
When showing that the word quantity that text includes is more than given threshold, above-mentioned text to be shown is divided into multiple Ziwen sheets to be shown;Turn
Code method dispensing unit is used for the code-transferring method for each this configuration of Ziwen pre-selection to be shown.
In some optional realization methods of the present embodiment, the code-transferring method of the pre-selection between above-mentioned Ziwen sheet to be shown
It is different.
In some optional realization methods of the present embodiment, above-mentioned text encryption device 700 can also include:Information pushes away
Unit (not shown) is sent, for receiving the display request for obtaining above-mentioned text to be shown that terminal device sends
When, above-mentioned protection file and cryptogam are sent to above-mentioned terminal device.
With further reference to Fig. 8, as the realization to method shown in above-mentioned each figure, this application provides a kind of displays of text to fill
The one embodiment set, the embodiment of the method for the device embodiment as shown in figure 3 is corresponding, which specifically can be applied to respectively
In kind electronic equipment.
As shown in figure 8, the above-mentioned textual display device 800 of the present embodiment may include:Display request transmitting unit 801,
File reception unit 802 and display unit 803.Wherein, request transmitting unit 801 is shown, for being obtained to text server transmission
The display of text to be shown is taken to ask;File reception unit 802, for receiving, correspondence that above-mentioned text server is sent is above-mentioned to be waited for
The protection file and cryptogam of display text, above-mentioned protection file are to be obtained after the content of above-mentioned text to be shown is encrypted
Text, above-mentioned cryptogam include the text between the transcoding word in word and above-mentioned protection file in above-mentioned text to be shown
Word correspondence and character image;Display unit 803, after being inquired above-mentioned protection file by above-mentioned cryptogam
Display.
In some optional realization methods of the present embodiment, above-mentioned display unit 803 may include:Text to be shown obtains
Take subelement (not shown) and display subelement (not shown).Wherein, text to be shown obtains subelement, for leading to
Above-mentioned cryptogam is crossed the word of above-mentioned protection file is inquired to obtain the word of above-mentioned text to be shown;Display is single
Member, for the word of above-mentioned text to be shown to be presented on above-mentioned terminal device.
In some optional realization methods of the present embodiment, above-mentioned text to be shown obtains subelement and may include:Text
Word extraction module and text acquisition module to be shown.Wherein, Word Input module, the transcoding text for extracting above-mentioned protection file
Word;Text acquisition module to be shown, for turning to above-mentioned protection file according to the word correspondence in above-mentioned cryptogam
Code word carries out word for word inquiry and obtains the word of above-mentioned text to be shown.
The present embodiment additionally provides a kind of server, including:One or more processors;Memory, for storing one
Or multiple programs, when said one or multiple programs are executed by said one or multiple processors so that said one is more
A processor executes above-mentioned text encryption method.
The present embodiment additionally provides a kind of computer readable storage medium, is stored thereon with computer program, the program quilt
Processor realizes above-mentioned text encryption method when executing.
Below with reference to Fig. 9, it illustrates the structural schematic diagrams suitable for the server 900 for realizing the embodiment of the present application.
As shown in figure 9, server 900 includes central processing unit (CPU) 901, it can be according to being stored in read-only storage
Program in device (ROM) 902 is executed from the program that storage section 908 is loaded into random access storage device (RAM) 903
Various actions appropriate and processing.In RAM903, also it is stored with system 900 and operates required various programs and data.
CPU901, ROM902 and RAM903 are connected with each other by bus 904.Input/output (I/O) interface 905 is also connected to bus
904。
It is connected to I/O interfaces 905 with lower component:Importation 906 including keyboard, mouse etc.;Including such as liquid crystal
Show the output par, c 907 of device (LCD) etc. and loud speaker etc.;Storage section 908 including hard disk etc.;And including such as LAN
The communications portion 909 of the network interface card of card, modem etc..Communications portion 909 is executed via the network of such as internet
Communication process.Driver 910 is also according to needing to be connected to I/O interfaces 905.Detachable media 911, such as disk, CD, magneto-optic
Disk, semiconductor memory etc. are mounted on driver 910 as needed, in order to from the computer program root read thereon
According to needing to be mounted into storage section 908.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be tangibly embodied in machine readable
Computer program on medium, above computer program include the program code for method shown in execution flow chart.At this
In the embodiment of sample, which can be downloaded and installed by communications portion 909 from network, and/or from removable
Medium 911 is unloaded to be mounted.
Flow chart in attached drawing and block diagram, it is illustrated that according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part for a part for one module, program segment, or code of table, above-mentioned module, program segment, or code includes one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depended on the functions involved.Also it wants
It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong
The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer
The combination of order is realized.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit can also be arranged in the processor, for example, can be described as:A kind of processor packet
Include acquiring unit, protection file obtaining unit and cryptogam generation unit.Wherein, the title of these units is under certain conditions
The restriction to the unit itself is not constituted, for example, cryptogam generation unit is also described as " for obtaining password text
The unit of part ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, the non-volatile calculating
Machine storage medium can be nonvolatile computer storage media included in above-mentioned apparatus in above-described embodiment;Can also be
Individualism, without the nonvolatile computer storage media in supplying terminal.Above-mentioned nonvolatile computer storage media is deposited
One or more program is contained, when said one or multiple programs are executed by an equipment so that above equipment:It obtains
Text to be shown;Display text is treated to be encrypted to obtain protection file;It determines text to be shown and protects the text between file
Word correspondence obtains cryptogam by word correspondence.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art
Member should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature
Other technical solutions of arbitrary combination and formation.Such as features described above has similar work(with (but not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (20)
1. a kind of text encryption method, which is characterized in that the method includes:
Obtain text to be shown;
The text to be shown is encrypted to obtain protection file;
It determines the word correspondence between the text to be shown and the protection file, is obtained by the word correspondence
To cryptogam.
2. according to the method described in claim 1, it is characterized in that, the described text to be shown is encrypted is protected
File includes:
Word for word transcoding is carried out to the word that the text to be shown includes by the code-transferring method of pre-selection and obtains transcoding word, is passed through
The transcoding word obtains protection file.
3. according to the method described in claim 2, it is characterized in that, the determination text to be shown and the protection file
Between word correspondence include:
Word for word determine the word pair between the transcoding word that the word that the text to be shown includes and the protection file include
It should be related to, obtain initial word correspondence set;
The word correspondence repeated in the initial word correspondence set is deleted, secondary word set of correspondences is obtained
It closes.
4. according to the method described in claim 3, it is characterized in that, secondary word in the secondary word correspondence set
Correspondence is mapping relations one by one.
5. according to the method described in claim 3, it is characterized in that, described obtain cryptogam by the word correspondence
Including:
The character image with transcoding characters matching is determined by the secondary word correspondence;
Cryptogam is generated by the secondary word correspondence and character image.
6. according to the method described in claim 1, it is characterized in that, the method further includes:
The query link between protection file and cryptogam is established, the query link is used to indicate the protection file polling
The cryptogam.
7. according to the method described in claim 1, it is characterized in that, the method further includes:
When the word quantity that the text to be shown includes is more than given threshold, the text to be shown is divided into multiple wait for
Show Ziwen sheet;
For the code-transferring method of each this configuration of Ziwen pre-selection to be shown.
8. the method according to the description of claim 7 is characterized in that the code-transferring method of the pre-selection between the Ziwen sheet to be shown
It is different.
9. according to the method described in claim 1, it is characterized in that, the method further includes:
When receiving the display request for obtaining the text to be shown that terminal device sends, by the protection file with
Cryptogam is sent to the terminal device.
10. a kind of text encryption device, which is characterized in that described device includes:
Acquiring unit, for obtaining text to be shown;
File obtaining unit is protected, protection file is obtained for the text to be shown to be encrypted;
Cryptogam generation unit, for determining the word correspondence between the text to be shown and the protection file,
Cryptogam is obtained by the word correspondence.
11. device according to claim 10, which is characterized in that the protection file obtaining unit includes:
Word for word transcoding is carried out to the word that the text to be shown includes by the code-transferring method of pre-selection and obtains transcoding word, is passed through
The transcoding word obtains protection file.
12. according to the devices described in claim 11, which is characterized in that the cryptogam generation unit includes:
Initial word correspondence set obtains subelement, for word for word determine word that the text to be shown includes with it is described
The word correspondence between the transcoding word of file is protected, initial word correspondence set is obtained;
Secondary word correspondence set obtains subelement, for deleting the text repeated in the initial word correspondence set
Word correspondence obtains secondary word correspondence set.
13. according to the method for claim 12, which is characterized in that the secondary text in the secondary word correspondence set
Word correspondence is mapping relations one by one.
14. according to the method for claim 12, which is characterized in that the cryptogam generation unit further includes:
Character image obtains subelement, for determining the word figure with transcoding characters matching by the secondary word correspondence
Picture;
Cryptogam generates subelement, for generating cryptogam by the secondary word correspondence and character image.
15. device according to claim 10, which is characterized in that described device further includes:
Query link establishes unit, and for establishing the query link between protection file and cryptogam, the query link is used
The cryptogam described in the instruction protection file polling.
16. device according to claim 10, which is characterized in that described device further includes:
Text division unit waits showing when the word quantity for including in the text to be shown is more than given threshold by described
Show that text is divided into multiple Ziwen sheets to be shown;
Code-transferring method dispensing unit, for the code-transferring method for each this configuration of Ziwen pre-selection to be shown.
17. device according to claim 16, which is characterized in that the transcoding side of the pre-selection between the Ziwen sheet to be shown
Method is different.
18. device according to claim 10, which is characterized in that described device further includes:
Information push unit, for receiving the display request for obtaining the text to be shown that terminal device sends
When, the protection file and cryptogam are sent to the terminal device.
19. a kind of server, including:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors so that one or more of processors
Perform claim requires any text encryption method in 1 to 9.
20. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
The text encryption method as described in any in claim 1 to 9 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710233051.2A CN108694326A (en) | 2017-04-11 | 2017-04-11 | Text encryption method, apparatus and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710233051.2A CN108694326A (en) | 2017-04-11 | 2017-04-11 | Text encryption method, apparatus and server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108694326A true CN108694326A (en) | 2018-10-23 |
Family
ID=63842507
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710233051.2A Pending CN108694326A (en) | 2017-04-11 | 2017-04-11 | Text encryption method, apparatus and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108694326A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113536328A (en) * | 2020-04-21 | 2021-10-22 | 中国移动通信集团重庆有限公司 | Method and device for encrypting link library file and computing equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101309293A (en) * | 2008-06-27 | 2008-11-19 | 中国网络通信集团公司 | Authentication method and system based on hypertext transmission protocol |
CN102497270A (en) * | 2011-12-24 | 2012-06-13 | 王勇 | Encryption method of standardized document |
CN102542212A (en) * | 2010-12-24 | 2012-07-04 | 北大方正集团有限公司 | Text information hiding method and device |
KR101264286B1 (en) * | 2012-01-13 | 2013-05-22 | 고려대학교 산학협력단 | System and method for database encryption |
CN103136459A (en) * | 2013-01-09 | 2013-06-05 | 上海威客网络科技有限公司 | Copyright identification method and system for encrypted digital contents |
CN103646068A (en) * | 2013-12-04 | 2014-03-19 | Tcl集团股份有限公司 | Encryption method, decryption method, method for group messaging and corresponding devices thereof |
-
2017
- 2017-04-11 CN CN201710233051.2A patent/CN108694326A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101309293A (en) * | 2008-06-27 | 2008-11-19 | 中国网络通信集团公司 | Authentication method and system based on hypertext transmission protocol |
CN102542212A (en) * | 2010-12-24 | 2012-07-04 | 北大方正集团有限公司 | Text information hiding method and device |
CN102497270A (en) * | 2011-12-24 | 2012-06-13 | 王勇 | Encryption method of standardized document |
KR101264286B1 (en) * | 2012-01-13 | 2013-05-22 | 고려대학교 산학협력단 | System and method for database encryption |
CN103136459A (en) * | 2013-01-09 | 2013-06-05 | 上海威客网络科技有限公司 | Copyright identification method and system for encrypted digital contents |
CN103646068A (en) * | 2013-12-04 | 2014-03-19 | Tcl集团股份有限公司 | Encryption method, decryption method, method for group messaging and corresponding devices thereof |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113536328A (en) * | 2020-04-21 | 2021-10-22 | 中国移动通信集团重庆有限公司 | Method and device for encrypting link library file and computing equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9530012B2 (en) | Processing extensible markup language security messages using delta parsing technology | |
US9356936B2 (en) | Method and apparatus for managing access to electronic content | |
CN108647527B (en) | File packing method, file packing device, file unpacking device and network equipment | |
CN105141632B (en) | Method and apparatus for checking the page | |
CN108777685A (en) | Method and apparatus for handling information | |
CN113742005A (en) | Platform docking method and device | |
CN109408748A (en) | Method and apparatus for handling information | |
CN112256275A (en) | Code obfuscation method, device, electronic device and medium | |
CN115795538A (en) | Desensitization document anti-desensitization method, apparatus, computer device and storage medium | |
CN106203141A (en) | The data processing method of a kind of application and device | |
US7800517B2 (en) | Information processing apparatus, information processing method, and computer program | |
CN109635558A (en) | Access control method, device and system | |
CN108090768A (en) | The method and device that a kind of business performs | |
CN108694326A (en) | Text encryption method, apparatus and server | |
CN116644473A (en) | Data desensitization method and device | |
CN107729345B (en) | Website data processing method and device, website data processing platform and storage medium | |
KR101945687B1 (en) | Electronic document managing system using hybrid cloud and method for thereof | |
CN106575341A (en) | Composite document access | |
CN105893862A (en) | Browser cache data protection method and device | |
US20160371470A1 (en) | Assignment of a machine-readable ink to content as a payoff | |
CN108985109A (en) | A kind of date storage method and device | |
CN107707528A (en) | A kind of method and apparatus of user profile isolation | |
US11539521B2 (en) | Context based secure communication | |
CN109657480A (en) | A kind of document handling method, equipment and computer readable storage medium | |
CN107026841A (en) | The method and apparatus for issuing works in a network |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181023 |