CN110688410A - Suggestion processing method and device based on block chain and electronic equipment - Google Patents

Suggestion processing method and device based on block chain and electronic equipment Download PDF

Info

Publication number
CN110688410A
CN110688410A CN201910898488.7A CN201910898488A CN110688410A CN 110688410 A CN110688410 A CN 110688410A CN 201910898488 A CN201910898488 A CN 201910898488A CN 110688410 A CN110688410 A CN 110688410A
Authority
CN
China
Prior art keywords
question
answer
user
target
block chain
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
CN201910898488.7A
Other languages
Chinese (zh)
Other versions
CN110688410B (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.)
Advanced Nova Technology Singapore Holdings 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 CN201910898488.7A priority Critical patent/CN110688410B/en
Publication of CN110688410A publication Critical patent/CN110688410A/en
Priority to TW109116539A priority patent/TW202113738A/en
Priority to PCT/CN2020/093896 priority patent/WO2021057070A1/en
Application granted granted Critical
Publication of CN110688410B publication Critical patent/CN110688410B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application provides a block chain-based proposal processing method and device and electronic equipment. The method comprises the following steps: responding to a target proposal initiated by a first user, and analyzing the target proposal to obtain a question proposed by the first user and a candidate answer of the question; inquiring whether a block chain records a given answer of the question; if the query is hit, rejecting the target offer and/or feeding back a given answer to the question of the blockchain record to the first user; if the query is not hit, initiating a multi-party consensus for the target proposal to a plurality of blockchain nodes of the blockchain, accepting the target proposal after the multi-party consensus passes, and recording the candidate answer as a given answer of the question into the blockchain.

Description

Suggestion processing method and device based on block chain and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of block chains, in particular to an offer processing method and device based on a block chain and electronic equipment.
Background
A distributed system is a system consisting of multiple, independent nodes (e.g., servers, processing units, etc.) that are geographically and physically distributed. The nodes are connected together to enable the use of different resources. For a distributed system, a plurality of nodes in the system run in parallel, and at the same time, a plurality of nodes or a plurality of processes of the same node may exist to initiate concurrent occupation of the same resource, which may cause various abnormal conditions if not controlled in order. To take a simple example: in a distributed system providing airline ticket ordering service, if a user a and a user B purchase airline tickets of the same seat of the same flight, a problem of resource mutual exclusion occurs, which causes phenomena such as airline ticket unsubscribing or damage of a process of purchasing airline tickets by the user a and the user B.
In response to the above problem, the current solution is to refer to distributed locks to control the concurrent access of the same resource in order. In particular, when the same resource is accessed by multiple processes, only the process that obtains the distributed lock for the resource can access. The distributed lock is a program developed in a certain application scene for a distributed system independently, has complex logic and no general applicability, and is not easy to build and maintain. In view of the above, how to implement lock service in a distributed system in a simpler manner is a technical problem that needs to be solved urgently at present.
Disclosure of Invention
The embodiment of the application aims to provide a block chain-based proposal processing method, a block chain-based proposal processing device and electronic equipment, which can realize lock service in a distributed system in a simple mode.
In order to achieve the above purpose, the embodiments of the present application are implemented as follows:
in a first aspect, a proposed processing method based on a blockchain is provided, including:
responding to a target proposal initiated by a first user, and analyzing the target proposal to obtain a question proposed by the first user and a candidate answer of the question;
inquiring whether a block chain records a given answer of the question;
if the query is hit, rejecting the target offer and/or feeding back a given answer to the question of the blockchain record to the first user;
if the query is not hit, initiating a multi-party consensus for the target proposal to a plurality of blockchain nodes of the blockchain, accepting the target proposal after the multi-party consensus passes, and recording the candidate answer as a given answer of the question into the blockchain.
In a second aspect, there is provided a block chain-based proposal processing apparatus, comprising:
the analysis module is used for responding to a target proposal initiated by a first user and analyzing the target proposal to obtain a question proposed by the first user and a candidate answer of the question;
the query module is used for querying whether the block chain records the established answer of the question;
a first offer processing module, rejecting the target offer and/or feeding back an established answer to the question of the blockchain record to the first user if the query hits;
and the second proposal processing module initiates multi-party consensus aiming at the target proposal to a plurality of blockchain nodes of the blockchain if the query is not hit, accepts the target proposal after the multi-party consensus passes, and records the candidate answer as a given answer of the question into the blockchain.
In a third aspect, an electronic device is provided that includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being executed by the processor to:
responding to a target proposal initiated by a first user, and analyzing the target proposal to obtain a question proposed by the first user and a candidate answer of the question;
inquiring whether a block chain records a given answer of the question;
if the query is hit, rejecting the target offer and/or feeding back a given answer to the question of the blockchain record to the first user;
if the query is not hit, initiating a multi-party consensus for the target proposal to a plurality of blockchain nodes of the blockchain, accepting the target proposal after the multi-party consensus passes, and recording the candidate answer as a given answer of the question into the blockchain.
In a fourth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, performs the steps of:
responding to a target proposal initiated by a first user, and analyzing the target proposal to obtain a question proposed by the first user and a candidate answer of the question;
inquiring whether a block chain records a given answer of the question;
if the query is hit, rejecting the target offer and/or feeding back a given answer to the question of the blockchain record to the first user;
if the query is not hit, initiating a multi-party consensus for the target proposal to a plurality of blockchain nodes of the blockchain, accepting the target proposal after the multi-party consensus passes, and recording the candidate answer as a given answer of the question into the blockchain.
The scheme of the embodiment of the application adopts a block chain to record the questions and the corresponding established answers. If the user proposes an existing question and corresponding candidate answer, the corresponding answer may be queried from the blockchain to decide whether to accept the user proposal. If the user proposes a completely new question and corresponding candidate answer, the multi-party consensus technique of the blockchain can be used to determine whether to accept the user proposal, and after acceptance, the candidate answer proposed by the user is recorded as the predetermined answer to the proposed question in the blockchain. In practical applications, resource occupation of a distributed system can be abstracted into a question of whether a resource can be occupied or not and an answer of who the resource is occupied or the resource is occupied. Obviously, in this way, the blockchain has a unique and valid given answer to a question record, so that the function of the distributed lock can be realized by deciding whether to accept the occupation proposal initiated by the user on the resource by the blockchain. On one hand, the block chain is an existing database structure, and a distributed lock program does not need to be separately developed and maintained for a distributed system, so that the implementation cost can be reduced, and the universality can be improved. On the other hand, the given answer of the multi-party consensus decision problem can decentralize the distributed system and ensure the fairness of proposal application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative efforts.
Fig. 1 is a first flowchart of a proposed processing method according to an embodiment of the present application.
Fig. 2 is a second flowchart of the proposed processing method according to the embodiment of the present application.
Fig. 3 is a schematic structural diagram of a proposed processing apparatus according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As previously described, existing distributed systems reference distributed locks to prevent conflicts or interference that arise from different processes accessing the same resource at the same time. And the distributed lock has complex logic, is not easy to build and maintain, and has lower practicability. To this end, the present application aims to provide a technical solution for implementing lock services in a distributed system in a simpler manner.
Fig. 1 is a flowchart of a proposed processing method based on a blockchain according to an embodiment of the present application. The method shown in fig. 1 may be performed by a corresponding apparatus, comprising:
step S102, analyzing the target proposal based on the target proposal initiated by the first user to obtain a question proposed by the first user and a candidate answer of the question.
Wherein the target offer carries the question and the candidate answer. The goal proposal may include, but is not limited to: an offer of a first user to occupy the target resource. The questions obtained by the corresponding analysis may include: "is the target resource occupied? ". For "is the target resource occupied? "the candidate answer may include: "the first user occupies the target resource".
For ease of understanding, this step is exemplarily described below:
when the first user needs to occupy the target resource, a proposal of 'whether I (the first user) can occupy the target resource' can be initiated. This step performs semantic analysis on "i (the first user) can occupy the target resource", and determines that the question proposed by the first user is "whether the target resource is occupied" and the candidate answer proposed by the first user (if the target resource is not occupied) i occupy the target resource ".
It should be understood that the manner of analyzing the questions and answers may be determined by the services actually provided by the distributed system, and the embodiments of the present application are not particularly limited, as they are not exclusive.
Step S104, inquiring whether the block chain records the established answer of the question.
Wherein the distributed system records the established answers to the questions that have been previously determined through the blockchain. Specifically, this step may store the determined given answer in association with the corresponding question in a block of the block chain.
Also by way of introduction, the example given in step S102:
if the target resource is already occupied before the first user initiates the target offer, the block chain records the occupation status of the target resource. The occupied status is the predetermined answer to "whether the target resource is occupied or not".
Step S106, if the query is hit, the target offer is rejected.
In the embodiment of the present application, a question corresponds to only one valid answer, i.e., a given answer. Obviously, if there is a given answer to the question proposed by the first user, the first user-initiated offer of the goal cannot be adopted any more.
Also by way of introduction, the example given in step S102:
if the blockchain already has "is the target resource occupied? The "given answer may indicate that other users have preempted occupation of the target resource, and in consideration of mutual exclusivity of occupation of the target resource, the target offer initiated by the first user should be rejected, or on the premise that occupation of the target resource by the first user is not accepted, the" target resource occupied "information is notified to the first user.
In addition, the step may also feed back the given answer to the block chain recorded question to the first user after the query hits.
Step S108, if the query is not hit, a plurality of party consensus aiming at the target proposal is initiated to a plurality of block chain nodes of the block chain.
It should be understood that the goal of multi-party consensus is that the plurality of blockchain nodes agree on a target offer made by the first user, and if not, the candidate answer made by the first user is not approved, and the target offer made by the first user may be rejected. If consensus is achieved, it means that the candidate answer proposed by the first user is approved, so the candidate answer is recorded as the given answer to the question in the target proposal in the blockchain.
Also by way of introduction, the example given in step S102:
if the block chain does not inquire the given answer, the target resource is not occupied, and at the moment, a plurality of block chain nodes perform multi-party consensus on whether the first user can occupy the target resource. And if the multi-party consensus passes, the first user is accepted to occupy the target resource. And if the multi-party consensus fails, the first user is rejected from occupying the target resource.
Step S110, if the multiple parties agree, the target offer is accepted, and the candidate answer is recorded as the predetermined answer to the question in the block chain.
Also by way of introduction, the example given in step S102:
if the plurality of block link points recognize that the first user occupies the target resource, the step stores the target resource occupied by the first user as a given answer to whether the target resource can be occupied or not in the block chain. When the other users initiate the proposal for occupying the target resource, the method can inquire that the target resource is occupied (by the first user) from the block chain, thereby rejecting the proposal for occupying the target resource initiated by other users.
Based on the proposed processing method shown in fig. 1, it can be known that: the scheme of the embodiment of the application adopts a block chain to record the questions and the corresponding established answers. If the user proposes an existing question and corresponding candidate answer, the corresponding answer may be queried from the blockchain to decide whether to accept the user proposal. If the user proposes a completely new question and corresponding candidate answer, the multi-party consensus technique of the blockchain can be used to determine whether to accept the user proposal, and after acceptance, the candidate answer proposed by the user is recorded as the predetermined answer to the proposed question in the blockchain. In practical applications, resource occupation of a distributed system can be abstracted into a question of whether a resource can be occupied or not and an answer of who the resource is occupied or the resource is occupied. Obviously, in this way, the blockchain has a unique and valid given answer to a question record, so that the function of the distributed lock can be realized by deciding whether to accept the occupation proposal initiated by the user on the resource by the blockchain. On one hand, the block chain is an existing database structure, and a distributed lock program does not need to be separately developed and maintained for a distributed system, so that the implementation cost can be reduced, and the universality can be improved. On the other hand, the given answer of the multi-party consensus decision problem can decentralize the distributed system and ensure the fairness of proposal application.
Optionally, on the basis of the above, the user who is selected as the given answer after the proposal can edit or delete the given answer recorded in the blockchain. That is, the method of the embodiment of the present application further includes:
and step S112, judging whether the block chain records the established answer of the question and whether the established answer is proposed by a third user or not based on the editing request or the deleting request for the question initiated by the second user.
In step S114, if the blockchain record has the predetermined answer to the above-mentioned question and the predetermined answer is proposed by the third user, a function for editing or deleting the predetermined answer of the blockchain record is activated to the third user.
Taking target resource occupation as an example, the user selected as the given answer after the proposal is the user occupying the target resource, and if the user does not want to continuously occupy the target resource, the user can actively delete the given answer recorded in the block chain through operation, so that the target resource returns to the idle state again and can be used by other users.
Furthermore, it may be time consuming for a user to occupy resources in a distributed system. In the method of the embodiment, after the candidate answer is recorded in the blockchain as the given answer of the question, the validity of the given answer for the question is periodically judged, and after the given answer for the question is judged to be invalid, the given answer of the question recorded in the blockchain is deleted.
Taking target resource occupation as an example, the effective duration of target resource occupation by a certain user is one week, and when the occupation time reaches one week, the method of the embodiment of the application can actively delete the established answer in the block chain aiming at the occupied target resource, so that the target resource is in an idle state.
The method of the embodiments of the present application is described in detail below.
The method of the embodiment of the application realizes the function of the distributed lock by using the block chain. Specifically, resource occupation (or resource access) is abstracted into a question and an answer, and the only effective given answer of the question is determined and recorded through multi-party consensus of the block chain. When a user initiates an occupation proposal for a certain resource, the abstract extracts the question proposed by the user and tries to inquire the established answer of the question from the block chain. If the query hits, a decision is made whether to accept the user-initiated offer based on a given answer. If the query is not hit, whether the user's proposal is accepted or not is determined by a multi-party consensus of the blockchain, and after the acceptance, candidate answers proposed by the user are recorded into the blockchain as the given answer of the proposed question.
The execution subject of the method can be, but is not limited to, any node in the distributed system. As a possible solution, the nodes in the distributed system also act as blockchain nodes in the blockchain to participate in multi-party consensus.
The corresponding execution flow is shown in fig. 2, and includes:
step S201, a target offer for occupying a target resource initiated by a first user is received.
Step S202, analyzing the target proposal, and determining a question proposed by the first user and a candidate answer corresponding to the question.
In this step, the first user's intent in the goal offer may be determined to determine the question and corresponding candidate answer suggested by the first user. Obviously, the first user's intention to initiate a target offer is to occupy the target resource, so the question that the first user proposes may be, but is not limited to, "is the target resource occupied? "the corresponding candidate answer (the first user's requirement) may be, but is not limited to," target resource occupied by the first user ".
Step S203, determine whether the block chain records a predetermined answer of "whether the target resource is occupied". If yes, go to step S204; otherwise, step S205 is executed.
Step S204, rejecting the target offer initiated by the first user, and/or feeding back the established answer of "whether the target resource is occupied" recorded in the blockchain to the first user.
As previously described, a query hit indicates that the offer of the other user to occupy the target resource has been previously accepted, and thus the first user may be directly denied initiation of the offer.
Alternatively, the given answer may feed back more information, such as which user occupied the target resource and/or the effective time of occupying the target resource. After the first user receives the given answer, the first user can know the occupation condition of the target resource, so that the proposal of occupying the target resource can be sent again when the first user needs to follow.
Step S205, connecting target block chain nodes in the block chain, and initiating multi-party consensus for the target proposal to a plurality of block chain nodes of the block chain.
Wherein, the nodes of the distributed system can be regarded as blockchain nodes in the blockchain. Therefore, in this step, it can be taken charge of the nodes of the distributed system to achieve multi-party consensus for the goal proposal.
Step S206, judging whether the multi-party consensus passes. If yes, go to step S207; otherwise, step S210 is executed.
Step S207, determine whether the target block chain node is selected as the accounting node in the block chain. If yes, go to step S208; otherwise, step S209 is executed.
In step S208, a block in which the candidate answer is recorded as the given answer to the question is added to the sub-block chain corresponding to the target block chain link point, and the block is broadcasted to other block chain nodes in the block chain.
Specifically, the tile header of the tile may be configured with an index field for retrieving a given answer. As one of the possible solutions: the method of the embodiment of the application can compile the problem into a character string, and the character string is used as an index field of the block header. Correspondingly, the given answer may have a composition structure of string + answer content.
In step S209, a block recorded with a candidate answer as a given answer to the question broadcasted by other nodes in the block chain is received, and the block is added to the sub-block chain corresponding to the target block link point.
Step S210, rejecting the target offer initiated by the first user, and informing the first user that the target offer is not approved.
In practical application, a complex system may have a plurality of common recognition problems in different fields and requirements, so as to facilitate expansion and management, prevent the problems and answers in different fields from being mixed up, and perform spatialization on the problems in a block chain. That is, the method of the embodiment of the present application records the question, the given answer of the question, and the category association of the question into the blockchain after determining the given answer of the question. The category of the question serves as an index to retrieve the given answer to the question recorded in the blockchain.
By way of example, mention may be made of:
assuming that the first user-initiated goal proposal is "weekend team up to climb mountain", the question may be "what is done on weekend? "the category of the question is" group building "and the candidate answer to the proposed question is" weekend go to mountain climbing ". If by multi-party consensus, by goal proposition, the question "what is done on weekends? Three dimensions of 'building a group' by the question type and 'climbing on weekends' by the given answer are associated and recorded to the block chain to form a spatial data structure.
Subsequently, when a given answer of 'what is done on weekends' is searched, the question type 'group building' can be specifically introduced to serve as a search field, and therefore 'mountain climbing on weekends' can be accurately found.
Similarly, assuming that the first user-initiated goal offer is "shift over weekends to train" the question may be "what is done on weekends? "the category of the question is" overtime "and the candidate answer to the proposed question is" weekend to train ". If by multi-party consensus, by goal proposition, the question "what is done on weekends? Three-dimensional association records of the question type 'overtime' and the given answer 'weekend training' are recorded in a block chain, and a spatial data result is formed.
Subsequently, when a given answer of 'what is done on weekends' is searched, the question type 'overtime' can be specifically introduced to serve as a search field, so that the overtime answer of 'training on weekends' can be accurately found, and the overtime answer of 'mountain climbing on weekends' is not built.
The foregoing is a description of the principles of the method of embodiments of the present application. It will be appreciated that appropriate modifications may be made without departing from the principles outlined herein, and such modifications are intended to be included within the scope of the embodiments herein. For example, any proposal composed of questions and answers is applicable to the method of the embodiment of the present application, wherein the solution of the resource occupation problem of the distributed system described above is only one of the technical effects achieved by the solution.
The method of the embodiment of the present application is described in detail below with reference to an actual application scenario.
In the present application scenario, the distributed system opens different kinds of user interfaces to the user, such as: a hypertext transfer protocol interface, a remote procedure call protocol interface, a software development kit interface and the like, so as to provide the airline ticket ordering service for the user.
Assuming that user a wishes to purchase an airline ticket at the L01 seat of CA01 No. 2019-2-4, an offer of "i am my be able to occupy the L01 seat of CA01 No. 2019-2-4" may be initiated through any of the interfaces described above.
For the distribution system, different interfaces correspond to different ticket purchasing platforms, and other users can purchase airplane tickets with an L01 seat of CA01 No. 2019-2-4 through any ticket purchasing platform. Assuming that user a initiates a proposal of "i am a possibility to occupy the L01 seat of CA01 No. 2019-2-4" through a web browser (i.e., a hypertext transfer protocol interface), the node of the web browser needs to determine the occupancy state of the L01 seat of CA01 No. 2019-2-4.
Specifically, the nodes of the web browser may abstract the offer of "who may possess the L01 seat of CA01 No. 2019-2-4" initiated by user a as a question of whether the L01 seat of CA01 No. 2019-2-4 is occupied or not, and a candidate answer of "user a occupies the L01 seat of CA01 No. 2019-2-4".
It should be understood that "user a occupies the L01 seat of CA01 No. 2019-2-4" is proposed by user a for purchasing airline tickets and is not the only answer to "who can occupy the L01 seat of CA01 No. 2019-2-4". For other users who purchase the same airline ticket, the candidate answer for the offer may be "other users have an L01 seat of CA01 No. 2019-2-4". For the present application scenario, it is necessary to determine from these candidate answers a single valid answer as the "who can possess the L01 seat of CA01 No. 2019-2-4".
After abstractly acquiring the question and the candidate answer, the node of the web browser queries the established answer of 'who can possess the L01 seat of the CA01 No. 2019-2-4' from the blockchain.
This inquiry process is used to inform user a whether or not an airline ticket of L01 seat of CA01 No. 2019-2-4 can be purchased.
If the query hits, indicating that the L01 seat of 2019-2-4 CA01 is occupied, user a is informed of the result of failing to purchase an airline ticket for the L01 seat of 2019-2-4 CA 01.
If the inquiry is not hit, a multi-party consensus of whether the user A can purchase airplane tickets of an L01 seat with the number of 2019-2-4 CA01 needs to be initiated to other ticket purchasing platforms. This multiparty consensus process can equitably verify whether user a is eligible to purchase airline tickets for the L01 seat of CA01, No. 2019-2-4.
Once the multiple parties agree, the other ticketing platforms are indicated to approve the proposal that the user a purchases the airline tickets of the L01 seat of the 2019-2-4 CA01, and take the candidate answer of the "user a occupies the L01 seat of the 2019-2-4 CA 01" proposed by the user a as the given answer of the "who can occupy the L01 seat of the 2019-2-4 CA 01". Based on the data uplink mechanism of the block chain, the block chain link point responsible for accounting generates a block recording the given answer, and all ticket purchasing platforms add the block in the respective sub-block chain.
Once the established answer for user a having an L01 seat of 2019-2-4 CA01 is successfully linked up, no other user, regardless of which ticketing platform the offer to purchase airline tickets at the L01 seat of 2019-2-4 CA01 was initiated through, will be passed through.
Further, user a, as an occupant of the L01 seat of 2019-2-4 CA01, has a record of "who can possess the L01 seat of 2019-2-4 CA 01? "right to re-edit. For example, user A may initiate a ticket refund operation, removing the given answer of "user A occupies the L01 seat of 2019-2-4 CA 01" from the blockchain, thereby freeing up the resources of the L01 seat of 2019-2-4 CA 01.
In addition, if user a does not initiate a refund, after the 2019-2-4 CA01 flight ends, the airline tickets purchased by user a no longer have a time limit, and the distributed system may delete the established answer recorded in the blockchain that user a occupies the L01 seat of 2019-2-4 CA 01.
In addition, other users can also inquire whether the L01 seat of the 2019-2-4 CA01 is occupied or not from the blockchain through the interface of any ticket buying platform.
In summary, the method of the embodiment of the present application realizes the lock service of the distributed system by the block chain technology. The multi-party consensus algorithm through the block chain can ensure that the user proposal can be processed fairly, and when less than half of the block chain nodes are unavailable, the multi-party consensus can be normally executed. In addition, the user proposal can be abstracted into questions and answers in most application scenes, so that the scheme of the embodiment of the application has high universality and is convenient for a distributed system to expand new service capability. In addition, a user can initiate a proposal through any platform interface provided by the distributed system, and the block chain link points built in the block chain by each platform interface are extremely flexible, so that the scheme implementation has higher practicability.
Corresponding to the above method, as shown in fig. 3, an embodiment of the present application further provides an information feedback apparatus 300 based on a block chain, including:
an offer analysis module 310, which analyzes a target offer based on the target offer initiated by a first user to obtain a question proposed by the first user and a candidate answer of the question; wherein the goal offer carries the question and the candidate answer.
Answer query module 320, if the query hits, rejects the goal offer.
The first suggestion processing module 330 rejects the target suggestion and/or feeds back the given answer to the question of the blockchain record to the first user if the query hits.
The second offer processing module 340, if the query is not hit, initiates a multi-party consensus for the target offer to a plurality of blockchain nodes of the blockchain.
The data uplink module 350 accepts the target offer if the multi-party consensus passes, and records the candidate answer as the predetermined answer to the question in the block chain.
Based on the proposal processing apparatus shown in fig. 3, it can be known that: the scheme of the embodiment of the application adopts a block chain to record the questions and the corresponding established answers. If the user proposes an existing question and corresponding candidate answer, the corresponding answer may be queried from the blockchain to decide whether to accept the user proposal. If the user proposes a completely new question and corresponding candidate answer, the multi-party consensus technique of the blockchain can be used to determine whether to accept the user proposal, and after acceptance, the candidate answer proposed by the user is recorded as the predetermined answer to the proposed question in the blockchain. In practical applications, resource occupation of a distributed system can be abstracted into a question of whether a resource can be occupied or not and an answer of who the resource is occupied or the resource is occupied. Obviously, in this way, the blockchain has a unique and valid given answer to a question record, so that the function of the distributed lock can be realized by deciding whether to accept the occupation proposal initiated by the user on the resource by the blockchain. On one hand, the block chain is an existing database structure, and a distributed lock program does not need to be separately developed and maintained for a distributed system, so that the implementation cost can be reduced, and the universality can be improved. On the other hand, the given answer of the multi-party consensus decision problem can decentralize the distributed system and ensure the fairness of proposal application.
Alternatively, if the answer query module 320 queries for a hit, the first suggestion processing module 330 may also feed back the given answer to the question recorded in the blockchain to the first user.
Optionally, the apparatus in this embodiment of the present application further includes:
and the first processing module is used for judging whether a block chain records an established answer of the question and whether the established answer is proposed and obtained by the third user based on an editing request or a deleting request for the question initiated by the second user. And if the block chain records the given answer of the question and the given answer is proposed and obtained by the third user, starting a function for editing or deleting the given answer of the block chain records to the third user.
Optionally, the apparatus in this embodiment of the present application further includes:
and the second processing module is used for periodically judging the effectiveness of the established answer for the question after recording the candidate answer as the established answer of the question into the block chain, and deleting the established answer of the question recorded by the block chain after judging that the established answer is invalid for the question.
Optionally, the goal offer comprises: an offer of a first user to occupy the target resource. The problems include: a question of whether the target resource is occupied. The candidate answers include: an answer to the target resource being occupied by the first user.
Optionally, the data uplink module records the question, the given answer to the question, and the category association of the question in the block chain; wherein the category of the question serves as an index to retrieve an established answer to the question recorded in the blockchain.
Optionally, the target offer is initiated by the first user through any one of the following interfaces:
long text transmission protocol interface, remote procedure call protocol interface and software development kit interface.
Obviously, the device of the embodiment of the present application can be used as the execution subject of the method shown in fig. 1, and therefore, the device can realize the functions of the method realized in fig. 1 and fig. 2. Since the principle is the same, the detailed description is omitted here.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 4, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (peripheral component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads a corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the question-answer pair data mining device on a logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
analyzing a target proposal based on the target proposal initiated by a first user to obtain a question proposed by the first user and a candidate answer of the question; wherein the target offer carries the question and the candidate answer;
inquiring whether a block chain records a given answer of the question;
if the query is hit, rejecting the target offer;
if the query is not hit, initiating multi-party consensus for the target offer to a plurality of blockchain nodes of the blockchain; and the number of the first and second groups,
and if the multiple parties agree, accepting the target proposal, and recording the candidate answer as a given answer of the question into the block chain.
Based on the electronic device shown in fig. 4, it can be known that: the scheme of the embodiment of the application adopts a block chain to record the questions and the corresponding established answers. If the user proposes an existing question and corresponding candidate answer, the corresponding answer may be queried from the blockchain to decide whether to accept the user proposal. If the user proposes a completely new question and corresponding candidate answer, the multi-party consensus technique of the blockchain can be used to determine whether to accept the user proposal, and after acceptance, the candidate answer proposed by the user is recorded as the predetermined answer to the proposed question in the blockchain. In practical applications, resource occupation of a distributed system can be abstracted into a question of whether a resource can be occupied or not and an answer of who the resource is occupied or the resource is occupied. Obviously, in this way, the blockchain has a unique and valid given answer to a question record, so that the function of the distributed lock can be realized by deciding whether to accept the occupation proposal initiated by the user on the resource by the blockchain. On one hand, the block chain is an existing database structure, and a distributed lock program does not need to be separately developed and maintained for a distributed system, so that the implementation cost can be reduced, and the universality can be improved. On the other hand, the given answer of the multi-party consensus decision problem can decentralize the distributed system and ensure the fairness of proposal application.
The proposed processing method as disclosed above in the embodiment of fig. 1 of the present application may be applied in or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It should be understood that the electronic device according to the embodiment of the present application may implement the functions of the above-described apparatus in the embodiments shown in fig. 1 and fig. 2, and details are not described herein again.
Of course, besides the software implementation, the electronic device of the present application does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
Furthermore, an embodiment of the present application also provides a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by a portable electronic device including a plurality of application programs, can cause the portable electronic device to perform the method of the embodiment shown in fig. 1, and specifically to perform the following method:
analyzing a target proposal based on the target proposal initiated by a first user to obtain a question proposed by the first user and a candidate answer of the question; wherein the target offer carries the question and the candidate answer;
inquiring whether a block chain records a given answer of the question;
if the query is hit, rejecting the target offer;
if the query is not hit, initiating multi-party consensus for the target offer to a plurality of blockchain nodes of the blockchain; and the number of the first and second groups,
and if the multiple parties agree, accepting the target proposal, and recording the candidate answer as a given answer of the question into the block chain.
It will be appreciated that the above instructions, when executed by a portable electronic device comprising a plurality of applications, enable the proposed processing arrangement described above to implement the functionality of the embodiment shown in fig. 1 and 2, and will not be described in detail herein.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A blockchain-based proposal processing method, comprising:
analyzing a target proposal based on the target proposal initiated by a first user to obtain a question proposed by the first user and a candidate answer of the question; wherein the target offer carries the question and the candidate answer;
inquiring whether a block chain records a given answer of the question;
if the query is hit, rejecting the target offer;
if the query is not hit, initiating multi-party consensus for the target offer to a plurality of blockchain nodes of the blockchain; and the number of the first and second groups,
and if the multiple parties agree, accepting the target proposal, and recording the candidate answer as a given answer of the question into the block chain.
2. The method of claim 1, further comprising:
and if the query is hit, feeding back the established answer of the question recorded by the block chain to the first user.
3. The method of claim 1, further comprising:
judging whether a block chain records a given answer of the question and whether the given answer is proposed and obtained by the third user based on an editing request or a deleting request for the question initiated by the second user;
if the blockchain records the given answer of the question and the given answer is proposed by the third user, starting a function for editing or deleting the given answer of the blockchain records to the third user.
4. The method of claim 1, further comprising:
after the candidate answer is recorded into the block chain as the established answer of the question, periodically judging the effectiveness of the established answer for the question, and deleting the established answer of the question recorded by the block chain after judging that the established answer is invalid for the question.
5. The method according to any one of claims 1 to 4,
the goal proposition includes: an offer of a first user to occupy a target resource;
the problems include: a question of whether the target resource is occupied;
the candidate answers include: an answer to the target resource being occupied by the first user.
6. The method according to any one of claims 1 to 4,
recording the candidate answer as a given answer to the question in the blockchain, including:
recording the question, the given answer of the question and the category association of the question into the block chain; wherein the category of the question serves as an index to retrieve an established answer to the question recorded in the blockchain.
7. The method according to any one of claims 1 to 4,
the target offer is initiated by the first user through any one of the following interfaces:
long text transmission protocol interface, remote procedure call protocol interface and software development kit interface.
8. An information feedback device based on a block chain comprises:
the proposal analysis module is used for analyzing a target proposal based on the target proposal initiated by a first user to obtain a question proposed by the first user and a candidate answer of the question; wherein the target offer carries the question and the candidate answer;
the answer query module is used for querying whether the block chain records the established answer of the question or not;
the first proposal processing module rejects the target proposal if the query is hit;
a second proposal processing module, which initiates multi-party consensus aiming at the target proposal to a plurality of block chain nodes of the block chain if the query is not hit;
and the data uplink module accepts the target proposal if the multi-party consensus passes, and records the candidate answer as a given answer of the question into the block chain.
9. An electronic device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being executed by the processor to:
analyzing a target proposal based on the target proposal initiated by a first user to obtain a question proposed by the first user and a candidate answer of the question; wherein the target offer carries the question and the candidate answer;
inquiring whether a block chain records a given answer of the question;
if the query is hit, rejecting the target offer;
if the query is not hit, initiating multi-party consensus for the target offer to a plurality of blockchain nodes of the blockchain; and the number of the first and second groups,
and if the multiple parties agree, accepting the target proposal, and recording the candidate answer as a given answer of the question into the block chain.
10. A computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of:
analyzing a target proposal based on the target proposal initiated by a first user to obtain a question proposed by the first user and a candidate answer of the question; wherein the target offer carries the question and the candidate answer;
inquiring whether a block chain records a given answer of the question;
if the query is hit, rejecting the target offer;
if the query is not hit, initiating multi-party consensus for the target offer to a plurality of blockchain nodes of the blockchain; and the number of the first and second groups,
and if the multiple parties agree, accepting the target proposal, and recording the candidate answer as a given answer of the question into the block chain.
CN201910898488.7A 2019-09-23 2019-09-23 Suggestion processing method and device based on block chain and electronic equipment Active CN110688410B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201910898488.7A CN110688410B (en) 2019-09-23 2019-09-23 Suggestion processing method and device based on block chain and electronic equipment
TW109116539A TW202113738A (en) 2019-09-23 2020-05-19 Project processing method and device based on block chain and electronic equipment
PCT/CN2020/093896 WO2021057070A1 (en) 2019-09-23 2020-06-02 Blockchain-based submission processing method, device, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910898488.7A CN110688410B (en) 2019-09-23 2019-09-23 Suggestion processing method and device based on block chain and electronic equipment

Publications (2)

Publication Number Publication Date
CN110688410A true CN110688410A (en) 2020-01-14
CN110688410B CN110688410B (en) 2021-03-19

Family

ID=69109850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910898488.7A Active CN110688410B (en) 2019-09-23 2019-09-23 Suggestion processing method and device based on block chain and electronic equipment

Country Status (3)

Country Link
CN (1) CN110688410B (en)
TW (1) TW202113738A (en)
WO (1) WO2021057070A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021057070A1 (en) * 2019-09-23 2021-04-01 创新先进技术有限公司 Blockchain-based submission processing method, device, and electronic apparatus
CN113516463A (en) * 2020-04-09 2021-10-19 北京意锐新创科技有限公司 Payment device based shared information processing method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878000A (en) * 2017-03-06 2017-06-20 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of alliance's chain common recognition method and system
US9792101B2 (en) * 2015-11-10 2017-10-17 Wesley John Boudville Capacity and automated de-install of linket mobile apps with deep links
CN108170701A (en) * 2017-11-14 2018-06-15 北京欧链科技有限公司 The information processing method and device of block chain
CN108717443A (en) * 2018-05-17 2018-10-30 北京京东金融科技控股有限公司 Data sharing method, block catenary system and computer readable storage medium
CN109165134A (en) * 2018-07-16 2019-01-08 付坤元 Machine examination data processing method and system based on block chain technology
CN109218408A (en) * 2018-08-16 2019-01-15 泰链(厦门)科技有限公司 Common recognition mechanism implementation method, medium, computer equipment and the block catenary system of block catenary system
CN109785200A (en) * 2019-01-03 2019-05-21 中国联合网络通信集团有限公司 It answers questions method, equipment and storage medium
CN109936457A (en) * 2019-02-20 2019-06-25 深圳前海微众银行股份有限公司 Block chain witnesses method, apparatus, equipment and computer readable storage medium in many ways

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11823178B2 (en) * 2017-11-17 2023-11-21 International Business Machines Corporation Optimization of high volume transaction performance on a blockchain
CN109063169A (en) * 2018-08-17 2018-12-21 福建省农村信用社联合社 A kind of customer data management system based on block chain
CN109272317A (en) * 2018-09-27 2019-01-25 北京金山安全软件有限公司 Block chain private key obtaining method and device and electronic equipment
CN109345392B (en) * 2018-10-26 2020-06-23 阿里巴巴集团控股有限公司 Method and system for issuing programming question, issuing solution code and checking solution code
CN110688410B (en) * 2019-09-23 2021-03-19 创新先进技术有限公司 Suggestion processing method and device based on block chain and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9792101B2 (en) * 2015-11-10 2017-10-17 Wesley John Boudville Capacity and automated de-install of linket mobile apps with deep links
CN106878000A (en) * 2017-03-06 2017-06-20 中钞信用卡产业发展有限公司北京智能卡技术研究院 A kind of alliance's chain common recognition method and system
CN108170701A (en) * 2017-11-14 2018-06-15 北京欧链科技有限公司 The information processing method and device of block chain
CN108717443A (en) * 2018-05-17 2018-10-30 北京京东金融科技控股有限公司 Data sharing method, block catenary system and computer readable storage medium
CN109165134A (en) * 2018-07-16 2019-01-08 付坤元 Machine examination data processing method and system based on block chain technology
CN109218408A (en) * 2018-08-16 2019-01-15 泰链(厦门)科技有限公司 Common recognition mechanism implementation method, medium, computer equipment and the block catenary system of block catenary system
CN109785200A (en) * 2019-01-03 2019-05-21 中国联合网络通信集团有限公司 It answers questions method, equipment and storage medium
CN109936457A (en) * 2019-02-20 2019-06-25 深圳前海微众银行股份有限公司 Block chain witnesses method, apparatus, equipment and computer readable storage medium in many ways

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021057070A1 (en) * 2019-09-23 2021-04-01 创新先进技术有限公司 Blockchain-based submission processing method, device, and electronic apparatus
CN113516463A (en) * 2020-04-09 2021-10-19 北京意锐新创科技有限公司 Payment device based shared information processing method and device

Also Published As

Publication number Publication date
TW202113738A (en) 2021-04-01
CN110688410B (en) 2021-03-19
WO2021057070A1 (en) 2021-04-01

Similar Documents

Publication Publication Date Title
JP7138726B2 (en) Blockchain consensus methods, accounting nodes and nodes
CN110708371A (en) Data processing method, device and system based on block chain and electronic equipment
CN112564916A (en) Access client authentication system applied to micro-service architecture
CN108710681B (en) File acquisition method, device, equipment and storage medium
CN110688410B (en) Suggestion processing method and device based on block chain and electronic equipment
CN111538596B (en) Resource processing method, device, computer equipment and storage medium
CN113011865B (en) Multi-user ordering method, server and client
CN109493073B (en) Identity recognition method and device based on human face and electronic equipment
CN106254528B (en) Resource downloading method and caching device
US20020106066A1 (en) System and methods for providing anonymous telephone communications
CN105812378A (en) Access request processing method and device
CN112837157A (en) Method, device and system for registering and executing timing intelligent contract in block chain
CN105468619A (en) Resource distribution method and device used for database connection pool
CN112182046B (en) Information recommendation method, device, equipment and medium
CN111625348A (en) Task allocation method, device, server and storage medium
CN112671932B (en) Data processing method based on big data and cloud computing node
CN109544165B (en) Resource transfer processing method, device, computer equipment and storage medium
CN112994906B (en) Method, device, storage medium and computer equipment for joining group
CN110134837B (en) Information management method and device
CN116319810A (en) Flow control method, device, equipment, medium and product of distributed system
CN114385998A (en) Function use permission processing method and device and electronic equipment
US20170263068A1 (en) Method for generating counting events and electronic device
CN113485731A (en) Intelligent contract upgrading method and system for block chain
CN115987685B (en) Cloud service data sharing method and system
CN113794794B (en) Method, device, equipment and storage medium for adding contact persons based on block chain

Legal Events

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

Effective date of registration: 20200924

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

Applicant after: Innovative advanced technology Co.,Ltd.

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

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200924

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

Applicant after: Advanced innovation technology Co.,Ltd.

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

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40026266

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240225

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

Patentee after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

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

Patentee before: Innovative advanced technology Co.,Ltd.

Country or region before: Cayman Islands

TR01 Transfer of patent right