[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN111008251B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN111008251B
CN111008251B CN201911239959.XA CN201911239959A CN111008251B CN 111008251 B CN111008251 B CN 111008251B CN 201911239959 A CN201911239959 A CN 201911239959A CN 111008251 B CN111008251 B CN 111008251B
Authority
CN
China
Prior art keywords
information
service
user
business
account
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
CN201911239959.XA
Other languages
Chinese (zh)
Other versions
CN111008251A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911239959.XA priority Critical patent/CN111008251B/en
Publication of CN111008251A publication Critical patent/CN111008251A/en
Application granted granted Critical
Publication of CN111008251B publication Critical patent/CN111008251B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2219Large Object storage; Management thereof
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application discloses a data processing method and equipment, wherein the method comprises the following steps: acquiring service data and a first digital asset of a user sent by a service server; the service data comprises user information corresponding to the user, number information associated with the user information, account information associated with the user information and service quantity; the number of first digital assets is a business number; generating a number block based on the business data, adding the number block into a blockchain, and sending a first digital asset to a escrow account in a blockchain node for storage; determining the matching degree of the number information in the service data based on the matching number; determining the business income quantity corresponding to the user information according to the intelligent contract and the matching degree; and acquiring a second digital asset corresponding to the business income quantity from the managed account, and sending the second digital asset to account information corresponding to the user information. By adopting the application, the data reliability of data processing and distribution can be ensured.

Description

Data processing method and device
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a data processing method and apparatus.
Background
The arrival of the mobile internet age, data has penetrated every industry and business function area today, becoming an important production factor. People excavate and use a large amount of data, change the life style of people, in order to improve the interactivity among user groups and increase the user enthusiasm, data rewards are usually carried out on business objects, the data rewards generally adopt a random mode, for example, rewards objects corresponding to the data rewards and users are randomly extracted, but the data rewards bring great hidden danger when the data is increased, for example, the data rewards are changed to obtain improper interests, so that the interests of the users are damaged, and the data reliability of data processing and distribution cannot be guaranteed.
Disclosure of Invention
The embodiment of the application provides a data processing method and device, which can ensure the data reliability of data processing and distribution.
In one aspect, an embodiment of the present application provides a data processing method, which may include:
Acquiring service data and a first digital asset of a user sent by a service server; the service data comprises user information corresponding to the user, number information associated with the user information, account information associated with the user information and service quantity; the number of first digital assets is a business number;
Generating a number block based on the business data, adding the number block into a blockchain, and sending a first digital asset to a escrow account in a blockchain node for storage;
determining the matching degree of the number information in the service data based on the matching number;
Determining the business income quantity corresponding to the user information according to the intelligent contract and the matching degree;
And acquiring a second digital asset corresponding to the business income quantity from the managed account, and sending the second digital asset to account information corresponding to the user information.
Wherein, based on the matching number, determining the matching degree of the number information in the service data comprises:
obtaining a number block for storing service data from a block chain, and obtaining number information from the number block;
obtaining hit number fragments in the matched number and number information fragments in the number information, and counting the same fragment numbers of the hit number fragments and the number information fragments;
And determining the matching degree of the number information according to the same fragment number.
The method for determining the business income quantity corresponding to the user information according to the intelligent contract and the matching degree comprises the following steps:
Obtaining grade information corresponding to the matching degree of the number information from a first corresponding relation in the blockchain intelligent contract; determining a business coefficient corresponding to the grade information from the second corresponding relation in the intelligent contract;
And determining the service income quantity of the user according to the service coefficient and the service quantity.
The method comprises the steps of obtaining grade information corresponding to the matching degree of number information from intelligent contracts of a blockchain; before determining the business coefficient corresponding to the level information from the intelligent contract, the method further comprises the following steps:
Acquiring a first corresponding relation between the matching degree and grade information and a second corresponding relation between the grade information and service coefficients, which are sent by a service server;
The first correspondence and the second correspondence are added to the intelligent contract of the blockchain.
Wherein, determining the service income quantity of the user according to the service coefficient and the service quantity comprises the following steps:
When the business coefficient is a target coefficient, determining the business gain quantity corresponding to the target coefficient as the business gain quantity of the user to which the user information belongs;
And when the service coefficient is not the target coefficient, acquiring the service quantity corresponding to the user information from the number block, and determining the product of the service coefficient and the service quantity as the service income quantity of the user to which the user information belongs.
The method for acquiring the second digital asset corresponding to the business income quantity from the managed account, and sending the second digital asset to account information corresponding to the user information comprises the following steps:
Obtaining a second digital asset in an amount of business gain from the escrow account;
and acquiring account information associated with the user information from a user block to which the user information belongs, and sending the second digital asset to the account information.
Wherein, still include:
Determining a minimum threshold for the digital asset in the escrow account according to the intelligent contract and the business quantity;
and when the current digital asset in the managed account is smaller than the minimum threshold value, sending prompt information to the business server.
Before determining the matching degree of the number information in the service data based on the matching number, the method further comprises the following steps:
at least one random number is generated by adopting a random function, at least one hash value is generated according to the at least one random number and the block height information of the number block, and the matching number is determined according to the at least one hash value.
In one aspect, an embodiment of the present application provides a data processing apparatus, which may include:
The data acquisition unit is used for acquiring service data of the user and the first digital asset, which are sent by the service server; the service data comprises user information corresponding to the user, number information associated with the user information, account information associated with the user information and service quantity; the number of first digital assets is a business number;
the data storage unit is used for generating a number block based on the service data, adding the number block into a blockchain, and sending the first digital asset to a managed account in a blockchain node for storage;
The matching degree determining unit is used for determining the matching degree of the number information in the service data based on the matching number;
The profit obtaining unit is used for determining the business profit quantity corresponding to the user information according to the intelligent contract and the matching degree;
And the profit distribution unit is used for acquiring second digital assets corresponding to the business profit quantity from the managed account and sending the second digital assets to account information corresponding to the user information.
The matching degree determining unit is specifically configured to:
obtaining a number block for storing service data from a block chain, and obtaining number information from the number block;
obtaining hit number fragments in the matched number and number information fragments in the number information, and counting the same fragment numbers of the hit number fragments and the number information fragments;
And determining the matching degree of the number information according to the same fragment number.
Wherein the profit obtaining unit includes:
The coefficient determination subunit is used for acquiring grade information corresponding to the matching degree of the number information from the first corresponding relation in the blockchain intelligent contract; determining a business coefficient corresponding to the grade information from the second corresponding relation in the intelligent contract;
And the profit determining subunit is used for determining the business profit quantity of the user according to the business coefficient and the business quantity.
Wherein, still include:
the relation adding unit is used for obtaining a first corresponding relation between the matching degree and the grade information and a second corresponding relation between the grade information and the service coefficient, which are sent by the service server; the first correspondence and the second correspondence are added to the intelligent contract of the blockchain.
Wherein, the benefit determining subunit is specifically configured to:
When the business coefficient is a target coefficient, determining the business gain quantity corresponding to the target coefficient as the business gain quantity of the user to which the user information belongs;
And when the service coefficient is not the target coefficient, acquiring the service quantity corresponding to the user information from the number block, and determining the product of the service coefficient and the service quantity as the service income quantity of the user to which the user information belongs.
The profit distribution unit is specifically configured to:
Obtaining a second digital asset in an amount of business gain from the escrow account;
and acquiring account information associated with the user information from a user block to which the user information belongs, and sending the second digital asset to the account information.
Wherein, still include:
The information prompt unit is used for determining the minimum threshold value of the digital asset in the managed account according to the intelligent contract and the business quantity; and when the current digital asset in the managed account is smaller than the minimum threshold value, sending prompt information to the business server.
Wherein, still include:
And the matching number determining unit is used for generating at least one random number by adopting a random function, generating at least one hash value according to the at least one random number and the block height information of the number block, and determining the matching number according to the at least one hash value.
In one aspect, embodiments of the present application provide a computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In one aspect, a computer device is provided, including a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps described above.
In the embodiment of the application, the service data and the first digital assets of the user sent by the service server are acquired, the number block is generated based on the service data, the number block is added into the blockchain, the first digital assets are sent to the managed account in the blockchain node for storage, the matching degree of the number information in the service data is determined based on the matching number, the service benefit quantity corresponding to the user information is determined according to the intelligent contract and the matching degree, the second digital assets corresponding to the service benefit quantity are acquired from the managed account, and the second digital assets are sent to the account information corresponding to the user information. The matching number is determined through the hash value which cannot be tampered and predicted, the grade information of the user information corresponding to the number information is further determined, the income corresponding to the grade information is automatically sent to the user account, and the data reliability of data processing and distribution can be ensured.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1a is a system architecture diagram for data processing according to an embodiment of the present application;
FIG. 1b is a schematic diagram of a distributed system according to an embodiment of the present application;
FIG. 1c is a schematic block diagram of a block structure according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a data processing method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a data processing method according to an embodiment of the present application;
FIG. 4 is an exemplary diagram of a data process provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Fig. 1a is a system architecture diagram for data processing according to an embodiment of the present invention. The blockchain server 10c establishes a connection with the service server 10b and the user terminal 10a through a network, the service server 10b establishes a connection with the user terminal 10a through a network, the blockchain server 10c may be a server cluster, and the user terminal 10a may also correspond to a plurality of user terminals. The blockchain server 10c obtains service data and first digital assets of a user sent by the service server 10b, the service data is sent to the service server 10b through the user terminal 10a, the blockchain server 10c generates a number block based on the service data, the number block is added to a blockchain, the blockchain comprises a plurality of nodes and blocks, the number block comprises user information corresponding to the user, number information associated with the user information, account information associated with the user information, service quantity and the like, the blockchain server 10c sends the first digital assets to a hosting account 10d in the blockchain node to be stored, at least one random number is generated by adopting a random function, at least one hash value is generated by the random number, a matching number is determined according to the hash value, the matching degree of the number information in the block number is further determined, the service benefit quantity corresponding to the user information is determined according to an intelligent contract and the matching degree, the second digital assets corresponding to the service benefit quantity are obtained from the hosting account 10d, and the second digital assets corresponding to the user information are sent to the account information.
The server according to the embodiment of the present application may include a server having data transmission and storage, and the user terminal includes: terminal devices such as tablet computers, smart phones, personal Computers (PCs), notebook computers, palm computers, and the like.
The blockchain related in the embodiment of the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The blockchain underlying platform may include processing modules for user management, basic services, smart contracts, and operation detection. The user management module is responsible for identity information management of all blockchain participants, including maintenance of public and private key generation (account management), key management, maintenance of corresponding relation between the real identity of the user and the blockchain address (authority management) and the like, and under the condition of authorization, supervision and audit of transaction conditions of certain real identities, and provision of rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node devices, is used for verifying the validity of a service request, recording the service request on a storage after the effective request is identified, for a new service request, the basic service firstly analyzes interface adaptation and authenticates the interface adaptation, encrypts service information (identification management) through an identification algorithm, and transmits the encrypted service information to a shared account book (network communication) in a complete and consistent manner, and records and stores the service information; the intelligent contract module is responsible for registering and issuing contracts, triggering contracts and executing contracts, a developer can define contract logic through a certain programming language, issue the contract logic to a blockchain (contract registering), invoke keys or other event triggering execution according to the logic of contract clauses to complete the contract logic, and simultaneously provide a function of registering contract upgrading; the operation detection module is mainly responsible for deployment in the product release process, modification of configuration, contract setting, cloud adaptation and visual output of real-time states in product operation, for example: alarms, detecting network conditions, detecting node device health status, etc.
The platform product service layer provides basic capabilities and implementation frameworks of typical applications, and developers can complete the blockchain implementation of business logic based on the basic capabilities and the characteristics of the superposition business. The application service layer provides the application service based on the block chain scheme to the business participants for use.
The following describes a specific implementation scenario provided for an embodiment of the present application with reference to fig. 1b and 1 c. The blockchain network according to the embodiment of the present application may be a distributed system formed by connecting a client and a plurality of nodes (any form of computing device in an access network, such as a server and a user terminal) through a network communication.
Taking the distributed system as an example of a blockchain system, referring To fig. 1b, fig. 1b is a schematic structural diagram of an alternative application of the distributed system 100 provided in the embodiment of the present invention To the blockchain system, where the structure is formed by a plurality of nodes (any form of computing devices in an access network, such as servers and user terminals) and clients, and a Peer-To-Peer (P2P, peer To Peer) network is formed between the nodes, where the P2P protocol is an application layer protocol running on top of a transmission control protocol (TCP, transmission Control Protocol) protocol. In a distributed system, any machine, such as a server, a terminal, may join to become a node, including a hardware layer, an intermediate layer, an operating system layer, and an application layer.
Referring to the functionality of each node in the blockchain system shown in fig. 1b, the functionality involved includes:
1) The routing, the node has basic functions for supporting communication between nodes.
Besides the routing function, the node can also have the following functions:
2) The application is used for being deployed in a block chain to realize specific service according to actual service requirements, recording data related to the realization function to form recorded data, carrying a digital signature in the recorded data to represent the source of task data, sending the recorded data to other nodes in the block chain system, and adding the recorded data into a temporary block when the source and the integrity of the recorded data are verified by the other nodes.
For example, the services implemented by the application include:
2.1 Wallet for providing electronic money transactions, including initiating a transaction (i.e., sending a transaction record of the current transaction to other nodes in the blockchain system, the other nodes, after verification, storing record data of the transaction in a temporary block of the blockchain in response to acknowledging that the transaction is valid; of course, the wallet also supports inquiry of remaining electronic money in the electronic money address;
2.2 The shared account book is used for providing the functions of storing, inquiring, modifying and the like of account data, sending record data of the operation on the account data to other nodes in the blockchain system, and after the other nodes verify to be effective, storing the record data into a temporary block as a response for acknowledging that the account data is effective, and also sending confirmation to the node initiating the operation.
2.3 A computerized agreement that can execute the terms of a contract, implemented by code deployed on a shared ledger for execution when certain conditions are met, for completing automated transactions based on actual business demand codes, such as querying the physical distribution status of the goods purchased by the buyer, transferring the electronic money of the buyer to the merchant's address after the buyer signs for the goods; of course, the smart contract is not limited to executing the contract for the transaction, and may execute a contract that processes the received information.
3) The blockchain comprises a series of blocks which are mutually connected according to the sequence of the generated time, the new blocks can not be removed once being added into the blockchain, and record data submitted by nodes in the blockchain system are recorded in the blocks.
Referring to fig. 1c, fig. 1c is an optional Block Structure (Block Structure) according to an embodiment of the present invention, where each Block includes a hash value of a transaction record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a blockchain. In addition, the block may include information such as a time stamp at the time of block generation. A blockchain is essentially a de-centralized database, which is a series of data blocks that are generated in association using cryptographic methods, each of which contains associated information that is used to verify the validity (anti-counterfeiting) of its information and to generate the next block.
Referring to fig. 2, a flow chart of a data processing method is provided in an embodiment of the application. As shown in fig. 2, the method according to the embodiment of the present application may include the following steps S101 to S105.
S101, acquiring service data and a first digital asset of a user sent by a service server; the service data comprises user information corresponding to the user, number information associated with the user information, account information associated with the user information and service quantity; the number of first digital assets is a business number;
Specifically, the data processing device acquires service data and a first digital asset of a user sent by a service server; it may be understood that the data processing device may be a blockchain server in fig. 1a, where the service data includes user information corresponding to a user, number information associated with the user information, account information associated with the user information, and a service number, the service data sent by the service server is generated according to the number information selected by the user and the corresponding service number, the account information is login information corresponding to the user, specifically may be a phone number or an identification card number, the first asset information is generated according to the service number, typically, the number of the first digital assets is the service number, the user sends the first digital assets from the account information of the user to the service server, and the service server generates corresponding service data and obtains the first digital assets according to the selection of the user, and obtains the service data and the first digital assets of the user sent by the service server.
S102, generating a number block based on service data, adding the number block into a blockchain, and sending a first digital asset to a escrow account in a blockchain node for storage;
Specifically, the data processing device generates a number block based on service data, adds the number block to a blockchain, sends a first digital asset to a hosting account in a blockchain node for storage, and it can be understood that the data processing device sends the service data to the blockchain node, the blockchain node is a server for processing the data in the blockchain and maintaining normal operation of the blockchain, a plurality of nodes can be included in the blockchain, information among the nodes can be shared, after the blockchain node receives the service data, the number block is generated based on the service data, and is added to the blockchain, one number block comprises the service data corresponding to a user, the number block comprises a block header and a block body, the block header comprises a version number of the blockchain, a timestamp and a hash address of the last block, the block body is used for storing the service data, and the data processing device sends the first digital asset to the hosting account in the blockchain node for storage, and the hosting account in the blockchain is a public account for temporarily storing the first digital asset sent to the service server by the user.
S103, determining the matching degree of the number information in the service data based on the matching number;
Specifically, the data processing device determines the matching degree of the number information in the service data based on the matching number, and it can be understood that the matching number is a number which is generated for the service data and has the same format as the number information, the number information and the matching number have a plurality of number segments, the matching degree corresponds to the number of the matching number and the number information of the same number segment, the number of the same number segments is larger, the matching degree is higher, the data processing device obtains a plurality of number information and user information corresponding to the plurality of number information from the number block, calculates the matching degree corresponding to each number information according to the matching number, and determines the grade information of the user information corresponding to the number information according to the matching degree.
S104, determining the business income quantity corresponding to the user information according to the intelligent contract and the matching degree;
Specifically, the data processing device determines the number of service benefits corresponding to the user information according to the intelligent contract and the matching degree, it can be understood that the intelligent contract is used for storing a calculation rule of the service data benefits, the data processing device determines the matching degree, calculates the number of service benefits corresponding to the matching degree according to the intelligent contract, and can determine the number of service benefits of the user to which the matching degree belongs, wherein the number of service benefits is the number corresponding to the digital asset, and it is required that the number of service benefits can be obtained according to the corresponding relationship between the matching degree and the number of service benefits, or the service coefficient corresponding to the matching degree is firstly obtained according to the corresponding relationship between the matching degree and the service coefficient, and then the number of service benefits is determined according to the service coefficient.
S105, acquiring a second digital asset corresponding to the business income quantity from the managed account, and sending the second digital asset to account information corresponding to the user information.
Specifically, the data processing device obtains a second digital asset corresponding to the service benefit amount from the hosted account, sends the second digital asset to account information corresponding to the user information, and it can be understood that the hosted account is a public account in the blockchain and is used for temporarily storing a first digital asset sent to the service server by the user, the hosted account comprises at least one first digital asset of the user, the data processing device obtains a second digital asset with the service benefit amount from the hosted account, the second digital asset is a digital asset generated according to the service benefit amount, the number of the second digital asset is the service benefit amount, the data processing device obtains account information associated with the user information from the blockchain, and sends the second digital asset to the account information.
In the embodiment of the application, the service data and the first digital assets of the user sent by the service server are acquired, the number block is generated based on the service data, the number block is added into the blockchain, the first digital assets are sent to the managed account in the blockchain node for storage, the matching degree of the number information in the service data is determined based on the matching number, the service benefit quantity corresponding to the user information is determined according to the intelligent contract and the matching degree, the second digital assets corresponding to the service benefit quantity are acquired from the managed account, and the second digital assets are sent to the account information corresponding to the user information. The matching number is determined through the hash value which cannot be tampered and predicted, the grade information of the user information corresponding to the number information is further determined, the income corresponding to the grade information is automatically sent to the user account, and the data reliability of data processing and distribution can be ensured.
Referring to fig. 3, a flow chart of a data processing method is provided in an embodiment of the present application. As shown in fig. 3, the method according to the embodiment of the present application may include the following steps S201 to S209.
S201, obtaining a first corresponding relation between the matching degree and the grade information and a second corresponding relation between the grade information and the service coefficient, which are sent by a service server; the first correspondence and the second correspondence are added to the intelligent contract of the blockchain.
Specifically, the data processing equipment acquires a first corresponding relation between the matching degree and the grade information and a second corresponding relation between the grade information and the service coefficient, which are sent by the service server; the first corresponding relation and the second corresponding relation are added to the intelligent contract of the blockchain, it can be understood that the first corresponding relation between the matching degree and the grade information and the second corresponding relation between the grade information and the service coefficient are preset, the matching degree is the similarity between the matching number and the number information, the service server sends the first corresponding relation and the second corresponding relation to the data processing equipment, the data processing equipment adds the first corresponding relation and the second corresponding relation to the intelligent contract, and then service income data of each user can be determined according to the first corresponding relation and the second corresponding relation.
S202, acquiring service data and a first digital asset of a user sent by a service server; the service data comprises user information corresponding to the user, number information associated with the user information, account information associated with the user information and service quantity; the number of first digital assets is a business number;
Specifically, the data processing device acquires service data and a first digital asset of a user sent by a service server; it may be understood that the service data includes user information corresponding to the user, number information associated with the user information, account information associated with the user information, and service number, the service data sent by the service server is generated according to the number information selected by the user and the corresponding service number, the account information is login information corresponding to the user, specifically may be a phone number or an identity card number, the first asset information is generated according to the service number, typically, the number of the first digital assets is the service number, the user sends the first digital assets to the service server from the account information of the user, and the service server generates corresponding service data and obtains the first digital assets according to the selection of the user, and obtains the service data and the first digital assets of the user sent by the service server.
S203, generating a number block based on the business data, adding the number block into a blockchain, and sending the first digital asset to a escrow account in a blockchain node for storage;
Specifically, the data processing device generates a number block based on service data, adds the number block to a blockchain, sends a first digital asset to a hosting account in a blockchain node for storage, and it can be understood that the data processing device sends the service data to the blockchain node, the blockchain node is a server for processing the data in the blockchain and maintaining normal operation of the blockchain, a plurality of nodes can be included in the blockchain, information among the nodes can be shared, after the blockchain node receives the service data, the number block is generated based on the service data, and is added to the blockchain, one number block comprises the service data corresponding to a user, the number block comprises a block header and a block body, the block header comprises a version number of the blockchain, a timestamp and a hash address of the last block, the block body is used for storing the service data, and the data processing device sends the first digital asset to the hosting account in the blockchain node for storage, and the hosting account in the blockchain is a public account for temporarily storing the first digital asset sent to the service server by the user.
S204, generating at least one random number by adopting a random function, generating at least one hash value according to the at least one random number and the block height information of the number block, and determining the matching number according to the at least one hash value.
Specifically, the data processing device generates at least one random number by using a random function, generates at least one hash value according to the at least one random number and the block height information of the number block, and determines a matching number according to the at least one hash value.
S205, determining the matching degree of the number information in the service data based on the matching number;
Specifically, the data processing device acquires a number block for storing service data from a block chain, and acquires number information from the number block; obtaining hit number fragments in the matched number and number information fragments in the number information, and counting the same fragment numbers of the hit number fragments and the number information fragments; the matching degree of the number information is determined according to the number of the same fragments, it can be understood that the number information and the matching number are provided with a plurality of number segments, the matching degree corresponds to the number of the matching number and the number of the same number segments of the number information, the matching degree is higher, the data processing equipment acquires the number information corresponding to the stored service data from the blockchain, acquires the hit number segment in the matching number and the number information segment in the number information, counts the number of the hit number segment and the number information segment, determines the matching degree of the number information according to the number of the same segments, determines the grade information of the user information corresponding to the number information according to the matching degree, and if the number information is provided with three number segments, the matching degree of the number information of the three number segments is 3, the grade information of the user information corresponding to the number information is the first grade, the matching degree of the number information of the two number segments is the same is 2, the grade information of the user information corresponding to the number information is the second grade, the matching degree of the number information of the number segments is the same number information is 1, and the grade information of the user information corresponding to the number information is the third grade.
S206, obtaining grade information corresponding to the matching degree of the number information from the first corresponding relation in the blockchain intelligent contract; determining a business coefficient corresponding to the grade information from the second corresponding relation in the intelligent contract;
Specifically, the data processing device acquires grade information corresponding to the matching degree of the number information from a first corresponding relation in the blockchain intelligent contract; the business coefficient corresponding to the grade information is determined from the second corresponding relation in the intelligent contract, and it can be understood that the first corresponding relation and the second corresponding relation are stored in the intelligent contract, the business coefficient is used for generating business benefit data, and the corresponding relation among the matching degree, the grade information and the business coefficient can be determined from the first corresponding relation and the second corresponding relation in the intelligent contract.
S207, determining the service income quantity of the user according to the service coefficient and the service quantity.
Specifically, when the service coefficient is a target coefficient, determining the service benefit quantity corresponding to the target coefficient as the service benefit quantity of the user to which the user information belongs; when the business coefficient is not the target coefficient, the business quantity corresponding to the user information is obtained from the number block, the product of the business coefficient and the business quantity is determined as the business benefit quantity of the user to which the user information belongs, it is understood that the target coefficient is a numerical value corresponding to the business benefit quantity, namely when the business coefficient is the target coefficient, the target coefficient is determined as the business benefit quantity of the user to which the user information belongs, when the business coefficient is not the target coefficient, the business coefficient is the business benefit proportion of the user, the business quantity corresponding to the user information is obtained from the number block, and the product of the business coefficient and the business quantity is determined as the business benefit quantity of the user to which the user information belongs.
S208, obtaining second digital assets with the quantity being the business income quantity from the managed account; and acquiring account information associated with the user information from a user block to which the user information belongs, and sending the second digital asset to the account information.
Specifically, the data processing device obtains a second digital asset with the quantity of business benefits from the managed account; the method comprises the steps of obtaining account information associated with user information from a user block to which the user information belongs, and sending second digital assets to the account information, wherein it is understood that a managed account is a public account in a blockchain and is used for temporarily storing first digital assets sent to a business server by a user, the managed account comprises at least one first digital asset of the user, data processing equipment obtains second digital assets with the quantity of business benefits from the managed account, the second digital assets are digital assets generated according to the business benefits, the quantity of the second digital assets is the business benefits, the data processing equipment obtains account information associated with the user information from the blockchain, and sends the second digital assets to the account information. Referring to fig. 4, a schematic view of a scenario of data processing is provided in an embodiment of the present application. As shown in fig. 4, the data processing device obtains service data and a first digital asset of a user sent by a service server, generates a number block based on the service data, adds the number block to a blockchain, wherein the blockchain comprises a plurality of nodes and blocks, the number block comprises user information corresponding to the user, number information associated with the user information, account information associated with the user information, service quantity and the like, sends the first digital asset to a hosting account in the blockchain node for storage, generates at least one random number by adopting a random function, generates at least one hash value by adopting the random number, determines a matching number according to the hash value, further determines the matching degree of the number information in the blocknumber, determines the service benefit quantity corresponding to the user information according to an intelligent contract and the matching degree, obtains a second digital asset corresponding to the service benefit quantity from the hosting account, and sends the second digital asset to the account information corresponding to the user information.
S209, determining a minimum threshold of the digital assets in the managed account according to the intelligent contracts and the business quantity; and when the current digital asset in the managed account is smaller than the minimum threshold value, sending prompt information to the business server.
Specifically, the data processing device determines a minimum threshold for digital assets in the escrow account according to the intelligent contract and the business quantity; when the current digital asset in the escrow account is less than the minimum threshold, a prompt message is sent to the business server, and it is understood that the data processing device can predict the maximum value of the sum of the digital assets sent from the escrow account to all the user accounts according to the intelligent contract and the business quantity, and the maximum value of the sum of the digital assets is determined to be the minimum threshold of the digital assets in the escrow account; when the current digital asset in the escrow account is smaller than the minimum threshold, prompt information is sent to the business server, and the prompt information can be mail or system notification information.
In the embodiment of the application, the service data and the first digital assets of the user sent by the service server are acquired, the number block is generated based on the service data, the number block is added into the blockchain, the first digital assets are sent to the managed account in the blockchain node for storage, the matching degree of the number information in the service data is determined based on the matching number, the service benefit quantity corresponding to the user information is determined according to the intelligent contract and the matching degree, the second digital assets corresponding to the service benefit quantity are acquired from the managed account, and the second digital assets are sent to the account information corresponding to the user information. The matching number is determined through the hash value which cannot be tampered and predicted, the grade information of the user information corresponding to the number information is further determined, the income corresponding to the grade information is automatically sent to the user account, and the data reliability of data processing and distribution can be ensured.
Referring to fig. 5, a schematic structural diagram of a data processing apparatus is provided in an embodiment of the present application. As shown in fig. 5, the data processing apparatus 1 of the embodiment of the present application may include: a data acquisition unit 11, a data storage unit 12, a matching degree determination unit 13, a benefit acquisition unit 14, and a benefit distribution unit 15.
A data acquisition unit 11, configured to acquire service data of a user and a first digital asset sent by a service server; the service data comprises user information corresponding to the user, number information associated with the user information, account information associated with the user information and service quantity; the number of first digital assets is a business number;
Specifically, the data acquisition unit 11 acquires service data of a user and a first digital asset sent by a service server; it may be understood that the service data includes user information corresponding to the user, number information associated with the user information, account information associated with the user information, and service number, the service data sent by the service server is generated according to the number information selected by the user and the corresponding service number, the account information is login information corresponding to the user, specifically may be a phone number or an identity card number, the first asset information is generated according to the service number, typically, the number of the first digital assets is the service number, the user sends the first digital assets to the service server from the account information of the user, and the service server generates corresponding service data and obtains the first digital assets according to the selection of the user, and obtains the service data and the first digital assets of the user sent by the service server.
A data storage unit 12 for generating a number block based on the business data, adding the number block to the blockchain, and sending the first digital asset to a escrow account in the blockchain node for storage;
Specifically, the data storage unit 12 generates a number block based on the service data, adds the number block to the blockchain, sends the first digital asset to a hosting account in a blockchain node for storage, and it can be understood that the data processing device sends the service data to the blockchain node, the blockchain node is a server for processing the data in the blockchain and maintaining normal operation of the blockchain, a plurality of nodes can be included in the blockchain, information between the nodes can be shared, after the blockchain node receives the service data, generates the number block based on the service data, and adds the number block to the blockchain, one number block includes the service data corresponding to the user, the number block includes a block header and a block body, the block header includes a version number of the blockchain, a timestamp and a hash address of the last block, the block body is used for storing the service data, and the data processing device sends the first digital asset to the hosting account in the blockchain node for storage, and the hosting account in the blockchain is a public account for temporarily storing the first digital asset sent to the service server by the user.
A matching degree determining unit 13, configured to determine a matching degree of the number information in the service data based on the matching number;
Specifically, the matching degree determining unit 13 determines the matching degree of the number information in the service data based on the matching number, and it can be understood that the matching number is a number which is generated for the service data and has the same format as the number information, the number information and the matching number have a plurality of number segments, the matching degree corresponds to the number of the matching number and the number of the same number segments of the number information, the number of the same number segments is greater, the matching degree is higher, the data processing device obtains a plurality of number information and user information corresponding to the plurality of number information from the number block, calculates the matching degree corresponding to each number information according to the matching number, and determines the level information of the user information corresponding to the number information according to the matching degree.
A profit obtaining unit 14, configured to determine the number of business profits corresponding to the user information according to the intelligent contract and the matching degree;
referring to fig. 5, the benefit obtaining unit 14 according to the embodiment of the present application may further include: coefficient determination subunit 141, benefit determination subunit 142.
A coefficient determination subunit 141, configured to obtain, from the first correspondence in the blockchain intelligent contract, level information corresponding to the matching degree of the number information; determining a business coefficient corresponding to the grade information from the second corresponding relation in the intelligent contract;
And a benefit determining subunit 142, configured to determine the service benefit amount of the user according to the service coefficient and the service amount.
Specifically, the profit obtaining unit 14 determines the number of business profits corresponding to the user information according to the intelligent contract and the matching degree, it can be understood that the intelligent contract is used for storing a calculation rule of the business data profits, the data processing device determines the matching degree, calculates the number of business profits corresponding to the matching degree according to the intelligent contract, and can determine the number of business profits of the user to which the matching degree belongs, where the number of business profits is the number corresponding to the digital asset, and it is required to be stated that the number of business profits can be obtained according to the corresponding relationship between the matching degree and the number of business profits, or firstly obtain the business coefficient corresponding to the matching degree according to the corresponding relationship between the matching degree and the business coefficient, and then determine the number of business profits according to the business coefficient.
And the profit distribution unit 15 is configured to obtain a second digital asset corresponding to the business profit amount from the hosted account, and send the second digital asset to account information corresponding to the user information.
Specifically, the revenue distribution unit 15 obtains a second digital asset corresponding to the service revenue amount from the hosted account, sends the second digital asset to account information corresponding to the user information, and it can be understood that the hosted account is a public account in the blockchain and is used for temporarily storing the first digital asset sent by the user to the service server, the hosted account includes at least one first digital asset of the user, the data processing device obtains a second digital asset with the service revenue amount from the hosted account, the second digital asset is a digital asset generated according to the service revenue amount, the second digital asset is the service revenue amount, the data processing device obtains account information associated with the user information from the blockchain, and sends the second digital asset to the account information.
Referring to fig. 5, the data processing apparatus 1 according to the embodiment of the present application may further include: a relation adding unit 16, an information presenting unit 17, a matching number determining unit 18.
A relationship adding unit 16, configured to obtain a first correspondence between the matching degree and the level information sent by the service server, and a second correspondence between the level information and the service coefficient; the first correspondence and the second correspondence are added to the intelligent contract of the blockchain.
An information prompting unit 17 for determining a minimum threshold for digital assets in the escrow account based on the intelligent contract and the number of transactions; and when the current digital asset in the managed account is smaller than the minimum threshold value, sending prompt information to the business server.
The matching number determining unit 18 is configured to generate at least one random number using a random function, generate at least one hash value according to the at least one random number and the block height information of the number block, and determine the matching number according to the at least one hash value.
In the embodiment of the application, the service data and the first digital assets of the user sent by the service server are acquired, the number block is generated based on the service data, the number block is added into the blockchain, the first digital assets are sent to the managed account in the blockchain node for storage, the matching degree of the number information in the service data is determined based on the matching number, the service benefit quantity corresponding to the user information is determined according to the intelligent contract and the matching degree, the second digital assets corresponding to the service benefit quantity are acquired from the managed account, and the second digital assets are sent to the account information corresponding to the user information. The matching number is determined through the hash value which cannot be tampered and predicted, the grade information of the user information corresponding to the number information is further determined, the income corresponding to the grade information is automatically sent to the user account, and the data reliability of data processing and distribution can be ensured.
Referring to fig. 6, a schematic structural diagram of a computer device is provided in an embodiment of the present application. As shown in fig. 6, the computer device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, a user interface 1003, a memory 1005, at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), and the optional user interface 1003 may further include a standard wired interface, a wireless interface, among others. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 6, an operating system, network communication modules, user interface modules, and data processing applications may be included in memory 1005, which is a type of computer storage medium.
In the computer device 1000 shown in fig. 6, the network interface 1004 may provide a network communication function, and the user interface 1003 is mainly used as an interface for providing input to a user; the processor 1001 may be configured to invoke the data processing application stored in the memory 1005 to implement the description of the data processing method in any of the embodiments corresponding to fig. 2 to 4, which is not described herein.
It should be understood that the computer device 1000 described in the embodiments of the present application may perform the description of the data processing method in the embodiment corresponding to any of fig. 2 to 4, and may also perform the description of the data processing device in the embodiment corresponding to fig. 5, which is not described herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiment of the present application further provides a computer readable storage medium, in which a computer program executed by the data processing apparatus mentioned above is stored, and the computer program includes program instructions, when executed by a processor, can execute the description of the data processing method in any of the embodiments corresponding to fig. 2 to 4, and therefore, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in the embodiments may be accomplished by computer programs to instruct related hardware, and the programs may be stored in a computer readable storage medium, which when executed may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random-access Memory (Random Access Memory, RAM), or the like.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (7)

