CN110737808A - Chinese character string statistical method and system based on block chain - Google Patents

Chinese character string statistical method and system based on block chain Download PDF

Info

Publication number
CN110737808A
CN110737808A CN201910939820.XA CN201910939820A CN110737808A CN 110737808 A CN110737808 A CN 110737808A CN 201910939820 A CN201910939820 A CN 201910939820A CN 110737808 A CN110737808 A CN 110737808A
Authority
CN
China
Prior art keywords
statistical
string
input
chinese character
target user
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
CN201910939820.XA
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.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Alipay Hangzhou Information Technology 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN201910939820.XA priority Critical patent/CN110737808A/en
Publication of CN110737808A publication Critical patent/CN110737808A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Document Processing Apparatus (AREA)

Abstract

When a target user inputs Chinese characters by using the target input method client, the target input method client submits letter strings input by the target user and the Chinese character strings selected by the target user to a block chain network corresponding to each input scene pre-designated by the target user, and each block chain network updates a statistical table according to the letter strings and the Chinese character strings.

Description

Chinese character string statistical method and system based on block chain
Technical Field
The embodiment of the specification relates to the technical field of information, in particular to block chain-based Chinese character string statistical methods and systems.
Background
When more than Chinese character strings are matched with the letter strings input by the user, the input method software displays the matched Chinese character strings to the user for selection in the ordered arrangement (namely, a Chinese character string queue), and the Chinese character string selected by the user is the Chinese character string which the user wants to input.
, the more front the Chinese character string to be input by the user is in the Chinese character string queue, the more convenient the user can select the Chinese character string to be input, and the higher the efficiency of inputting Chinese characters into the intelligent device.
In practice, a plurality of users in the same input scenario often have similar Chinese character input preferences (for example, the plurality of users have the same occupation and have similar Chinese character input preferences in a daily work scenario), and when the plurality of users use the input method software to input Chinese characters, the Chinese character strings meeting the Chinese character input preferences of the plurality of users are not arranged in front of the Chinese character string queue in the order , which results in low average efficiency of inputting Chinese characters by the plurality of users.
Disclosure of Invention
In order to improve the average efficiency of inputting Chinese characters by a plurality of users, embodiments of the present specification provide Chinese character string statistical methods and systems based on block chains, and the technical solutions are as follows:
according to the 1 st aspect of the embodiments of the present specification, block chain-based chinese character string statistics methods are provided, for counting the number of times each chinese character string matched with each inputtable letter string is selected according to an input method operation performed by a user through an input method client;
allocating block chain networks corresponding to for each input scene in advance, wherein each block chain network is deployed with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the method comprises the following steps:
when the target input method client monitors that a target user inputs any letter string and selects any Chinese character string matched with the letter string, constructing a statistical transaction containing the letter string input by the target user and the Chinese character string selected by the target user;
the target input method client submits the statistical transaction to a block chain network corresponding to at least two input scenes appointed by the target user in advance;
each block chain network receiving the statistical transaction positions a statistical record meeting a positioning condition in a managed statistical table according to the statistical transaction through a deployed intelligent contract; the statistical records meeting the positioning conditions comprise letter string fields with values of letter strings input by the target user and Chinese string fields with values of Chinese strings selected by the target user;
and each blockchain network receiving the statistical transaction increases the value of the statistical field included in the positioned statistical record through the deployed intelligent contract.
According to the 2 nd aspect of the embodiments of the present specification, block chain-based chinese character string statistics systems are provided, for counting the number of times each chinese character string matched with each inputtable letter string is selected according to an input method operation performed by a user through an input method client;
the system comprises a block chain network corresponding to only and or a plurality of input method clients which are allocated for each input scene in advance;
each block chain network is provided with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the target input method client side constructs a statistical transaction containing the letter string input by the target user and the Chinese character string selected by the target user when monitoring that the target user inputs any letter string and selects any Chinese character string matched with the letter string;
each block chain network receiving the statistical transaction positions a statistical record meeting a positioning condition in a managed statistical table according to the statistical transaction through a deployed intelligent contract; and the value of the included Chinese character string field is the Chinese character string selected by the target user; increasing the value of a statistic field included in the positioned statistic record through the deployed intelligent contract;
and the statistical records meeting the positioning conditions comprise letter string fields with the values of the letter strings input by the target user.
According to the 3 rd aspect of the embodiments of the present specification, chinese character input methods based on the statistical tables in the method of the 1 st aspect are provided, where a target input method client obtains the statistical tables from at least two input scenarios pre-specified by a target user, respectively corresponding to a blockchain network, and determines and stores a comprehensive statistical table according to the obtained statistical tables, the method includes:
the target input method client receives a letter string input by a target user;
extracting the value of the letter string field from the stored comprehensive statistical table to be each statistical record of the letter string;
sorting the values of the Chinese character string fields of the statistical records according to the sequence of the values of the statistical fields from large to small to obtain a Chinese character string queue;
and displaying the Chinese character string queue to the user, and determining the Chinese character string selected by the user as the input Chinese character string.
When a target user inputs Chinese characters by using the target input method client, the target input method client submits letter strings input by the target user and Chinese character strings selected by the target user to a block chain network corresponding to each input scene pre-designated by the target user, and a statistical table is updated by each block chain network.
It is to be understood that both the foregoing -based general description and the following detailed description are exemplary and explanatory only and are not restrictive of the embodiments herein.
Moreover, it is not necessary for any of the embodiments in the present specification to achieve all of the above-described effects.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings through which the embodiments or the prior art descriptions are required to pass will be briefly described below, it is obvious that the drawings in the following description are only embodiments described in the embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic flowchart of block chain-based Chinese string statistics methods according to embodiments of the present disclosure;
FIG. 2 is a flow chart of Chinese character input methods provided by embodiments of the present disclosure;
FIG. 3 is a schematic structural diagram of block chain-based Chinese string statistics systems according to embodiments of the present disclosure;
FIG. 4 is a schematic structural diagram of block chain-based Chinese string statistics apparatuses according to an embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of block chain-based Chinese character string statistics apparatuses according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of types of chinese character input devices provided in the embodiments of the present specification;
fig. 7 is a schematic structural diagram of computer devices for configuring the apparatus of the embodiments of the present description.
Detailed Description
Therefore, or more embodiments of the present invention provide statistics on how often each Chinese character string matched with each inputtable letter string occurs, and obtain a statistical table, and the statistical table is continuously updated as a plurality of users continuously use the input method software.
Furthermore, in the embodiments of the present specification, the blockchain network is responsible for the statistical work (i.e., maintaining the statistical table) rather than the centralized equipment. This is because, in practice, if the centralized device has technical failure, the accuracy of the statistical table will be directly affected by the statistical error, and the average efficiency of inputting Chinese characters by multiple users will be reduced. The block chain network is composed of a plurality of nodes, each node maintains a statistical table, each node can perform statistics in a distributed mode, and due to the fact that the consensus algorithm among the nodes has fault tolerance, even if a technical fault occurs to an individual node, the accuracy of the statistical table cannot be influenced.
It should be noted that, in this embodiment of the present specification, for each input scenario, the input scenario has -only corresponding block chain network, and is responsible for counting the number of times each chinese character string matched with each inputtable letter string is selected according to the input method operations of multiple users in the input scenario.
In the embodiment of the present specification, users can register in more than input scenarios at the same time, and thus when the user uses the input method client to input a chinese character, the blockchain network corresponding to each input scenario registered by the user stores the input situation of this time.
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present specification, the technical solutions in the embodiments of the present specification will be described in detail below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, rather than all embodiments.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of chinese string statistics methods based on block chains according to embodiments of the present disclosure, including the following steps:
and S100, when the target input method client monitors that the target user inputs any letter strings and selects any Chinese character string matched with the letter strings, constructing a statistical transaction containing the letter strings input by the target user and the Chinese character string selected by the target user.
The method shown in fig. 1 is used for counting the times that each Chinese character string matched with each inputtable letter string is selected according to the input method operation executed by a user through an input method client, wherein the letter string comprises at least letters, and the Chinese character string comprises at least Chinese characters.
The input letter string refers to the letter string which is input by the input method software and is used for matching the Chinese character string. For example, the input method software supports the user to input the letter string "jishu", and the Chinese character string that can be matched is "technical", "cardinal", "odd", "series", and the like.
It should be noted that the input method software described herein may be not only pinyin input method software, but also other input method software for inputting chinese characters by using letters on a keyboard, such as five-stroke input method software.
It should be noted that, for the pinyin input method software, the input letter strings can be in the form of simple pinyin abbreviations, in addition to the full pinyin form. For example, if the user wants to input the chinese string "technique", the user may input the letter string "jishu" or the letter string "js" to the input method software. The Chinese character string matched with the letter string "js" may be specifically "technical", "fitness", "receiving", and the like.
During the process of using the input method software by a plurality of users, the more times a certain Chinese character string matched with the character string is selected for each character string, the more front the Chinese character string is arranged in the Chinese character string queue corresponding to the character string displayed to the users by the input method software, wherein the required description indicates that each queue member is Chinese character strings in the Chinese character string queue.
In the embodiment of the present specification, from a software level, an input method client refers to input method software; from the hardware aspect, the input method client refers to a device installed with input method software.
In the embodiment of the present specification, in the aspect of , an input method client needs to have a built-in blockchain function module (such as a blockchain software development kit) for interfacing with a blockchain network, so that a blockchain account can be registered in the input method client.
In the embodiments of the present specification, the blockchain network stores a statistical table for statistics. Each statistical record in the statistical table includes an alphabetic string field, a chinese string field, and a statistical field, as shown in table 1 below.
Figure BDA0002222583140000061
Figure BDA0002222583140000071
TABLE 1
The statistical table is not a word stock built in the input method software. When the statistical table is initially created, each inputtable letter string can be exhausted, and each Chinese character string matched with each inputtable letter string can be exhausted, so that a full-amount statistical record is obtained.
In initially creating the statistical table, each string of letters that may be entered may not be exhaustive, and each string of Chinese characters that matches each string of letters that may be entered. When the statistical work is subsequently performed, if there is no statistical record corresponding to the letter string currently input by the user and the selected Chinese character string, the statistical record is temporarily created.
When the statistical table is initially created, the value of the statistical field of the statistical record is determined according to the number of times the statistical Chinese character string is selected, and the value of the statistical field may be the statistical number itself or the statistical number.
In the embodiment of the present specification, for convenience of description, any user is referred to as a target user, and an input method client used by the target user is referred to as a target input method client.
When a target user needs to input a certain Chinese character string (such as a technology), firstly, a letter string (such as js) needs to be input to a logged-in software client, the input method client matches the letter string input by the target user with a corresponding Chinese character string queue for the user to select Chinese character string input, and in addition, constructs a statistical transaction containing the letter string input by the target user and the Chinese character string selected by the target user, so that the statistical transaction is submitted to a block chain network for statistics.
S102: and the target input method client submits the statistical transaction to a block chain network corresponding to at least two input scenes appointed by the target user in advance.
In this embodiment of the present specification, a user may specify at least two input scenarios to its own input method client in advance, which means that the user has registered in the at least two input scenarios, and a record generated by a chinese character input behavior of the user may contribute to statistical work in the at least two input scenarios.
S104: and positioning a statistical record meeting a positioning condition in a managed statistical table according to the statistical transaction by each block chain network receiving the statistical transaction through a deployed intelligent contract.
The positioning conditions are that the value of the letter string field included in the positioned statistic record is the letter string input by the user, and the value of the Chinese string field included in the positioned statistic record is the Chinese string selected by the user.
Specifically, an intelligent contract may be deployed in a blockchain network in advance, and the intelligent contract is recorded with the statistical record positioning logic. In this way, in step S104, each node of the blockchain network executes the statistical record positioning logic recorded in the intelligent contract by calling the deployed intelligent contract, that is, positioning the statistical record satisfying the positioning condition in the statistical table.
Accordingly, in such an embodiment as described above, the statistical table needs to be maintained by the intelligent contract. This means that the statistics table is anchored to the blockchain, and the update record for each update is stored in the blockchain for reference.
It should be noted that, in the embodiment of the present disclosure, the table lookup algorithm used by the statistical record positioning logic is not particularly limited, and those skilled in the art should understand that the statistical record positioning logic may be implemented by using a table lookup algorithm such as a sequential table lookup, a binary table lookup, and the like.
S106: and each blockchain network receiving the statistical transaction increases the value of the statistical field included in the positioned statistical record through the deployed intelligent contract.
In the embodiment of the present specification, if the value of the statistics field is the number of times the chinese string is selected, in step S106, 1 is added to the value of the statistics field included in the located statistics record. And if the relation between the value of the statistical field and the selected times of the Chinese character string meets a certain positive correlation function, substituting the selected times of the Chinese character string into the positive correlation function to obtain the updated value of the statistical field.
In addition, in the embodiment of the present specification, if the block chain network does not locate a statistical record satisfying the location condition in the statistical table, add a statistical record to the statistical table; the value of the added letter string field of the statistical record is the letter string input by the user, the value of the Chinese string field is the Chinese string selected by the user, and the value of the statistical field is a natural number (for example, 1) greater than 0.
Fig. 2 is a schematic flow chart of an chinese character input method provided in an embodiment of the present specification, including the following steps:
s200: and the target input method client receives the letter string input by the target user.
S202: and extracting the value of the letter string field from the stored comprehensive statistical table to be each statistical record of the letter string.
S204: and sequencing the values of the Chinese character string fields of the statistical records according to the sequence of the values of the statistical fields from large to small to obtain a Chinese character string queue.
S206: and displaying the Chinese character string queue to the user, and determining the Chinese character string selected by the user as the input Chinese character string.
In an embodiment of the present specification, an input method client matches a Chinese string queue for a user-entered alphabetic string based on a statistical table obtained from a blockchain network. If the target user specifies at least two input scenes in advance, the input method client acquires the statistical table from the block chain network corresponding to the at least two input scenes specified in advance by the target user respectively, and matches the Chinese character string queue for the letter strings input by the user. In addition, the input method client side can determine and store the comprehensive statistical table according to the acquired statistical tables.
Specifically, each time a specified period passes, the target input method client acquires the statistical tables from the blockchain network corresponding to at least two input scenes specified in advance by the target user. If the comprehensive statistical table is stored currently, deleting the currently stored comprehensive statistical table and storing the determined comprehensive statistical table; and if the comprehensive statistical table is not stored currently, storing the determined comprehensive statistical table.
The input method client may also obtain the statistical table from the blockchain network after receiving the letter string input by the user each time, so as to obtain the comprehensive statistical table (of the latest version). Accordingly, after the input method client extracts each statistical record, the stored comprehensive statistical table (of the old version) is deleted.
In this embodiment of the present specification, the target user may specify a corresponding weight value for each input scenario specified by the target user in advance. Correspondingly, determining a comprehensive statistical table according to the obtained statistical tables, specifically, determining an input scene corresponding to the blockchain network from which the statistical table is derived for each obtained statistical table; multiplying the statistical field in the statistical table by the weight value corresponding to the determined input scene to obtain the corrected statistical table; and merging the corrected statistical tables into a comprehensive statistical table.
It should be noted that the blockchain network herein may be a public-chain network, a alliance-chain network, or a private-chain network, and may be specifically specified according to actual service needs.
For example, a technical company improves the efficiency of inputting Chinese characters by its employees during work, develops an input method client for its employees, and builds a private chain network, each employee is users, and each employee performs statistical work during the process of using the input method client, and continuously updates the statistical table.
For example, in order to improve the efficiency of inputting Chinese characters by workers in the industry, a plurality of companies in a certain industry jointly develop input method clients and build a alliance chain network consisting of the plurality of companies, and employees of the plurality of companies use sets of input method software.
In practice, matching hanzi strings chosen by practitioners in different industry fields differ significantly for the same letter string. For example, for the letter string "js", the selected Chinese character string is often "technical" after the practitioner in the internet industry inputs "js" by using the input method, and the selected Chinese character string is often "fitness" after the practitioner in the sports industry inputs "js" by using the input method.
Through the embodiment of the specification, personalized input method solutions can be provided for different industry fields. For example, practitioners in the sports industry can input Chinese characters by using the input method client provided by the scheme, the block chain network can maintain the statistical table according to the Chinese character input condition of each practitioner in the sports industry, and the statistical table increasingly reflects the Chinese character input habit of the whole sports industry along with continuous updating of the statistical table. Conversely, the Chinese character string queue displayed by the input method client used by the practitioners in the sports industry is also obtained based on the statistical table, and with the continuous update of the statistical table, the Chinese character string queue displayed by the input method client also more and more conforms to the Chinese character input habit of the practitioners in the sports industry.
At the same time, when the user uses the input method client to input Chinese characters, the user can utilize the statistical tables provided by the block chain networks respectively corresponding to the input scenes registered by the user to obtain a comprehensive statistical table, and the comprehensive statistical table is used for determining the Chinese character string ranking in the Chinese character string queue.
Fig. 3 is a schematic structural diagram of chinese character string statistics systems based on block chains according to embodiments of the present disclosure, configured to count the number of times each chinese character string matched with each inputtable letter string is selected according to an input method operation performed by a user through an input method client;
the system comprises a block chain network corresponding to only and or a plurality of input method clients which are allocated for each input scene in advance;
each block chain network is provided with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the target input method client side constructs a statistical transaction containing the letter string input by the target user and the Chinese character string selected by the target user when monitoring that the target user inputs any letter string and selects any Chinese character string matched with the letter string;
each block chain network receiving the statistical transaction positions a statistical record meeting a positioning condition in a managed statistical table according to the statistical transaction through a deployed intelligent contract; and the value of the included Chinese character string field is the Chinese character string selected by the target user; increasing the value of a statistic field included in the positioned statistic record through the deployed intelligent contract;
and the statistical records meeting the positioning conditions comprise letter string fields with the values of the letter strings input by the target user.
Fig. 4 is a schematic structural diagram of chinese character string statistics apparatuses based on block chains according to embodiments of the present disclosure, which are used for counting the number of times each chinese character string matched with each inputtable letter string is selected according to an input method operation performed by a user through an input method client;
allocating block chain networks corresponding to for each input scene in advance, wherein each block chain network is deployed with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the device is any input method client, and the device comprises:
the building module 401 is used for building a statistical transaction containing the letter string input by the target user and the Chinese character string selected by the target user when the condition that the target user inputs any letter string is monitored and any Chinese character string matched with the letter string is selected;
a submitting module 402, configured to submit the statistical transaction to the blockchain networks respectively corresponding to at least two input scenarios pre-specified by the target user, so that each blockchain network receiving the statistical transaction locates a statistical record meeting a locating condition in a managed statistical table according to the statistical transaction through a deployed intelligent contract, and further, each blockchain network receiving the statistical transaction increases a value of a statistical field included in the located statistical record through the deployed intelligent contract;
and the statistical record meeting the positioning condition comprises a letter string field value which is the letter string input by the target user, and a Chinese string field value which is the Chinese string selected by the target user.
Fig. 5 is a schematic structural diagram of chinese character string statistics apparatuses based on block chains according to embodiments of the present disclosure, which are used for counting the number of times each chinese character string matched with each inputtable letter string is selected according to an input method operation performed by a user through an input method client;
allocating block chain networks corresponding to for each input scene in advance, wherein each block chain network is deployed with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the apparatus is a node of each blockchain network that receives a statistical transaction, the apparatus comprising:
a positioning module 501, for positioning the statistical records meeting the positioning conditions in the managed statistical table according to the statistical transactions; the statistical records meeting the positioning conditions comprise letter string fields with values of letter strings input by the target user and Chinese string fields with values of Chinese strings selected by the target user;
an adding module 502, which adds the value of the statistic field included in the located statistic record by the deployed intelligent contract;
the statistical transaction is constructed when the target input method client monitors that the target user inputs any letter strings and selects any Chinese character string matched with the letter strings every time, and the statistical transaction comprises the letter strings input by the target user and the Chinese character string selected by the target user.
Fig. 6 is a schematic structural diagram of an kinds of chinese character input devices provided in an embodiment of the present specification, where the device is a client side of any input method, and the device includes:
an obtaining and storing module 601, which obtains statistical tables from at least two input scenes pre-specified by a target user and respectively corresponding to the blockchain network, and determines and stores a comprehensive statistical table according to each obtained statistical table;
a receiving module 602, which receives a letter string input by a target user;
the extracting module 603 extracts the values of the letter string fields from the stored comprehensive statistical table as each statistical record of the letter strings;
the sorting module 604 sorts the values of the Chinese character string fields of the statistical records according to the descending order of the values of the statistical fields to obtain a Chinese character string queue;
the determining module 605 displays the Chinese character string queue to the user, and determines the Chinese character string selected by the user as the input Chinese character string.
The present specification embodiment also provides computer apparatuses including at least a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the functions of the methods in the present specification embodiment when executing the program.
FIG. 7 illustrates more specific hardware architecture of a computing device that may include a processor 1410, a memory 1420, an input/output interface 1430, a communication interface 1440, and a bus 1450 that may provide for embodiments of the present description, where the processor 1410, memory 1420, input/output interface 1430, and communication interface 1440 are communicatively coupled to each other within the device via the bus 1450.
The processor 1410 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 1420 may be implemented in a ROM (Read Only Memory), a RAM (Random access Memory), a static storage device, a dynamic storage device, or the like. The memory 1420 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1420 and called to be executed by the processor 1410.
The input/output interface 1430 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1440 is used for connecting a communication module (not shown in the drawings) to enable the device to interact with other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1450 includes paths to transfer information between the various components of the device, such as processor 1410, memory 1420, input/output interface 1430, and communication interface 1440.
It should be noted that although the above-described apparatus shows only a processor 1410, a memory 1420, an input/output interface 1430, a communication interface 1440, and a bus 1450, in a specific implementation, the apparatus may also include other components necessary for proper operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The present specification embodiment also provides computer readable storage media having stored thereon a computer program that, when executed by a processor, performs the functions of the method in the present specification embodiment.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Based on the understanding that the technical solutions of the embodiments of the present specification or portions thereof contributing to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes instructions for causing computer devices (which can be personal computers, servers, or network devices, etc.) to execute the methods described in the various embodiments or portions of the embodiments of the present specification.
typical implementation devices are computers, which may be in the form of personal computers, laptop computers, cellular phones, camera phones, smart phones, personal digital assistants, media players, navigation devices, email messaging devices, game consoles, tablet computers, wearable devices, or a combination of any of these devices.
The method embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in or more pieces of software and/or hardware in implementing the embodiments of the present disclosure.
The foregoing is only a specific embodiment of the embodiments of the present disclosure, and it should be noted that, for those skilled in the art, a plurality of modifications and decorations can be made without departing from the principle of the embodiments of the present disclosure, and these modifications and decorations should also be regarded as the protection scope of the embodiments of the present disclosure.

