WO2019227609A1 - 基于区块链的智能股票申购方法、装置、设备及存储介质 - Google Patents

基于区块链的智能股票申购方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2019227609A1
WO2019227609A1 PCT/CN2018/095354 CN2018095354W WO2019227609A1 WO 2019227609 A1 WO2019227609 A1 WO 2019227609A1 CN 2018095354 W CN2018095354 W CN 2018095354W WO 2019227609 A1 WO2019227609 A1 WO 2019227609A1
Authority
WO
WIPO (PCT)
Prior art keywords
contract
smart contract
transaction
smart
stock
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.)
Ceased
Application number
PCT/CN2018/095354
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2019227609A1 publication Critical patent/WO2019227609A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/405Establishing or using transaction specific rules

Definitions

  • the present application relates to the field of blockchain technology, and relates to a method, a device, a device, and a storage medium for the purchase of smart stocks based on the blockchain.
  • a stock is a kind of marketable securities. It is a share certificate issued by the stock company to the investor when raising capital, and represents the holder's ownership of the stock company.
  • Stock trading refers to the buying and selling of stocks that have been issued and listed by stock investors at market prices.
  • the technical problem to be solved in this application is to overcome the problems that the medium and small stock investors in the prior art cannot buy and sell stocks across the sky and multi-person syndication on the brokerage platform, and proposes a blockchain-based intelligent stock purchase method, device, Equipment and storage media, to achieve flexible investment solutions, break the restrictions of traditional securities dealers, and support multi-person buy-and-sell stocks and buy-and-buy operations.
  • a blockchain-based smart stock purchase method includes the following steps:
  • the contract conditions include at least two parties.
  • the smart contract is a sales contract
  • one of the parties is On the brokerage platform, the other party is one or more users including the first user;
  • the smart contract is a viewing contract, one party is another user and the other party is the first user ;
  • the smart contract is verified according to a preset verification rule, and the verification result is fed back to the clients of both parties in the smart contract;
  • the smart contracts established within the same contract retention time interval are packaged and stored on a blockchain node, and broadcast to the blockchain through the P2P method with the smart The parties involved in the contract are on the same block;
  • S5. Periodically traverse the execution status, transaction, and trigger conditions of each established smart contract, and determine whether the transaction meets the trigger condition, and if it is satisfied, execute the transaction;
  • An electronic device stores a blockchain-based intelligent stock purchase system on the electronic device.
  • the blockchain-based intelligent stock purchase system includes:
  • a contract formulation module is configured to receive a contract condition selected by a first user on a client and add it to a preset contract template to generate a smart contract.
  • the contract condition includes at least two parties.
  • the smart contract is a sales contract
  • One party is a brokerage platform
  • the other party is one or more users including the first user.
  • the smart contract is a viewing contract
  • one party is the other user and the other party is the Mentioned first user;
  • a contract verification module configured to verify the smart contract according to a preset verification rule, and feedback the verification result to the clients of both parties in the smart contract;
  • a judging module for judging whether the verification result is a verification pass
  • the contract saving module is used to package and store smart contracts that are established within the same contract saving interval on a blockchain node according to a preset contract saving interval after the verification result is passed. Broadcast to the block where the two parties in the smart contract and the smart contract are located by means of P2P;
  • a contract execution module is used to periodically traverse the execution status, transactions, and trigger conditions of each established smart contract, and determine whether the transaction meets the trigger condition, and if it is satisfied, execute the transaction;
  • the recording module is configured to record an operation and an execution result of executing the transaction in a corresponding block, and send the execution result to a client of both parties in the smart contract.
  • a computer device includes a memory and a processor.
  • the memory stores a blockchain-based intelligent stock purchase system that can be executed by the processor. When the system is executed by the processor, the following steps are implemented. :
  • the contract conditions include at least two parties.
  • the smart contract is a sales contract
  • one of the parties is On the brokerage platform, the other party is one or more users including the first user;
  • the smart contract is a viewing contract, one party is another user and the other party is the first user ;
  • the smart contract is verified according to a preset verification rule, and the verification result is fed back to the clients of both parties in the smart contract;
  • the smart contracts established within the same contract retention time interval are packaged and stored on a blockchain node, and broadcast to the blockchain through the P2P method with the smart The parties involved in the contract are on the same block;
  • S5. Periodically traverse the execution status, transaction, and trigger conditions of each established smart contract, and determine whether the transaction meets the trigger condition, and if it is satisfied, execute the transaction;
  • a computer-readable storage medium stores computer program instructions in the computer-readable storage medium, and the computer program instructions are executable by one or more processors, so that the at least one processor performs operations of the following steps. :
  • the contract conditions include at least two parties.
  • the smart contract is a sales contract
  • one of the parties is On the brokerage platform, the other party is one or more users including the first user;
  • the smart contract is a viewing contract, one party is another user and the other party is the first user ;
  • the smart contract is verified according to a preset verification rule, and the verification result is fed back to the clients of both parties in the smart contract;
  • the smart contracts established within the same contract retention time interval are packaged and stored on a blockchain node, and broadcast to the blockchain through the P2P method with the smart The parties involved in the contract are on the same block;
  • S5. Periodically traverse the execution status, transaction, and trigger conditions of each established smart contract, and determine whether the transaction meets the trigger condition, and if it is satisfied, execute the transaction;
  • FIG. 1 shows a flowchart of Embodiment 1 of a smart stock subscription method based on a blockchain in the present application
  • FIG. 2 shows a flowchart of a second embodiment of a smart stock subscription method based on a blockchain according to the present application
  • FIG. 3 shows a flowchart of a third embodiment of a smart stock subscription method based on a blockchain according to the present application
  • FIG. 4 shows a schematic diagram of a program module of a first embodiment of a smart stock application system based on a blockchain in an electronic device of the present application
  • FIG. 5 is a schematic diagram of a hardware architecture of a computer device according to an embodiment of the present application.
  • this application proposes a smart stock purchase method based on the blockchain.
  • the blockchain-based smart stock purchase method includes the following steps:
  • the contract conditions include at least two parties.
  • the smart contract is a sales contract
  • one of the parties is On the brokerage platform, the other party is one or more users including the first user;
  • the smart contract is a viewing contract, one party is another user and the other party is the first user .
  • the “first” in the first user mentioned here has no specific meaning, and is only used as a difference from other users.
  • the another user refers to another user that is different from the first user.
  • the smart contract refers to an agreement that can automatically execute tasks that require manual completion.
  • a smart contract is any protocol that can perform some functions on its own. For example, a contract that automatically calculates the amount to be paid by the parties to a contract and arranges for payment of that amount. The use of smart contracts will reduce manual intervention during protocol execution.
  • the contract conditions are preset in the client, including the parties, the brokerage platform, the effective time range, the anchored stock number, the stock purchase or offer price, the number of shares purchased, and the price of the stock that triggered the purchase or sale, etc. Wait.
  • the customer sets the purchase conditions for stocks to buy within a two-day period when the price of a stock code is less than 15.8 yuan.
  • the time limit here is two days, and the price is less than 15.8 yuan.
  • the customer sets the stock purchase conditions as follows: A stock or B stock with a price lower than 15.8 yuan is preferentially purchased with lower price stocks that meet this condition.
  • the brokerage platform Since stock trading must be conducted on the brokerage platform, when the smart contract is a sales and purchase type contract for buying or selling stocks, as stated in the contract conditions, the brokerage platform is indispensable as a party, and the brokerage firm The platform should choose the brokerage platform where the user has an account.
  • the other party may be one user or multiple users, and especially when multiple persons buy and sell one stock, the other party may be the multiple persons who buy and sell one stock.
  • the smart contract for buying and selling stocks can also be a viewing contract for buying and selling stocks.
  • the buying does not refer to directly following a user to buy or sell stocks, but to view the buying and selling records of a user. See if the side reference wants to follow. Therefore, the party is a specific user, that is, the party being viewed. The other party is the first user, that is, the viewing party.
  • the smart contract is verified according to a preset verification rule, and the verification result is fed back to the clients of both parties in the smart contract.
  • Verify the structure of the smart contract such as whether the bytes of the smart contract exceed the standard and the format is correct
  • Verify whether the funds meet the investment plan that is, whether the total amount of funds in the account established by each user involved in the smart contract in the brokerage firm is greater than or equal to the total amount of funds required by the investment plan
  • the verification passes that the smart contract meets all the following verification rules:
  • the total amount of funds in the accounts set up by each user involved in the smart contract in the brokerage firm satisfies the investment plan
  • the effective time written in the smart contract is greater than the current time
  • the contract conditions in the smart contract are confirmed by the consent of all parties.
  • the verification result of the smart contract is that the verification fails, and the smart contract is not established.
  • the smart contracts established within the same contract retention time interval are packaged and stored on a blockchain node, and broadcast to the blockchain through the P2P method with the smart On the block where both parties are in the contract.
  • the Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithms.
  • the S4 is a storage method of the smart contract in the blockchain, which belongs to the prior art and has been widely used, and will not be repeated here.
  • the content saved in each block also includes the time stamp corresponding to the smart contract record.
  • S5. Periodically traverse the execution status, transaction, and trigger condition of each established smart contract, and determine whether the transaction meets the trigger condition, and if it is satisfied, execute the transaction.
  • the execution status refers to whether the contract is effective.
  • the establishment of a contract does not mean that the contract becomes effective.
  • the stock purchaser can set the effective date of the contract in the smart contract. For example, the contract is established on 2018.1.1, but the stock purchaser declares that the contract will be implemented from 2018.2.1.
  • the transaction refers to a request to buy or sell a stock, to view a transaction request of a certain user, and the like.
  • the trigger condition refers to a condition to be satisfied in generating a request to buy or sell stocks, for example, when the stock code of 100,000 is lower than or equal to the purchase price agreed in the contract, and the buyer ’s account is greater than or When the total purchase price is equal to the total purchase price, it means that the transaction meets the trigger condition.
  • Every operation and result of executing a transaction will be recorded in the corresponding block, and the results will be sent to each relevant user to know.
  • the corresponding block refers to the block where each user and the brokerage platform are located.
  • S5 includes the following points: step:
  • S511. Determine whether only one user is involved in the smart contract. If S515 is performed, otherwise S512 is performed.
  • S512 Send a shared account query request to the brokerage platform involved in the smart contract. If the query is found, S514 is executed; if the query is not found, S513 is executed;
  • the shared account is an account shared by each user involved in the smart contract as a stock transaction party.
  • the shared account is independent of each user's personal account opened on the brokerage platform, and is a newly created independent account that can be viewed by multiple users, that is, the multiple users have the right to view the shared account.
  • the funds in the shared account come from the personal accounts of multiple users who have viewing rights to view, that is, after the shared account is established, the funds in the personal accounts of each user involved must be transferred to the share according to the agreement of the smart contract. Account.
  • the stock trading is operated directly in its personal account opened on the brokerage platform.
  • the corresponding block refers to the block where each user and the brokerage platform involved in the smart contract are located.
  • the transaction is a request to view a transaction record of the user (that is, commonly known as a follow-up buy / Follow-up operation), at this time S5 includes the following sub-steps:
  • S521. Receive a record viewing request sent by a user who is a viewing party through a client, where the request includes a sharing party identification code and a smart contract identification code.
  • each user and the smart contract are coded and distinguished, that is, the identification code is allocated, and each user and the smart contract will correspond to a unique identification code.
  • the request When sending a record viewing request, the request will include the sharer ID and smart contract ID, and the sharer and smart contract are set by the user who is the viewer.
  • the smart contract is stored on a node in the blockchain and can be found directly through the smart contract identification code.
  • S523. Determine whether the record viewing request is true and valid according to the contract conditions in the smart contract, and if yes, retrieve the user's stock transaction record from the blockchain node where the user whose record is the sharer is located.
  • the validity period of the contract can be set in the smart contract, in addition, as a party in the smart contract, the contract can be broken.
  • the characteristic of the blockchain is that every modification / operation is recorded and will not be deleted. Therefore, after the smart contract is invalidated or broken, the smart contract still exists in the blockchain, so it is necessary to confirm whether the smart contract is Real and effective, only when the smart contract is valid, the next operation can be performed (the stock transaction record of the user as the sharing party).
  • S524 Send the retrieved stock transaction record to the client of the user who is the viewing party.
  • this application proposes an electronic device.
  • the electronic device stores a smart stock subscription system 20 based on a blockchain.
  • the system 20 can be divided into one or more program modules.
  • FIG. 4 shows a schematic diagram of a program module of the first embodiment of the blockchain-based smart stock purchase system 20.
  • the system 20 can be divided into a contract formulation module 201 and a contract verification module. 202.
  • the program module referred to in the present application refers to a series of computer program instruction segments capable of performing specific functions. The following description will specifically introduce the specific functions of the program modules 201-206.
  • the contract formulation module 201 is configured to receive a contract condition selected by a first user on a client and add it to a preset contract template to generate a smart contract.
  • the contract condition includes at least two parties.
  • the smart contract is a sales contract
  • the other party is one or more users including the first user
  • the smart contract is a viewing contract
  • one of the parties is the other user and the other party is Is the first user;
  • the contract verification module 202 is configured to verify a smart contract according to a preset verification rule, and feed the verification result to a client of both parties in the smart contract;
  • the judging module 203 is configured to judge whether the verification result is a verification pass
  • the contract saving module 204 is configured to package and store smart contracts established within the same contract saving time interval on a blockchain node according to a preset contract saving time interval after the verification result is passed. , And broadcast to the block where the two parties in the smart contract are located in the blockchain through P2P;
  • the contract execution module 205 is used to periodically traverse the execution status, transaction, and trigger conditions of each established smart contract one by one, and determine whether the transaction meets the trigger condition, and if it is satisfied, execute the transaction;
  • the recording module 206 is configured to record an operation and an execution result of executing the transaction in a corresponding block, and send the execution result to a client of both parties in the smart contract.
  • this application also proposes a computer device.
  • FIG. 5 is a schematic diagram of a hardware architecture of a computer device according to an embodiment of the present application.
  • the computer device 2 is a device capable of automatically performing numerical calculation and / or information processing in accordance with an instruction set or stored in advance.
  • it can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of multiple servers).
  • the computer device 2 includes at least, but is not limited to, a memory 21, a processor 22, a network interface 23, and a smart stock subscription system 20 based on a blockchain that can communicate with each other through a system bus. among them:
  • the memory 21 includes at least one type of computer-readable storage medium.
  • the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a random access memory (RAM), Static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • the memory 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2.
  • the memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a smart memory card (SMC), and a secure digital device. (Secure Digital, SD) card, Flash card, etc.
  • the memory 21 may also include both an internal storage unit of the computer device 2 and an external storage device thereof.
  • the memory 21 is generally used to store an operating system and various types of application software installed on the computer device 2, such as program codes of the blockchain-based smart stock purchase system 20.
  • the memory 21 may also be used to temporarily store various types of data that have been output or will be output.
  • the processor 22 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments.
  • the processor 22 is generally used to control the overall operation of the computer device 2, for example, to perform control and processing related to data interaction or communication with the computer device 2.
  • the processor 22 is configured to run program code or process data stored in the memory 21, for example, to run the blockchain-based intelligent stock purchase system 20 and the like.
  • the network interface 23 may include a wireless network interface or a wired network interface.
  • the network interface 23 is generally used to establish a communication connection between the computer device 2 and other computer devices.
  • the network interface 23 is configured to connect the computer device 2 and an external terminal through a network, and establish a data transmission channel and a communication connection between the computer device 2 and the external terminal.
  • the network may be an Intranet, the Internet, a Global System for Mobile Communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, 5G Wireless, or wired networks such as Internet, Bluetooth, Wi-Fi.
  • GSM Global System for Mobile Communication
  • WCDMA Wideband Code Division Multiple Access
  • FIG. 5 only shows the computer device 2 with components 21-23, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the blockchain-based smart stock purchase system 20 stored in the memory 21 may be executed by one or more processors (processor 22 in this embodiment) to complete the above-mentioned block-based The operation of the smart stock purchase method of the chain.
  • the computer-readable storage medium is a volatile storage medium that stores therein computer program instructions that can be executed by one or more processors to The at least one processor is caused to execute the steps of the blockchain-based smart stock purchase method according to any one of the foregoing.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种基于区块链的智能股票申购方法,属于区块链技术领域。该方法包括以下步骤:S1、接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;S2、根据预设的校验规则对智能合约进行校验;S3、若校验结果为校验通过,则智能合约成立并执行S4;S4、将成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中双方当事人所在的区块上;S5、执行满足触发条件的事务;S6、将执行事务的操作和执行结果记录到对应的区块中,同时反馈给智能合约中双方当事人的客户端。所述方法可以使得投资方案更灵活,打破传统券商的限制,让投资更简单。