1. A method of data processing, comprising:
Acquiring service data and a first digital asset of a user sent by a service server; the service data comprises user information corresponding to a user, number information associated with the user information, account information associated with the user information and service quantity; the number of the first digital assets is the business number;
Generating a number block based on the service data, adding the number block into a blockchain, and sending the first digital asset to a escrow account in a blockchain node for storage;
Generating at least one random number by adopting a random function, generating at least one hash value according to the at least one random number and the block height information of the number block, and determining a matching number according to the at least one hash value;
Obtaining a number block for storing the service data from the block chain, and obtaining the number information from the number block;
Acquiring hit number fragments in the matched number and number information fragments in the number information, and counting the same fragment number of the hit number fragments and the number information fragments;
determining the matching degree of the number information according to the number of the same fragments;
Acquiring grade information corresponding to the matching degree of the number information from a first corresponding relation in the blockchain intelligent contract; determining a business coefficient corresponding to the grade information from a second corresponding relation in the intelligent contract;
determining the service income quantity of the user according to the service coefficient and the service quantity;
and acquiring a second digital asset corresponding to the business income quantity from the managed account, and sending the second digital asset to account information corresponding to the user information.
2. The method according to claim 1, wherein the grade information corresponding to the matching degree of the number information is obtained from a blockchain smart contract; before determining the business coefficient corresponding to the grade information from the intelligent contract, the method further comprises the following steps:
Acquiring a first corresponding relation between the matching degree and grade information and a second corresponding relation between the grade information and service coefficients, which are sent by the service server;
And adding the first corresponding relation and the second corresponding relation to the intelligent contract of the blockchain.
3. The method of claim 1, wherein said determining the number of service benefits for the user based on the service coefficient and the number of services comprises:
When the business coefficient is a target coefficient, determining the business gain quantity corresponding to the target coefficient as the business gain quantity of the user to which the user information belongs;
And when the service coefficient is not the target coefficient, acquiring the service quantity corresponding to the user information from the number block, and determining the product of the service coefficient and the service quantity as the service income quantity of the user to which the user information belongs.
4. The method of claim 1, wherein the obtaining a second digital asset from the escrow account corresponding to the amount of business gain, and sending the second digital asset to account information corresponding to the user information, comprises:
obtaining a second digital asset from the escrow account in an amount equal to the business gain amount;
And acquiring account information associated with the user information from a user block to which the user information belongs, and sending the second digital asset to the account information.
5. The method as recited in claim 1, further comprising:
determining a minimum threshold for the digital asset in the escrow account according to the intelligent contract and the business quantity;
and when the current digital asset in the managed account is smaller than the minimum threshold value, sending prompt information to the business server.
6. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method of any of claims 1-5.
7. A computer device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1-5.
CN201911239959.XA 2019-12-06 2019-12-06 Data processing method and device Active CN111008251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911239959.XA CN111008251B (en) 2019-12-06 2019-12-06 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911239959.XA CN111008251B (en) 2019-12-06 2019-12-06 Data processing method and device