Claims (13)

1, Chinese character string statistical method based on block chain, which is used to count the times of selecting each Chinese character string matched with each inputtable letter string according to the input method operation executed by the user through the input method client;
allocating block chain networks corresponding to for each input scene in advance, wherein each block chain network is deployed with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the method comprises the following steps:
when the target input method client monitors that a target user inputs any letter string and selects any Chinese character string matched with the letter string, constructing a statistical transaction containing the letter string input by the target user and the Chinese character string selected by the target user;
the target input method client submits the statistical transaction to a block chain network corresponding to at least two input scenes appointed by the target user in advance;
each block chain network receiving the statistical transaction positions a statistical record meeting a positioning condition in a managed statistical table according to the statistical transaction through a deployed intelligent contract; the statistical records meeting the positioning conditions comprise letter string fields with values of letter strings input by the target user and Chinese string fields with values of Chinese strings selected by the target user;
and each blockchain network receiving the statistical transaction increases the value of the statistical field included in the positioned statistical record through the deployed intelligent contract.
2. The method according to claim 1, wherein increasing the value of the statistics field included in the located statistics record specifically comprises:
the value of the statistics field included in the located statistics record is incremented by 1.
3. The method of claim 1, further comprising:
each block chain network receiving the statistical transaction increases a statistical record for a managed statistical table through a deployed intelligent contract if the statistical record meeting the positioning condition is not positioned in the managed statistical table; the value of the added letter string field of the statistical record is the letter string input by the user, the value of the Chinese string field is the Chinese string selected by the user, and the value of the statistical field is a natural number greater than 0.
4, Chinese character input method based on statistical tables in any of claims 1-3, wherein the target input method client obtains statistical tables from at least two input scenes pre-designated by the target user corresponding to the blockchain network respectively, and determines and stores a comprehensive statistical table according to the obtained statistical tables, the method comprises:
the target input method client receives a letter string input by a target user;
extracting the value of the letter string field from the stored comprehensive statistical table to be each statistical record of the letter string;
sorting the values of the Chinese character string fields of the statistical records according to the sequence of the values of the statistical fields from large to small to obtain a Chinese character string queue;
and displaying the Chinese character string queue to the user, and determining the Chinese character string selected by the user as the input Chinese character string.
5. The method of claim 4, wherein the target user specifies a corresponding weight value for each input scene specified by the target user in advance;
determining a comprehensive statistical table according to the obtained statistical tables, which specifically comprises the following steps:
determining an input scene corresponding to a block chain network from which the statistical table comes for each acquired statistical table;
multiplying the statistical field in the statistical table by the weight value corresponding to the determined input scene to obtain the corrected statistical table;
and merging the corrected statistical tables into a comprehensive statistical table.
6. The method as claimed in claim 4, wherein the obtaining, by the target input method client, the statistical table from the blockchain network corresponding to at least two input scenes pre-specified by the target user respectively, specifically comprises:
the method comprises the steps that a target input method client side obtains a statistical table from at least two input scenes which are specified by a target user in advance and correspond to a block chain network respectively when a specified period passes;
storing the determined comprehensive statistical table, specifically comprising:
if the comprehensive statistical table is stored currently, deleting the currently stored comprehensive statistical table and storing the determined comprehensive statistical table;
and if the comprehensive statistical table is not stored currently, storing the determined comprehensive statistical table.
7, Chinese character string statistical system based on block chain, which is used to count the selected times of each Chinese character string matched with each inputtable letter string according to the input method operation executed by the user through the input method client;
the system comprises a block chain network corresponding to only and or a plurality of input method clients which are allocated for each input scene in advance;
each block chain network is provided with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the target input method client side constructs a statistical transaction containing the letter string input by the target user and the Chinese character string selected by the target user when monitoring that the target user inputs any letter string and selects any Chinese character string matched with the letter string;
each block chain network receiving the statistical transaction positions a statistical record meeting a positioning condition in a managed statistical table according to the statistical transaction through a deployed intelligent contract; and the value of the included Chinese character string field is the Chinese character string selected by the target user; increasing the value of a statistic field included in the positioned statistic record through the deployed intelligent contract;
and the statistical records meeting the positioning conditions comprise letter string fields with the values of the letter strings input by the target user.
8, Chinese character string statistical methods based on block chain, which is used to count the times of selecting each Chinese character string matched with each input letter string according to the input method operation executed by the user through the input method client;
allocating block chain networks corresponding to for each input scene in advance, wherein each block chain network is deployed with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the method comprises the following steps:
when the target input method client monitors that a target user inputs any letter string and selects any Chinese character string matched with the letter string, constructing a statistical transaction containing the letter string input by the target user and the Chinese character string selected by the target user;
the target input method client submits the statistical transaction to block chain networks corresponding to at least two input scenes appointed by the target user in advance, so that each block chain network receiving the statistical transaction passes through a deployed intelligent contract, according to the statistical transaction, a statistical record meeting a positioning condition is positioned in a managed statistical table, and further each block chain network receiving the statistical transaction passes through the deployed intelligent contract, and the value of a statistical field included in the positioned statistical record is increased;
and the statistical record meeting the positioning condition comprises a letter string field value which is the letter string input by the target user, and a Chinese string field value which is the Chinese string selected by the target user.
9, Chinese character string statistical methods based on block chain, which is used to count the times of selecting each Chinese character string matched with each input letter string according to the input method operation executed by the user through the input method client;
allocating block chain networks corresponding to for each input scene in advance, wherein each block chain network is deployed with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the method comprises the following steps:
each block chain network receiving the statistical transaction locates a statistical record meeting the positioning condition in a managed statistical table according to the statistical transaction through a deployed intelligent contract; the statistical records meeting the positioning conditions comprise letter string fields with values of letter strings input by the target user and Chinese string fields with values of Chinese strings selected by the target user;
increasing the value of a statistic field included in the positioned statistic record through the deployed intelligent contract;
the statistical transaction is constructed when the target input method client monitors that the target user inputs any letter strings and selects any Chinese character string matched with the letter strings every time, and the statistical transaction comprises the letter strings input by the target user and the Chinese character string selected by the target user.
10, Chinese character string statistics device based on block chain, which is used to count the selected times of each Chinese character string matched with each inputtable letter string according to the input method operation executed by the user through the input method client;
allocating block chain networks corresponding to for each input scene in advance, wherein each block chain network is deployed with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the device is any input method client, and the device comprises:
the building module is used for building a statistical transaction containing the letter string input by the target user and the Chinese character string selected by the target user when the condition that the target user inputs any letter string and selects any Chinese character string matched with the letter string is monitored;
the submitting module is used for submitting the statistical transaction to the block chain networks respectively corresponding to at least two input scenes specified by the target user in advance so that each block chain network receiving the statistical transaction can locate the statistical record meeting the locating condition in a managed statistical table through the deployed intelligent contract according to the statistical transaction, and further each block chain network receiving the statistical transaction can increase the value of the statistical field included in the located statistical record through the deployed intelligent contract;
and the statistical record meeting the positioning condition comprises a letter string field value which is the letter string input by the target user, and a Chinese string field value which is the Chinese string selected by the target user.
11, Chinese character string statistical devices based on block chains, which is used to count the times of selecting each Chinese character string matched with each inputtable letter string according to the input method operation executed by the user through the input method client;
allocating block chain networks corresponding to for each input scene in advance, wherein each block chain network is deployed with an intelligent contract for managing a statistical table, and each statistical record in the statistical table comprises an alphabetic string field, a Chinese string field and a statistical field;
the apparatus is a node of each blockchain network that receives a statistical transaction, the apparatus comprising:
the positioning module is used for positioning the statistical records meeting the positioning conditions in a managed statistical table according to the statistical transactions; the statistical records meeting the positioning conditions comprise letter string fields with values of letter strings input by the target user and Chinese string fields with values of Chinese strings selected by the target user;
the adding module is used for adding the value of the statistical field included in the positioned statistical record through the deployed intelligent contract;
the statistical transaction is constructed when the target input method client monitors that the target user inputs any letter strings and selects any Chinese character string matched with the letter strings every time, and the statistical transaction comprises the letter strings input by the target user and the Chinese character string selected by the target user.
12, A Chinese character input device based on the statistical table of any of claims 1-3, the device is a client of any input method, the device includes:
the acquisition and storage module is used for acquiring statistical tables from at least two input scenes which are specified by a target user in advance and respectively corresponding to the blockchain network, and determining and storing a comprehensive statistical table according to the acquired statistical tables;
the receiving module is used for receiving the letter string input by the target user;
the extraction module is used for extracting the values of the letter string fields from the stored comprehensive statistical table to be the statistical records of the letter strings;
the sorting module sorts the values of the Chinese character string fields of the statistical records according to the sequence of the values of the statistical fields from large to small to obtain a Chinese character string queue;
and the determining module is used for displaying the Chinese character string queue to the user and determining the Chinese character string selected by the user as the input Chinese character string.
Computer apparatus of the kind , comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method of any of claims 4, 8, and 9, .
CN201910939820.XA 2019-09-30 2019-09-30 Chinese character string statistical method and system based on block chain Pending CN110737808A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910939820.XA CN110737808A (en) 2019-09-30 2019-09-30 Chinese character string statistical method and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910939820.XA CN110737808A (en) 2019-09-30 2019-09-30 Chinese character string statistical method and system based on block chain

