CN111586038A - Data processing method and device, block chain link point equipment and storage medium - Google Patents

Data processing method and device, block chain link point equipment and storage medium Download PDF

Info

Publication number
CN111586038A
CN111586038A CN202010373097.6A CN202010373097A CN111586038A CN 111586038 A CN111586038 A CN 111586038A CN 202010373097 A CN202010373097 A CN 202010373097A CN 111586038 A CN111586038 A CN 111586038A
Authority
CN
China
Prior art keywords
cloud server
user terminal
task
calculation result
data
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.)
Pending
Application number
CN202010373097.6A
Other languages
Chinese (zh)
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.)
Qingdao University
Original Assignee
Qingdao University
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 Qingdao University filed Critical Qingdao University
Priority to CN202010373097.6A priority Critical patent/CN111586038A/en
Publication of CN111586038A publication Critical patent/CN111586038A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • G06Q20/0855Payment architectures involving remote charge determination or related payment systems involving a third party
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Signal Processing (AREA)
  • Finance (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a data processing method, a data processing device, block chain node equipment and a medium, which are applied to the block chain node equipment, wherein the method comprises the following steps: acquiring a calculation task and corresponding input data issued by a user terminal, and initiating a first payment request to the user terminal to modify first data of an account of the user terminal; the first payment request includes a first quantity of the virtual item; after a task receiving request initiated by a cloud server is obtained, a computing task and input data are sent to the cloud server; receiving a calculation result which is uploaded by a cloud server and is obtained according to the calculation task and the input data; and verifying the calculation result, if the calculation result passes the verification, returning the calculation result to the user terminal, and modifying the second data of the cloud server account according to the first quantity. According to the method and the device, the block chain node equipment is used as a third-party platform, so that the condition that the user terminal does not pay is avoided while the user terminal can obtain a correct calculation result, and the public, credible and transparent delivery is realized.

Description

Data processing method and device, block chain link point equipment and storage medium
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a data processing method and apparatus, a block link node device, and a computer-readable storage medium.
Background
Outsourcing refers to a computing task that a common user may need to complete and requires a large amount of computation, and the computing task can only be computed by a large special-purpose computer, but the user does not have a large computer. This can be too costly if the user buys a large computer to compute the task. At this time, the user can outsource the computing task to a cloud server capable of performing a large-scale computing task, so that the user only needs to pay a small number of servers to the cloud server.
However, outsourcing the entire process of computing is done online over a network, and thus involves the problem of how to make payments. If the user pays for the cloud server first, the cloud server may not perform calculation in order to save own calculation resources, and directly give the user a result which seems correct but is actually wrong, so that the loss may be brought to the user. If the cloud server calculates the result to the user first, the user may not pay after obtaining the result. Therefore, how to solve the above problems is a great concern for those skilled in the art.
Disclosure of Invention
The application aims to provide a data processing method, a data processing device, a block chain node device and a computer readable storage medium, and achieve fair, credible and transparent delivery.
In order to achieve the above object, the present application provides a data processing method applied to a block link point device, the method including:
acquiring a calculation task issued by a user terminal and corresponding input data, and initiating a first payment request to the user terminal to modify first data of an account of the user terminal; the first payment request includes a first quantity of virtual items;
after a task receiving request initiated by a cloud server is obtained, the computing task and the input data are sent to the cloud server;
receiving a calculation result which is uploaded by the cloud server and obtained according to the calculation task and the input data;
and verifying the calculation result, if the calculation result passes the verification, returning the calculation result to the user terminal, and modifying second data of the cloud server account according to the first quantity.
Optionally, after the task accepting request initiated by the cloud server is obtained, sending the computing task and the input data to the cloud server includes:
after a task accepting request initiated by a cloud server is obtained, a second payment request is initiated to the cloud server; the second payment request includes a second quantity of virtual items;
modifying second data of the cloud server account based on the second amount, and sending the computing task and the input data to the cloud server after modification.
Optionally, the verifying the calculation result, and if the calculation result passes the verification, returning the calculation result to the user terminal, and modifying the second data of the cloud server account according to the first amount includes:
verifying the calculation result and judging whether the calculation result is correct or not;
if so, returning the calculation result to the user terminal, and modifying second data of the cloud server account according to the first quantity and the second quantity.
Optionally, after verifying the calculation result and determining whether the calculation result is correct, the method further includes:
and if the calculation result is wrong, forbidding to return the calculation result to the user terminal, and returning the message losing prompt information to the cloud server.
Optionally, after the information of the message loss prompt is returned to the cloud server, the method further includes:
returning the failure information of the calculation task and the selection page to the user terminal;
receiving a selection instruction of the user terminal through the selection page;
if the selection instruction is a continuous calculation instruction, the calculation task is added to the task list to be processed again;
and if the selection instruction is a calculation ending instruction, modifying the first data of the user terminal account by using the first quantity and the second quantity.
Optionally, the method further includes:
acquiring a first task query request initiated by the user terminal;
returning a corresponding submitted calculation task list to the user terminal;
acquiring a second task query request initiated by the cloud server;
and returning a task list to be processed to the cloud server.
Optionally, the input data is data obtained by blinding an original input value by the user terminal.
In order to achieve the above object, the present application provides a data processing apparatus applied to a block link point device, including:
the task acquisition module is used for acquiring a calculation task issued by a user terminal and corresponding input data and initiating a first payment request to the user terminal so as to modify first data of an account of the user terminal; the first payment request includes a first quantity of virtual items;
the task sending module is used for sending the computing task and the input data to the cloud server after a task receiving request initiated by the cloud server is obtained;
the result receiving module is used for receiving a calculation result which is uploaded by the cloud server and obtained according to the calculation task and the input data;
and the result returning module is used for verifying the calculation result, returning the calculation result to the user terminal if the calculation result passes the verification, and modifying the second data of the cloud server account according to the first quantity.
To achieve the above object, the present application provides a block link point apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of any of the data processing methods disclosed above when executing the computer program.
To achieve the above object, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the data processing methods disclosed in the foregoing.
According to the above scheme, the data processing method provided by the present application is applied to a block link point device, and the method includes: acquiring a calculation task issued by a user terminal and corresponding input data, and initiating a first payment request to the user terminal to modify first data of an account of the user terminal; the first payment request includes a first quantity of virtual items; after a task receiving request initiated by a cloud server is obtained, the computing task and the input data are sent to the cloud server; receiving a calculation result which is uploaded by the cloud server and obtained according to the calculation task and the input data; and verifying the calculation result, if the calculation result passes the verification, returning the calculation result to the user terminal, and modifying second data of the cloud server account according to the first quantity. According to the method, the block chain node equipment is used as a third-party platform, the user terminal can issue the calculation tasks and input data to the platform and carry out corresponding payment, after the calculation results of the cloud server are received, the calculation results can be verified firstly, the second data of the account of the cloud server are modified only after the verification is passed, and the situation that the user terminal does not carry out payment is avoided while the correct calculation results are ensured to be obtained; in addition, the block chain technology can further ensure that the data cannot be tampered, and fair, credible and transparent delivery is realized.
The application also discloses a data processing device, a block chain link point device and a computer readable storage medium, which can also achieve the technical effects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a data processing method disclosed in an embodiment of the present application;
FIG. 2 is a flow chart of another data processing method disclosed in the embodiments of the present application;
fig. 3 is a block diagram of a data processing apparatus according to an embodiment of the present disclosure;
FIG. 4 is a block diagram of a data processing system disclosed in an embodiment of the present application;
FIG. 5 is a system architecture diagram of a fair payment platform provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of a login-registration interface disclosed in an embodiment of the present application;
FIG. 7 is a schematic diagram of a user-submitted computing task interface as disclosed in an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating execution of a payment operation disclosed in an embodiment of the present application;
FIG. 9 is a schematic illustration of a view submit task interface disclosed in an embodiment of the present application;
FIG. 10 is a schematic illustration of a task acceptance interface disclosed in an embodiment of the present application;
FIG. 11 is a schematic illustration of a submit results interface as disclosed in an embodiment of the present application;
FIG. 12 is a block diagram of a block link point apparatus as disclosed in an embodiment of the present application;
fig. 13 is a structural diagram of another block link node device disclosed in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the prior art, the whole process of outsourcing computation is carried out on a network on line, if a user pays for a cloud server firstly, the cloud server may directly give a seemingly correct result to the user without computation in order to save own computing resources, but the loss may be brought to the user due to an actual wrong result. If the cloud server calculates the result to the user first, the user may not pay after obtaining the result.
Therefore, the embodiment of the application discloses a data processing method, which realizes fair, credible and transparent delivery.
Referring to fig. 1, an embodiment of the present application discloses a flowchart of a data processing method, which is applied to a blockchain node device, and as shown in fig. 1, the method includes:
s101: acquiring a calculation task issued by a user terminal and corresponding input data, and initiating a first payment request to the user terminal to modify first data of an account of the user terminal; the first payment request includes a first quantity of virtual items;
in the embodiment of the application, the user terminal can issue the tasks needing to be calculated and the corresponding input data to the block chain node point equipment. After the block node device receives the computing task and the input data, a first payment request may be initiated to the user terminal, where the first payment request may include a first quantity of the virtual item, and after the user accepts the first payment request, first data of an account of the user terminal may be modified according to the first quantity, where the first data represents a total number of virtual items of the account of the user terminal before the user terminal currently pays, and specifically, a value obtained by subtracting the first quantity from the first data may be used as a total number of virtual items of the account of the user terminal after the payment. The virtual articles can be various articles such as recharge coins, gold coins, red packets and the like.
As a preferred embodiment, the input data may be specifically data obtained by blinding the original input value by the user terminal. Through the blinding processing, the input data received by the cloud server is not real data, so that the safety of the data is further ensured.
S102: after a task receiving request initiated by a cloud server is obtained, the computing task and the input data are sent to the cloud server;
in this step, after receiving a computing task issued by the user terminal, the block link node device may display the task and the first number of corresponding virtual objects, or may send a task notification to each cloud server, so that the cloud server knows the current computing task. When the cloud server initiates a task receiving request, the block link point equipment can send the computing task and the input data to the cloud server for computing.
S103: receiving a calculation result which is uploaded by the cloud server and obtained according to the calculation task and the input data;
after the cloud server obtains the corresponding calculation result according to the calculation task and the input data, the calculation result can be returned to the block link point device.
S104: and verifying the calculation result, if the calculation result passes the verification, returning the calculation result to the user terminal, and modifying second data of the cloud server account according to the first quantity.
In specific implementation, after receiving the calculation result returned by the cloud server, the block link point device verifies the calculation result to determine the accuracy of the calculation result. If the calculation result is verified, the calculation result can be returned to the user terminal, and the second data of the cloud server account is modified according to the first number of the virtual items, that is, the value obtained by adding the first number to the current virtual item total number of the cloud server account is used as the virtual item total number of the cloud server account after the calculation task is completed.
It can be understood that if the calculation result is verified, and if the calculation result is wrong after whether the calculation result is correct or not is judged, the calculation result is prohibited from being returned to the user terminal, and corresponding message loss prompt information is returned to the cloud server. In addition, the user terminal can be further returned with the failure information of the calculation task and the selection page. The user terminal can receive a selection instruction issued by the user terminal through the selection page, and the selection instruction can comprise a calculation continuing instruction or a calculation ending instruction. If the user terminal issues a calculation continuing instruction, the calculation task is added to the task list to be processed again, so that other cloud servers receive the calculation task again and perform calculation; and if the user terminal issues the calculation ending instruction, modifying the first data of the user terminal account by using the first quantity, namely, accumulating the first quantity into the first data of the user terminal account again.
As a possible implementation manner, after receiving the calculation task issued by the user terminal, the block link point device may add the calculation task to the calculation task list corresponding to each terminal. Therefore, a first task query request initiated by the user terminal can be obtained, and a corresponding submitted calculation task list is returned to the user terminal according to the query request. In addition, after the cloud server receives the computing task, the computing task can be added to the computing task list of the cloud server, so that a second task query request initiated by the cloud server can be obtained, and a to-be-processed task list can be returned to the cloud server according to the query request.
According to the above scheme, the data processing method provided by the present application is applied to a block link point device, and the method includes: acquiring a calculation task issued by a user terminal and corresponding input data, and initiating a first payment request to the user terminal to modify first data of an account of the user terminal; the first payment request includes a first quantity of virtual items; after a task receiving request initiated by a cloud server is obtained, the computing task and the input data are sent to the cloud server; receiving a calculation result which is uploaded by the cloud server and obtained according to the calculation task and the input data; and verifying the calculation result, if the calculation result passes the verification, returning the calculation result to the user terminal, and modifying second data of the cloud server account according to the first quantity. According to the method, the block chain node equipment is used as a third-party platform, the user terminal can issue the calculation tasks and input data to the platform and carry out corresponding payment, after the calculation results of the cloud server are received, the calculation results can be verified firstly, the second data of the account of the cloud server are modified only after the verification is passed, and the situation that the user terminal does not carry out payment is avoided while the correct calculation results are ensured to be obtained; in addition, the block chain technology can further ensure that the data cannot be tampered, and fair, credible and transparent delivery is realized.
The embodiment of the application discloses a data processing method, and compared with the previous embodiment, the embodiment further explains and optimizes the technical scheme. Specifically, the method comprises the following steps:
referring to fig. 2, a flowchart of another data processing method provided in the embodiment of the present application is shown in fig. 2, and includes:
s201: acquiring a calculation task issued by a user terminal and corresponding input data, and initiating a first payment request to the user terminal to modify first data of an account of the user terminal; the first payment request includes a first quantity of virtual items;
s202: after a task accepting request initiated by a cloud server is obtained, a second payment request is initiated to the cloud server; the second payment request includes a second quantity of virtual items;
s203: modifying second data of the cloud server account based on the second amount, and sending the computing task and the input data to the cloud server after modification;
s204: receiving a calculation result which is uploaded by the cloud server and obtained according to the calculation task and the input data;
in the embodiment of the application, in order to further ensure the accuracy of the cloud server computing result, after the cloud server initiates the task accepting request, a second payment request may be initiated to the cloud server, where the second payment request includes the second number of the virtual items. And then, second data of the cloud server account is modified according to the second amount, the second data represent the total number of the virtual items of the cloud server account before the current payment, and specifically, the value obtained by subtracting the second amount from the second data can be used as the total number of the virtual items of the cloud server account after the payment.
S205: verifying the calculation result and judging whether the calculation result is correct or not;
s206: if so, returning the calculation result to the user terminal, and modifying second data of the cloud server account according to the first quantity and the second quantity.
It can be understood that, in the embodiment of the application, after the calculation result of the cloud server is correct, the calculation result may be returned to the user terminal, and the second data of the cloud server account may be modified according to the first quantity and the second quantity. Specifically, the first amount and the second amount may be added to the second data of the current cloud server account, that is, the previously deducted second amount of the cloud server account is cancelled, and the first amount of the virtual item paid by the user terminal is added thereto.
As a possible implementation manner, after the verification of the calculation result fails, if the user terminal chooses to end the calculation, the first data of the account of the user terminal may be modified by using the first amount and the second amount. In particular, the first amount and the second amount may be accumulated into first data of a current user terminal account.
In the following, a data processing apparatus provided in an embodiment of the present application is introduced, and a data processing apparatus described below and a data processing method described above may be referred to each other.
Referring to fig. 3, an embodiment of the present application provides a data processing apparatus, which is applied to a block link point device, as shown in fig. 3, and includes:
the task obtaining module 301 is configured to obtain a calculation task issued by a user terminal and corresponding input data, and initiate a first payment request to the user terminal to modify first data of an account of the user terminal; the first payment request includes a first quantity of virtual items;
a task sending module 302, configured to send the computing task and the input data to a cloud server after a task accepting request initiated by the cloud server is obtained;
a result receiving module 303, configured to receive a calculation result obtained according to the calculation task and the input data and uploaded by the cloud server;
and a result returning module 304, configured to verify the calculation result, return the calculation result to the user terminal if the calculation result passes the verification, and modify the second data of the cloud server account according to the first amount.
For the specific implementation process of the modules 301 to 304, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
A data processing system provided in the embodiments of the present application is described below with specific implementation scenarios. In particular, linear regression is a typical machine learning algorithm that provides a predictive model that can be predicted from input parameters. A user may have a large amount of data for an object that he can process using linear regression algorithms to obtain a predictive model. With this model, it is possible to predict situations where some of these things are unknown. Given a data set D { (x)1,y1),(x2,y2),...,(xn,yn) In which xiIs a vector of 1 x m, yiIs a scalar. A typical linear regression model is defined as follows: and y is Xw. Wherein y ═ y1,y2,...,yn) Is a vector of n x 1; w ═ w (w)1,w2,...,wn)TIs a vector of n x 1; x ═ X1,x2,...,xm]TIs a matrix of m x n, in which matrix each xi=(xi1,xi2,...,xin) Is a vector of 1 x n. In this model, each vector X in XiCan be viewed as an input, scalar yiIs the corresponding output. w is aiCan be regarded as xij(1. ltoreq. j. ltoreq.n), and its value may be used as a weight value that can determine the accuracy of prediction. This optimal coefficient w can be calculated by the following equation: w ═ XTX)-1XTy. In the model, calculation matrix multiplication and matrix inversion are involved, when the matrix is large in scale, a large amount of calculation resources are consumed, even an ordinary computer cannot meet calculation conditions, and a special large computer is required. This is not possible for a user terminal with limited computational resources. In other words, a user with limited computing resources may not have as sophisticated, expensive computing equipment to compute the model. In order to enable a user with limited computing resources to calculate the own prediction model, the prediction model can be obtained even on the own mobile phone, and safe outsourcing calculation is carried out. The user can outsource the computing task to the cloud server, the cloud server can perform large-scale computing task, and the user only needs to pay a small amount of service fee to the cloud server. However, this cloud server may maliciously collect your data and either populate it as used or resell it to others. This may have serious consequences for the user, leading to leakage of user data. Therefore, it is also necessary to ensure that the user does not leak the real data of the user while the cloud server completes the computing task.
The block chain is essentially a shared database, and the data or information stored in the shared database has the characteristics of being unforgeable, traceable in the whole process, traceable, transparent in disclosure, maintained in a collective mode and the like. Based on the characteristics, the block chain technology lays a solid trust foundation, creates a reliable cooperation mechanism and has wide application prospect. The first generation of blockchain is a blockchain taking bitcoin as a core, and realizes point-to-point transaction which is completely independent of a third party. The second generation block chain takes an EtherFang intelligent contract as a core, a completely public and transparent electronic contract can be realized through programming, once the contract is deployed to the block chain to run, anyone cannot tamper maliciously, and meanwhile, the second generation block chain can automatically implement certain agreed events according to specific situations. This process is not likely to be interfered with by anyone.
As shown in fig. 4, the data processing system provided in the embodiment of the present application may specifically include three entities: the system comprises a user terminal, a cloud server and a fair payment platform. Due to the limitation of computing power, the user terminal cannot independently compute a linear regression model task, and therefore the computing task can be outsourced to a cloud server. A cloud server is an entity that provides computing services. The fair payment platform can be realized by adopting a block chain technology, so that the fairness of transactions between the user terminal and the cloud server is ensured. The platform can specifically comprise two subsystems, wherein one subsystem is a verification system and is used for verifying whether the calculation result of the cloud server is correct; the other is a payment system, which is responsible for transferring funds to ensure the fairness of the transaction. In specific implementation, the user terminal can transmit the blinded data to the fair payment platform and pay the service fee of the task to the fair payment platform; the cloud server can receive the task from the platform and download corresponding data; meanwhile, the cloud server also pays a deposit to the fair payment platform; further carrying out calculation, and uploading a calculation result to a fair payment platform after the calculation is finished; after the fair payment platform receives the calculation result of the cloud server, the result can be verified; if the verification is passed, the fair payment platform can transfer the service fee and the guarantee fund which are obtained by the cloud server to the cloud server. Otherwise, as a punishment for the loss of credit of the cloud server, the fair payment platform can transfer the service fee and the guarantee fund to the user terminal.
Fig. 5 is a system architecture diagram of a fair payment platform according to an embodiment of the present application. As shown in FIG. 5, in the front end UI layer, a graphical interface is provided for the user by specifically using HTML + CSS, and Ajax interaction is realized by writing a series of scripts by using AngularJS. Ajax enables asynchronous data transfer between the browser and the Web server using HTTP requests. Web3JS is a set of js libraries used to interact with local or remote Ethernet room nodes that can establish connections to Ethernet room nodes using HTTP or IPC. It provides a series of interfaces to enable intelligent contract functions to be called from the front end. The embodiment manages the etherhouse accounts by using the MetaMask, which is an open-source etherhouse wallet and can help users conveniently manage own etherhouse digital assets. The logical layer contains a series of functions. It can receive requests from the front-end UI layer and then execute the corresponding functions. In the layer, the function is divided into three parts, one part is specific to the outsourcing user, the other part is specific to the cloud server, and the other part is a small part in which some basic functions are shared by the outsourcing user and the cloud server. The login, registration and logout functions are basic functions, and the outsourcing user and the cloud server user can execute the functions. The calculation task submitting and the service fee submitting are specific to the outsourcing user, and the outsourcing user can pack the blinded data into the calculation task and upload the calculation task to the fair payment platform and submit the service fee. Accepting tasks, submitting deposit and submitting results are functions that are specific to the cloud server user. The cloud server user can receive computing tasks, submit guarantees and submit results from the fair payment platform. In particular, nodjs can be used to write a Web server for interacting with the database. In addition, in the embodiment, an intelligent contract is written by using a solid for interacting with the ethernet block chain, and the solid is an intelligent contract high-level language and runs on the ethernet virtual machine. Its syntax is close to Javascript, an object-oriented language. The data storage layer stores data generated by the logic layer and performs data interaction in the logic layer. The data is stored in a database or block chain according to the category. Some basic information, such as user name, password, ID, etc., is stored in the database, and some more important information, which needs public supervision, is stored in the blockchain, for example: task parameters, verification result information, service fees, and the like. Our fair payment platform operates specifically on Ubuntu 18.04LTS, where the database may specifically use MySQL database, and utilizes Ganache to simulate an ethernet block chain.
Fig. 6 is a schematic diagram of a login registration interface in an embodiment of the present application, where both an outsourcing user and a cloud server user may register an account or use an account login system. Fig. 7 is a schematic diagram of a user interface for submitting computing tasks, where a user can submit two blinded input matrices and pay service fees, and during the payment process, the MetaMask will package transactions to a block chain to complete the payment operation, as shown in fig. 8. As shown in fig. 9, after the outsourcing user submits the computing task and the service fee, the outsourcing user can check the tasks submitted by the outsourcing user on the task interface, and the cloud server user can also check which tasks are provided on the task interface and select to receive some tasks. As shown in fig. 10, after the cloud server selects the computing task to be accepted, the task can be accepted through the accepting task interface, and the guarantee fee is paid at the same time, and the process of paying the guarantee fee is similar to the process of paying the service fee by the outsourcing user. After the cloud server calculates the result, the result may be submitted through a submit result interface as shown in fig. 11. After the result is submitted, the intelligent dating automatically verifies the correctness of the result. If the verification is passed, the cloud server can obtain service fee and the previously submitted guarantee fund; if the verification fails, the fair payment system returns the service fee of the outsourcing user and the guarantee fund submitted by the cloud server.
In one specific approach to secure outsourcing a linear regression algorithm, the inputs include: a matrix X of m X n, the transpose X of the matrixTA vector y of m x 1; the output comprises a vector w of n x 1. The scheme may include the steps of:
step one, generating a key: the user can select 2k elementary transformation matrices P1,P2,...,Pk,Q1,Q2,...,QkAnd packing the 2k elementary transformation matrixes into two keys in the following form: SKP={P1,P2,...,Pk};SKQ={Q1,Q2,...,Qk}。
Step two, blind input: user computation of two matrices X1、X2The form is as follows: x1=XP1P2...Pk;X2=Q1Q2...QkXT
Step three, calculating a result: the cloud server computing result R' is in the form of: r' ═ X2X1)-1X2
Step four, verifying the result: the fair payment platform selects a random vector r of 1 x n and calculates two vectors V1、V2The form is as follows: v1=rX2;V2=V1X1. The fair payment platform validates the following equation: v1=V2R'; if the equation is established, the verification is passed, and R' is a correct result; otherwise, the verification fails, and R' is an error calculation result.
And step five, recovering the real output: user usage Key SKPThe output w is calculated, in the form: w ═ P1P2...PkR'y。
In the above scheme, 2k elementary transformation matrices are used, and these elementary transformation matrices can perform the following three operations on one matrix: multiplication, where a certain row (or column) of the matrix is multiplied by a non-zero number; permutation, which is to exchange the positions of some two rows (or columns) of the matrix; addition, one row (or column) is multiplied by a non-zero number and added to another row (or column). Specifically, P in the present embodiment1、Q1Is the initial matrix of the multiplication operation.
Executing the first step and the second step to combine the original matrixes X and XTBlinding to X1、X2Then computing task F (X)1,X2) And uploading the service fee to a fair payment platform, and simultaneously paying the service fee of the calculation task to the fair payment platform. The cloud server accepts the computing task from the fair payment platform and pays a deposit to the fair payment platform. After the cloud server completes the calculation, the method will be usedAnd uploading the calculation result R' to a fair payment platform. Fair payment platform pass V1、V2Verifying the calculation result, and if the calculation result passes the verification, the fair payment platform transfers the service fee and the guarantee fund to the cloud server; otherwise, the fair payment platform will transfer the service fee and the guarantee fee to the user. After receiving correct calculation result, user uses key SKPThe true output w is restored. w is the prediction model that the user wants to get. When the user has new data X to be predicted, the prediction result can be obtained by calculating y to Xw.
The present application further provides a block link point device, referring to fig. 12, a block link point device according to an embodiment of the present application includes, as shown in fig. 12:
a memory 100 for storing a computer program;
the processor 200, when executing the computer program, may implement the steps provided by any of the foregoing embodiments.
Specifically, the memory 100 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions, and the internal memory provides an environment for the operating system and the computer-readable instructions in the non-volatile storage medium to run. The processor 200 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip in some embodiments, and provides computing and controlling capability for the block-link node device, and when executing the computer program stored in the memory 100, the processor may implement the steps of the data processing method provided in any of the foregoing embodiments.
On the basis of the above-mentioned embodiment, as a preferred embodiment, referring to fig. 13, the block link point apparatus further includes:
and an input interface 300 connected to the processor 200, for acquiring computer programs, parameters and instructions imported from the outside, and storing the computer programs, parameters and instructions into the memory 100 under the control of the processor 200. The input interface 300 may be connected to an input device for receiving parameters or instructions manually input by a user. The input device may be a touch layer covered on a display screen, or a button, a track ball or a touch pad arranged on a terminal shell, or a keyboard, a touch pad or a mouse, etc.
And a display unit 400 connected to the processor 200 for displaying data processed by the processor 200 and for displaying a visualized user interface. The display unit 400 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like.
And a network port 500 connected to the processor 200 for performing communication connection with each external terminal device. The communication technology adopted by the communication connection can be a wired communication technology or a wireless communication technology, such as a mobile high definition link (MHL) technology, a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a wireless fidelity (WiFi), a bluetooth communication technology, a low power consumption bluetooth communication technology, an ieee802.11 s-based communication technology, and the like.
Fig. 13 only shows the blockchain node device with the assembly 100 and 500, and those skilled in the art will appreciate that the structure shown in fig. 13 does not constitute a limitation of the blockchain node device, and may include fewer or more components than those shown, or combine some components, or a different arrangement of components.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. The storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the data processing method provided by any of the preceding embodiments.
According to the method, the blockchain node equipment is used as a third-party platform, the user terminal can issue the calculation tasks and input data to the platform and carry out corresponding payment, after the calculation results of the cloud server are received, the calculation results can be verified firstly, only after the verification is passed, the second data of the account of the cloud server are modified, and the situation that the user terminal does not carry out payment is avoided while the user terminal can obtain correct calculation results; in addition, the block chain technology can further ensure that the data cannot be tampered, and fair, credible and transparent delivery is realized.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A data processing method applied to a blockchain node device, the method comprising:
acquiring a calculation task issued by a user terminal and corresponding input data, and initiating a first payment request to the user terminal to modify first data of an account of the user terminal; the first payment request includes a first quantity of virtual items;
after a task receiving request initiated by a cloud server is obtained, the computing task and the input data are sent to the cloud server;
receiving a calculation result which is uploaded by the cloud server and obtained according to the calculation task and the input data;
and verifying the calculation result, if the calculation result passes the verification, returning the calculation result to the user terminal, and modifying second data of the cloud server account according to the first quantity.
2. The data processing method according to claim 1, wherein the sending the computing task and the input data to the cloud server after obtaining a task accepting request initiated by the cloud server comprises:
after a task accepting request initiated by a cloud server is obtained, a second payment request is initiated to the cloud server; the second payment request includes a second quantity of virtual items;
modifying second data of the cloud server account based on the second amount, and sending the computing task and the input data to the cloud server after modification.
3. The data processing method according to claim 2, wherein the verifying the calculation result, returning the calculation result to the user terminal if the calculation result passes the verification, and modifying second data of the cloud server account according to the first amount includes:
verifying the calculation result and judging whether the calculation result is correct or not;
if so, returning the calculation result to the user terminal, and modifying second data of the cloud server account according to the first quantity and the second quantity.
4. The data processing method according to claim 3, wherein after verifying the calculation result and determining whether the calculation result is correct, the method further comprises:
and if the calculation result is wrong, forbidding to return the calculation result to the user terminal, and returning the message losing prompt information to the cloud server.
5. The data processing method according to claim 4, further comprising, after returning the information of the loss of trust to the cloud server:
returning the failure information of the calculation task and the selection page to the user terminal;
receiving a selection instruction of the user terminal through the selection page;
if the selection instruction is a continuous calculation instruction, the calculation task is added to the task list to be processed again;
and if the selection instruction is a calculation ending instruction, modifying the first data of the user terminal account by using the first quantity and the second quantity.
6. The data processing method of claim 1, further comprising:
acquiring a first task query request initiated by the user terminal;
returning a corresponding submitted calculation task list to the user terminal;
acquiring a second task query request initiated by the cloud server;
and returning a task list to be processed to the cloud server.
7. The data processing method according to any one of claims 1 to 6, wherein the input data is data obtained by blinding an original input value by the user terminal.
8. A data processing apparatus, applied to a blockchain node device, comprising:
the task acquisition module is used for acquiring a calculation task issued by a user terminal and corresponding input data and initiating a first payment request to the user terminal so as to modify first data of an account of the user terminal; the first payment request includes a first quantity of virtual items;
the task sending module is used for sending the computing task and the input data to the cloud server after a task receiving request initiated by the cloud server is obtained;
the result receiving module is used for receiving a calculation result which is uploaded by the cloud server and obtained according to the calculation task and the input data;
and the result returning module is used for verifying the calculation result, returning the calculation result to the user terminal if the calculation result passes the verification, and modifying the second data of the cloud server account according to the first quantity.
9. A block link point apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the data processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data processing method according to any one of claims 1 to 7.
CN202010373097.6A 2020-05-06 2020-05-06 Data processing method and device, block chain link point equipment and storage medium Pending CN111586038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010373097.6A CN111586038A (en) 2020-05-06 2020-05-06 Data processing method and device, block chain link point equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010373097.6A CN111586038A (en) 2020-05-06 2020-05-06 Data processing method and device, block chain link point equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111586038A true CN111586038A (en) 2020-08-25