Publications (2)

Publication Number Publication Date
CN111008251A CN111008251A (en) 2020-04-14
CN111008251B true CN111008251B (en) 2024-06-07

Family

ID=70114102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911239959.XA Active CN111008251B (en) 2019-12-06 2019-12-06 Data processing method and device

Country Status (1)

Country Link
CN (1) CN111008251B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562902B (en) * 2020-05-07 2023-08-11 成都库珀创新科技有限公司 Block chain-based random number generation method and device
US20230409604A1 (en) * 2022-06-20 2023-12-21 Emtruth, Inc. Natural language processing for blockchain-based management of multi-source, multi-format binary objects
CN118151843A (en) * 2024-01-24 2024-06-07 深圳宏欣网络科技有限公司 Information storage method and system of cloud platform

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107944848A (en) * 2017-11-20 2018-04-20 北京比特大陆科技有限公司 Monetary settlement method, apparatus and electronic equipment
CN109087024A (en) * 2018-08-28 2018-12-25 腾讯科技(深圳)有限公司 About the data processing method of electronic bill, device, storage medium and equipment
CN109242491A (en) * 2018-08-31 2019-01-18 深圳付贝科技有限公司 It digs mine identity identifying method, dig mine machine and block catenary system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10402792B2 (en) * 2015-08-13 2019-09-03 The Toronto-Dominion Bank Systems and method for tracking enterprise events using hybrid public-private blockchain ledgers

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107944848A (en) * 2017-11-20 2018-04-20 北京比特大陆科技有限公司 Monetary settlement method, apparatus and electronic equipment
CN109087024A (en) * 2018-08-28 2018-12-25 腾讯科技(深圳)有限公司 About the data processing method of electronic bill, device, storage medium and equipment
CN109242491A (en) * 2018-08-31 2019-01-18 深圳付贝科技有限公司 It digs mine identity identifying method, dig mine machine and block catenary system

