CN109345392A - Program topic publication, the publication of answer code, answer code check method and system - Google Patents

Program topic publication, the publication of answer code, answer code check method and system Download PDF

Info

Publication number
CN109345392A
CN109345392A CN201811260961.0A CN201811260961A CN109345392A CN 109345392 A CN109345392 A CN 109345392A CN 201811260961 A CN201811260961 A CN 201811260961A CN 109345392 A CN109345392 A CN 109345392A
Authority
CN
China
Prior art keywords
topic
node
answer
block chain
transaction
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.)
Granted
Application number
CN201811260961.0A
Other languages
Chinese (zh)
Other versions
CN109345392B (en
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 Chain Technology Co ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811260961.0A priority Critical patent/CN109345392B/en
Publication of CN109345392A publication Critical patent/CN109345392A/en
Priority to TW108109775A priority patent/TWI706252B/en
Priority to PCT/CN2019/104897 priority patent/WO2020082917A1/en
Application granted granted Critical
Publication of CN109345392B publication Critical patent/CN109345392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Accounting & Taxation (AREA)
  • Tourism & Hospitality (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Educational Technology (AREA)
  • Theoretical Computer Science (AREA)
  • Educational Administration (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Primary Health Care (AREA)
  • Human Resources & Organizations (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Disclose a kind of publication of programming topic, the publication of answer code, answer code check method and system.The equipment of any IT mechanism can access block chain network and be known as node.In block chain network, any node can be based on block chain agreement, issue the programming topic itself founded, that is to say, that then topic publication transaction can be broadcast to other nodes based on the programming topic building topic publication transaction that itself is founded by any node.Transaction write-in block chain can be issued for topic based on the common recognition mechanism between each node by obtaining each node of topic publication transaction.

Description

Program topic publication, the publication of answer code, answer code check method and system
Technical field
This specification embodiment be related to information technology field more particularly to a kind of programming topic publication, answer code publication, Answer code check method and system.
Background technique
Currently, (such as institution of higher learning count for many information technologies (Information Technology, IT) mechanism both domestic and external Suan Ji institute, IT company etc.) generally can all build oneself programming exam pool, for test user (such as students, in office worker Work, interviewee etc.) programming levels.
In practice, there are the demand for sharing mutual programming exam pool in many IT mechanisms.However, for any IT mechanism and How speech prevents other IT mechanisms from modifying the programming topic of IT mechanism creation without authorization, is assistant officer's technical problem to be solved.
Summary of the invention
The programming topic that other IT mechanisms are shared to solve any IT mechanism is easy to be modified without authorization by other IT mechanisms The problem of, this specification embodiment provides a kind of programming topic dissemination method and system.In addition, the also drawings of this specification embodiment A kind of answer code publication, answer code check method and system.
Above-mentioned technical proposal is as follows:
According to the 1st of this specification embodiment the aspect, a kind of programming topic dissemination method based on block chain is provided, is wrapped It includes:
Destination node founds programming topic to be released;The destination node is any node in block chain network;
The destination node is based on topic related data, building topic publication transaction, and broadcasts to the block chain network The topic publication transaction;The topic related data includes the programming topic;
For each node for obtaining the topic publication transaction, which, will based on the common recognition mechanism between each node The topic publication transaction write-in block chain.
According to the 2nd of this specification embodiment the aspect, a kind of answer code dissemination method based on block chain is provided, is wrapped It includes:
Destination node obtains programming topic;The destination node is any node in block chain network, the programming topic Mesh is issued by the method for above-mentioned 1st aspect;
The programming topic is supplied to tested user and answered by the destination node, and is received described tested on probation The answer code that family uploads;
The destination node is based on answer related data, building answer publication transaction, and broadcasts to the block chain network The answer publication transaction;The answer related data includes topic mark, the answer code and the institute of the programming topic State the user identifier of tested user;
For each node for obtaining the answer publication transaction, which, will based on the common recognition mechanism between each node The answer publication transaction write-in block chain.
According to the 3rd of this specification embodiment the aspect, a kind of answer code check method based on block chain is provided, is wrapped It includes:
Module is obtained, the corresponding answer code of programming topic is obtained and uploads the use of the tested user of the answer code Family mark;The programming topic is issued by the method for above-mentioned 1st aspect, and the answer code is by above-mentioned 2nd side The method publication in face, the inspection node is to be stored with the corresponding answer check number of the programming topic in block chain network According to node;
The answer inspection data for corresponding to the programming topic that node is examined using storage, examines the answer generation Code;
If upchecking, the inspection node is based on result related data, building result publication transaction, and to the area Block chain network broadcasts the result publication transaction;The result related data include it is described programming topic topic mark with it is described User identifier;
For each node for obtaining the result publication transaction, which, will based on the common recognition mechanism between each node The result publication transaction write-in block chain.
According to the 4th of this specification embodiment the aspect, a kind of programming topic delivery system based on block chain is provided, including The block chain network being made of multiple nodes;
Any node founds programming topic to be released;Based on topic related data, constructs topic publication and trade, and to The block chain network broadcasts the topic publication transaction, and the topic related data includes the programming topic;
The each node for obtaining the topic publication transaction is sent out the topic based on the common recognition mechanism between each node Cloth transaction write-in block chain.
According to the 5th of this specification embodiment the aspect, a kind of answer code delivery system based on block chain is provided, including The block chain network being made of multiple nodes;
Any node obtains programming topic;The destination node is any node in block chain network, the programming topic Mesh is issued by the method for above-mentioned 1st aspect;The programming topic is supplied to tested user to answer, and is received The answer code that the tested user uploads;Based on answer related data, building answer publication transaction, and to the block chain Answer publication transaction described in Web broadcast;Wherein, the answer related data includes that the topic of the programming topic identifies, is described Answer the user identifier of code and the tested user;
The each node for obtaining the answer publication transaction is sent out the answer based on the common recognition mechanism between each node Cloth transaction write-in block chain.
According to the 6th of this specification embodiment the aspect, a kind of answer code check system based on block chain is provided, including The block chain network being made of multiple nodes;
Node is examined, the corresponding answer code of programming topic is obtained and uploads the use of the tested user of the answer code Family mark, the programming topic are issued by the method for above-mentioned 1st aspect, and the answer code is by above-mentioned 2nd side The method publication in face, the inspection node is to be stored with the corresponding answer check number of the programming topic in block chain network According to node;Using the answer inspection data for corresponding to the programming topic of storage, the answer code is examined;If examining logical It crosses, is then based on result related data, building result publication transaction, and broadcast the result publication to the block chain network and hand over Easily;Wherein, the result related data includes the topic mark and the user identifier of the programming topic;
The each node for obtaining the result publication transaction is sent out the result based on the common recognition mechanism between each node Cloth transaction write-in block chain.
Technical solution provided by this specification embodiment, the equipment of any IT mechanism can access block chain network and be known as Node.In block chain network, any node can be based on block chain agreement, issue the programming topic itself founded, that is, It says, then topic can be issued transaction broadcast based on the programming topic building topic publication transaction that itself is founded by any node Give other nodes.Topic publication transaction can be write based on the common recognition mechanism between each node by obtaining each node of topic publication transaction Enter block chain.So, on the one hand, the programming topic that itself is founded can be shared to other IT mechanisms by any IT mechanism;Separately On the one hand, restriction of the process of any node publication programming topic by block chain agreement, programs topic from founded to being write During the entire process of entering block chain, it is difficult to it is tampered, programming topic is written into after block chain, and be difficult to be tampered.
In addition, any node can be extracted from the programming topic shared between each node and be compiled in this specification embodiment Journey topic is supplied to tested user's answer, is tested with the programming levels to the tested user.Also, it is tested on probation The answer code that family uploads can also be encapsulated into answer publication transaction and be written to the progress publicity of block chain.
In addition, in this specification embodiment, for any node, if the node is stored with some programming topic and corresponds to Answer inspection data, then, the answer code which can also provide tested user for the programming topic carries out It examines, to judge whether tested user passes through test.Also, if tested user is by test, which also can structure It builds result publication to trade and broadcast, carries out publicity so that block chain is written by the message of test in tested user.
As it can be seen that the present invention in fact provides a kind of programming levels testing scheme based on block chain, programming topic is enumerated The stages such as mesh publication, the publication of answer code and answer code check, the programming topic that IT mechanism is founded, tested user's needle Answer record and tested user to programming topic are all written block chain by the result of test and carry out publicity, so that entirely Programming levels test process is open and clear.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not This specification embodiment can be limited.
In addition, any embodiment in this specification embodiment does not need to reach above-mentioned whole effects.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only The some embodiments recorded in this specification embodiment for those of ordinary skill in the art can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is a kind of process signal for programming topic dissemination method based on block chain that this specification embodiment provides Figure;
Fig. 2 is a kind of process signal for answer code dissemination method based on block chain that this specification embodiment provides Figure;
Fig. 3 is a kind of process signal for answer code check method based on block chain that this specification embodiment provides Figure;
Fig. 4 is a kind of process signal of the method for executing the transaction of block chain for parallelization that this specification embodiment provides Figure;
Fig. 5 is the transaction executive mode schematic diagram serialized in the prior art;
Fig. 6 is the transaction executive mode schematic diagram for the parallelization that this specification embodiment provides;
A kind of also corresponding structure for providing programming topic distributing device based on block chain of Fig. 7 this specification embodiment is shown It is intended to;
A kind of also corresponding structure for providing answer code distributing device based on block chain of Fig. 8 this specification embodiment is shown It is intended to;
A kind of also corresponding structure for providing answer code checker based on block chain of Fig. 9 this specification embodiment is shown It is intended to;
Figure 10 is a kind of process signal for programming levels test macro based on block chain that this specification embodiment provides Figure;
Figure 11 is the structural schematic diagram for configuring a kind of computer equipment of this specification embodiment method.
Specific embodiment
First business scenario applied by the present invention (i.e. programming levels test) is described in more detail herein.With letter For ceasing technology company A, if company A wants to know about the programming levels of some user (such as employee, interviewee), then, company A Any programming topic can be extracted from the programming exam pool of oneself is supplied to the user.The user makees according to the programming topic It answers, provides the answer code for answering the programming topic, and answer code is uploaded to the online of company A and sentences topic system.Company A's Topic system is sentenced online is stored with (the specifically standard input of the corresponding answer inspection data of each programming topic in above-mentioned programming exam pool Data and standard output data), for verifying the correctness of answer code.Specifically, company A sentence topic system online can should The corresponding standard input data of programming topic is input to answer code and runs answer code, then, judges whether answer code The corresponding standard output data of the programming topic can be exported, if so, assert that the user by test, otherwise, assert the use Family does not pass through test.
In practice, there are the demand for sharing mutual programming exam pool in many IT mechanisms.For this purpose, in the prior art, for any IT mechanism, which generally can crawl programming topic from the programming exam pool of other IT mechanisms using crawlers, by what is crawled Programming topic is supplied to tested user and answers.Then, which also needs the answer generation for providing tested user Code is sent to the sentencing topic system online and test of the IT mechanism for founding the programming topic.
However, this mode exists as following drawbacks:
1, after IT mechanism crawls the programming topics of other IT mechanisms by crawlers, sometimes without authorization to programming topic into The some inappropriate modifications of row, this aspect not can be well protected the equity for founding the IT mechanism of programming topic, on the other hand, The answer code that tested user provides for modified programming topic often with the programming topic before modification and mismatch, and Online sentence topic system be using adapt to modification before programming topic answer inspection data it is whether correct to test code, such as This, leads to test result not and can accurately reflect the programming levels of tested user.
Once 2, the database of other IT mechanisms is inaccessible, which can not just crawl other knots by crawlers The programming topic of structure.That is, the mode of this shared programming topic is not always effective.
For this purpose, any IT mechanism can be by means of block chain agreement, the volume that oneself is founded in this specification embodiment Journey topic is published in block chain, is equivalent to the programming topic for not only founding oneself and is shared to other IT mechanisms, but also without having to worry about Other IT mechanisms can modify to the programming topic.
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual, Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
Below in conjunction with attached drawing, the technical solution that each embodiment of this specification provides is described in detail.
Fig. 1 is a kind of process signal for programming topic dissemination method based on block chain that this specification embodiment provides Figure, comprising the following steps:
S100: destination node founds programming topic to be released.
In this specification embodiment, the equipment of each IT mechanism can access block chain network, become in block chain network Node.That is, each node and the desired each IT mechanism for sharing programming topic each other in block chain network correspond.
In the step s 100, the destination node can be any node in block chain network.That is, any IT The equipment of mechanism can be founded programming topic and be issued by method shown in FIG. 1.
It should be noted that destination node founds programming topic, it specifically can be destination node and receive the control target The programming topic that the IT mechanism of node uploads, is also possible to destination node according to preset programming topic and founds model, automatic to create If programming topic.
S102: the destination node is based on topic related data, building topic publication transaction.
It should be noted that transaction (transaction) described herein, refers to specified data in block chain agreement Structure.In block chain agreement, transaction refers to block chain client creation of the node by installation, and needs final write-in block One data of chain.That is, according to block chain agreement, all data for needing to be written block chain and carrying out publicity are required It is packaged into this data structure of transaction.
In step s 102, the topic related data includes at least the programming topic that destination node is founded in the step s 100 Mesh.The destination node is based on topic related data building topic publication transaction, actually by the topic dependency number According to be encapsulated into trade this block chain agreement specified data structure.
S104: the destination node broadcasts the topic publication transaction to the block chain network.
In step S104, destination node broadcasts the topic publication transaction to block chain network, actually will be described Topic publication transaction is broadcast to other nodes, is equivalent to the programming topic, is shared with other nodes.
S106: for each node for obtaining the topic publication transaction, the node is based on the common recognition machine between each node The topic is issued transaction write-in block chain by system.
For each node for obtaining the topic publication transaction, which is issuing transaction write-in block for the topic Before chain, legitimate verification can be carried out for topic publication transaction.
It can be needed according to business for the item that the topic issues transaction progress legitimate verification specified.For example, false If being not the permission that each node has publication programming topic, it is possible to the node identification in topic publication transaction, Judge whether the corresponding node of the node identification (i.e. destination node) has the permission of publication programming topic, if do not weighed Limit, just the topic is issued transaction write-in block chain by refusal.
In step s 106, the common recognition mechanism between each node ensures the data that each node is written to block chain every time Consistency.Therefore, even some node without authorization modifies to the programming topic encapsulated in topic publication transaction, to change institute The content of topic publication transaction is stated, block chain will not be written by most of nodes in modified topic publication transaction.
In this way, the programming topic that destination node is founded always can unmodifiedly be written into block chain, to complete to compile Journey is inscribed purpose and is shared.Also, the distributed storage characteristic of block chain, be written block chain after topic publication transaction be also be difficult to It is tampered.
It should be noted that for answer publication transaction, the result publication transaction that will hereinafter occur, based on same The content of reason, these transaction is also difficult to be tampered.
By method shown in FIG. 1, the equipment of any IT mechanism can access block chain network and be known as node.In block chain In network, any node can be based on block chain agreement, issue the programming topic itself founded, that is to say, that any node can With the programming topic building topic publication transaction founded based on itself, topic publication transaction is then broadcast to other nodes.It obtains Transaction can be issued for topic and block chain is written based on the common recognition mechanism between each node by obtaining each node of topic publication transaction.In this way, On the one hand, the programming topic that itself is founded can be shared to other IT mechanisms by any IT mechanism;On the other hand, any node Restriction of the process of publication programming topic by block chain agreement, programs topic from being founded to the entire mistake for being written into block chain Cheng Zhong, it is difficult to it is tampered, programming topic is written into after block chain, and be difficult to be tampered.
In addition, the topic related data can also include the node identification of destination node in this specification embodiment. It means that the node identification of itself can be also encapsulated into topic publication transaction by destination node, and then is written in block chain and carries out Publicity.In this way, the person of founding of each programming topic of each IT mechanism can clearly be shared to, the IT machine of programming topic is founded in protection The equity of structure.
In addition, in practical applications, since this data storage method of block chain is complex, node is when desired from write-in When transferring some programming topic in the programming topic of block chain, complicated operation.
For this purpose, in this specification embodiment, for each node for obtaining the topic publication transaction, which can be with The topic storage address is stored in creation topic storage address, and by the topic related data.This is equivalent to will also programming Topic is stored with simple storage mode.It should be noted that for the publication transaction of any topic, it can be according to write area The topic of block chain issues transaction, and whether the programming topic of verifying deposit topic storage address is tampered.By the above-mentioned means, section Point, can be more convenient when wanting to transfer some programming topic.
Further, the topic intelligence contract for being packaged with the topic related data specifically can be stored in the topic by node Mesh storage address.In this case, the topic storage address is actually the Contract ID of the topic intelligence contract.
Intelligent contract is the data structure that many block chain agreements (such as ether mill) are naturally supported, also, many block chains Agreement also naturally supports the quick calling of intelligent contract.Therefore, can with this data structure of intelligent contract, to programming topic into Row storage, it is convenient subsequently through the form for calling intelligent contract, it quickly transfers programming topic and is programmed horizontal checkout.
Programming topic dissemination method according to figure 1, this specification embodiment further provide a kind of based on block The answer code dissemination method of chain, as shown in Figure 2, comprising the following steps:
S200: destination node obtains programming topic.
The destination node is any node in block chain network.In practical applications, any IT mechanism wants to quilt When the programming levels of test user are tested, the destination node that can trigger itself control obtains programming topic.Destination node The programming topic of acquisition is issued based on programming topic dissemination method shown in FIG. 1.
Specifically, destination node can be issued in transaction from any topic in block chain and read programming topic.
Alternatively, if topic related data packaged by topic publication transaction has also been stored into some topic storage ground Location, then, destination node can also obtain the programming topic from the topic storage address.It is programmed when obtaining in this way When topic, more fast.
Further, if the topic related data is that (i.e. topic intelligence contract) deposit should in the form of intelligent contract Topic storage address, the destination node can call the topic intelligence contract, to get the programming topic.
S202: the programming topic is supplied to tested user and answered by the destination node, and receives the quilt Test the answer code that user uploads.
S204: the destination node is based on answer related data, building answer publication transaction.
In this specification embodiment, the answer related data includes at least the topic mark of the programming topic, institute State the user identifier of answer code and the tested user.
Wherein, described if the destination node reads programming topic from any topic publication transaction in block chain The topic of programming topic is identified as the transaction Hash of the topic publication transaction;If the destination node stores ground from any topic Location obtains programming topic, then the topic of the programming topic is identified as the storage address.
Further, the destination node can examine the answer code with the presence or absence of compiling or operation problem It looks into, passes through if checked, can just construct answer publication transaction, If the check does not pass, then refusing building answer publication transaction.
S206: the destination node broadcasts the answer publication transaction to the block chain network.
S208: for each node for obtaining the answer publication transaction, the node is based on the common recognition machine between each node The answer is issued transaction write-in block chain by system.
For each node for obtaining the answer publication transaction, which is issuing transaction write-in block for the answer Before chain, legitimate verification can be carried out for answer publication transaction.
It can be needed according to business for the item that the answer publication transaction carries out legitimate verification specified.For example, false If being pre-provisioned with the format of answer code, it is possible to be carried out to the format of the answer code in the answer publication transaction Verifying, if format is undesirable, just the answer is issued transaction write-in block chain by refusal.
In step S208, it is equivalent to the programming topic for being answered the identity information of tested user, tested user Identification information, the answer code publicity that provides of tested user is to each node.
In addition, testing in order to facilitate the answer code that node can quickly transfer tested user, in this specification In embodiment, each node can also create answer storage address, and the answer related data is stored in the answer and is stored Address.
Further, the answer intelligence contract for being packaged with the answer related data can be stored in the solution by each node Answer storage address.
Programming topic dissemination method according to figure 1 and answer code dissemination method shown in Fig. 2, this specification are implemented Example further provides a kind of answer code check method based on block chain, as shown in Figure 3, comprising the following steps:
S300: it examines node to obtain the corresponding answer code of programming topic and uploads the tested user of the answer code User identifier.
It is described that node is examined to be stored with the corresponding answer inspection data of the programming topic in this specification embodiment Node.The answer inspection data is for testing to the correctness for answering answer code given by the programming topic Data.As it was noted above, the answer inspection data generally comprises standard input data and standard output data.
The inspection node is usually to found the programming topic destination node.Certainly, the programming topic destination node is founded The corresponding answer inspection data of the programming topic can also be distributed at least one other node.In this way, the inspection section Point is also possible to be stored with other nodes of the answer inspection data in addition to founding the programming topic destination node.
In this specification embodiment, examine node that can determine the answer according to any answer inspection data of storage The corresponding topic mark of inspection data.Then, the answer publication transaction identified comprising the topic is inquired from block chain, And answer code and user identifier are read from answer publication transaction.
Further, the answer storage address for being stored with topic mark can also be inquired by examining node, and from described It answers storage address and obtains answer code and user identifier.
Further, it examines node that can inquire the topic intelligence contract for being packaged with the topic mark, and calls institute Topic intelligence contract is stated, to get corresponding answer code and user identifier.
S302: the answer inspection data for corresponding to the programming topic for examining node using storage, described in inspection Answer code.
S304: if upchecking, the inspection node is based on result related data, building result publication transaction.
In this specification embodiment, if node is examined to pass through the answer code check, it can will examine logical The message publicity crossed is in block chain.In this case, the result related data actually includes the topic of the programming topic Mark and the user identifier, the meaning that the result publication is traded are, for example, " user Zhang San has answered questions topic 1 ".
It further, can also be by the test fails if node is examined not pass through the answer code check Message publicity is in block chain.In this case, the result issues the meaning of transaction either upchecking, and is also possible to examine It tests and does not pass through.In order to distinguish, the result related data also needs to include upcheck result or the test fails result.
S306: the result publication transaction is broadcasted to the block chain network.
S308: for each node for obtaining the result publication transaction, the node is based on the common recognition machine between each node The result is issued transaction write-in block chain by system.
For each node for obtaining the result publication transaction, which is issuing transaction write-in block for the topic Before chain, legitimate verification can be carried out for result publication transaction.
It can be needed according to business for the item that the result issues transaction progress legitimate verification specified.For example, false The corresponding answer code of the programming topic is examined if only founding the programming topic destination node and just having permission, it is possible to Judge whether the inspection node for broadcasting the result publication transaction has checking authority, if just refused without permission by the knot Fruit publication transaction write-in block chain.
In step S308, it is equivalent to the programming topic for being answered the identity information of tested user, tested user Identification information, tested user whether pass through the result publicity of test to each node.
In addition, being consulted in order to facilitate the test result that node can quickly transfer tested user, in this specification In embodiment, each node can also create result storage address, and the result related data is stored in the result and is stored Address.
Further, the result intelligent contract for being packaged with the result related data can be stored in the knot by each node Fruit storage address.
In addition, in practice, the tested user may answer more than one programming topic, more than one solution is uploaded Answer code.In this case, for each node, which can answer the tested user knot of multiple programming topics Fruit is all stored in the same result storage address, facilitates statistics and consults.
Specifically, in this specification embodiment, for each node for obtaining the result publication transaction, if the node Other results publication associated with result publication transaction is obtained to trade, then it, will based on the common recognition mechanism between each node Described other results publication transaction write-in block chain, wherein other results publication transaction be based on the user identifier with The mark building of other topics.Then, which, will other topics mark deposit according to other results publication transaction The result storage address.
That is, the result publication transaction can be considered as first programming topic institute of tested user's answer It generates, and the publication transaction of other results can be considered as produced by other programming topics of the subsequent answer of tested user 's.For the tested subsequent answer of user other programming topics as a result, without re-create result storage address into Row storage, but the result storage address created before being directly deposited into.
In this way, each tested user has the result storage address for being uniquely corresponding to oneself, for recording answering for oneself Inscribe situation.
It is further to note that in method shown in Fig. 1, it is understood that there may be more than one examines node to examine the solution The case where inscribing code.In this case, for each inspection node, which obtains the corresponding answer code of programming topic With the user identifier for the tested user for uploading the answer code;Then using the solution for corresponding to the programming topic of storage Inspection data is answered, the answer code is examined;If passing through to the answer code check, it is based on result related data, building As a result publication transaction, and the result publication transaction is broadcasted to the block chain network.
Based on this, for each node, which can be specified number when the quantity for determining the result publication transaction obtained It, just can be based on the common recognition mechanism between each node, by any result publication transaction write-in block chain of acquisition when amount.Wherein, institute Specified quantity is stated no more than the quantity for examining node.
In addition, there are the transaction of three types, i.e. topic publication transaction, answer publication is handed in this specification embodiment Easily and result publication is traded.Wherein, it for any transaction, creates storage address and is stored in the packaged correlation of this kind transaction Data can be considered as and execute operation to this kind transaction.
Obviously, whether for which kind of above-mentioned transaction, the implementing result that this kind transaction generates is executed, one can only be stored Address has an impact.Therefore, the transaction of the three types in this specification embodiment is suitable for using parallelization described below Transaction executive mode executed.To hereafter explanation be introduced to the transaction executive mode of this parallelization.
For common block chain application scenarios, when needing to carry out the common recognition between each node, each node can be based on Common recognition algorithm elects the node for having permission and several pending transaction being packaged into block, i.e. accounting nodes.After common recognition, Accounting nodes fish for several pending transaction from caching and are packaged into block, and the block is broadcast to other nodes.With Afterwards, for each node, the node on the one hand can according to the sequencing being initiated of respectively trading in the block, by after arriving first according to It is secondary to execute each transaction, on the other hand block chain can be written in the block.
It is executed in general, node is known as the transaction serialized by the mode for executing each transaction in block after arriving first one by one Mode.The transaction executive mode why use this serialization, is one because under common block chain application scenarios The execution of transaction is sometimes updated the information stored in more than one storage address, if not using the transaction of serialization The case where executive mode, the then transaction being easy to appear executes failure.
But under the block chain application scenarios having, there is no can to the information stored in more than one storage address into The transaction that row updates.Under these block chain application scenarios, using the transaction executive mode of above-mentioned serialization, transaction will lead to Execution efficiency is lower.
In the following, being carried out by taking this block chain agreement in ether mill as an example to using the reason of transaction executive mode serialized It is described in detail.It is emphasized that in other block chain agreements in addition to ether mill, using the transaction side of execution of serialization The reason of formula is also similar.
In ether mill, there are points of external account and contract account.External account is for storing the ether that user possesses Coin remaining sum, external account are substantially the storage address for being stored with balance information.Contract account is for storing the intelligence that user founds Energy contract, contract account is substantially to be stored with the storage address of intelligent contract code.
In ether mill, general there are two types of the transaction of type, i.e. external account (can be external account to other accounts Can be contract account) money transfer transactions and external account creation contract account contract creation transaction.
The execution of money transfer transactions can generally be updated the information stored in more than one storage address.Specifically, The execution of one money transfer transactions, it will usually change the remaining sum (i.e. the balance information stored on two account addresses) of two accounts, Transfer amounts are deducted from the remaining sum of transfer account, increase transfer amounts into the remaining sum of receipt on account account.One money transfer transactions Executable premise is the remaining sum of transfer account not less than transfer amounts.
Transfer account in practical application, in a certain money transfer transactions (being denoted as money transfer transactions A), it may be possible to before another Receipt on account user in one money transfer transactions (being denoted as money transfer transactions B).If the sequence not being initiated according to transaction after arriving first by holding Row transaction, it would be possible that there is following situation, i.e. money transfer transactions B is not carried out, and the transfer account in money transfer transactions A is caused not fill The remaining sum of foot is transferred accounts.Exactly because in this way, all block chain application scenarios for being related to money transfer transactions, all have to using string The transaction executive mode of rowization, to guarantee that transaction can be executed smoothly.
And the execution of contract creation transaction is actually to create a contract account, that is, founds a storage address, and will Intelligent contract code is stored in the storage address founded.Obviously, the execution of contract creation transaction only will affect a storage address.
In addition, block chain application scenarios be it is diversified, under the block chain application scenarios having, ether mill can be based on It is extended, develops the transaction of new type, the execution of this transaction may also only will affect a storage address.For example, sharp With block chain carry out in store card.One is deposited the execution of card transaction, is substantially to found a storage address, will be deposited the interior of card It stores into the storage address founded.
Based on the above, this paper presents a kind of method that parallelization executes the transaction of block chain, specifically for certain a kind of block Chain application scenarios, under this kind of block chain scene, the implementing result of every transaction only will affect a storage address.
Fig. 4 is the flow diagram for the method that a kind of parallelization that this specification embodiment provides executes the transaction of block chain, The following steps are included:
S400: for each node in block chain network, which obtains block to be written.
In this specification embodiment, after actually each node common recognition of the block to be written, it is packaged by accounting nodes At block.The block to be written can be broadcast to other nodes by accounting nodes.It is well known that in block chain agreement, often On the one hand a node needs to be implemented each transaction in block to be written, on the other hand need to be written into block and be written to block Publicity is carried out in chain.The block to be written once be written block chain in, be equivalent to be written into each of block trade into Publicity is gone.Whether publicity can correct for verifying corresponding transaction implementing result in the transaction on block chain, to have prevented Node is done evil.
In step S400, for each node, if the node is accounting nodes, which obtains described to be written The mode for entering block specifically can be fished for from the caching of itself it is several transaction be packaged into the block to be written;If the section Point is not accounting nodes, then the mode that the node obtains the block to be written, which specifically can be, receives accounting nodes broadcast The block to be written.
It is emphasized that the implementing result of the transaction is to found one for each transaction in the block to be written A storage address is simultaneously stored in information, or update stored in a storage address information (to storage address deposit information or Modify the information stored in a storage address).That is, the implementing result of each transaction in the block to be written, A storage address can only be had an impact.
For example, creation contract account contract create transaction, be exactly implementing result be found a storage address and be stored in The transaction of information.The topic publication transaction being mentioned above is to found a storage ground with answer publication transaction and implementing result Location and the transaction for being stored in information.
For another example, under some block chain application scenarios, the record of the shopping to each user is needed to carry out depositing card.So, Need to found the corresponding record storage address of each user in the database.When target user does shopping, one will be generated Item shopping records, and any node in block chain network can deposit to demonstrate,prove and trade and broadcast based on shopping record building record.Then, For each node, the node can (i.e. the record deposits card transaction and is packed into module to be written and is broadcast on suitable opportunity When each node) execute the record deposit card transaction, i.e., the shopping story is recorded into the corresponding record storage address of target user.It is aobvious So, target user carries out a plurality of shopping record caused by repeatedly shopping with being stored into the corresponding record storage of target user Location.Therefore, above-mentioned record deposits card transaction, be exactly implementing result be the information trading that stores in one storage address of update.
The result publication transaction being mentioned above and implementing result are to update the information stored in a storage address to hand over Easily.
S402: each transaction is read from the block to be written, and by each action organisation at N number of transaction queue.
In the prior art, each node generallys use the transaction executive mode of serialization to execute the block to be written In each transaction.As shown in figure 5, the transaction executive mode of so-called serialization, refer to each node according to certain sequence on the offensive, Each transaction in the block to be written is executed one by one.
And in this specification embodiment, each transaction in the block to be written can be split as N group, wherein N is big In 1 natural number.Then, for each group, the transaction in this group is arranged in a transaction queue.This specification is to each Putting in order for trading in transaction queue is not specifically limited.
S404: while it being directed to each transaction queue, by successively executing each transaction in the transaction queue after arriving first.
In step s 404, actually start simultaneously at parallelization carries out transaction execution for each transaction queue.And Specific to each transaction queue, actually serialization executes each transaction in the transaction queue.As shown in Figure 6.
So-called " simultaneously " refers to that node started to execute the transaction in each transaction queue in the same time.It is equivalent to node N number of transaction executive process is founded in the same time, each transaction process is responsible for executing the transaction in a transaction queue.
Two kinds of transaction executive modes of comparison diagram 5 and Fig. 6, it is clear that use transaction executive mode shown in fig. 6, Ke Yi More transaction are executed in unit time.
S406: block chain is written into the block to be written.
In this specification embodiment, for each node, step S406 can be executed after executing step S404; Step S406 can not also be just executed after executing step S404.
The method for executing the transaction of block chain by parallelization shown in Fig. 4, if each transaction in block to be written is all It is not the transaction being updated to the information stored in more than one storage address, then, each node in block chain network Each action organisation in block can be written into at least two transaction queues, then, start simultaneously at and execute each transaction team Transaction in column.In this way, each node can execute greater number of transaction within the unit time, improves transaction and execute effect Rate.
In addition, in this specification embodiment, the corresponding number of transaction of each transaction queue is (in i.e. each transaction queue The quantity of transaction) it can be relatively.In this way, when carrying out transaction execution for each transaction queue while parallelization, each The quantity of transaction performed by executive process is not in that the process having is left unused relatively, the feelings of some process overloads Condition.This also means that node can execute transaction as much as possible within the unit time.
Specifically, the variance being calculated based on the corresponding number of transaction of each transaction queue can be set no more than specified Threshold value.The variance being calculated based on the corresponding number of transaction of each transaction queue is smaller, the corresponding number of deals of each transaction queue Amount is just closer.
In addition, can specifically use ether mill protocol construction block chain network in this specification embodiment.In ether mill In, virtual machine program is installed on each node, for providing running environment for the realization of ether mill agreement.
In general, a virtual machine program is for executing a block chain process.And in this specification embodiment, due to needing It to be directed to more than one transaction queue simultaneously, the execution more than one block chain process of parallelization, therefore, it is necessary in each node Upper deployment more than one virtual machine program in advance.
Specifically, it is written into the action organisation in block if necessary into N number of transaction queue, then, it is necessary in advance N number of virtual machine program is disposed on each node.
In this way, in step s 404, can establish between the N number of virtual machine program and N number of transaction queue disposed in advance One-to-one relationship;Be directed to each transaction queue simultaneously, by the corresponding virtual machine program of the transaction queue, by after arriving first successively Execute each transaction in the transaction queue.
In addition, in this specification embodiment, in general, the existing first kind transaction of transaction in block to be written, also there is the The transaction of two classes.Wherein, first kind transaction refers to that implementing result is to update the transaction of the information stored in a storage address;The The transaction of two classes refers to that implementing result is the transaction founded a storage address and be stored in information.
Obviously, there may be the trade fairs of the more than one first kind to storing in the same storage address in block to be written Information is updated.And node generally requires first to access currently performed first kind friendship when executing the transaction of each first kind Easily targeted storage address.In this case, node is when executing the transaction in block to be written, if can be to same storage The corresponding all first kind transaction in address, which concentrate, to be executed in batches, then only needing to carry out for the same storage address primary Access, this can be obviously improved the speed that node executes transaction.
Specifically, in step S402, implementing result can be selected from each transaction to update in a storage address The transaction of the information of storage is traded as the first kind, and, by other transaction conducts in each transaction in addition to first kind transaction The transaction of second class;By in the transaction of each first kind, the identical first kind action organisation of corresponding storage address is at a sub- team of transaction Column;With each transaction subqueue for a processing unit, also, a processing unit is considered as with the transaction of each second class;It will be each Unit organization is handled into N number of transaction queue.
In this way, whole first kind transaction corresponding to any storage address can all be integrated one in the block to be written A transaction subqueue, the transaction subqueue can be integrally put into some transaction queue.Node for the transaction queue into When row transaction executes, once accessing the storage address, the corresponding whole first kind transaction of the storage address will be continuously performed.
Further, each processing unit organization can be such that at N number of transaction queue
It is descending that each processing unit is ranked up according to the corresponding number of transaction of each processing unit;Also, it is initial Changing the corresponding number of transaction of each transaction queue is 0;According to ranking results, first processing unit is selected;By what is currently selected Processing unit is added to the tail of the queue of minimum transaction queue, and updates the corresponding number of transaction of the minimum transaction queue;Minimum is handed over Easy queue is the current corresponding the smallest transaction queue of number of transaction;Continue to select next processing unit, until all processing Unit is added to transaction queue.
In this way, the corresponding number of transaction of each transaction queue can be made about the same.In this way, being based on When the transaction that each transaction queue carries out parallelization executes, the workload on each executive process is also about the same, does not have some The idle situation of executive process occurs, and can execute most transaction within the unit time in this way, be obviously improved the transaction of node Execution efficiency.
Based on method shown in FIG. 1, this specification embodiment also correspondence provides a kind of programming topic based on block chain Distributing device, as shown in fig. 7, described device is any node in block chain network, described device includes:
Module 701 is founded, programming topic to be released is founded;
Broadcast module 702 is constructed, is based on topic related data, building topic publication transaction, and to the block chain network Broadcast the topic publication transaction;The topic related data includes the programming topic, is handed over so as to obtain the topic publication Easy each node issues transaction write-in block chain based on the common recognition mechanism between each node, by the topic.
Based on method shown in Fig. 2, this specification embodiment also correspondence provides a kind of answer code based on block chain Distributing device, as shown in figure 8, described device is any node in block chain network, described device includes:
Module 801 is obtained, programming topic is obtained;The programming topic is by the described in any item sides of Claims 1 to 4 Method publication;
Module 802 is answered, the programming topic is supplied to tested user and is answered, and is received described tested on probation The answer code that family uploads;
Broadcast module 803 is constructed, based on answer related data, building answer publication transaction, and to the block chain network The answer publication transaction is broadcasted, so as to obtain each node of the answer publication transaction based on the common recognition machine between each node The answer is issued transaction write-in block chain by system;
Wherein, the answer related data includes topic mark, the answer code and the quilt of the programming topic Test the user identifier of user.
Based on method shown in Fig. 2, this specification embodiment also correspondence provides a kind of answer code based on block chain Verifying attachment, as shown in figure 9, described device is to be stored with the corresponding answer inspection data of programming topic in block chain network Node, described device include:
Module 901 is obtained, the corresponding answer code of the programming topic is obtained and uploads the tested of the answer code The user identifier of user;The programming topic is issued by method shown in FIG. 1, and the answer code is by Fig. 2 institute The method publication shown;
Inspection module 902 examines the answer generation using the answer inspection data for corresponding to the programming topic of storage Code;
Broadcast module 903 is constructed, if upchecking, is based on result related data, building result publication transaction, and to institute It states block chain network and broadcasts the result publication transaction, so that each node for obtaining the result publication transaction is based on each node Between common recognition mechanism, by the result issue transaction write-in block chain;
Wherein, the result related data includes the topic mark and the user identifier of the programming topic.
Based on method shown in FIG. 1, this specification embodiment also correspondence provides a kind of programming topic based on block chain Delivery system, including the block chain network being made of multiple nodes;
Any node founds programming topic to be released;Based on topic related data, constructs topic publication and trade, and to The block chain network broadcasts the topic publication transaction, and the topic related data includes the programming topic;
The each node for obtaining the topic publication transaction is sent out the topic based on the common recognition mechanism between each node Cloth transaction write-in block chain.
Based on method shown in Fig. 2, this specification embodiment also correspondence provides a kind of answer code based on block chain Delivery system, including the block chain network being made of multiple nodes;
Any node obtains programming topic;The destination node is any node in block chain network, the programming topic Mesh is method publication according to figure 1;The programming topic is supplied to tested user to answer, and described in reception The answer code that tested user uploads;Based on answer related data, building answer publication transaction, and to the block chain network Broadcast the answer publication transaction;Wherein, the answer related data includes topic mark, the answer of the programming topic The user identifier of code and the tested user;
The each node for obtaining the answer publication transaction is sent out the answer based on the common recognition mechanism between each node Cloth transaction write-in block chain.
Based on method shown in Fig. 3, this specification embodiment also correspondence provides a kind of answer code based on block chain Checking system, including the block chain network being made of multiple nodes;
Node is examined, the corresponding answer code of programming topic is obtained and uploads the use of the tested user of the answer code Family mark, the programming topic are method publications according to figure 1, and the answer code is method according to Fig.2, Publication, the inspection node is to be stored with the node of the corresponding answer inspection data of the programming topic in block chain network; Using the answer inspection data for corresponding to the programming topic of storage, the answer code is examined;If upchecking, it is based on As a result related data, building result publication transaction, and the result publication transaction is broadcasted to the block chain network;Wherein, institute State the topic mark and the user identifier that result related data includes the programming topic;
The each node for obtaining the result publication transaction is sent out the result based on the common recognition mechanism between each node Cloth transaction write-in block chain.
Figure 10 is a kind of structural representation for programming levels test macro based on block chain that this specification embodiment provides Figure.System shown in Fig. 10 specifically can be used to implement the programming topic delivery system based on block chain, answer code publication is System, answer code check system.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in On reservoir and the computer program that can run on a processor, wherein processor realized when executing described program Fig. 1 or Fig. 2 or The function of method shown in Fig. 3.
Figure 11 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram, The equipment may include: processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus 1050.Wherein processor 1010, memory 1020, input/output interface 1030 and communication interface 1040 are real by bus 1050 The now communication connection inside equipment each other.
Processor 1010 can use general CPU (Central Processing Unit, central processing unit), micro- place Reason device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one Or the modes such as multiple integrated circuits are realized, for executing relative program, to realize technical side provided by this specification embodiment Case.
Memory 1020 can use ROM (Read Only Memory, read-only memory), RAM (Random Access Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 1020 can store Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware When, relevant program code is stored in memory 1020, and execution is called by processor 1010.
Input/output interface 1030 is for connecting input/output module, to realize information input and output.Input and output/ Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display, Loudspeaker, vibrator, indicator light etc..
Communication interface 1040 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly (such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 1050 include an access, equipment various components (such as processor 1010, memory 1020, input/it is defeated Outgoing interface 1030 and communication interface 1040) between transmit information.
It should be noted that although above equipment illustrates only processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus 1050, but in the specific implementation process, which can also include realizing normal fortune Other assemblies necessary to row.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising real in above equipment Component necessary to existing this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey The function of method shown in Fig. 1 and/or Fig. 4 is realized when sequence is executed by processor.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words, The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment Method described in certain parts of a embodiment or embodiment.
System, method, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device and For apparatus embodiments, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to method The part of embodiment illustrates.Embodiment of the method described above is only schematical, wherein described be used as separation unit The module that part illustrates may or may not be physically separated, can be when implementing this specification example scheme The function of each module is realized in the same or multiple software and or hardware.It can also select according to the actual needs therein Some or all of the modules achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not making the creative labor In the case where, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.

Claims (28)

1. a kind of programming topic dissemination method based on block chain, comprising:
Destination node founds programming topic to be released;The destination node is any node in block chain network;
The destination node is based on topic related data, and building topic publication is traded, and to described in block chain network broadcast Topic publication transaction;The topic related data includes the programming topic;
For each node for obtaining the topic publication transaction, which, will be described based on the common recognition mechanism between each node Topic publication transaction write-in block chain.
2. the method as described in claim 1, the topic related data further includes the node identification of the destination node.
3. the method as described in claim 1, the method also includes: for each section for obtaining the topic publication transaction Point, which creates topic storage address, and the topic related data is stored in the topic storage address.
4. the topic related data is stored in the topic storage address, specifically included by method as claimed in claim 3:
The topic intelligence contract for being packaged with the topic related data is stored in the topic storage address.
5. a kind of answer code dissemination method based on block chain, comprising:
Destination node obtains programming topic;The destination node is any node in block chain network, and the programming topic is Pass through the described in any item method publications of Claims 1 to 4;
The programming topic is supplied to tested user and answered by the destination node, and is received on the tested user The answer code of biography;
The destination node is based on answer related data, and building answer issues transaction, and to described in block chain network broadcast Answer publication transaction;The answer related data includes topic mark, the answer code and the quilt of the programming topic Test the user identifier of user;
For each node for obtaining the answer publication transaction, which, will be described based on the common recognition mechanism between each node Answer publication transaction write-in block chain.
6. method as claimed in claim 5, destination node obtains programming topic, specifically includes:
Destination node reads programming topic from any topic publication transaction in block chain;Or
Destination node obtains programming topic from any topic storage address.
7. method as claimed in claim 6, if the destination node is read from any topic publication transaction in block chain Topic is programmed, then the topic of the programming topic is identified as the transaction Hash of the topic publication transaction;
If the destination node obtains programming topic from any topic storage address, the topic of the programming topic is identified as institute State storage address.
8. method as claimed in claim 5, the method also includes: for each section for obtaining the answer publication transaction Point, node creation answer storage address, and the answer related data is stored in the answer storage address.
9. the answer related data is stored in the answer storage address, specifically included by method according to claim 8:
The answer intelligence contract for being packaged with the answer related data is stored in the answer storage address.
10. a kind of answer code check method based on block chain, comprising:
The user for examining node to obtain the corresponding tested user for answering code and uploading the answer code of programming topic marks Know;The programming topic is issued by the described in any item methods of Claims 1 to 4, and the answer code is to pass through power Benefit requires 5~9 described in any item method publications, and the inspection node is to be stored with the programming topic in block chain network The node of the corresponding answer inspection data of mesh;
The answer inspection data for corresponding to the programming topic that node is examined using storage, examines the answer code;
If upchecking, the inspection node is based on result related data, building result publication transaction, and to the block chain The publication transaction of result described in Web broadcast;The result related data includes that the topic of the programming topic identifies and the user Mark;
For each node for obtaining the result publication transaction, which, will be described based on the common recognition mechanism between each node As a result publication transaction write-in block chain.
11. method as claimed in claim 10 examines node to obtain the corresponding answer code of programming topic and upload the solution The user identifier for answering the tested user of code, specifically includes:
Node is examined according to any answer inspection data of storage, determines the corresponding topic mark of the answer inspection data;
The answer publication transaction identified comprising the topic is inquired from block chain, and is read from answer publication transaction Take answer code and user identifier;Or inquiry is stored with the answer storage address of the topic mark, and stores from the answer Address obtains answer code and user identifier.
12. method as claimed in claim 10, the result related data further includes the result or the test fails of upchecking As a result.
13. method as claimed in claim 10, the method also includes: for each section for obtaining the result publication transaction Point, which creates result storage address, and the result related data is stored in the result storage address.
14. the result related data is stored in the result storage address by method as claimed in claim 13, specific to wrap It includes:
The result intelligent contract for being packaged with the result related data is stored in the result storage address.
15. method as claimed in claim 13, the method also includes:
For each node for obtaining the result publication transaction, if node acquisition is associated with result publication transaction The publication transaction of other results will other results publication transaction write-in block chain then based on the common recognition mechanism between each node; Other results publication transaction is constructed based on the user identifier and other topics mark;
And
The node is stored in the result storage address according to other results publication transaction, by other topics mark.
16. method as claimed in claim 10 examines the quantity of node to be greater than 1;
The user for examining node to obtain the corresponding tested user for answering code and uploading the answer code of programming topic marks Know, specifically include:
For each inspection node, which obtains the corresponding answer code of programming topic and uploads the answer code The user identifier of tested user;
The answer inspection data for corresponding to the programming topic that node is examined using storage, examines the answer code, It specifically includes:
For each inspection node, the answer inspection data that corresponds to the programming topic of the inspection node using storage, inspection Test the answer code;
If upchecking, the inspection node is based on result related data, building result publication transaction, and to the block chain The publication transaction of result described in Web broadcast, specifically includes:
For each inspection node, if the inspection node passes through the answer code check, it is based on result related data, structure Result publication transaction is built, and broadcasts the result publication transaction to the block chain network.
17. the method described in claim 16, for each node for obtaining the result publication transaction, which is based on each The result is issued transaction write-in block chain, specifically included by the common recognition mechanism between node:
The node is when the quantity for determining the result obtained publication transaction is specified quantity, based on the common recognition machine between each node System, by any result publication transaction write-in block chain of acquisition;
Wherein, the specified quantity is no more than the quantity for examining node.
18. method as claimed in claim 10, the inspection node are to found the programming topic in the block chain network Node.
19. a kind of programming topic dissemination method based on block chain, comprising:
Destination node founds programming topic to be released;The destination node is any node in block chain network;
Based on topic related data, topic publication transaction is constructed, and broadcasts the topic publication transaction to the block chain network; The topic related data includes the programming topic, so that each node for obtaining the topic publication transaction is based on each node Between common recognition mechanism, by the topic issue transaction write-in block chain.
20. a kind of answer code dissemination method based on block chain, comprising:
Destination node obtains programming topic;The destination node is any node in block chain network, and the programming topic is Pass through the described in any item method publications of Claims 1 to 4;
The programming topic is supplied to tested user to answer, and receives the answer generation that the tested user uploads Code;
Based on answer related data, building answer publication transaction, and the answer publication transaction is broadcasted to the block chain network, So that the answer is issued and is traded based on the common recognition mechanism between each node by each node for obtaining the answer publication transaction Block chain is written;
Wherein, the answer related data includes that the topic for programming topic identifies, the answer code is tested with described The user identifier of user.
21. a kind of answer code check method based on block chain, comprising:
The user for examining node to obtain the corresponding tested user for answering code and uploading the answer code of programming topic marks Know;The programming topic is issued by the described in any item methods of Claims 1 to 4, and the answer code is to pass through power Benefit requires 5~9 described in any item method publications, and the inspection node is to be stored with the programming topic in block chain network The node of the corresponding answer inspection data of mesh;
Using the answer inspection data for corresponding to the programming topic of storage, the answer code is examined;
If upchecking, it is based on result related data, building result publication is traded, and to described in block chain network broadcast As a result publication transaction, so that obtaining the result issues each node traded based on the common recognition mechanism between each node, by institute State result publication transaction write-in block chain;
Wherein, the result related data includes the topic mark and the user identifier of the programming topic.
22. a kind of programming topic distributing device based on block chain, described device is any node in block chain network, described Device includes:
Module is founded, programming topic to be released is founded;
Broadcast module is constructed, topic related data is based on, building topic publication is traded, and to described in block chain network broadcast Topic publication transaction;The topic related data includes the programming topic, so as to obtain each of described topic publication transaction Node issues transaction write-in block chain based on the common recognition mechanism between each node, by the topic.
23. a kind of answer code distributing device based on block chain, described device is any node in block chain network, described Device includes:
Module is obtained, programming topic is obtained;The programming topic is by the described in any item method publications of Claims 1 to 4 's;
Module is answered, the programming topic is supplied to tested user and is answered, and receives the tested user and uploads Answer code;
Broadcast module is constructed, based on answer related data, publication transaction is answered in building, and to described in block chain network broadcast Answer publication transaction, so as to obtain each node for answering publication transaction based on the common recognition mechanism between each node, by institute State answer publication transaction write-in block chain;
Wherein, the answer related data includes that the topic for programming topic identifies, the answer code is tested with described The user identifier of user.
24. a kind of answer code checker based on block chain, described device is to be stored with programming topic in block chain network The node of corresponding answer inspection data, described device include:
Module is obtained, the corresponding answer code of the programming topic is obtained and uploads the use of the tested user of the answer code Family mark;The programming topic is issued by the described in any item methods of Claims 1 to 4, and the answer code is logical Cross the described in any item method publications of claim 5~9;
Inspection module examines the answer code using the answer inspection data for corresponding to the programming topic of storage;
Broadcast module is constructed, if upchecking, is based on result related data, building result publication transaction, and to the block Chain network broadcasts the result publication transaction, so as to obtain each node of the result publication transaction based between each node The result is issued transaction write-in block chain by common recognition mechanism;
Wherein, the result related data includes the topic mark and the user identifier of the programming topic.
25. a kind of programming topic delivery system based on block chain, including the block chain network being made of multiple nodes;
Any node founds programming topic to be released;Based on topic related data, topic publication transaction is constructed, and to described Block chain network broadcasts the topic publication transaction, and the topic related data includes the programming topic;
The topic is issued and is handed over based on the common recognition mechanism between each node by each node for obtaining the topic publication transaction Easily write-in block chain.
26. a kind of answer code delivery system based on block chain, including the block chain network being made of multiple nodes;
Any node obtains programming topic;The destination node is any node in block chain network, and the programming topic is Pass through the described in any item method publications of Claims 1 to 4;The programming topic is supplied to tested user to solve It answers, and receives the answer code that the tested user uploads;Based on answer related data, building answer publication is traded, and to The block chain network broadcasts the answer publication transaction;Wherein, the answer related data includes the topic of the programming topic Target knowledge, the user identifier for answering code and the tested user;
The answer is issued and is handed over based on the common recognition mechanism between each node by each node for obtaining the answer publication transaction Easily write-in block chain.
27. a kind of answer code check system based on block chain, including the block chain network being made of multiple nodes;
Node is examined, the user for obtaining the corresponding answer code of programming topic and uploading the tested user of the answer code marks Know, the programming topic is issued by the described in any item methods of Claims 1 to 4, and the answer code is to pass through power Benefit requires 5~9 described in any item method publications, and the inspection node is to be stored with the programming topic in block chain network The node of the corresponding answer inspection data of mesh;Use the answer inspection data for corresponding to the programming topic of storage, inspection institute State answer code;If upchecking, it is based on result related data, building result publication transaction, and to the block chain network Broadcast the result publication transaction;Wherein, the result related data includes the topic mark and the use of the programming topic Family mark;
The result is issued and is handed over based on the common recognition mechanism between each node by each node for obtaining the result publication transaction Easily write-in block chain.
28. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, wherein the processor realizes such as the described in any item methods of claim 1~21 when executing described program.
CN201811260961.0A 2018-10-26 2018-10-26 Method and system for issuing programming question, issuing solution code and checking solution code Active CN109345392B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201811260961.0A CN109345392B (en) 2018-10-26 2018-10-26 Method and system for issuing programming question, issuing solution code and checking solution code
TW108109775A TWI706252B (en) 2018-10-26 2019-03-21 Programming question release, answer code release, answer code inspection method, device, system and computer equipment
PCT/CN2019/104897 WO2020082917A1 (en) 2018-10-26 2019-09-09 Methods and systems for publishing programming problem, publishing solution code, and checking solution code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811260961.0A CN109345392B (en) 2018-10-26 2018-10-26 Method and system for issuing programming question, issuing solution code and checking solution code

Publications (2)

Publication Number Publication Date
CN109345392A true CN109345392A (en) 2019-02-15
CN109345392B CN109345392B (en) 2020-06-23

Family

ID=65312467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811260961.0A Active CN109345392B (en) 2018-10-26 2018-10-26 Method and system for issuing programming question, issuing solution code and checking solution code

Country Status (3)

Country Link
CN (1) CN109345392B (en)
TW (1) TWI706252B (en)
WO (1) WO2020082917A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096435A (en) * 2019-04-09 2019-08-06 平安科技(深圳)有限公司 The automatic write method of code, device, computer equipment and storage medium
CN110944008A (en) * 2019-09-13 2020-03-31 腾讯科技(深圳)有限公司 Block chain-based task reward processing method, device, equipment and storage medium
WO2020082917A1 (en) * 2018-10-26 2020-04-30 阿里巴巴集团控股有限公司 Methods and systems for publishing programming problem, publishing solution code, and checking solution code
WO2021057070A1 (en) * 2019-09-23 2021-04-01 创新先进技术有限公司 Blockchain-based submission processing method, device, and electronic apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116032793B (en) * 2022-11-17 2024-04-02 中国联合网络通信集团有限公司 Information processing method, information processing device, electronic equipment and computer readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107622385A (en) * 2017-08-28 2018-01-23 南京邮电大学 A kind of copyright distributing method based on block chain intelligence contract
CN108550041A (en) * 2018-03-20 2018-09-18 深圳市元征科技股份有限公司 Protect the method, apparatus and terminal of original works
CN108615153A (en) * 2018-04-28 2018-10-02 百度在线网络技术(北京)有限公司 Processing method, device, system, equipment and the storage medium of block chain data

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180158347A1 (en) * 2015-06-07 2018-06-07 Protean LLC Educational Proficiency Development and Assessment System
EP3382637B1 (en) * 2015-11-24 2023-11-29 Sony Group Corporation Information processing device, information processing method, and program
GB201705749D0 (en) * 2017-04-10 2017-05-24 Nchain Holdings Ltd Computer-implemented system and method
CN108171493A (en) * 2017-11-14 2018-06-15 北京欧链科技有限公司 The data processing method and device of block chain
CN108111312B (en) * 2017-12-28 2019-09-27 电子科技大学 Intelligent terminal safety communication method based on block chain
CN108595535B (en) * 2018-03-30 2020-11-17 李欣宇 Knowledge question-answering system and method based on same-root double-chain block chain
CN108521456B (en) * 2018-04-01 2020-10-02 南京米好信息安全有限公司 Block chain-based network building competition system
CN109345392B (en) * 2018-10-26 2020-06-23 阿里巴巴集团控股有限公司 Method and system for issuing programming question, issuing solution code and checking solution code

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107622385A (en) * 2017-08-28 2018-01-23 南京邮电大学 A kind of copyright distributing method based on block chain intelligence contract
CN108550041A (en) * 2018-03-20 2018-09-18 深圳市元征科技股份有限公司 Protect the method, apparatus and terminal of original works
CN108615153A (en) * 2018-04-28 2018-10-02 百度在线网络技术(北京)有限公司 Processing method, device, system, equipment and the storage medium of block chain data

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020082917A1 (en) * 2018-10-26 2020-04-30 阿里巴巴集团控股有限公司 Methods and systems for publishing programming problem, publishing solution code, and checking solution code
CN110096435A (en) * 2019-04-09 2019-08-06 平安科技(深圳)有限公司 The automatic write method of code, device, computer equipment and storage medium
CN110096435B (en) * 2019-04-09 2023-08-08 平安科技(深圳)有限公司 Automatic code writing method, device, computer equipment and storage medium
CN110944008A (en) * 2019-09-13 2020-03-31 腾讯科技(深圳)有限公司 Block chain-based task reward processing method, device, equipment and storage medium
WO2021057070A1 (en) * 2019-09-23 2021-04-01 创新先进技术有限公司 Blockchain-based submission processing method, device, and electronic apparatus

Also Published As

Publication number Publication date
TWI706252B (en) 2020-10-01
TW202016778A (en) 2020-05-01
CN109345392B (en) 2020-06-23
WO2020082917A1 (en) 2020-04-30

Similar Documents

Publication Publication Date Title
CN109345392A (en) Program topic publication, the publication of answer code, answer code check method and system
CN109636384A (en) A kind of parallelization executes the method, apparatus and system of block chain transaction
CN108933713A (en) The method, apparatus and service server of sandbox debugging are realized based on shadow link
CN105873049B (en) A kind of method, equipment, system and storage medium for being used to share WAP
CN109977690A (en) A kind of data processing method, device and medium
CN106487603A (en) A kind of response test method and device
CN110113366A (en) A kind of detection method and device of CSRF loophole
CN106251085A (en) A kind of methods of risk assessment and device
CN107391142A (en) The method and device that a kind of application is split
CN107229559A (en) For the detection method and device of the test integrity degree of operation system
CN105939362A (en) User account management method and device
CN109213857A (en) A kind of fraud recognition methods and device
CN112560114B (en) Method and device for calling intelligent contract
CN110262977A (en) A kind of full link performance test method, calculates equipment and storage medium at device
CN109636597A (en) A kind of property execution method and system based on block chain
CN106201856A (en) A kind of multi version performance test methods and device
CN110517020A (en) The node of project development method and block chain network based on block chain network
CN106549964A (en) The method to set up and device of user right
CN109255600A (en) A kind of method and device for providing reward to works publisher based on block chain
CN108876188A (en) One inter-species even served business quotient's methods of risk assessment and device
CN109948038A (en) Question pushing method and device
CN117009626A (en) Service processing method, device, equipment and storage medium of game scene
Savoie Building successful information systems: Five best practices to ensure organizational effectiveness and profitability
CN109727040B (en) Data publishing method, data calling method, device and storage medium
CN107316190A (en) A kind of processing method and processing device of Internet resources transfer service

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40004374

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.

TR01 Transfer of patent right

Effective date of registration: 20240919

Address after: Guohao Times City # 20-01, 128 Meizhi Road, Singapore

Patentee after: Ant Chain Technology Co.,Ltd.

Country or region after: Singapore

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Innovative advanced technology Co.,Ltd.

Country or region before: Cayman Islands