CN116011431A - Method for generating mnemonic words and electronic equipment - Google Patents

Method for generating mnemonic words and electronic equipment Download PDF

Info

Publication number
CN116011431A
CN116011431A CN202310282199.0A CN202310282199A CN116011431A CN 116011431 A CN116011431 A CN 116011431A CN 202310282199 A CN202310282199 A CN 202310282199A CN 116011431 A CN116011431 A CN 116011431A
Authority
CN
China
Prior art keywords
target
sequence
rhyme
sentence
sub
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
CN202310282199.0A
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.)
Dark Chain Technology Shenzhen Co ltd
Original Assignee
Dark Chain Technology Shenzhen 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 Dark Chain Technology Shenzhen Co ltd filed Critical Dark Chain Technology Shenzhen Co ltd
Priority to CN202310282199.0A priority Critical patent/CN116011431A/en
Publication of CN116011431A publication Critical patent/CN116011431A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Machine Translation (AREA)

Abstract

The invention relates to the technical field of mnemonics, and discloses a mnemonic generating method and electronic equipment. The method for generating the mnemonic comprises the following steps: the method comprises the steps of obtaining a target sequence, wherein the target sequence comprises at least two sub-sequences, determining a target rhyme according to the target sequence, generating sentences corresponding to the sub-sequences according to the target rhyme and the numerical values of the sub-sequences, pressing the target rhyme on tail words of at least two sentences, and generating mnemonics according to all sentences. According to the method and the device, sentences can be generated according to the target rhyme, so that the tail words of at least two sentences in the mnemonic words can mutually escort, the readability of the mnemonic words can be enhanced, and the memory difficulty is reduced.

Description

