CN106921805B - Encryption method and mobile terminal - Google Patents

Encryption method and mobile terminal Download PDF

Info

Publication number
CN106921805B
CN106921805B CN201710262029.0A CN201710262029A CN106921805B CN 106921805 B CN106921805 B CN 106921805B CN 201710262029 A CN201710262029 A CN 201710262029A CN 106921805 B CN106921805 B CN 106921805B
Authority
CN
China
Prior art keywords
encryption
communication information
mobile terminal
encrypted
value
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
CN201710262029.0A
Other languages
Chinese (zh)
Other versions
CN106921805A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710262029.0A priority Critical patent/CN106921805B/en
Publication of CN106921805A publication Critical patent/CN106921805A/en
Application granted granted Critical
Publication of CN106921805B publication Critical patent/CN106921805B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides an encryption method and a mobile terminal, wherein the encryption method is applied to the mobile terminal and comprises the following steps: receiving communication information and judging whether the mobile terminal is in an information encryption mode or not; when the mobile terminal is determined to be in an encryption mode, detecting an encryption keyword in the communication information, and calculating an encryption value of the communication information according to the encryption keyword; and encrypting the communication information according to the encryption value. Therefore, whether the communication information is encrypted or not is dynamically judged according to the current mode of the mobile terminal and the semantics of the communication information; the user can conveniently check the communication information in the idle state, and the user experience is greatly improved.

Description