Family

ID=72113208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010373097.6A Pending CN111586038A (en) 2020-05-06 2020-05-06 Data processing method and device, block chain link point equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111586038A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453276A (en) * 2016-09-23 2017-02-22 南京理工大学 Safe modular exponentiation outsourcing computing method based on single server
CN106775576A (en) * 2017-03-28 2017-05-31 青岛大学 The safely outsourced computational methods and system of the matrix multiplication that can verify that
CN107453879A (en) * 2017-08-14 2017-12-08 南京理工大学 A kind of safely outsourced computational methods of the upper power exponent of group based on single server
CN108346091A (en) * 2018-03-05 2018-07-31 阿里巴巴集团控股有限公司 Online transaction control method, device, server and storage medium
CN108764906A (en) * 2018-05-30 2018-11-06 深圳市元征科技股份有限公司 A kind of server and its block chain transaction confirmation method, device, storage medium
CN109872042A (en) * 2019-01-17 2019-06-11 平安城市建设科技(深圳)有限公司 House prosperity transaction monitoring and managing method, device, equipment and storage medium based on block chain
CN110400136A (en) * 2018-04-27 2019-11-01 腾讯科技(深圳)有限公司 Account management method, device, server and storage medium based on block chain
CN110599147A (en) * 2019-09-17 2019-12-20 福州大学 Ciphertext retrieval fair payment method and system based on block chain
CN110866830A (en) * 2019-11-25 2020-03-06 腾讯科技(深圳)有限公司 Data processing method based on block chain and related device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453276A (en) * 2016-09-23 2017-02-22 南京理工大学 Safe modular exponentiation outsourcing computing method based on single server
CN106775576A (en) * 2017-03-28 2017-05-31 青岛大学 The safely outsourced computational methods and system of the matrix multiplication that can verify that
CN107453879A (en) * 2017-08-14 2017-12-08 南京理工大学 A kind of safely outsourced computational methods of the upper power exponent of group based on single server
CN108346091A (en) * 2018-03-05 2018-07-31 阿里巴巴集团控股有限公司 Online transaction control method, device, server and storage medium
CN110400136A (en) * 2018-04-27 2019-11-01 腾讯科技(深圳)有限公司 Account management method, device, server and storage medium based on block chain
CN108764906A (en) * 2018-05-30 2018-11-06 深圳市元征科技股份有限公司 A kind of server and its block chain transaction confirmation method, device, storage medium
CN109872042A (en) * 2019-01-17 2019-06-11 平安城市建设科技(深圳)有限公司 House prosperity transaction monitoring and managing method, device, equipment and storage medium based on block chain
CN110599147A (en) * 2019-09-17 2019-12-20 福州大学 Ciphertext retrieval fair payment method and system based on block chain
CN110866830A (en) * 2019-11-25 2020-03-06 腾讯科技(深圳)有限公司 Data processing method based on block chain and related device