Method for generating mnemonic words and electronic equipment
Technical Field
The invention relates to the technical field of mnemonics, in particular to a mnemonic generating method and electronic equipment.
Background
With the development of web3.0 internet technology, autonomous identities are gradually applied and gradually replace traditional third party platform account system modes. The autonomous identity is mastered by the user with the root authority of the identity through the blockchain technology, and any person can verify the identity of the autonomous identity without obtaining the root authority beyond the user.
In the autonomous identity mode, one core element is an identity key, which is the key for constructing the security management of the autonomous identity by the user. The identity key is typically embodied in the form of a whisper, created by the owner of the identity and communicated to the verifier when the identity is used. In general, a sign language is a binary large number of 128 bits or 256 bits, and it is very difficult to directly use a sign language of binary digits as a memory object. In order to facilitate human memory, people use mnemonics, and replace the 128-bit or 256-bit pure digital whisper with 12 or 24 English words, and the method improves the memorability of the whisper. However, although the memory is shortened by the method, the memory difficulty of the mnemonic is increased because the memory is poor and the memory is difficult to read.
Disclosure of Invention
An object of an embodiment of the invention is to provide a method for generating a mnemonic and electronic equipment, and aims to solve the problem of poor readability of the existing mnemonic.
In a first aspect, an embodiment of the present invention provides a method for generating a mnemonic, including:
obtaining a target sequence, wherein the target sequence comprises at least two sub-sequences;
Determining a target rhyme according to the target sequence;
generating sentences corresponding to the child number columns according to the target rhyme and the numerical values of the child number columns, wherein tail words of at least two sentences are extruded on the target rhyme;
and generating mnemonics according to all sentences.
In a second aspect, an embodiment of the present invention provides a non-volatile readable storage medium storing computer-executable instructions for causing an electronic device to perform the method for generating a mnemonic as described above.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the mnemonic generating method described above.
In the method for generating the mnemonic words provided by the embodiment of the invention, the target sequence is obtained, the target sequence comprises at least two sub-sequences, the target rhyme is determined according to the target sequence, sentences corresponding to the sub-sequences are generated according to the values of the target rhyme and the sub-sequences, the tail words of at least two sentences are pressed on the target rhyme, and the mnemonic words are generated according to all sentences. According to the method and the device, sentences can be generated according to the target rhyme, so that the tail words of at least two sentences in the mnemonic words can mutually escort, the readability of the mnemonic words can be enhanced, and the memory difficulty is reduced.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
FIG. 1 is a schematic flow chart of a method for generating mnemonics according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a target sequence according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a target sequence according to another embodiment of the present invention;
FIG. 4 is a schematic diagram of a target sequence according to another embodiment of the present invention;
FIG. 5 is a schematic diagram of a preset word table according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of the division of the respective subcolumns shown in FIG. 2 into 3 array units;
fig. 7 is a schematic circuit diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, if not in conflict, the features of the embodiments of the present invention may be combined with each other, which is within the protection scope of the present invention. In addition, while functional block division is performed in a device diagram and logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the block division in the device, or in the flowchart. Furthermore, the words "first," "second," "third," and the like as used herein do not limit the order of data and execution, but merely distinguish between identical or similar items that have substantially the same function and effect.
The embodiment of the invention provides a method for generating mnemonics. Referring to fig. 1, the method for generating the mnemonic includes the following steps:
s11: a target array is obtained.
In this step, the target sequence is composed of sequentially arranged multi-bit binary values, for example, the number of bits of the target sequence is 20 or 62 or 133 or 158 bits, etc.
In some embodiments, obtaining the target number column includes: the acquisition of the target sequence entered at the electronic device, i.e. the target sequence may be given directly by the user, such as the user entering the target sequence "1001101010001101" directly at the electronic device.
In some embodiments, obtaining the target number column includes: the method comprises the steps of obtaining an initial value input in electronic equipment, and converting the initial value into a target number sequence, wherein the initial value comprises any one or more than two of numbers, letters, characters and characters.
In some embodiments, obtaining the target number column includes: the control electronics automatically generate the target sequence.
In some embodiments, obtaining the target number column includes: generating a random number of the target digit, generating an additional number of the designated digit according to the random number, and sequentially combining the random number and the additional number to obtain a target digit sequence. The target digit number can be customized by a user, and the random number is composed of binary values of the target digit number, for example, the target digit number is 128 bits, and the random number is 128 bits.
Generating the random number of the target number of bits includes: the random function is used to generate a random number of the target number of bits, such as the electronic device uses the random function randomBytes to generate 16 enteropy arrays consisting of 8-bit binary values, the 16 enteropy arrays sharing 128-bit binary values.
Generating an additional number of specified digits from the random number includes: according to the hash algorithm, the random number is processed to obtain a hash digest, and an additional number of a specified number of bits is selected from the hash digest. The specified bit number is customized by a user, for example, the specified bit number is 0 bit or 1 bit or 5 bits, etc.
Selecting an additional number of specified digits from the hash digest includes: and starting from the numerical value corresponding to the appointed starting sequence, selecting the numerical value with the appointed digit number from the hash abstract as the additional number. Wherein, the designated starting sequence can be the first numerical value or the last numerical value or the middle position of the hash digest.
The random number and the additional number can be sequentially combined to obtain the target number sequence, for example, the number of bits of the random number is 128 bits, the number of bits of the additional number is 5 bits, and the number of bits of the target number sequence is 133 bits. Because the random number is randomly generated and the additional number processed by the hash algorithm is irreversibly obtained, the target number sequence provided by the embodiment is relatively reliable and safe. In addition, the method for generating the target number sequence provided by the embodiment can be compatible with the BIP39 standard and the BIP32 standard, can be applied to various application scenes in which the mnemonic word needs to be generated, and can also be applied to the blockchain scene so as to store the secret key of the blockchain wallet.
The target number sequence includes at least two sub number sequences, wherein the sub number sequences are partial number sequences divided from the target number sequence, and the number of each sub number sequence is customized by a user, and it can be understood that the number of any two sub number sequences can be the same or different.
In some embodiments, the present embodiment divides the target sequence into at least two child sequences according to a predetermined period. The preset sentence pattern comprises a poem type, a long short sentence type and the like, the poem type comprises a lattice poem type, the lattice poem type comprises a law poem type and a absolute sentence type, and the absolute sentence type can be a five-language absolute sentence type or a seven-language absolute sentence type.
For example, referring to fig. 2, the target sequence 200 has 128 bits in total, and when the predetermined sentence pattern is seven-word type, the target sequence 200 may be divided into 4 sub-sequences, namely a first sub-sequence 201, a second sub-sequence 202, a third sub-sequence 203 and a fourth sub-sequence 204, wherein the number of bits in the first sub-sequence, the second sub-sequence and the fourth sub-sequence is 31 bits, and the number of bits in the third sub-sequence is 35. It is understood that in some embodiments, the number of bits in the first sub-sequence 201, the second sub-sequence 202, the third sub-sequence 203, and the fourth sub-sequence 204 may be 32 bits.
S12: and determining the target rhyme according to the target number column.
In this step, the target rhyme is a rhyme determined by a target sequence. The determining the target rhyme according to the target number column comprises: and determining a rhyme identification value according to the target number sequence, and determining the target rhyme according to the rhyme identification value. The rhyme identification value is used for identifying the target rhyme, and the expression form of the rhyme identification value can be customized by a user.
In some embodiments, the family of rhyme identification value may be represented by a single binary value, such as a family of rhyme identification value may be represented by a "0" or a "1".
In some embodiments, the family of rhyme identification value may be represented by more than two binary values, such as by "01" or "010" or "1010".
In some embodiments, determining the vowel family identification value from the target number sequence includes: and accumulating the numerical values of each sub-number column in the target number column to obtain the rhyme identification value.
In some embodiments, determining the vowel family identification value from the target number sequence includes: and selecting a first sub-number column with a designated sequence from at least two sub-number columns as a first reference sub-number column, and determining a rhyme identification value according to the first reference sub-number column.
In some embodiments, determining the vowel family identification value from the target number sequence includes: and determining the numerical value of the first appointed position in the target number column, wherein the numerical value of the first appointed position is a rhyme identification value.
In some embodiments, the target sequence further comprises a first auxiliary sequence, and determining the value of the first specified location present in the target sequence comprises: and selecting the numerical value of the first auxiliary number sequence as a rhyme identification value, wherein the position of the first auxiliary number sequence in the target number sequence is a first appointed position.
Referring to fig. 3, the first auxiliary sequence 205 is located after the fourth sub-sequence 204, wherein the first auxiliary sequence is composed of 4 binary values, i.e., the values of the first auxiliary sequence are any one of values "0000" to "1111", and any one of values "0000" to "1111" can be used as the charm identifier.
In some embodiments, determining the target family of rhyme from the family of rhyme identification value comprises: and selecting a rhyme group with the sequence consistent with the rhyme group identification value in a preset rhythm table as a target rhyme group.
The preset rhythm table is built and generated in advance by a user, wherein the preset rhythm table comprises a plurality of rhythm families, the pronunciations of any two rhythm families are different, and the pronunciations of the finals in the same rhythm family meet the same similar condition of the pronunciations. Please refer to table 1:
TABLE 1
Figure SMS_1
As shown in table 1, the preset prosodic table includes 9 kinds of vowels, where each vowel group may include a plurality of vowels, and each vowel group is a flat vowel. When the rhyme identification value is "000", the present embodiment may select the 0 th rhyme in the order of 0 as the target rhyme. When the rhyme identifier is "001", the 1 st rhyme with the sequence of 1 may be selected as the target rhyme in this embodiment, and this is not repeated here. It can be understood that the preset prosodic table provides the number of rhyme families which is at least greater than or equal to the number of the digits of the identification value of the rhyme family and can be expressed.
It can be understood that the preset prosodic table of the present embodiment provides 9 kinds of rhyme groups, however, those skilled in the art may increase or decrease the rhyme groups in the preset prosodic table according to the service requirement, for example, according to the number of vowels of modern chinese, 10 kinds of rhyme groups may be added in the preset prosodic table, so that the preset prosodic table provides 19 kinds of rhyme groups, and at the same time, the number of digits of the identification value of the rhyme groups may be adjusted from a 3-bit binary number to a 4-bit binary number.
S13: and generating sentences corresponding to the child number columns according to the numerical values of the target rhyme groups and the child number columns, wherein the tail words of at least two sentences are pressed on the target rhyme groups.
In this step, the sentence is composed of a plurality of words in sequence, and the tail word is the last word of the sentence.
When the target sequence includes two sub-sequences, each sub-sequence corresponds to one sentence, so that the two sub-sequences correspond to two sentences, and the two sentences are sequentially arranged, wherein the tail words of the two sentences are all the same as the target vowel group, that is, the vowel groups of the tail words of the two sentences are all the same as the target vowel group. For example, the target sequence includes a first sub-sequence and a second sub-sequence, wherein the first sub-sequence is "111000 010100 01010", the second sub-sequence is "101010 110010 10100", the target rhyme is 1 st rhyme, the sentence "western wind stump hole wave" is generated according to the 1 st rhyme and the first sub-sequence, the sentence "night-boy white hair is generated according to the 1 st rhyme and the second sub-sequence, and the two sentences are sequentially arranged to obtain:
Western wind residual irradiation tunnel wave, night soil, large white hair and multiple white hair
Wherein, the tail words of the first sentence and the second sentence are both pressed on the target rhyme, namely, the wave and the multi are both pressed on the 1 st rhyme.
When the target number sequence comprises four sub-number sequences, tail words of sentences corresponding to at least two sub-number sequences are all pressed on the target rhyme. The first sub-sequence is "101000 110100 11010", the second sub-sequence is "111010 100110 11101", the third sub-sequence is "101110 010101 11110", the second sub-sequence is "110001 111110 10001", the target rhyme is the 7 th rhyme, the sentence "four-large-size empty soft sword punch" is generated according to the 7 th rhyme and the first sub-sequence, the sentence "happy open poem Chong" is generated according to the 7 th rhyme and the second sub-sequence, the sentence "line knight-errant-meaning inclined furnace drop" is generated according to the 7 th rhyme and the fourth sub-sequence, the sentence "ambiguous Xia Lixiong" is generated according to the 7 th rhyme and the fourth sub-sequence, and the four sentences are sequentially arranged to obtain:
four-large-size hollow soft sword punch, and happy and open poem chores
The man walking on the wiry can descend in a inclined furnace, and the arris can Xia Lixiong
The tail words of the first sentence, the second sentence and the third sentence are all pressed on the target rhyme, namely, the target rhyme is pressed on the target rhyme, and the target rhyme is pressed on the target rhyme. The third sentence is not identical to the first sentence, the second sentence and the third sentence.
It will be appreciated that in some embodiments, the tail words of the sentences corresponding to all the child sequences in the target sequence are assigned to the target vowel family, for example, four sentences are sequentially arranged to obtain:
four-large-size hollow soft sword punch, and happy and open poem chores
Swordsman walking on the wiry with the help of the inclined east of the furnace, the ambiguous can Xia Lixiong
Wherein, the tail words of the first sentence, the second sentence, the third sentence and the fourth sentence are all pressed on the target rhyme, namely, the words of ' Chong "," Dong "and ' rough ' are all pressed on the target rhyme,
s14: and generating mnemonics according to all sentences.
In this step, all sentences are sequentially arranged in this embodiment to obtain the mnemonic. As described above, the mnemonic is "West wind residual irradiation Dongting wave, night herd is big and white hair is many", or "four-large-size hollow soft sword is washed, and is good in popularity, the swordlike walking stick is inclined to descend, or the four-large-scale sky soft sword is rushed, the swordlike walking stick is inclined to descend, and the model edge is Xia Lixiong'
According to the method and the device for generating the sentence, sentences can be generated according to the target rhyme, so that tail words of at least two sentences in the mnemonic words can mutually escort, the mnemonic words can enable a user to be on the top of the mouth, and therefore the readability of the mnemonic words can be enhanced, and the memory difficulty is reduced.
In some embodiments, before generating the sentence corresponding to the child sequence, the method for generating the mnemonic further includes: determining a target sentence pattern template according to the target number sequence, and then: generating sentences corresponding to the child number columns according to the numerical values of the target rhyme and the child number columns comprises: and generating sentences corresponding to the child number columns according to the target sentence pattern template, the target rhyme and the numerical values of the child number columns. According to the embodiment, sentences can be generated through the target sentence pattern template, so that the constitution of the sentences can be normalized, the normalization of the sentences can be improved, and the readability can be enhanced.
In some embodiments, the sentence pattern template meets the pronunciation level classification standard of modern Chinese or ancient Chinese, and sentences generated according to the sentence pattern template in the embodiment can improve the readability of sentences, so that a user can memorize the mnemonic words more easily.
In some embodiments, according to the pronunciation level classification standard of modern Chinese or ancient Chinese, the following sentence pattern templates are designed as follows:
the first sentence pattern template is a flat-up and flat-down poem collecting template, and the specific steps are as follows: * + zepine, +zepine; * + zepine, +zepine.
The second sentence pattern template is a zeptosis level poem, and is specifically as follows: * Zepine, +zepine,; * The terms "flat" and "flat" are used to denote any individual word.
In order to make the word corresponding to "#" more normalized and more helpful for memorization, in some embodiments, the following sentence pattern templates are designed as follows:
the third sentence pattern template is a flat-up and flat-down poem collecting template, which is specifically as follows: common term + zeppy level, [ common term ] + zeppy level; common term + zep, common term + zep.
The fourth sentence pattern template is a zeptosis level poem, and is specifically as follows: common term + zeppy, common term + zeppy; [ commonly used term ] +flat-zep, [ commonly used term ] +zep flat.
Wherein, the common term can be idioms, idioms with a net red phrase, high-frequency phrase of textbooks, and the like.
It will be appreciated that those skilled in the art, in light of the present disclosure, may also design sentence patterns that meet the criteria of a level classification of pronunciation of modern chinese or ancient chinese, and are not limited to the two sentence patterns described above.
In some embodiments, determining the target period template from the target sequence comprises the steps of: and determining a plazedly mark value according to the target sequence, and determining a target sentence pattern template according to the plazedly mark value. The flat-zepe identification value is used for identifying the target sentence pattern template, and the expression form of the flat-zepe identification value can be customized by a user.
In some embodiments, the flat-tip identification value may be represented by a single binary value, such as a flat-tip identification value may be represented by a "0" or a "1".
In some embodiments, the flat-tone identification value may be represented by more than two binary values, such as a flat-tone identification value may be represented by "01" or "010" or "1010".
In some embodiments, determining the plait identification value from the target sequence comprises: and accumulating the numerical values of each sub-number sequence in the target number sequence to obtain an addition result, and extracting the numerical value of the target position from the addition result as a level mark value.
In some embodiments, determining the plait identification value from the target sequence comprises: selecting a sub-number column with a second designated sequence from at least two sub-number columns as a second reference sub-number column, and determining a flat-narrow identification value according to the second reference sub-number column.
In some embodiments, determining the plait identification value from the target sequence comprises: and determining the value at a second designated position of the target sequence, wherein the value at the second designated position is a flat-zepe identification value.
In some embodiments, the target sequence further comprises a second auxiliary sequence, and determining the value of the second designated location present in the target sequence comprises: and selecting the numerical value of the second auxiliary number sequence as the flat-zepe identification value, wherein the position of the second auxiliary number sequence in the target number sequence is a second designated position.
Referring to fig. 4, the second auxiliary sequence 206 is located between the fourth sub-sequence 204 and the first auxiliary sequence 205, wherein the second auxiliary sequence is composed of 1 binary number, that is, the value of the second auxiliary sequence is any one of "0" to "1", and the charm identifier may be "0" or "1".
In some embodiments, determining the target period template based on the flat-zep identification value includes: selecting a sentence pattern template corresponding to the flat-zepe identification value from a preset sentence pattern template library as a target sentence pattern template.
At least two sentence pattern templates are stored in the preset sentence pattern template library, and each sentence pattern template corresponds to a flat and cramped identification value. As described above, the preset sentence pattern template library holds the third sentence pattern template and the fourth sentence pattern template. And when the flat-zepe identification value is 0, selecting the third period form as the target period form. And when the flat-zepe identification value is 1, selecting the fourth period form as the target period form.
In some embodiments, generating sentences corresponding to the child sequence according to the values of the target sentence pattern, the target rhyme and the child sequence comprises the steps of:
s131: and determining the target level word according to the numerical value of the target sentence pattern template and the child number sequence.
S132: and determining the target tail word according to the sequence of the sub-number columns in the target number columns, the target rhyme family and the numerical value of the sub-number columns.
S133: and generating sentences corresponding to the sub-number columns according to the target level and narrow words and the target tail words.
In S131, the plagion word is composed of at least two single words, and has semantics, for example, the plagion word is "white hair", and the plagion word can express the meaning that the hair is white. The target level word is a level word determined by combining the numerical value of the sub-number sequence with the target sentence pattern template.
In some embodiments, determining the target level word from the values of the target period template and the child sequence comprises: determining a target level sub-list pointed by the target word tone structure in a preset word list according to the target sentence pattern template, wherein the target level sub-list comprises a plurality of level words which are sequentially arranged and meet the target word tone structure, and selecting the level words with the sequence consistent with the numerical value of the sub-number list in the target level sub-list as target level words.
The word tone structure includes level tone structure, zepe tone structure, for example, the word that level tone structure corresponds includes that the cigarette is in the mouth, the tobacco frost, and the word that level tone structure corresponds includes Long Li, dragon persimmon, and the word that zepe tone structure corresponds includes sea car, sea boat, and the word that zepe tone structure corresponds includes that the emperor, chinese emperor.
The preset word list is constructed in advance by the user, where the preset word list 500 includes a plurality of flat sub-lists, for example, referring to fig. 5, a flat tone structure corresponds to the first flat sub-list 501, a flat tone structure corresponds to the second flat sub-list 502, a flat tone structure corresponds to the third flat sub-list 503, and a flat tone structure corresponds to the fourth flat sub-list 504.
For example, assume that the target sentence pattern template has the following structure: and (3) flat-zep words (flat) +tail words, wherein the word tone structure of the flat-zep words is a flat tone structure. It should be noted that the structure of the target sentence pattern template provided herein is different from the structures of the first sentence pattern template to the fourth sentence pattern template described in the above embodiments.
According to the target sentence pattern template, the embodiment determines that the flat tone structure is the target word tone structure, and the flat tone structure points to the first flat sub-list 501, so that the first flat sub-list 501 is the target flat sub-list. When the sub-number sequence is 0000 0000 0000 11, the embodiment determines that the corresponding sequence of the sub-number sequence is 3 according to the numerical value of the sub-number sequence, and arranges the 3 rd flat word as the smoked plum in the first flat sub-list 501, so that the 'smoked plum' is the target flat word.
In some embodiments, each sub-array includes at least one flat-zep array element and a tail array element. After the tail word array units are arranged in the flat-zepe array units, the numerical values of the flat-zepe array units are used for indicating the electronic equipment to select target flat-zepe words in a preset word list, and the tail word array units are used for indicating the electronic equipment to select target tail words in a vowel footer list.
Referring to fig. 6, each of the first to fourth sub-arrays 201 to 204 is divided into 3 array units, wherein the first array unit and the second array unit may be flat-narrow array units, and the third array unit is a tail array unit. For the same subcolumn, the number of bits of any two array units may be the same or different. It will be appreciated that when the predetermined period is a pattern of a poem, the number of array units in each sub-array is the same. When the predetermined pattern is a non-regular poem pattern, the number of array units in each sub-array may be the same or may be different.
In some embodiments, determining the target level word from the values of the target period template and the child sequence comprises: determining a target level sub-list pointed by a target level group structure in a preset word list according to a target sentence pattern template, wherein the target level sub-list comprises a plurality of level words which are sequentially arranged and meet the target word tone structure, and selecting level words with the sequence consistent with the numerical value of the target level group unit in the target level sub-list as target level words.
The sentence pattern plate comprises at least one tone mark and tail word marks which are arranged in sequence, the tone mark on each position represents the corresponding word tone structure, and the tail word mark is used for representing the tone of the tail word. For example, the sentence pattern template is flat and zeppy, and the zeppy is flat and zeppy, for convenience of representation, the label is added in this embodiment, and the sentence pattern template after adding the label is:
Figure SMS_2
wherein ,
Figure SMS_3
and the first tone mark corresponds to a flat tone structure. />
Figure SMS_4
Is a second toneThe mark corresponds to the tone structure of the tone. />
Figure SMS_5
And the third tone mark corresponds to a tone flattening tone structure. />
Figure SMS_6
For tail word identification, flat sounds are corresponded, and so on.
The target flat-zepe array unit is one array unit in at least one flat-zepe array unit, and the tail word array unit is the array unit arranged at the last position in the sub-array. Referring to fig. 6, taking the first sub-array 201 as an example, the first sub-array 201 includes a 0 th array unit AR0, a 1 st array unit AR1 and a 2 nd array unit AR2, wherein the 2 nd array unit AR2 is arranged at the last position in the first sub-array 201, and therefore, the 2 nd array unit AR2 is a tail array unit. The 0 th and 1 st array units AR0 and AR1 are located before the 2 nd array unit AR2, so that the 0 th and 1 st array units AR0 and AR1 can be target flat array units.
The determining of the target word tone structure corresponding to the target level-zepe array unit according to the target period pattern template comprises the following steps: determining the sequence of the target level and detail array units in the sub-sequence, traversing the target sentence pattern template according to the sequence of the target level and detail array units in the sub-sequence, obtaining a target tone mark consistent with the sequence of the target level and detail array units in the sub-sequence, and determining a word tone structure corresponding to the target tone mark as a target word tone structure.
For example, the target sentence pattern template is:
Figure SMS_7
referring to FIG. 6, when the order of the 0 th array unit AR0 in the sub-array is 00, the tone mark corresponding to the order of the 0 th array unit AR0 in the sub-array is identified as
Figure SMS_8
Tone mark->
Figure SMS_9
For target tone identification, the target word tone structure is a flat tone structure.
When the order of the 1 st array unit AR1 in the sub-array is 01, the tone mark corresponding to the order of the 1 st array unit AR1 in the sub-array is
Figure SMS_10
Tone mark->
Figure SMS_11
For target tone identification, the target word tone structure is a zep tone structure.
The flat-zeppy list pointed by the 0 th array unit AR0 is the first flat-zeppy list 501, if the 0 th array unit AR0 is 0000 0000 0000 01, the order is determined to be 1 according to the numerical value of the 0 th array unit AR0, and the 1 st flat-zeppy word is arranged in the first flat-zeppy list 501 to be the tobacco frost, so that the "tobacco frost" is the target flat-zeppy word corresponding to the 0 th array unit AR 0.
The flat-zepe list pointed by the 1 st array unit AR1 is the fourth flat-zepe list 504, if the 1 st array unit AR0 is 0000 0000 0001 01, the order is determined to be 5 according to the numerical value of the 1 st array unit AR1, and the 5 th flat-zepe word is arranged in the fourth flat-zepe list 504 as jin, so "Jin Di" is the target flat-zepe word corresponding to the 1 st array unit AR 1.
It will be appreciated that the number of bits of the target level-width array unit is M, the level-width sub-list contains at least more than or equal to 2 to the power M of the number of level-width words, for example, the number of bits of the target level-width array unit is 14 bits, the power 14 of 2 is 16,384, and the level-width sub-list includes 16,384 level-width words. The number of bits of the target level-zep array unit is 10 bits, the 10 th power of 2 is 1,024, and the level-zep list comprises 1,024 level-zep words.
In some embodiments, determining the target mantissa based on the order of the sub-number columns in the target number column, the target vowel family, and the numerical value of the sub-number columns includes the steps of:
s1321: judging whether the sequence of the sub-number columns in the target number column meets the final setting condition.
S1322: if the target vowel group meets the target vowel group, determining the target tail words according to the numerical values of the target vowel group and the tail word number group units, wherein the vowel group of the target tail words is the target vowel group.
S1323: if the target rhyme is not satisfied, determining a non-escort rhyme set according to the target rhyme set, determining a reference non-escort rhyme set according to the non-escort rhyme set and the rhyme set identification value, determining a target tail word according to the reference non-escort rhyme set and the numerical value of the tail word number group unit, and enabling the reference non-escort rhyme set to be different from the target rhyme set.
In S1321, the vowel setting condition is a condition for indicating that a sentence requires vowels, and determining whether the order of the child sequence in the target sequence satisfies the vowel order condition includes: judging whether the sequence of the sub-sequence in the target sequence is a designated sequence or not, if the sequence of the sub-sequence in the target sequence is the designated sequence, the sub-sequence meets the final sequence condition, and if the sequence of the sub-sequence in the target sequence is not the designated sequence, the sub-sequence does not meet the final sequence condition. Wherein the specified order is user-defined.
For example, for a verse of the seven-word type, the first sentence, the second sentence, and the fourth sentence require rhyming, the third sentence does not require rhyming, the final family of the first sentence, the second sentence, and the fourth sentence all need to be the target family, and the final family of the third sentence also needs to be different from the target family, so the user can set the specified order to 1, 2, and 4.
In this embodiment, it is determined whether the order of the first subcolumn is any one of 1, 2, and 4, and it is obvious that the order of the first subcolumn is "1" in 1, 2, and 4, so that the first subcolumn satisfies the final order condition, and so on, the second subcolumn and the fourth subcolumn satisfy the final order condition. The third sub-sequence does not satisfy the vowel sequence condition.
In S1322, for a sentence requiring rhyme, the embodiment can determine a target tail word according to the target rhyme and the numerical values of the last array unit, where the rhyme of the target tail word is the target rhyme.
In some embodiments, each vowel group corresponds to a vowel base table, the vowel base table includes a plurality of vowels arranged in sequence, and determining the target tail word according to the values of the target vowel group and the last array unit includes the following steps: and selecting a vowel base corresponding to the target vowel family as a target vowel base, and selecting vowels with the sequence consistent with the numerical value of the last array unit in the target vowel base as target tail words.
For example, please refer to table 2:
TABLE 2
Figure SMS_12
As shown in table 2, the 0 th vowel family includes the following vowels: she, nepheline, flowers, etc. The 1 st vowel group includes the following vowels: wave, multi, etc. When the target vowel group is the 0 th vowel group and the numerical value of the mantissa digit group unit is "00010", the embodiment selects the 0 th vowel base as the target vowel base, and the numerical value of the mantissa digit group unit corresponds to the order of 2. In the 1 st vowel sub-table, the vowel corresponding to the order 0 is "her", the vowel corresponding to the order 1 is "nepheline", and the vowel corresponding to the order 2 is "flower", so the embodiment selects the vowel "flower" as the target tail word.
When the target vowel group is the 6 th vowel group and the numerical value of the mantissa digit group unit is "00001", the embodiment selects the 6 th vowel base as the target vowel base, and the numerical value of the mantissa digit group unit corresponds to 1. In the 6 th vowel sub-table, the vowels corresponding to the sequence 1 are "strong", so in this embodiment, the vowel "strong" is selected as the target tail word, and so on, and will not be described here again.
Thus, the embodiment has determined the target tail word and the target level word of the sentence needing rhyming, and the embodiment can generate the sentence corresponding to the sub-number column according to the target level word and the target tail word, wherein the sentence is the sentence needing rhyming.
In S1323, the non-rhyme set is a set of rhyme families different from the target rhyme family, that is, the non-rhyme set includes a plurality of non-rhyme families, the non-rhyme families are different from the target rhyme family, for example, when the target rhyme family is the 0 th rhyme family, the non-rhyme family is any one of the 1 st rhyme family to the 8 th rhyme family, and the non-rhyme set may be a set of all of the 1 st rhyme family to the 8 th rhyme family, or may be a set of part of the 1 st rhyme family to the 8 th rhyme family.
Determining the non-rhyme set from the target family of rhymes includes: and deleting the target rhyme family from the preset rhythm table to obtain an updated preset rhythm table, and determining the non-rhyme set according to the updated preset rhythm table.
In some embodiments, determining the non-rhyme set from the updated preset prosody table includes: and taking the updated preset rhythm table as a non-rhyme set.
In some embodiments, determining the non-rhyme set from the updated preset prosody table includes: and selecting part of rhyme families from the updated preset rhyme table as non-escort collection.
The reference non-rhyme families are non-rhyme families determined in the non-rhyme set by the rhyme family identification values. Determining the reference non-rhyme set according to the non-rhyme set and the rhyme set identification value comprises: and selecting non-rhyme families with the sequence consistent with the rhyme family identification value from the non-rhyme sets as reference non-rhyme families.
The determining of the target tail word according to the values of the reference non-rhyme family and the last array unit comprises the following steps: and selecting a vowel base corresponding to the reference non-rhyme family as a reference vowel base, and selecting vowels with the sequence consistent with the numerical value of the last array unit in the reference vowel base as target tail words.
Thus, the embodiment has determined the target tail word and the target level word of the sentence avoiding the rhyming, and the embodiment can generate the sentence corresponding to the sub-number column according to the target level word and the target tail word, wherein the sentence is the sentence avoiding the rhyming.
In general, in this embodiment, the target level word and the target tail word of the sentence to be rhymed are obtained in the above manner, and the target tail word is used to deposit the target rhyme. Meanwhile, the target smooth words and target tail words of sentences which do not need to be rhymed are obtained, the target tail words avoid being pressed on target rhyme families, for example, the following mnemonics are obtained:
soft sword punch, open poet and Chong
Inclined furnace for lowering summer Li Xiong
Wherein, the first sentence, the second sentence and the fourth sentence are sentences needing rhyme, and the target tail words of "dashing", "Chong" and "rough" are all pressed with the target rhyme group of "7 th rhyme group". The target tail word of the third sentence is 'down' to 'up' the 6 th rhyme.
According to the embodiment, the target rhyme groups can be matched for sentences needing rhyme, the sentences needing no rhyme need to avoid the target rhyme groups, and finally the obtained mnemonic words meet the rhyme rules of poems, so that the user can remember the mnemonic words more Lang Lang on the mouth.
It can be understood that the mnemonic provided in this embodiment does not need to satisfy the rhyming rule of poems, and all sentences can be rhymed.
It can be understood that the number of the vowels of the vowel table can be determined according to the number of bits of the mantissa units, wherein the number of the vowels of the vowel table is at least greater than or equal to the number of the vowels which can be expressed by the number of bits of the mantissa units. In some embodiments, the number of bits of the mantissa array element is N, and the number of vowels of the vowel list is greater than or equal to N power of 2. For example, n=5, and the number of vowels in the vowel table may be 32, 33, 34, or the like.
In some embodiments, the child array includes a normal language array unit, and the method for generating the mnemonic further includes the steps of: acquiring a normal language array unit, selecting words with the sequence consistent with the numerical value of the normal language array unit as target words in a preset normal language word list, and then: generating sentences corresponding to the sub-sequence according to the target level and narrow words and the target tail words comprises: and combining the target word, the target flat-zepe word and the target tail word in sequence to obtain sentences corresponding to the sub-number columns.
With continued reference to fig. 6, if only one array unit is set as a flat-pattern array unit, one array unit is a tail-pattern array unit, and one array unit is a normal-pattern array unit in the present embodiment, in some embodiments, the 0 th array unit AR0 is used as the normal-pattern array unit, the 1 st array unit AR1 is used as the flat-pattern array unit, and the 2 nd array unit AR2 is used as the tail-pattern array unit.
The preset constant word list is built in advance by a user, wherein the preset constant word list comprises a plurality of words. It can be understood that the number of words in the preset normal vocabulary is at least greater than or equal to the number of words that can be expressed by the number of bits in the normal array unit. In some embodiments, the number of digits of the constant word array unit is i, and the number of words of the preset constant word list is greater than or equal to the power of i of 2, for example, i is 12, and the number of words of the preset constant word list may be 4,096.
The words set forth in this embodiment may be commonly used words, which may be idioms or post-consumer words or net red phrases or high frequency phrases of textbooks, etc.
According to the embodiment, the target words, the target smooth words and the target tail words can be combined in sequence to obtain sentences corresponding to the sub-number columns. For example, the target word is idiom, and after the method described in the above embodiment is adopted, the sentence obtained from the target sequence is:
first sentence: four-large-size soft sword punch. In the first sub-sequence, "four-large" is determined by the value of the normal language array unit, "soft sword" is determined by the value of the target flat-narrow value unit, and "punch" is determined by the mantissa array unit.
Second sentence: the user can be satisfied with the best poem and chose. In the second sub-number sequence, "happy" is determined by the value of the normal language array unit, the "open poem" is determined by the value of the target level and narrow value unit, and the "Chong" is determined by the tail word array unit.
Third sentence: the man fights down by the inclined furnace. In the third sub-array, the "walking man" is determined by the value of the normal language array unit, the "inclined furnace" is determined by the value of the target level-narrow value unit, and the "falling" is determined by the tail word array unit.
Fourth sentence: and can be Xia Lixiong. In the fourth sub-array, "ambiguous" is determined by the value of the normal array element, "Xia Li" is determined by the value of the target flat value element, and "turbulent" is determined by the mantissa array element.
The target sentence pattern template is a fourth sentence pattern template, the third sentence pattern template is a zeptosis level poem, and the target rhyme is a 7 th rhyme. According to the rule of playing the level poems, the word tone structure of the level-zeping words of the first sentence is ' zeping ' and the soft sword ' is the word tone structure meeting the ' zeping '. The word tone structure of the flat-zepe words of the second sentence is 'zepe', and 'open poem' is the word tone structure meeting 'zepe'. The word tone structure of the flat and zepe words of the third sentence is flat, and the inclined furnace is the word tone structure meeting the flat. The word tone structure of the flat-zepe word of the fourth sentence is 'zepe' and 'Xia Li' is a word tone structure meeting 'zepe'.
In general, the target words are words commonly used in life or learning experience, the target flat words are words meeting the flat-zepe rule, and the target tail words can be rhymed or un-rhymed.
For a detailed description of embodiments of the present invention, the following examples are given, it being understood that the examples given below do not set any undue limitations on the scope of the present invention, as follows:
1. this embodiment generates 128-bit random entropy using a random function randomBytes.
2. In this embodiment, hash computation is performed on 128-bit random entropy to obtain a hash digest. The present embodiment takes the first 5-bit binary value of the hash digest and 128-bit random entropy to form a 133-bit target sequence.
3. In this embodiment, the target sequence of bits 133 is divided into 6 subcolumns of [12,14,5], [12,14,5], [12,14,9], [12,14,5], [1] and [4], respectively. The "numerical value" in the numerical value represents the number of bits of the corresponding array unit, for example, the first sub-array [12,14,5] is divided into 3 array units, the number of bits of the 1 st array unit is 12, the number of bits of the 2 nd array unit is 14, and the number of bits of the 3 rd array unit is 5.
The 6 th sub-sequence is the first auxiliary sequence described above, and thus, the numerical value of the 6 th sub-sequence is the rhyme identification value, and since the number of bits of the 6 th sub-sequence is 4, the numerical value of the 6 th sub-sequence can represent 16 rhymes in total.
The 5 th sub-sequence is the second auxiliary sequence described above, so the value of the 5 th sub-sequence is the flat mark value, and since the number of bits of the 5 th sub-sequence is 1, when the value of the 5 th sub-sequence is 0, the sentence pattern is the flat-up and flat-down poem. When the number of the 5 th sub-sequence is 1, the sentence pattern template is a zeptosis level poem.
4. In this embodiment, the level mark value is determined according to the value of the 5 th sub-sequence, and the prosody mark value is determined according to the value of the 6 th sub-sequence.
5. The first array unit of each of the 1 st to 4 th sub-arrays has a bit number of 12, and can represent 4096 commonly used terms. In this embodiment, the values of the first array unit of each sub-array are selected from a preset normal vocabulary.
6. The number of bits of the second array unit of each of the 1 st to 4 th sub-arrays is 14, and 16384 target flat-width words can be represented. The present embodiment selects among the target flat sub-lists based on the values of the second array of cells in each sub-array.
7. The third array unit of each of the 1 st, 2 nd and 4 th sub-arrays has a number of bits of 5, and can represent 32 vowels. The sentence corresponding to the 3 rd sub-number sequence does not need rhyme, wherein the number of bits of the third array unit of the 3 rd sub-number sequence is 9, and 512 tail words can be represented. In this embodiment, the values of the third array unit of each of the 1 st sub-sequence, the 2 nd sub-sequence and the 4 th sub-sequence are selected in the vowel list. In this embodiment, the values of the third array unit in the 3 rd sub-array are selected from the vowel list corresponding to the non-escort vowel group.
In general, the sentence can be generated according to the target rhyme, so that the tail words of at least two sentences in the mnemonic word can be mutually rhymed, the readability of the mnemonic word can be enhanced, and the memory difficulty is reduced.
In addition, because the common term, the target-level word, the final or the tail word of each sentence are all determined by the numerical values of the array units corresponding to the target sequence, the numerical values of the target sequence can be deduced according to the text reverse direction of the sentence, and the method is favorable for improving the modularization of information.
As described above, the common term, the target-oriented word, the final or the tail word of each sentence are all determined by the values of the array units corresponding to the target sequence, the values of the target sequence are different, and the characters of each sentence are also different, so that the uniqueness of the sentence can be ensured, and the uniqueness of the mnemonic word can be ensured.
In some embodiments, in order to prevent the repetition of the vowels of the sentences requiring the vowels in the mnemonic words, the embodiment can determine the vowel sentences according to the mnemonic words, wherein the vowel sentences are the sentences requiring the vowels, and sequentially combine the vowels of each vowel sentence to obtain a target vowel set, and determine whether to execute the vowel duplication removal operation according to the target vowel set.
The rhyme sentences can be set in advance by the user, for example, the mnemonic words are composed of two sentences, wherein the 1 st sentence and the 2 nd sentence are both rhyme sentences. For example, the mnemonic word is composed of three sentences, wherein the 1 st sentence and the 2 nd sentence are both rhyme sentences, the 3 rd sentence is a non-rhyme sentence, or the 1 st sentence, the 2 nd sentence and the 3 rd sentence are both rhyme sentences. For example, the mnemonic word is composed of four sentences, wherein the 1 st sentence, the 2 nd sentence and the 4 th sentence are both rhyme sentences, the 3 rd sentence is a non-rhyme sentence, or the 2 nd sentence and the 4 th sentence are both rhyme sentences, and the 1 st sentence and the 3 rd sentence are both non-rhyme sentences.
Determining rhyme sentences according to the mnemonics comprises: and determining a sentence pattern identifier, determining a target sentence rhyme template according to the sentence pattern identifier, and determining sentences conforming to the target sentence rhyme template in the mnemonic words as rhyme sentences.
The sentence pattern identifier is used for representing a sentence pattern of the mnemonic, the sentence pattern comprises a poem type, a long short sentence type and the like, the poem type comprises a lattice poem type, the lattice poem type comprises a law poem type and a dead sentence type, and the dead sentence type can be a five-language dead sentence type or a seven-language dead sentence type.
In some embodiments, determining the period identity comprises: and acquiring sentence pattern information input in the electronic equipment, and determining sentence pattern identification according to the sentence pattern information. The sentence pattern identifier includes a special sentence pattern identifier and a pattern poem type identifier, for example, the sentence pattern information is "pattern poem", and the embodiment determines the pattern poem type identifier according to "pattern law poem", where the pattern of the pattern poem type identifier is used to represent the mnemonic word, and is the pattern poem type.
In some embodiments, determining the period identity comprises: the control electronics extract the period identification from the specified memory.
Sentence rhyme template includes absolute sentence rhyme template and check poem rhyme template, confirms sentence rhyme template according to sentence pattern sign and includes: if the sentence pattern identifier is the absolute sentence pattern identifier, selecting the absolute sentence rhyme template as the target sentence rhyme template, and if the sentence pattern identifier is the lattice poem identifier, selecting the lattice law rhyme template as the target sentence rhyme template.
In some embodiments, the target sentence rhyme template is a dead sentence rhyme template, and when the target sentence rhyme template needs to enter a first sentence, the target sentence rhyme template includes 3 sentence rhyme identifications, and the 3 sentence rhyme identifications are respectively a 1 st sentence rhyme identification, a 2 nd sentence rhyme identification and a 4 th sentence rhyme identification.
In some embodiments, the target sentence rhyme template is a dead sentence rhyme template, and when the target sentence rhyme template does not need to enter a first sentence, the target sentence rhyme template includes 2 sentence rhyme identifications, and the 2 sentence rhyme identifications are respectively a 2 nd sentence rhyme identification and a 4 th sentence rhyme identification.
In some embodiments, the target sentence rhyme template is a rhyme poem rhyme template, and when the target sentence rhyme template needs to enter the first sentence, the target sentence rhyme template includes 5 sentence rhyme identifications, and the 5 sentence rhyme identifications are respectively a 1 st sentence rhyme identification, a 2 nd sentence rhyme identification, a 4 th sentence rhyme identification, a 6 th sentence rhyme identification and an 8 th sentence rhyme identification.
In some embodiments, the target sentence rhyme template is a rhyme poem rhyme template, and when the target sentence rhyme template does not need to enter the first sentence, the target sentence rhyme template includes 4 sentence rhyme identifications, and the 4 sentence rhyme identifications are respectively a 2 nd sentence rhyme identification, a 4 th sentence rhyme identification, a 6 th sentence rhyme identification and an 8 th sentence rhyme identification.
The sentence rhyme template is configured with at least two sentence rhyme identifiers, each sentence rhyme identifier is used for representing the corresponding sequence of sentences needing rhyme, and determining the sentences conforming to the target sentence rhyme template in the mnemonic words as the rhyme sentences comprises the following steps: traversing the mnemonic words to obtain each sentence, judging whether the sequence of the sentence in the mnemonic words is matched with the sequence corresponding to the sentence rhyme identification, if so, selecting the sentence as the rhyme sentence, and if not, continuously judging whether the sequence of the other sentence in the mnemonic words is the sentence rhyme identification.
For example, the target sentence rhyme template is a top sentence rhyme template, and the target sentence rhyme template is configured with a 1 st sentence rhyme identifier, a 2 nd sentence rhyme identifier and a 4 th sentence rhyme identifier, and the types of the mnemonics are seven-language top sentence types, and the mnemonics are as follows:
Four-year-old and empty soft sword is washed, and people are free from poetry and rough weather
The man walking on the wiry can descend in a inclined furnace, and the arris can Xia Lixiong
In this embodiment, if the sequence of the 1 st sentence in the mnemonic word is judged to match the sequence corresponding to the 1 st sentence rhyme identifier, the 1 st sentence "four-blank soft sword punch" is the rhyme sentence, and so on, the 2 nd sentence "happy and open poem chong" and the 4 th sentence "ambiguous and Xia Lixiong" are both the rhyme sentences, and the third sentence "line knight-errant fight inclined furnace drop" is the non-rhyme sentence.
The vowels are the tail words of the rhyme sentences, and the tail words are the single words at the last position of the sentences. Combining the final of each rhyme sentence in sequence to obtain the target final set comprises: and selecting the single word at the last position of each rhyme sentence as a final, and sequentially combining the final according to the sequence of each rhyme sentence in the mnemonic words to obtain a target final set.
For example, as described above, the 1 st sentence, the 2 nd sentence and the 4 th sentence are both rhyme sentences, the vowel of the 1 st sentence is "punch", the vowel of the 2 nd sentence is "rough", the vowel of the 4 th sentence is "rough", and the "punch", "rough" and "rough" are sequentially combined in this embodiment to obtain the target vowel set { punch, rough }.
The operation of removing the repetition of the vowels is the operation of modifying the vowels of the rhyme sentences so that the vowels of any two modified rhyme sentences are different, and the embodiment can avoid the repeated vowels of any two rhyme sentences, thereby being beneficial to improving the generation quality of sentences.
In some embodiments, determining whether to perform a vowel deduplication operation based on the target set of vowels includes the steps of: and judging whether any two vowels in the target vowel set are the same, if any two vowels in the target vowel set are the same, modifying the vowels of the rhyme sentence so that the vowels of any two modified rhyme sentences are different, and if any two vowels in the target vowel set are different, outputting the mnemonic word.
For example, if the mnemonics are as follows:
four-year-old and empty soft sword is washed, and people are free from poetry and rough weather
The man walking on the wiry can descend in a inclined furnace, and the arris can Xia Lixiong
The embodiment determines whether any two of the target final sets { dashing, rough } are identical.
Because the target vowel set { rushing, rough } is the same as the vowel of the 2 nd sentence "rough" and the vowel of the 4 th sentence, "rough", the present embodiment needs to modify the vowel of the rhyme sentence so that the vowel of any two modified rhyme sentences is different, for example, modify the vowel of the 2 nd sentence "rough" to "Chong", and the modified mnemonic words are as follows:
Four-large-size hollow soft sword punch, and happy and open poem chores
The man walking on the wiry can descend in a inclined furnace, and the arris can Xia Lixiong
If any two vowels in the target vowel set are different, the vowels of the rhyme sentence do not need to be modified, and the mnemonic word is directly output.
In some embodiments, modifying the vowel base of the rhyme sentence includes the steps of: and determining a duplicate-removing final corresponding to the final, wherein the duplicate-removing final comprises at least one reference final with the final family as the target final family, and selecting the reference final according to the duplicate-removing final to replace the final of the rhyme sentence so that the final of any two modified rhyme sentences is different.
In some embodiments, determining the set of duplicate-removed finals corresponding to the finals includes: and determining a vowel sub-table corresponding to the target vowel group of the vowels, wherein the vowel sub-table comprises a plurality of basic vowels, and deleting the vowels of the rhyme sentences in the vowel sub-table corresponding to the target vowel group to obtain a duplicate-removing vowel set.
Please refer to table 3:
TABLE 3 Table 3
Figure SMS_13
As shown in table 3, the vowel list corresponding to the 7 th vowel group includes the following basic vowels: in the middle, male, dashing, chong, rough, bear, work, supply. Because the vowels of the rhyme sentence include "punch" and "rough", the embodiment deletes "punch" and "rough" from the vowel subtable corresponding to the 7 th rhyme group, and obtains the deleted vowel subtable as shown in table 4:
Please refer to table 4:
TABLE 4 Table 4
Figure SMS_14
As shown in Table 4, the remaining reference vowels form a duplicate-removing set of vowels, which includes middle, male, chong, bear, functional, and supplied, and the reference vowels in the duplicate-removing set of vowels are defined herein as reference vowels for the purpose of avoiding ambiguity or making the constitution unclear and for convenience of introduction.
In some embodiments, the difference from the above embodiments is that each vowel group is configured with a corresponding duplicate-removing vowel set, the duplicate-removing vowel set of each vowel group is stored in a duplicate-removing vowel library, and determining the duplicate-removing vowel set corresponding to the vowel includes: comprising the following steps: and traversing the duplicate-removing vowel base by taking the target vowel family of the vowels as an index to obtain a duplicate-removing vowel set corresponding to the target vowel family.
Please refer to table 5:
TABLE 5
Figure SMS_15
As shown in table 5, the 7 th rhyme is the target rhyme, and the embodiment uses the 7 th rhyme as an index to traverse the heavy vowel base, so as to obtain a duplicate-removing vowel set { bear, work, supply }, which corresponds to the 7 th rhyme.
In some embodiments, selecting the reference vowel from the set of duplicate-removed vowels to replace the vowel of the conquered sentence includes the steps of: and determining the rhyme sentence needing to be modified, selecting a reference vowel corresponding to the rhyme sentence needing to be modified from the duplicate-removed vowel set as a designated vowel, and selecting the designated vowel to replace the vowel of the rhyme sentence needing to be modified.
Determining the rhyme sentences to be modified comprises the following steps: and determining the duplicate removal sentence sequence according to the positions of at least two identical-rhyme sentences in the mnemonic words, wherein the at least two identical-rhyme sentences are at least two convalescence sentences with the same vowels, and selecting sentences with the sequence consistent with the duplicate removal sentence sequence in the mnemonic words as convalescence sentences to be modified. The sequence of the duplicate removal sentences is the sequence of the convoy sentences needing to be modified in the mnemonic words.
Determining the duplicate-removed sentence sequence according to the positions of at least two homonyms in the mnemonic word comprises: determining the positions of at least two same-rhyme sentences in the mnemonic words, traversing the final and foot repeated identification library according to the positions of the at least two same-rhyme sentences, and obtaining the duplicate-removed sentence sequence corresponding to the positions of the at least two same-rhyme sentences.
The final repetition identification library stores duplicate-removed sentence orders corresponding to various final repetition situations.
For example, when the type of the mnemonic is the absolute sentence type, the final repetition identification library is shown in table 6:
TABLE 6
Figure SMS_16
As shown in table 6, "a" represents a rhyme sentence of the same vowel, where the order of "a" at 4 symbols is equivalent to the order of the rhyme sentence at the mnemonic word. "x" represents sentence 3, and since the absolute sentence provided in table 6 is the absolute sentence of the first sentence entering the rhyme, and sentence 3 does not have rhyme, sentence 3 will not be discussed here. "-" indicates that there is no rhyme sentence with the same vowel.
For example, in the absolute sentences with the order of 1, the first "a" represents the 1 st sentence, the second "a" represents the 2 nd sentence, "-" represents the 4 th sentence, the 1 st sentence, the 2 nd sentence and the 4 th sentence are the rhyme sentences, and the vowel of the 1 st sentence is the same as the vowel of the 2 nd sentence.
As shown in table 6, in the absolute sentences with the order of 1, the order of the duplicate removed sentences is 2, so the embodiment determines the 2 nd sentence as the rhyme sentence to be modified, that is, the 1 st sentence can be not modified, and the 1 st sentence can be different from the modified 2 nd sentence in terms of vowels.
As shown in table 6, in the absolute sentences with the order of 4, the 1 st sentence, the 2 nd sentence and the 4 th sentence have the same vowel, and the de-duplication sentence order is 2 and 4, so the embodiment determines that the 2 nd sentence and the 4 th sentence are both rhyme sentences to be modified, that is, the 1 st sentence can be not modified, and the difference of the vowel of the 1 st sentence, the modified 2 nd sentence and the modified 4 th sentence can be achieved.
It can be understood that when the type of the mnemonic is the poem type, the vowel repetition identification library is different from table 7, but the principle is the same and is not repeated here.
For example, if the mnemonics are as follows:
Four-large-size hollow soft sword punch, as one wishes and is open to poem punch
The man walking on the wiry can descend in a inclined furnace, and the arris can Xia Lixiong
The vowels of the 1 st sentence and the 2 nd sentence are the same and are all "towards", so that the 1 st sentence and the 2 nd sentence are the same vowel sentences. According to the position of the 1 st sentence and the position of the 2 nd sentence, the embodiment traverses the final repeated identification library to obtain a duplicate removal sentence sequence of '2'.
The method for selecting the reference vowel corresponding to the rhyme sentence to be modified from the duplicate-removed vowel set as the appointed vowel comprises the following steps: and determining the duplicate-removing vowel sequence corresponding to the rhyme sentence to be modified, and selecting the reference vowel corresponding to the duplicate-removing vowel sequence from the duplicate-removing vowel set as the appointed vowel.
TABLE 7
Figure SMS_17
When the type of the mnemonic is the absolute sentence type and the number of the reference vowels of the duplicate-removed vowel set is 2, in the absolute sentences with the sequence of 1, the embodiment selects the 1 st reference vowel in the duplicate-removed vowel set as the appointed vowel of the 2 nd sentence. In the absolute sentence with the order of 2, the embodiment selects the 1 st reference final from the duplicate final removing set as the designated final of the 4 th sentence. In the absolute sentence with the order of 3, the embodiment selects the 2 nd reference vowel from the duplicate-removed vowel set as the appointed vowel of the 4 th sentence. In the absolute sentences with the order of 4, the embodiment selects the 1 st reference final from the duplicate-removed final set as the appointed final of the 2 nd sentence, and selects the 2 nd reference final as the appointed final of the 4 th sentence.
It should be noted that, in the foregoing embodiments, there is not necessarily a certain sequence between the steps, and those skilled in the art will understand that, according to the description of the embodiments of the present invention, the steps may be performed in different orders in different embodiments, that is, may be performed in parallel, may be performed interchangeably, or the like.
Referring to fig. 7, fig. 7 is a schematic circuit diagram of an electronic device according to an embodiment of the present invention, where the electronic device may be any suitable type of device or electronic product, for example, the electronic device includes a server, a computer, a mobile phone, or other devices or electronic products with logic calculation and analysis functions. As shown in fig. 7, the electronic device 700 includes one or more processors 71 and memory 72. In fig. 7, a processor 71 is taken as an example.
The processor 71 and the memory 72 may be connected by a bus or otherwise, which is illustrated in fig. 7 as a bus connection.
The memory 72 is used as a non-volatile computer readable storage medium for storing a non-volatile software program, a non-volatile computer executable program, and modules, such as program instructions/modules corresponding to the method for generating a mnemonic in the embodiment of the present invention. The processor 71 implements the functions of the mnemonic generating method provided by the above-described method embodiment by running a nonvolatile software program, instructions, and modules stored in the memory 72.
Memory 72 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 72 may optionally include memory located remotely from processor 71, such remote memory being connectable to processor 71 through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The program instructions/modules are stored in the memory 72 that, when executed by the one or more processors 71, perform the mnemonic generating method of any of the method embodiments described above.
Embodiments of the present invention also provide a non-transitory computer storage medium storing computer executable instructions that are executed by one or more processors, such as the one processor 71 of fig. 7, to cause the one or more processors to perform the method of generating a mnemonic in any of the method embodiments described above.
Embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by an electronic device, cause the electronic device to perform the method of generating a mnemonic according to any one of the claims.
The above-described embodiments of the apparatus or device are merely illustrative, in which the unit modules illustrated as separate components may or may not be physically separate, and the components shown as unit modules may or may not be physical units, may be located in one place, or may be distributed over multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Based on such understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the related art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the invention, the steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (12)

