WO2019041759A1 - 服务器、区块链验签解密的方法及存储介质 - Google Patents

服务器、区块链验签解密的方法及存储介质 Download PDF

Info

Publication number
WO2019041759A1
WO2019041759A1 PCT/CN2018/075879 CN2018075879W WO2019041759A1 WO 2019041759 A1 WO2019041759 A1 WO 2019041759A1 CN 2018075879 W CN2018075879 W CN 2018075879W WO 2019041759 A1 WO2019041759 A1 WO 2019041759A1
Authority
WO
WIPO (PCT)
Prior art keywords
decryption
transaction
verification
preset
current
Prior art date
Application number
PCT/CN2018/075879
Other languages
English (en)
French (fr)
Inventor
褚镇飞
陆陈一帆
张松松
段宣斌
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2019041759A1 publication Critical patent/WO2019041759A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5022Workload threshold

Definitions

  • the present application relates to the field of blockchain technology, and in particular, to a server, a blockchain check and decryption method, and a storage medium.
  • the blockchain transaction is packaged into a block form and sent to the blockchain node.
  • the node unpacks the block and obtains the transaction therein.
  • the single thread is used for verification and each transaction is ordered. Perform the submission process.
  • the transaction submission speed often lags behind the transaction generation speed and becomes the bottleneck of the whole system.
  • the purpose of the application is to provide a server, block chain check and decryption method and a storage medium, which aim to perform parallel dynamic check and decryption of transactions through multi-threading, eliminate the bottleneck of transaction submission, improve transaction processing speed and server performance.
  • the present application provides a server, which is a blockchain data node, the server includes a memory and a processor connected to the memory, where the memory is stored on the processor
  • the running verification decryption system when the verification decryption system is executed by the processor, implements the following steps:
  • a transaction parsing step after receiving the transaction block packed by the blockchain sorting node, parsing the transaction block to obtain each transaction in the transaction block;
  • the multi-thread check and decryption step acquires the current transaction request second flow, the current load status information of the CPU of the server, and a preset processing value, based on the current transaction request second flow, the load status information, and a preset process.
  • the value establishes a plurality of threads, and the transaction is allocated to the CPU for dynamic parallel check and decryption based on the established multiple threads;
  • the transaction collection processing step collects the transaction after the verification and decryption in the plurality of threads after performing the verification and decryption, and performs the multi-version check and the transaction persistence processing on the transaction after the verification and decryption to perform the submission.
  • the present application further provides a method for blockchain verification and decryption, and the method for blockchain verification and decryption includes:
  • a transaction parsing step after receiving the transaction block packed by the blockchain sorting node, parsing the transaction block to obtain each transaction in the transaction block;
  • the multi-thread check and decryption step acquires the current transaction request second flow, the current load status information of the CPU of the server, and a preset processing value, based on the current transaction request second flow, the load status information, and a preset process.
  • the value establishes a plurality of threads, and the transaction is allocated to the CPU for dynamic parallel check and decryption based on the established multiple threads;
  • the transaction collection processing step collects the transaction after the verification and decryption in the plurality of threads after performing the verification and decryption, and performs the multi-version check and the transaction persistence processing on the transaction after the verification and decryption to perform the submission.
  • the present application also provides a computer readable storage medium having stored thereon an authentication and decryption system, wherein the verification and decryption system is executed by a processor to implement the above method for blockchain verification and decryption. step.
  • the application has the beneficial effects that the present application parses the received transaction block to obtain a transaction, and establishes multiple threads based on the current transaction request second flow, load status information, and preset processing values, based on the established multiple threads.
  • the transaction is allocated to the CPU for verification and decryption, and after the completion of the verification and decryption, the transactions after the verification and decryption are sorted according to the processing order for submission, and the present application performs parallel dynamic verification and decryption of the transaction by using multiple threads, so that The bottleneck of transaction commit is eliminated, especially on servers with multi-core CPUs, the performance improvement is more significant, and the transaction processing speed is greatly improved.
  • FIG. 1 is a schematic diagram of an optional application environment of each embodiment of the present application.
  • FIG. 2 is a schematic flow chart of an embodiment of a method for blockchain verification and decryption according to the present application.
  • first, second and the like in the present application are for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. .
  • features defining “first” and “second” may include at least one of the features, either explicitly or implicitly.
  • the technical solutions between the various embodiments may be combined with each other, but must be based on the realization of those skilled in the art, and when the combination of the technical solutions is contradictory or impossible to implement, it should be considered that the combination of the technical solutions does not exist. Nor is it within the scope of protection required by this application.
  • FIG. 1 it is a schematic diagram of an application environment of a preferred embodiment of a method for blockchain verification and decryption in the present application.
  • the application environment diagram includes a server 1, a server 2, and a terminal device 3.
  • the server 1 and the server 2 perform data interaction through the network, and the server 2 can perform data interaction with the terminal device 3 through a suitable technology such as a network or a near field communication technology.
  • Server 1 is a blockchain data node
  • server 2 is a blockchain sorting node.
  • the terminal device 3 includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch panel, or a voice control device, for example, a personal computer, a tablet computer, or a smart phone. , Personal Digital Assistant (PDA), game consoles, Internet Protocol Television (IPTV), smart wearable devices, navigation devices, etc., or mobile devices such as digital TVs, desktop computers, Fixed terminal for notebooks, servers, etc.
  • PDA Personal Digital Assistant
  • IPTV Internet Protocol Television
  • the terminal device 3 is used to issue an instruction to the server 2 to pack the transaction block.
  • the server 2 is used to package a transaction into a transaction block and then send it to the server 1.
  • the server 1 or the server 2 is an apparatus capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance.
  • the server 1 may be a computer, a single network server, a server group composed of multiple network servers, or a cloud-based cloud composed of a large number of hosts or network servers, where cloud computing is a type of distributed computing.
  • a super virtual computer consisting of a group of loosely coupled computers.
  • the server 1 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 communicably connected to each other through a system bus, and the memory 11 stores an authentication and decryption system operable on the processor 12.
  • Figure 1 only shows the server 1 with the components 11-13, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead.
  • the memory 11 includes a memory and at least one type of readable storage medium.
  • the memory provides a cache for the operation of the server 1;
  • the readable storage medium can be, for example, 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), a static random access memory (SRAM).
  • a non-volatile storage medium such as a read only memory (ROM), an electrically erasable programmable read only memory (EEPROM), a programmable read only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, or the like.
  • the readable storage medium may be an internal storage unit of the server 1, such as a hard disk of the server 1; in other embodiments, the non-volatile storage medium may also be an external storage device of the server 1, For example, a plug-in hard disk provided on the server 1, a smart memory card (SMC), a Secure Digital (SD) card, a flash card, and the like.
  • the readable storage medium of the memory 11 is generally used to store an operating system installed on the server 1 and various types of application software, such as program codes of the verification and decryption system in an embodiment of the present application. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 12 is typically used to control the overall operation of the server 1, such as performing control and processing associated with data exchange or communication with the server 2.
  • the processor 12 is configured to run program code or process data stored in the memory 11, such as running a verification and decryption system.
  • the network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the server 1 and other electronic devices.
  • the network interface 13 is mainly used to connect the server 1 to the server 2, and establish a data transmission channel and a communication connection between the server 1 and the server 2.
  • the verification decryption system is stored in the memory 11 and includes at least one computer readable instruction stored in the memory 11, the at least one computer readable instruction being executable by the processor 12 to implement the methods of various embodiments of the present application And, the at least one computer readable instruction can be classified into different logic modules depending on the functions implemented by its various parts.
  • the verification verification system described above is implemented by the processor 12 to implement the following steps:
  • the transaction parsing step after receiving the transaction block packed by the blockchain sorting node, parsing the transaction block to obtain each transaction in the transaction block, where each transaction is pre-identified with a processing order;
  • a blockchain sorting node packages each transaction, which is pre-identified with a processing order, into a transaction block, and then sends the transaction block to the blockchain data node.
  • the blockchain data node performs the verification and decryption on a transaction-by-transaction basis.
  • the transaction is, for example, a data-related operation in the database, including a data modification operation, a data deletion operation, and the like, and may of course be other operations.
  • the processing order corresponding to each transaction identifier may identify the transaction in the order of the numbers "1, 2, 3", or identify the transaction in the order of the letters "a, b, c --, etc., After the transaction block is parsed, each transaction is obtained.
  • the multi-thread check and decryption step acquires the current transaction request second flow, the current load status information of the CPU of the server, and a preset processing value, based on the current transaction request second flow, the load status information, and a preset process.
  • the value establishes a plurality of threads, and the transaction is allocated to the CPU for dynamic parallel check and decryption based on the established multiple threads;
  • the CPU of the embodiment is the central processor of the server 1 and the processor 12 is mainly used to run the verification and decryption system.
  • the CPU has multiple CPUs, which are mainly used for verifying and decrypting transactions.
  • the current load status information of the CPU includes the CPU working time ratio (of course, the CPU idle time ratio), and the CPU working time ratio is higher, the CPU usage rate is higher; the preset processing value includes the preset for the test.
  • the maximum value of the decrypted CPU and the preset check decryption time is 16, for example, and the preset check decryption time is, for example, 10 seconds.
  • the current transaction request second traffic, the load status information, and the preset processing value are simultaneously considered to establish a thread: when the current transaction request second traffic is large, and the current CPU working time ratio is small, in order to enable the verification
  • the decryption time reaches the preset checksum decryption time, and a relatively large number of threads can be established; when the current transaction request second traffic is small and the current CPU working time ratio is small, a relatively small number of threads can be established, and the like,
  • the parallel verification of the transaction is decrypted to improve the speed of the verification and decryption.
  • the current transaction request second traffic is 10000/h (10000 data per hour)
  • the current CPU working time ratio is 20%
  • the preset verification decryption time is 10 seconds.
  • 5 threads can be established for Check and decrypt, based on the 5 threads, the transaction is assigned to 5 CPUs for parallel verification and decryption.
  • the embodiment may also dynamically adjust the number of threads. For example, if the decryption time of the check is greater than the preset check decryption time due to other factors, if the current transaction request has a large second flow rate, the current CPU work time ratio is small, and the current number of threads is not When the maximum value of the CPU for the check decryption is exceeded, the number of threads can be increased. Ideally, a thread allocates a transaction to a CPU for checksum decryption, so the increase in the number of threads is equivalent to adjusting the number of CPUs currently used for the checksum decryption.
  • the transaction collection processing step collects the transaction after the verification and decryption in the plurality of threads after performing the verification and decryption, and performs the multi-version check and the transaction persistence processing on the transaction after the verification and decryption to perform the submission.
  • each transaction identifier has a processing order
  • the transactions after the verification and decryption in the plurality of threads are collected, and the transactions are sorted according to the processing order of the transaction identifier, based on the database.
  • the standard processing method performs a multi-version check on the sorted transaction, and then performs the transaction persistence processing on the checked transaction, that is, it is stored and finally submitted.
  • the embodiment parses the received transaction block to obtain a transaction, and establishes multiple threads based on the current transaction request second traffic, load status information, and preset processing values, based on the established multiple threads.
  • the transaction is allocated to the CPU for verification and decryption, and after the verification is completed, the transactions after the verification and decryption are sorted according to the processing order to be submitted, and the embodiment performs parallel dynamic verification and decryption of the transaction by using multiple threads.
  • the bottleneck of transaction commit is eliminated, especially on the server of the multi-core CPU, the performance improvement is more significant, and the transaction processing speed is greatly improved.
  • the multi-threaded verification decryption step includes:
  • the step of verifying the decryption time monitors the verification process in real time.
  • the upper limit value of the CPU operating time ratio is preferably 50% or 66%.
  • Real-time monitoring and dynamic adjustment during the process of verification and decryption in real-time analysis, the time required for the current verification and decryption is greater than the preset verification and decryption time, and the CPU working time ratio does not reach the upper limit, and the current
  • a preset number of threads are added, for example, 5 threads are added, and the transaction is assigned to the CPU for verification and decryption based on all the threads.
  • the multi-threading performs parallel verification and decryption on the transaction, and performs real-time monitoring and dynamic adjustment of the number of threads in the process of verification and decryption, thereby further improving the transaction processing speed and improving the performance of the server.
  • the step of decrypting the multi-threaded check comprises: if the time required for the current check-up decryption is less than or equal to the preset check-decryption time, returning to the real-time analysis whether the time required for the current check-up decryption is greater than the preset Checking the decryption time, and analyzing whether the proportion of the working time of the CPU reaches the upper limit value in real time, and analyzing whether the current number of threads is smaller than a preset maximum value of the CPU for verifying the decryption, and realizing the process of verifying the checksum in real time. Monitor.
  • the transaction is checked and decrypted according to the current number of threads, and the real time is returned at the same time. Analytical steps to monitor the verification process in real time;
  • FIG. 2 is a schematic flowchart of a method for decrypting a blockchain in the present application.
  • the method for verifying and decrypting a blockchain includes the following steps:
  • a transaction parsing step after receiving the transaction block packed by the blockchain sorting node, parsing the transaction block to obtain each transaction in the transaction block;
  • a blockchain sorting node packages each transaction, which is pre-identified with a processing order, into a transactional block format, and then sends the transaction block to the blockchain data node.
  • the blockchain data node performs the verification and decryption on a transaction-by-transaction basis.
  • the transaction is, for example, a data-related operation in the database, including a data modification operation, a data deletion operation, and the like, and may of course be other operations.
  • the processing order corresponding to each transaction identifier may identify the transaction in the order of the numbers "1, 2, 3", or identify the transaction in the order of the letters "a, b, c --, etc., After the transaction block is parsed, each transaction is obtained.
  • the multi-thread check and decryption step obtaining the current transaction request second flow, the current load status information of the CPU of the server, and a preset processing value, based on the current transaction request second flow, the load status information, and a preset
  • the processing value establishes a plurality of threads, and the transaction is allocated to the CPU for dynamic parallel check and decryption based on the established multiple threads;
  • the current load status information of the CPU includes the CPU working time ratio (of course, the CPU idle time ratio), and the CPU working time ratio is higher, the CPU usage rate is higher; the preset processing value includes the preset for the test.
  • the maximum value of the decrypted CPU and the preset check decryption time is 16, for example, and the preset check decryption time is, for example, 10 seconds.
  • the current transaction request second traffic, the load status information, and the preset processing value are simultaneously considered to establish a thread: when the current transaction request second traffic is large, and the current CPU working time ratio is small, in order to enable the verification
  • the decryption time reaches the preset checksum decryption time, and a relatively large number of threads can be established; when the current transaction request second traffic is small and the current CPU working time ratio is small, a relatively small number of threads can be established, and the like,
  • the parallel verification of the transaction is decrypted to improve the speed of the verification and decryption.
  • the current transaction request second traffic is 10000/h (10000 data per hour)
  • the current CPU working time ratio is 20%
  • the preset verification decryption time is 10 seconds.
  • 5 threads can be established for Check and decrypt, based on the 5 threads, the transaction is assigned to 5 CPUs for parallel verification and decryption.
  • the embodiment may also dynamically adjust the number of threads. For example, if the decryption time of the check is greater than the preset check decryption time due to other factors, if the current transaction request has a large second flow rate, the current CPU work time ratio is small, and the current number of threads is not When the maximum value of the CPU for the check decryption is exceeded, the number of threads can be increased. Ideally, a thread allocates a transaction to a CPU for checksum decryption, so the increase in the number of threads is equivalent to adjusting the number of CPUs currently used for the checksum decryption.
  • the transaction collection processing step after completing the verification and decryption, collecting the transaction after the verification and decryption in the plurality of threads, performing the multi-version check and the transaction persistence processing on the transaction after the verification and decryption, and then submitting .
  • each transaction identifier has a processing order
  • the transactions after the verification and decryption in the plurality of threads are collected, and the transactions are sorted according to the processing order of the transaction identifier, based on the database.
  • the standard processing method performs a multi-version check on the sorted transaction, and then performs the transaction persistence processing on the checked transaction, that is, it is stored and finally submitted.
  • the embodiment parses the received transaction block to obtain a transaction, and establishes multiple threads based on the current transaction request second traffic, load status information, and preset processing values, based on the established multiple threads.
  • the transaction is allocated to the CPU for verification and decryption, and after the verification is completed, the transactions after the verification and decryption are sorted according to the processing order to be submitted, and the embodiment performs parallel dynamic verification and decryption of the transaction by using multiple threads.
  • the bottleneck of transaction commit is eliminated, especially on the server of the multi-core CPU, the performance improvement is more significant, and the transaction processing speed is greatly improved.
  • the multi-threaded verification decryption step includes:
  • the step of verifying the decryption time monitors the verification process in real time.
  • the upper limit value of the CPU operating time ratio is preferably 50% or 66%.
  • Real-time monitoring and dynamic adjustment during the process of verification and decryption in real-time analysis, the time required for the current verification and decryption is greater than the preset verification and decryption time, and the CPU working time ratio does not reach the upper limit, and the current
  • a preset number of threads are added, for example, 5 threads are added, and the transaction is assigned to the CPU for verification and decryption based on all the threads.
  • the multi-threading performs parallel verification and decryption on the transaction, and performs real-time monitoring and dynamic adjustment of the number of threads in the process of verification and decryption, thereby further improving the transaction processing speed and improving the performance of the server.
  • the step of decrypting the multi-threaded check comprises: if the time required for the current check-up decryption is less than or equal to the preset check-decryption time, returning to the real-time analysis whether the time required for the current check-up decryption is greater than the preset Checking the decryption time, and analyzing whether the proportion of the working time of the CPU reaches the upper limit value in real time, and analyzing whether the current number of threads is smaller than a preset maximum value of the CPU for verifying the decryption, and realizing the process of verifying the checksum in real time. Monitor.
  • the transaction is checked and decrypted according to the current number of threads, and the real time is returned at the same time. Analytical steps to monitor the verification process in real time;
  • the present application also provides a computer readable storage medium having stored thereon an authentication and decryption system, wherein the verification and decryption system is executed by a processor to implement the above method for blockchain verification and decryption. step.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种服务器、区块链验签解密的方法及存储介质,该方法包括:在接收到区块链排序节点打包的事务块后,对所述事务块进行解析,以获取该事务块中的各个事务(S1);获取当前的事务请求秒流量、所述服务器的CPU当前的负载状况信息及预设的处理值,基于当前的事务请求秒流量、所述负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将所述事务分配给所述CPU进行动态并行验签解密(S2);在完成验签解密后,收集该多个线程中的进行验签解密后的事务,对验签解密后的事务执行多版本检查和事务持久化处理后,以进行提交(S3)。通过多线程对事务进行并行动态验签解密,消除事务提交的瓶颈,提升事务处理速度及服务器性能。

Description

服务器、区块链验签解密的方法及存储介质
本申请要求于2017年9月4日提交中国专利局、申请号为201710785663.2、发明名称为“服务器、区块链验签解密的方法及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及区块链技术领域,尤其涉及一种服务器、区块链验签解密的方法及存储介质。
背景技术
目前,区块链事务被打包成块的形式发送给区块链节点,由节点解开块,获取其中的事务,根据分布式数据库的需要,利用单线程进行验签并按序对每个事务执行提交过程。在系统较繁忙且产生事务较多时,事务提交的速度往往滞后于事务产生的速度,成为整个系统的瓶颈。
发明内容
本申请的目的在于提供一种服务器、区块链验签解密的方法及存储介质,旨在通过多线程对事务进行并行动态验签解密,消除事务提交的瓶颈,提升事务处理速度及服务器性能。
为实现上述目的,本申请提供一种服务器,所述服务器为区块链数据节点,所述服务器包括存储器及与所述存储器连接的处理器,所述存储器中存储有可在所述处理器上运行的验签解密系统,所述验签解密系统被所述处理器执行时实现如下步骤:
事务解析步骤,在接收到区块链排序节点打包的事务块后,对所述事务块进行解析,以获取该事务块中的各个事务;
多线程验签解密步骤,获取当前的事务请求秒流量、所述服务器的CPU 当前的负载状况信息及预设的处理值,基于当前的事务请求秒流量、所述负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将所述事务分配给所述CPU进行动态并行验签解密;
事务收集处理步骤,在完成验签解密后,收集该多个线程中的进行验签解密后的事务,对验签解密后的事务执行多版本检查和事务持久化处理后,以进行提交。
为实现上述目的,本申请还提供一种区块链验签解密的方法,所述区块链验签解密的方法包括:
事务解析步骤,在接收到区块链排序节点打包的事务块后,对所述事务块进行解析,以获取该事务块中的各个事务;
多线程验签解密步骤,获取当前的事务请求秒流量、所述服务器的CPU当前的负载状况信息及预设的处理值,基于当前的事务请求秒流量、所述负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将所述事务分配给所述CPU进行动态并行验签解密;
事务收集处理步骤,在完成验签解密后,收集该多个线程中的进行验签解密后的事务,对验签解密后的事务执行多版本检查和事务持久化处理后,以进行提交。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有验签解密系统,所述验签解密系统被处理器执行时实现上述的区块链验签解密的方法的步骤。
本申请的有益效果是:本申请对接收到的事务块进行解析以获取事务,基于当前的事务请求秒流量、负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将事务分配给CPU进行验签解密,并在在完成验签解密后,按照处理顺序将进行验签解密后的事务进行排序以进行提交,本申请通过多线程对事务进行并行动态验签解密,使得事务提交的瓶颈得以消除, 尤其在多核CPU的服务器上,性能提升更加显著,大大提高事务处理速度。
附图说明
图1为本申请各个实施例一可选的应用环境示意图;
图2为本申请区块链验签解密的方法一实施例的流程示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
参阅图1所示,是本申请区块链验签解密的方法的较佳实施例的应用环境示意图。该应用环境示意图包括服务器1、服务器2及终端设备3。服务器1与服务器2通过网络进行数据交互,服务器2可以通过网络、近场通信技术等适合的技术与终端设备3进行数据交互。服务器1为区块链数据节点,服务器2为区块链排序节点。
所述终端设备3包括,但不限于,任何一种可与用户通过键盘、鼠标、 遥控器、触摸板或者声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备、导航装置等等的可移动设备,或者诸如数字TV、台式计算机、笔记本、服务器等等的固定终端。终端设备3用于向服务器2发出打包事务块的指令。
所述服务器2用于将事务打包为事务块然后发送给服务器1。
所述服务器1或服务器2是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。所述服务器1可以是计算机、也可以是单个网络服务器、多个网络服务器组成的服务器组或者基于云计算的由大量主机或者网络服务器构成的云,其中云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。
在本实施例中,服务器1可包括,但不仅限于,可通过系统总线相互通信连接的存储器11、处理器12、网络接口13,存储器11存储有可在处理器12上运行的验签解密系统。需要指出的是,图1仅示出了具有组件11-13的服务器1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,存储器11包括内存及至少一种类型的可读存储介质。内存为服务器1的运行提供缓存;可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等的非易失性存储介质。在一些实施例中,可读存储介质可以是服务器1的内部存储单元,例如该服务器1的硬盘;在另一些实施例中,该非易失性存储介质也可以是服务器1的外部存储设备,例如服务器1上配备的插接式硬盘, 智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。本实施例中,存储器11的可读存储介质通常用于存储安装于服务器1的操作系统和各类应用软件,例如本申请一实施例中的验签解密系统的程序代码等。此外,存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器12通常用于控制所述服务器1的总体操作,例如执行与所述服务器2进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行验签解密系统等。
所述网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在所述服务器1与其他电子设备之间建立通信连接。本实施例中,网络接口13主要用于将服务器1与服务器2相连,在服务器1与服务器2之间建立数据传输通道和通信连接。
所述验签解密系统存储在存储器11中,包括至少一个存储在存储器11中的计算机可读指令,该至少一个计算机可读指令可被处理器器12执行,以实现本申请各实施例的方法;以及,该至少一个计算机可读指令依据其各部分所实现的功能不同,可被划为不同的逻辑模块。
在一实施例中,上述验签解密系统被所述处理器12执行时实现如下步骤:
事务解析步骤,在接收到区块链排序节点打包的事务块后,对所述事务块进行解析,以获取该事务块中的各个事务,其中,各个事务预先标识有处理顺序;
在区块链网络中,区块链排序节点将预先标识有处理顺序的各个事务打 包成事务块的形式,然后将事务块发送给区块链数据节点。由区块链数据节点逐个事务块进行验签解密。
其中,事务例如为数据库中的数据相关的操作,包括数据的修改操作、数据的删除操作等,当然也可以是其他的操作。将各个事务标识对应的处理顺序,例如可以按照数字“1、2、3…”的顺序对事务进行标识,或者按照字母“a、b、c…”的顺序对事务进行标识,等等,对事务块解析后得到各个事务。
多线程验签解密步骤,获取当前的事务请求秒流量、所述服务器的CPU当前的负载状况信息及预设的处理值,基于当前的事务请求秒流量、所述负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将所述事务分配给所述CPU进行动态并行验签解密;
其中,本实施例的CPU与处理器12同为服务器1的中央处理器,处理器12主要用于运行验签解密系统,CPU有多个,主要用于对事务进行验签解密。
其中,CPU当前的负载状况信息包括CPU工作时间比例(当然也可以是CPU空闲时间比例),CPU工作时间比例越大则CPU的使用率越高;预设的处理值包括预设的用于验签解密的CPU的最大数值、预设的验签解密时间,预设的用于验签解密的CPU的最大数值例如为16个,预设的验签解密时间例如为10秒。
本实施例中,同时考虑当前的事务请求秒流量、负载状况信息及预设的处理值来建立线程:在当前的事务请求秒流量较大、当前的CPU工作时间比例较小时,为了使得验签解密时间达到预设的验签解密时间,可以建立数量相对多的线程;在当前的事务请求秒流量较小、当前的CPU工作时间比例较小时,可以建立数量相对少的线程,等等,实现事务的并行验签解密,提高验签解密的速度。
例如:当前的事务请求秒流量为10000/h(每小时10000条数据),当 前的CPU工作时间比例为20%,预设的验签解密时间为10秒,经分析可以建立5个线程用于验签解密,基于该5个线程将事务分配给5个CPU进行并行验签解密。
此外,在CPU进行验签解密的实际过程中可能出现其他因素影响验签解密的时间,为了使得验签解密时间不大于预设的验签解密时间,本实施例还可以动态调整线程的数量,例如,在受其他因素的影响使得验签解密时间大于预设的验签解密时间的情况下,若当前的事务请求秒流量较大、当前的CPU工作时间比例较小,以及当前线程的数量不超过预设的用于验签解密的CPU的最大数值时,可以增加线程的数量。理想状态下,一个线程分配事务给一个CPU进行验签解密,因此线程数量的增加的同时,也相当于调整当前用于验签解密CPU的数量。
事务收集处理步骤,在完成验签解密后,收集该多个线程中的进行验签解密后的事务,对验签解密后的事务执行多版本检查和事务持久化处理后,以进行提交。
本实施例中,由于每个事务标识有处理顺序,在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照事务标识的处理顺序对其进行排序,基于数据库的标准处理方法对排序后的事务进行多版本检查,然后将检查后的事务进行事务持久化处理,即将其进行存储,最后提交。
与现有技术相比,本实施例对接收到的事务块进行解析以获取事务,基于当前的事务请求秒流量、负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将事务分配给CPU进行验签解密,并在在完成验签解密后,按照处理顺序将进行验签解密后的事务进行排序以进行提交,本实施例通过多线程对事务进行并行动态验签解密,使得事务提交的瓶颈得以消除,尤其在多核CPU的服务器上,性能提升更加显著,大大提高事务处理速度。
在一优选的实施例中,在上述的图1的实施例的基础上,上述多线程验签解密步骤包括:
根据当前的事务请求秒流量及CPU工作时间比例实时分析当前验签解密所需的时间是否大于该预设的验签解密时间,且实时分析CPU的工作时间比例是否达到上限值,以及分析当前线程的数量是否小于预设的用于验签解密的CPU的最大数值;
若当前验签解密所需的时间大于该预设的验签解密时间,且CPU工作时间比例未达到上限值,以及当前线程的数量小于预设的用于验签解密的CPU的最大数值,则增加预设数量的线程,以对所述事务进行验签解密,且返回上述的根据当前的事务请求秒流量及CPU工作时间比例实时分析当前验签解密所需的时间是否大于该预设的验签解密时间的步骤,以实时对验签解密过程进行监控。
本实施例中,CPU工作时间比例的上限值优选为50%或者为66%。在验签解密的过程中进行实时监控及动态调整:在实时分析得出当前验签解密所需的时间大于该预设的验签解密时间,且CPU工作时间比例未达到上限值,以及当前线程的数量小于预设的用于验签解密的CPU的最大数值时,则增加预设数量的线程,例如增加5个线程,基于所有的线程将事务分配给CPU进行验签解密。
本实施例基于多线程对事务进行并行验签解密,并在验签解密的过程中进行实时监控及线程数量的动态调整,进一步提高事务处理速度,提升服务器的性能。
优选地,上述多线程验签解密步骤包括:若当前验签解密所需的时间小于等于该预设的验签解密时间,则返回实时分析当前验签解密所需的时间是否大于该预设的验签解密时间,且实时分析CPU的工作时间比例是否达到上限值,以及分析当前线程的数量是否小于预设的用于验签解密的CPU的 最大数值的步骤,以实时对验签解密过程进行监控。
优选地,若当前验签解密所需的时间大于该预设的验签解密时间,且CPU工作时间比例达到上限值,则按照当前的线程的数量对事务进行验签解密,同时返回上述实时分析的步骤,以实时对验签解密过程进行监控;以及
若当前验签解密所需的时间大于该预设的验签解密时间,且CPU工作时间比例未达到上限值,以及当前线程的数量等于预设的用于验签解密的CPU的最大数值,则按照当前的线程的数量对事务进行验签解密,同时返回上述实时分析的步骤,以实时对验签解密过程进行监控。
如图2所示,图2为本申请区块链验签解密的方法一实施例的流程示意图,该区块链验签解密的方法包括以下步骤:
S1,事务解析步骤,在接收到区块链排序节点打包的事务块后,对所述事务块进行解析,以获取该事务块中的各个事务;
在区块链网络中,区块链排序节点将预先标识有处理顺序的各个事务打包成事务块的形式,然后将事务块发送给区块链数据节点。由区块链数据节点逐个事务块进行验签解密。
其中,事务例如为数据库中的数据相关的操作,包括数据的修改操作、数据的删除操作等,当然也可以是其他的操作。将各个事务标识对应的处理顺序,例如可以按照数字“1、2、3…”的顺序对事务进行标识,或者按照字母“a、b、c…”的顺序对事务进行标识,等等,对事务块解析后得到各个事务。
S2,多线程验签解密步骤,获取当前的事务请求秒流量、所述服务器的CPU当前的负载状况信息及预设的处理值,基于当前的事务请求秒流量、所述负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将所述事务分配给所述CPU进行动态并行验签解密;
其中,CPU当前的负载状况信息包括CPU工作时间比例(当然也可以 是CPU空闲时间比例),CPU工作时间比例越大则CPU的使用率越高;预设的处理值包括预设的用于验签解密的CPU的最大数值、预设的验签解密时间,预设的用于验签解密的CPU的最大数值例如为16个,预设的验签解密时间例如为10秒。
本实施例中,同时考虑当前的事务请求秒流量、负载状况信息及预设的处理值来建立线程:在当前的事务请求秒流量较大、当前的CPU工作时间比例较小时,为了使得验签解密时间达到预设的验签解密时间,可以建立数量相对多的线程;在当前的事务请求秒流量较小、当前的CPU工作时间比例较小时,可以建立数量相对少的线程,等等,实现事务的并行验签解密,提高验签解密的速度。
例如:当前的事务请求秒流量为10000/h(每小时10000条数据),当前的CPU工作时间比例为20%,预设的验签解密时间为10秒,经分析可以建立5个线程用于验签解密,基于该5个线程将事务分配给5个CPU进行并行验签解密。
此外,在CPU进行验签解密的实际过程中可能出现其他因素影响验签解密的时间,为了使得验签解密时间不大于预设的验签解密时间,本实施例还可以动态调整线程的数量,例如,在受其他因素的影响使得验签解密时间大于预设的验签解密时间的情况下,若当前的事务请求秒流量较大、当前的CPU工作时间比例较小,以及当前线程的数量不超过预设的用于验签解密的CPU的最大数值时,可以增加线程的数量。理想状态下,一个线程分配事务给一个CPU进行验签解密,因此线程数量的增加的同时,也相当于调整当前用于验签解密CPU的数量。
S3,事务收集处理步骤,在完成验签解密后,收集该多个线程中的进行验签解密后的事务,对验签解密后的事务执行多版本检查和事务持久化处理后,以进行提交。
本实施例中,由于每个事务标识有处理顺序,在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照事务标识的处理顺序对其进行排序,基于数据库的标准处理方法对排序后的事务进行多版本检查,然后将检查后的事务进行事务持久化处理,即将其进行存储,最后提交。
与现有技术相比,本实施例对接收到的事务块进行解析以获取事务,基于当前的事务请求秒流量、负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将事务分配给CPU进行验签解密,并在在完成验签解密后,按照处理顺序将进行验签解密后的事务进行排序以进行提交,本实施例通过多线程对事务进行并行动态验签解密,使得事务提交的瓶颈得以消除,尤其在多核CPU的服务器上,性能提升更加显著,大大提高事务处理速度。
在一优选的实施例中,在上述的图2的实施例的基础上,上述多线程验签解密步骤包括:
根据当前的事务请求秒流量及CPU工作时间比例实时分析当前验签解密所需的时间是否大于该预设的验签解密时间,且实时分析CPU的工作时间比例是否达到上限值,以及分析当前线程的数量是否小于预设的用于验签解密的CPU的最大数值;
若当前验签解密所需的时间大于该预设的验签解密时间,且CPU工作时间比例未达到上限值,以及当前线程的数量小于预设的用于验签解密的CPU的最大数值,则增加预设数量的线程,以对所述事务进行验签解密,且返回上述的根据当前的事务请求秒流量及CPU工作时间比例实时分析当前验签解密所需的时间是否大于该预设的验签解密时间的步骤,以实时对验签解密过程进行监控。
本实施例中,CPU工作时间比例的上限值优选为50%或者为66%。在验签解密的过程中进行实时监控及动态调整:在实时分析得出当前验签解密 所需的时间大于该预设的验签解密时间,且CPU工作时间比例未达到上限值,以及当前线程的数量小于预设的用于验签解密的CPU的最大数值时,则增加预设数量的线程,例如增加5个线程,基于所有的线程将事务分配给CPU进行验签解密。
本实施例基于多线程对事务进行并行验签解密,并在验签解密的过程中进行实时监控及线程数量的动态调整,进一步提高事务处理速度,提升服务器的性能。
优选地,上述多线程验签解密步骤包括:若当前验签解密所需的时间小于等于该预设的验签解密时间,则返回实时分析当前验签解密所需的时间是否大于该预设的验签解密时间,且实时分析CPU的工作时间比例是否达到上限值,以及分析当前线程的数量是否小于预设的用于验签解密的CPU的最大数值的步骤,以实时对验签解密过程进行监控。
优选地,若当前验签解密所需的时间大于该预设的验签解密时间,且CPU工作时间比例达到上限值,则按照当前的线程的数量对事务进行验签解密,同时返回上述实时分析的步骤,以实时对验签解密过程进行监控;以及
若当前验签解密所需的时间大于该预设的验签解密时间,且CPU工作时间比例未达到上限值,以及当前线程的数量等于预设的用于验签解密的CPU的最大数值,则按照当前的线程的数量对事务进行验签解密,同时返回上述实时分析的步骤,以实时对验签解密过程进行监控。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有验签解密系统,所述验签解密系统被处理器执行时实现上述的区块链验签解密的方法的步骤。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通 过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种服务器,所述服务器为区块链数据节点,其特征在于,所述服务器包括存储器及与所述存储器连接的处理器,所述存储器中存储有可在所述处理器上运行的验签解密系统,所述验签解密系统被所述处理器执行时实现如下步骤:
    事务解析步骤,在接收到区块链排序节点打包的事务块后,对所述事务块进行解析,以获取该事务块中的各个事务;
    多线程验签解密步骤,获取当前的事务请求秒流量、所述服务器的CPU当前的负载状况信息及预设的处理值,基于当前的事务请求秒流量、所述负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将所述事务分配给所述CPU进行动态并行验签解密;
    事务收集处理步骤,在完成验签解密后,收集该多个线程中的进行验签解密后的事务,对验签解密后的事务执行多版本检查和事务持久化处理后,以进行提交。
  2. 根据权利要求1所述的服务器,其特征在于,所述负载状况信息包括CPU工作时间比例,预设的处理值包括预设的用于验签解密的CPU的最大数值、预设的验签解密时间,所述多线程验签解密步骤包括:
    根据当前的事务请求秒流量及CPU工作时间比例实时分析当前验签解密所需的时间是否大于该预设的验签解密时间,且实时分析CPU的工作时间比例是否达到上限值,以及分析当前线程的数量是否小于预设的用于验签解密的CPU的最大数值;
    若当前验签解密所需的时间大于该预设的验签解密时间,且CPU工作时间比例未达到上限值,以及当前线程的数量小于预设的用于验签解密的CPU的最大数值,则增加预设数量的线程,以对所述事务进行验签解密。
  3. 根据权利要求2所述的服务器,其特征在于,所述多线程验签解密步骤还包括:
    若当前验签解密所需的时间小于等于该预设的验签解密时间,则返回实时分析当前验签解密所需的时间是否大于该预设的验签解密时间的步骤。
  4. 根据权利要求1所述的服务器,其特征在于,各个事务预先标识有处理顺序,所述事务收集处理步骤包括:
    在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照所述处理顺序将进行验签解密后的事务进行排序,对排序后的事务执行多版本检查和事务持久化处理后,以进行提交。
  5. 根据权利要求2所述的服务器,其特征在于,各个事务预先标识有处理顺序,所述事务收集处理步骤包括:
    在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照所述处理顺序将进行验签解密后的事务进行排序,对排序后的事务执行多版本检查和事务持久化处理后,以进行提交。
  6. 根据权利要求3所述的服务器,其特征在于,各个事务预先标识有处理顺序,所述事务收集处理步骤包括:
    在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照所述处理顺序将进行验签解密后的事务进行排序,对排序后的事务执行多版本检查和事务持久化处理后,以进行提交。
  7. 根据权利要求1所述的服务器,其特征在于,所述事务包括对数据库中的数据进行编辑的操作。
  8. 一种区块链验签解密的方法,其特征在于,所述区块链验签解密的方法包括:
    事务解析步骤,在接收到区块链排序节点打包的事务块后,对所述事务块进行解析,以获取该事务块中的各个事务;
    多线程验签解密步骤,获取当前的事务请求秒流量、所述服务器的CPU当前的负载状况信息及预设的处理值,基于当前的事务请求秒流量、所述负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将所述事务分配给所述CPU进行动态并行验签解密;
    事务收集处理步骤,在完成验签解密后,收集该多个线程中的进行验签解密后的事务,对验签解密后的事务执行多版本检查和事务持久化处理后,以进行提交。
  9. 根据权利要求8所述的区块链验签解密的方法,其特征在于,所述负载状况信息包括CPU工作时间比例,预设的处理值包括预设的用于验签解密的CPU的最大数值、预设的验签解密时间,所述多线程验签解密步骤包括:
    根据当前的事务请求秒流量及CPU工作时间比例实时分析当前验签解密所需的时间是否大于该预设的验签解密时间,且实时分析CPU的工作时间比例是否达到上限值,以及分析当前线程的数量是否小于预设的用于验签解密的CPU的最大数值;
    若当前验签解密所需的时间大于该预设的验签解密时间,且CPU工作时间比例未达到上限值,以及当前线程的数量小于预设的用于验签解密的CPU的最大数值,则增加预设数量的线程,以对所述事务进行验签解密。
  10. 根据权利要求9所述的区块链验签解密的方法,其特征在于,所述多线程验签解密步骤还包括:
    若当前验签解密所需的时间小于等于该预设的验签解密时间,则返回实时分析当前验签解密所需的时间是否大于该预设的验签解密时间的步骤。
  11. 根据权利要求8所述的区块链验签解密的方法,其特征在于,各个事务预先标识有处理顺序,所述事务收集处理步骤包括:
    在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照 所述处理顺序将进行验签解密后的事务进行排序,对排序后的事务执行多版本检查和事务持久化处理后,以进行提交。
  12. 根据权利要求9所述的区块链验签解密的方法,其特征在于,各个事务预先标识有处理顺序,所述事务收集处理步骤包括:
    在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照所述处理顺序将进行验签解密后的事务进行排序,对排序后的事务执行多版本检查和事务持久化处理后,以进行提交。
  13. 根据权利要求10所述的区块链验签解密的方法,其特征在于,各个事务预先标识有处理顺序,所述事务收集处理步骤包括:
    在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照所述处理顺序将进行验签解密后的事务进行排序,对排序后的事务执行多版本检查和事务持久化处理后,以进行提交。
  14. 根据权利要求8所述的区块链验签解密的方法,其特征在于,所述事务包括对数据库中的数据进行编辑的操作。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有验签解密系统,所述验签解密系统被所述处理器执行时实现如下步骤:
    事务解析步骤,在接收到区块链排序节点打包的事务块后,对所述事务块进行解析,以获取该事务块中的各个事务;
    多线程验签解密步骤,获取当前的事务请求秒流量、所述服务器的CPU当前的负载状况信息及预设的处理值,基于当前的事务请求秒流量、所述负载状况信息及预设的处理值建立多个线程,基于建立的多个线程将所述事务分配给所述CPU进行动态并行验签解密;
    事务收集处理步骤,在完成验签解密后,收集该多个线程中的进行验签解密后的事务,对验签解密后的事务执行多版本检查和事务持久化处理后, 以进行提交。
  16. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述负载状况信息包括CPU工作时间比例,预设的处理值包括预设的用于验签解密的CPU的最大数值、预设的验签解密时间,所述多线程验签解密步骤包括:
    根据当前的事务请求秒流量及CPU工作时间比例实时分析当前验签解密所需的时间是否大于该预设的验签解密时间,且实时分析CPU的工作时间比例是否达到上限值,以及分析当前线程的数量是否小于预设的用于验签解密的CPU的最大数值;
    若当前验签解密所需的时间大于该预设的验签解密时间,且CPU工作时间比例未达到上限值,以及当前线程的数量小于预设的用于验签解密的CPU的最大数值,则增加预设数量的线程,以对所述事务进行验签解密。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述多线程验签解密步骤还包括:
    若当前验签解密所需的时间小于等于该预设的验签解密时间,则返回实时分析当前验签解密所需的时间是否大于该预设的验签解密时间的步骤。
  18. 根据权利要求15所述的计算机可读存储介质,其特征在于,各个事务预先标识有处理顺序,所述事务收集处理步骤包括:
    在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照所述处理顺序将进行验签解密后的事务进行排序,对排序后的事务执行多版本检查和事务持久化处理后,以进行提交。
  19. 根据权利要求16所述的计算机可读存储介质,其特征在于,各个事务预先标识有处理顺序,所述事务收集处理步骤包括:
    在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照所述处理顺序将进行验签解密后的事务进行排序,对排序后的事务执行多版 本检查和事务持久化处理后,以进行提交。
  20. 根据权利要求17所述的计算机可读存储介质,其特征在于,各个事务预先标识有处理顺序,所述事务收集处理步骤包括:
    在完成验签解密后,收集该多个线程中的进行验签解密后的事务,按照所述处理顺序将进行验签解密后的事务进行排序,对排序后的事务执行多版本检查和事务持久化处理后,以进行提交。
PCT/CN2018/075879 2017-09-04 2018-02-08 服务器、区块链验签解密的方法及存储介质 WO2019041759A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710785663.2A CN107729137B (zh) 2017-09-04 2017-09-04 服务器、区块链验签解密的方法及存储介质
CN201710785663.2 2017-09-04

Publications (1)

Publication Number Publication Date
WO2019041759A1 true WO2019041759A1 (zh) 2019-03-07

Family

ID=61205649

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/075879 WO2019041759A1 (zh) 2017-09-04 2018-02-08 服务器、区块链验签解密的方法及存储介质

Country Status (2)

Country Link
CN (1) CN107729137B (zh)
WO (1) WO2019041759A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110659905A (zh) * 2019-09-20 2020-01-07 腾讯科技(深圳)有限公司 交易验证方法、装置、终端设备以及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471755A (zh) * 2018-05-09 2019-11-19 厦门本能管家科技有限公司 一种多进程打块方法及系统
CN109614206A (zh) * 2018-10-25 2019-04-12 深圳壹账通智能科技有限公司 区块链事务处理的装置、方法及存储介质
CN110245006B (zh) * 2019-05-07 2023-05-02 深圳壹账通智能科技有限公司 区块链事务的处理方法、装置、设备及存储介质
CN110245126A (zh) * 2019-05-20 2019-09-17 深圳壹账通智能科技有限公司 区块处理方法、装置、计算机设备和存储介质
CN110175070B (zh) * 2019-05-21 2021-10-29 网易(杭州)网络有限公司 分布式数据库的管理方法、装置、系统、介质及电子设备
CN111241594B (zh) * 2020-01-06 2023-10-13 平安科技(深圳)有限公司 交易信息的加签方法、装置、计算机设备和存储介质
CN112215601B (zh) * 2020-05-29 2022-09-30 支付宝(杭州)信息技术有限公司 基于区块链的业务处理方法、业务处理方法、装置及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1365363A2 (de) * 2002-05-02 2003-11-26 Giesecke & Devrient GmbH Verfahren zur Ausführung einer Datentransaktion mittels einer aus einer Haupt- und einer trennbaren Hilfskomponente bestehenden Transaktionsvorrichtung
CN106548330A (zh) * 2016-10-27 2017-03-29 上海亿账通区块链科技有限公司 基于区块链的交易验证方法及系统
CN107018180A (zh) * 2017-03-22 2017-08-04 南京理工大学 基于jseda的智能交通大数据平台分发共享系统
CN107040422A (zh) * 2017-04-25 2017-08-11 浙江工业大学 一种基于物化缓存的网络大数据可视化方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053859B (zh) * 2009-11-09 2013-03-27 中国移动通信集团甘肃有限公司 批量数据处理的方法与装置
CN105068861A (zh) * 2015-07-09 2015-11-18 合肥君正科技有限公司 一种事务执行方法及装置
US10255108B2 (en) * 2016-01-26 2019-04-09 International Business Machines Corporation Parallel execution of blockchain transactions
CN105630609B (zh) * 2016-02-24 2021-05-11 杭州复杂美科技有限公司 区块链的打包存储方法
CN106980649B (zh) * 2017-02-28 2020-07-10 创新先进技术有限公司 写入区块链业务数据的方法和装置及业务子集合确定方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1365363A2 (de) * 2002-05-02 2003-11-26 Giesecke & Devrient GmbH Verfahren zur Ausführung einer Datentransaktion mittels einer aus einer Haupt- und einer trennbaren Hilfskomponente bestehenden Transaktionsvorrichtung
CN106548330A (zh) * 2016-10-27 2017-03-29 上海亿账通区块链科技有限公司 基于区块链的交易验证方法及系统
CN107018180A (zh) * 2017-03-22 2017-08-04 南京理工大学 基于jseda的智能交通大数据平台分发共享系统
CN107040422A (zh) * 2017-04-25 2017-08-11 浙江工业大学 一种基于物化缓存的网络大数据可视化方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110659905A (zh) * 2019-09-20 2020-01-07 腾讯科技(深圳)有限公司 交易验证方法、装置、终端设备以及存储介质
CN110659905B (zh) * 2019-09-20 2023-09-22 腾讯科技(深圳)有限公司 交易验证方法、装置、终端设备以及存储介质

Also Published As

Publication number Publication date
CN107729137A (zh) 2018-02-23
CN107729137B (zh) 2021-06-22

Similar Documents

Publication Publication Date Title
WO2019041759A1 (zh) 服务器、区块链验签解密的方法及存储介质
US11544154B2 (en) Systems and methods for monitoring distributed database deployments
WO2020082576A1 (zh) 区块链事务处理的装置、方法及存储介质
WO2019140828A1 (zh) 电子装置、分布式系统日志查询方法及存储介质
WO2019169758A1 (zh) 数据处理装置、方法及计算机可读存储介质
US10460123B1 (en) System and method for automatically securing sensitive data in public cloud using a serverless architecture
US20140289286A1 (en) System and method for performance tuning of garbage collection algorithms
WO2019179026A1 (zh) 电子装置、集群访问域名自动生成方法及存储介质
CN111865970B (zh) 用于实现接口幂等性的方法和装置
US20160323188A1 (en) Managing state for updates to load balancers of an auto scaling group
WO2019136812A1 (zh) 电子装置、数据调用日志生成及查询方法及存储介质
CN111880967A (zh) 云场景下的文件备份方法、装置、介质和电子设备
WO2019148728A1 (zh) 电子装置、分布式系统执行任务分配方法及存储介质
US8484342B2 (en) Organizing individual java client request flows into a single server transaction
CN107133233B (zh) 一种配置数据查询的处理方法及装置
US9507655B2 (en) Tracking asynchronous entry points for an application
WO2019169771A1 (zh) 电子装置、访问指令信息获取方法及存储介质
WO2021174882A1 (zh) 数据分片校验方法、装置、计算机设备及可读存储介质
CN113568764A (zh) 用于微服务的用户信息获取方法、装置、设备及介质
CN113010542A (zh) 业务数据处理方法、装置、计算机设备及存储介质
CN111913861A (zh) 物联网系统的性能测试方法、装置、设备及介质
CN113132400B (zh) 业务处理方法、装置、计算机系统及存储介质
WO2019001271A1 (zh) 开发平台装置、获取保单号的方法及计算机可读存储介质
US8904411B2 (en) Framework for system communication for handling data
CN110769027A (zh) 服务请求处理方法、装置、计算机设备及存储介质

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: 18849534

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 09.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18849534

Country of ref document: EP

Kind code of ref document: A1