CN109086968A - The method and apparatus for realizing common recognition algorithm - Google Patents

The method and apparatus for realizing common recognition algorithm Download PDF

Info

Publication number
CN109086968A
CN109086968A CN201810734334.XA CN201810734334A CN109086968A CN 109086968 A CN109086968 A CN 109086968A CN 201810734334 A CN201810734334 A CN 201810734334A CN 109086968 A CN109086968 A CN 109086968A
Authority
CN
China
Prior art keywords
working time
subcode
equivalent working
block code
equivalent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810734334.XA
Other languages
Chinese (zh)
Inventor
黄伟淦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Source Code Intelligent Technology Co Ltd
Original Assignee
Shenzhen Source Code Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Source Code Intelligent Technology Co Ltd filed Critical Shenzhen Source Code Intelligent Technology Co Ltd
Priority to CN201810734334.XA priority Critical patent/CN109086968A/en
Publication of CN109086968A publication Critical patent/CN109086968A/en
Pending legal-status Critical Current

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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Educational Administration (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Game Theory and Decision Science (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of method and apparatus for realizing common recognition algorithm, belong to technical field of communication network.The described method includes: obtaining block code is added the request of block chain;Obtain the equivalent working time for forming each subcode of the block code;It is that the owner of each subcode distributes corresponding reward value according to equivalent working time and reward value corresponding relationship is preset.Described device includes: the first acquisition module, the second acquisition module and the first distribution module.The present invention makes reasonable assessment by the labour that equivalent working time is the mankind, to provide return appropriate, makes common recognition algorithm more fair, there is the extensive use using block chain.

Description

The method and apparatus for realizing common recognition algorithm
Technical field
The present invention relates to technical field of communication network, in particular to a kind of method for realizing common recognition algorithm.
Background technique
Block chain technology (Blockchain technology, abbreviation BT), is also referred to as distributed account book technology, is A kind of internet database technology, its main feature is that it is decentralization, open and clear, allow everyone to each may participate in data-base recording.Most It is early the basic technology of bit coin, is studying all over the world at present, can be widely applied to each field such as finance.The base of block chain This concept includes: (1) transaction (Transaction): once-through operation leads to the primary change of account book state, such as one note of addition Record;(2) data block (Block): the transaction and state outcome occurred in record a period of time, is to the primary of current account book state Common recognition;(3) it chain (Chain): is connected in series by block one by one according to order of occurrence, is the log recording of entire state change.
In block catenary system, core mechanism is common recognition mechanism, how to reach common understanding between exactly all accounting nodes, goes Assert the validity of a record, this is both the means of identification, and prevents the means distorted.It is currently, there are a variety of common recognitions Algorithm, such as PoW (Proof of Work, proof of work), PoS (Proof of Stake, equity prove), DPoS (Delegate Proof of Stake, commission equity prove), PBFT (Practical Byzantine Fault Tolerance, practical Byzantine failure tolerance algorithm) etc..
However, in the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
Existing common recognition algorithm is all to rely on machine to provide as a result, machine is difficult in the case where having in real world very much Assessment appropriate is made to the labour of the mankind, also can not just provide return appropriate, does not utilize the extensive use of block chain.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides a kind of methods and dress for realizing common recognition algorithm It sets.The technical solution is as follows:
On the one hand, a kind of method for realizing common recognition algorithm is provided, which comprises
It obtains block code and the request of block chain is added;
Obtain the equivalent working time for forming each subcode of the block code;
It is that owner's distribution of each subcode is corresponding according to equivalent working time and reward value corresponding relationship is preset Reward value.
It is further, described to obtain the equivalent working time for forming each subcode of the block code, comprising:
According to equivalent working time calculation formula is preset, calculate separately to obtain the equivalent working time of each subcode Calculated value;
Judge whether the equivalent working time calculated value of each subcode is less than respectively and presets equivalent working time threshold Value;
If the equivalent working time calculated value of some subcode presets equivalent working time threshold value less than described, Using the equivalent working time calculated value of some subcode as the equivalent working time of subcode described in some;
If the equivalent working time calculated value of some subcode presets equivalent working time threshold more than or equal to described Value, then preset equivalent working time threshold value as the equivalent working time of subcode described in some for described.
It is further, described to preset equivalent working time calculation formula are as follows:
The degree-of-difficulty factor of the subcode, the subcode strength factor with the subcode corresponding complete duration Product.
Further, described to preset equivalent working time and with reward value corresponding relationship include:
In preset time range, per unit equivalent working time corresponding reward value;Wherein, when the equivalent labour of per unit Between corresponding reward value successively decrease over time.
Further, the acquisition block code is added before the request of block chain, further includes:
Community's common recognition test is carried out to the block code;
If the block code is known together by community and tested, sends and the request of block chain is added.
Further, described according to equivalent working time and reward value corresponding relationship is preset, it is each subcode The owner distributes after corresponding reward value, further includes:
According to preset reward allocation proportion, the owner of each subcode rewards each subcode accordingly Value distributes to default collaborator.
Further, after block chain is added in the block code, the method also includes:
Obtain the call instruction of the block code, and the reward value to call the block code to be paid, wherein For the reward value of calling the block code to be paid and the subcode all in the block code always etc. serve The dynamic time is corresponding;
By the reward value to call the block code to be paid, according to each subcode in the block code Equivalent working time distributes to the owner of each of the block code subcode.
On the other hand, a kind of device for realizing common recognition algorithm is provided, described device includes:
First obtains module, and the request of block chain is added for obtaining block code;
Second obtains module, for obtaining the equivalent working time for forming each subcode of the block code;
First distribution module, for being each filial generation according to equivalent working time and reward value corresponding relationship is preset The owner of code distributes corresponding reward value.
Further, the second acquisition module includes:
Computing unit, for calculating separately to obtain each subcode according to equivalent working time calculation formula is preset Equivalent working time calculated value;
Judging unit, for judging it is default etc. whether the equivalent working time calculated value of each subcode is less than respectively It serves dynamic time threshold;
First processing units, if the equivalent working time calculated value for subcode described in some be less than it is described default etc. It serves dynamic time threshold, then using the equivalent working time calculated value of some subcode as the equivalent of subcode described in some Working time;
The second processing unit, if the equivalent working time calculated value for subcode described in some is more than or equal to described pre- If equivalent working time threshold value, then equivalent working time threshold value is preset as when the equivalent labour of subcode described in some using described Between.
It is further, described to preset equivalent working time calculation formula are as follows:
The degree-of-difficulty factor of the subcode, the subcode strength factor with the subcode corresponding complete duration Product.
Further, described to preset equivalent working time and with reward value corresponding relationship include:
In preset time range, per unit equivalent working time corresponding reward value;Wherein, when the equivalent labour of per unit Between corresponding reward value successively decrease over time.
Further, described device further include:
Test module, for it is total to carry out community to the block code before obtaining the addition block chain request of block code Know test;
Sending module is tested if known together for the block code by community, sends and the request of block chain is added.
Further, described device further include:
Second distribution module, for according to preset reward allocation proportion, the owner of each subcode is by each institute It states the corresponding reward value of subcode and distributes to default collaborator.
Further, described device further include:
Processing module, for obtaining the call instruction of the block code after block chain is added in the block code, And the reward value to call the block code to be paid, wherein for the reward value of calling the block code to be paid and Total equivalent working time of all subcodes is corresponding in the block code;
Third distribution module, for that will be the reward value for calling the block code to be paid, according to the block code In each subcode equivalent working time, distribute to the owner of each of the block code subcode.
Technical solution provided in an embodiment of the present invention has the benefit that the labor by equivalent working time for the mankind It is dynamic to make reasonable assessment, to provide return appropriate, makes common recognition algorithm more fair, there is the extensive use using block chain. If the equivalent working time calculated value of some subcode, which is more than or equal to, presets equivalent working time threshold value, serve default etc. Dynamic equivalent working time of the time threshold as some subcode, it is ensured that the equivalent working time of each code is no more than one Fixed value avoids the attack of some malice, causes the equivalent working time an of code too long, and more reward values is obtained.? In preset time range, per unit equivalent working time corresponding reward value, wherein per unit equivalent working time corresponding prize It encourages value to successively decrease over time, if the total amount of reward value is fixed, over time, then reward value should be got over Come it is fewer, to the last, to ensure that the value of reward value.The reward value that will be paid by call area block code, according to area In the equivalent working time of each subcode in block code, distribute to the owner of each subcode of block code, it is ensured that When some service, other several services are relied on, these services can also obtain a part again in invoked procedure Income, likewise, each service, can all rely on the service of some bottoms, income distributes layer by layer, automatic running, guarantees to receive Benefit is finally assigned to relevant contributor.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of method flow diagram for realizing common recognition algorithm that the embodiment of the present invention one provides;
Fig. 2 is the method flow diagram of the first realization common recognition algorithm provided by Embodiment 2 of the present invention;
Fig. 3 is the second provided by Embodiment 2 of the present invention method flow diagram for realizing common recognition algorithm;
Fig. 4 is that provided by Embodiment 2 of the present invention the third realizes the method flow diagram of common recognition algorithm;
Fig. 5 is the 4th kind provided by Embodiment 2 of the present invention method flow diagram for realizing common recognition algorithm;
Fig. 6 is the 5th kind provided by Embodiment 2 of the present invention method flow diagram for realizing common recognition algorithm;
Fig. 7 is the apparatus structure schematic diagram for the first realization common recognition algorithm that the embodiment of the present invention three provides;
Fig. 8 is the apparatus structure schematic diagram for second of realization common recognition algorithm that the embodiment of the present invention three provides;
Fig. 9 is the apparatus structure schematic diagram for the third realization common recognition algorithm that the embodiment of the present invention three provides;
Figure 10 is the apparatus structure schematic diagram for the 4th kind of realization common recognition algorithm that the embodiment of the present invention three provides.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Embodiment one
The embodiment of the invention provides a kind of methods for realizing common recognition algorithm, referring to Fig. 1, this method comprises:
101: obtaining block code and the request of block chain is added.
102: obtaining the equivalent working time of each subcode of composition block code.
Wherein, the equivalent working time of each subcode of composition block code is obtained, comprising:
According to equivalent working time calculation formula is preset, the equivalent working time for calculating separately to obtain each subcode is calculated Value;
Judge whether the equivalent working time calculated value of each subcode is less than respectively and presets equivalent working time threshold value;
If the equivalent working time calculated value of some subcode, which is less than, presets equivalent working time threshold value, by certain height Equivalent working time of the equivalent working time calculated value of code as some subcode;
If the equivalent working time calculated value of some subcode, which is more than or equal to, presets equivalent working time threshold value, will be pre- If equivalent working time of the equivalent working time threshold value as some subcode.
Wherein, equivalent working time calculation formula is preset are as follows:
Degree-of-difficulty factor, the strength factor product for completing duration corresponding with subcode of subcode of subcode.
103: being that owner's distribution of each subcode is corresponding according to equivalent working time and reward value corresponding relationship is preset Reward value.
Wherein, presetting equivalent working time with reward value corresponding relationship includes:
In preset time range, per unit equivalent working time corresponding reward value;Wherein, when the equivalent labour of per unit Between corresponding reward value successively decrease over time.
Further, block code is obtained to be added before the request of block chain, further includes:
Community's common recognition test is carried out to block code;
If block code is known together by community and tested, sends and the request of block chain is added.
It further, is the owner point of each subcode according to equivalent working time and reward value corresponding relationship is preset After corresponding reward value, further includes:
According to preset reward allocation proportion, the owner of each subcode distributes to the corresponding reward value of each subcode Default collaborator.
Further, after block chain is added in block code, this method further include:
Obtain the call instruction of block code, and the reward value paid by call area block code, wherein be call area The reward value that block code is paid is corresponding with total equivalent working time of subcode all in block code;
The reward value that will be paid by call area block code, according in block code when the equivalent labour of each subcode Between, distribute to the owner of each subcode of composition block code.
The method of realization common recognition algorithm, is made by the labour that equivalent working time is the mankind described in the embodiment of the present invention Reasonable assessment makes common recognition algorithm more fair, there is the extensive use using block chain to provide return appropriate.If certain The equivalent working time calculated value of a subcode, which is more than or equal to, presets equivalent working time threshold value, then will preset equivalent working time Equivalent working time of the threshold value as some subcode, it is ensured that the equivalent working time of each code is no more than certain Value, avoids the attack of some malice, causes the equivalent working time an of code too long, and more reward values is obtained.Default In time range, per unit equivalent working time corresponding reward value, wherein per unit equivalent working time corresponding reward value Successively decrease over time, if the total amount of reward value is fixed, over time, then reward value should be increasingly It is few, to the last, to ensure that the value of reward value.The reward value that will be paid by call area block code, according to block generation In the equivalent working time of each subcode, distribute to the owner of each subcode of block code, it is ensured that when certain in code A service has relied on other several services, these services can also obtain the receipts of a part again in invoked procedure Benefit, likewise, each service, can all rely on the service of some bottoms, income distributes layer by layer, automatic running, guarantees income Finally it is assigned to relevant contributor.
Embodiment two
The embodiment of the invention provides a kind of methods for realizing common recognition algorithm, referring to fig. 2, this method comprises:
201: obtaining block code and the request of block chain is added.
Wherein, block chain will be added as data thereon in block code, and block code is referred to as source code (can be with It include the annotation, test cases, peer review result etc. of specification).
202: obtaining the equivalent working time of each subcode of composition block code.
Specifically, the new subcode that block code is write comprising the owner of block code, and may need to call Other owners subcode.Such as: block code includes new subcode A, and the subcode B called.
Wherein, referring to Fig. 3, the equivalent working time of each subcode of composition block code is obtained, comprising:
202a: according to presetting equivalent working time calculation formula, when calculating separately to obtain the equivalent labour of each subcode Between calculated value.
202b: judge whether the equivalent working time calculated value of each subcode is less than respectively and preset equivalent working time threshold Value executes 202c if the equivalent working time calculated value of some subcode, which is less than, presets equivalent working time threshold value;If The equivalent working time calculated value of some subcode, which is more than or equal to, presets equivalent working time threshold value, then executes 202d.
202c: using the equivalent working time calculated value of some subcode as the equivalent working time of some subcode, so After terminate.
202d: equivalent working time threshold value will be preset as the equivalent working time of some subcode, then terminated.
It should be noted that during specific implementation, can respectively cycle calculations judge to obtain each subcode etc. Imitate working time.
Wherein, equivalent working time calculation formula is preset are as follows:
Degree-of-difficulty factor, the strength factor product for completing duration corresponding with subcode of subcode of subcode.
Equivalent working time, mainly by three factors compositions: completing duration, degree-of-difficulty factor, strength factor.With a qualification Developer routine work as the benchmark of measurement, give one example:
Benchmark: the routine work of qualified developer
Task names: Bubble Sort Algorithm
Task definition: writing code, provides detailed annotation, provides adequately test case (example)
Degree-of-difficulty factor: 1
Strength factor: 1
Completion duration: 2 hours.One hour encodes and writes annotation, and half an hour provides test case (example), half small When complete test
Equivalent working time: 2*1*1=2
The equivalent working time of subcode can be limited to be no more than by 202a-202d and preset equivalent working time threshold Value, such as presetting equivalent working time threshold value is 2 hours, is also meaned that, the equivalent working time of a subcode is no more than 2 A hour.To guarantee that the reward value of each subcode there can be a limitation, can cause to avoid the attack of some malice One subcode obtains excessive reward value.
203: being that owner's distribution of each subcode is corresponding according to equivalent working time and reward value corresponding relationship is preset Reward value.
Specifically, reward value can be arranged according to concrete application scene is which kind of, such as can be token (token).
Wherein, presetting equivalent working time with reward value corresponding relationship includes:
In preset time range, per unit equivalent working time corresponding reward value;Wherein, when the equivalent labour of per unit Between corresponding reward value successively decrease over time.
Specific equivalent working time: it to specific industry or specific occupation, is substantially equal to industry and is averaged one hour labor output. Per unit equivalent working time corresponding reward value, such as: the corresponding reward of setting unit (one hour etc.) equivalent working time Value is 100 token.In addition, if token total amount is fixed, over time, then the reward of token should be got over Come fewer, for example, after 1 year, setting unit (one hour etc.) equivalent working time corresponding reward value is 50 token.
Further, referring to fig. 4, block code is obtained to be added before the request of block chain, further includes:
204: community's common recognition test is carried out to block code.
The submission and confirmation of block code, the time is long, needs to reach common understanding by community (referring generally to general group) Revival afterwards.For example, developer has submitted source code, just there is Test Engineer to fill out complete test cases after a period of time, so After begin with expert and independently evaluate, it is independent to give a mark, obtain certain amount (can be arranged according to practical application scene, such as 6) The code that the above expert approves, and it is without demur through publicity after a period of time in community, just start to be packed into block chain.
205: being tested if block code is known together by community, send and the request of block chain is added.
It further, is each subcode according to equivalent working time and reward value corresponding relationship is preset referring to Fig. 5 The owner distributes after corresponding reward value, further includes:
206: according to preset reward allocation proportion, the owner of each subcode divides the corresponding reward value of each subcode Dispensing presets collaborator.
Specifically, the owner of each subcode completes this subcode according to preset reward allocation proportion for collaboration The corresponding reward value of collaborator (including providing the people of data packaged service device) distribution.The ratio of distribution, can be common by community It determines, a preset reward allocation proportion can also be done by owner's (that is to say source code submitter) of subcode, and key exists It is ready to receive this preset reward allocation proportion in other collaborators.If nobody is ready to receive this preset reward distribution ratio Example, submitter will not receive awards value.
For example, one of preset reward allocation proportion:
A.40%, source code writes work
B.30%, the test job of source code, writing including test cases
C.10%, the mark work of source code
D.20%, the examination of source code, needs at least six, the opinion of the syndic no more than 10.Syndic is flat Divide income.
Further, referring to Fig. 6, after block chain is added in block code, this method further include:
207: obtaining the call instruction of block code, and the reward value paid by call area block code.
Wherein, the total etc. of the reward value paid by call area block code and subcode all in block code serves The dynamic time is corresponding.
When block code when called, can also obtain corresponding reward value.Because block code is when called, block The equivalent working time of all subcodes in code was computed, so caller can be readily available block code In all subcode total equivalent working time, be that block code pays reward value according to total equivalent working time.
208: the reward value that will be paid by call area block code, according to the equivalent labour of each subcode in block code Time distributes to the owner of each subcode of composition block code.
Subcode in block code can all distribute corresponding reward value in static completion stage and Dynamic Execution stage, In, it is that the owner of each subcode distributes the allocation plan of reward value in static completion stage and called Dynamic Execution stage It may be the same or different.
It is general to use static completion stage and called Dynamic Execution stage consistent allocation plan.Such as: a block The owner of code 1 (being made of subcode A and subcode B), develops subcode A, has invoked subcode B.Subcode A etc. Effect working time is 1token, and the equivalent working time of subcode B is 2token, after the static completion stage reaches common understanding, filial generation The owner of code A can obtain 1token, and the owner of subcode B can obtain 2token.When someone needed using block generation Code 1, call area block code 1 enter the Dynamic Execution stage, and the caller of block code 1 needs to pay 3token, 1token distribution Block code 1 (namely owner of subcode A) is given, 2token distributes to the owner of subcode B.
The method of realization common recognition algorithm, is made by the labour that equivalent working time is the mankind described in the embodiment of the present invention Reasonable assessment makes common recognition algorithm more fair, there is the extensive use using block chain to provide return appropriate.If certain The equivalent working time calculated value of a subcode, which is more than or equal to, presets equivalent working time threshold value, then will preset equivalent working time Equivalent working time of the threshold value as some subcode, it is ensured that the equivalent working time of each code is no more than certain Value, avoids the attack of some malice, causes the equivalent working time an of code too long, and more reward values is obtained.Default In time range, per unit equivalent working time corresponding reward value, wherein per unit equivalent working time corresponding reward value Successively decrease over time, if the total amount of reward value is fixed, over time, then reward value should be increasingly It is few, to the last, to ensure that the value of reward value.The reward value that will be paid by call area block code, according to block generation In the equivalent working time of each subcode, distribute to the owner of each subcode of block code, it is ensured that when certain in code A service has relied on other several services, these services can also obtain the receipts of a part again in invoked procedure Benefit, likewise, each service, can all rely on the service of some bottoms, income distributes layer by layer, automatic running, guarantees income Finally it is assigned to relevant contributor.
Embodiment three
Referring to Fig. 7, the embodiment of the invention provides a kind of device for realizing common recognition algorithm, which includes:
First obtains module 301, and the request of block chain is added for obtaining block code;
Second obtains module 302, the equivalent working time of each subcode for obtaining composition block code;
First distribution module 303, for being each subcode according to equivalent working time and reward value corresponding relationship is preset The owner distribute corresponding reward value.
Further, the second acquisition module 302 includes:
Computing unit, for according to presetting equivalent working time calculation formula, calculate separately to obtain each subcode etc. Imitate working time calculated value;
Judging unit, for judging whether the equivalent working time calculated value of each subcode is less than default etc. serve respectively Dynamic time threshold;
First processing units, if the equivalent working time calculated value for some subcode is less than equivalent labour is preset Between threshold value, then using the equivalent working time calculated value of some subcode as the equivalent working time of some subcode;
The second processing unit, if the equivalent working time calculated value for some subcode is more than or equal to default etc. serve Dynamic time threshold, then will preset equivalent working time threshold value as the equivalent working time of some subcode.
Further, equivalent working time calculation formula is preset are as follows:
Degree-of-difficulty factor, the strength factor product for completing duration corresponding with subcode of subcode of subcode.
Further, presetting equivalent working time with reward value corresponding relationship includes:
In preset time range, per unit equivalent working time corresponding reward value;Wherein, when the equivalent labour of per unit Between corresponding reward value successively decrease over time.
Further, referring to Fig. 8, device further include:
Test module 304, for carrying out community's common recognition to block code before obtaining the addition block chain request of block code Test;
Sending module 305 is tested if known together for block code by community, sends and the request of block chain is added.
Further, referring to Fig. 9, device further include:
Second distribution module 306, for according to preset reward allocation proportion, the owner of each subcode is by each filial generation The corresponding reward value of code distributes to default collaborator.
Further, referring to Figure 10, device further include:
Processing module 307 is used to obtain the call instruction of block code after block chain is added in block code, and The reward value paid by call area block code, wherein institute in the reward value and block code paid by call area block code Total equivalent working time of some subcodes is corresponding;
Third distribution module 308, the reward value for will be paid by call area block code, according to each in block code The equivalent working time of subcode distributes to the owner of each subcode of block code.
The device of realization common recognition algorithm, is made by the labour that equivalent working time is the mankind described in the embodiment of the present invention Reasonable assessment makes common recognition algorithm more fair, there is the extensive use using block chain to provide return appropriate.If certain The equivalent working time calculated value of a subcode, which is more than or equal to, presets equivalent working time threshold value, then will preset equivalent working time Equivalent working time of the threshold value as some subcode, it is ensured that the equivalent working time of each code is no more than certain Value, avoids the attack of some malice, causes the equivalent working time an of code too long, and more reward values is obtained.Default In time range, per unit equivalent working time corresponding reward value, wherein per unit equivalent working time corresponding reward value Successively decrease over time, if the total amount of reward value is fixed, over time, then reward value should be increasingly It is few, to the last, to ensure that the value of reward value.The reward value that will be paid by call area block code, according to block generation In the equivalent working time of each subcode, distribute to the owner of each subcode of block code, it is ensured that when certain in code A service has relied on other several services, these services can also obtain the receipts of a part again in invoked procedure Benefit, likewise, each service, can all rely on the service of some bottoms, income distributes layer by layer, automatic running, guarantees income Finally it is assigned to relevant contributor.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (14)

1. a kind of method for realizing common recognition algorithm, which is characterized in that the described method includes:
It obtains block code and the request of block chain is added;
Obtain the equivalent working time for forming each subcode of the block code;
It is the corresponding prize of owner's distribution of each subcode according to equivalent working time and reward value corresponding relationship is preset Encourage value.
2. the method according to claim 1, wherein described obtain each subcode for forming the block code Equivalent working time, comprising:
According to equivalent working time calculation formula is preset, the equivalent working time for calculating separately to obtain each subcode is calculated Value;
Judge whether the equivalent working time calculated value of each subcode is less than respectively and presets equivalent working time threshold value;
If the equivalent working time calculated value of some subcode presets equivalent working time threshold value less than described, by certain Equivalent working time of the equivalent working time calculated value of a subcode as subcode described in some;
If the equivalent working time calculated value of some subcode presets equivalent working time threshold value more than or equal to described, Equivalent working time threshold value is preset as the equivalent working time of subcode described in some using described.
3. according to the method described in claim 2, it is characterized in that, described preset equivalent working time calculation formula are as follows:
The degree-of-difficulty factor of the subcode, strength factor the complete duration corresponding with the subcode of the subcode multiply Product.
4. the method according to claim 1, wherein described preset equivalent working time and reward value corresponding relationship Include:
In preset time range, per unit equivalent working time corresponding reward value;Wherein, per unit equivalent working time pair The reward value answered is successively decreased over time.
5. the method according to claim 1, wherein the acquisition block code be added block chain request before, Further include:
Community's common recognition test is carried out to the block code;
If the block code is known together by community and tested, sends and the request of block chain is added.
6. the method according to claim 1, wherein described corresponding with reward value according to equivalent working time is preset Relationship is that the owner of each subcode distributes after corresponding reward value, further includes:
According to preset reward allocation proportion, the owner of each subcode divides each corresponding reward value of subcode Dispensing presets collaborator.
7. method according to any claim from 1 to 6, which is characterized in that when block is added in the block code After chain, the method also includes:
Obtain the call instruction of the block code, and the reward value to call the block code to be paid, wherein to adjust In the reward value paid with the block code and the block code when total equivalent labour of all subcodes Between it is corresponding;
To be the reward value of calling the block code to be paid, according in the block code each subcode it is equivalent Working time distributes to the owner of each of the block code subcode.
8. a kind of device for realizing common recognition algorithm, which is characterized in that described device includes:
First obtains module, and the request of block chain is added for obtaining block code;
Second obtains module, for obtaining the equivalent working time for forming each subcode of the block code;
First distribution module, for being each subcode according to equivalent working time and reward value corresponding relationship is preset The owner distributes corresponding reward value.
9. the apparatus according to claim 1, which is characterized in that described second, which obtains module, includes:
Computing unit, for according to presetting equivalent working time calculation formula, calculate separately to obtain each subcode etc. Imitate working time calculated value;
Judging unit, for judging whether the equivalent working time calculated value of each subcode is less than default etc. serve respectively Dynamic time threshold;
First processing units, if the equivalent working time calculated value for subcode described in some is less than described default etc. serve Dynamic time threshold, then using the equivalent working time calculated value of some subcode as the equivalent labour of subcode described in some Time;
The second processing unit, if the equivalent working time calculated value for subcode described in some be more than or equal to it is described default etc. It serves dynamic time threshold, then presets equivalent working time threshold value as the equivalent working time of subcode described in some for described.
10. device according to claim 9, which is characterized in that described to preset equivalent working time calculation formula are as follows:
The degree-of-difficulty factor of the subcode, strength factor the complete duration corresponding with the subcode of the subcode multiply Product.
11. device according to claim 8, which is characterized in that described to preset pass corresponding with reward value of equivalent working time System includes:
In preset time range, per unit equivalent working time corresponding reward value;Wherein, per unit equivalent working time pair The reward value answered is successively decreased over time.
12. device according to claim 8, which is characterized in that described device further include:
Test module, for carrying out community's common recognition to the block code and surveying before obtaining the addition block chain request of block code Examination;
Sending module is tested if known together for the block code by community, sends and the request of block chain is added.
13. device according to claim 8, which is characterized in that described device further include:
Second distribution module, for according to preset reward allocation proportion, the owner of each subcode is by each son The corresponding reward value of code distributes to default collaborator.
14. device described in -13 any claims according to claim 1, which is characterized in that described device further include:
Processing module is used to obtain the call instruction of the block code after block chain is added in the block code, and For the reward value for calling the block code to be paid, wherein the reward value paid for the calling block code with it is described Total equivalent working time of all subcodes is corresponding in block code;
Third distribution module, for that will be the reward value for calling the block code to be paid, according to every in the block code The equivalent working time of a subcode distributes to the owner of each of the block code subcode.
CN201810734334.XA 2018-07-06 2018-07-06 The method and apparatus for realizing common recognition algorithm Pending CN109086968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810734334.XA CN109086968A (en) 2018-07-06 2018-07-06 The method and apparatus for realizing common recognition algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810734334.XA CN109086968A (en) 2018-07-06 2018-07-06 The method and apparatus for realizing common recognition algorithm

Publications (1)

Publication Number Publication Date
CN109086968A true CN109086968A (en) 2018-12-25

Family

ID=64837009

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810734334.XA Pending CN109086968A (en) 2018-07-06 2018-07-06 The method and apparatus for realizing common recognition algorithm

Country Status (1)

Country Link
CN (1) CN109086968A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905224A (en) * 2019-12-04 2021-06-04 阿里巴巴集团控股有限公司 Time-consuming determination method, device and equipment for code review

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760152A (en) * 2012-04-05 2012-10-31 中国人民解放军国防科学技术大学 Automated open-source software quality evidence extraction method
CN106408190A (en) * 2016-09-20 2017-02-15 浙江工业大学 Software project core developer evaluation method based on file association network
CN108241926A (en) * 2017-08-25 2018-07-03 杭州复杂美科技有限公司 Authorize the block chain scheme of common recognition algorithm
US20180189732A1 (en) * 2017-01-05 2018-07-05 International Business Machines Corporation Blockchain for program code credit and programmer contribution in a collective

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760152A (en) * 2012-04-05 2012-10-31 中国人民解放军国防科学技术大学 Automated open-source software quality evidence extraction method
CN106408190A (en) * 2016-09-20 2017-02-15 浙江工业大学 Software project core developer evaluation method based on file association network
US20180189732A1 (en) * 2017-01-05 2018-07-05 International Business Machines Corporation Blockchain for program code credit and programmer contribution in a collective
CN108241926A (en) * 2017-08-25 2018-07-03 杭州复杂美科技有限公司 Authorize the block chain scheme of common recognition algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱志文: "《Node.js区块链开发》", 31 May 2017 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905224A (en) * 2019-12-04 2021-06-04 阿里巴巴集团控股有限公司 Time-consuming determination method, device and equipment for code review
CN112905224B (en) * 2019-12-04 2024-04-30 阿里巴巴集团控股有限公司 Time-consuming determination method, device and equipment for code review

Similar Documents

Publication Publication Date Title
Merna et al. Bid evaluation for UK public sector construction contracts.
Dopuch et al. Negligence versus strict liability regimes in auditing: An experimental investigation
US8438117B2 (en) Method and system for managing service levels provided by service providers
CN107240018A (en) A kind of method and system for being used to pay tranaction costs in block chain network
CN108681963A (en) Multi-tiling chain integral traffic control method, system, electronic device and storage medium
CN112669019A (en) Engineering data automatic filing method based on engineering quantity list and quality inspection data correlation interaction
CN108681887A (en) The green asset management system based on Internet of Things and block chain
CN107895324A (en) Insurance examination & verification apparatus and method
JP4405415B2 (en) Power transaction evaluation support system and method, program, server, and terminal
CN107563828A (en) Full statement of expense generation method, device, storage medium and computer equipment
CN111798230A (en) Block chain based staged payment method, device and equipment
CN108960794A (en) A kind of block generation method and block generate system
CN111754200A (en) Service processing method and device
CN113256299A (en) System and method for automatically generating risk examination order and auditing mechanism
CN109086968A (en) The method and apparatus for realizing common recognition algorithm
CN106250314A (en) A kind of test data capture method and system
CN110619563A (en) Salary management system operated by mobile phone
CN115689629A (en) Block link point excitation method and device, electronic equipment and storage medium
Symons Software industry performance: What you measure is what you get
CN1394316A (en) Contest article evaluation method
CN109146724A (en) Output value accounting method, device and computer readable storage medium
Frank et al. Portfolio analysis for a bundle of projects
CN110704533A (en) False news monitoring method based on block chain and voting mechanism
Collins et al. Analysis of life company financial performance
US20230206337A1 (en) Energy trading system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181225