CN110955713A - Mnemonic word generating method and device and storage medium - Google Patents

Mnemonic word generating method and device and storage medium Download PDF

Info

Publication number
CN110955713A
CN110955713A CN201911178054.6A CN201911178054A CN110955713A CN 110955713 A CN110955713 A CN 110955713A CN 201911178054 A CN201911178054 A CN 201911178054A CN 110955713 A CN110955713 A CN 110955713A
Authority
CN
China
Prior art keywords
mapping
word
string
target
speech
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
Application number
CN201911178054.6A
Other languages
Chinese (zh)
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.)
Shanghai Zhongxin Information Development Co ltd
Original Assignee
Shanghai Zhongxin Information Development 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 Shanghai Zhongxin Information Development Co ltd filed Critical Shanghai Zhongxin Information Development Co ltd
Priority to CN201911178054.6A priority Critical patent/CN110955713A/en
Publication of CN110955713A publication Critical patent/CN110955713A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • Machine Translation (AREA)

Abstract

The application provides a method, a device and a storage medium for generating mnemonics, wherein the method comprises the following steps: acquiring a target digit string, wherein the target digit string comprises a random number and a check code generated based on the random number; sequentially dividing the target digit string into a plurality of mapping digit sections; determining a corresponding preset word bank according to the position parameter of each mapping number field, and inquiring the corresponding word from the corresponding preset word bank according to each mapping number field; and arranging the inquired words according to the sequence of the mapping number fields in the target number strings to generate mnemonics.

Description