1. The method for generating the mnemonic is characterized by comprising the following steps:
obtaining a target sequence, wherein the target sequence comprises at least two sub-sequences;
determining a target rhyme according to the target sequence;
generating sentences corresponding to the child number columns according to the target rhyme and the numerical values of the child number columns, wherein tail words of at least two sentences are extruded on the target rhyme;
And generating mnemonics according to all sentences.
2. The method of claim 1, wherein said determining a target family of rhyme from said target sequence comprises:
determining a rhyme identification value according to the target number sequence;
and determining the target rhyme according to the rhyme identification value.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
before generating the sentence corresponding to the child number column, the method further comprises: determining a target sentence pattern template according to the target sequence;
then: the generating the sentence corresponding to the sub-number sequence according to the target rhyme and the numerical value of the sub-number sequence comprises: and generating sentences corresponding to the child number columns according to the target sentence pattern template, the target rhyme and the numerical values of the child number columns.
4. A method according to claim 3, wherein the sentence pattern templates meet a pronunciation-level classification criterion for modern chinese or ancient chinese, said determining a target sentence pattern template from said target sequence comprising:
determining a flat-zep identification value according to the target sequence;
and determining a target sentence pattern template according to the level and detail mark value.
5. The method of claim 3, wherein generating sentences corresponding to the subcolumns based on the values of the target sentence pattern template, the target vowel family, and the subcolumns comprises:
Determining a target level word according to the target sentence pattern template and the numerical value of the sub-sequence;
determining a target tail word according to the sequence of the sub-number sequence in the target number sequence, the target rhyme and the numerical value of the sub-number sequence;
and generating sentences corresponding to the sub-sequence according to the target level-narrow words and the target tail words.
6. The method of claim 5, wherein the sub-sequence of numbers includes at least one level-to-level array element, and wherein determining a target level-to-level word based on the target period template and the numerical values of the sub-sequence of numbers includes:
determining a target word tone structure corresponding to a target level array unit according to the target sentence pattern template, wherein the target level array unit is one array unit in at least one level array unit;
determining a target level-zeping sub-list pointed by a target tone phrase structure in a preset word list, wherein the target level-zeping sub-list comprises a plurality of level-zeping words which are sequentially arranged and meet the tone structure of the target word;
and selecting the level-zeping words with the sequence consistent with the numerical value of the target level-zeping array unit from the target level-zeping sub list as target level-zeping words.
7. The method of claim 5, wherein the target vowel group corresponds to a vowel group identification value, the sub-sequence includes a mantissa group element, and determining a target mantissa based on an order of the sub-sequence in the target sequence, the target vowel group, and a numerical value of the sub-sequence includes:
Judging whether the sequence of the sub-sequence in the target sequence meets the final setting condition or not;
if the target vowel group meets the target vowel group, determining a target tail word according to the target vowel group and the numerical value of the tail word number group unit, wherein the vowel group of the target tail word is the target vowel group;
if the target rhyme is not satisfied, determining a non-escort set according to the target rhyme, determining a reference non-escort rhyme according to the non-escort set and the rhyme identification value, and determining a target tail word according to the reference non-escort rhyme and the numerical value of the tail word number group unit, wherein the reference non-escort rhyme is different from the target rhyme.
8. The method of claim 7, wherein each vowel group corresponds to a vowel base table, the vowel base table including a plurality of vowels arranged in sequence, the determining the target tail based on the values of the target vowel group and the last array element including:
selecting a vowel base corresponding to the target vowel family as a target vowel base;
and selecting vowels with the sequence consistent with the numerical value of the last array unit in the target vowel sub-table as target tail words.
9. The method of claim 5, wherein the array of sub-arrays comprises a constant language array element, the method further comprising:
Acquiring a normal language array unit;
selecting words with the sequence consistent with the numerical value of the normal language array unit from a preset normal language word list as target words;
then: the generating the sentence corresponding to the sub-sequence according to the target level-zep word and the target tail word comprises the following steps: and combining the target word, the target flatly-shaped word and the target tail word in sequence to obtain sentences corresponding to the sub-number columns.
10. The method of any one of claims 1 to 9, wherein the obtaining a target sequence of numbers comprises:
generating a random number of the target digit;
generating an additional number of a specified number of bits according to the random number;
and combining the random number and the additional number in sequence to obtain the target number sequence.
11. A non-transitory readable storage medium storing computer-executable instructions for causing an electronic device to perform the method of generating a mnemonic according to any one of claims 1 to 10.
12. An electronic device, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of generating a mnemonic according to any one of claims 1 to 10.
CN202310282199.0A 2023-03-22 2023-03-22 Method for generating mnemonic words and electronic equipment Pending CN116011431A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310282199.0A CN116011431A (en) 2023-03-22 2023-03-22 Method for generating mnemonic words and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310282199.0A CN116011431A (en) 2023-03-22 2023-03-22 Method for generating mnemonic words and electronic equipment