Encryption method and mobile terminal
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to an encryption method and a mobile terminal.
Background
With the continuous development of terminal technology, more and more users communicate through mobile terminals; with the continuous increase of application programs, the communication mode of the user is not limited to making a call and sending a short message; social software may also be utilized for messaging, and the like.
Nowadays, personal privacy security is more and more emphasized, and after a mobile terminal of a user receives a message, how to encrypt the message received by the user is very important. In the prior art, an encryption function can be set in advance only by software aiming at a message sent by a specific contact person, and once the message is found to be the message of the corresponding contact person, encryption processing is carried out all at once; when the message is received in idle time, the password still needs to be input to check the message, and the operation is complicated.
Disclosure of Invention
The embodiment of the invention provides an encryption method, which aims to solve the problem that in the prior art, the operation of checking information in idle time is complicated because all information sent by a specific contact person is encrypted.
Correspondingly, the embodiment of the invention also provides a mobile terminal for ensuring the implementation of the encryption method.
In a first aspect, an encryption method is provided, which is applied to a mobile terminal, and specifically includes: receiving communication information and judging whether the mobile terminal is in an information encryption mode or not; when the mobile terminal is determined to be in an encryption mode, detecting an encryption keyword in the communication information, and calculating an encryption value of the communication information according to the encryption keyword; and encrypting the communication information according to the encryption value.
In a second aspect, a mobile terminal is provided, which specifically includes: the receiving module is used for receiving communication information and judging whether the mobile terminal is in an information encryption mode or not; the computing module is used for detecting an encryption keyword in the communication information when the mobile terminal is determined to be in an encryption mode, and computing an encryption value of the communication information according to the encryption keyword; and the encryption module is used for encrypting the communication information according to the encryption value.
Therefore, after receiving the communication information, the embodiment of the invention judges whether the mode of the mobile terminal is an encrypted mode; when the mobile terminal is determined to be in an encryption mode, semantic analysis is carried out on the content of the communication information; specifically, detecting an encryption keyword in the communication information, calculating an encryption value of the communication information according to the encryption keyword, and encrypting the communication information according to the encryption value; therefore, after the mobile terminal receives the communication information, whether the communication information is encrypted or not can be dynamically judged according to the current mode of the mobile terminal and the semantics of the communication information; when the mobile terminal is in an encryption mode and the communication information needs to be encrypted according to the semantics of the communication information, encrypting the communication information to ensure the information security of a user; when the mobile terminal is in a non-encryption mode, namely the user is in an idle state, encryption is not needed for any received communication information, so that the user can conveniently check the communication information in the idle state, and the user experience is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flow chart of the steps of one embodiment of an encryption method of the present invention;
FIG. 2 is a flow chart of the steps of another encryption method embodiment of the present invention;
FIG. 3 is a block diagram of a mobile terminal according to an embodiment of the present invention;
FIG. 4 is a block diagram of the architecture of another mobile terminal embodiment of the present invention;
FIG. 5 is a block diagram of one mobile terminal embodiment of the present invention;
fig. 6 is a schematic structural diagram of an embodiment of a mobile terminal according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of an embodiment of an encryption method of the present invention is shown, which may specifically include the following steps:
step 101, receiving communication information.
The encryption method provided by the embodiment of the invention is applied to the mobile terminal, the mobile terminal can communicate with other terminals, and in the communication process, the mobile terminal can receive communication information sent by other terminals. The other terminals can be mobile terminals such as mobile phones and tablet computers; or may be a PC terminal. The communication information includes a short message received by the mobile terminal through a Subscriber Identity Module (SIM) and a message received by social software, such as certain chat software.
And 102, judging whether the mobile terminal is in an information encryption mode.
In the embodiment of the invention, the mobile terminal can be used for turning on and off the encryption function of the mode in the mobile terminal in advance according to the operation of a user; the mode included in the mobile terminal may be a default mode that the mobile terminal already has, such as a standard mode, a conference mode, etc., or a home mode, a leisure mode, etc., in which a mode is added according to the operation of the user. After receiving the communication information, the mobile terminal can judge whether the communication information needs to be encrypted; specifically, when it is determined whether the communication information needs to be encrypted, it may be determined whether the mobile terminal is in an encryption mode, and when it is determined that the mobile terminal is in an information encryption mode, the semantics of the communication information may be analyzed to further determine whether the communication information needs to be encrypted, that is, step 103 is executed. And when the mobile terminal is determined not to be in the information encryption mode, the communication information does not need to be encrypted, and the step of ending is executed. When judging whether the mobile terminal is in an encryption mode, acquiring the current mode of the mobile terminal, and then judging whether the encryption function of the mode is started; if the encryption function of the mode is started, determining that the mobile terminal is in an information encryption mode; and if the encryption function of the mode is not started, determining that the mobile terminal is not in the information encryption mode.
And 103, detecting an encryption keyword in the communication information, and calculating an encryption value of the communication information according to the encryption keyword.
In the prior art, after a specific contact needing to be encrypted is set, all communication information sent by the specific contact is encrypted; the communication information sent by a specific contact person usually comprises contents needing to be encrypted and contents not needing to be encrypted; after the content which does not need to be encrypted is encrypted, the user of the mobile terminal still needs the password when checking the content which does not need to be encrypted, and the operation is complicated. Therefore, after the mobile terminal is determined to be in the information encryption mode, the embodiment of the invention can further determine whether the communication information needs to be encrypted according to the analysis of the semantics of the communication information. When the mobile terminal is determined to be in the information encryption mode, semantic analysis can be carried out on the communication information; specifically, whether the encrypted keyword exists in the communication information can be detected, for example, whether the encrypted keyword is matched with a preset character string, whether the encrypted keyword is matched with a preset keyword, and the like. The encryption key words are sensitive words related to the safety of user information, such as passwords, account numbers, money amounts and the like, and the sensitive words refer to all words which are not used properly or are not authorized to be contacted by people and are not beneficial to the privacy rights of individuals. In the embodiment of the present invention, the encrypted keyword includes a character string such as a character string corresponding to the verification code: 235425, character string corresponding to password: 111111, etc.; and words such as passwords, account numbers, phone numbers, and the like. When the communication information is detected to have the encryption key words, the encryption value of the communication information can be calculated according to the encryption key words, and if the encryption key words are weighted, the weighted calculation value is used as the encryption value. And when the encryption key words are not detected in the communication information, determining that sensitive words do not exist in the communication information, and then encrypting the communication information is not needed.
And step 104, encrypting the communication information according to the encryption value.
After determining the encryption value of the communication information, the communication information may be encrypted according to the encryption value. For example, the encrypted value is compared with the corresponding threshold value, and when the encrypted value reaches the threshold value, the communication information is encrypted. In the embodiment of the invention, after the communication information is encrypted, the prompt message of the communication information can be displayed on the screen locking screen of the mobile terminal, and the content of the communication information is hidden. When the user needs to check the communication information, the user can input a password or a fingerprint for checking.
After receiving the communication information, judging whether the mode of the mobile terminal is an encrypted mode or not; when the mobile terminal is determined to be in an encryption mode, semantic analysis is carried out on the content of the communication information; specifically, detecting an encryption keyword in the communication information, calculating an encryption value of the communication information according to the encryption keyword, and encrypting the communication information according to the encryption value; therefore, after the mobile terminal receives the communication information, whether the communication information is encrypted or not can be dynamically judged according to the current mode of the mobile terminal and the semantics of the communication information; when the mobile terminal is in an encryption mode and the communication information needs to be encrypted according to the semantics of the communication information, encrypting the communication information to ensure the information security of a user; when the mobile terminal is in a non-encryption mode, namely the user is in an idle state, encryption is not needed for any received communication information, so that the user can conveniently check the communication information in the idle state, and the user experience is greatly improved.
Example two
In another embodiment of the present invention, before calculating the encryption value of the communication information, it may be further determined whether the sender of the communication information is a contact of the mobile terminal; when the sender is the contact of the mobile terminal owner, the encryption value of the communication information can be calculated according to the correlation degree and the encryption key words of the sender and the mobile terminal owner. The following is a detailed description of a method for calculating an encryption value and a method for detecting an encryption keyword in the communication information.
Referring to fig. 2, a flow chart of steps of another embodiment of the encryption method of the present invention is shown, and the specific steps are as follows:
step 201, receiving communication information.
In the process of communicating with other terminals, the mobile terminal can receive short messages sent by any terminal through an SIM card, and can also receive messages sent by any terminal through social software in the mobile terminal.
Step 202, judging whether the mobile terminal is in an information encryption mode; if yes, go to step 203; if not, go to step 213.
In the embodiment of the invention, in order to ensure the safety of personal information of a user of the mobile terminal, after the communication information is received, whether the communication information needs to be encrypted or not can be judged according to the current mode of the mobile terminal and the semantics of the communication information; wherein the mode of the mobile terminal comprises: a standard mode, a silent mode, a conference mode, an outdoor mode, a home mode, and a vehicle-mounted mode; other modes may also be included, not to mention the modes that the mobile terminal includes. Specifically, it may be determined whether the mobile terminal is in an information encryption mode, and if the mobile terminal is in the information encryption mode, step 203 is executed; when the mobile terminal is not in the information encryption mode, step 213 is executed. The method comprises the steps of judging whether an encryption function of a mode in which the mobile terminal is located is started or not so as to judge whether the mobile terminal is in an information encryption mode or not. Wherein the mode of information encryption may include: a silent mode, a conference mode and a vehicle-mounted mode; other modes of the mobile terminal can be included, and the modes can be set according to requirements. In the embodiment of the present invention, the current mode of the mobile terminal may be determined according to the setting of the user, or may be determined according to the current time and the current position of the mobile terminal.
In the embodiment of the invention, the mobile terminal can analyze the semantics of the communication information when determining that the mobile terminal is in the information encryption mode through preliminary judgment so as to further judge whether the communication information needs to be encrypted. Specifically, the encryption key words in the communication information can be detected, and whether the communication information contains the encryption key words or not is judged, so that whether the communication information needs to be encrypted or not is judged according to the encryption key words; the specific steps for detecting the encrypted keyword in the communication information are as follows:
step 203, searching a character string matched with the regular expression in the communication information, and searching a word matched with a preset keyword in the communication information.
And 204, determining the character strings matched with the regular expression and the words matched with the preset keywords as the encryption keywords.
In the embodiment of the invention, when the encryption key words of the communication information are detected, the communication information can be matched with preset information so as to determine the encryption key words. The preset information can be any word or character string related to the personal information of the user. Specifically, if the preset information is a character string, a corresponding regular expression may be set for each character string, for example:
regular expression of fixed telephone number with area code: (\ d {3,4 })? -? \ d {7,8 };
regular expression of 11-digit mobile phone number: [1-9] [0-9] {10 };
regular expression of bank account: \ d {16,19 };
regular expression of password: \ {6 }; and so on.
The regular expression corresponding to each character string may also have other forms, and the embodiments of the present invention do not limit the form of the regular expression. In addition, besides the character strings corresponding to the fixed-line telephone, the mobile phone number, the bank account number and the password, the character strings in the preset information may also include character strings corresponding to various account numbers, such as game account numbers, member login account numbers of various websites and the like; the character string corresponding to the verification code, the character string corresponding to the amount, and the like are not listed herein. The regular expression is a logic formula for operating the character string, namely a 'regular character string' is formed by using a plurality of specific characters defined in advance and a combination of the specific characters, and the 'regular character string' is used for expressing a filtering logic for the character string; are typically used to retrieve and replace text that conforms to a certain pattern (rule). If the preset information is a word, the word is called a preset keyword; in the embodiment of the invention, any word can be set as a preset keyword such as a password, an amount, a verification code, a mobile phone number, an address and the like according to the requirement of a user. When detecting the encrypted keywords in the communication information, searching for corresponding encrypted keywords by using the regular expression and preset keywords, specifically, searching for character strings in the communication information matching with the regular expression, and searching for words in the communication information matching with the preset keywords; and then determining the character strings matched with the regular expression and words matched with the preset keywords as encryption keywords. In the embodiment of the present invention, if a character string matching the regular expression in the communication information is detected, and/or a word matching a preset keyword in the communication information is detected, it is determined that an encrypted keyword exists in the communication information, and step 205 may be executed. If the character string matched with the regular expression is not detected in the communication information and the word matched with the preset keyword is not detected, it is determined that the encrypted keyword does not exist in the communication information, the communication information does not need to be encrypted, and the communication information is displayed, that is, step 213 is executed.
Step 205, judging whether the sender of the communication information is a contact in the address book of the mobile terminal; if yes, go to step 206; if not, go to step 209.
After detecting the encryption key words, the embodiment of the invention can calculate the encryption value of the communication information according to the encryption key words; in order to increase the accuracy of the encrypted value, before calculating the encrypted value, it can be determined whether the sender of the communication information is a contact in the address book of the mobile terminal. If the sender of the communication information is a contact in the address book of the mobile terminal, executing step 206; if the sender of the communication information is not the contact in the address book of the mobile terminal, calculating the encrypted value of the communication information directly according to the encryption keyword, namely executing step 209.
And step 206, acquiring the grouping information and the communication record of the sender, and calculating the correlation between the sender and the mobile terminal owner according to the grouping information and the communication record.
And when the sender of the communication information is determined to be the contact in the address book of the mobile terminal, calculating the correlation between the sender and the owner of the mobile terminal so as to calculate the encryption value of the communication information. Specifically, the grouping information and the communication record of the sender in the address book of the mobile terminal can be obtained, and the correlation degree is calculated according to the grouping information and the communication record. The group information may be group information in an address book of a mobile terminal phone number, or group information in an address book of social software. The communication record comprises: the number of times the sender makes a call with the user of the mobile terminal (including video call and voice call), duration, number of times a message comes and goes, time existing in an address book, and the like.
And step 207, acquiring preset values and preset weights corresponding to the encryption keywords, and acquiring the preset weights corresponding to the correlation degrees.
And 208, performing weighted calculation by adopting preset values and preset weights of all the encrypted keywords, the correlation degrees and the corresponding preset weights, and determining the value obtained by the weighted calculation as the encrypted value of the communication information.
In the embodiment of the invention, the preset value and the preset weight of each encryption keyword and the preset weight of the correlation degree are preset. As shown in table 1, preset values and preset weights of several encryption keywords are listed in table 1.
Keyword/regular expression Preset score value Preset weight
(\d{3,4})?-?\d{7,8} 3.0 2.0
[1-9][0-9]{10} 2.5 3.0
\d{16,19} 7.0 4.0
Cipher code 7.5 4.0
Number (I) 2.0 1.0
Account number 5.0 4.5
TABLE 1
When calculating the encryption value, the preset value and the preset weight of each detected encryption keyword can be obtained, and meanwhile, the preset weight of the correlation degree also needs to be obtained; and performing weighted calculation according to the preset value and preset weight of each encrypted keyword and the preset weight of the correlation degree and the correlation degree, and determining the value obtained by weighted calculation as an encrypted value. For example, the communication information received by the mobile terminal is: "a certain website logs on the mobile phone number 1234568910, password 123456", this communication information is forwarded by the contact person in the address book of the user of the said mobile terminal, the correlation degree calculated is 6.8; the corresponding weight is 3.5; the cryptographic value can be calculated as: (2.0 × 1.0+7.5 × 4.0+3.0 × 2.0+6.8 × 3.5)/(1.0+2.0+4.0+3.5) ═ 5.885.
And 209, acquiring preset values and preset weights corresponding to the encrypted keywords, and performing weighted calculation by adopting the preset values and the preset weights of the encrypted keywords.
And step 210, determining the value of the weighted calculation as the encryption value of the communication information.
Since the steps 209-210 are similar to the steps 207-208, an example is taken as an example for illustration, and the description of the rest is omitted. For example, the mobile terminal receives the communication information sent by the user not in the address list: "a certain website logs on the mobile phone number 1234568910, password 123456", taking the preset value and preset weight corresponding to the encryption keyword in table 1 as an example, the encryption value can be calculated as: (2.0 × 1.0+7.5 × 4.0+3.0 × 2.0)/(1.0+2.0+4.0) ═ 5.425.
Step 211, judging whether the encryption value exceeds an encryption threshold value; if yes, go to step 212; if not, go to step 213.
After the encryption value is calculated, whether to encrypt the communication information may be determined according to the encryption value, specifically, the encryption value may be compared with a corresponding encryption threshold to determine whether the encryption value exceeds the encryption threshold, and when the encryption value exceeds the encryption threshold, the communication information may be encrypted, that is, step 212 is performed. When the encryption value does not exceed the encryption threshold value, the communication information does not need to be encrypted; step 213 is performed. Wherein, the encryption threshold value can be set according to actual conditions.
Step 212, encrypting the communication information according to a preset encryption algorithm.
When the encryption value is determined to exceed the encryption threshold value, encrypting the communication information according to a preset encryption algorithm, so that the mobile terminal cannot display the specific content of the communication information; the preset encryption algorithm can be set according to requirements, such as a symmetric encryption algorithm, an advanced encryption standard algorithm and the like.
And step 213, displaying the communication information.
And when the communication information is determined not to be encrypted, displaying the communication information in the mobile terminal.
When detecting the encrypted keywords in the communication information, searching the encrypted keywords from the communication information according to a regular expression and preset keywords; thereby improving the efficiency of searching for the encryption keyword. When the encryption value is calculated, the encryption value can be calculated according to the preset value and the corresponding preset weight of the encryption key word, the correlation degree between the sender of the communication information and the user of the mobile terminal and the corresponding preset weight, the accuracy of the encryption value is improved, and the accuracy of judging whether to encrypt the communication information is further improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
EXAMPLE III
Referring to fig. 3, a block diagram of a mobile terminal according to an embodiment of the present invention is shown, which can implement the above steps, and the mobile terminal may specifically include a receiving module 301, a calculating module 302, and an encrypting module 303, wherein,
a receiving module 301, configured to receive communication information and determine whether the mobile terminal is in an information encryption mode;
a calculating module 302, configured to detect an encryption keyword in the communication information when the receiving module 301 determines that the mobile terminal is in an encryption mode, and calculate an encryption value of the communication information according to the encryption keyword;
an encryption module 303, configured to encrypt the communication information according to the encryption value calculated by the calculation module 302.
Referring to fig. 4, a block diagram of a mobile terminal embodiment of the present invention is shown; in another embodiment of the present invention, the mobile terminal further includes: a decision block 304 and a correlation calculation block 305, wherein,
the judging module 304 is configured to judge whether the sender of the communication information is a contact in the address book of the mobile terminal.
The relevance calculating module 305 is configured to, when a sender of the communication information is a contact in the address book of the mobile terminal, obtain grouping information and a communication record of the sender, and calculate a relevance between the sender and an owner of the mobile terminal according to the grouping information and the communication record.
Preferably, the calculation module 302 of the embodiment of the present invention includes: a look-up sub-module 3021, a first weight calculation sub-module 3022 and a second weight calculation sub-module 3023, wherein,
the searching submodule 3021 is configured to search for a character string in the communication information, which is matched with the regular expression, and search for a word in the communication information, which is matched with a preset keyword; and determining the character strings matched with the regular expression and the words matched with the preset keywords as the encryption keywords.
The first weighting calculation submodule 3022 is configured to obtain a preset value and a preset weight corresponding to each encrypted keyword, and perform weighting calculation by using the preset value and the preset weight of each encrypted keyword; and determining the value of the weighted calculation as the encryption value of the communication information.
The second weighting calculation sub-module 3023 is configured to obtain preset values and preset weights corresponding to the encrypted keywords, and obtain preset weights corresponding to the correlation degrees; and performing weighted calculation by adopting preset values and preset weights of all the encrypted keywords, the correlation degrees and the corresponding preset weights, and determining the value of the weighted calculation as the encrypted value of the communication information.
Preferably, the encryption module 303 is specifically configured to determine whether the encrypted value calculated by the calculation module 303 exceeds an encryption threshold; and when the encryption value exceeds an encryption threshold value, encrypting the communication information according to a preset encryption algorithm.
Preferably, the calculating module 302 is specifically configured to calculate an encrypted value of the communication information according to the encrypted keyword when the sender of the communication information is not a contact in the address book of the mobile terminal.
Preferably, the modes include: a standard mode, a silent mode, a conference mode, an outdoor mode, a home mode, and a vehicle-mounted mode; the mode of information encryption comprises: silent mode, conference mode, and in-vehicle mode.
After receiving the communication information, judging whether the mode of the mobile terminal is an encrypted mode or not; when the mobile terminal is determined to be in an encryption mode, semantic analysis is carried out on the content of the communication information; specifically, detecting an encryption keyword in the communication information, calculating an encryption value of the communication information according to the encryption keyword, and encrypting the communication information according to the encryption value; therefore, after the mobile terminal receives the communication information, whether the communication information is encrypted or not can be dynamically judged according to the current mode of the mobile terminal and the semantics of the communication information; when the mobile terminal is in an encryption mode and the communication information needs to be encrypted according to the semantics of the communication information, encrypting the communication information to ensure the information security of a user; when the mobile terminal is in a non-encryption mode, namely the user is in an idle state, encryption is not needed for any received communication information, so that the user can conveniently check the communication information in the idle state, and the user experience is greatly improved.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Example four
Fig. 5 is a block diagram of a mobile terminal of one embodiment of the present invention. The mobile terminal 500 shown in fig. 5 includes: at least one processor 501, memory 502, at least one network interface 504, and a user interface 503. The various components in the mobile terminal 500 are coupled together by a bus system 505. It is understood that the bus system 505 is used to enable connection communications between these components. The bus system 505 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 505 in FIG. 5.
The user interface 503 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 502 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 502 of the subject systems and methods described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 502 stores elements, executable modules or data structures, or a subset thereof, or an expanded set thereof as follows: an operating system 5021 and application programs 5022.
The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application 5022 includes various applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. The program for implementing the method according to the embodiment of the present invention may be included in the application program 5022.
In the embodiment of the present invention, the processor 501 is configured to receive communication information and determine whether the mobile terminal is in an information encryption mode by calling a program or an instruction stored in the memory 502, specifically, a program or an instruction stored in the application 5022; when the mobile terminal is determined to be in an encryption mode, detecting an encryption keyword in the communication information, and calculating an encryption value of the communication information according to the encryption keyword; and encrypting the communication information according to the encryption value.
The method disclosed by the above-mentioned embodiments of the present invention may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 501. The Processor 501 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions of the present Application, or a combination thereof.
For a software implementation, the techniques of an embodiment of the invention may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions of the embodiments of the invention. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Optionally, the processor 501 is further configured to: searching a character string matched with the regular expression in the communication information, and searching a word matched with a preset keyword in the communication information; and determining the character strings matched with the regular expression and the words matched with the preset keywords as the encryption keywords.
Optionally, the processor 501 is further configured to: acquiring a preset value and a preset weight corresponding to each encrypted keyword, and performing weighted calculation by adopting the preset value and the preset weight of each encrypted keyword; and determining the value of the weighted calculation as the encryption value of the communication information.
Optionally, the processor 501 is further configured to: judging whether the encryption value exceeds an encryption threshold value; and when the encryption value exceeds an encryption threshold value, encrypting the communication information according to a preset encryption algorithm.
Optionally, the processor 501 is further configured to: judging whether the sender of the communication information is a contact person in the address book of the mobile terminal; if so, acquiring the grouping information and the communication record of the sender, and calculating the correlation degree between the sender and the mobile terminal owner according to the grouping information and the communication record; if not, the step of calculating the encrypted value of the communication information according to the encrypted keyword is executed.
Optionally, the processor 501 is further configured to: acquiring preset values and preset weights corresponding to the encrypted keywords, and acquiring preset weights corresponding to the correlation degrees; and performing weighted calculation by adopting preset values and preset weights of all the encrypted keywords, the correlation degrees and the corresponding preset weights, and determining the value of the weighted calculation as the encrypted value of the communication information.
The mobile terminal 500 can implement the processes implemented by the mobile terminal in the foregoing embodiments, and in order to avoid repetition, the detailed description is omitted here.
After receiving the communication information, judging whether the mode of the mobile terminal is an encrypted mode or not; when the mobile terminal is determined to be in an encryption mode, semantic analysis is carried out on the content of the communication information; specifically, detecting an encryption keyword in the communication information, calculating an encryption value of the communication information according to the encryption keyword, and encrypting the communication information according to the encryption value; therefore, after the mobile terminal receives the communication information, whether the communication information is encrypted or not can be dynamically judged according to the current mode of the mobile terminal and the semantics of the communication information; when the mobile terminal is in an encryption mode and the communication information needs to be encrypted according to the semantics of the communication information, encrypting the communication information to ensure the information security of a user; when the mobile terminal is in a non-encryption mode, namely the user is in an idle state, encryption is not needed for any received communication information, so that the user can conveniently check the communication information in the idle state, and the user experience is greatly improved.
EXAMPLE five
Fig. 6 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention. Specifically, the mobile terminal in fig. 6 may be a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), or a vehicle-mounted computer.
The mobile terminal includes a Radio Frequency (RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a processor 660, an audio circuit 670, a wifi (wireless fidelity) module 680, and a power supply 690 in fig. 6.
The input unit 630 may be used, among other things, to receive numeric or character information input by a user and to generate signal inputs related to user settings and function control of the mobile terminal. Specifically, in the embodiment of the present invention, the input unit 630 may include a touch panel 631. The touch panel 631, also referred to as a touch screen, may collect touch operations of a user (e.g., operations of the user on the touch panel 631 by using a finger, a stylus, or any other suitable object or accessory) thereon or nearby, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 631 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 660, and can receive and execute commands sent by the processor 660. In addition, the touch panel 631 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 631, the input unit 630 may also include other input devices 632, and the other input devices 632 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Among them, the display unit 640 may be used to display information input by a user or information provided to the user and various menu interfaces of the mobile terminal. The display unit 640 may include a display panel 641, and optionally, the display panel 641 may be configured in the form of an LCD or an Organic Light-Emitting Diode (OLED).
It should be noted that the touch panel 631 may cover the display panel 641 to form a touch display screen, and when the touch display screen detects a touch operation thereon or nearby, the touch display screen is transmitted to the processor 660 to determine the type of the touch event, and then the processor 660 provides a corresponding visual output on the touch display screen according to the type of the touch event.
The touch display screen comprises an application program interface display area and a common control display area. The arrangement modes of the application program interface display area and the common control display area are not limited, and can be an arrangement mode which can distinguish two display areas, such as vertical arrangement, left-right arrangement and the like. The application interface display area may be used to display an interface of an application. Each interface may contain at least one interface element such as an icon and/or widget desktop control for an application. The application interface display area may also be an empty interface that does not contain any content. The common control display area is used for displaying controls with high utilization rate, such as application icons like setting buttons, interface numbers, scroll bars, phone book icons and the like.
The processor 660 is a control center of the mobile terminal, connects various parts of the whole mobile phone by using various interfaces and lines, and executes various functions and processes data of the mobile terminal by operating or executing software programs and/or modules stored in the first memory 621 and calling data stored in the second memory 622, thereby performing overall monitoring of the mobile terminal. Optionally, processor 660 may include one or more processing units.
In the embodiment of the present invention, the processor 660 is configured to receive the communication information and determine whether the mobile terminal is in an information encryption mode by calling the software program and/or module stored in the first storage 621 and/or the data stored in the second storage 622; when the mobile terminal is determined to be in an encryption mode, detecting an encryption keyword in the communication information, and calculating an encryption value of the communication information according to the encryption keyword; and encrypting the communication information according to the encryption value.
Optionally, the processor 660 is further configured to: searching a character string matched with the regular expression in the communication information, and searching a word matched with a preset keyword in the communication information; and determining the character strings matched with the regular expression and the words matched with the preset keywords as the encryption keywords.
Optionally, the processor 660 is further configured to: acquiring a preset value and a preset weight corresponding to each encrypted keyword, and performing weighted calculation by adopting the preset value and the preset weight of each encrypted keyword; and determining the value of the weighted calculation as the encryption value of the communication information.
Optionally, the processor 660 is further configured to: judging whether the encryption value exceeds an encryption threshold value; and when the encryption value exceeds an encryption threshold value, encrypting the communication information according to a preset encryption algorithm.
Optionally, the processor 660 is further configured to: judging whether the sender of the communication information is a contact person in the address book of the mobile terminal; if so, acquiring the grouping information and the communication record of the sender, and calculating the correlation degree between the sender and the mobile terminal owner according to the grouping information and the communication record; if not, the step of calculating the encrypted value of the communication information according to the encrypted keyword is executed.
Optionally, the processor 660 is further configured to: acquiring preset values and preset weights corresponding to the encrypted keywords, and acquiring preset weights corresponding to the correlation degrees; and performing weighted calculation by adopting preset values and preset weights of all the encrypted keywords, the correlation degrees and the corresponding preset weights, and determining the value of the weighted calculation as the encrypted value of the communication information.
The mobile terminal can implement each process implemented by the mobile terminal in the foregoing embodiments, and details are not described here to avoid repetition.
After receiving the communication information, judging whether the mode of the mobile terminal is an encrypted mode or not; when the mobile terminal is determined to be in an encryption mode, semantic analysis is carried out on the content of the communication information; specifically, detecting an encryption keyword in the communication information, calculating an encryption value of the communication information according to the encryption keyword, and encrypting the communication information according to the encryption value; therefore, after the mobile terminal receives the communication information, whether the communication information is encrypted or not can be dynamically judged according to the current mode of the mobile terminal and the semantics of the communication information; when the mobile terminal is in an encryption mode and the communication information needs to be encrypted according to the semantics of the communication information, encrypting the communication information to ensure the information security of a user; when the mobile terminal is in a non-encryption mode, namely the user is in an idle state, encryption is not needed for any received communication information, so that the user can conveniently check the communication information in the idle state, and the user experience is greatly improved.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. 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 and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. An encryption method applied to a mobile terminal includes:
receiving communication information and judging whether the mobile terminal is in an information encryption mode or not; the judging whether the mobile terminal is in an information encryption mode comprises the following steps: judging whether the communication information needs to be encrypted according to the current contextual model of the mobile terminal, and judging whether the mobile terminal is in an information encryption mode when the communication information needs to be encrypted;
when the mobile terminal is determined to be in an encryption mode, detecting an encryption keyword in the communication information, and calculating an encryption value of the communication information according to the encryption keyword;
encrypting the communication information according to the encryption value;
the step of calculating the encryption value of the communication information according to the encryption keyword comprises the following steps: acquiring preset values and preset weights corresponding to the encrypted keywords, and performing weighted calculation by adopting the preset values and the preset weights of the encrypted keywords, and the correlation between the sender of the communication information and the user of the mobile terminal and the corresponding preset weights; determining the value of the weighted calculation as the encryption value of the communication information;
the step of encrypting the communication information according to the encryption value comprises:
judging whether the encryption value exceeds an encryption threshold value;
and when the encryption value exceeds an encryption threshold value, encrypting the communication information according to a preset encryption algorithm.
2. The method of claim 1, wherein the step of detecting the encryption key in the communication comprises:
searching a character string matched with the regular expression in the communication information, and searching a word matched with a preset keyword in the communication information;
and determining the character strings matched with the regular expression and the words matched with the preset keywords as the encryption keywords.
3. The method according to claim 1, wherein after the step of determining that the mobile terminal is in the encryption mode and before the step of calculating the encryption value of the communication information according to the encryption key, the method further comprises:
judging whether the sender of the communication information is a contact person in the address book of the mobile terminal;
if so, acquiring the grouping information and the communication record of the sender, and calculating the correlation degree between the sender and the mobile terminal owner according to the grouping information and the communication record;
if not, the step of calculating the encrypted value of the communication information according to the encrypted keyword is executed.
4. The method according to claim 3, wherein the step of calculating the encrypted value of the communication information according to the encryption key word when the sender of the communication information is a contact in the address book of the mobile terminal comprises:
acquiring preset values and preset weights corresponding to the encrypted keywords, and acquiring preset weights corresponding to the correlation degrees;
and performing weighted calculation by adopting preset values and preset weights of all the encrypted keywords, the correlation degrees and the corresponding preset weights, and determining the value of the weighted calculation as the encrypted value of the communication information.
5. A mobile terminal, comprising:
the receiving module is used for receiving communication information and judging whether the mobile terminal is in an information encryption mode or not;
the computing module is used for detecting an encryption keyword in the communication information when the receiving module determines that the mobile terminal is in an encryption mode, and computing an encryption value of the communication information according to the encryption keyword;
the encryption module is used for encrypting the communication information according to the encryption value calculated by the calculation module;
the calculation module comprises: the second weighting calculation sub-module is used for acquiring preset values and preset weights corresponding to the encrypted keywords, performing weighting calculation by adopting the preset values and the preset weights of the encrypted keywords and the correlation between the sender of the communication information and the user of the mobile terminal and the corresponding preset weights, and determining the weighted calculation value as the encrypted value of the communication information;
the encryption module is specifically configured to determine whether the encrypted value calculated by the calculation module exceeds an encryption threshold; when the encryption value exceeds an encryption threshold value, encrypting the communication information according to a preset encryption algorithm;
the receiving module is specifically configured to determine whether the communication information needs to be encrypted according to a current contextual model of the mobile terminal, and determine whether the mobile terminal is in an information encryption mode when it is determined that the communication information needs to be encrypted.
6. The mobile terminal of claim 5, wherein the computing module comprises:
the searching submodule is used for searching a character string matched with the regular expression in the communication information and searching a word matched with a preset keyword in the communication information; and determining the character strings matched with the regular expression and the words matched with the preset keywords as the encryption keywords.
7. The mobile terminal of claim 5, further comprising:
the judging module is used for judging whether the sender of the communication information is a contact person in the address list of the mobile terminal;
the correlation calculation module is used for acquiring the grouping information and the communication record of the sender when the sender of the communication information is a contact in the address book of the mobile terminal, and calculating the correlation between the sender and the owner of the mobile terminal according to the grouping information and the communication record;
the calculation module is specifically configured to calculate an encrypted value of the communication information according to the encrypted keyword when the sender of the communication information is not a contact in the address book of the mobile terminal.
CN201710262029.0A 2017-04-20 2017-04-20 Encryption method and mobile terminal Active CN106921805B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710262029.0A CN106921805B (en) 2017-04-20 2017-04-20 Encryption method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710262029.0A CN106921805B (en) 2017-04-20 2017-04-20 Encryption method and mobile terminal

Publications (2)

Publication Number Publication Date
CN106921805A CN106921805A (en) 2017-07-04
CN106921805B true CN106921805B (en) 2021-04-23

Family

ID=59567391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710262029.0A Active CN106921805B (en) 2017-04-20 2017-04-20 Encryption method and mobile terminal

Country Status (1)

Country Link
CN (1) CN106921805B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114239028A (en) * 2021-12-20 2022-03-25 中国平安财产保险股份有限公司 Data processing method and device, computer equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916233A (en) * 2014-03-28 2014-07-09 小米科技有限责任公司 Information encryption method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010011179A1 (en) * 2008-07-25 2010-01-28 Resolvo Systems Pte Ltd System and method for preventing leakage of sensitive digital information on a digital communication network
CN102111730B (en) * 2011-04-02 2013-07-31 北京互通无限科技有限公司 Mobile terminal address list-based information-distributing method and system
CN105809042A (en) * 2014-12-31 2016-07-27 中兴通讯股份有限公司 Information protection method and device, information display method and device, and terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916233A (en) * 2014-03-28 2014-07-09 小米科技有限责任公司 Information encryption method and device

Also Published As

Publication number Publication date
CN106921805A (en) 2017-07-04

Similar Documents

Publication Publication Date Title
AU2012227187B2 (en) Location-based security system for portable electronic device
EP2836957B1 (en) Location-based access control for portable electronic device
CN106778130B (en) Message display method, display device and mobile terminal
AU2011312743B2 (en) Multiple-access-level lock screen
US9275210B2 (en) System and method of enhancing security of a wireless device through usage pattern detection
CN104239804A (en) Data protecting method and device
CN104008346A (en) Method and device for starting privacy mode of data processing device
CN105868617B (en) Application program encryption method and mobile terminal
CN108737638B (en) Application control method and device, mobile terminal and computer readable medium
US20180218134A1 (en) Determining computer ownership
WO2017088745A1 (en) Information processing method and apparatus, and electronic device
US20180349580A1 (en) Information processing method and device, and electronic equipment
CN107506198B (en) Display method of mobile terminal and mobile terminal
US9398450B2 (en) Mobile survey tools with added security
TW201826158A (en) Method, Device and Terminal for Displaying Data
US9513779B2 (en) Device and method for improving efficiency of entering a password using a key-limited keyboard
CN106446626B (en) Mobile terminal unlocking method and mobile terminal
CN107577933B (en) Application login method and device, computer equipment and computer readable storage medium
CN106921805B (en) Encryption method and mobile terminal
CN104811304B (en) Identity verification method and device
WO2017000343A1 (en) Fingerprint unlocking method and terminal
US20230121470A1 (en) Preventing phishing attempts of one-time passwords
KR102164301B1 (en) System and Method for log in based on server easily
CN106888223B (en) User account login method and mobile terminal
US9015798B1 (en) User authentication using pointing device

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