Publications (1)

Publication Number Publication Date
CN110737808A true CN110737808A (en) 2020-01-31

Family

ID=69268445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910939820.XA Pending CN110737808A (en) 2019-09-30 2019-09-30 Chinese character string statistical method and system based on block chain

Country Status (1)

Country Link
CN (1) CN110737808A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060241933A1 (en) * 2005-04-21 2006-10-26 Franz Alexander M Predictive conversion of user input
CN101271459A (en) * 2007-03-22 2008-09-24 北京搜狗科技发展有限公司 Word library generation method, input method and input method system
CN101388011A (en) * 2007-09-13 2009-03-18 北京搜狗科技发展有限公司 Method and apparatus for recording information into user thesaurus
CN110244857A (en) * 2019-05-24 2019-09-17 阿里巴巴集团控股有限公司 A kind of Chinese character string statistical method and system based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060241933A1 (en) * 2005-04-21 2006-10-26 Franz Alexander M Predictive conversion of user input
CN101271459A (en) * 2007-03-22 2008-09-24 北京搜狗科技发展有限公司 Word library generation method, input method and input method system
CN101388011A (en) * 2007-09-13 2009-03-18 北京搜狗科技发展有限公司 Method and apparatus for recording information into user thesaurus
CN110244857A (en) * 2019-05-24 2019-09-17 阿里巴巴集团控股有限公司 A kind of Chinese character string statistical method and system based on block chain