Similar Documents

Publication Publication Date Title
JP7388639B2 (en) Completing tasks using blockchain networks
US10817337B1 (en) Cloud-based access to quantum computing resources
CN103718198B (en) Forecast model application programming interface
US20220188686A1 (en) Service for managing quantum computing resources
CN106576114A (en) Policy based resource management and allocation system
CN109118224A (en) Proof of work method, apparatus, medium and the electronic equipment of block chain network
KR20140097145A (en) Marketplace for composite application and data solutions
CN105844762B (en) Number lining up device, queuing system and row number method
CN110083334A (en) The online method and device of model
TW202009837A (en) A method and system for renting a car
CN116385164B (en) Block chain-based carbon asset transaction system and method
Sharma et al. Cloud saas and model driven architecture
CN109993669A (en) A kind of house-purchase qualification examination method, apparatus, equipment and storage medium
CN110490416A (en) Task management method and terminal device
CN109978694A (en) A kind of credit method of commerce and device based on block chain
CN109993528A (en) It is a kind of for managing the method and apparatus of committal charge
CN108170404B (en) Web service combination verification method based on parameterized model
CN109213399A (en) Numerical value methods of exhibiting, device and computer readable storage medium
CN111586038A (en) Data processing method and device, block chain link point equipment and storage medium
CN115796873A (en) Computing power charge settlement method, system, electronic equipment and medium
CN110516414A (en) A kind of method and apparatus of access novel payment chapters and sections
CN114154793A (en) Surplus resource analysis method and device based on renewable energy and computer equipment
CN112419025A (en) User data processing method and device, storage medium and electronic equipment
WO2016126602A1 (en) Identifying mobile users to receive advertisements
JP2018206200A (en) Management device, method for management, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200825