Mnemonic word generating method and device and storage medium
Technical Field
The present application relates to the field of block chains, and in particular, to a method, an apparatus, and a storage medium for generating mnemonics.
Background
The block chain wallet mnemonic words are a group of auxiliary memory words generated before the private key is made, and have the same function as the private key.
The main mnemonic word generation method of the current block chain is to generate twelve English words or twelve Chinese characters as mnemonic words based on the BIP-39 protocol, but the mnemonic words generated by the existing method are inconvenient for the user to memorize.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an apparatus, and a storage medium for generating mnemonics, so as to solve the problem that mnemonics generated by the existing method are not convenient for a user to memorize.
In a first aspect, an embodiment provides a mnemonic word generation method, which includes: acquiring a target digit string, wherein the target digit string comprises a random number and a check code generated based on the random number; sequentially dividing the target digit string into a plurality of mapping digit sections; determining a corresponding preset word bank according to the position parameter of each mapping number field, and inquiring the preset word bank according to each mapping number field to obtain a corresponding vocabulary; and arranging the inquired words according to the sequence of the mapping number fields in the target number string to generate mnemonics.
In the method for generating the mnemonic words, the corresponding vocabulary is searched in the corresponding word stock according to the sequence of the plurality of mapping digit fields and the mapping digit fields, and then the mnemonic words are sequentially combined according to the sequence of the mapping digit fields, so that the generated mnemonic words have better memorability compared with the existing English words or the combination of single words, the mnemonic effect of the mnemonic words is improved, and the mnemonic words are convenient for a user to remember.
In an alternative embodiment of the first aspect, the step of sequentially dividing the string of digits into a plurality of mapped digits comprises: dividing the target digit string into a plurality of first mapping digit sections and a plurality of second mapping digit sections which are sequentially arranged, wherein each first mapping digit section corresponds to a preset word stock, and each second mapping digit section corresponds to a preset word stock; arranging the inquired words according to the sequence of the mapping number fields in the target number string to form mnemonics, and the method comprises the following steps: arranging the words queried by each mapping number field into a first short sentence according to the sequence of each mapping number field in the target number string in the plurality of first mapping number fields; arranging the words queried by each mapping number field into a second short sentence according to the sequence of each mapping number field in the plurality of second mapping number fields in the target number string; and combining the first short sentence and the second short sentence to form the mnemonic word.
In an optional implementation manner of the first aspect, the preset thesaurus includes a plurality of thesaurus with different parts of speech, and before the obtaining of the target numeric string, the method further includes: extracting a plurality of vocabularies with different parts of speech from a database; establishing a word bank with corresponding parts of speech according to the vocabularies with the same parts of speech to obtain a plurality of word banks with different parts of speech; associating the word banks of different parts of speech with a plurality of location parameters, wherein each location parameter is associated with one word bank; and associating each vocabulary in each word stock with a mapping number field.
In an alternative embodiment of the first aspect, the vocabularies with different parts of speech include adjectives, nouns, place names and verbs, and the extracting a plurality of vocabularies with different parts of speech from the database includes: extracting a plurality of nouns, verbs and adjectives from a Chinese word library, and extracting a plurality of place names from a Chinese country place name information library; the establishing of word banks with corresponding parts of speech according to the words with the same parts of speech to obtain a plurality of word banks with different parts of speech includes: generating the noun word stock according to the extracted nouns and generating the verb word stock according to the extracted verbs; adding stop words to the tail of each extracted adjective, and generating the adjective word bank according to a plurality of adjectives added with the stop words; and adding prepositions to the head of each extracted place name word, and generating the place name word bank according to a plurality of place names added with prepositions.
In the three embodiments of the above design, the position of the mapping number field corresponds to a preset part-of-speech lexicon, and the Chinese part-of-speech and sentence pattern structure are sequentially associated with the mapping number field, so that the formed mnemonic words conform to the Chinese sentence pattern structure and Chinese reading habits, and the user can conveniently memorize the mnemonic words.
In an optional implementation manner of the first aspect, the obtaining the target digit string includes: acquiring a random number, wherein the random number is a binary number with a first preset length; obtaining a hash check code of the random number; and generating the target digit string according to the check code of the preset bit in the Hash check code and the random number.
In a second aspect, an embodiment provides a mnemonic word generation apparatus, including: the device comprises an acquisition module, a verification module and a verification module, wherein the acquisition module is used for acquiring a target digit string, and the target digit string comprises a random number and a verification code generated based on the random number; the decomposition module is used for sequentially dividing the target digit string into a plurality of mapping digit sections; the determining module is used for determining a corresponding preset word bank according to the position parameter of each mapping number field; the query module is used for querying a corresponding vocabulary from a corresponding preset word stock according to each mapping number field; and the generating module is used for arranging the inquired words into mnemonics according to the sequence of the mapping number fields in the target number strings.
In the memory-aid word generating device, corresponding words are searched in the corresponding word stock according to the sequence of the plurality of mapping digit fields and the mapping digit fields, and then the memory-aid words are sequentially combined according to the sequence of the mapping digit fields, so that the generated memory-aid words have better memorability than the existing combination of English words or single words, the memory-aid function of the memory-aid words is improved, and the memory of a user is facilitated.
In an optional implementation manner of the second aspect, the decomposition module is specifically configured to divide the target digit string into a plurality of first mapping digit sections and a plurality of second mapping digit sections, which are sequentially arranged, where each first mapping digit section corresponds to a preset word bank, and each second mapping digit section corresponds to a preset word bank; the generating module is specifically configured to arrange the words queried by each mapping number segment according to the sequence of each mapping number segment in the plurality of first mapping number segments in the target number string to form a first short sentence; arranging the words queried by each mapping number field into a second short sentence according to the sequence of each mapping number field in the plurality of second mapping number fields in the target number string; and combining the first short sentence and the second short sentence to form the mnemonic word.
In an optional implementation manner of the second aspect, the preset word bank includes a plurality of word banks with different parts of speech, and the apparatus further includes an extraction module configured to extract a plurality of words with different parts of speech from the database before the acquisition module acquires the target numeric string; the establishing module is used for establishing a word stock with corresponding parts of speech according to the vocabularies with the same parts of speech so as to obtain a plurality of word stocks with different parts of speech; the association module is used for associating the word banks with different parts of speech with a plurality of position parameters, wherein each position parameter is associated with one word bank; and associating each vocabulary in each word stock with a mapping number field.
In an optional implementation manner of the second aspect, the extraction module is specifically configured to extract a plurality of nouns, verbs, and adjectives from a chinese word library, and extract a plurality of place names from a chinese country place name information library; the establishing module is specifically used for generating the noun word stock according to the extracted nouns and generating the verb word stock according to the extracted verbs; adding stop words to the tail of each extracted adjective, and generating the adjective word bank according to a plurality of adjectives added with the stop words; and adding prepositions to the head of each extracted place name word, and generating the place name word bank according to a plurality of place names added with prepositions.
In an optional implementation manner of the second aspect, the obtaining module is specifically configured to obtain a random number, where the random number is a binary number having a first preset length; obtaining a hash check code of the random number; and generating the target digit string according to the check code of the preset bit in the Hash check code and the random number.
In a third aspect, an embodiment provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to perform the method in the first aspect or any optional implementation manner of the first aspect.
In a fourth aspect, embodiments provide a non-transitory readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first aspect, any optional implementation manner of the first aspect.
In a fifth aspect, embodiments provide a computer program product, which when run on a computer, causes the computer to execute the method of the first aspect or any optional implementation manner of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
FIG. 1 is a first flowchart of a method for generating mnemonics according to a first embodiment of the present application;
FIG. 2 is a second flowchart of a method for generating mnemonics according to the first embodiment of the present application;
FIG. 3 is a third flowchart of a method for generating mnemonics according to the first embodiment of the present application;
FIG. 4 is a fourth flowchart of a mnemonic generation method according to the first embodiment of the present application;
fig. 5 is a structural diagram of a mnemonic word generation apparatus according to a second embodiment of the present application;
fig. 6 is a block diagram of an electronic device according to a third embodiment of the present application.
Icon: 200-an obtaining module; 202-a decomposition module; 204-a determination module; 206-a query module; 208-a generation module; 210-an extraction module; 212-a setup module; 214-an association module; 3-an electronic device; 301-a processor; 302-a memory; 303-communication bus.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
First embodiment
As shown in fig. 1, an embodiment of the present application provides a method for generating mnemonics, which specifically includes the following steps:
step S100: a target digit string is obtained, wherein the target digit string comprises a random number and a check code generated based on the random number.
Step S102: the string of target digits is sequentially divided into a plurality of mapped digit sections.
Step S104: and determining a corresponding preset word bank according to the position parameter of each mapping number field, and inquiring the corresponding word from the corresponding preset word bank according to each mapping number field.
Step S106: and arranging the inquired words according to the sequence of the mapping number fields in the target number strings to generate mnemonics.
In step S100, the random number may be a random number with a predetermined number of bits generated according to a random algorithm, for example, the random number may be a 128-bit or 256-bit binary random number, the check code is also a binary string with a certain number of bits, the number of bits of the check code is equal to a quotient of the predetermined number of bits of the random number and 32, for example, when the random number is 128 bits, the number of bits of the check code is 4 bits, the target number string is composed of the random number and the verification code, and when the random number is 128 bits, the target number string is a binary string with 132 bits.
In step S102, the target digit string is sequentially divided into a plurality of mapping digit sections, specifically, the target digit string is sequentially divided into a plurality of mapping digit sections from the maximum digit to the minimum digit of the target digit string by a certain number. For example, based on the foregoing example, when the target digit string is a 132-bit binary digit string, 11 bits are used as the digits of one mapping digit field, the target digit string is sequentially divided into 12 mapping digit fields, and in this case, each mapping digit field is an 11-bit binary digit string, and step S104 is further performed.
In step S104, a corresponding preset word library is determined according to the position parameter of each mapping number segment, where the position parameter of each mapping number segment is the position parameter of each mapping number segment in the target number string, and based on the foregoing example, the target number string is 132 bits, and the 11 bits are sequentially divided into 12 mapping number segments by taking the 11 bits as the number of bits of one mapping number segment, and if the target number string is divided from the maximum number bit (left) to the minimum number bit (last right bit), then the target number string is divided from the maximum number bit (first left bit) to the 11 th left bit as the first mapping number segment, and so on, 12 mapping number segments with the ordering positions of 1 to 12 respectively can be obtained, and the position parameter of each mapping number segment corresponds to a preset word library. Then, in step S104, a corresponding vocabulary is obtained by querying from the corresponding preset lexicon according to each mapping number segment, which can be understood as that each vocabulary in the preset lexicon can be associated with the mapping number segment, specifically, each vocabulary in the preset lexicon can be associated with a numerical value of the mapping number segment, the numerical value can be the binary value of the foregoing example, or an octal or decimal value corresponding to the binary value, and each vocabulary in the preset lexicon corresponds to a different numerical value respectively. On the basis, a plurality of vocabularies can be found through the divided mapping number sections, for example, on the basis of the example, the divided twelve mapping number sections can find corresponding twelve vocabularies. And then, executing step S106, and arranging the queried words according to the sequence of the plurality of mapping number segments in the target number string to generate mnemonics, which can be understood in this step, after finding the word corresponding to each mapping number segment in step S104, combining the found words according to the sequential sequence condition of the mapping number segments, thereby forming the mnemonics.
In the method for generating the mnemonic words, the corresponding vocabulary is searched in the corresponding word stock according to the sequence of the plurality of mapping digit fields and the mapping digit fields, and then the mnemonic words are sequentially combined according to the sequence of the mapping digit fields, so that the generated mnemonic words have better memorability compared with the existing English words or the combination of single words, the mnemonic effect of the mnemonic words is improved, and the mnemonic words are convenient for a user to remember.
In an optional implementation manner of this embodiment, the preset lexicon may include a plurality of lexicons with different parts of speech, and before the step S100 is executed to obtain the target numeric string, the preset lexicon may be constructed first, as shown in fig. 2, the construction process is specifically as follows:
step S90: a plurality of words having different parts of speech are extracted from a database.
Step S92: and establishing a word bank with corresponding parts of speech according to the words with the same parts of speech to obtain a plurality of word banks with different parts of speech.
Step S94: and associating a plurality of word banks with different parts of speech with a plurality of position parameters, wherein each position parameter is associated with one word bank.
Step S96: each vocabulary in each lexicon is associated with a mapping number field.
Extracting various vocabularies with different parts of speech from the database in step S90 and establishing a lexicon with corresponding parts of speech according to the vocabularies with the same parts of speech in step S92, wherein the vocabularies with different parts of speech may include adjectives, nouns, place names and verbs, the adjectives, the nouns and the verbs may be extracted from a chinese lexicon, specifically, from the "mainland china, taiwan and hong kong chinese lexicon", in which 43097 nonrepeated two-character vocabularies are shared, and when the random number is 128 bits, 2048 nonrepeated nouns, verbs and adjectives may be extracted from the "mainland china, taiwan and hong kong chinese lexicon library"; generating a corresponding noun word library and a corresponding verb word library according to the extracted nouns and verbs; in order to make the generation of mnemonic words smooth, a stop word, for example, of "is added after each extracted adjective, and an adjective word stock is generated according to a plurality of adjectives after the addition of" is added; the place names can be extracted from a Chinese country place name information base to generate a place name word base, the Chinese country place name information base has 3211 place names in province, city and county, 2048 place names with no more than four characters can be extracted. In order to make the generated mnemonic words smooth, prepositions can be added in front of each place name, for example, after the place name is added, a place name word library is generated according to the place name added with prepositions, and an adjective word library, a noun word library, a place name word library and a verb word library can be obtained.
Based on the above steps, step S94 is executed to associate a plurality of word bases of different parts of speech with a plurality of position parameters, which may be understood as associating each word base of part of speech with a position parameter of the mapping number field, for example, assuming that the target number field is divided into six mapping number fields, a first corresponding adjective word base, a second corresponding noun word base, a third corresponding place name word base, a fourth corresponding verb base, a fifth corresponding adjective word base and a sixth corresponding noun word base can be ordered, so that the final combination of the mnemonics is a sentence pattern of fixed language + main language + object + predicate + fixed language + object, and such a sentence pattern structure conforms to the sentence format of chinese, so that the formed mnemonics are easier to memorize. The mapping number field may also be twelve mapping number fields as described in the foregoing examples, and the word stock corresponding to each rank may also be adjusted at any time.
Further executing step S96, corresponding the vocabulary in the lexicon corresponding to each position to the mapping number field of the position, for example, corresponding the vocabulary in the lexicon corresponding to each position to the value of the mapping number field of the position, for example, the aforementioned adjective lexicon is ordered first correspondingly, 2048 vocabularies are collected in the adjective lexicon, and these 2048 vocabularies are respectively corresponding to 1 to 2048, and the aforementioned target number field is a 132-bit binary number, then each mapping number field is corresponding to an 11-bit binary number, and further the 11-bit binary number can be converted into a decimal number, and further the vocabulary corresponding to the decimal number is searched in the lexicon according to the converted decimal number, and further the vocabulary corresponding to the mapping number field is obtained.
In an optional implementation manner of this embodiment, the step S102 sequentially divides the target digit string into a plurality of mapping digit sections, as shown in fig. 3, the method may specifically include the following steps:
step S1020: the string of digits is sequentially divided into a plurality of first mapped number segments and a plurality of second mapped number segments.
On this basis, step S106 arranges the vocabulary obtained by the query into mnemonics according to the sequence of the plurality of mapping numeric fields in the target numeric string, which may specifically be:
step S1060: and arranging the words queried by each mapping number field into a first short sentence according to the sequence of each mapping number field in the plurality of first mapping number fields in the target number string.
Step S1062: and arranging the words queried by each mapping number field into a second short sentence according to the sequence of each mapping number field in the plurality of second mapping number fields in the target number string.
Step S1064: and combining the first short sentence and the second short sentence to form the mnemonic word.
In step S1020, the target digit string is sequentially divided into a plurality of first mapping digit segments and a plurality of second mapping digit segments, which may be understood as dividing the target digit string into two segments, for example, taking the 132-bit target digit string as an example, taking 66-bit as one segment, dividing the 132-bit target digit string into two segments, taking the 11-bit target digit string as an example, dividing the first 66-bit into 6 first mapping digit segments, dividing the last 66-bit into 6 second mapping digit segments, obtaining a first short sentence composed of the first 66-bit and a second short sentence composed of the last 66-bit according to the word base corresponding to each position parameter in step S94, and combining the first short sentence composed of the first 66-bit and the short sentence composed of the last 66-bit, that is, arranging the first short sentences and the second short sentences composed of the last 66-bit in sequence, so as to form the mnemonics.
In an optional implementation manner of this embodiment, as shown in fig. 4, the step S100 of acquiring the target character string may specifically be:
step S1000: acquiring a random number, wherein the random number is a binary number with a first preset length.
Step S1002: and acquiring the hash check code of the random number.
Step S1004: and generating a target digit string according to the check code of the preset bit in the Hash check code and the random number.
In step S1000, in the foregoing example, the random number may be a 128-bit or 256-bit binary number, which may be generated by a random algorithm and may also be referred to as an initial entropy value, and then step S1002 is performed. The manner of obtaining the hash check code of the random number in step S1002 may be to hash the random number to obtain a hash value of the random number, that is, the hash check code, where the specific hash algorithm may be a sha256 hash algorithm.
In step S1004, the target digit string is generated according to the check code with preset bits in the hash check code and the random number, and it can be understood that after the hash check code is obtained in step S1002, the preset bits of the hash check code, that is, the number of bits corresponding to the difference between the length of the random number and 32, where the random number is 128 bits, for example, the intercepted check code is the first 4-bit digit string of the hash check code, and the intercepted 4-bit digit string check code is added to the end of the random number, so as to generate the target character string.
Based on all the above steps, a 128-bit random number [11001010,11100110,00110011...... multidot. 10101100,01101110] is taken as an example.
After the 128-bit random number is obtained through a random algorithm, the random number is hashed, so as to obtain a hash check code, which is as follows:
hash=sha256([11001010,11100110,00110011,......,10101100,01001110])=1010....;
since the random number is 128 bits, the first 4 bits (i.e. 1010) of the hash check code are taken as the check code, and the check code is added to the end of the random number to generate a target character string, where the obtained target character string specifically is:
[11001010,11100110,00110011,......,10101100,01101110]1010。
on the basis of obtaining the target character string, taking preset 11 bits as an intercepting segment, dividing the target character string into twelve mapping number segments, dividing the first 6 mapping number segments into a first group, dividing the last 6 mapping number segments into a second group, and setting corresponding adjective word libraries of the first and fifth mapping number segments in the first group; the mapping number fields of the second group and the sixth group correspond to noun word banks; the mapping number field ordered to the third in the first group corresponds to a place name word library, and the mapping number field ordered to the fourth in the first group corresponds to a verb word library; the mapping number field and the word stock in the second group have the same corresponding relation as those in the first group.
On the basis of the above, the corresponding vocabulary can be found in the corresponding word stock according to the numerical value of each mapping numerical segment, wherein the decimal value corresponding to each mapping numerical segment can be used for indexing, for example, the decimal value corresponding to 11001010111 which is the first in the first group is 1623, and the vocabulary corresponding to the index is found in the corresponding adjective word stock, for example, the obtained vocabulary is "real"; according to the above example, each mapping number field in the first group may be found to correspond to a corresponding word, for example, the noun found by the second mapping number field is "friend"; the place name searched by the mapping number field in the third sorting is 'in Shaanxi province'; the verb found by the mapping number field of the fourth sequence is 'purchase'; the adjective searched by the mapping number field in the fifth sequence is 'hot'; the noun found by the mapping number field of the sixth sequence is "royal", so that the phrase consisting of the first group can be obtained as "real royal of a friend buying fire and heat in Shaanxi province". In the foregoing manner, a second group of constituent phrases, such as "stubborn elephant explores sophisticated cell phones in the new region of Pudong"; then the short sentences formed by the two groups are combined to form a mnemonic word that real friends buy the royal palace of fire and heat in Shaanxi province; the stubborn elephant explores delicate cell phones in the new region of Pudong.
The position of the mapping number field corresponds to a preset part-of-speech word stock, Chinese part-of-speech and sentence pattern structure are sequentially associated with the mapping number field, and the formed mnemonic words conform to the Chinese sentence pattern structure and Chinese reading habits, so that the mnemonic words are convenient for a user to memorize.
Second embodiment
Fig. 5 shows a schematic structural block diagram of a mnemonic word generation device provided by the present application, and it should be understood that the device corresponds to the method embodiments in fig. 1 to 4, and can execute the steps involved in the method in the first embodiment, and the specific functions of the device can be referred to the description above, and the detailed description is appropriately omitted here to avoid repetition. The device includes at least one software function that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device. Specifically, the apparatus includes: an obtaining module 200, configured to obtain a target digit string, where the target digit string includes a random number and a check code generated based on the random number; a decomposition module 202, configured to sequentially divide the target digit string into a plurality of mapping digit sections; a determining module 204, configured to determine a corresponding preset lexicon according to the position parameter of each mapping number segment; the query module 206 is configured to query the corresponding word from the corresponding preset lexicon according to each mapping number field to obtain a corresponding vocabulary; and the generating module 208 is configured to arrange the queried vocabulary into mnemonics according to the sequence of the plurality of mapping number segments in the target number string.
In the memory-aid word generating device, corresponding words are searched in the corresponding word stock according to the sequence of the plurality of mapping digit fields and the mapping digit fields, and then the memory-aid words are sequentially combined according to the sequence of the mapping digit fields, so that the generated memory-aid words have better memorability than the existing combination of English words or single words, the memory-aid function of the memory-aid words is improved, and the memory of a user is facilitated.
In an optional implementation manner of this embodiment, the decomposition module 202 is specifically configured to divide the target digit string into a plurality of first mapping digit sections and a plurality of second mapping digit sections, which are sequentially arranged, where each first mapping digit section corresponds to a preset word bank, and each second mapping digit section corresponds to a preset word bank; the generating module 208 is specifically configured to arrange the words queried by each mapping number segment according to the sequence of each mapping number segment in the plurality of first mapping number segments in the target number string to form a first short sentence; arranging the words inquired by each mapping number field into a second short sentence according to the sequence of each mapping number field in the plurality of second mapping number fields in the target number string; and combining the first short sentence and the second short sentence to form the mnemonic word.
In an optional implementation manner of this embodiment, the preset word library includes a plurality of word libraries with different parts of speech, and the apparatus further includes an extraction module 210, configured to extract a plurality of words with different parts of speech from the database before the obtaining module 200 obtains the target numeric string; an establishing module 212, configured to establish a word bank with corresponding parts of speech according to the vocabulary with the same parts of speech to obtain a plurality of word banks with different parts of speech; an association module 214, configured to associate a plurality of word banks with different parts of speech with a plurality of location parameters, where each location parameter is associated with one word bank; and associating each vocabulary in each lexicon with a mapping number field.
In an optional implementation manner of this embodiment, the extraction module 210 is specifically configured to extract a plurality of nouns, verbs, and adjectives from a chinese word library, and extract a plurality of place names from a chinese country place name information library; the establishing module 212 is specifically configured to generate a noun word library according to the extracted nouns and generate a verb word library according to the extracted verbs; adding stop words to the tail of each extracted adjective, and generating an adjective word bank according to a plurality of adjectives added with the stop words; and adding prepositions to the head of each extracted place name word, and generating a place name word bank according to a plurality of place names added with prepositions.
Third embodiment
As shown in fig. 6, the present application provides an electronic device 3 comprising: a processor 301 and a memory 302, the processor 301 and the memory 302 being interconnected and communicating with each other via a communication bus 303 and/or other form of connection mechanism (not shown), the memory 302 storing a computer program executable by the processor 301, the processor 301 executing the computer program when the computing device is running to perform the method of the first embodiment, any alternative implementation of the first embodiment, such as steps S100 to S106: acquiring a target digit string, wherein the target digit string comprises a random number and a check code generated based on the random number; sequentially dividing the target digit string into a plurality of mapping digit sections; determining a corresponding preset word bank according to the position parameter of each mapping number field, and inquiring the corresponding word from the corresponding preset word bank according to each mapping number field; and arranging the inquired words according to the sequence of the mapping number fields in the target number strings to generate mnemonics.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first embodiment, any of the alternative implementations of the first embodiment.
The storage medium may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The present application provides a computer program product which, when run on a computer, causes the computer to perform the method of the first embodiment, any of its alternative implementations.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and 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 of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, 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.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including 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 application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A mnemonic generation method, comprising:
acquiring a target digit string, wherein the target digit string comprises a random number and a check code generated based on the random number;
sequentially dividing the target digit string into a plurality of mapping digit sections;
determining a corresponding preset word bank according to the position parameter of each mapping number field, and inquiring the corresponding word from the corresponding preset word bank according to each mapping number field;
and arranging the inquired words according to the sequence of the mapping number fields in the target number string to generate mnemonics.
2. The method of claim 1, wherein said sequentially dividing said string of digits into a plurality of mapped digits comprises:
dividing the target digit string into a plurality of first mapping digit sections and a plurality of second mapping digit sections which are sequentially arranged, wherein each first mapping digit section corresponds to a preset word stock, and each second mapping digit section corresponds to a preset word stock;
arranging the inquired words according to the sequence of the mapping number fields in the target number string to form mnemonics, and the method comprises the following steps:
arranging the words queried by each mapping number field into a first short sentence according to the sequence of each mapping number field in the target number string in the plurality of first mapping number fields;
arranging the words queried by each mapping number field into a second short sentence according to the sequence of each mapping number field in the plurality of second mapping number fields in the target number string;
and combining the first short sentence and the second short sentence to form the mnemonic word.
3. The method of claim 1, wherein the predetermined thesaurus comprises a plurality of thesaurus with different parts of speech, and before the obtaining of the target numeric string, the method further comprises:
extracting a plurality of vocabularies with different parts of speech from a database;
establishing a word bank with corresponding parts of speech according to the vocabularies with the same parts of speech to obtain a plurality of word banks with different parts of speech;
associating a plurality of word banks of different parts of speech with a plurality of location parameters, wherein each location parameter is associated with one word bank;
and associating each vocabulary in each word stock with a mapping number field.
4. The method of claim 3, wherein the vocabulary with different parts of speech includes adjectives, nouns, place names and verbs, and wherein the extracting the plurality of vocabularies with different parts of speech from the database comprises:
extracting a plurality of nouns, verbs and adjectives from a Chinese word library, and extracting a plurality of place names from a place name information library;
the establishing of word banks with corresponding parts of speech according to the words with the same parts of speech to obtain a plurality of word banks with different parts of speech includes:
generating a noun word library according to the extracted nouns and generating a verb word library according to the extracted verbs;
adding stop words to the tail of each extracted adjective, and generating an adjective word bank according to a plurality of adjectives added with the stop words;
and adding prepositions to the head of each extracted place name word, and generating a place name word bank according to a plurality of place names added with prepositions.
5. The method of claim 1, wherein obtaining the string of digits comprises:
acquiring a random number, wherein the random number is a binary number with a first preset length;
obtaining a hash check code of the random number;
and generating the target digit string according to the check code of the preset bit in the Hash check code and the random number.
6. A mnemonic generation apparatus, comprising:
the device comprises an acquisition module, a verification module and a verification module, wherein the acquisition module is used for acquiring a target digit string, and the target digit string comprises a random number and a verification code generated based on the random number;
the decomposition module is used for sequentially dividing the target digit string into a plurality of mapping digit sections;
the determining module is used for determining a corresponding preset word bank according to the position parameter of each mapping number field;
the query module is used for querying a corresponding vocabulary from a corresponding preset word stock according to each mapping number field;
and the generating module is used for arranging the inquired words into mnemonics according to the sequence of the mapping number fields in the target number strings.
7. The apparatus of claim 6, wherein the decomposition module is specifically configured to divide the target digit string into a plurality of first mapping digit sections and a plurality of second mapping digit sections, which are sequentially arranged, each of the first mapping digit sections corresponds to a predetermined word bank, and each of the second mapping digit sections corresponds to a predetermined word bank;
the generating module is specifically configured to arrange the words queried by each mapping number segment according to the sequence of each mapping number segment in the plurality of first mapping number segments in the target number string to form a first short sentence;
arranging the words queried by each mapping number field into a second short sentence according to the sequence of each mapping number field in the plurality of second mapping number fields in the target number string;
and combining the first short sentence and the second short sentence to form the mnemonic word.
8. The apparatus according to claim 6, wherein the predetermined thesaurus includes a plurality of thesaurus with different parts of speech, the apparatus further comprising an extraction module for extracting a plurality of vocabularies with different parts of speech from the database before the target numeric string is obtained by the obtaining module; the establishing module is used for establishing a word stock with corresponding parts of speech according to the vocabularies with the same parts of speech so as to obtain a plurality of word stocks with different parts of speech; the system comprises an association module, a processing module and a display module, wherein the association module is used for associating a plurality of word banks with different parts of speech with a plurality of position parameters, and each position parameter is associated with one word bank; and associating each vocabulary in each word stock with a mapping number field.
9. An electronic device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the method of any of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 5.
CN201911178054.6A 2019-11-26 2019-11-26 Mnemonic word generating method and device and storage medium Pending CN110955713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911178054.6A CN110955713A (en) 2019-11-26 2019-11-26 Mnemonic word generating method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911178054.6A CN110955713A (en) 2019-11-26 2019-11-26 Mnemonic word generating method and device and storage medium

Publications (1)

Publication Number Publication Date
CN110955713A true CN110955713A (en) 2020-04-03

Family

ID=69977057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911178054.6A Pending CN110955713A (en) 2019-11-26 2019-11-26 Mnemonic word generating method and device and storage medium

Country Status (1)

Country Link
CN (1) CN110955713A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651964A (en) * 2020-06-03 2020-09-11 江苏恒宝智能系统技术有限公司 Symbol mnemonic word generating and converting method and device and electronic equipment
CN112561525A (en) * 2020-12-16 2021-03-26 深圳市大中华区块链科技有限公司 Block chain biological face recognition method and system
CN112688994A (en) * 2020-12-16 2021-04-20 深圳市大中华区块链科技有限公司 Block chain biological fingerprint identification method and system
CN116011431A (en) * 2023-03-22 2023-04-25 暗链科技(深圳)有限公司 Method for generating mnemonic words and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102067511A (en) * 2008-06-16 2011-05-18 高通股份有限公司 Method and apparatus for generating hash mnemonics
CN108768631A (en) * 2018-05-28 2018-11-06 夸克链科技(深圳)有限公司 A kind of block chain private key recovery mnemonic word System Design
CN109067529A (en) * 2018-09-09 2018-12-21 成都量安区块链科技有限公司 A kind of production method of block chain private key for user
CN109474420A (en) * 2018-10-26 2019-03-15 深圳市元征科技股份有限公司 A kind of private key backup method and relevant device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102067511A (en) * 2008-06-16 2011-05-18 高通股份有限公司 Method and apparatus for generating hash mnemonics
CN108768631A (en) * 2018-05-28 2018-11-06 夸克链科技(深圳)有限公司 A kind of block chain private key recovery mnemonic word System Design
CN109067529A (en) * 2018-09-09 2018-12-21 成都量安区块链科技有限公司 A kind of production method of block chain private key for user
CN109474420A (en) * 2018-10-26 2019-03-15 深圳市元征科技股份有限公司 A kind of private key backup method and relevant device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651964A (en) * 2020-06-03 2020-09-11 江苏恒宝智能系统技术有限公司 Symbol mnemonic word generating and converting method and device and electronic equipment
CN111651964B (en) * 2020-06-03 2023-09-12 江苏恒宝智能系统技术有限公司 Symbol mnemonic word generation and conversion method and device and electronic equipment
CN112561525A (en) * 2020-12-16 2021-03-26 深圳市大中华区块链科技有限公司 Block chain biological face recognition method and system
CN112688994A (en) * 2020-12-16 2021-04-20 深圳市大中华区块链科技有限公司 Block chain biological fingerprint identification method and system
CN116011431A (en) * 2023-03-22 2023-04-25 暗链科技(深圳)有限公司 Method for generating mnemonic words and electronic equipment

Similar Documents

Publication Publication Date Title
CN110955713A (en) Mnemonic word generating method and device and storage medium
US8055498B2 (en) Systems and methods for building an electronic dictionary of multi-word names and for performing fuzzy searches in the dictionary
KR102268875B1 (en) System and method for inputting text into electronic devices
JP5603250B2 (en) Archive management method for approximate string matching
US5640575A (en) Method and apparatus of translation based on patterns
US4775956A (en) Method and system for information storing and retrieval using word stems and derivative pattern codes representing familes of affixes
JP2009266244A (en) System and method of creating and using compact linguistic data
JPS63231674A (en) Word processing system
JP2007257644A (en) Program, method and device for acquiring translation word based on translation word candidate character string prediction
CN104008093A (en) Method and system for chinese name transliteration
CN108280197B (en) Method and system for identifying homologous binary file
Domeij et al. Detection of spelling errors in Swedish not using a word list en clair
JP7103763B2 (en) Information processing system and information processing method
CN110795617A (en) Error correction method and related device for search terms
JP6787755B2 (en) Document search device
US10572592B2 (en) Method, device, and computer program for providing a definition or a translation of a word belonging to a sentence as a function of neighbouring words and of databases
JP4382663B2 (en) System and method for generating and using concise linguistic data
Gupta et al. Fast and effective searches of personal names in an international environment
JP2009093581A (en) Control system for synonym search
JP5380566B2 (en) Language processing apparatus, program, and method
CN114296561A (en) User word bank obtaining method and candidate word generating method and device
US11151110B2 (en) Identification of records for post-cloning tenant identifier translation
JPH02129756A (en) Word collating device
CN112307070A (en) Mask data query method, device and equipment
US20210319854A1 (en) Method and system for normalization of gene names in medical text

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 200040, room 710, 302 Changping Road, Shanghai, Jingan District

Applicant after: Shanghai Xinlian Information Development Co.,Ltd.

Address before: 200040, room 710, 302 Changping Road, Shanghai, Jingan District

Applicant before: SHANGHAI ZHONGXIN INFORMATION DEVELOPMENT Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200403