Similar Documents

Publication Publication Date Title
CN110704398B (en) Database migration method and device from MySQL to Oracle and computer equipment
CN109064031B (en) Project affiliate credit evaluation method based on block chain, block chain and storage medium
US20160328445A1 (en) Data Query Method and Apparatus
CN110781183B (en) Processing method and device for incremental data in Hive database and computer equipment
CN110928894B (en) Entity alignment method and device
CN107908442B (en) Spring-based resource loading method and device, terminal equipment and computer-readable storage medium
CN111756832B (en) Method and device for pushing information, electronic equipment and computer readable storage medium
CN111460011A (en) Page data display method and device, server and storage medium
CN106557178B (en) Method and device for updating entries of input method
CN110874365B (en) Information query method and related equipment thereof
CN112306452A (en) Method, device and system for processing service data by merging and sorting algorithm
CN106651408B (en) Data analysis method and device
CN113761381B (en) Method, device, equipment and storage medium for recommending interest points
CN109660580B (en) Information pushing method and device
CN116244032A (en) Application page loading method, device, equipment and storage medium
CN110737808A (en) Chinese character string statistical method and system based on block chain
WO2018225314A1 (en) Database management system and database management method
CN111523000B (en) Method, apparatus, device and storage medium for importing data
CN114996369A (en) Method and device for constructing data warehouse index library
CN113590588A (en) Real-time migration method for incremental data of heterogeneous database and related equipment
CN109857501B (en) APP page display method and device, storage medium and server
CN110244857A (en) A kind of Chinese character string statistical method and system based on block chain
CN113282624B (en) Rule matching method, device, electronic equipment and storage medium
CN114253944B (en) Database bidirectional synchronization method and device and electronic equipment
CN108491548A (en) Setting-out processing method based on map and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200703

Address after: Unit 02, 20 / F, block a, building 4, Lane 838, Huangpi South Road, Huangpu District, Shanghai 200025

Applicant after: Ant blockchain Technology (Shanghai) Co.,Ltd.

Address before: 801-11, Section B, 8th floor, No. 556, Xixi Road, Xihu District, Hangzhou City, Zhejiang Province

Applicant before: Alipay (Hangzhou) Information Technology Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20200131

RJ01 Rejection of invention patent application after publication