Disclosure of Invention
The application provides a region-based digital currency using method and device and electronic equipment, which can control the using region of digital currency, realize the supervision of the digital currency and avoid the digital currency from flowing into a non-target region for use. The technical scheme adopted by the application is as follows:
in a first aspect, there is provided a region-based digital currency use method, the method comprising,
after receiving a first payment instruction of the digital currency from a payer, changing the owner identification of the digital currency into a payer specified by the first payment instruction, and setting or changing the usage area rule of the digital currency into the usage area rule specified by the first payment instruction, thereby obtaining a first target digital currency;
the first target digital currency is sent to the user.
Optionally, the method further comprises:
after receiving a second payment instruction of the digital currency of the user, verifying whether a digital currency use area corresponding to the second payment instruction meets a use area rule specified by the first payment instruction;
if the usage area rule specified by the first payment instruction is met, changing the owner identification of the digital currency to the payee specified by the second payment instruction, and setting the usage area of the digital currency to be not limited by the area rule, thereby obtaining a second target digital currency;
sending the second targeted digital currency to the recipient.
Optionally, the setting or changing using the region rule is set according to a smart contract associated with the digital currency.
Optionally, the usage area rule is set by the payer according to a usage attribute of the digital currency and included in the digital currency from the payer.
Optionally, the digital currency is a cryptographic string that includes an amount of the digital currency, an issuer identification, and an owner identification, the cryptographic string further including a smart contract identification attribute field that associates the digital currency with the smart contract.
Optionally, the smart contract includes an identification associating the digital currency with the smart contract.
In a second aspect, there is provided a region-based digital money usage apparatus, the apparatus comprising,
the system comprises a first changing module, a second changing module and a third changing module, wherein the first changing module is used for changing the owner identification of the digital currency into a user specified by a first payment instruction after receiving the first payment instruction of the digital currency from a payer, and setting or changing the usage area rule of the digital currency into the usage area rule specified by the first payment instruction, so that a first target digital currency is obtained;
a first sending module for sending the first target digital currency to the payer.
Optionally, the apparatus further comprises:
the verification module is used for verifying whether a digital currency use area corresponding to a second payment instruction meets a use area rule specified by the first payment instruction or not after the second payment instruction of the digital currency of the user is received;
a second changing module, configured to change the owner identifier of the digital currency to a payee specified by the second payment instruction if the usage area rule specified by the first payment instruction is met, and set the usage area of the digital currency to be not limited by the area rule, thereby obtaining a second target digital currency;
a second sending module to send the second target digital currency to the recipient.
Optionally, the setting or changing using the region rule is set according to a smart contract associated with the digital currency.
Optionally, the usage area rule is set by the payer according to a usage attribute of the digital currency and included in the digital currency from the payer.
Optionally, the usage area rule is set by the payer according to a usage attribute of the digital currency and included in the digital currency from the payer.
Optionally, the cryptographic string includes an amount of the digital currency, an issuer identification, and an owner identification, the cryptographic string further including a smart contract identification attribute field that associates the digital currency with the smart contract.
Optionally, the smart contract includes an identification associating the digital currency with the smart contract.
In a third aspect, an electronic device is provided, which includes:
one or more processors;
a memory;
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: the region-based digital money usage method shown in the first aspect is performed.
In a fourth aspect, there is provided a computer-readable storage medium for storing computer instructions which, when run on a computer, cause the computer to perform the region-based digital currency use method shown in the first aspect.
The application provides a region-based digital currency using method, a region-based digital currency using device and electronic equipment, wherein after a first payment instruction of digital currency from a payer is received, the owner identification of the digital currency is changed to a user specified by the first payment instruction, and a usage region rule of the digital currency is set or changed to the usage region rule specified by the first payment instruction, so that a first target digital currency is obtained; sending the first target digital currency to the user. The method includes the steps that a rule of using areas of digital currency is set according to a first payment instruction of the digital currency of a payer, so that the using areas of the digital currency can be controlled, supervision on the digital currency is achieved, the digital currency is prevented from flowing into a non-target area to be used, illustratively, the digital currency is set to be used only in an area 1 corresponding to a country A, the digital currency cannot be used in other areas except the area 1 of the country A or a country B, and therefore limitation on the using areas of the digital currency is achieved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
The micro-service is not only the micro-service itself but also a system provides a set of basic framework, the framework can enable the micro-service to be independently deployed, operated and upgraded, and the micro-service can be structurally loosely coupled and functionally represented as a unified whole. The 'unified whole' can be represented by a unified style interface, unified authority management, a unified security policy, a unified online process, a unified log and auditing method, a unified scheduling mode, a unified access entry and the like.
The embodiment of the application provides a region-based digital currency using method, as shown in fig. 1, the method may include the following steps:
step S101, after receiving a first payment instruction of digital currency from a payer, changing the owner identification of the digital currency into a user specified by the first payment instruction, and setting or changing the usage area rule of the digital currency into the usage area rule specified by the first payment instruction, thereby obtaining a first target digital currency;
step S102, sending the first target digital currency to the user.
Further, the method may further include:
step S103 (not shown in the figure), after receiving a second payment instruction of the digital currency of the user, verifying whether a usage area of the digital currency corresponding to the second payment instruction meets a usage area rule specified by the first payment instruction;
step S104 (not shown in the figure), if the usage area rule specified by the first payment instruction is met, changing the owner identification of the digital currency into the payee specified by the second payment instruction, and setting the usage area of the digital currency not to be limited by the area rule, thereby obtaining a second target digital currency;
step S105 (not shown in the figure) of sending the second target digital currency to the transferee.
Step S106 (not shown), if the usage area rule specified by the first payment instruction is met, rejecting the payment request.
Wherein the setting or changing of the usage area rule is set according to a smart contract associated with the digital money. Wherein the usage area rule is set by the payer according to a usage attribute of the digital currency and included in the digital currency from the payer. In another embodiment, the setting or changing of the usage area rule is set by the payer in accordance with the usage attribute of the digital money and is included in the digital money from the payer.
Wherein the digital currency is a cryptographic string that includes an amount of the digital currency, an issuer identification, and an owner identification, the cryptographic string further including an intelligent contract identification attribute field that associates the digital currency with the intelligent contract.
Wherein the smart contract includes an identification associating the digital currency with the smart contract. Specifically, to associate digital currency with smart contracts, embodiments of the present invention provide two ways: one is to add a smart contract identification attribute field to the digital currency encryption string through which the digital currency is directly associated with the smart contract. The other method is to add the identification of the digital currency encryption string or the identification of the digital currency transaction characteristics in the intelligent contract, and the digital currency encryption string is specified through the identification of the digital currency encryption string so as to associate the digital currency with the intelligent contract. Digital currency transactions such as payments, smart contracts may be created by identifying particular payment characteristics, such as: payer information, payee information, and thus to the digital currency in which the transaction takes place between all of them.
In addition, digital authentication is used in the process of initiating transaction and running intelligent contracts by digital currency, the basic technology of the digital authentication is to use an asymmetric encryption algorithm to carry out digital signature, and a hash algorithm is used in a signature algorithm.
Specifically, the using method of the area-based digital currency according to the embodiment of the present invention may include two or more using parties, and each of the using parties may initiate an operation of transferring the digital currency to a next using party or a receiving party after receiving the digital currency with usage rules.
For example, fig. 3 is a schematic diagram of expressions and attributes of digital currency according to an embodiment of the present invention, and as shown in fig. 3, the entire character string of the digital currency is encrypted, i.e., the digital currency is represented as an encrypted character string. The attribute of the digital currency is recorded in sub-fields. The fields themselves are scalable and each field is of variable length. The fields may be extended as needed (i.e., application extension). The digital currency encryption string has uniqueness. No part of the digital currency encryption string has regularity.
The attributes of digital currency may include the most basic amount, issuer identification and owner identification. The digital currency contains a unique number (currency number field). The digital currency owner identification may be associated with the real name of the real user. The specific association establishes a correspondence of owner identification to real user by the digital currency system. In the encryption string of digital currency, the owner identification is anonymous, and the background of the digital currency system can realize real name.
Digital currency attributes may include a number of attributes, such as may include currency management attributes, which are a type of field used to support the management of currency issuance currency by currency authorities. The digital currency security attribute is a group of fields related to digital currency security encryption, and can realize the purposes of digital currency non-counterfeiting, non-tampering, non-repudiation, privacy protection, transaction security protection and the like. The digital currency application attribute is a group of fields of the digital currency which meet the requirements of application scenes and value-added services, and can realize functions of controlling fund flow, executing intelligent contracts and the like. Digital currency is a string of encrypted words that identify its owner and amount, representing the currency the owner owns. In a digital money transfer transaction process, the transfer is reflected in the transfer of the owner. After each transaction, the digital currency before the transaction occurred is invalidated, and new digital currency is generated. The old currency before transaction is called the source currency, and the new currency after transaction is called the destination currency. The entire transaction process forms a chain of digital money transfers, thereby enabling digital money traceability. The digital currency background can convert the owner identification into a real user, thereby realizing the anonymous foreground and real-name tracking of the background.
The application attribute field is a group of fields of the digital currency meeting the requirements of application scenes and value-added services, and can realize functions of controlling fund flow, executing intelligent contracts and the like. Wherein the usage area rule of the digital money can be set in the application extension.
In addition, after the RMB is internationalized in the future, the electronic currency of the RMB can also be used as the French currency of other countries, and in order to ensure the currency quantity circulating in the country, the method can realize the control of the use area of the electronic currency. For example, the number of digital currencies in a certain country or region is limited, so that the sudden inrush and inrush of the currencies are avoided, and the effective control of the digital currencies is realized. Illustratively, digital money is set to be usable only in region 1 corresponding to country a, and digital money is not usable in regions of country a other than region 1 or country B, thereby realizing restriction on the region of use of digital money.
The method for using digital currency based on regions in the embodiment of the invention is explained by taking a consumption coupon scene as an example:
the related government departments send the consumption coupons by using funds in the form of digital currency, and set up payment contracts according to the use requirements of the consumption coupons, the payment contracts are automatically executed by a digital currency system, and the digital currency can only enter and exit according to the fund passage defined by the use region rules specified by the payment contracts. The directional payment function ensures that related government departments can independently control the use area of subsequent consumption coupons to achieve the limited area use of digital currency.
The embodiment of the application provides a region-based digital currency using method, after a first payment instruction of digital currency from a payer is received, the owner identification of the digital currency is changed to a user specified by the first payment instruction, and a usage region rule of the digital currency is set or changed to a usage region rule specified by the first payment instruction, so that a first target digital currency is obtained; sending the first target digital currency to the user. The method includes the steps that a rule of using areas of digital currency is set according to a first payment instruction of the digital currency of a payer, so that the using areas of the digital currency can be controlled, supervision on the digital currency is achieved, the digital currency is prevented from flowing into a non-target area to be used, illustratively, the digital currency is set to be used only in an area 1 corresponding to a country A, the digital currency cannot be used in other areas except the area 1 of the country A or a country B, and therefore limitation on the using areas of the digital currency is achieved.
Fig. 2 is a block diagram of an area-based digital money usage apparatus according to an embodiment of the present invention, where the apparatus 20 includes: a first change module 201, a first sending module 202, wherein,
the system comprises a first changing module, a second changing module and a third changing module, wherein the first changing module is used for changing the owner identification of the digital currency into a user specified by a first payment instruction after receiving the first payment instruction of the digital currency from a payer, and setting or changing the usage area rule of the digital currency into the usage area rule specified by the first payment instruction, so that a first target digital currency is obtained;
a first sending module for sending the first target digital currency to the payer.
The embodiment of the application provides a region-based digital currency using device, which changes the owner identification of digital currency into a user specified by a first payment instruction after receiving the first payment instruction of the digital currency from a payer, and sets or changes the usage region rule of the digital currency into the usage region rule specified by the first payment instruction, thereby obtaining a first target digital currency; sending the first target digital currency to the user. The method includes the steps that a rule of using areas of digital currency is set according to a first payment instruction of the digital currency of a payer, so that the using areas of the digital currency can be controlled, supervision on the digital currency is achieved, the digital currency is prevented from flowing into a non-target area to be used, illustratively, the digital currency is set to be used only in an area 1 corresponding to a country A, the digital currency cannot be used in other areas except the area 1 of the country A or a country B, and therefore limitation on the using areas of the digital currency is achieved.
The embodiment of the present application provides a possible implementation manner, and further, the apparatus further includes:
the verification module is used for verifying whether a digital currency use area corresponding to a second payment instruction meets a use area rule specified by the first payment instruction or not after the second payment instruction of the digital currency of the user is received;
a second changing module, configured to change the owner identifier of the digital currency to a payee specified by the second payment instruction if the usage area rule specified by the first payment instruction is met, and set the usage area of the digital currency to be not limited by the area rule, thereby obtaining a second target digital currency;
a second sending module to send the second target digital currency to the recipient.
Wherein the setting or changing of the usage area rule is set according to a smart contract associated with the digital money.
Wherein the usage area rule is set by the payer according to a usage attribute of the digital currency and included in the digital currency from the payer.
Wherein the digital currency is a cryptographic string that includes an amount of the digital currency, an issuer identification, and an owner identification, the cryptographic string further including an intelligent contract identification attribute field that associates the digital currency with the intelligent contract.
Wherein the smart contract includes an identification associating the digital currency with the smart contract.
The region-based digital currency using device of the present embodiment can perform the region-based digital currency using method provided in the above embodiments of the present application, and the implementation principles are similar, and the beneficial effects are similar, which are not described herein again.
An embodiment of the present application provides an electronic device, as shown in fig. 4, an electronic device 40 shown in fig. 4 includes: a processor 4001 and a memory 4003. Processor 4001 is coupled to memory 4003, such as via bus 4002. Further, the electronic device 40 may also include a transceiver 4004. In addition, the transceiver 4004 is not limited to one in practical applications, and the structure of the electronic device 40 is not limited to the embodiment of the present application. The processor 4001 is applied in the embodiment of the present application, and is used to implement the functions of the modules shown in fig. 2. The transceiver 4004 includes a receiver and a transmitter.
Processor 4001 may be a CPU, general purpose processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 4001 may also be a combination that performs a computational function, including, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
Bus 4002 may include a path that carries information between the aforementioned components. Bus 4002 may be a PCI bus, EISA bus, or the like. The bus 4002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
Memory 4003 may be, but is not limited to, a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 4003 is used for storing application codes for executing the scheme of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute application code stored in the memory 4003 to implement the functions of the area-based digital money using apparatus provided in the embodiment shown in fig. 2.
The embodiment of the application provides an electronic device, which changes the owner identification of digital currency into a user specified by a first payment instruction after receiving the first payment instruction of the digital currency from a payer, and sets or changes the usage area rule of the digital currency into the usage area rule specified by the first payment instruction, thereby obtaining a first target digital currency; sending the first target digital currency to the user. The method includes the steps that a rule of using areas of digital currency is set according to a first payment instruction of the digital currency of a payer, so that the using areas of the digital currency can be controlled, supervision on the digital currency is achieved, the digital currency is prevented from flowing into a non-target area to be used, illustratively, the digital currency is set to be used only in an area 1 corresponding to a country A, the digital currency cannot be used in other areas except the area 1 of the country A or a country B, and therefore limitation on the using areas of the digital currency is achieved.
The embodiment of the application provides an electronic device suitable for the method embodiment. And will not be described in detail herein.
The present application provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method shown in the above embodiments is implemented.
The embodiment of the application provides a computer-readable storage medium, which is used for changing the owner identification of digital currency into a user specified by a first payment instruction after receiving the first payment instruction of the digital currency from a payer, and setting or changing the usage area rule of the digital currency into the usage area rule specified by the first payment instruction, so as to obtain a first target digital currency; sending the first target digital currency to the user. The method includes the steps that a rule of using areas of digital currency is set according to a first payment instruction of the digital currency of a payer, so that the using areas of the digital currency can be controlled, supervision on the digital currency is achieved, the digital currency is prevented from flowing into a non-target area to be used, illustratively, the digital currency is set to be used only in an area 1 corresponding to a country A, the digital currency cannot be used in other areas except the area 1 of the country A or a country B, and therefore limitation on the using areas of the digital currency is achieved.
The embodiment of the application provides a computer-readable storage medium which is suitable for the method embodiment. And will not be described in detail herein.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.