Description

基于区块链的智能股票申购方法、装置、设备及存储介质
本申请申明享有2018年5月30日递交的申请号为201810537960.X、名称为“基于区块链的智能股票申购方法、装置、设备及存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请涉及区块链技术领域,涉及一种基于区块链的智能股票申购方法、装置、设备及存储介质。
背景技术
股票是一种有价证券,是股份公司在筹集资本时向出资人发行的股份凭证,代表着持有者对股份公司的所有权。而股票交易是指股票投资者之间按照市场价格对已发行上市的股票所进行的买卖。
如今股票作为一种重要的投资途径,被越来越多的投资者所青睐,投资者主要通过券商平台进行股票交易,只要在券商平台注册开户,即可通过电脑、智能手机等工具进行股票交易,操作简单快捷。
但是,对于一些中小股票投资者而言,在券商平台上进行股票交易存在无法跨天买卖股票、多人合买等痛点。
发明内容
本申请要解决的技术问题是为了克服现有技术中中小股票投资者在券商平台无法跨天买卖股票及多人合买等问题,提出了一种基于区块链的智能股票申购方法、装置、设备及存储介质,实现灵活投资方案,打破传统券商的限制,并支持多人合买合卖一支股票、跟买的操作。
本申请是通过下述技术方案来解决上述技术问题:
一种基于区块链的智能股票申购方法,包括以下步骤:
S1、接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;所述合约条件至少包括双方当事人,当所述智能合约为买卖型合约时,其中一方当事人为券商平台,另一方当事人为包含所述第一用户在内的一个或多个用户;当所述智能合约为查看型合约时,其中一方当事人为另一用户,另一方当事人为所述第一用户;
S2、根据预设的校验规则对智能合约进行校验,并将校验结果反馈至所述智能合约中双方当事人的客户端;
S3、判断校验结果是否为校验通过,若是则智能合约成立并执行S4,若否则智能合约不成立并直接结束;
S4、根据预设的合约保存时间间隔,将位于同一个合约保存时间间隔内成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中涉及到的双方当事人所在的区块上;
S5、定期逐条遍历各成立的智能合约的执行状态、事务和触发条件,并判断所述事务是否满足所述触发条件,若满足则执行所述事务;
S6、将执行所述事务的操作和执行结果记录到对应的区块中,同时将所述执行结果发送至所述智能合约中双方当事人的客户端。
一种电子装置,所述电子装置上存储有基于区块链的智能股票申购系统,所述基于区块链的智能股票申购系统包括:
合约制定模块,用于接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;所述合约条件至少包括双方当事人,当所述智能合约为买卖型合约时,其中一方当事人为券商平台,另一方当事人为包含所述第一用户在内的一个或多个用户;当所述智能合约为查看型合约时,其中一方当事人为另一用户,另一方当事人为所述第一用户;
合约校验模块,用于根据预设的校验规则对智能合约进行校验,并将校 验结果反馈至所述智能合约中双方当事人的客户端;
判断模块,用于判断校验结果是否为校验通过;
合约保存模块,用于在校验结果为校验通过后,根据预设的合约保存时间间隔,将位于同一个合约保存时间间隔内成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中双方当事人所在的区块上;
合约执行模块,用于定期逐条遍历各成立的智能合约的执行状态、事务和触发条件,并判断所述事务是否满足所述触发条件,若满足则执行所述事务;
记录模块,用于将执行所述事务的操作和执行结果记录到对应的区块中,同时将所述执行结果发送至所述智能合约中双方当事人的客户端。
一种计算机设备,包括存储器和处理器,所述存储器上存储有可被所述处理器执行的基于区块链的智能股票申购系统,所述系统被所述处理器执行时实现以下步骤的操作:
S1、接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;所述合约条件至少包括双方当事人,当所述智能合约为买卖型合约时,其中一方当事人为券商平台,另一方当事人为包含所述第一用户在内的一个或多个用户;当所述智能合约为查看型合约时,其中一方当事人为另一用户,另一方当事人为所述第一用户;
S2、根据预设的校验规则对智能合约进行校验,并将校验结果反馈至所述智能合约中双方当事人的客户端;
S3、判断校验结果是否为校验通过,若是则智能合约成立并执行S4,若否则智能合约不成立并直接结束;
S4、根据预设的合约保存时间间隔,将位于同一个合约保存时间间隔内成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中涉及到的双方当事人所在的区块上;
S5、定期逐条遍历各成立的智能合约的执行状态、事务和触发条件,并判断所述事务是否满足所述触发条件,若满足则执行所述事务;
S6、将执行所述事务的操作和执行结果记录到对应的区块中,同时将所述执行结果发送至所述智能合约中双方当事人的客户端。
一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序指令,所述计算机程序指令可被一个或多个处理器执行,以使所述至少一个处理器执行以下步骤的操作:
S1、接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;所述合约条件至少包括双方当事人,当所述智能合约为买卖型合约时,其中一方当事人为券商平台,另一方当事人为包含所述第一用户在内的一个或多个用户;当所述智能合约为查看型合约时,其中一方当事人为另一用户,另一方当事人为所述第一用户;
S2、根据预设的校验规则对智能合约进行校验,并将校验结果反馈至所述智能合约中双方当事人的客户端;
S3、判断校验结果是否为校验通过,若是则智能合约成立并执行S4,若否则智能合约不成立并直接结束;
S4、根据预设的合约保存时间间隔,将位于同一个合约保存时间间隔内成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中涉及到的双方当事人所在的区块上;
S5、定期逐条遍历各成立的智能合约的执行状态、事务和触发条件,并判断所述事务是否满足所述触发条件,若满足则执行所述事务;
S6、将执行所述事务的操作和执行结果记录到对应的区块中,同时将所述执行结果发送至所述智能合约中双方当事人的客户端。
本申请的积极进步效果在于:
1)通过本申请的使用,可以使得投资方案更灵活,打破传统券商的限制,让投资更简单。
2)通过本申请可以支持多人合买/合卖一支股票以及跟买的操作。
附图说明
图1示出了本申请基于区块链的智能股票申购方法实施例一的流程图;
图2示出了本申请基于区块链的智能股票申购方法实施例二的流程图;
图3示出了本申请基于区块链的智能股票申购方法实施例三的流程图;
图4示出了本申请电子装置中基于区块链的智能股票申购系统第一实施例的程序模块示意图;
图5示出了本申请计算机设备一实施例的硬件架构示意图。
具体实施方式
下面通过实施例的方式进一步说明本申请,但并不因此将本申请限制在所述的实施例范围之中。
首先,本申请提出一种基于区块链的智能股票申购方法。
在实施例一中,如图1所示,所述的基于区块链的智能股票申购方法包括如下步骤:
S1、接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;所述合约条件至少包括双方当事人,当所述智能合约为买卖型合约时,其中一方当事人为券商平台,另一方当事人为包含所述第一用户在内的一个或多个用户;当所述智能合约为查看型合约时,其中一方当事人为另一用户,另一方当事人为所述第一用户。
这里所述第一用户中的“第一”没有特指的意思,仅作为与其他用户的区别使用。所述另一个用户是指区别与所述第一用户的其他用户。
所述智能合约是指一份能自动执行本需要手动才能完成任务的协议。智能合约就是任何能自行执行部分功能的协议。例如,一份能自动计算合同当 事人待付金额,并安排支付这笔金额的合约。智能合约的使用将减少协议执行过程中的人工干预。
所述合约条件预设在客户端中,包括双方当事人、券商平台、生效时间范围、锚定的股票编号、股票买入或卖出价位、购买股票数量以及触发买入或卖出的股票价位等等。
用户登录到客户端后,可以客户端中进行选择,并可以根据需要赋予各合约条件以逻辑关系。
例如:客户设置股票的买入条件为,在两天内某个股票编号的价格低于15.8元就买入,这里要求时间限制是两天内,同时还有满足价格低于15.8元;
再例如:客户设置股票的买入条件为,买入价格低于15.8元的A股票或者B股票,优先买入达到该条件的价格更低的股票。
由于股票买卖必须要在券商平台上进行,因而当智能合约是关于买入或卖出股票的买卖型合约时,所述在合约条件中,券商平台作为一方当事人是必不可少的,而且该券商平台应该选择用户开设有账户的券商平台。
另一方当事人可以是一个用户,也可以是多个用户,特别是当多人合买合卖一支股票时,所述另一方当事人就可以是这个进行合买合卖一支股票的多人。
除了关于买卖股票的智能合约以外,还可以是关于跟买股票的查看型合约,这里所述跟买并不是指直接跟随某个用户进行股票买卖,而是指查看某个用户的买卖记录,供查看方参考是否要跟随。因此,所述一方当事人为具体的某个用户,即被查看方。而另一方当事人就是所述第一用户,即查看方。
需要注意的是,当另一方当事人为多人时,发起制定智能合约的用户必须这多人中一个。
S2、根据预设的校验规则对智能合约进行校验,并将校验结果反馈至所述智能合约中双方当事人的客户端。
这里,所述校验规则如下:
校验智能合约的结构,如智能合约的字节是否超标、格式是否正确;
校验资金是否满足投资计划,即智能合约中涉及到的各用户在所述券商上设立的账户中的资金总额是否大于或等于投资计划所需的资金总额;
校验股票编号是否真实存在;
校验投资时间是否合法(大于当前时间),即智能合约中所写的生效时间是否大于当前时间;
校验智能合约即将存入的区块链是否合法;
校验智能合约中的合约条件是否经所有当事人的同意确认。
S3、判断校验结果是否为校验通过,若是则智能合约成立并执行S4,若否则智能合约不成立并直接结束。
所述校验通过要求所述智能合约满足下述全部校验规则:
所述智能合约的字节没有超标;
所述智能合约的格式正确;
所述智能合约中涉及到的各用户在所述券商上设立的账户中的资金总额满足投资计划;
所述智能合约中涉及到的股票编号真实存在;
所述智能合约中所写的生效时间大于当前时间;
所述智能合约即将存入的区块链合法;
所述智能合约中的合约条件经所有当事人的同意确认。
只要有一项校验不通过,则所述智能合约的校验结果为校验失败,该智能合约不成立。
S4、根据预设的合约保存时间间隔,将位于同一个合约保存时间间隔内成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中双方当事人所在的区块上。
所述区块链(Blockchain)是分布式数据存储、点对点传输、共识机制、加 密算法等计算机技术的新型应用模式。
所述S4为智能合约在区块链中的保存方式,属于现有技术,已被广泛应用,此处不再赘述。各区块中保存的内容除了智能合约本身的内容以外,还包括该智能合约记录对应的时间戳。
S5、定期逐条遍历各成立的智能合约的执行状态、事务和触发条件,并判断所述事务是否满足所述触发条件,若满足则执行所述事务。
由于是定期逐条遍历,因此通常需要预设遍历的循环时间。
所述执行状态指合约是否生效。合约成立并不等于合约生效,股票申购方可以在智能合约中设置合约的生效日期,比如合约成立于2018.1.1,但股份申购方在合约中声明该合约自2018.2.1起开始执行。
所述事务就是指买入或卖出股票的请求,查看某个用户的交易请求等。
所述触发条件就是指买入或卖出股票的请求的生成所要满足的条件,比如当股票代码为100000的股票低于或等于合约中约定的买入价,且买入方的账户中大于或等于实际买入价总额的时候,就表示事务满足触发条件。
S6、将执行所述事务的操作和执行结果记录到对应的区块中,同时将所述执行结果发送至所述智能合约中双方当事人的客户端。
为防止交易记录被篡改,执行事务的每一个操作和结果,都会被记录到对应的区块中,并将结果发送给各相关用户知晓。
所述对应的区块就是指各用户和券商平台所在的区块。
在实施例二中,基于实施例一的基础上,如图2所示,当所述智能合约为买卖型合约时,所述事务为买入或卖出股票的请求,此时S5包括以下分步骤:
S511、判断智能合约中的是否仅涉及一个用户,若是执行S515,若否则执行S512。
如果涉及到多方合买或合卖,则需要在券商平台上建有供多方共享的共 享账号,因此这里需要区分是否仅涉及一个用户。
S512、向智能合约中涉及到的券商平台发送共享账号查询请求,若查询到则执行S514,若查询不到则执行S513;
所述共享账号为由智能合约中涉及到的各用户共同作为一个股票交易方所共享的账号。
S513、指示券商平台创建一个所述共享账户。
所述共享账号独立于每个用户在券商平台上开设的个人账号,是新建的独立账号,该账号可供这多个用户查看,即这多个用户都拥有查看该共享账号的权限。
共享账号中的资金来自于有查看权限查看的多个用户的个人账号,即当建立共享账号后,还要将涉及到的各用户的个人账号中的资金按智能合约的约定划入到该共享账号中。
S514、向券商平台发送以所述共享账号作为一个股票交易方的股票交易执行请求,并把该操作记录到各对应的区块中。
S515、向券商平台发送以所述用户在券商平台上开立的账号作为股票交易方的股票交易执行请求,并把该条操作记录到对应的区块中。
当另一方当事人为一个用户时,则股票买卖直接在券商平台上开立的其个人账号中操作。
所述对应的区块是指智能合约涉及到的各用户和券商平台所在的区块。
在实施例三中,基于实施例一的基础上,如图3所示,当所述智能合约为查看型合约时,所述事务为查看该用户的交易记录的请求(即俗称的跟买/跟卖操作),此时S5包括以下分步骤:
S521、接收作为查看方的用户通过客户端发送的记录查看请求,所述请求包括共享方识别码和智能合约识别码。
为了区别各用户和智能合约,会给各个用户和智能合约进行编码区分, 即分配所述的识别码,每个用户和智能合约都会对应一个唯一的识别码。
发送记录查看请求时,请求中会包含共享方识别码和智能合约识别码,共享方和智能合约由作为查看方的用户设定。
S522、通过所述智能合约识别码调取相关的智能合约。
所述智能合约保存在区块链中一个节点上,通过智能合约识别码可以直接查找到。
S523、根据所述智能合约中的合约条件判断所述记录查看请求是否真实有效,若是则从记录作为共享方的用户所在的区块链节点上,调取该用户的股票交易记录。
由于智能合约中可以设定合约的有效期限,此外作为智能合约中的当事人一方也可以毁约。但是区块链的特性是会将每一次的修改/操作都记录下来不会删除,所以在智能合约失效或被毁约后,该智能合约还是存在于区块链中,因此要确认智能合约是否为真实有效,只有在智能合约有效的情况下,才能执行下一步操作(作为共享方的用户的股票交易记录)。
S524、将调取的股票交易记录发送至作为查看方的用户的客户端上。
其次,本申请提出了一种电子装置,所述电子装置上存储有基于区块链的智能股票申购系统20,所述系统20可以被分割为一个或者多个程序模块。
例如,图4示出了所述基于区块链的智能股票申购系统20第一实施例的程序模块示意图,该实施例中,所述系统20可以被分割为合约制定模块201、合约校验模块202、判断模块203、合约保存模块204、合约执行模块205和记录模块206。其中,本申请所称的程序模块是指能够完成特定功能的一系列计算机程序指令段。以下描述将具体介绍所述程序模块201-206的具体功能。
所述合约制定模块201用于接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;所述合约条件至少包括双方当事人, 当所述智能合约为买卖型合约时,其中一方当事人为券商平台,另一方当事人为包含所述第一用户在内的一个或多个用户;当所述智能合约为查看型合约时,其中一方当事人为另一用户,另一方当事人为所述第一用户;
所述合约校验模块202用于根据预设的校验规则对智能合约进行校验,并将校验结果反馈至所述智能合约中双方当事人的客户端;
所述判断模块203用于判断校验结果是否为校验通过;
所述合约保存模块204用于在校验结果为校验通过后,根据预设的合约保存时间间隔,将位于同一个合约保存时间间隔内成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中双方当事人所在的区块上;
所述合约执行模块205用于定期逐条遍历各成立的智能合约的执行状态、事务和触发条件,并判断所述事务是否满足所述触发条件,若满足则执行所述事务;
所述记录模块206用于将执行所述事务的操作和执行结果记录到对应的区块中,同时将所述执行结果发送至所述智能合约中双方当事人的客户端。
再次,本申请还提出来一种计算机设备。
参阅图5所示,是本申请计算机设备一实施例的硬件架构示意图。本实施例中,所述计算机设备2是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。例如,可以是智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。如图所示,所述计算机设备2至少包括,但不限于,可通过系统总线相互通信连接存储器21、处理器22、网络接口23、以及基于区块链的智能股票申购系统20。其中:
所述存储器21至少包括一种类型的计算机可读存储介质,所述可读存 储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器21可以是所述计算机设备2的内部存储单元,例如该计算机设备2的硬盘或内存。在另一些实施例中,所述存储器21也可以是所述计算机设备2的外部存储设备,例如该计算机设备2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器21还可以既包括所述计算机设备2的内部存储单元也包括其外部存储设备。本实施例中,所述存储器21通常用于存储安装于所述计算机设备2的操作系统和各类应用软件,例如所述基于区块链的智能股票申购系统20的程序代码等。此外,所述存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制所述计算机设备2的总体操作,例如执行与所述计算机设备2进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器22用于运行所述存储器21中存储的程序代码或者处理数据,例如运行所述的基于区块链的智能股票申购系统20等。
所述网络接口23可包括无线网络接口或有线网络接口,该网络接口23通常用于在所述计算机设备2与其他计算机设备之间建立通信连接。例如,所述网络接口23用于通过网络将所述计算机设备2与外部终端相连,在所述计算机设备2与外部终端之间的建立数据传输通道和通信连接等。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、 Wi-Fi等无线或有线网络。
需要指出的是,图5仅示出了具有组件21-23的计算机设备2,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
在本实施例中,存储于存储器21中的所述基于区块链的智能股票申购系统20可以被一个或多个处理器(本实施例为处理器22)所执行,以完成上述基于区块链的智能股票申购方法的操作。
此外,本申请一种计算机可读存储介质,所述计算机可读存储介质为易失性存储介质,其内存储有计算机程序指令,所述计算机程序指令可被一个或多个处理器执行,以使所述至少一个处理器执行如前述任一项所述的基于区块链的智能股票申购方法的步骤。
虽然以上描述了本申请的具体实施方式,但是本领域的技术人员应当理解,这仅是举例说明,本申请的保护范围是由所附权利要求书限定的。本领域的技术人员在不背离本申请的原理和实质的前提下,可以对这些实施方式做出多种变更或修改,但这些变更和修改均落入本申请的保护范围。

Claims (20)

  1. 一种基于区块链的智能股票申购方法,其特征在于,包括以下步骤:
    S1、接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;所述合约条件至少包括双方当事人,当所述智能合约为买卖型合约时,其中一方当事人为券商平台,另一方当事人为包含所述第一用户在内的一个或多个用户;当所述智能合约为查看型合约时,其中一方当事人为另一用户,另一方当事人为所述第一用户;
    S2、根据预设的校验规则对智能合约进行校验,并将校验结果反馈至所述智能合约中双方当事人的客户端;
    S3、判断校验结果是否为校验通过,若是则智能合约成立并执行S4,若否则智能合约不成立并直接结束;
    S4、根据预设的合约保存时间间隔,将位于同一个合约保存时间间隔内成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中双方当事人所在的区块上;
    S5、定期逐条遍历各成立的智能合约的执行状态、事务和触发条件,并判断所述事务是否满足所述触发条件,若满足则执行所述事务;
    S6、将执行所述事务的操作和执行结果记录到对应的区块中,同时将所述执行结果发送至所述智能合约中双方当事人的客户端。
  2. 根据权利要求1所述的基于区块链的智能股票申购方法,其特征在于,所述合约条件还包括生效时间范围、锚定的股票编号、股票买入或卖出价位、购买股票数量以及触发买入或卖出的股票价位。
  3. 根据权利要求2所述的基于区块链的智能股票申购方法,其特征在于,所述校验通过要求所述智能合约满足下述全部校验规则:所述智能合约的字节没有超标;所述智能合约的格式正确;所述智能合约中涉及到的各用户在所述券商上设立的账户中的资金总额满足投资计划;所述智能合约中涉 及到的股票编号真实存在;所述智能合约中所写的生效时间大于当前时间;所述智能合约即将存入的区块链合法;所述智能合约中的合约条件经所有当事人的同意确认。
  4. 根据权利要求1所述的基于区块链的智能股票申购方法,其特征在于,当所述智能合约为买卖型合约时,所述事务为买入或卖出股票的请求。
  5. 根据权利要求4所述的基于区块链的智能股票申购方法,其特征在于,当所述事务为买入或卖出股票的请求时,所述S5包括以下分步骤:
    S511、判断智能合约中的是否仅涉及一个用户,若是执行S515,若否则执行S512;
    S512、向智能合约中涉及到的券商平台发送共享账号查询请求,若查询到则执行S514,若查询不到则执行S513;所述共享账号为由智能合约中涉及到的各用户共同作为一个股票交易方所共享的账号;
    S513、指示券商平台创建一个所述共享账户;
    S514、向券商平台发送以所述共享账号作为一个股票交易方的股票交易执行请求,并把该操作记录到各对应的区块中;
    S515、向券商平台发送以所述用户在券商平台上开立的账号作为股票交易方的股票交易执行请求,并把该条操作记录到对应的区块中。
  6. 根据权利要求1所述的基于区块链的智能股票申购方法,其特征在于,当所述智能合约为查看型合约时,所述事务为查看该用户的交易记录的请求。
  7. 根据权利要求6所述的基于区块链的智能股票申购方法,其特征在于,当所述事务为查看其他用户的交易记录的请求时,所述S5包括以下分步骤:
    S521、接收作为查看方的用户通过客户端发送的记录查看请求,所述请求包括共享方识别码和智能合约识别码;
    S522、通过所述智能合约识别码调取相关的智能合约;
    S523、根据所述智能合约中的合约条件判断所述记录查看请求是否真实有效,若是则从记录作为共享方的用户所在的区块链节点上,调取该用户的股票交易记录;
    S524、将调取的股票交易记录发送至作为查看方的用户的客户端上。
  8. 一种电子装置,其特征在于,所述电子装置上存储有基于区块链的智能股票申购系统,所述基于区块链的智能股票申购系统包括:
    合约制定模块,用于接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;所述合约条件至少包括双方当事人,当所述智能合约为买卖型合约时,其中一方当事人为券商平台,另一方当事人为包含所述第一用户在内的一个或多个用户;当所述智能合约为查看型合约时,其中一方当事人为另一用户,另一方当事人为所述第一用户;
    合约校验模块,用于根据预设的校验规则对智能合约进行校验,并将校验结果反馈至所述智能合约中双方当事人的客户端;
    判断模块,用于判断校验结果是否为校验通过;
    合约保存模块,用于在校验结果为校验通过后,根据预设的合约保存时间间隔,将位于同一个合约保存时间间隔内成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中双方当事人所在的区块上;
    合约执行模块,用于定期逐条遍历各成立的智能合约的执行状态、事务和触发条件,并判断所述事务是否满足所述触发条件,若满足则执行所述事务;
    记录模块,用于将执行所述事务的操作和执行结果记录到对应的区块中,同时将所述执行结果发送至所述智能合约中双方当事人的客户端。
  9. 一种计算机设备,包括存储器和处理器,其特征在于,所述存储器上存储有可被所述处理器执行的基于区块链的智能股票申购系统,所述系统被所述处理器执行时实现以下步骤的操作:
    S1、接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;所述合约条件至少包括双方当事人,当所述智能合约为买卖型合约时,其中一方当事人为券商平台,另一方当事人为包含所述第一用户在内的一个或多个用户;当所述智能合约为查看型合约时,其中一方当事人为另一用户,另一方当事人为所述第一用户;
    S2、根据预设的校验规则对智能合约进行校验,并将校验结果反馈至所述智能合约中双方当事人的客户端;
    S3、判断校验结果是否为校验通过,若是则智能合约成立并执行S4,若否则智能合约不成立并直接结束;
    S4、根据预设的合约保存时间间隔,将位于同一个合约保存时间间隔内成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中双方当事人所在的区块上;
    S5、定期逐条遍历各成立的智能合约的执行状态、事务和触发条件,并判断所述事务是否满足所述触发条件,若满足则执行所述事务;
    S6、将执行所述事务的操作和执行结果记录到对应的区块中,同时将所述执行结果发送至所述智能合约中双方当事人的客户端。
  10. 根据权利要求9所述的计算机设备,其特征在于,所述合约条件还包括生效时间范围、锚定的股票编号、股票买入或卖出价位、购买股票数量以及触发买入或卖出的股票价位;
    所述校验通过要求所述智能合约满足下述全部校验规则:所述智能合约的字节没有超标;所述智能合约的格式正确;所述智能合约中涉及到的各用户在所述券商上设立的账户中的资金总额满足投资计划;所述智能合约中涉及到的股票编号真实存在;所述智能合约中所写的生效时间大于当前时间;所述智能合约即将存入的区块链合法;所述智能合约中的合约条件经所有当事人的同意确认。
  11. 根据权利要求9所述的计算机设备,其特征在于,当所述智能合约 为买卖型合约时,所述事务为买入或卖出股票的请求。
  12. 根据权利要求11所述的计算机设备,其特征在于,当所述事务为买入或卖出股票的请求时,所述S5包括以下分步骤:
    S511、判断智能合约中的是否仅涉及一个用户,若是执行S515,若否则执行S512;
    S512、向智能合约中涉及到的券商平台发送共享账号查询请求,若查询到则执行S514,若查询不到则执行S513;所述共享账号为由智能合约中涉及到的各用户共同作为一个股票交易方所共享的账号;
    S513、指示券商平台创建一个所述共享账户;
    S514、向券商平台发送以所述共享账号作为一个股票交易方的股票交易执行请求,并把该操作记录到各对应的区块中;
    S515、向券商平台发送以所述用户在券商平台上开立的账号作为股票交易方的股票交易执行请求,并把该条操作记录到对应的区块中。
  13. 根据权利要求9所述的计算机设备,其特征在于,当所述智能合约为查看型合约时,所述事务为查看该用户的交易记录的请求。
  14. 根据权利要求13所述的计算机设备,其特征在于,当所述事务为查看其他用户的交易记录的请求时,所述S5包括以下分步骤:
    S521、接收作为查看方的用户通过客户端发送的记录查看请求,所述请求包括共享方识别码和智能合约识别码;
    S522、通过所述智能合约识别码调取相关的智能合约;
    S523、根据所述智能合约中的合约条件判断所述记录查看请求是否真实有效,若是则从记录作为共享方的用户所在的区块链节点上,调取该用户的股票交易记录;
    S524、将调取的股票交易记录发送至作为查看方的用户的客户端上。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序指令,所述计算机程序指令可被一个或多个处理器执 行,以使所述至少一个处理器执行以下步骤的操作:
    S1、接收第一用户在客户端上选择的合约条件加入到预设的合约模板中生成智能合约;所述合约条件至少包括双方当事人,当所述智能合约为买卖型合约时,其中一方当事人为券商平台,另一方当事人为包含所述第一用户在内的一个或多个用户;当所述智能合约为查看型合约时,其中一方当事人为另一用户,另一方当事人为所述第一用户;
    S2、根据预设的校验规则对智能合约进行校验,并将校验结果反馈至所述智能合约中双方当事人的客户端;
    S3、判断校验结果是否为校验通过,若是则智能合约成立并执行S4,若否则智能合约不成立并直接结束;
    S4、根据预设的合约保存时间间隔,将位于同一个合约保存时间间隔内成立的智能合约打包存入一个区块链的节点上,并通过P2P的方式广播到区块链中与所述智能合约中双方当事人所在的区块上;
    S5、定期逐条遍历各成立的智能合约的执行状态、事务和触发条件,并判断所述事务是否满足所述触发条件,若满足则执行所述事务;
    S6、将执行所述事务的操作和执行结果记录到对应的区块中,同时将所述执行结果发送至所述智能合约中双方当事人的客户端。
  16. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述合约条件还包括生效时间范围、锚定的股票编号、股票买入或卖出价位、购买股票数量以及触发买入或卖出的股票价位;
    所述校验通过要求所述智能合约满足下述全部校验规则:所述智能合约的字节没有超标;所述智能合约的格式正确;所述智能合约中涉及到的各用户在所述券商上设立的账户中的资金总额满足投资计划;所述智能合约中涉及到的股票编号真实存在;所述智能合约中所写的生效时间大于当前时间;所述智能合约即将存入的区块链合法;所述智能合约中的合约条件经所有当事人的同意确认。
  17. 根据权利要求15所述的计算机可读存储介质,其特征在于,当所述智能合约为买卖型合约时,所述事务为买入或卖出股票的请求。
  18. 根据权利要求17所述的计算机可读存储介质,其特征在于,当所述事务为买入或卖出股票的请求时,所述S5包括以下分步骤:
    S511、判断智能合约中的是否仅涉及一个用户,若是执行S515,若否则执行S512;
    S512、向智能合约中涉及到的券商平台发送共享账号查询请求,若查询到则执行S514,若查询不到则执行S513;所述共享账号为由智能合约中涉及到的各用户共同作为一个股票交易方所共享的账号;
    S513、指示券商平台创建一个所述共享账户;
    S514、向券商平台发送以所述共享账号作为一个股票交易方的股票交易执行请求,并把该操作记录到各对应的区块中;
    S515、向券商平台发送以所述用户在券商平台上开立的账号作为股票交易方的股票交易执行请求,并把该条操作记录到对应的区块中。
  19. 根据权利要求15所述的计算机可读存储介质,其特征在于,当所述智能合约为查看型合约时,所述事务为查看该用户的交易记录的请求。
  20. 根据权利要求19所述的计算机可读存储介质,其特征在于,当所述事务为查看其他用户的交易记录的请求时,所述S5包括以下分步骤:
    S521、接收作为查看方的用户通过客户端发送的记录查看请求,所述请求包括共享方识别码和智能合约识别码;
    S522、通过所述智能合约识别码调取相关的智能合约;
    S523、根据所述智能合约中的合约条件判断所述记录查看请求是否真实有效,若是则从记录作为共享方的用户所在的区块链节点上,调取该用户的股票交易记录;
    S524、将调取的股票交易记录发送至作为查看方的用户的客户端上。