Publications (1)

Publication Number Publication Date
CN116011431A true CN116011431A (en) 2023-04-25

Family

ID=86037672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310282199.0A Pending CN116011431A (en) 2023-03-22 2023-03-22 Method for generating mnemonic words and electronic equipment

Country Status (1)

Country Link
CN (1) CN116011431A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030068604A1 (en) * 2001-10-09 2003-04-10 Krasney Jack G. Personal mnemonic generator
US20070300076A1 (en) * 2006-06-22 2007-12-27 Sun Microsystems, Inc. Method for generating mnemonic random passcodes
CN109002433A (en) * 2018-05-30 2018-12-14 出门问问信息科技有限公司 A kind of document creation method and device
CN110019919A (en) * 2017-09-30 2019-07-16 腾讯科技(深圳)有限公司 A kind of generation method and device of the rhymed lyrics
CN110955713A (en) * 2019-11-26 2020-04-03 上海中信信息发展股份有限公司 Mnemonic word generating method and device and storage medium
CN111259946A (en) * 2020-01-12 2020-06-09 杭州复杂美科技有限公司 Mnemonic word generating method, mnemonic word recovering method, equipment and storage medium
CN114900284A (en) * 2021-03-29 2022-08-12 北京融蚁科技有限公司 Method for generating SM2 key based on mnemonic words
US20230053891A1 (en) * 2021-08-20 2023-02-23 Samsung Electronics Co., Ltd. Electronic device for generating mnemonic phrase of private key and operation method in the electronic device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030068604A1 (en) * 2001-10-09 2003-04-10 Krasney Jack G. Personal mnemonic generator
US20070300076A1 (en) * 2006-06-22 2007-12-27 Sun Microsystems, Inc. Method for generating mnemonic random passcodes
CN110019919A (en) * 2017-09-30 2019-07-16 腾讯科技(深圳)有限公司 A kind of generation method and device of the rhymed lyrics
CN109002433A (en) * 2018-05-30 2018-12-14 出门问问信息科技有限公司 A kind of document creation method and device
CN110955713A (en) * 2019-11-26 2020-04-03 上海中信信息发展股份有限公司 Mnemonic word generating method and device and storage medium
CN111259946A (en) * 2020-01-12 2020-06-09 杭州复杂美科技有限公司 Mnemonic word generating method, mnemonic word recovering method, equipment and storage medium
CN114900284A (en) * 2021-03-29 2022-08-12 北京融蚁科技有限公司 Method for generating SM2 key based on mnemonic words
US20230053891A1 (en) * 2021-08-20 2023-02-23 Samsung Electronics Co., Ltd. Electronic device for generating mnemonic phrase of private key and operation method in the electronic device

