CN111562947B - Service processing method and device and electronic equipment - Google Patents

Service processing method and device and electronic equipment Download PDF

Info

Publication number
CN111562947B
CN111562947B CN202010251677.8A CN202010251677A CN111562947B CN 111562947 B CN111562947 B CN 111562947B CN 202010251677 A CN202010251677 A CN 202010251677A CN 111562947 B CN111562947 B CN 111562947B
Authority
CN
China
Prior art keywords
random number
block chain
customer
client random
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010251677.8A
Other languages
Chinese (zh)
Other versions
CN111562947A (en
Inventor
张婷婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Alipay Labs Singapore Pte Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Labs Singapore Pte Ltd filed Critical Alipay Labs Singapore Pte Ltd
Priority to CN202010251677.8A priority Critical patent/CN111562947B/en
Publication of CN111562947A publication Critical patent/CN111562947A/en
Priority to PCT/CN2021/081783 priority patent/WO2021197096A1/en
Application granted granted Critical
Publication of CN111562947B publication Critical patent/CN111562947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3818Decoding for concurrent execution
    • 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

Abstract

The present specification discloses a service processing method, a device and an electronic device, wherein the method is applied to a distributed bridging system, the system is connected with a block chain, n slot positions are arranged in the block chain, n is more than or equal to 2, each slot position correspondingly stores a client random number, and the method comprises the following steps: after receiving a service processing request, requesting a block chain to acquire a first client random number and a corresponding target slot position, wherein the first client random number is acquired based on the client random number stored in the target slot position on the block chain; judging whether the first client random number is larger than a second client random number used on the distributed bridging system or not; and if so, updating the client random number of the target slot position in the distributed bridging system based on the first client random number, submitting a service processing request to the block chain based on the first client random number and the target slot position so as to accept the service processing request through the block chain, and improving the service concurrent processing capacity of the block chain through the design of the client random numbers of the multiple slot positions.

Description

Service processing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of software technologies, and in particular, to a method and an apparatus for processing a service, and an electronic device.
Background
The block chain (Blockchain) is used as a distributed account book technology, on one hand, multiple parties with weak trust can agree on the fact identification recorded on the account book, and on the other hand, multiple parties can synchronously complete cross-organization business logic cooperation. In order to achieve the goal of preventing service from being replayed, a block chain needs to strictly ensure that transactions are executed in sequence, the supportable service concurrency is very small, and the requirement of high-frequency service cannot be met, and a new method is urgently needed for improving the service concurrency processing capability of the block chain.
Disclosure of Invention
The embodiment of the specification provides a service processing method and device and electronic equipment, which are used for improving service concurrent processing capacity of a block chain.
In a first aspect, an embodiment of the present specification provides a service processing method, which is applied to a distributed bridge system, where the distributed bridge system is connected to a blockchain, where the blockchain is provided with n slot positions, where n is greater than or equal to 2, and each slot position correspondingly stores a client random number, where the method includes:
after receiving a service processing request, requesting a block chain to acquire a client random number;
receiving a first customer random number fed back by the block chain and a target slot position corresponding to the first customer random number, wherein the first customer random number is obtained based on a customer random number stored in the target slot position on the block chain;
judging whether the first client random number is larger than a second client random number, wherein the second client random number is a client random number corresponding to the target slot position which is currently used by the distributed bridge system;
and if the first client random number is larger than the second client random number, updating the client random number corresponding to the target slot position stored in the distributed bridge system based on the first client random number, and submitting the service processing request to the block chain based on the first client random number and the target slot position so as to accept the service processing request through the block chain.
In a second aspect, an embodiment of the present specification provides a service processing method, which is applied to a block chain, where n slots are set in the block chain, where n is greater than or equal to 2, and each slot stores a client random number, where the method includes:
receiving a service request submitted by a distributed bridging system;
acquiring a first customer random number in the service request and a target slot position corresponding to the first customer random number;
acquiring a second customer random number used on a target slot position in the block chain based on the customer random number stored in the block chain;
determining whether the first customer nonce is greater than the second customer nonce;
and if the first customer random number is larger than the second customer random number, accepting the service request, and updating the customer random number stored in the target slot position in the block chain based on the first customer random number.
In a third aspect, an embodiment of the present specification provides a service processing system, including:
the system comprises a block chain, a server and a server, wherein n slot positions are arranged on the block chain, n is more than or equal to 2, and each slot position corresponds to a client random number;
the distributed bridging system is connected with the block chain, and the n slot positions are stored in the distributed bridging system;
wherein the distributed bridge system is configured to perform the method of any one of claims 1 to 5, and the blockchain is configured to perform the method of claim 6 or 7.
In a fourth aspect, an embodiment of the present specification provides a service processing apparatus, which is applied to a distributed bridge system, where the distributed bridge system is connected to a blockchain, where n slots are set in the blockchain, where n is greater than or equal to 2, and each slot correspondingly stores a client random number, where the apparatus includes:
the request unit is used for requesting the block chain to acquire the client random number after receiving the service processing request;
a receiving unit, configured to receive a first client random number fed back by the block chain and a target slot corresponding to the first client random number, where the first client random number is obtained based on a client random number stored in the target slot on the block chain;
a determining unit, configured to determine whether the first client random number is greater than a second client random number, where the second client random number is a client random number corresponding to the target slot that is currently used by the distributed bridge system;
and the processing unit is configured to update, based on the first customer nonce, a customer nonce corresponding to the target slot stored in the distributed bridge system when the first customer nonce is greater than the second customer nonce, and submit the service processing request to the block chain based on the first customer nonce and the target slot, so as to accept the service processing request through the block chain.
In a fifth aspect, an embodiment of the present specification provides a service processing apparatus, which is applied to a block chain, where n slots are set in the block chain, where n is greater than or equal to 2, and each slot stores a client random number, where the apparatus includes:
the receiving module is used for receiving a service request submitted by the distributed bridging system; acquiring a first customer random number in the service request and a target slot position corresponding to the first customer random number;
the obtaining module is used for obtaining a second customer random number used on a target slot position in the block chain based on the customer random number stored in the block chain;
the judging module is used for judging whether the first customer random number is larger than the second customer random number;
and the acceptance module is used for accepting the service request when the first client random number is larger than the second client random number, and updating the client random number stored in the target slot position in the block chain based on the first client random number.
One or more technical solutions in the embodiments of the present specification have at least the following technical effects:
the embodiment of the specification provides a service processing method, which comprises the steps of setting n slot positions on a block chain, wherein n is more than or equal to 2, each slot position corresponds to a client random number, configuring a distributed bridging system for the block chain, storing the corresponding slot position and the used client random number on the distributed bridging system, and requesting the block chain to acquire a first client random number corresponding to a target slot position by the bridging system after receiving a service processing request; receiving and judging whether a first client random number fed back by the block chain is larger than a second client random number stored on the bridging system or not so as to ensure that an available client random number is obtained; and if the first client random number is larger than the second client random number, updating the client random number corresponding to the target slot position stored in the distributed bridging system based on the first client random number, and submitting a service request to the block chain based on the first client random number and the target slot position so as to enable the block chain to accept the service processing request. Through the design of n multi-slot customer random numbers, the block chain can accept n service requests simultaneously, the concurrent processing capacity of the block chain is improved, and the service request concurrent delivery of a distributed bridging system is combined on the basis, so that the service concurrent processing capacity of the block chain is further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present specification, a brief description will be given below of the embodiments or the drawings required in the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present specification, and it is obvious for a person skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic diagram of a service processing system provided in an embodiment of the present specification;
FIG. 2 is a schematic diagram of a multi-slot customer random number according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a service processing method on the side of a bridging system according to an embodiment of the present specification;
fig. 4 is a flowchart for obtaining a random number of an available client according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a service processing method on the blockchain side according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a service processing apparatus on the side of a bridging system according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a block chain side traffic processing apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic view of an electronic device provided in an embodiment of the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step are within the scope of the present specification.
The embodiment of the specification provides a service processing method and device and electronic equipment, which are used for improving service concurrent processing capacity of a block chain.
The main implementation principle, the specific implementation mode and the corresponding beneficial effects of the technical solutions of the embodiments of the present description are explained in detail below with reference to the accompanying drawings.
Examples
Referring to fig. 1, the present embodiment provides a service processing system, which includes a distributed bridge system 10 and a blockchain 20. Distributed bridging system 10 acts as a connecting bridge for connecting blockchain 20 with business systems 40 that use blockchain 20. Further, the service processing system may further include a load balancing system 30, the distributed bridge system 10 includes m bridge bridges, m is greater than or equal to 2, and the load balancing system 30 is configured to allocate an external service to each bridge of the distributed bridge system 10, and further submit a service request to the blockchain 20 through each bridge.
N slot indexes are set on the block chain 20, where n is greater than or equal to 2, and each slot index correspondingly stores a client random number, as shown in a Nonce Table in fig. 2, where the Nonce Table is also called Nonce Pool. The client random number nonce is a parameter in the blockchain that prevents the replay of the transaction. The block chain only accepts the service request with the nonce greater than the nonce which is used currently, the service request with the nonce less than or equal to the nonce which is used currently refuses to accept, and the nonces of the multiple slot positions can enable the block chain to accept the service request with the nonce at each slot position greater than the nonce which is used currently at the corresponding slot position, thereby not only ensuring the unique mapping relation between each nonce at each slot position and the service transaction, realizing the purpose of preventing the service from being replayed, but also enabling the block chain to have the capability of concurrently processing the service transaction.
The distributed bridging system 10, when receiving the service request, requests the blockchain 20 to obtain the client random number first; then, a service request is submitted to the blockchain 20 according to the acquired client random number. And then the block chain processes the service request.
Specifically, referring to fig. 3, the embodiment provides a service processing method applied to the distributed bridge system 10, where the method includes the following steps S310 to S340, or S310 to S341:
s310, after receiving the service processing request, requesting the block chain to acquire the client random number.
The slot position may be designated or not designated when the distributed bridge system requests the blockchain to acquire the client random number. If the slot position is designated, the distributed bridging system can randomly select a target slot position from the n slot positions or obtain the target slot position according to a preset rule, and sends an obtaining request for obtaining the client random number of the target slot position to the block chain. The preset rule may be that each slot position is sequentially selected as a target slot position in sequence, an idle slot position is selected as a target slot position by polling the current state of each slot position, a relationship between a Bridge and the slot positions may be preset, and different bridges select corresponding slot positions as target slot positions, as shown in fig. 2, Bridge a acquires client random numbers from slot positions 1 to 3, and Bridge a acquires the client random numbers from slot positions 4 to 6. If the slot position is not designated, a target slot position can be randomly selected by the block chain or selected according to a preset rule, and the client random number is fed back to the distributed bridging system based on the target slot position.
S320, receiving the first client random number fed back by the block chain and a target slot position corresponding to the first client random number.
Wherein the first guest random number is obtained based on a guest random number stored in a target slot on the blockchain. If the target slot position in the block chain stores the unused customer random number, the block chain takes the stored customer random number as the first customer random number for feedback, and if the target slot position in the block chain stores the currently used customer random number, the block chain generates the unused first customer random number according to the currently used customer random number. For example: if the count rule of the nonce in the blockchain is nonce +1, the client random number corresponding to the target slot stored in the blockchain is nonce _3, and the first client random number is nonce _3+ 1.
S330, judging whether the first client random number is larger than a second client random number, wherein the second client random number is the client random number corresponding to the currently used target slot position of the distributed bridging system.
And maintaining a nonce usage table on the distributed bridge system, storing the client random number which is used by the distributed bridge system currently, including storing the client random number which is used for submitting the service request currently on each slot, and recording the update time of the client random number of each slot. And based on the nonce use condition, locking the target slot position to which the first client random number belongs, correspondingly acquiring a second client random number on the target slot position, and acquiring the available nonce by judging the sizes of the first client random number and the second client random number. Referring to fig. 4, in order to determine whether the first client random number is available, if the first client random number nonce _1 is greater than the second client random number nonce _2, it indicates that nonce _1 is available to execute S340; if the first guest random number nonce _1 is equal to the second guest random number nonce _2, perform S341; if the nonce _1 is less than the nonce _2, the system is indicated to be possible to operate abnormally, and an alarm is given.
And S340, the first client random number is available, the client random number of the target slot position in the distributed bridging system is updated based on the first client random number, and a service request is submitted to the block chain based on the first client random number and the target slot position so as to accept the service processing request through the block chain.
And updating the client random number of the target slot position in the distributed bridging system to be the first client random when updating the client random number of the target slot position in the distributed bridging system based on the first client random number. And updating the updating time of the client random number of the target slot position when the client random number of the target slot position in the distributed bridging system is updated. When a service request is submitted to the blockchain based on the first client random number and the target slot position, the first client random number and the target slot position to which the first client random number belongs can be submitted to the blockchain after the service request is written into the service request.
And S341, if the first customer random number is equal to the second customer random number, judging whether the current time is greater than the sum of the update time of the customer random number of the target slot position and the block chain transaction expiration time.
If the current time is greater than the update time + the transaction expiration time, since the blockchain can ensure that the transaction exceeding the transaction expiration time is not executed by the blockchain, the blockchain acceptance of the service request blockchain originally using the first client random number may be considered to have failed, and therefore, the first client random number may be considered to be available, and the process proceeds to S340.
If the current time is less than or equal to the update time + the transaction expiration time, the first client random number may be being used, and the first client random number is considered to be unavailable, the jump execution S310 is performed to acquire the client random number from the blockchain again, that is, the available client random number is acquired in a loop.
When the distributed bridge system executes the service processing method, the bridge which receives the service request arbitrarily in the system can execute the service processing method independently. Each bridge can separately maintain a nonce usage table or jointly maintain a nonce usage table, and the nonce usage table is stored in the public memory of the distributed bridge system, so that each bridge can use and update the nonce usage table. Through the combination of the distributed bridging system and the multi-slot client random number, the block chain can accept a plurality of service requests simultaneously, and the concurrent processing capacity of the block chain is greatly improved. The distributed bridging system obtains the available client random number, thereby preventing the service from being replayed, reducing the judgment of the client random number when the block chain accepts the service and further improving the concurrent processing efficiency of the block chain.
After the distributed bridging system submits the service request to the blockchain, the embodiment further provides a service processing method applied to the blockchain, referring to fig. 5, where the method includes:
and S510, receiving a service request submitted by the distributed bridging system.
If the distributed bridging system determines whether the client random number is available before submitting the service request, and the service request is submitted to the block chain based on the available client random number, after S510, S550 may be executed by skipping. In order to improve the reliability of the blockchain against replay of the traffic transaction, S520 to S550 may be performed after S510, regardless of whether the distributed bridging system has made a determination whether the client random number is available.
S520, the first client random number in the service request and the corresponding target slot position are obtained.
S530, acquiring a second client random number used in the target slot position in the block chain based on the client random number stored in the block chain.
In a specific implementation process, when the client random numbers stored in the n slots set in the block chain are unused client random numbers, a second client random number is obtained by calculation according to a count rule of a nonce and the client random number in the current target slot, for example: and if the count rule of the nonce is nonce +1 and the client random number corresponding to the target slot in the block chain is nonce _3, obtaining the second client random number as nonce _ 3-1. And when the client random numbers stored in the n slots arranged in the block chain are the client random numbers which are used currently, acquiring the client random number corresponding to the target slot in the block chain as a second client random number.
S540, judging whether the first client random number is larger than the second client random number.
If the first customer random number is larger than the second customer random number, executing S550; and if the first client random number is less than or equal to the second client random number, refusing to accept the service request.
And S550, if the first customer random number is larger than the second customer random number, accepting the service request, and updating the customer random number stored in the target slot position in the block chain based on the first customer random number.
And if the client random number stored in the target slot position in the block chain is the currently used client random number, updating the client random number into the first client random number during updating. And if the client random number stored in the target slot position in the block chain is not used, generating a new client random number according to the first client random number and the nonce counting rule during updating, and replacing the client random number stored in the target slot position in the block chain with the new client random number.
After accepting a service request submitted by a distributed bridging system, a block chain can lock a target slot position where a first client random number of the service request is located, the target slot position is indicated to be in a non-idle state, and after the service request is processed, the block chain cancels the locking of the target slot position, so that the target slot position is recovered to an idle state. Correspondingly, after receiving a client random number acquisition request sent by the distributed bridge system, the blockchain may acquire a specified target slot position based on the acquisition request, or select a target slot position currently in an idle state from the n slot positions; and acquiring a first client random number based on the client random number stored in the target slot position, and sending the acquired first client random number and the target slot position to the distributed bridging system, wherein the specific acquisition method of the first client random number is the same as S320.
Similarly, when the bridge in the distributed bridge system acquires the first client random number from the block chain, the bridge may lock the target slot in the distributed bridge system, which indicates that the target slot is in a non-idle state, and after submitting a service request based on the first client random number, the bridge cancels the locking of the target slot, so that the target slot in the distributed bridge system recovers an idle state. Before the distributed bridging system selects the slot position to acquire the random number of the client from the block chain, the slot position in an idle state is selected from the nonce use condition table as a target slot position, and the probability of acquiring the random number of the available client is improved.
In the foregoing embodiment, in a first aspect, through the design of the multi-slot index, concurrent service processing of a block chain on the basis of replay prevention is implemented; in the second aspect, through maintenance of a nonce usage table and acquisition of an available client random number by a distributed bridging system, the concurrency per second of a block chain tps is multiplied, and the concurrency per second is from tps: 1/blockchain blockiness time to maximum tps: n/block chain blocking time, the service concurrent processing capacity of the block chain is improved, and the service processing efficiency of the block chain is greatly improved; in a third aspect, the probability of nonce collisions is reduced through the submission of service requests by multiple bridges in a distributed bridging system. In a fourth aspect, when the second client random number in the distributed bridging system is equal to the first acquisition random number acquired from the blockchain, nonces that have been taken but not actually taken into effect are reused by comparing the current time with the update time and the blockchain transaction expiration time.
Referring to fig. 6, based on the service processing method provided in the foregoing embodiment, this embodiment further provides a service processing apparatus correspondingly applied to a distributed bridge system, where the distributed bridge system is connected to a blockchain, where n slots are set in the blockchain, where n is greater than or equal to 2, and each slot stores a client random number correspondingly, and the apparatus includes:
a request unit 61, configured to request a block chain to acquire a client random number after receiving a service processing request;
a receiving unit 62, configured to receive a first customer random number fed back by the block chain and a target slot corresponding to the first customer random number, where the first customer random number is obtained based on a customer random number stored in the target slot on the block chain;
a determining unit 63, configured to determine whether the first customer random number is greater than a second customer random number, where the second customer random number is a customer random number corresponding to the target slot that is currently used by the distributed bridge system;
a processing unit 64, configured to update, when the first client random number is greater than the second client random number, a client random number corresponding to the target slot stored in the distributed bridge system based on the first client random number, and submit the service processing request to the block chain based on the first client random number and the target slot, so as to accept the service processing request through the block chain.
As an optional embodiment, the device can also comprise a public memory and m bridges, wherein m is more than or equal to 2; wherein the common memory is to store the n slots and a guest random number in each slot that is used by the m bridges.
As an optional implementation, the apparatus may further include:
a maintenance unit 65, configured to record an update time when updating the client random number of the target slot;
the processing unit 64 is further configured to, when the first customer nonce is equal to the second customer nonce, determine whether current time is greater than a sum of the update time and the block chain transaction expiration time, if yes, update the customer nonce corresponding to the target slot stored in the distributed bridge system based on the first customer nonce, update the update time, and submit the service processing request to the block chain based on the first customer nonce.
As an optional implementation, the processing unit 64 is further configured to:
and if the current time is less than or equal to the sum of the updating time and the block chain transaction expiration time, confirming that the first customer random number is unavailable, and acquiring the first customer random number from the block chain again.
As an optional implementation, the requesting unit 61 is configured to:
selecting a target slot position from the n slot positions, and requesting the block chain to acquire a first customer random number corresponding to the target slot position; alternatively, the first and second electrodes may be,
and requesting the blockchain to acquire the client random number of any slot position, and selecting a target slot position from the n slot positions through the blockchain to acquire the client random number.
Referring to fig. 7, based on the service processing method provided by the foregoing embodiment, the present embodiment further provides a service processing apparatus, which is applied to a block chain, where n slots are set in the block chain, n is greater than or equal to 2, and each slot stores a client random number, where the apparatus includes:
a receiving module 71, configured to receive a service request submitted by a distributed bridge system; acquiring a first customer random number in the service request and a target slot position corresponding to the first customer random number;
an obtaining module 72, configured to obtain, based on the client random number stored in the block chain, a second client random number that is already used at the target slot in the block chain;
a judging module 73, configured to judge whether the first customer random number is greater than the second customer random number;
and an accepting module 74, configured to accept the service request when the first client random number is greater than the second client random number, and update the client random number stored in the target slot in the block chain based on the first client random number.
As an optional implementation, the receiving module 71 is further configured to: receiving a client random number acquisition request sent by the distributed bridge system;
the obtaining module 72 is further configured to obtain the specified target slot position based on the obtaining request, or select a target slot position currently in an idle state from the n slot positions;
the obtaining module 72 is further configured to obtain the first client random number based on the client random number in the target slot, and send the first client random number and the target slot to the distributed bridge system.
With regard to the apparatus in the above embodiments, the specific manner in which each unit and module performs operations has been described in detail in the embodiments of the related method, and is not set forth in detail herein.
Referring to fig. 8, a block diagram of an electronic device 700 for implementing a service processing method according to an exemplary embodiment is shown. For example, the electronic device 700 may be a computer, database console, tablet device, personal digital assistant, and the like.
Referring to fig. 8, electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an input/output (I/O) interface 710, and a communication component 712.
The processing component 702 generally controls overall operation of the electronic device 700, such as operations associated with display, data communication, and recording operations. The processing element 702 may include one or more processors 720 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components.
The memory 704 is configured to store various types of data to support operation at the device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 706 provides power to the various components of the electronic device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 700.
The I/O interface 710 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The communication component 712 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication part 712 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 712 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the electronic device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a mobile terminal, the instructions enable an electronic device to execute a service processing method, where the service processing method is applied to a distributed bridge system, the distributed bridge system is connected to a blockchain, n is set in the blockchain, n is greater than or equal to 2, and each slot stores a client random number, where the method includes: after receiving a service processing request, requesting a block chain to acquire a client random number; receiving a first customer random number fed back by the block chain and a target slot position corresponding to the first customer random number, wherein the first customer random number is obtained based on a customer random number stored in the target slot position on the block chain; judging whether the first client random number is larger than a second client random number, wherein the second client random number is a client random number corresponding to the target slot position which is currently used by the distributed bridge system; and if the first client random number is larger than the second client random number, updating the client random number corresponding to the target slot position stored in the distributed bridge system based on the first client random number, and submitting the service processing request to the block chain based on the first client random number and the target slot position so as to accept the service processing request through the block chain.
A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of a mobile terminal, enable an electronic device to perform a service processing method, where the service processing method is applied to a block chain, where n slots are provided, n is greater than or equal to 2, and each slot stores a client random number, where the method includes: receiving a service request submitted by a distributed bridging system; acquiring a first customer random number in the service request and a target slot position corresponding to the first customer random number; acquiring a second customer random number used on a target slot position in the block chain based on the customer random number stored in the block chain; determining whether the first customer nonce is greater than the second customer nonce; and if the first customer random number is larger than the second customer random number, accepting the service request, and updating the customer random number stored in the target slot position in the block chain based on the first customer random number.
It will be understood that the present embodiments are not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present embodiments is limited only by the appended claims
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present embodiment.

Claims (17)

1. A business processing method is applied to a distributed bridging system, the distributed bridging system is connected with a block chain, n slot positions are arranged in the block chain, n is more than or equal to 2, each slot position correspondingly stores a client random number, and the method comprises the following steps:
after receiving a service processing request, requesting a block chain to acquire a client random number;
receiving a first customer random number fed back by the block chain and a target slot position corresponding to the first customer random number, wherein the first customer random number is obtained based on a customer random number stored in the target slot position on the block chain;
judging whether the first client random number is larger than a second client random number, wherein the second client random number is a client random number corresponding to the target slot position which is currently used by the distributed bridge system;
and if the first client random number is larger than the second client random number, updating the client random number corresponding to the target slot position stored in the distributed bridge system based on the first client random number, and submitting the service processing request to the block chain based on the first client random number and the target slot position so as to accept the service processing request through the block chain.
2. The method of claim 1, the distributed bridge system comprising a common memory and m bridges, m ≧ 2; wherein the common memory is to store the n slots and a guest random number in each slot that is used by the m bridges.
3. The method of claim 1, further comprising:
when the distributed bridging system updates the client random number of the target slot position, the updating time is recorded;
if the first customer random number is equal to the second customer random number, judging whether the current time is greater than the sum of the updating time and the block chain transaction expiration time, if so, updating the customer random number corresponding to the target slot position stored in the distributed bridging system based on the first customer random number, updating the updating time, and submitting the service processing request to the block chain based on the first customer random number.
4. The method of claim 3, further comprising:
and if the current time is less than or equal to the sum of the updating time and the block chain transaction expiration time, confirming that the first customer random number is unavailable, and acquiring the first customer random number from the block chain again.
5. The method of any of claims 1 to 4, wherein requesting a blockchain to obtain a client random number comprises:
the distributed bridging system selects a target slot position from the n slot positions and requests the block chain to acquire a first client random number corresponding to the target slot position; alternatively, the first and second electrodes may be,
and the distributed bridging system requests the blockchain to obtain the client random number of any slot position, and selects a target slot position from the n slot positions through the blockchain to obtain the client random number.
6. A business processing method is applied to a block chain, wherein n slot positions are arranged in the block chain, n is more than or equal to 2, and each slot position correspondingly stores a client random number, and the method comprises the following steps:
receiving a service request submitted by a distributed bridging system;
acquiring a first customer random number in the service request and a target slot position corresponding to the first customer random number;
acquiring a second customer random number used on the target slot position in the block chain based on the customer random number stored in the block chain;
determining whether the first customer nonce is greater than the second customer nonce;
and if the first customer random number is larger than the second customer random number, accepting the service request, and updating the customer random number stored in the target slot position in the block chain based on the first customer random number.
7. The method of claim 6, further comprising:
receiving a client random number acquisition request sent by the distributed bridge system;
acquiring the appointed target slot position based on the acquisition request, or selecting the current target slot position in an idle state from the n slot positions;
and acquiring the first client random number based on the client random number on the target slot position, and sending the first client random number and the target slot position to the distributed bridging system.
8. A business processing system comprising:
the system comprises a block chain, a server and a server, wherein n slot positions are arranged on the block chain, n is more than or equal to 2, and each slot position corresponds to a client random number;
the distributed bridging system is connected with the block chain, and the n slot positions are stored in the distributed bridging system;
wherein the distributed bridge system is configured to perform the method of any one of claims 1 to 5, and the blockchain is configured to perform the method of claim 6 or 7.
9. A business processing device is applied to a distributed bridging system, the distributed bridging system is connected with a block chain, n slot positions are arranged in the block chain, n is larger than or equal to 2, each slot position correspondingly stores a client random number, and the device comprises:
the request unit is used for requesting the block chain to acquire the client random number after receiving the service processing request;
a receiving unit, configured to receive a first client random number fed back by the block chain and a target slot corresponding to the first client random number, where the first client random number is obtained based on a client random number stored in the target slot on the block chain;
a determining unit, configured to determine whether the first client random number is greater than a second client random number, where the second client random number is a client random number corresponding to the target slot that is currently used by the distributed bridge system;
and the processing unit is configured to update, based on the first customer nonce, a customer nonce corresponding to the target slot stored in the distributed bridge system when the first customer nonce is greater than the second customer nonce, and submit the service processing request to the block chain based on the first customer nonce and the target slot, so as to accept the service processing request through the block chain.
10. The apparatus of claim 9, further comprising a common memory and m bridges, m ≧ 2; wherein the common memory is to store the n slots and a guest random number in each slot that is used by the m bridges.
11. The apparatus of claim 9, the apparatus further comprising:
the maintenance unit is used for recording the updating time when the client random number of the target slot position is updated;
the processing unit is further configured to, when the first customer nonce is equal to the second customer nonce, determine whether current time is greater than a sum of the update time and the block chain transaction expiration time, if yes, update the customer nonce corresponding to the target slot stored in the distributed bridge system based on the first customer nonce, update the update time, and submit the service processing request to the block chain based on the first customer nonce.
12. The apparatus of claim 11, the processing unit to further:
and if the current time is less than or equal to the sum of the updating time and the block chain transaction expiration time, confirming that the first customer random number is unavailable, and acquiring the first customer random number from the block chain again.
13. The apparatus of any of claims 9 to 12, the request unit to:
selecting a target slot position from the n slot positions, and requesting the block chain to acquire a first customer random number corresponding to the target slot position; alternatively, the first and second electrodes may be,
and requesting the blockchain to acquire the client random number of any slot position, and selecting a target slot position from the n slot positions through the blockchain to acquire the client random number.
14. A business processing device is applied to a block chain, wherein n slot positions are arranged in the block chain, n is more than or equal to 2, and each slot position correspondingly stores a client random number, and the device comprises:
the receiving module is used for receiving a service request submitted by the distributed bridging system; acquiring a first customer random number in the service request and a target slot position corresponding to the first customer random number;
the obtaining module is used for obtaining a second customer random number used on a target slot position in the block chain based on the customer random number stored in the block chain;
the judging module is used for judging whether the first customer random number is larger than the second customer random number;
and the acceptance module is used for accepting the service request when the first client random number is larger than the second client random number, and updating the client random number stored in the target slot position in the block chain based on the first client random number.
15. The apparatus of claim 14, the receiving means further for: receiving a client random number acquisition request sent by the distributed bridge system;
the obtaining module is further configured to obtain the specified target slot based on the obtaining request, or select a target slot currently in an idle state from the n slots;
the obtaining module is further configured to obtain the first client random number based on the client random number in the target slot, and send the first client random number and the target slot to the distributed bridge system.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps corresponding to the method according to any one of claims 1 to 7.
17. An electronic device comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors to perform the operations instructions of the method according to any one of claims 1 to 7.
CN202010251677.8A 2020-04-01 2020-04-01 Service processing method and device and electronic equipment Active CN111562947B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010251677.8A CN111562947B (en) 2020-04-01 2020-04-01 Service processing method and device and electronic equipment
PCT/CN2021/081783 WO2021197096A1 (en) 2020-04-01 2021-03-19 Service processing method and apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010251677.8A CN111562947B (en) 2020-04-01 2020-04-01 Service processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111562947A CN111562947A (en) 2020-08-21
CN111562947B true CN111562947B (en) 2021-08-03

Family

ID=72070383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010251677.8A Active CN111562947B (en) 2020-04-01 2020-04-01 Service processing method and device and electronic equipment

Country Status (2)

Country Link
CN (1) CN111562947B (en)
WO (1) WO2021197096A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113098685B (en) * 2021-03-29 2022-03-22 深圳市凌壹科技有限公司 Security verification method and device based on cloud computing and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107306183A (en) * 2016-04-22 2017-10-31 索尼公司 Client, service end, method and authentication system
US20180121635A1 (en) * 2016-10-28 2018-05-03 Acronis International Gmbh Systems and methods for authenticating video using watermarks
CN108964905A (en) * 2018-07-18 2018-12-07 胡祥义 A kind of safe and efficient block chain implementation method
CN109801152A (en) * 2019-01-24 2019-05-24 中国农业银行股份有限公司 Supplementary pension method for processing business and system based on block chain
CN110348242A (en) * 2017-06-12 2019-10-18 腾讯科技(深圳)有限公司 Service request processing method and device
CN110431580A (en) * 2018-11-30 2019-11-08 阿里巴巴集团控股有限公司 Concurrent block chain Fail Transaction is reduced using the table of random numbers
US20190370793A1 (en) * 2018-06-04 2019-12-05 Decentralized Finance Labs, Inc. Hybrid consensus for blockchain using proof of work and proof of stake

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107306183A (en) * 2016-04-22 2017-10-31 索尼公司 Client, service end, method and authentication system
US20180121635A1 (en) * 2016-10-28 2018-05-03 Acronis International Gmbh Systems and methods for authenticating video using watermarks
CN110348242A (en) * 2017-06-12 2019-10-18 腾讯科技(深圳)有限公司 Service request processing method and device
US20190370793A1 (en) * 2018-06-04 2019-12-05 Decentralized Finance Labs, Inc. Hybrid consensus for blockchain using proof of work and proof of stake
CN108964905A (en) * 2018-07-18 2018-12-07 胡祥义 A kind of safe and efficient block chain implementation method
CN110431580A (en) * 2018-11-30 2019-11-08 阿里巴巴集团控股有限公司 Concurrent block chain Fail Transaction is reduced using the table of random numbers
CN109801152A (en) * 2019-01-24 2019-05-24 中国农业银行股份有限公司 Supplementary pension method for processing business and system based on block chain

Also Published As

Publication number Publication date
CN111562947A (en) 2020-08-21
WO2021197096A1 (en) 2021-10-07

Similar Documents

Publication Publication Date Title
US10679439B2 (en) Method and device for controlling code lock
CN111224795B (en) Group application processing method and device, electronic equipment and storage medium
CN104954322A (en) Account binding method, device and system
CN102461136A (en) Remotely locating and commanding a mobile device
CN109657899B (en) Item processing method, device, equipment and readable storage medium
US20170171382A1 (en) Communication system, communication terminal, communication method, and program
CN112817995A (en) Data processing method and device, electronic equipment and storage medium
CN111562947B (en) Service processing method and device and electronic equipment
CN111552942B (en) Identity authentication method, system, device and computer storage medium
CN110930561A (en) Control method and device of intelligent lock
US20150012921A1 (en) Systems, methods, and computer program products for processing sets of instructions for mobile devices
CN107797849B (en) Method, device and system for distributed transaction processing
CN106528333A (en) Data backup method and apparatus
CN107797850B (en) Method, device and system for distributed transaction processing
CN108829495B (en) Verification method, device, equipment and storage medium for multi-database modification transaction
CN104809239A (en) Instrument appointment registering method and management platform of instruments
CN110648105B (en) Recommendation method and device based on data processing, electronic equipment and storage medium
CN112257885B (en) Conference room intelligent allocation method and device, computer equipment and storage medium
CN115345441A (en) Shift management method, shift management apparatus, shift management device, shift management program, storage medium, and program product
CN114896337A (en) Data uplink method, system, equipment and computer readable storage medium
CN115499438A (en) Task allocation method and device, electronic equipment and storage medium
CN111047762A (en) Queuing method and device and computer storage medium
CN111144845B (en) Mobile terminal meeting reminding method and device
CN114219437A (en) Credit report query method, device, server and storage medium
CN110569639B (en) Application program equipment activation method and device based on asynchronous processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40035824

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240220

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

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

Country or region after: Singapore

Address before: 45-01 Anson Building, 8 Shanton Avenue, Singapore

Patentee before: Alipay laboratories (Singapore) Ltd.

Country or region before: Singapore