PCT/CN2018/095354 2018-05-30 2018-07-12 基于区块链的智能股票申购方法、装置、设备及存储介质 Ceased WO2019227609A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810537960.XA CN108805713A (zh) 2018-05-30 2018-05-30 基于区块链的智能股票申购方法、装置、设备及存储介质
CN201810537960.X 2018-05-30

Publications (1)

Publication Number Publication Date
WO2019227609A1 true WO2019227609A1 (zh) 2019-12-05

Family

ID=64089331

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/095354 Ceased WO2019227609A1 (zh) 2018-05-30 2018-07-12 基于区块链的智能股票申购方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN108805713A (zh)
WO (1) WO2019227609A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615516B (zh) * 2018-12-05 2021-04-16 腾讯科技(深圳)有限公司 资源转移方法、装置、电子设备及存储介质
CN109785134B (zh) * 2019-01-23 2021-06-01 武汉理工大学 用区块链来实现股票交易的管理系统及方法
CN110175854A (zh) * 2019-04-28 2019-08-27 阿里巴巴集团控股有限公司 消费合约处理方法及其系统
CN110135803B (zh) * 2019-04-29 2023-12-08 深圳市元征科技股份有限公司 一种事项管理方法及区块链节点设备
TWI754419B (zh) * 2020-10-16 2022-02-01 國立臺北商業大學 多帳戶股票申購存款資金自動配置之系統及其方法
TWI745125B (zh) * 2020-10-16 2021-11-01 國立臺北商業大學 自動化申購股票之系統及其方法
CN114971911A (zh) * 2022-06-08 2022-08-30 中国工商银行股份有限公司 基于区块链的证券场外交易方法、系统、装置和设备
CN115731052A (zh) * 2022-11-28 2023-03-03 中国银行股份有限公司 理财产品购买请求的处理方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170140408A1 (en) * 2015-11-16 2017-05-18 Bank Of America Corporation Transparent self-managing rewards program using blockchain and smart contracts
CN107038638A (zh) * 2017-02-24 2017-08-11 杭州象链网络技术有限公司 一种基于联盟链的股权登记交易系统构建方法
CN107945021A (zh) * 2017-12-07 2018-04-20 杭州趣链科技有限公司 一种基于区块链智能合约的数字资产管理方法
CN107943469A (zh) * 2017-11-17 2018-04-20 深圳圣马歌科技有限公司 一种智能合约的发布方法及装置
CN108062671A (zh) * 2017-11-03 2018-05-22 深圳市轱辘车联数据技术有限公司 数据交易方法、区块链节点服务器及数据提交终端

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170140408A1 (en) * 2015-11-16 2017-05-18 Bank Of America Corporation Transparent self-managing rewards program using blockchain and smart contracts
CN107038638A (zh) * 2017-02-24 2017-08-11 杭州象链网络技术有限公司 一种基于联盟链的股权登记交易系统构建方法
CN108062671A (zh) * 2017-11-03 2018-05-22 深圳市轱辘车联数据技术有限公司 数据交易方法、区块链节点服务器及数据提交终端
CN107943469A (zh) * 2017-11-17 2018-04-20 深圳圣马歌科技有限公司 一种智能合约的发布方法及装置
CN107945021A (zh) * 2017-12-07 2018-04-20 杭州趣链科技有限公司 一种基于区块链智能合约的数字资产管理方法

Also Published As

Publication number Publication date
CN108805713A (zh) 2018-11-13

Similar Documents

Publication Publication Date Title
WO2019227609A1 (zh) 基于区块链的智能股票申购方法、装置、设备及存储介质
JP6364132B2 (ja) ブロックチェーン取引記録のシステムおよび方法
US20190139136A1 (en) Systems and methods for trading, clearing and settling securities transactions using blockchain technology
US12148033B2 (en) Method and GUI for settlement of commodity contracts denominated in commodity contract tokens
US20190080405A1 (en) System and method of providing a remediation to token offerings
US20180268483A1 (en) Programmable asset systems and methods
US20180204216A1 (en) Transaction settlement systems and methods
US20190073718A1 (en) Session-based electronic trading
EA004995B1 (ru) Определение доверенности на стоимость чистых активов в течение дня для активно управляемого фонда, которым торгуют на бирже
KR20200062640A (ko) 블록체인 기반 미술작품 거래정보 관리 방법 및 블록체인의 노드 장치
TWI659377B (zh) 以智能合約數位化不可量化資產並交易之系統及其方法
US20120173403A1 (en) Systems and Methods For Trading of Privately Held Securities
US20250363485A1 (en) Systems and methods for tracking nft-backed instruments
US20140129406A1 (en) Session-Based Electronic Trading Providing Price Improvement
US20240242279A1 (en) Dynamic format electronic confirmations
US20140379544A1 (en) Methods and systems for expedited trading account funding
US20140129405A1 (en) Session-Based Electronic Trading And Order Handling
CN112866201A (zh) 一种债券交易数据的处理方法和装置
WO2023201359A2 (en) Method, controller, and computer readable medium for detecting expiration of a unique cryptographic identifier on a distributed transfer network
KR101931802B1 (ko) 원리금 수취권 거래 시스템 및 방법
CN109377270B (zh) 交易保障平台及其账户管控方法、终端及可读存储介质
US20120278210A1 (en) Automated Stock Donation System
KR20200045287A (ko) 블록체인을 이용한 비상장 주식 거래 방법 및 그 서버
US20160078534A1 (en) Method and network for transferring a loan
JP2021047574A (ja) 決済情報共有システム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18920532

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02.02.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18920532

Country of ref document: EP

Kind code of ref document: A1