System, method, device, equipment and readable storage medium for updating voting data

文档序号:1578403 发布日期:2020-01-31 浏览:35次 中文

阅读说明:本技术 投票数据的更新系统、方法、装置、设备及可读存储介质 (System, method, device, equipment and readable storage medium for updating voting data ) 是由 钟绍威 于 2019-10-15 设计创作,主要内容包括:本申请公开了一种投票数据的更新系统、方法、装置、设备及可读存储介质,涉及计算机网络领域。该系统包括第一客户端和区块链系统;第一客户端,用于向区块链系统发送投票数据更新请求;区块链系统,用于接收投票数据更新请求,投票数据更新请求中包括目标候选帐号的帐号标识,目标候选帐号为第一帐号的投票对象;根据投票数据更新请求通过共识机制对目标候选帐号的投票数据进行对应的计数增加。通过区块链系统对该投票数据更新请求对应的目标候选帐号进行投票数据的计数增加,由于投票数据存储在区块链上,使得在投票的过程中,信息公开化且不易被篡改,避免投票数据存储在服务器上,而服务器易被攻击,投票数据易被篡改的问题。(The application discloses voting data updating systems, methods, devices, equipment and readable storage media, and relates to the field of computer networks, wherein the system comprises a client and a blockchain system, a client is used for sending a voting data updating request to the blockchain system, the blockchain system is used for receiving the voting data updating request, the voting data updating request comprises account number identification of a target candidate account number, and the target candidate account number is a voting object of a account number.)

1, kinds of voting data updating system, characterized in that, the system includes client and blockchain system;

the th client side is used for sending a voting data updating request to the blockchain system, and a th account is logged in the th client side;

the block chain system is used for receiving a voting data updating request sent by the th client, wherein the voting data updating request comprises an account identifier of a target candidate account which is a voting object of the th account, generating a target block according to the voting data updating request, verifying the target block through at least two block chain links, correspondingly counting and increasing the voting data of the target candidate account when the number of the block chain links identified to the target block in the block chain system is greater than the required number of the nodes, generating an updating completion signal, and feeding back a voting success message to the th client according to the updating completion signal;

the th client, configured to receive the voting success message.

2. The system of claim 1,

the block chain system is used for acquiring a history block which is correspondingly stored in the block chain system by the target candidate account, wherein the history block comprises the existing ticket number of the target candidate account; generating an updated vote number according to the voting data updating request and the existing vote number; generating the target block according to the updated ticket number; verifying the target block by at least two block link points; when the number of the block chain links approved for the target block in the block chain system is larger than the number of the required nodes, the target block is stored on the block chain nodes in the block chain system.

3. The system of claim 2, wherein each blockchain node of the at least two blockchain nodes has an intelligent contract stored therein;

the blockchain system is configured to verify the target block by the intelligent contract in each of the at least two blockchain nodes.

4. The system of any of claims 1 to 3 to , further comprising a voting server;

the client side is configured to send a voting request to the voting server, where the voting request includes the account id of the th account, the account id of the target candidate account, and the voting number of times that the th account votes for the target candidate account, and the voting server stores the remaining voting number of times of the th account;

when the remaining voting number of times of the voting of the th account reaches the voting number of times, the voting server sends the voting data updating request to the blockchain system according to the voting request.

5. The system of claim 4,

and the block chain system is used for correspondingly increasing the number corresponding to the voting times of the voting data of the target candidate account through the consensus mechanism according to the voting data updating request.

6. The system of claim 4, further comprising, in the voting system: a second client;

the second client is used for sending a query request to the voting server, wherein the query request is used for requesting to check the voting result;

the voting server is used for sending a voting result viewing request to the blockchain system according to the query request;

the block chain system is used for feeding back voting data to the voting server according to the voting result viewing request;

and the voting server is used for generating the voting result according to the voting data and sending the voting result to the second client.

7. The system according to claim 6, wherein the voting result checking request includes a voting result interception time;

the block chain system is used for selecting voting data of a block with a timestamp before the voting result interception time according to the voting result interception time in the voting result viewing request; and feeding back the voting data to the voting server.

8, A method for updating voting data, which is applied to any node in a blockchain system, the method comprising:

receiving a voting data updating request sent by an th account, wherein the voting data updating request comprises account identifiers of target candidate accounts, and the target candidate accounts are voting objects of the th account;

generating a target block according to the voting data updating request;

verifying the target block by at least two block link points;

when the number of the block chain links identified for the target block in the at least two block chain nodes is greater than the required number of the nodes, correspondingly counting and increasing the voting data of the target candidate account;

and generating an updating completion signal, wherein the updating completion signal is used for indicating that a voting success message is fed back to the th account.

9. The method of claim 8, wherein generating a target block according to the vote data update request comprises:

acquiring a history block which is correspondingly stored in the block chain system by the target candidate account, wherein the history block comprises the existing ticket number of the target candidate account;

generating an updated vote number according to the voting data updating request and the existing vote number;

and generating the target block according to the updated ticket number.

10. The method of claim 9, wherein each block connection point of the at least two block chain nodes has an intelligent contract stored therein;

the verifying the target block by at least two block link points comprises:

verifying the target block by the intelligent contract in each of the at least two blockchain nodes.

11, kinds of voting data updating device, applied to any node in a blockchain system, the device comprising:

a receiving module, configured to receive a voting data update request sent by an th account, where the voting data update request includes an account identifier of a target candidate account, and the target candidate account is a voting object of the th account;

the generating module is used for generating a target block according to the voting data updating request;

the verification module is used for verifying the target block through at least two block link points;

the counting module is used for correspondingly counting and increasing the voting data of the target candidate account when the number of the block link points identified for the target block in the at least two block link nodes is greater than the required number of the nodes;

the generating module is further configured to generate an update completion signal, where the update completion signal is used to indicate that a voting success message is fed back to the th account.

12, computer device comprising a processor and a memory, the memory having stored therein at least instructions, at least programs, sets of codes, or sets of instructions, the at least instructions, the at least end programs, the sets of codes, or the sets of instructions being loaded and executed by the processor to implement the method for updating voting data according to any one of claims 8 to 10 and .

computer storage medium, wherein at least instructions, at least program segments, a set of codes, or a set of instructions are stored in the storage medium, and wherein said at least instructions, said at least program segments, said set of codes, or said set of instructions are loaded and executed by a processor to implement the method for updating voting data according to any one of claims 8 to 10 and .

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:发票管理方法、装置、服务器和系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类