Similar Documents

Publication Publication Date Title
CN111241294B (en) Relationship extraction method of graph convolution network based on dependency analysis and keywords
CN107679224B (en) Intelligent question and answer method and system for unstructured text
CN111639163A (en) Problem generation model training method, problem generation method and related equipment
CN110286778B (en) Chinese deep learning input method, device and electronic equipment
CN109740165A (en) Dictionary tree constructing method, sentence data search method, apparatus, equipment and storage medium
CN109086270B (en) Automatic poetry making system and method based on ancient poetry corpus vectorization
CN109800298A (en) A kind of training method of Chinese word segmentation model neural network based
CN104391980A (en) Song generating method and device
CN106776548A (en) A kind of method and apparatus of the Similarity Measure of text
CN112463942B (en) Text processing method, text processing device, electronic equipment and computer readable storage medium
CN110443864A (en) A kind of characters in a fancy style body automatic generation method based on single phase a small amount of sample learning
CN115840799B (en) Intellectual property comprehensive management system based on deep learning
CN106980620A (en) A kind of method and device matched to Chinese character string
CN104252542A (en) Dynamic-planning Chinese words segmentation method based on lexicons
CN108509539A (en) Information processing method electronic equipment
CN112784603A (en) Patent efficacy phrase identification method
CN112329392A (en) Target encoder construction method and device for bidirectional encoding
CN113553847A (en) Method, device, system and storage medium for parsing address text
CN116011430B (en) Vowel duplication elimination method, nonvolatile readable storage medium and electronic equipment
CN116011431A (en) Method for generating mnemonic words and electronic equipment
CN110990538B (en) Semantic fuzzy search method based on sentence-level deep learning language model
CN109902292A (en) Chinese word vector processing method and its system
CN110955768B (en) Question-answering system answer generation method based on syntactic analysis
CN111897958B (en) Ancient poetry classification method based on natural language processing
CN114912434A (en) Method and device for generating style text, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination