Bitcoin wallet address string encoding method and address number table generation method

By selecting substrings from the bitcoin wallet address string, calculating the repetition probability, and encoding according to preset rules, the problems of excessive memory usage and inconvenient processing caused by encoding methods in the prior art are solved, and more efficient memory utilization and encoding efficiency are achieved.

CN113919289BActive Publication Date: 2025-03-18SHANGHAI ENG RES CENT FOR BROADBAND TECH & APPL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010652302.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-08
Publication Date
2025-03-18
Estimated Expiration
2040-07-08

AI Technical Summary

Technical Problem

In the prior art, encoding methods of Bitcoin wallet address strings, such as hash encoding and Hoffman encoding, cannot effectively meet the memory footprint and encoding search speed, resulting in too large number tables and inconvenient processing.

Method used

By selecting substrings of different lengths from the Bitcoin wallet address string, counting the number of unique substrings under each length, calculating the repetition probability of the repetition substring, selecting the substring length of the lower probability value, and intercepting the substring at a uniform position, corresponding to the substring characters to the number according to the preset corresponding rules, and arranging them to an encoding.

Benefits of technology

It effectively reduces the space occupied by the Bitcoin wallet address number table in computer memory, and improves encoding efficiency and memory utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113919289B_ABST
    Figure CN113919289B_ABST
Patent Text Reader

Abstract

The present invention provides a method for encoding a Bitcoin wallet address string and a method for generating an address number table. The method for encoding a Bitcoin wallet address string includes: selecting substrings of different lengths from a number of Bitcoin wallet address strings, counting the number of unique substrings under each length, and calculating the repetition probability of repeated substrings under each length; selecting a lower probability value from each repetition probability, and determining the substring selection length corresponding to the lower probability value as the interception length of each Bitcoin wallet address string; unifying the starting interception position of each Bitcoin wallet address string, and intercepting the substrings of each Bitcoin wallet address string according to the interception length; according to the preset corresponding rules, each character of each substring is respectively corresponded to its own number, and each number of each substring is arranged in character order. The address number table generated by the encoding method of the present invention will greatly reduce the address space occupied by the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of bitcoin encoding, and in particular to a method for encoding a bitcoin wallet address string and a method for generating an address number table. Background Art

[0002] Currently, many industries are conducting research and application on blockchain. As a classic blockchain electronic cryptocurrency, Bitcoin has been studied in depth in many blockchain-related fields as a classic topic, and Bitcoin wallets are a key focus in the research process.

[0003] Each Bitcoin wallet has a unique address, which consists of a string of 34 bytes in length. Each character ranges from 0 to 9, a to z, A to Z. This string uniquely identifies a Bitcoin wallet. Since computers are more efficient in processing numbers than strings when processing large amounts of wallet address data, especially when performing operations such as searching and mapping, they generally map the 34-byte address string to a digital ID value, and then generate an address number table in the computer memory for use, such as Figure 1 In the process of generating the address number table, the 34-byte address will be encoded. Currently, the total number of Bitcoin wallets recorded exceeds 660,000,000. The main engineering obstacle to numbering so many strings is that the encoded address number table occupies too much memory in the computer.

[0004] At present, there are two main string encoding algorithms in the industry: hash coding and Huffman coding. Hash coding is widely used. The encoding method is to accumulate the bytes in the string one by one with a certain algorithm to obtain a digital code. Hash coding is repeatable, that is, two different strings will have the same code. At this time, an array will be linked under the code to save all strings whose codes are equal to this value. Huffman coding sets a binary code for each character of the string. Symbols that appear more frequently will get shorter bits, and symbols that appear less frequently will be assigned longer bits, so as to improve the data compression rate.

[0005] However, hash coding and Huffman coding do not meet the requirements of memory usage and coding search speed, and are not suitable for Bitcoin address analysis scenarios. The problems are as follows:

[0006] After hash coding, since all 34 bytes are involved in the coding process and stored in the number table, and as the amount of data increases, the number table will be too large to be stored in the Java language HashMap.<String,Integer> For example, after all address encoding is completed, it will occupy about 40GB of memory space;

[0007] Although Huffman coding improves the data compression rate, due to the principle of Huffman coding, the code length is not fixed. Variable-length data is inconvenient for computers to process and is not suitable for Bitcoin address analysis scenarios. Summary of the invention

[0008] In view of the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a method for encoding a Bitcoin wallet address string and a method for generating an address number table, thereby proposing an encoding technology suitable for Bitcoin address analysis scenarios.

[0009] To achieve the above-mentioned purpose and other related purposes, the present invention provides a method for encoding a Bitcoin wallet address string, comprising: selecting substrings of different lengths from a number of Bitcoin wallet address strings, counting the number of unique substrings under each length, and calculating the repetition probability of repeated substrings under each length; selecting a lower probability value from each of the repetition probabilities, and determining the substring selection length corresponding to the lower probability value as the interception length of each of the Bitcoin wallet address strings; unifying the starting interception position of each of the Bitcoin wallet address strings, and respectively intercepting the substrings of each of the Bitcoin wallet address strings according to the interception length; according to a preset corresponding rule, corresponding each character of each of the substrings to their respective numbers, and arranging the numbers of each of the substrings in character order.

[0010] In one embodiment of the present invention, the preset corresponding rule is: all the numbers, uppercase letters and lowercase letters constituting the Bitcoin wallet address string are uniquely corresponding to a preset number respectively.

[0011] In one embodiment of the present invention, the preset number is a decimal number; the method further includes: corresponding each character of each substring to its own decimal number; converting each decimal number into a binary number, and arranging each binary number of each substring in character order.

[0012] To achieve the above-mentioned purpose and other related purposes, the present invention provides a method for generating a Bitcoin wallet address number table, comprising: selecting substrings of different lengths from a number of Bitcoin wallet address strings, counting the number of unique substrings under each length, and calculating the repetition probability of repeated substrings under each length; selecting a lower probability value from each of the repetition probabilities, and determining the substring selection length corresponding to the lower probability value as the interception length of each of the Bitcoin wallet address strings; unifying the starting interception position of each of the Bitcoin wallet address strings, and intercepting the substrings of each of the Bitcoin wallet address strings according to the interception length; according to a preset corresponding rule, corresponding each character of each of the substrings to their respective numbers, and arranging the numbers of each of the substrings in character order; using the arranged numbers of each of the substrings to represent each Bitcoin wallet address, corresponding one-to-one with each address number ID, thereby generating the Bitcoin wallet address number table.

[0013] To achieve the above-mentioned purpose and other related purposes, the present invention provides a Bitcoin wallet address string encoding device, comprising: a repetition probability calculation module, used to select substrings of different lengths from a number of Bitcoin wallet address strings, count the number of unique substrings under each length, and calculate the repetition probability of repeated substrings under each length; a cut length determination module, used to select a lower probability value from each of the repetition probabilities, and determine the substring selection length corresponding to the lower probability value as the cut length of each Bitcoin wallet address string; a substring cut module, used to unify the start cut position of each Bitcoin wallet address string, and cut out the substring of each Bitcoin wallet address string according to the cut length; a substring encoding module, used to correspond each character of each substring to its own number according to a preset corresponding rule, and arrange the numbers of each substring in character order.

[0014] To achieve the above-mentioned purpose and other related purposes, the present invention provides a device for generating a Bitcoin wallet address number table, comprising: a repetition probability calculation module, used to select substrings of different lengths from a number of Bitcoin wallet address strings, count the number of unique substrings under each length, and calculate the repetition probability of repeated substrings under each length; a cut length determination module, used to select a lower probability value from each of the repetition probabilities, and determine the substring selection length corresponding to the lower probability value as the cut length of each Bitcoin wallet address string; a substring cut module, used to unify the start cut position of each Bitcoin wallet address string, and cut out the substring of each Bitcoin wallet address string according to the cut length; a substring encoding module, used to correspond each character of each substring to its own number according to a preset corresponding rule, and arrange each number of each substring in character order; an address number table creation module, used to represent each Bitcoin wallet address with the arranged numbers of each substring, and correspond one-to-one with each address number ID, so as to generate the Bitcoin wallet address number table.

[0015] To achieve the above-mentioned purpose and other related purposes, the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is loaded and executed by a processor, the encoding method of the Bitcoin wallet address string is implemented.

[0016] To achieve the above-mentioned purpose and other related purposes, the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is loaded and executed by a processor, the method for generating the Bitcoin wallet address number table is implemented.

[0017] To achieve the above-mentioned purpose and other related purposes, the present invention provides an electronic device, comprising: a processor and a memory; wherein the memory is used to store a computer program; the processor is used to load and execute the computer program so that the electronic device executes the encoding method of the Bitcoin wallet address string.

[0018] To achieve the above-mentioned purpose and other related purposes, the present invention provides an electronic device, comprising: a processor and a memory; wherein the memory is used to store a computer program; the processor is used to load and execute the computer program so that the electronic device executes the method for generating the Bitcoin wallet address number table.

[0019] As described above, the encoding method of the Bitcoin wallet address string of the present invention and the method for generating the address number table select substrings of different lengths from a number of Bitcoin wallet address strings, count the number of unique substrings under each length, and calculate the repetition probability of repeated substrings under each length; select a lower probability value from each of the repetition probabilities, and determine the substring selection length corresponding to the lower probability value as the interception length of each Bitcoin wallet address string; unify the starting interception position of each Bitcoin wallet address string, and intercept the substrings of each Bitcoin wallet address string according to the interception length; according to the preset corresponding rules, correspond each character of each substring to its own number, and arrange each number of each substring in character order; use the arranged numbers of each substring to represent each Bitcoin wallet address, which corresponds to each address number ID one by one, thereby generating the Bitcoin wallet address number table. The Bitcoin wallet address number table generated by the encoding method of the Bitcoin wallet address string of the present invention will greatly reduce the address space occupied by the prior art, thereby saving computer memory. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 Shown is a schematic diagram of a Bitcoin wallet address number table in the prior art.

[0021] Figure 2 Shown is a flowchart of a method for encoding a Bitcoin wallet address string in one embodiment of the present invention.

[0022] Figure 3 Shown is a trend diagram of how the repetition probability varies with the substring length in one embodiment of the present invention.

[0023] Figure 4 The diagram shows a comparison of memory usage when an address number table is generated using a traditional method and the address number table generation method of the present invention.

[0024] Figure 5 A schematic diagram of a module of a device for encoding a Bitcoin wallet address string in one embodiment of the present invention is shown.

[0025] Figure 6 Shown is a schematic structural diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0027] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0028] like Figure 2 As shown, this embodiment provides a method for encoding a Bitcoin wallet address string, comprising the following steps:

[0029] S21: Select substrings of different lengths from a number of Bitcoin wallet address strings, count the number of unique substrings of each length, and calculate the repetition probability of repeated substrings of each length;

[0030] S22: Select a lower probability value from each of the repetition probabilities, and determine the substring selection length corresponding to the lower probability value as the interception length of each of the Bitcoin wallet address character strings;

[0031] S23: unifying the start interception position of each of the Bitcoin wallet address strings, and intercepting substrings of each of the Bitcoin wallet address strings according to the interception length;

[0032] S24: According to a preset correspondence rule, each character of each substring is corresponded to a respective number, and each number of each substring is arranged in character order.

[0033] In one embodiment, the preset corresponding rule is: all the numbers 0 to 9, uppercase letters A to Z, and lowercase letters a to z that constitute the Bitcoin wallet address string are uniquely corresponding to a preset number, and the preset number is preferably a decimal number, and of course, a binary number, an octal number, a hexadecimal number, etc. can also be used. For example, the numbers 0 to 9, uppercase letters A to Z, and lowercase letters a to z correspond to the decimal numbers 0 to 61 one by one, specifically, the number 0 corresponds to the decimal number 0, the number 1 corresponds to the decimal number 1, ..., the uppercase letter A corresponds to the decimal number 10, the uppercase letter B corresponds to the decimal number 11, ..., the lowercase letter a corresponds to the decimal number 36, and the uppercase letter b corresponds to the decimal number 37.

[0034] It should be noted that the present invention does not limit the order of numbers, uppercase letters and lowercase letters. For example, those skilled in the art can also correspond uppercase letters A to Z to decimal numbers 0 to 25, lowercase letters a to z to decimal numbers 26 to 51, and numbers 0 to 9 to decimal numbers 52 to 61.

[0035] Preferably, in one embodiment, the preset corresponding rule does not include the corresponding conversion of the uppercase letter I and the uppercase letter O, because these two uppercase letters are easily confused with the numbers 1 and 0. Thus, the characters that can be used in the Bitcoin wallet address string are: 0123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz (a total of 60 characters), and the corresponding relationship between these 60 characters and the decimal numbers 0 to 59 is as follows:

[0036] Table 1

[0037] character Decimal Numbers 0 0 1 1 …… …… 9 9 A 10 B 11 …… …… H 17 J 18 …… …… N 22 P 23 …… …… Z 33 a 34 b 35 …… …… z 59

[0038] Continuing from the above, step S14 first corresponds each character of each substring to its own decimal number, then converts each decimal number into a binary number, and arranges and merges each binary number of each substring in character order, thereby completing the encoding of the Bitcoin wallet address string.

[0039] The technical principle of this method will be explained in detail below through specific examples.

[0040] The total number of Bitcoin wallets currently on record exceeds 660,000,000. In terms of quantity, 660,000,000 addresses is far smaller than the address space contained in a 34-byte string (62 34 ), that is to say, Bitcoin wallet addresses are quite sparse in the entire wallet address space.

[0041] It should be noted that the characters of a Bitcoin wallet address are randomly combined, and its substrings do not have a fixed pattern. Based on this, this example uses a probability statistics method to first perform probability statistics on the character composition of a Bitcoin wallet address in multiple dimensions.

[0042] Next, we get substrings from the same area of ​​each 34-byte address and count the probability of duplication. Since the address characters are randomly combined, theoretically this area can be selected at will. Here, we select the area starting from the 10th byte to get the substring. The length of the substring increases by 1 each time and the probability of duplication of the substring is counted. The following statistical results are obtained (assuming that the total number of Bitcoin wallet addresses is 661,474,130):

[0043] Table 2

[0044]

[0045] It should be noted that, taking the address 15wHpptF792fQrBTLeUMz5LavDtCaCmSqM as an example, the substring is obtained from the area starting from the 10th byte. The substring corresponding to the substring length of 2 is "92", the substring corresponding to the substring length of 3 is "92f", and so on. The substring corresponding to the substring length of 10 is "92fQrBTLeU".

[0046] For ease of observation, Table 2 is plotted as follows Figure 3 The trend graph of the repetition probability as the substring length changes is shown. It can be clearly seen from the trend graph that if a substring of a certain length is to be selected to represent the Bitcoin wallet address, then the length of 7 is the most reasonable, and the corresponding repetition probability is low (0.01868%). Increasing the length of the substring will not only have little effect on the repetition probability, but will also increase the substring length.

[0047] After determining that the interception length is 7, you can intercept each Bitcoin wallet address string. Here, first define two parameters:

[0048] 1. Substring start position Sub start :The position of the substring from the beginning of the Bitcoin wallet address string. The above setting starts from the 10th byte, that is: Sub start =10;

[0049] 2. Substring length Sub length , which is the aforementioned cut length, here, Sub length =7.

[0050] Take the Bitcoin wallet address string 15wHpptF792fQrBTLeUMz5LAvDtCaCmSqM as an example, from Sub start =10Start intercepting Sub length The substring of length =7 is: 92fQrBT.

[0051] According to the above-mentioned preferred preset corresponding rule (i.e., the corresponding rule between characters excluding uppercase letters I and O and decimal numbers), each bit of the intercepted substring is corresponded to a decimal number, thereby improving the data density, as shown in Table 3:

[0052] Table 3

[0053] Character position 1 2 3 4 5 6 7 character 9 2 f Q r B T The corresponding decimal number 9 2 39 24 51 11 27

[0054] Preferably, since each character code range is [0,59], it can be put into 6-bit data, and the 7 character codes can be combined into a 42-bit integer, thereby improving the data density of the code, as shown in Table 4:

[0055] Table 4

[0056]

[0057] It should be noted that this example chooses to convert each character of the intercepted substring into a binary code, and finally the binary combined code "001001000010100111011000110011001011011011" represents the corresponding Bitcoin wallet address string. In practical applications, those skilled in the art may also choose octal coding, hexadecimal coding, etc., and the present invention does not limit this.

[0058] It is worth noting that, following the above, this example intercepts the length Sub length is 7, corresponding to a lower repetition rate (0.01868%). Considering that the total number of Bitcoin wallet addresses is 661,474,130, the number of repeated substrings can be calculated. repeat :

[0059] Sub repeat =661,474,130*0.01868%=123563

[0060] That is, there are about 123,000 repeated substrings. If we continue to use the hash table to deal with repeated encodings, using an array structure, assuming that the complete string of the Bitcoin wallet address is stored in this data structure to eliminate duplication, and each address is given a 32-bit (4-byte) number and stored together, then the memory occupied is about

[0061] 123563*(34+4)=approximately 5MByte

[0062] This memory size is an extremely small value for the storage capacity of the entire address reference table and is no longer taken into account in subsequent calculations.

[0063] At this point, the encoding method of the Bitcoin wallet address string of the present invention completes the encoding of the Bitcoin wallet address string, and encodes the original 34-character-long (272-bit) wallet address into 42-bit data. According to the computer memory, it is saved in 1-byte (8-bit) units. The encoded data can be saved in 6-byte (48-bit) computer memory, and the data volume is compressed to 17.6% of the original, and the information density is greatly improved.

[0064] In addition, the present invention also provides a method for generating a Bitcoin wallet address number table. Based on the aforementioned Bitcoin wallet address character string encoding method, each Bitcoin wallet address is represented by the arranged numbers of each substring, which correspond one-to-one with each address number ID, thereby generating the Bitcoin wallet address number table.

[0065] Preferably, the code obtained by the encoding method of the aforementioned Bitcoin wallet address string is converted into hexadecimal, and then corresponds to the address number ID one by one. For example, Table 5 shows an address number table in the prior art that does not use the method for generating the Bitcoin wallet address number table of this embodiment, and Table 6 shows an address number table generated by the method for generating the Bitcoin wallet address number table of this embodiment:

[0066] Table 5

[0067] address Address number id 15wHpptF792fQrBTLeUMz5LAvDtCaCmSqM 1

[0068] Table 6

[0069] Encoding (hexadecimal representation) Address number id 0x90a76332db 1

[0070] In this way, the Bitcoin wallet address number table only needs to record the mapping relationship between the encoded integer and the corresponding address number ID, thereby greatly reducing the occupied address space.<Integer64,Integer> To regenerate the address number table, it should be noted that the Java language does not provide a 48-bit integer type. Here, the 64-bit integer type Integer64 is used to save the code, and the corresponding 32-bit integer Integer is used to save the number. Then the memory usage is 8.5GB, compared with the original memory usage. Figure 4 As shown, the effectiveness of this method is verified.

[0071] All or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. Based on such understanding, the present invention also provides a computer program product, including one or more computer instructions. The computer instructions can be stored in a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk (SSD)), etc.

[0072] See also Figure 5This embodiment provides a device for encoding a Bitcoin wallet address string. Since the technical principle of this embodiment is similar to the technical principle of the aforementioned Bitcoin wallet address string encoding method embodiment, the same technical details will not be repeated. The device for encoding a Bitcoin wallet address string in this embodiment includes the following modules:

[0073] A repetition probability calculation module is used to select substrings of different lengths from a number of Bitcoin wallet address strings, count the number of unique substrings of each length, and calculate the repetition probability of repeated substrings of each length;

[0074] A truncated length determination module, used to select a lower probability value from each of the repetition probabilities, and determine the substring selection length corresponding to the lower probability value as the truncated length of each of the Bitcoin wallet address strings;

[0075] A substring interception module, used to unify the start interception position of each Bitcoin wallet address string, and intercept the substring of each Bitcoin wallet address string according to the interception length;

[0076] The substring encoding module is used to correspond each character of each substring to a respective number according to a preset corresponding rule, and arrange the numbers of each substring in character order.

[0077] In addition, the present invention also provides a device for generating a Bitcoin wallet address number table. Based on the aforementioned Bitcoin wallet address string encoding device, it also includes: an address number table creation module, which is used to represent each Bitcoin wallet address with the arranged numbers of each substring, and correspond one-to-one with each address number ID, thereby generating the Bitcoin wallet address number table.

[0078] Those skilled in the art should understand that Figure 5 The division of each module in the embodiment is only a division of logical functions, and in actual implementation, all or part of it can be integrated into one or more physical entities. Moreover, these modules can be implemented in the form of software calling through processing elements, or in the form of hardware, or some modules can be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware.

[0079] See also Figure 6This embodiment provides an electronic device, which may be a desktop computer, a portable computer, a smart phone, etc. In detail, the electronic device at least includes: a memory and a processor connected via a bus, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to execute the steps in the aforementioned embodiment of the method for encoding a Bitcoin wallet address string, or to execute the steps in the aforementioned embodiment of the method for generating a Bitcoin wallet address number table.

[0080] The system bus mentioned above can be a Peripheral Pomponent Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM), and may also include non-volatile memory, such as at least one disk storage.

[0081] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0082] In summary, the Bitcoin wallet address string encoding method and address number table generation method of the present invention effectively overcome the various shortcomings of the prior art and have high industrial utilization value.

[0083] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for encoding a Bitcoin wallet address string, characterized in that: include: Select substrings of different lengths from several Bitcoin wallet address strings, count the number of unique substrings of each length, and calculate the probability of repeated substrings of each length; Selecting a limited probability value from each of the repetition probabilities, and determining the substring selection length corresponding to the limited probability value as the interception length of each of the Bitcoin wallet address strings; Unifying the starting interception position of each of the Bitcoin wallet address strings, and intercepting the substrings of each of the Bitcoin wallet address strings according to the interception length; According to the preset corresponding rule, each character of each substring is corresponded to its own number, and the numbers of each substring are arranged in character order; the preset corresponding rule is: all numbers, uppercase letters and lowercase letters constituting the Bitcoin wallet address string are uniquely corresponded to a preset number respectively.

2. The method according to claim 1, characterized in that The preset number is a decimal number; the method further includes: Corresponding each character of each substring to its own decimal number; Each of the decimal numbers is converted into a binary number, and each binary number of each of the substrings is arranged in character order.

3. A method for generating a Bitcoin wallet address number table, characterized in that: include: Select substrings of different lengths from several Bitcoin wallet address strings, count the number of unique substrings of each length, and calculate the probability of repeated substrings of each length; Selecting a limited probability value from each of the repetition probabilities, and determining the substring selection length corresponding to the limited probability value as the interception length of each of the Bitcoin wallet address strings; Unifying the starting interception position of each of the Bitcoin wallet address strings, and intercepting the substrings of each of the Bitcoin wallet address strings according to the interception length; According to a preset corresponding rule, each character of each substring is respectively corresponded to a respective number, and each number of each substring is arranged in character order; the preset corresponding rule is: all numbers, uppercase letters and lowercase letters constituting the Bitcoin wallet address string are respectively uniquely corresponded to a preset number; The arranged numbers of each substring are used to represent each Bitcoin wallet address, which corresponds to each address number ID one by one, thereby generating the Bitcoin wallet address number table.

4. A device for encoding a Bitcoin wallet address string, characterized in that: include: A repetition probability calculation module is used to select substrings of different lengths from a number of Bitcoin wallet address strings, count the number of unique substrings of each length, and calculate the repetition probability of repeated substrings of each length; A truncated length determination module, used to select a limited probability value from each of the repetition probabilities, and determine the substring selection length corresponding to the limited probability value as the truncated length of each of the Bitcoin wallet address strings; A substring interception module, used to unify the start interception position of each of the Bitcoin wallet address strings, and intercept the substrings of each of the Bitcoin wallet address strings according to the interception length; The substring encoding module is used to correspond each character of each substring to its own number according to a preset corresponding rule, and arrange the numbers of each substring in character order; the preset corresponding rule is: all numbers, uppercase letters and lowercase letters constituting the Bitcoin wallet address string are uniquely corresponding to a preset number.

5. A device for generating a Bitcoin wallet address number table, characterized in that: include: A repetition probability calculation module is used to select substrings of different lengths from a number of Bitcoin wallet address strings, count the number of unique substrings of each length, and calculate the repetition probability of repeated substrings of each length; A truncated length determination module, used to select a limited probability value from each of the repetition probabilities, and determine the substring selection length corresponding to the limited probability value as the truncated length of each of the Bitcoin wallet address strings; A substring interception module, used to unify the start interception position of each of the Bitcoin wallet address strings, and intercept the substrings of each of the Bitcoin wallet address strings according to the interception length; A substring encoding module, used to correspond each character of each substring to a respective number according to a preset correspondence rule, and arrange the numbers of each substring in character order; The address number table creation module is used to represent each Bitcoin wallet address with the arranged numbers of each substring, and correspond one-to-one with each address number ID, so as to generate the Bitcoin wallet address number table.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is loaded and executed by the processor, the encoding method of the Bitcoin wallet address string as described in any one of claims 1 to 2 is implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is loaded and executed by the processor, the encoding method of the Bitcoin wallet address string as claimed in claim 1 is implemented.

8. An electronic device, characterized in that: include: processor and memory; wherein, The memory is used to store computer programs; The processor is used to load and execute the computer program so that the electronic device executes the encoding method of the Bitcoin wallet address string as described in any one of claims 1 to 2.

9. An electronic device, characterized in that: include: processor and memory; wherein, The memory is used to store computer programs; The processor is used to load and execute the computer program so that the electronic device executes the method for generating the encoding of the Bitcoin wallet address string as described in claim 1.

Citation Information

Patent Citations

  • Data compression method, data decompression method and device

    CN104753540A

  • Block chain data comparison and consensus method

    CN105719185A