WO2021139113A1 - Method and apparatus for signing transaction data, computer device, and storage medium - Google Patents

Method and apparatus for signing transaction data, computer device, and storage medium Download PDF

Info

Publication number
WO2021139113A1
WO2021139113A1 PCT/CN2020/099311 CN2020099311W WO2021139113A1 WO 2021139113 A1 WO2021139113 A1 WO 2021139113A1 CN 2020099311 W CN2020099311 W CN 2020099311W WO 2021139113 A1 WO2021139113 A1 WO 2021139113A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
endorsement
transaction
cpu usage
information
Prior art date
Application number
PCT/CN2020/099311
Other languages
French (fr)
Chinese (zh)
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 WO2021139113A1 publication Critical patent/WO2021139113A1/en

Links

Classifications

    • 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
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of blockchain technology, in particular to a method for signing high-concurrency transaction information based on blockchain, a device for signing high-concurrency transaction information based on blockchain, computer equipment, and computer-readable instructions stored there. Storage medium.
  • Blockchain is generally understood as a distributed ledger, and its essence is also a distributed database.
  • golang language has the characteristics of high development efficiency and simple use
  • many blockchain systems use golang language as the development language.
  • high-concurrency signature verification is required, due to the golang language
  • the characteristics of lightweight threads and garbage collection management mechanisms keep the system's CPU usage at a low level.
  • the signature processing is performed, because the memory garbage needs to be recycled, it may be necessary to suspend the thread currently executing the signature processing, which affects the overall signature verification efficiency.
  • This application provides a blockchain-based method, device, computer equipment and storage medium for signing high-concurrency transaction information, which are used to improve the stability of high-concurrency signing processing operations and the utilization rate of the system CPU.
  • the present application provides a method for signing high-concurrency transaction information based on a blockchain, and the method for signing high-concurrency transaction information based on a blockchain includes.
  • the transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
  • the present application also provides a block chain-based high-concurrency transaction information signing device, which includes the block chain-based high-concurrency transaction information signing device.
  • the status acquisition module is used to acquire the CPU usage of the system when it is detected that the signature function is started.
  • the mode determination module is used to obtain the corresponding target endorsement mode according to the CPU usage.
  • the information generating module is used to obtain transaction result information corresponding to the target transaction, and obtain corresponding signature information based on the transaction result information.
  • the signature processing module is configured to perform signature processing on the transaction information corresponding to the target transaction according to the signature information and the target signature method.
  • the present application also provides a computer device, which includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, and the computer program includes a program Instructions, the processor is used to execute the program instructions of the memory, where.
  • the transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
  • the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used for Implement the following steps.
  • the transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
  • the present application discloses a method, device, computer equipment and storage medium for signing high-concurrency transaction information of the blockchain.
  • the CPU usage of the system is obtained, and then the CPU usage of the system is obtained according to the system's CPU usage.
  • the situation determines the target endorsement method for the endorsement process, and then after the target endorsement method for the endorsement process is determined, the transaction result information corresponding to the target transaction is obtained, and finally the target endorsement method and the information obtained according to the transaction result information are used
  • the endorsement information for endorsement processing performs corresponding endorsement processing on the transaction information.
  • the CPU usage of the system is monitored, and the current signing method is determined according to the CPU usage of the system to ensure that the signing process is not affected by others ,
  • the endorsement operation can be completed normally, which improves the stability of concurrent endorsement processing and the utilization rate of the system CPU.
  • FIG. 1 is a schematic flowchart of a method for signing high-concurrency transaction information based on a blockchain in an embodiment of the application.
  • FIG. 2 is a schematic flowchart of the steps of determining whether to change the default signature method in an embodiment of the application.
  • FIG. 3 is a schematic flowchart of a method for signing high concurrent transaction information based on a blockchain in another embodiment of the application.
  • Figure 4 is a block diagram of a block chain-based high-concurrency transaction information signing device in an embodiment of the application.
  • Fig. 5 is a structural block diagram of a mode determination module in an embodiment of the application.
  • Fig. 6 is a block diagram of a block chain-based high-concurrency transaction information signing device in another embodiment of the application.
  • Fig. 7 is a block diagram of a block chain-based high-concurrency transaction information signing device in another embodiment of the application.
  • FIG. 8 is a schematic block diagram of the structure of a computer device in an embodiment of the application.
  • Fig. 1 is a schematic flowchart of a method for signing high-concurrency transaction information based on a blockchain in an embodiment of the application.
  • the method for signing high concurrent transaction information based on the blockchain includes.
  • Step S10 When it is detected that the signing function is activated, the CPU usage of the system is acquired.
  • the basic default language used is the golang language, so when the transaction information is signed, the golang language will generally be used to sign the transaction information.
  • golang language it has two characteristic mechanisms: lightweight thread and garbage collection management mechanism, so that when the default golang language is used for signature processing, it will switch regardless of whether the thread needs more CPU time slices or not. As a result, each thread cannot obtain more CPU time slices, and cannot use the CPU more efficiently. Most of the CPU time slices are wasted in the switching thread mechanism.
  • Step S20 Obtain a corresponding target endorsement method according to the CPU usage.
  • the transaction information is signed based on the golang language when the signature processing is performed.
  • Signing processing for example, when the system's CPU usage is high, the system will switch threads in the fimax blockchain system, so that the current signing process will be interrupted, making the signing process impossible Very well done.
  • the default endorsement method used is to use the golang language for endorsement processing, and the default cannot be used in the system.
  • the endorsement process is completed in the language of, you need to switch the endorsement method to perform the endorsement process after switching the endorsement method.
  • the corresponding target endorsement method is obtained according to the CPU usage, including.
  • the target signature method is the default signature method. If it is determined to change the default endorsement method, the target endorsement method is the changed endorsement method.
  • the current target endorsement method for the endorsement processing is determined mainly according to the level of the system CPU usage.
  • the CPU usage of the system is low and the CPU usage is relatively low.
  • the corresponding endorsement method will be different when it is high.
  • the system CPU usage rate when the system CPU usage rate is low, the system default endorsement method can be used for endorsement processing. When the system CPU usage rate is high, the endorsement method needs to be switched.
  • Step S30 Obtain transaction result information corresponding to the target transaction, and obtain corresponding signature information based on the transaction result information.
  • the transaction result information corresponding to the target transaction is obtained, and then the corresponding endorsement information is obtained according to the transaction result information, where the obtained endorsement information includes the endorsement public key and the endorsement The private key, and then complete the endorsement processing of the transaction information corresponding to the target exchange according to the obtained endorsement information.
  • the corresponding endorsement information is required, which is simply a password.
  • the transaction information is usually endorsed by asymmetric endorsement. Processing: For the signature private key and the encrypted public key for the signature processing, the transaction result information corresponding to the target transaction is obtained in advance.
  • the transaction result information is analyzed to obtain the corresponding signature private key and the encrypted public key, for example, Analyze and obtain the first characteristic information of the transaction initiator and the second characteristic information of the transaction recipient in the target transaction, and then use the first characteristic information as the signature private key for confidential transmission of the target transaction, and transfer the second characteristic information to the target transaction.
  • the characteristic information is used as an encrypted public key for the confidential transmission of the target transaction.
  • the transaction result information corresponding to the target transaction will record the actual information of the transaction, including transaction time, transaction initiator information, transaction receiver information, and transaction type information.
  • the transaction receiver is usually a transaction terminal.
  • anyone can conduct transactions with this transaction terminal, but because the transaction initiator is different, the signature private key and the encrypted public key are different, which can better ensure the safety and reliability of the signature.
  • Step S40 Based on the signing private key and the encryption public key, the transaction information is signed using the target signing method.
  • the signature public key and signature private key After obtaining the signature public key and signature private key for signature processing according to the transaction result corresponding to the target transaction, the signature public key and signature private key will be used to perform the transaction information using the target signature method obtained in advance. Apostille processing. Specifically, after the target signature method is obtained, the transaction information will be processed asymmetrically by using the target signature method according to the obtained signature private key and encrypted public key.
  • the endorsement process it is mainly reflected in the difference in the CPU usage of the system to which the different endorsement methods are applied, so that the endorsement process can be completed more quickly and accurately.
  • the CPU usage of the system is obtained, and then the target signature of the signature processing is determined according to the CPU usage of the system.
  • the target endorsement method for the endorsement process obtain the transaction result information corresponding to the target transaction, and finally use the target endorsement method and the endorsement information for the endorsement process obtained according to the transaction result information to compare the transaction The information is processed accordingly.
  • the high-concurrency transaction information is signed, the CPU usage of the system is monitored, and the current signing method is determined according to the CPU usage of the system to ensure that the signing process is not affected by others ,
  • the signature operation can be completed normally, which improves the stability of high concurrent signature processing and the utilization rate of the system CPU.
  • FIG. 2 is a schematic flowchart of the steps of determining whether to change the default signature method in an embodiment of the application.
  • Step S21 Read the total number of CPU cores of the system, and obtain the CPU usage rate of the system according to the usage of the CPU and the total number of CPU cores.
  • Step S22 Compare the CPU usage rate with a CPU usage rate threshold.
  • Step S23 If the CPU usage rate is less than the CPU usage rate threshold, it is determined not to change the default signature method.
  • Step S24 If the CPU usage rate is greater than or equal to the CPU usage rate threshold, it is determined to change the default signature method.
  • the total number of CPU cores of the system is the sum of the number of cores of all CPUs in the system.
  • the number of CPU cores is the number of chipsets that can process data on a CPU.
  • the result of the comparison is used to determine the level of CPU usage of the system.
  • the CPU usage of different systems will correspond to different ways of signing to increase the CPU usage of the system and ensure that the CPU usage reaches a certain level, but The thread is not released when it is not saturated, and the corresponding operation instructions can be executed at the same time.
  • the obtained CPU usage rate is compared with the corresponding preset threshold value to obtain the corresponding target signature method, where the CPU usage rate threshold is a critical value of the CPU usage rate, and this critical value
  • the CPU usage rate threshold is a critical value of the CPU usage rate, and this critical value
  • the value can be determined according to the actual operation of the system. In the actual system use process, the high CPU usage will affect the actual operation of the system.
  • the signature operation is performed, due to the limitations of the golang language itself, and most of the signature process is run by threads, there is a signature If the process is not completed, the thread that performs the endorsement will be released. As a result, the endorsement is not completed and another thread needs to be used for the endorsement process, so a more appropriate endorsement method needs to be selected.
  • the more appropriate endorsement methods corresponding to different CPU usage rates are also different.
  • a more appropriate endorsement method is required.
  • the CPU usage rate is low, any endorsement method can be used, that is, the actual operation of the system will not affect the endorsement process or other operations of the system, because the default language used by the system It is the golang language, and the golang language itself has certain advantages, then the golang language can be used directly for the signature processing, that is, the signature processing can be successfully completed without language switching, but when the CPU usage rate is high, Due to the limitations of the golang language, it is necessary to choose a more reasonable endorsement method for endorsement processing.
  • the use of golang language is that golang language has the characteristics of high development efficiency and simple use. But for the use of the system, it must be done to improve a certain degree of work efficiency, but the problems brought about while improving work efficiency cannot be ignored, such as low system memory usage or waste of system resources.
  • the system CPU is used as the basis for judging the switching of the signature method. While ensuring the normal operation of the system and not affecting the actual operation, a more appropriate method is selected to complete the corresponding signature processing, which is improved to a certain extent. The utilization rate of the system CPU.
  • the signature method when it is determined that the default signature method needs to be changed, the signature method needs to be switched and changed. At this time, the interface will be called in the dynamic link library, and the target signature method will be called by calling the target signature method. Corresponding interface to realize the switch and change of the default signature method.
  • the corresponding endorsement method can be set in advance to be suitable for different scenario requirements, and then when endorsement processing is needed, an appropriate endorsement method is selected according to the actual operating scenario and status of the system to perform the corresponding endorsement operation.
  • the default signature method used in the fimax blockchain system is to use the golang language to process the transaction information.
  • the signature method set the corresponding interface address in the system through the interface address The acquisition realizes the switching of the endorsement method.
  • the endorsement method is switched to the endorsement method based on cgo technology for endorsement processing.
  • the target endorsement method is to use cgo technology for endorsement processing
  • the corresponding calling program will be launched for language invocation, and the endorsement process is performed by calling C language functions. That is, when the cgo technology needs to be used to implement the signature processing, the interface needs to be called, and the cgo technology can be used to complete the signature operation after the interface is called.
  • the target endorsement method is to use the default golang language for endorsement processing, use the thread scheduling mechanism that comes with the language to use the corresponding thread to complete the endorsement operation.
  • the number of pre-set interface addresses can be multiple, that is, in addition to setting one interface address according to the above description, you can also set several interface addresses according to actual technical support and scenarios or operating requirements. Different interface addresses are set with different calling conditions to realize the choice of different signing methods according to different needs.
  • the transaction information corresponding to the target transaction is signed according to the obtained endorsement information and the target endorsement method, it is also included.
  • the associated data includes signature information and transaction result information. And, acquiring the target thread that performs the signature processing, and marking the acquired target thread as an unreleasable state, so as to perform signature processing on the transaction information based on the target thread.
  • the C language Before calling the interface, that is, when building or managing the system, use the C language to implement a set of signature verification algorithms for the memory pool and the C language version in advance, and provide an interface that meets the calling requirements for the interface call. Packing is performed to form a dynamic link library, and the interface address for language switching is stored in the dynamic link library, and the language switching is realized by obtaining the interface address.
  • the dynamic link library is loaded using cgo technology, and then the corresponding interface address is obtained, so that language switching can be realized by switching the interface address.
  • the system operation is usually in a high concurrency state, that is, the signature operation is triggered multiple times and cyclically within a short period of time, but the transaction initiator is different.
  • the system CPU uses To a certain extent, the rate will be in a relatively high state, that is, frequent interface calls may be required during the endorsement process, and then the cgo technology is used to implement the endorsement process.
  • the rate will also be a CPU usage rate. When it is low, when the usage rate is low, the default golang language will be used to implement the signature processing. Due to the changes in the signature method, the interface status can also be set according to the CPU usage rate to avoid frequent interfaces The operational burden brought by the call.
  • the thread performing the endorsement processing is in an unreleasable state, that is, the thread will be locked during the endorsement process. Only after the signature is completed can the thread be released, and then other processes can use this thread.
  • the target endorsement method is to use the default golang language for endorsement processing, the thread that performs endorsement processing is in a releasable state.
  • FIG. 3 is a schematic flowchart of a method for signing high-concurrency transaction information based on blockchain in another embodiment of the application.
  • the method further includes.
  • step S50 when the thread release instruction is detected, the status information of the thread to be released is acquired.
  • Step S60 Determine whether to release the thread to be released according to the status information.
  • Step S70 If the status information is in a releasable state, release the thread to be released.
  • step S80 if the state information is in an unreleasable state, the thread release instruction is regarded as an invalid instruction.
  • different operations and processes can be implemented on different threads, that is, different threads are executing different processes.
  • the thread release instruction is detected, the status information of the thread to be released is acquired, and then it is determined whether the thread to be released can be released according to the obtained status information of the thread to be released.
  • thread release In the actual running process, some threads may need to be released due to external factors or system requirements, so that the system can run other processes or programs.
  • thread release In addition to the high load of the system and the need to release it, it may also be caused by the performance of the golang language itself.
  • the thread release instruction can be triggered by the user through a corresponding operation, or can be issued by the system according to the running state of the system itself, which is not specifically limited.
  • the thread release instruction is detected, the status information of the thread to be released that needs to be released will be obtained, where the status information includes the releasable state and the unreleasable state, and is mainly for the state information obtained in different signing scenarios.
  • the status information of the thread that instructs the signing operation is different due to different signing methods and the limitations of different signing methods.
  • the signature method used is the way done in the golang language
  • the state information of the thread used at this time is in a releasable state
  • the signature method used is to use cgo technology to achieve signature processing In this way, the state information of the thread used at this time is in an unreleasable state.
  • Thread release can be done automatically afterwards. If the thread that needs to be released is currently executing a process based on cgo technology to implement signature processing, because the thread cannot be released at this time, the detected thread release instruction will be regarded as an invalid instruction at this time, and it will also be You can issue corresponding prompts, such as the current thread cannot be released.
  • FIG. 4 is a block diagram of a block chain-based high-concurrency transaction information signing device in an embodiment of the application, which is applied to execute the aforementioned blockchain-based high-concurrency transaction information signing method.
  • the block chain-based high-concurrency transaction information signing device can be configured with a server.
  • the block chain-based high concurrent transaction information signing device 40 includes.
  • the status acquisition module 41 the mode determination module 42, the information generation module 43, and the signature processing module 44.
  • the status acquiring module 41 is used to acquire the CPU usage of the system when it is detected that the signing function is activated.
  • the mode determination module 42 is configured to obtain the corresponding target endorsement mode according to the CPU usage.
  • the information generating module 43 is configured to obtain transaction result information corresponding to the target transaction, and obtain corresponding signature information based on the transaction result information.
  • the signature processing module 44 is configured to perform signature processing on the transaction information corresponding to the target transaction according to the signature information and the target signature method.
  • the mode determination module 42 is also specifically used.
  • the target signature method is the default signature method.
  • the target endorsement method is the changed endorsement method.
  • FIG. 5 is a structural block diagram of a mode determination module in an embodiment of this application.
  • the mode determining module 42 includes.
  • the information reading unit 421 is configured to read the total number of CPU cores of the system, and obtain the CPU usage rate of the system according to the usage of the CPU and the total number of CPU cores.
  • the comparison and judgment unit 422 is configured to compare the CPU usage rate with a CPU usage rate threshold.
  • the result determining unit 423 is configured to determine not to change the default signature method if the CPU usage rate is less than the CPU usage rate threshold. If the CPU usage rate is greater than or equal to the CPU usage rate threshold, it is determined to change the default signature method.
  • FIG. 6 is a structural block diagram of a block chain-based high concurrent transaction information signing device in another embodiment of the application.
  • the block chain-based high concurrent transaction information signing device 40 further includes.
  • the interface calling module 45 is used to call the interface corresponding to the target signature method in the dynamic link library to complete the change to the default signature method.
  • FIG. 7 is a structural block diagram of a block chain-based high concurrent transaction information signing device in another embodiment of the application.
  • the block chain-based high concurrent transaction information signing device 40 further includes.
  • the memory calling module 46 is used to obtain the corresponding target running memory in the dynamic link library, and import the data associated with the target transaction into the target running memory, so as to compare the data in the target running memory.
  • the transaction information is subjected to endorsement processing, wherein the data associated with the target transaction includes the transaction result information and the endorsement information.
  • the block chain-based high concurrent transaction information signing device 40 further includes.
  • the thread acquisition module 47 is configured to acquire a target thread for signature processing, and mark the target thread as an unreleasable state, so as to perform signature processing on the transaction information based on the target thread.
  • the above-mentioned apparatus can be implemented in the form of a computer program, and the computer program can be run on the computer device as shown in FIG. 8.
  • FIG. 8 is a schematic block diagram of the structure of a computer device in an embodiment of the application.
  • the computer device may be a server.
  • the computer device includes a processor, a memory, and a network interface connected through a system bus, where the memory may include a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium can store an operating system and a computer program.
  • the computer program includes program instructions, and when the program instructions are executed, the processor can execute any method for signing high-concurrency transaction information based on the blockchain.
  • the processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
  • the internal memory provides an environment for the operation of the computer program in the non-volatile storage medium.
  • the processor can execute any method for signing high concurrent transaction information based on the blockchain.
  • the network interface is used for network communication, such as sending assigned tasks.
  • the network interface is used for network communication, such as sending assigned tasks.
  • FIG. 8 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors or digital signal processors. (Digital Signal Processor, DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware Components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
  • the processor is configured to run a computer program stored in a memory to implement the following steps.
  • the transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
  • the processor is also used for implementation when the corresponding target endorsement method is obtained according to the usage of the CPU.
  • the target signature method is the default signature method.
  • the target endorsement method is the changed endorsement method.
  • the processor executes the determination of whether to change the default signature method according to the CPU usage, it is also used for implementation.
  • the total number of CPU cores of the system is read, and the CPU usage rate of the system is obtained according to the usage of the CPU and the total number of CPU cores.
  • the CPU usage rate is compared with a CPU usage rate threshold.
  • the processor executes that if the CPU usage rate is greater than or equal to the CPU usage rate threshold, it is further used for implementation after determining that the default signature method is changed.
  • the processor is also used to implement the transaction information corresponding to the target transaction before executing the signature processing on the transaction information corresponding to the target transaction according to the signature information and the target signature method.
  • the processor is also used to implement the transaction information corresponding to the target transaction before executing the signature processing on the transaction information corresponding to the target transaction according to the signature information and the target signature method.
  • the processor further implements the following steps when executing the computer program.
  • the thread to be released is released.
  • the thread release instruction is regarded as an invalid instruction.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the present application
  • the embodiment provides any method for signing high-concurrency transaction information based on the blockchain.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium may be the internal storage unit of the computer device described in the foregoing embodiment, for example, the hard disk or memory of the computer device.
  • the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) equipped on the computer device. ) Card, Flash Card, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Bioethics (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Technology Law (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

A blockchain-based method and apparatus for signing high-concurrence transaction data, a computer device and a storage medium, which relate to the technical field of blockchains. The method comprises: when it is detected that a signing function is activated, obtaining the CPU usage situation of a system (S10); according to the CPU usage situation, obtaining a corresponding target signing means (S20); obtaining transaction result information corresponding to a target transaction, and on the basis of said transaction result information, obtaining corresponding signing information (S30); and according to the signing information and the target signing means, signing transaction information corresponding to the target transaction. The described method increases the stability of high-concurrence signing and the utilization rate of a system CPU.

Description

交易信息的加签方法、装置、计算机设备和存储介质Method, device, computer equipment and storage medium for signing transaction information
本申请要求于2020年01月06日提交中国专利局、申请号为202010011301.X,发明名称为“交易信息的加签方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of a Chinese patent application filed with the Chinese Patent Office on January 6, 2020, the application number is 202010011301.X, and the invention title is "Methods, devices, computer equipment and storage media for endorsement of transaction information". The entire content is incorporated into this application by reference.
技术领域Technical field
本申请涉及区块链技术领域,尤其涉及一种基于区块链的高并发交易信息的加签方法、基于区块链的高并发交易信息的加签装置、计算机设备和存储有计算机可读指令的存储介质。This application relates to the field of blockchain technology, in particular to a method for signing high-concurrency transaction information based on blockchain, a device for signing high-concurrency transaction information based on blockchain, computer equipment, and computer-readable instructions stored there. Storage medium.
背景技术Background technique
区块链一般被理解为一个分布式账本,它的本质也是一个分布式的数据库。在现有的产品中,由于golang语言具有开发效率高和使用简单等特点,很多的区块链***中便将golang语言作为开发语言。Blockchain is generally understood as a distributed ledger, and its essence is also a distributed database. In the existing products, because golang language has the characteristics of high development efficiency and simple use, many blockchain systems use golang language as the development language.
发明人意识到,在区块链***中,通常存在高并发的任务或者进程需要运行,比如对交易结果信息进行加签处理,在出现需要进行高并发的加签验签时,由于golang语言的轻量级线程以及垃圾回收管理机制的特点,使得***的CPU使用率一直处于以及较低的状态。同时在进行加签处理时,因为内存垃圾需要进行回收,使得可能需要将当前执行加签处理的线程进行暂停,影响整体的加签验签效率。The inventor realized that in the blockchain system, there are usually high-concurrency tasks or processes that need to be run, such as the signature processing of transaction result information. When a high-concurrency signature verification is required, due to the golang language The characteristics of lightweight threads and garbage collection management mechanisms keep the system's CPU usage at a low level. At the same time, when the signature processing is performed, because the memory garbage needs to be recycled, it may be necessary to suspend the thread currently executing the signature processing, which affects the overall signature verification efficiency.
技术问题technical problem
本申请提供一种基于区块链的高并发交易信息的加签方法、装置、计算机设备和存储介质,用于提高进行高并发加签处理操作的稳定性以及***CPU的使用率。This application provides a blockchain-based method, device, computer equipment and storage medium for signing high-concurrency transaction information, which are used to improve the stability of high-concurrency signing processing operations and the utilization rate of the system CPU.
技术解决方案Technical solutions
第一方面,本申请提供的一种基于区块链的高并发交易信息的加签方法,所述基于区块链的高并发交易信息的加签方法包括。In the first aspect, the present application provides a method for signing high-concurrency transaction information based on a blockchain, and the method for signing high-concurrency transaction information based on a blockchain includes.
当检测到加签功能启动时,获取***的CPU使用情况。When it is detected that the signature function is activated, the CPU usage of the system is obtained.
根据所述CPU使用情况得到对应的目标加签方式。Obtain the corresponding target endorsement method according to the CPU usage.
获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息。Obtain transaction result information corresponding to the target transaction, and obtain corresponding signature information based on the transaction result information.
根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理。The transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
第二方面,本申请还提供一种基于区块链的高并发交易信息的加签装置,所述基于区块链的高并发交易信息的加签装置包括。In a second aspect, the present application also provides a block chain-based high-concurrency transaction information signing device, which includes the block chain-based high-concurrency transaction information signing device.
状态获取模块,用于当检测到加签功能启动时,获取***的CPU使用情况。The status acquisition module is used to acquire the CPU usage of the system when it is detected that the signature function is started.
方式确定模块,用于根据所述CPU使用情况得到对应的目标加签方式。The mode determination module is used to obtain the corresponding target endorsement mode according to the CPU usage.
信息生成模块,用于获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息。The information generating module is used to obtain transaction result information corresponding to the target transaction, and obtain corresponding signature information based on the transaction result information.
加签处理模块,用于根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理。The signature processing module is configured to perform signature processing on the transaction information corresponding to the target transaction according to the signature information and the target signature method.
第三方面,本申请还提供一种计算机设备,其中,包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中。In a third aspect, the present application also provides a computer device, which includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, and the computer program includes a program Instructions, the processor is used to execute the program instructions of the memory, where.
当检测到加签功能启动时,获取***的CPU使用情况。When it is detected that the signature function is activated, the CPU usage of the system is obtained.
根据所述CPU使用情况得到对应的目标加签方式。Obtain the corresponding target endorsement method according to the CPU usage.
获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息。Obtain transaction result information corresponding to the target transaction, and obtain corresponding signature information based on the transaction result information.
根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理。The transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
第四方面,本申请还提供一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤。In a fourth aspect, the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used for Implement the following steps.
当检测到加签功能启动时,获取***的CPU使用情况。When it is detected that the signature function is activated, the CPU usage of the system is obtained.
根据所述CPU使用情况得到对应的目标加签方式。Obtain the corresponding target endorsement method according to the CPU usage.
获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息。Obtain transaction result information corresponding to the target transaction, and obtain corresponding signature information based on the transaction result information.
根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理。The transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
有益效果Beneficial effect
本申请公开的一种区块链的高并发交易信息的加签方法、装置、计算机设备和存储介质,在检测到加签功能启动时,获取***的CPU使用情况,进而根据***的CPU***使用情况确定进行加签处理的目标加签方式,然后在确定了进行加签处理的目标加签方式之后,获取目标交易对应的交易结果信息,最后利用目标加签方式以及根据交易结果信息所得到的进行加签处理的加签信息对交易信息进行相应的加签处理。实现在对高并发交易信息进行加签处理时,通过对***的CPU使用情况进行监控,并根据***的CPU使用情况确定当前进行加签处理的加签方式,保证加签过程不受其他的影响,可以正常完成加签操作,提了高并发加签处理的稳定性以及***CPU的使用率。The present application discloses a method, device, computer equipment and storage medium for signing high-concurrency transaction information of the blockchain. When it is detected that the signing function is started, the CPU usage of the system is obtained, and then the CPU usage of the system is obtained according to the system's CPU usage. The situation determines the target endorsement method for the endorsement process, and then after the target endorsement method for the endorsement process is determined, the transaction result information corresponding to the target transaction is obtained, and finally the target endorsement method and the information obtained according to the transaction result information are used The endorsement information for endorsement processing performs corresponding endorsement processing on the transaction information. When the high-concurrency transaction information is signed, the CPU usage of the system is monitored, and the current signing method is determined according to the CPU usage of the system to ensure that the signing process is not affected by others , The endorsement operation can be completed normally, which improves the stability of concurrent endorsement processing and the utilization rate of the system CPU.
附图说明Description of the drawings
图1为本申请一个实施例中基于区块链的高并发交易信息的加签方法的流程示意图。FIG. 1 is a schematic flowchart of a method for signing high-concurrency transaction information based on a blockchain in an embodiment of the application.
图2为本申请一个实施例中确定是否变更默认加签方式的步骤的流程示意图。FIG. 2 is a schematic flowchart of the steps of determining whether to change the default signature method in an embodiment of the application.
图3为本申请另一个实施例中基于区块链的高并发交易信息的加签方法的流程示意图。FIG. 3 is a schematic flowchart of a method for signing high concurrent transaction information based on a blockchain in another embodiment of the application.
图4为本申请一个实施例中基于区块链的高并发交易信息的加签装置的结构框图。Figure 4 is a block diagram of a block chain-based high-concurrency transaction information signing device in an embodiment of the application.
图5为本申请一个实施例中方式确定模块的结构框图。Fig. 5 is a structural block diagram of a mode determination module in an embodiment of the application.
图6为本申请另一个实施例中基于区块链的高并发交易信息的加签装置的结构框图。Fig. 6 is a block diagram of a block chain-based high-concurrency transaction information signing device in another embodiment of the application.
图7为本申请又一个实施例中基于区块链的高并发交易信息的加签装置的结构框图。Fig. 7 is a block diagram of a block chain-based high-concurrency transaction information signing device in another embodiment of the application.
图8为本申请一个实施例中计算机设备的结构示意性框图。FIG. 8 is a schematic block diagram of the structure of a computer device in an embodiment of the application.
本发明的实施方式Embodiments of the present invention
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowchart shown in the drawings is only an example, and does not necessarily include all contents and operations/steps, nor does it have to be executed in the described order. For example, some operations/steps can also be decomposed, combined or partially combined, so the actual execution order may be changed according to actual conditions.
应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in the specification of this application and the appended claims, unless the context clearly indicates other circumstances, the singular forms "a", "an" and "the" are intended to include plural forms.
还应当进理解,在本申请说明书和所附权利要求书中使用的术语“和/ 或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be understood that the term "and/or" used in the specification and appended claims of this application refers to any combination of one or more of the items listed in the associated and all possible combinations, and includes these combinations .
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present application will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
参照图1,图1为本申请一个实施例中基于区块链的高并发交易信息的加签方法的流程示意图。Referring to Fig. 1, Fig. 1 is a schematic flowchart of a method for signing high-concurrency transaction information based on a blockchain in an embodiment of the application.
具体地,该基于区块链的高并发交易信息的加签方法包括。Specifically, the method for signing high concurrent transaction information based on the blockchain includes.
步骤S10、当检测到加签功能启动时,获取***的CPU使用情况。Step S10: When it is detected that the signing function is activated, the CPU usage of the system is acquired.
在进行交易过程中,为了保证交易信息的安全可靠性,通常需要对交易信息进行相应的加密处理,以保证交易信息的安全。具体地,在检测到加签功能启动时,将会获取***的CPU使用情况,进而根据***的CPU的实际使用情况对当前进行交易的交易信息进行相应的加签处理。During the transaction process, in order to ensure the security and reliability of the transaction information, it is usually necessary to perform corresponding encryption processing on the transaction information to ensure the security of the transaction information. Specifically, when it is detected that the signing function is activated, the CPU usage of the system will be obtained, and the transaction information of the current transaction will be correspondingly signed according to the actual usage of the CPU of the system.
在fimax区块链的开发中,所使用的基本的默认语言是golang语言,因此在对交易信息进行加签处理时,一般情况下也将是利用golang语言对交易信息进行加签处理。对于golang语言来说,其具有轻量级线程和垃圾回收管理机制两大特征机制,使得在利用默认的golang语言进行加签处理时,无论线程是否需要更多的CPU时间片,其都会进行切换,导致了每个线程并不能获取到更多的CPU时间片,不能更大效率的使用CPU,大部分CPU时间片浪费在切换线程机制中。In the development of the fimax blockchain, the basic default language used is the golang language, so when the transaction information is signed, the golang language will generally be used to sign the transaction information. For golang language, it has two characteristic mechanisms: lightweight thread and garbage collection management mechanism, so that when the default golang language is used for signature processing, it will switch regardless of whether the thread needs more CPU time slices or not. As a result, each thread cannot obtain more CPU time slices, and cannot use the CPU more efficiently. Most of the CPU time slices are wasted in the switching thread mechanism.
步骤S20、根据所述CPU使用情况得到对应的目标加签方式。Step S20: Obtain a corresponding target endorsement method according to the CPU usage.
在得到***的CPU使用情况之后,根据CPU使用情况得到对应的目标加签方式。由于不同的加签方式所适用的场景不同,或者说不同情况下使用不同的加签方式的效果有所不同,比如加签效率高、加签成功率高等,因此在选择对应的加签方式时,根据实际的CPU使用情况来确定当前进行加签处理的方式,进而更好的完成加签操作。After getting the CPU usage of the system, get the corresponding target endorsement method according to the CPU usage. Due to the different scenarios applicable to different endorsement methods, or the effects of using different endorsement methods under different circumstances, such as high efficiency of endorsement and high success rate of endorsement, etc., when choosing the corresponding endorsement method , According to the actual CPU usage to determine the current way of endorsement processing, and then better complete the endorsement operation.
在fimax区块链的开发中,在进行加签处理时是基于golang语言对交易信息进行加签处理,但是在实际应用时,由于golang语言本身的特征,使得有一些情况不适合基于golang语言进行加签处理,比如在***的CPU的使用率较高时,由于在fimax区块链的***中,***会进行线程的切换,使得当前所进行的加签过程会被中断,使得加签过程不能很好的完成。In the development of the fimax blockchain, the transaction information is signed based on the golang language when the signature processing is performed. However, in actual applications, due to the characteristics of the golang language itself, there are some situations that are not suitable for the golang language. Signing processing, for example, when the system's CPU usage is high, the system will switch threads in the fimax blockchain system, so that the current signing process will be interrupted, making the signing process impossible Very well done.
另外,在实际进行加签处理时,存在进行加签方式切换的情况,对于fimax区块链***而言,所使用的默认加签方式是利用golang语言进行加签处理,在***不可以使用默认的语言完成加签处理时,需要进行加签方式的切换,以在切换加签方式之后进行加签处理。In addition, in the actual endorsement process, there are cases where the endorsement method is switched. For the fimax blockchain system, the default endorsement method used is to use the golang language for endorsement processing, and the default cannot be used in the system. When the endorsement process is completed in the language of, you need to switch the endorsement method to perform the endorsement process after switching the endorsement method.
进一步地,在根据CPU使用情况得到对应的目标加签方式,包括。Further, the corresponding target endorsement method is obtained according to the CPU usage, including.
根据CPU使用情况确定是否变更默认加签方式,以得到对应的目标加签方式。若确定不变更默认加签方式,则目标加签方式为默认加签方式。若确定变更默认加签方式,则目标加签方式为变更后的加签方式。Determine whether to change the default endorsement method according to the CPU usage to obtain the corresponding target endorsement method. If it is determined not to change the default signature method, the target signature method is the default signature method. If it is determined to change the default endorsement method, the target endorsement method is the changed endorsement method.
在根据***的CPU使用情况得到对应的目标加签方式时,主要根据***CPU使用率的高低来确定当前进行加签处理的目标加签方式,在***的CPU使用情况较低和CPU使用情况较高的时候对应的加签方式会有所不同。对于***的CPU使用率而言,在***CPU使用率较低时,可以使用***默认的加签方式进行加签处理,在***CPU使用率较高时,将需要进行进行加签方式的切换。When the corresponding target endorsement method is obtained according to the CPU usage of the system, the current target endorsement method for the endorsement processing is determined mainly according to the level of the system CPU usage. The CPU usage of the system is low and the CPU usage is relatively low. The corresponding endorsement method will be different when it is high. Regarding the system CPU usage rate, when the system CPU usage rate is low, the system default endorsement method can be used for endorsement processing. When the system CPU usage rate is high, the endorsement method needs to be switched.
步骤S30、获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息。Step S30: Obtain transaction result information corresponding to the target transaction, and obtain corresponding signature information based on the transaction result information.
在得到进行加签处理的目标加签方式时,获取目标交易对应的交易结果信息,然后根据交易结果信息得到对应的加签信息,其中所得到的加签信息包括有加签公钥和加签私钥,进而根据所得到的加签信息完成对目标交易所对应的交易信息进行加签处理。When the target endorsement method for endorsement processing is obtained, the transaction result information corresponding to the target transaction is obtained, and then the corresponding endorsement information is obtained according to the transaction result information, where the obtained endorsement information includes the endorsement public key and the endorsement The private key, and then complete the endorsement processing of the transaction information corresponding to the target exchange according to the obtained endorsement information.
具体地,在进行加签处理时,需要有相应的加签信息,简单来说就是密码,为了更好的保证加签信息的安全性,通常采用非对称加签的方式对交易信息进行加签处理,对于进行加签处理的加签私钥和加密公钥,预先利用目标交易对应的交易结果信息所得到。Specifically, when the endorsement process is performed, the corresponding endorsement information is required, which is simply a password. In order to better ensure the security of the endorsement information, the transaction information is usually endorsed by asymmetric endorsement. Processing: For the signature private key and the encrypted public key for the signature processing, the transaction result information corresponding to the target transaction is obtained in advance.
在根据交易结果信息生成用于对所述目标交易进行保密传输处理的加签私钥和加密公钥时,通过对交易结果信息进行解析以得到对应的加签私钥和加密公钥,比如进行解析获取目标交易中的交易发起方的第一特征信息以及交易接收方的第二特征信息,然后将第一特征信息作为用于对目标交易进行保密传输处理的加签私钥,以及将第二特征信息作为用于对目标交易进行保密传输处理的加密公钥。When generating the signature private key and the encrypted public key for the confidential transmission of the target transaction according to the transaction result information, the transaction result information is analyzed to obtain the corresponding signature private key and the encrypted public key, for example, Analyze and obtain the first characteristic information of the transaction initiator and the second characteristic information of the transaction recipient in the target transaction, and then use the first characteristic information as the signature private key for confidential transmission of the target transaction, and transfer the second characteristic information to the target transaction. The characteristic information is used as an encrypted public key for the confidential transmission of the target transaction.
目标交易对应的交易结果信息中会记录有交易的实际信息,包括交易时间、交易发起方信息、交易接收方信息以及交易类型信息等,在实际应用中,通常交易接收方是一个交易终端,所有人都可以与此交易终端进行交易,但是由于交易发起方的不一样,使得加签私钥和加密公钥有所不同,可以更好的保证加签的安全可靠。The transaction result information corresponding to the target transaction will record the actual information of the transaction, including transaction time, transaction initiator information, transaction receiver information, and transaction type information. In practical applications, the transaction receiver is usually a transaction terminal. Anyone can conduct transactions with this transaction terminal, but because the transaction initiator is different, the signature private key and the encrypted public key are different, which can better ensure the safety and reliability of the signature.
步骤S40、基于所述加签私钥和加密公钥,利用所述目标加签方式对交易信息进行加签处理。Step S40: Based on the signing private key and the encryption public key, the transaction information is signed using the target signing method.
在根据目标交易对应的交易结果得到进行加签处理的加签公钥和加签私钥之后,将会利用加签公钥和加签私钥利用预先所得到的目标加签方式对交易信息进行加签处理。具体地,在得到目标加签方式之后,将会根据所得到的加签私钥和加密公钥利用目标加签方式对交易信息进行非对称加签处理。在进行加签处理时,主要体现在不同的加签方式所适用的***的CPU使用率的高低不一样,进而可以更加快速准确的完成加签处理。After obtaining the signature public key and signature private key for signature processing according to the transaction result corresponding to the target transaction, the signature public key and signature private key will be used to perform the transaction information using the target signature method obtained in advance. Apostille processing. Specifically, after the target signature method is obtained, the transaction information will be processed asymmetrically by using the target signature method according to the obtained signature private key and encrypted public key. When the endorsement process is performed, it is mainly reflected in the difference in the CPU usage of the system to which the different endorsement methods are applied, so that the endorsement process can be completed more quickly and accurately.
在上述基于区块链的高并发交易信息的加签方法中,在检测到加签功能启动时,获取***的CPU使用情况,进而根据***的CPU***使用情况确定进行加签处理的目标加签方式,然后在确定了进行加签处理的目标加签方式之后,获取目标交易对应的交易结果信息,最后利用目标加签方式以及根据交易结果信息所得到的进行加签处理的加签信息对交易信息进行相应的加签处理。实现在对高并发交易信息进行加签处理时,通过对***的CPU使用情况进行监控,并根据***的CPU使用情况确定当前进行加签处理的加签方式,保证加签过程不受其他的影响,可以正常完成加签操作,提高了高并发加签处理的稳定性以及***CPU的使用率。In the above block chain-based high concurrent transaction information signature method, when the signature function is detected to be activated, the CPU usage of the system is obtained, and then the target signature of the signature processing is determined according to the CPU usage of the system. After determining the target endorsement method for the endorsement process, obtain the transaction result information corresponding to the target transaction, and finally use the target endorsement method and the endorsement information for the endorsement process obtained according to the transaction result information to compare the transaction The information is processed accordingly. When the high-concurrency transaction information is signed, the CPU usage of the system is monitored, and the current signing method is determined according to the CPU usage of the system to ensure that the signing process is not affected by others , The signature operation can be completed normally, which improves the stability of high concurrent signature processing and the utilization rate of the system CPU.
进一步地,参照图2,图2为本申请一个实施例中确定是否变更默认加签方式的步骤的流程示意图。Further, referring to FIG. 2, FIG. 2 is a schematic flowchart of the steps of determining whether to change the default signature method in an embodiment of the application.
具体地,在确定是否变更默认加签方式时包括。Specifically, it is included when determining whether to change the default signature method.
步骤S21、读取所述***的CPU总核数,并根据所述CPU使用情况以及所述CPU总核数得到所述***的CPU使用率。Step S21: Read the total number of CPU cores of the system, and obtain the CPU usage rate of the system according to the usage of the CPU and the total number of CPU cores.
步骤S22、将所述CPU使用率与CPU使用率阈值进行比较。Step S22: Compare the CPU usage rate with a CPU usage rate threshold.
步骤S23、若所述CPU使用率小于所述CPU使用率阈值,则确定不变更默认加签方式。Step S23: If the CPU usage rate is less than the CPU usage rate threshold, it is determined not to change the default signature method.
步骤S24、若所述CPU使用率大于或者等于所述CPU使用率阈值,则确定变更默认加签方式。Step S24: If the CPU usage rate is greater than or equal to the CPU usage rate threshold, it is determined to change the default signature method.
其中,***的CPU总核数***中所有CPU的核数之和。CPU的核数是一块CPU上面能处理数据的芯片组的数量。Among them, the total number of CPU cores of the system is the sum of the number of cores of all CPUs in the system. The number of CPU cores is the number of chipsets that can process data on a CPU.
在得到***的CPU的使用情况时,获取***的CPU总核数,然后将CPU使用情况与CPU总核数进行对比,得到对应的对应的CPU使用率,进而将CPU使用率与对应的CPU使用率阈值进行比较,以根据比较结果确定是否需要进行加签方式的变更。When getting the CPU usage of the system, get the total number of CPU cores of the system, and then compare the CPU usage with the total number of CPU cores to get the corresponding corresponding CPU usage, and then compare the CPU usage with the corresponding CPU usage The rate threshold is compared to determine whether the signature method needs to be changed according to the comparison result.
比较结果用来确定***的CPU使用率的高低,对应不同的***的CPU使用率会对应着不同的加签方式,用以提高***CPU的使用率,保证在CPU使用率达到一定的程度,但是并未饱和的情况下不进行线程的释放,同时保证可以执行相应的操作指令。The result of the comparison is used to determine the level of CPU usage of the system. The CPU usage of different systems will correspond to different ways of signing to increase the CPU usage of the system and ensure that the CPU usage reaches a certain level, but The thread is not released when it is not saturated, and the corresponding operation instructions can be executed at the same time.
在***的CPU使用率较低时,即CPU使用率小于CPU使用率阈值时,那么不需要进行加签方式的变更和切换,可以直接使用***默认的加签方式对交易结果信息进行加签处理,反之,则需要变更默认的加签方式,使用更加合适的加签方式进行加签处理。When the CPU usage of the system is low, that is, when the CPU usage is less than the CPU usage threshold, then there is no need to change and switch the endorsement method, and the transaction result information can be endorsed directly using the system default endorsement method , On the contrary, you need to change the default endorsement method and use a more appropriate endorsement method for endorsement processing.
在得到CPU使用率时,将所得到的CPU使用率与对应的预设阈值进行比较,以得到对应的目标加签方式,其中,CPU使用率阈值是CPU使用率的一个临界值,且这个临界值的确定可以根据***的实际运行来确定。在实际的***使用过程中,CPU使用率过高会影响***的实际运行,在进行加签操作时,由于受到golang语言的本身限制,且加签过程大部分由线程在运行,因此存在加签过程并未完成便会对进行加签的线程进行释放,进而导致加签没有完成需要使用另一线程接着进行加签处理,故而需要选择更加合适的加签方式。When the CPU usage rate is obtained, the obtained CPU usage rate is compared with the corresponding preset threshold value to obtain the corresponding target signature method, where the CPU usage rate threshold is a critical value of the CPU usage rate, and this critical value The value can be determined according to the actual operation of the system. In the actual system use process, the high CPU usage will affect the actual operation of the system. When the signature operation is performed, due to the limitations of the golang language itself, and most of the signature process is run by threads, there is a signature If the process is not completed, the thread that performs the endorsement will be released. As a result, the endorsement is not completed and another thread needs to be used for the endorsement process, so a more appropriate endorsement method needs to be selected.
在实际的加签过程中,不同的CPU使用率所对应的较为合适的加签方式也是有所不同的,为了使得加签过程能够顺利准确的完成,需要有着更加合适的加签方式。具体地,在CPU使用率较低时,采用任何一种加签方式都可以,也就是并不会因为***的实际运行而对加签过程或者***的其他运行产生影响,由于***的默认使用语言为golang语言,且golang语言本身具有一定的优点,那么此时可以直接使用golang语言进行加签处理,也就是不需要进行语言切换即可顺利完成加签处理,但是在CPU使用率较高时,由于golang语言的本身限制,则需要选择更为合理的加签方式进行加签处理。In the actual endorsement process, the more appropriate endorsement methods corresponding to different CPU usage rates are also different. In order to enable the endorsement process to be completed smoothly and accurately, a more appropriate endorsement method is required. Specifically, when the CPU usage rate is low, any endorsement method can be used, that is, the actual operation of the system will not affect the endorsement process or other operations of the system, because the default language used by the system It is the golang language, and the golang language itself has certain advantages, then the golang language can be used directly for the signature processing, that is, the signature processing can be successfully completed without language switching, but when the CPU usage rate is high, Due to the limitations of the golang language, it is necessary to choose a more reasonable endorsement method for endorsement processing.
在fimax区块链***中,使用golang语言是看中了golang语言具有开发效率高以及使用简单等特点。但是对于***的使用而言,提高一定的工作效率必定要做的,但是并不能忽略在提高工作效率的同时所带来的问题,比如***内存使用率不高,或者***资源浪费等。在上述描述的实施例中,利用***CPU作为加签方式切换的判断依据,在保证***运行正常以及不影响实际操作的同时,选择更加合适的方式完成相应的加签处理,在一定程度上提高了***CPU的使用率。In the fimax blockchain system, the use of golang language is that golang language has the characteristics of high development efficiency and simple use. But for the use of the system, it must be done to improve a certain degree of work efficiency, but the problems brought about while improving work efficiency cannot be ignored, such as low system memory usage or waste of system resources. In the above-described embodiment, the system CPU is used as the basis for judging the switching of the signature method. While ensuring the normal operation of the system and not affecting the actual operation, a more appropriate method is selected to complete the corresponding signature processing, which is improved to a certain extent. The utilization rate of the system CPU.
进一步地,在一个实施例中,在确定需要变更默认加签方式时,需要进行加签方式的切换和变更,此时将会在动态链接库中进行接口的调用,通过调用目标加签方式所对应的接口,来实现对默认加签方式的切换变更。Further, in one embodiment, when it is determined that the default signature method needs to be changed, the signature method needs to be switched and changed. At this time, the interface will be called in the dynamic link library, and the target signature method will be called by calling the target signature method. Corresponding interface to realize the switch and change of the default signature method.
具体地,预先可以设定相应的加签方式以适用于不同的场景需求,进而在需要进行加签处理时,根据***的实际运行场景和状态选择合适的加签方式执行相应的加签操作。Specifically, the corresponding endorsement method can be set in advance to be suitable for different scenario requirements, and then when endorsement processing is needed, an appropriate endorsement method is selected according to the actual operating scenario and status of the system to perform the corresponding endorsement operation.
在实际应用中,fimax区块链***中所使用的默认加签方式是利用golang语言对交易信息进行加签处理,为了实现加签方式的切换,在***中设置相应的接口地址,通过接口地址的获取实现加签方式的切换。根据golang语言在***运行中的不足,在进行加签方式的切换时,将加签方式切换为基于cgo技术进行加签处理的加签方式。In practical applications, the default signature method used in the fimax blockchain system is to use the golang language to process the transaction information. In order to switch the signature method, set the corresponding interface address in the system through the interface address The acquisition realizes the switching of the endorsement method. According to the shortcomings of the golang language in the operation of the system, when the endorsement method is switched, the endorsement method is switched to the endorsement method based on cgo technology for endorsement processing.
在目标加签方式是使用cgo技术进行加签处理时,由于***默认使用的是golang语言进行***运行,此时将会启动相应的调用程序进行语言调用,通过调用C语言函数进行加签处理,也就是在需要使用cgo技术实现加签处理时,需要进行接口的调用,在接口调用之后便可以使用cgo技术完成加签操作。在目标加签方式是使用默认的golang语言进行加签处理时,利用语言内部自带的线程调度机制使用相应的线程完成加签操作。When the target endorsement method is to use cgo technology for endorsement processing, since the system uses golang language by default for system operation, the corresponding calling program will be launched for language invocation, and the endorsement process is performed by calling C language functions. That is, when the cgo technology needs to be used to implement the signature processing, the interface needs to be called, and the cgo technology can be used to complete the signature operation after the interface is called. When the target endorsement method is to use the default golang language for endorsement processing, use the thread scheduling mechanism that comes with the language to use the corresponding thread to complete the endorsement operation.
对于预先所设定的接口地址的数量可以是多个,也就是说,除了根据上述描述设置一个接口地址之外,还可以根据实际的技术支持和场景或者运行需求设定若干接口地址,同时对于不同的接口地址设定不同的调用条件,以实现根据不同的需求选择不同的加签方式。The number of pre-set interface addresses can be multiple, that is, in addition to setting one interface address according to the above description, you can also set several interface addresses according to actual technical support and scenarios or operating requirements. Different interface addresses are set with different calling conditions to realize the choice of different signing methods according to different needs.
另外,在根据所得到的加签信息以及目标加签方式对目标交易对应的交易信息进行加签处理之前,还包括。In addition, before the transaction information corresponding to the target transaction is signed according to the obtained endorsement information and the target endorsement method, it is also included.
在关联的动态链接库中获取相应的目标运行内存,并将与目标交易相关联的数据导入至目标运行内存中,以在目标运行内存中对交易信息进行加签处理,其中,与目标交易相关联的数据包括加签信息以及交易结果信息。以及,获取进行加签处理的目标线程,并将所得到的目标线程标记为不可释放状态,以基于目标线程对交易信息进行加签处理。Obtain the corresponding target running memory from the associated dynamic link library, and import the data associated with the target transaction into the target running memory, so that the transaction information can be signed in the target running memory, which is related to the target transaction The associated data includes signature information and transaction result information. And, acquiring the target thread that performs the signature processing, and marking the acquired target thread as an unreleasable state, so as to perform signature processing on the transaction information based on the target thread.
在进行接口调用之前,也就是进行***构建或者管理时,预先使用C语言实现一套内存池和C语言版本的加签验签算法,同时提供一个满足调用需求的接口以供进行接口调用,然后进行包装形成动态链接库,在动态链接库中存储有进行语言切换时的接口地址,通过获取接口地址实现语言的切换。在需要进行接口调用时,使用cgo技术加载动态链接库,进而获取相应的接口地址,以通过接口地址的切换实现语言切换。在需要高并发的加签操作时,即在短时间内需要进行多次加签操作,首先在动态链接库中申请得到一块内存,也就是目标运行内存,然后将进行加签操作的参数拷贝进该内存中,最后再调用加签或者验签接口实现高并发。Before calling the interface, that is, when building or managing the system, use the C language to implement a set of signature verification algorithms for the memory pool and the C language version in advance, and provide an interface that meets the calling requirements for the interface call. Packing is performed to form a dynamic link library, and the interface address for language switching is stored in the dynamic link library, and the language switching is realized by obtaining the interface address. When an interface call is needed, the dynamic link library is loaded using cgo technology, and then the corresponding interface address is obtained, so that language switching can be realized by switching the interface address. When a high-concurrency signature operation is required, that is, multiple signature operations are required in a short period of time, first apply for a piece of memory in the dynamic link library, which is the target running memory, and then copy the parameters for the signature operation into In this memory, the signature or verification interface is finally called to achieve high concurrency.
在实际运行过程中,***运行通常是处于高并发状态,即加签操作的触发是短时间内多次且循环发生的,只是交易发起者不一样,在交易处于高并发状态时,***CPU使用率在一定程度上会处于一个比较高的状态,也就是在进行加签处理时可能需要频繁的进行接口的调用,进而使用cgo技术实现加签处理,对于***而言,也会存在CPU使用率较低的时候,在使用率较低时,将会使用默认的golang语言实现加签处理,由于存在加签方式的变化,因此还可以根据CPU使用率对接口状态进行设定,避免频繁进行接口调用带来的运行负担。In the actual operation process, the system operation is usually in a high concurrency state, that is, the signature operation is triggered multiple times and cyclically within a short period of time, but the transaction initiator is different. When the transaction is in a high concurrency state, the system CPU uses To a certain extent, the rate will be in a relatively high state, that is, frequent interface calls may be required during the endorsement process, and then the cgo technology is used to implement the endorsement process. For the system, there will also be a CPU usage rate. When it is low, when the usage rate is low, the default golang language will be used to implement the signature processing. Due to the changes in the signature method, the interface status can also be set according to the CPU usage rate to avoid frequent interfaces The operational burden brought by the call.
另外在实际的加签处理过程中,当目标加签方式是使用cgo技术进行加签处理时,进行加签处理的线程处于不可释放状态,即在进行加签处理时该线程将会被锁定,只有在加签完成之后才可进行线程的释放,然后其他的进程可以使用此线程。而当目标加签方式是使用默认的golang语言进行加签处理时,进行加签处理的线程处于可释放状态。In addition, in the actual endorsement process, when the target endorsement method uses cgo technology for endorsement processing, the thread performing the endorsement processing is in an unreleasable state, that is, the thread will be locked during the endorsement process. Only after the signature is completed can the thread be released, and then other processes can use this thread. When the target endorsement method is to use the default golang language for endorsement processing, the thread that performs endorsement processing is in a releasable state.
进一步地,参照图3,图3为本申请另一个实施例中基于区块链的高并发交易信息的加签方法的流程示意图。Further, referring to FIG. 3, FIG. 3 is a schematic flowchart of a method for signing high-concurrency transaction information based on blockchain in another embodiment of the application.
具体地,所述方法还包括。Specifically, the method further includes.
步骤S50,当检测到线程释放指令时,获取待释放线程的状态信息。In step S50, when the thread release instruction is detected, the status information of the thread to be released is acquired.
步骤S60,根据所述状态信息确定是否对所述待释放线程进行释放。Step S60: Determine whether to release the thread to be released according to the status information.
步骤S70,若所述状态信息为可释放状态,则释放所述待释放线程。Step S70: If the status information is in a releasable state, release the thread to be released.
步骤S80,若所述状态信息为不可释放状态,则将所述线程释放指令视为无效指令。In step S80, if the state information is in an unreleasable state, the thread release instruction is regarded as an invalid instruction.
在***运行过程中,不同的操作和进程可以在不同的线程上实现,也就是不同的线程执行着不同的进程。具体地,当检测到线程释放指令时,获取待释放线程的状态信息,进而根据所得到的待释放线程的状态信息确定是否可以对待释放线程进行释放。During the running of the system, different operations and processes can be implemented on different threads, that is, different threads are executing different processes. Specifically, when the thread release instruction is detected, the status information of the thread to be released is acquired, and then it is determined whether the thread to be released can be released according to the obtained status information of the thread to be released.
在实际运行过程中,可能因为外界因素或者***需求,需要对部分线程进行释放,以使得***可以运行其他的进程或者程序。在需要进行线程释放时,除了***运行负载较高需要进行释放之外,还可以能是golang语言自身的性能所致。线程释放指令的触发可以是用户通过相应的操作而发出的,还可以是***根据***自身的运行状态而发出的,具体不作限制。在检测到线程释放指令时,将会获取需要进行释放的待释放线程的状态信息,其中状态信息包括可释放状态以及不可释放状态,主要针对于不同的加签场景而得到的状态信息。In the actual running process, some threads may need to be released due to external factors or system requirements, so that the system can run other processes or programs. When thread release is required, in addition to the high load of the system and the need to release it, it may also be caused by the performance of the golang language itself. The thread release instruction can be triggered by the user through a corresponding operation, or can be issued by the system according to the running state of the system itself, which is not specifically limited. When the thread release instruction is detected, the status information of the thread to be released that needs to be released will be obtained, where the status information includes the releasable state and the unreleasable state, and is mainly for the state information obtained in different signing scenarios.
在fimax区块链***中,在对交易结果信息进行加签处理时,由于存在不同的加签方式,并且不同的加签方式自身的限制,使得指令加签操作的线程的状态信息有所不同,具体地,若所使用的加签方式是使用golang语言所完成的方式,此时所使用的线程的状态信息为可释放状态,若所使用的加签方式是使用cgo技术实现加签处理的方式,此时所使用的线程的状态信息为不可释放状态。In the fimax blockchain system, when the transaction result information is signed, the status information of the thread that instructs the signing operation is different due to different signing methods and the limitations of different signing methods. , Specifically, if the signature method used is the way done in the golang language, the state information of the thread used at this time is in a releasable state, if the signature method used is to use cgo technology to achieve signature processing In this way, the state information of the thread used at this time is in an unreleasable state.
在根据待释放线程的状态信息确定是否可以进行线程释放时,主要体现在当前进行加签处理的方式是哪一种。由于在基于cgo技术实现加签处理时,在进行加签处理时,会将当前所使用的线程进行锁定,也就是将当前所使用的线程的状态信息标记为不可释放状态,然后在加签完成之后可以自动进行线程释放。若当前所需要进行释放的线程正在执行基于cgo技术实现加签处理的进程时,由于此时线程不可以进行释放,因此此时将会将所检测到的线程释放指令视为无效指令,同时还可以发出相应的提示信息,比如当前线程不可释放。When determining whether the thread can be released according to the status information of the thread to be released, it is mainly reflected in the current way of signature processing. Because when the signature processing is implemented based on cgo technology, when the signature processing is performed, the currently used thread will be locked, that is, the status information of the currently used thread will be marked as an unreleasable state, and then the signature will be completed Thread release can be done automatically afterwards. If the thread that needs to be released is currently executing a process based on cgo technology to implement signature processing, because the thread cannot be released at this time, the detected thread release instruction will be regarded as an invalid instruction at this time, and it will also be You can issue corresponding prompts, such as the current thread cannot be released.
请参阅图4,图4为本申请一个实施例中基于区块链的高并发交易信息的加签装置的结构框图,应用于执行前述的基于区块链的高并发交易信息的加签方法。其中该基于区块链的高并发交易信息的加签装置可以配置与服务器。Please refer to FIG. 4, which is a block diagram of a block chain-based high-concurrency transaction information signing device in an embodiment of the application, which is applied to execute the aforementioned blockchain-based high-concurrency transaction information signing method. Among them, the block chain-based high-concurrency transaction information signing device can be configured with a server.
如图4所示,该基于区块链的高并发交易信息的加签装置40包括。状态获取模块41、方式确定模块42、信息生成模块43以及加签处理模块44。As shown in FIG. 4, the block chain-based high concurrent transaction information signing device 40 includes. The status acquisition module 41, the mode determination module 42, the information generation module 43, and the signature processing module 44.
状态获取模块41,用于当检测到加签功能启动时,获取***的CPU使用情况。The status acquiring module 41 is used to acquire the CPU usage of the system when it is detected that the signing function is activated.
方式确定模块42,用于根据所述CPU使用情况得到对应的目标加签方式。The mode determination module 42 is configured to obtain the corresponding target endorsement mode according to the CPU usage.
信息生成模块43,用于获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息。The information generating module 43 is configured to obtain transaction result information corresponding to the target transaction, and obtain corresponding signature information based on the transaction result information.
加签处理模块44,用于根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理。The signature processing module 44 is configured to perform signature processing on the transaction information corresponding to the target transaction according to the signature information and the target signature method.
在一个实施例中,所述方式确定模块42具体还用于。In an embodiment, the mode determination module 42 is also specifically used.
根据所述CPU使用情况确定是否变更默认加签方式,以得到对应的目标加签方式。According to the CPU usage, it is determined whether to change the default endorsement method, so as to obtain the corresponding target endorsement method.
若确定不变更默认加签方式,则所述目标加签方式为所述默认加签方式。If it is determined not to change the default signature method, the target signature method is the default signature method.
若确定变更默认加签方式,则所述目标加签方式为变更后的加签方式。If it is determined to change the default endorsement method, the target endorsement method is the changed endorsement method.
在一个实施例中,参照图5,图5为本申请一个实施例中方式确定模块的结构框图。In an embodiment, refer to FIG. 5, which is a structural block diagram of a mode determination module in an embodiment of this application.
具体地,所述方式确定模块42包括。信息读取单元421、比较判断单元422以及结果确定单元423。Specifically, the mode determining module 42 includes. The information reading unit 421, the comparison judgment unit 422, and the result determination unit 423.
信息读取单元421,用于读取所述***的CPU总核数,并根据所述CPU使用情况以及所述CPU总核数得到所述***的CPU使用率。The information reading unit 421 is configured to read the total number of CPU cores of the system, and obtain the CPU usage rate of the system according to the usage of the CPU and the total number of CPU cores.
比较判断单元422,用于将所述CPU使用率与CPU使用率阈值进行比较。The comparison and judgment unit 422 is configured to compare the CPU usage rate with a CPU usage rate threshold.
结果确定单元423,用于若所述CPU使用率小于所述CPU使用率阈值,则确定不变更默认加签方式。若所述CPU使用率大于或者等于所述CPU使用率阈值,则确定变更默认加签方式。The result determining unit 423 is configured to determine not to change the default signature method if the CPU usage rate is less than the CPU usage rate threshold. If the CPU usage rate is greater than or equal to the CPU usage rate threshold, it is determined to change the default signature method.
在一个实施例中,参照图6,图6为本申请另一个实施例中基于区块链的高并发交易信息的加签装置的结构框图。In one embodiment, refer to FIG. 6, which is a structural block diagram of a block chain-based high concurrent transaction information signing device in another embodiment of the application.
具体地,所述基于区块链的高并发交易信息的加签装置40还包括。Specifically, the block chain-based high concurrent transaction information signing device 40 further includes.
接口调用模块45,用于在动态链接库中调用目标加签方式对应的接口,以完成对默认加签方式的变更。The interface calling module 45 is used to call the interface corresponding to the target signature method in the dynamic link library to complete the change to the default signature method.
在一个实施例中,参照图7,图7为本申请又一个实施例中基于区块链的高并发交易信息的加签装置的结构框图。In one embodiment, refer to FIG. 7, which is a structural block diagram of a block chain-based high concurrent transaction information signing device in another embodiment of the application.
具体地,所述基于区块链的高并发交易信息的加签装置40还包括。Specifically, the block chain-based high concurrent transaction information signing device 40 further includes.
内存调用模块46,用于在所述动态链接库中获取相应的目标运行内存,并将与所述目标交易相关联的数据导入至所述目标运行内存中,以在所述目标运行内存中对所述交易信息进行加签处理,其中,与所述目标交易相关联的数据包括所述交易结果信息以及所述加签信息。The memory calling module 46 is used to obtain the corresponding target running memory in the dynamic link library, and import the data associated with the target transaction into the target running memory, so as to compare the data in the target running memory. The transaction information is subjected to endorsement processing, wherein the data associated with the target transaction includes the transaction result information and the endorsement information.
在一个实施例中,所述基于区块链的高并发交易信息的加签装置40还包括。In an embodiment, the block chain-based high concurrent transaction information signing device 40 further includes.
线程获取模块47,用于获取进行加签处理的目标线程,并将所述目标线程标记为不可释放状态,以基于所述目标线程对所述交易信息进行加签处理。The thread acquisition module 47 is configured to acquire a target thread for signature processing, and mark the target thread as an unreleasable state, so as to perform signature processing on the transaction information based on the target thread.
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和各模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。It should be noted that those skilled in the art can clearly understand that for the convenience and conciseness of the description, the specific working process of the device and each module described above can refer to the corresponding process in the foregoing method embodiment, and it will not be omitted here. Go into details.
上述的装置可以实现为一种计算机程序的形式,该计算机程序可以在如图8所示的计算机设备上运行。The above-mentioned apparatus can be implemented in the form of a computer program, and the computer program can be run on the computer device as shown in FIG. 8.
请参阅图8,图8为本申请一个实施例中计算机设备的结构示意性框图。该计算机设备可以是服务器。Please refer to FIG. 8, which is a schematic block diagram of the structure of a computer device in an embodiment of the application. The computer device may be a server.
参阅图8,该计算机设备包括通过***总线连接的处理器、存储器和网络接口,其中,存储器可以包括非易失性存储介质和内存储器。Referring to FIG. 8, the computer device includes a processor, a memory, and a network interface connected through a system bus, where the memory may include a non-volatile storage medium and an internal memory.
非易失性存储介质可存储操作***和计算机程序。该计算机程序包括程序指令,该程序指令被执行时,可使得处理器执行任意一种基于区块链的高并发交易信息的加签方法。The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any method for signing high-concurrency transaction information based on the blockchain.
处理器用于提供计算和控制能力,支撑整个计算机设备的运行。The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
内存储器为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器执行时,可使得处理器执行任意一种基于区块链的高并发交易信息的加签方法。The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any method for signing high concurrent transaction information based on the blockchain.
该网络接口用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The network interface is used for network communication, such as sending assigned tasks. Those skilled in the art can understand that the structure shown in FIG. 8 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
应当理解的是,处理器可以是中央处理单元 (Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现场可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors or digital signal processors. (Digital Signal Processor, DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware Components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
其中,在一个实施例中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤。Wherein, in an embodiment, the processor is configured to run a computer program stored in a memory to implement the following steps.
当检测到加签功能启动时,获取***的CPU使用情况。When it is detected that the signature function is activated, the CPU usage of the system is obtained.
根据所述CPU使用情况得到对应的目标加签方式。Obtain the corresponding target endorsement method according to the CPU usage.
获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息。Obtain transaction result information corresponding to the target transaction, and obtain corresponding signature information based on the transaction result information.
根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理。The transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
在一个实施例中,所述处理器在实现所述根据所述CPU使用情况得到对应的目标加签方式时,还用于实现。In an embodiment, the processor is also used for implementation when the corresponding target endorsement method is obtained according to the usage of the CPU.
根据所述CPU使用情况确定是否变更默认加签方式,以得到对应的目标加签方式。According to the CPU usage, it is determined whether to change the default endorsement method, so as to obtain the corresponding target endorsement method.
若确定不变更默认加签方式,则所述目标加签方式为所述默认加签方式。If it is determined not to change the default signature method, the target signature method is the default signature method.
若确定变更默认加签方式,则所述目标加签方式为变更后的加签方式。If it is determined to change the default endorsement method, the target endorsement method is the changed endorsement method.
在一个实施例中,所述处理器执行所述根据所述CPU使用情况确定是否变更默认加签方式时,还用于实现。In one embodiment, when the processor executes the determination of whether to change the default signature method according to the CPU usage, it is also used for implementation.
读取所述***的CPU总核数,并根据所述CPU使用情况以及所述CPU总核数得到所述***的CPU使用率。The total number of CPU cores of the system is read, and the CPU usage rate of the system is obtained according to the usage of the CPU and the total number of CPU cores.
将所述CPU使用率与CPU使用率阈值进行比较。The CPU usage rate is compared with a CPU usage rate threshold.
若所述CPU使用率小于所述CPU使用率阈值,则确定不变更默认加签方式。If the CPU usage rate is less than the CPU usage rate threshold, it is determined not to change the default signature method.
若所述CPU使用率大于或者等于所述CPU使用率阈值,则确定变更默认加签方式。If the CPU usage rate is greater than or equal to the CPU usage rate threshold, it is determined to change the default signature method.
在一个实施例中,所述处理器执行所述若所述CPU使用率大于或者等于所述CPU使用率阈值,则确定变更默认加签方式之后,还用于实现。In an embodiment, the processor executes that if the CPU usage rate is greater than or equal to the CPU usage rate threshold, it is further used for implementation after determining that the default signature method is changed.
在动态链接库中调用目标加签方式对应的接口,以完成对默认加签方式的变更。Call the interface corresponding to the target endorsement method in the dynamic link library to complete the change to the default endorsement method.
在一个实施例中,所述处理器执行所述根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理之前,还用于实现。In an embodiment, the processor is also used to implement the transaction information corresponding to the target transaction before executing the signature processing on the transaction information corresponding to the target transaction according to the signature information and the target signature method.
在所述动态链接库中获取相应的目标运行内存,并将与所述目标交易相关联的数据导入至所述目标运行内存中,以在所述目标运行内存中对所述交易信息进行加签处理,其中,与所述目标交易相关联的数据包括所述交易结果信息以及所述加签信息。Obtain the corresponding target running memory in the dynamic link library, and import the data associated with the target transaction into the target running memory, so as to sign the transaction information in the target running memory Processing, wherein the data associated with the target transaction includes the transaction result information and the signature information.
在一个实施例中,所述处理器执行所述根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理之前,还用于实现。In an embodiment, the processor is also used to implement the transaction information corresponding to the target transaction before executing the signature processing on the transaction information corresponding to the target transaction according to the signature information and the target signature method.
获取进行加签处理的目标线程,并将所述目标线程标记为不可释放状态,以基于所述目标线程对所述交易信息进行加签处理。Obtain a target thread that performs signature processing, and mark the target thread as an unreleasable state, so as to perform signature processing on the transaction information based on the target thread.
在一个实施例中,所述处理器执行所述计算机程序时还实现以下步骤。In an embodiment, the processor further implements the following steps when executing the computer program.
当检测到线程释放指令时,获取待释放线程的状态信息。When the thread release instruction is detected, the status information of the thread to be released is obtained.
根据所述状态信息确定是否对所述待释放线程进行释放。Determine whether to release the thread to be released according to the status information.
若所述状态信息为可释放状态,则释放所述待释放线程。If the state information is in a releasable state, the thread to be released is released.
若所述状态信息为不可释放状态,则将所述线程释放指令视为无效指令。If the state information is in an unreleasable state, the thread release instruction is regarded as an invalid instruction.
本申请的实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现本申请实施例提供的任一项基于区块链的高并发交易信息的加签方法。其中,所述计算机可读存储介质可以是非易失性,也可以是易失性的。The embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the present application The embodiment provides any method for signing high-concurrency transaction information based on the blockchain. Wherein, the computer-readable storage medium may be non-volatile or volatile.
其中,所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。The computer-readable storage medium may be the internal storage unit of the computer device described in the foregoing embodiment, for example, the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) equipped on the computer device. ) Card, Flash Card, etc.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (20)

  1. 一种基于区块链的高并发交易信息的加签方法,其中,所述方法包括:A method for signing high concurrent transaction information based on block chain, wherein the method includes:
    当检测到加签功能启动时,获取***的CPU使用情况;When it is detected that the signature function is activated, the CPU usage of the system is obtained;
    根据所述CPU使用情况得到对应的目标加签方式;Obtain the corresponding target endorsement method according to the CPU usage;
    获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息;Obtaining transaction result information corresponding to the target transaction, and obtaining corresponding endorsement information based on the transaction result information;
    根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理。The transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
  2. 根据权利要求1所述的方法,其中,所述根据所述CPU使用情况得到对应的目标加签方式,包括:The method according to claim 1, wherein the obtaining the corresponding target endorsement method according to the CPU usage includes:
    根据所述CPU使用情况确定是否变更默认加签方式,以得到对应的目标加签方式;Determine whether to change the default endorsement method according to the CPU usage, so as to obtain the corresponding target endorsement method;
    若确定不变更默认加签方式,则所述目标加签方式为所述默认加签方式;If it is determined not to change the default endorsement method, the target endorsement method is the default endorsement method;
    若确定变更默认加签方式,则所述目标加签方式为变更后的加签方式。If it is determined to change the default endorsement method, the target endorsement method is the changed endorsement method.
  3. 根据权利要求2所述的方法,其中,所述根据所述CPU使用情况确定是否变更默认加签方式,包括:The method according to claim 2, wherein the determining whether to change the default signature method according to the CPU usage includes:
    读取所述***的CPU总核数,并根据所述CPU使用情况以及所述CPU总核数得到所述***的CPU使用率;Read the total number of CPU cores of the system, and obtain the CPU usage rate of the system according to the CPU usage and the total number of CPU cores;
    将所述CPU使用率与CPU使用率阈值进行比较;Comparing the CPU usage rate with a CPU usage rate threshold;
    若所述CPU使用率小于所述CPU使用率阈值,则确定不变更默认加签方式;If the CPU usage rate is less than the CPU usage rate threshold, it is determined not to change the default signature method;
    若所述CPU使用率大于或者等于所述CPU使用率阈值,则确定变更默认加签方式。If the CPU usage rate is greater than or equal to the CPU usage rate threshold, it is determined to change the default signature method.
  4. 根据权利要求3所述的方法,其中,所述若所述CPU使用率大于或者等于所述CPU使用率阈值,则确定变更默认加签方式之后,还包括:The method according to claim 3, wherein, if the CPU usage rate is greater than or equal to the CPU usage rate threshold, after determining that the default signature method is changed, the method further comprises:
    在动态链接库中调用目标加签方式对应的接口,以完成对默认加签方式的变更。Call the interface corresponding to the target endorsement method in the dynamic link library to complete the change to the default endorsement method.
  5. 根据权利要求4所述的方法,其中,所述根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理之前,该方法还包括:The method according to claim 4, wherein, before the signature processing is performed on the transaction information corresponding to the target transaction according to the signature information and the target signature method, the method further comprises:
    在所述动态链接库中获取相应的目标运行内存,并将与所述目标交易相关联的数据导入至所述目标运行内存中,以在所述目标运行内存中对所述交易信息进行加签处理,其中,与所述目标交易相关联的数据包括所述交易结果信息以及所述加签信息。Obtain the corresponding target running memory in the dynamic link library, and import the data associated with the target transaction into the target running memory, so as to sign the transaction information in the target running memory Processing, wherein the data associated with the target transaction includes the transaction result information and the signature information.
  6. 根据权利要求1所述的方法,其中,所述根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理之前,该方法还包括:The method according to claim 1, wherein, before the signature processing is performed on the transaction information corresponding to the target transaction according to the signature information and the target signature method, the method further comprises:
    获取进行加签处理的目标线程,并将所述目标线程标记为不可释放状态,以基于所述目标线程对所述交易信息进行加签处理。Obtain a target thread that performs signature processing, and mark the target thread as an unreleasable state, so as to perform signature processing on the transaction information based on the target thread.
  7. 根据权利要求1至6中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 6, wherein the method further comprises:
    当检测到线程释放指令时,获取待释放线程的状态信息;When the thread release instruction is detected, obtain the status information of the thread to be released;
    根据所述状态信息确定是否对所述待释放线程进行释放;Determining whether to release the thread to be released according to the status information;
    若所述状态信息为可释放状态,则释放所述待释放线程;If the state information is in a releasable state, release the thread to be released;
    若所述状态信息为不可释放状态,则将所述线程释放指令视为无效指令。If the state information is in an unreleasable state, the thread release instruction is regarded as an invalid instruction.
  8. 一种基于区块链的高并发交易信息的加签装置,其中,所述装置包括:A block chain-based high concurrent transaction information signing device, wherein the device includes:
    状态获取模块,用于当检测到加签功能启动时,获取***的CPU使用情况;The status acquisition module is used to acquire the CPU usage of the system when it is detected that the signature function is started;
    方式确定模块,用于根据所述CPU使用情况得到对应的目标加签方式;A mode determination module, configured to obtain the corresponding target endorsement mode according to the CPU usage;
    信息生成模块,用于获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息;An information generating module for obtaining transaction result information corresponding to the target transaction, and obtaining corresponding endorsement information based on the transaction result information;
    加签处理模块,用于根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理。The signature processing module is configured to perform signature processing on the transaction information corresponding to the target transaction according to the signature information and the target signature method.
  9. 一种计算机设备,其中,包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:A computer device, including a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute The program instructions of the memory, wherein:
    当检测到加签功能启动时,获取***的CPU使用情况;When it is detected that the signature function is activated, the CPU usage of the system is obtained;
    根据所述CPU使用情况得到对应的目标加签方式;Obtain the corresponding target endorsement method according to the CPU usage;
    获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息;Obtaining transaction result information corresponding to the target transaction, and obtaining corresponding endorsement information based on the transaction result information;
    根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理。The transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
  10. 根据权利要求9所述的计算机设备,其中,所述处理器用于:The computer device according to claim 9, wherein the processor is configured to:
    根据所述CPU使用情况确定是否变更默认加签方式,以得到对应的目标加签方式;Determine whether to change the default endorsement method according to the CPU usage, so as to obtain the corresponding target endorsement method;
    若确定不变更默认加签方式,则所述目标加签方式为所述默认加签方式;If it is determined not to change the default endorsement method, the target endorsement method is the default endorsement method;
    若确定变更默认加签方式,则所述目标加签方式为变更后的加签方式。If it is determined to change the default endorsement method, the target endorsement method is the changed endorsement method.
  11. 根据权利要求10所述的计算机设备,其中,所述处理器用于:The computer device according to claim 10, wherein the processor is configured to:
    读取所述***的CPU总核数,并根据所述CPU使用情况以及所述CPU总核数得到所述***的CPU使用率;Read the total number of CPU cores of the system, and obtain the CPU usage rate of the system according to the CPU usage and the total number of CPU cores;
    将所述CPU使用率与CPU使用率阈值进行比较;Comparing the CPU usage rate with a CPU usage rate threshold;
    若所述CPU使用率小于所述CPU使用率阈值,则确定不变更默认加签方式;If the CPU usage rate is less than the CPU usage rate threshold, it is determined not to change the default signature method;
    若所述CPU使用率大于或者等于所述CPU使用率阈值,则确定变更默认加签方式。If the CPU usage rate is greater than or equal to the CPU usage rate threshold, it is determined to change the default signature method.
  12. 根据权利要求11所述的计算机设备,其中,所述处理器用于:The computer device according to claim 11, wherein the processor is configured to:
    在动态链接库中调用目标加签方式对应的接口,以完成对默认加签方式的变更。Call the interface corresponding to the target endorsement method in the dynamic link library to complete the change to the default endorsement method.
  13. 根据权利要求12所述的计算机设备,其中,所述处理器用于:The computer device according to claim 12, wherein the processor is configured to:
    在所述动态链接库中获取相应的目标运行内存,并将与所述目标交易相关联的数据导入至所述目标运行内存中,以在所述目标运行内存中对所述交易信息进行加签处理,其中,与所述目标交易相关联的数据包括所述交易结果信息以及所述加签信息。Obtain the corresponding target running memory in the dynamic link library, and import the data associated with the target transaction into the target running memory, so as to sign the transaction information in the target running memory Processing, wherein the data associated with the target transaction includes the transaction result information and the signature information.
  14. 根据权利要求9所述的计算机设备,其中,所述处理器用于:The computer device according to claim 9, wherein the processor is configured to:
    获取进行加签处理的目标线程,并将所述目标线程标记为不可释放状态,以基于所述目标线程对所述交易信息进行加签处理。Obtain a target thread that performs signature processing, and mark the target thread as an unreleasable state, so as to perform signature processing on the transaction information based on the target thread.
  15. 根据权利要求9至14中任一项所述的计算机设备,其中,所述处理器用于:The computer device according to any one of claims 9 to 14, wherein the processor is configured to:
    当检测到线程释放指令时,获取待释放线程的状态信息;When the thread release instruction is detected, obtain the status information of the thread to be released;
    根据所述状态信息确定是否对所述待释放线程进行释放;Determining whether to release the thread to be released according to the status information;
    若所述状态信息为可释放状态,则释放所述待释放线程;If the state information is in a releasable state, release the thread to be released;
    若所述状态信息为不可释放状态,则将所述线程释放指令视为无效指令。If the state information is in an unreleasable state, the thread release instruction is regarded as an invalid instruction.
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to implement the following steps:
    当检测到加签功能启动时,获取***的CPU使用情况;When it is detected that the signature function is activated, the CPU usage of the system is obtained;
    根据所述CPU使用情况得到对应的目标加签方式;Obtain the corresponding target endorsement method according to the CPU usage;
    获取目标交易对应的交易结果信息,并基于所述交易结果信息得到对应的加签信息;Obtaining transaction result information corresponding to the target transaction, and obtaining corresponding endorsement information based on the transaction result information;
    根据所述加签信息以及所述目标加签方式对所述目标交易对应的交易信息进行加签处理。The transaction information corresponding to the target transaction is subjected to an endorsement process according to the endorsement information and the target endorsement method.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 16, wherein, when the program instructions are executed by the processor, they are further used to implement the following steps:
    根据所述CPU使用情况确定是否变更默认加签方式,以得到对应的目标加签方式;Determine whether to change the default endorsement method according to the CPU usage, so as to obtain the corresponding target endorsement method;
    若确定不变更默认加签方式,则所述目标加签方式为所述默认加签方式;If it is determined not to change the default endorsement method, the target endorsement method is the default endorsement method;
    若确定变更默认加签方式,则所述目标加签方式为变更后的加签方式。If it is determined to change the default endorsement method, the target endorsement method is the changed endorsement method.
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 17, wherein, when the program instructions are executed by the processor, they are further used to implement the following steps:
    读取所述***的CPU总核数,并根据所述CPU使用情况以及所述CPU总核数得到所述***的CPU使用率;Read the total number of CPU cores of the system, and obtain the CPU usage rate of the system according to the CPU usage and the total number of CPU cores;
    将所述CPU使用率与CPU使用率阈值进行比较;Comparing the CPU usage rate with a CPU usage rate threshold;
    若所述CPU使用率小于所述CPU使用率阈值,则确定不变更默认加签方式;If the CPU usage rate is less than the CPU usage rate threshold, it is determined not to change the default signature method;
    若所述CPU使用率大于或者等于所述CPU使用率阈值,则确定变更默认加签方式。If the CPU usage rate is greater than or equal to the CPU usage rate threshold, it is determined to change the default signature method.
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 18, wherein, when the program instructions are executed by the processor, they are further used to implement the following steps:
    在动态链接库中调用目标加签方式对应的接口,以完成对默认加签方式的变更。Call the interface corresponding to the target endorsement method in the dynamic link library to complete the change to the default endorsement method.
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium according to claim 19, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    在所述动态链接库中获取相应的目标运行内存,并将与所述目标交易相关联的数据导入至所述目标运行内存中,以在所述目标运行内存中对所述交易信息进行加签处理,其中,与所述目标交易相关联的数据包括所述交易结果信息以及所述加签信息。Obtain the corresponding target running memory in the dynamic link library, and import the data associated with the target transaction into the target running memory, so as to sign the transaction information in the target running memory Processing, wherein the data associated with the target transaction includes the transaction result information and the signature information.
PCT/CN2020/099311 2020-01-06 2020-06-30 Method and apparatus for signing transaction data, computer device, and storage medium WO2021139113A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010011301.X 2020-01-06
CN202010011301.XA CN111241594B (en) 2020-01-06 2020-01-06 Method, device, computer equipment and storage medium for signing transaction information

Publications (1)

Publication Number Publication Date
WO2021139113A1 true WO2021139113A1 (en) 2021-07-15

Family

ID=70866349

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099311 WO2021139113A1 (en) 2020-01-06 2020-06-30 Method and apparatus for signing transaction data, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN111241594B (en)
WO (1) WO2021139113A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111241594B (en) * 2020-01-06 2023-10-13 平安科技(深圳)有限公司 Method, device, computer equipment and storage medium for signing transaction information
CN114979151B (en) * 2022-07-27 2022-11-11 江苏中创供应链服务有限公司 Method for dynamically adjusting signing service for cross-border e-commerce

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180025166A1 (en) * 2015-02-11 2018-01-25 British Telecommunications Public Limited Company Validating computer resource usage
CN107833139A (en) * 2017-11-23 2018-03-23 上海壹账通金融科技有限公司 Transaction data processing method, device, computer equipment and storage medium
CN108830716A (en) * 2018-05-31 2018-11-16 上海万向区块链股份公司 The transaction system of protection privacy of user based on block chain and encryption
CN110400223A (en) * 2019-07-26 2019-11-01 中国工商银行股份有限公司 Interactive log based on block chain encrypts, transfers, Anti-theft method, apparatus
CN111241594A (en) * 2020-01-06 2020-06-05 平安科技(深圳)有限公司 Method and device for signing transaction information, computer equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053859B (en) * 2009-11-09 2013-03-27 ***通信集团甘肃有限公司 Method and device for processing bulk data
US11159334B2 (en) * 2016-10-04 2021-10-26 International Business Machines Corporation Distribution of software signatures using a community catalog based on blockchain
CN107025559B (en) * 2017-01-26 2020-09-18 创新先进技术有限公司 Service processing method and device
CN107729137B (en) * 2017-09-04 2021-06-22 深圳壹账通智能科技有限公司 Server, block chain signature verification decryption method and storage medium
CN108737403A (en) * 2018-05-10 2018-11-02 阿里巴巴集团控股有限公司 A kind of block chain data processing method, device, processing equipment and system
CN109522698A (en) * 2018-10-11 2019-03-26 平安科技(深圳)有限公司 User authen method and terminal device based on block chain
CN109614206A (en) * 2018-10-25 2019-04-12 深圳壹账通智能科技有限公司 Device, method and the storage medium of block chain issued transaction
CN110471952B (en) * 2018-12-07 2023-05-26 深圳市智税链科技有限公司 Method, proxy node and medium for determining accounting node in blockchain network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180025166A1 (en) * 2015-02-11 2018-01-25 British Telecommunications Public Limited Company Validating computer resource usage
CN107833139A (en) * 2017-11-23 2018-03-23 上海壹账通金融科技有限公司 Transaction data processing method, device, computer equipment and storage medium
CN108830716A (en) * 2018-05-31 2018-11-16 上海万向区块链股份公司 The transaction system of protection privacy of user based on block chain and encryption
CN110400223A (en) * 2019-07-26 2019-11-01 中国工商银行股份有限公司 Interactive log based on block chain encrypts, transfers, Anti-theft method, apparatus
CN111241594A (en) * 2020-01-06 2020-06-05 平安科技(深圳)有限公司 Method and device for signing transaction information, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111241594B (en) 2023-10-13
CN111241594A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
US8219990B2 (en) Techniques for managing virtual machine (VM) states
JP5462254B2 (en) Granting least privilege access for computing processes
US10192074B2 (en) Technique for data loss prevention through clipboard operations
US7386859B2 (en) Method and system for effective management of client and server processes
US8140908B2 (en) System and method of client side analysis for identifying failing RAM after a user mode or kernel mode exception
US8631414B2 (en) Distributed resource management in a portable computing device
US11146624B2 (en) Real time multi-tenant workload tracking and auto throttling
US8046763B1 (en) Regulation of resource requests to control rate of resource consumption
WO2011097932A1 (en) Method and apparatus for accessing database, database application system
AU2013277539B2 (en) Network based management of protected data sets
CN111367693B (en) Method, system, device and medium for scheduling plug-in tasks based on message queue
WO2021139113A1 (en) Method and apparatus for signing transaction data, computer device, and storage medium
WO2021104383A1 (en) Data backup method and apparatus, device, and storage medium
CN108776633B (en) Method for monitoring process operation, terminal equipment and computer readable storage medium
WO2020000716A1 (en) Big data analysis system, server, data processing method, program and storage medium
US8938786B2 (en) System and method for using a declarative approach to enforce instance based security in a distributed environment
WO2018196459A1 (en) Download request processing method and apparatus, processing device and medium
US8635331B2 (en) Distributed workflow framework
US11070654B2 (en) Sockets for shared link applications
US11755745B2 (en) Systems and methods for monitoring attacks to devices
CN109582464B (en) Method and device for managing multiple virtualization platforms by cloud platform
US12007936B2 (en) Power efficient memory value updates for arm architectures
CN117971441B (en) High-performance thread model implementation method and device for all-in-one machine
CN113873029B (en) Cryptographic service monitoring method, server, cryptographic machine, system, and storage medium
LU101121B1 (en) Method for improving blockchain applications

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20911677

Country of ref document: EP

Kind code of ref document: A1