Also Published As

Publication number Publication date
CN111008251A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
JP6939791B2 (en) Bulletin board information management system
CN111080295B (en) Electronic contract processing method and device based on blockchain
US11360963B2 (en) Tracking and verification of physical assets
Alshaikhli et al. Evolution of Internet of Things from blockchain to IOTA: A survey
CN110519297B (en) Data processing method and device based on block chain private key
WO2019127532A1 (en) Blockchain-based crowdfunding information processing method and device, storage medium and electronic device
CN110599178A (en) Data processing method and device based on intelligent contract and storage medium
CN111488372A (en) Data processing method, device and storage medium
CN111325581B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111523890A (en) Data processing method and device based on block chain, storage medium and equipment
WO2015116998A2 (en) Electronic transfer and obligation enforcement system
CN111008251B (en) Data processing method and device
CN110599331B (en) Liability collection system, method, equipment and storage medium based on blockchain
CN112613877B (en) Intelligent contract triggering method and device applied to block chain network and related equipment
CN111444209A (en) Data processing method, device, equipment and medium based on block chain
CN111311211A (en) Data processing method and device based on block chain
CN110599145A (en) Data processing method and device based on intelligent contract and storage medium
CN110347750B (en) Block chain-based data processing method and device
KR20200114324A (en) Block chain based money transfer processing system using cryptocurrency
CN111292057A (en) Service processing method based on block chain
CN110838067A (en) Real estate transaction data processing method, device, server and storage medium
CN115965458A (en) Generating tokenized reputation scores
CN110941840B (en) Data processing method, system and terminal
CN110807209B (en) Data processing method, device and storage medium
CN111274597A (en) Data processing method and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40022612

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant