WO2019200558A1 - Blockchain node service method and apparatus, mining method and apparatus, and device, system, and medium - Google Patents

Blockchain node service method and apparatus, mining method and apparatus, and device, system, and medium Download PDF

Info

Publication number
WO2019200558A1
WO2019200558A1 PCT/CN2018/083492 CN2018083492W WO2019200558A1 WO 2019200558 A1 WO2019200558 A1 WO 2019200558A1 CN 2018083492 W CN2018083492 W CN 2018083492W WO 2019200558 A1 WO2019200558 A1 WO 2019200558A1
Authority
WO
WIPO (PCT)
Prior art keywords
hardware device
type
work
blockchain node
workload
Prior art date
Application number
PCT/CN2018/083492
Other languages
French (fr)
Chinese (zh)
Inventor
刘均
刘新
金武超
Original Assignee
深圳市元征软件开发有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市元征软件开发有限公司 filed Critical 深圳市元征软件开发有限公司
Priority to PCT/CN2018/083492 priority Critical patent/WO2019200558A1/en
Priority to CN201880075868.4A priority patent/CN111433807A/en
Publication of WO2019200558A1 publication Critical patent/WO2019200558A1/en

Links

Images

Classifications

    • 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

Definitions

  • the present application relates to the field of blockchain technology, and in particular, to a blockchain node service, mining method, device, device, system and medium.
  • the main way of obtaining existing points is as follows: a single hardware downloads a dedicated integral computing tool from the point issuing platform server, and then performs a transaction occurring on the blockchain corresponding to the point issuing platform. Repeated operations, through a certain type of consensus algorithm to obtain transaction confirmation rights, that is, billing rights, thereby obtaining transaction fees and points rewards.
  • transaction confirmation rights that is, billing rights
  • points rewards The way the points are acquired is also called mining.
  • the purpose of the present application is to provide a blockchain node service, mining method, device, device, system and medium, which can attract more computing resources to participate in the mining process and improve the mining efficiency.
  • the specific plan is as follows:
  • the present application discloses a blockchain node service method, which is applied to a blockchain node server, and includes: assigning different consensus algorithms to hardware devices of different working types, so that the hardware devices are completing corresponding types. Obtaining the corresponding billing right after the work satisfying the preset condition; obtaining the corresponding workload submitted by the hardware device after obtaining the corresponding billing right; determining and coordinating according to the preset credit reward consensus corresponding to the type of the workload The credit corresponding to the workload submitted by the hardware device is transferred to the user account corresponding to the corresponding hardware device, and then the corresponding registration is performed and broadcasted throughout the network.
  • the allocating different consensus algorithms to the hardware devices of different working types including: determining a working type of the hardware device; determining, from the first preset mapping library, a working type corresponding to the hardware device The consensus algorithm allocates the determined consensus algorithm to the corresponding hardware device; wherein the first preset mapping library is used to record different consensus algorithms corresponding to different work types.
  • the determining the working type of the hardware device includes: acquiring a device type sent by the hardware device; determining, from a second preset mapping library, a work type corresponding to the device type;
  • the second preset mapping library is used to record different work types corresponding to different device types.
  • the determining the working type of the hardware device includes: determining a working type of the hardware device by directly acquiring a working type sent by the hardware device.
  • the allocating different consensus algorithms for the hardware devices with different working types including: sending a third preset mapping library to the hardware device, so that the hardware device is from the third device according to its own working type.
  • the preset mapping library matches the corresponding consensus algorithm; wherein the third preset mapping library is used to record different consensus algorithms corresponding to different work types.
  • the work that meets the preset condition includes: obtaining a data collection result that satisfies the first preset condition in the data collection process; and/or obtaining the second preset condition in the data analysis process.
  • the work of the data analysis results includes: obtaining a data collection result that satisfies the first preset condition in the data collection process; and/or obtaining the second preset condition in the data analysis process.
  • the method for serving the blockchain node further includes: obtaining a user registration request, and assigning a unique user account to the corresponding user; and acquiring, in the login state, the corresponding one of the user accounts Registering requests of the hardware devices, and assigning different device identifiers to different hardware devices; recording the user accounts and corresponding device identifiers of the plurality of hardware devices.
  • the method for serving the blockchain node further includes: counting a sum of workloads submitted by all the hardware devices corresponding to the same user account in a preset time period; determining whether the sum is less than a pre-predetermined Set the sum threshold, if yes, trigger the corresponding prompt information to prompt the corresponding user to take measures to improve the point acquisition efficiency.
  • the present application discloses a mining method, which is applied to a hardware device, including: acquiring a corresponding consensus algorithm allocated by a blockchain node server according to a work type of the hardware device; and completing the corresponding process based on the consensus algorithm Obtaining a corresponding billing right after the work satisfying the preset condition, and then submitting a corresponding workload to the block chain node server; wherein the block chain node server obtains the workload submitted by the hardware device And determining, according to a preset credit reward consensus corresponding to the type of the workload, an integral corresponding to the workload submitted by the hardware device; acquiring a score corresponding to the submitted workload transferred by the blockchain node server; The block chain node server performs corresponding registration and network-wide broadcast after transferring the points to the hardware device.
  • the method further includes: selecting, from all types of work that the hardware device can process, selecting the filter that meets the manual input.
  • the type of work of the condition, and the filtered work type is sent to the blockchain node server.
  • the method further includes: selecting, from all types of work that the hardware device can process, satisfying the system preset screening The type of work of the condition, and the filtered work type is sent to the blockchain node server.
  • the present application discloses a blockchain node service device, which is applied to a blockchain node server, and includes: a consensus algorithm allocation module, configured to allocate different consensus algorithms for hardware devices of different working types, so as to The hardware device obtains the corresponding billing right after completing the corresponding type of work satisfying the preset condition; the workload obtaining module is configured to obtain the corresponding workload submitted by the hardware device after obtaining the corresponding billing right; a module, configured to determine, according to a preset point reward consensus corresponding to the type of the workload, a score corresponding to the workload submitted by the hardware device, and transfer the point to a user account corresponding to the corresponding hardware device, Then carry out the corresponding registration and broadcast on the whole network.
  • a consensus algorithm allocation module configured to allocate different consensus algorithms for hardware devices of different working types, so as to The hardware device obtains the corresponding billing right after completing the corresponding type of work satisfying the preset condition
  • the workload obtaining module is configured to obtain the corresponding workload submitted by the hardware device after obtaining the corresponding billing right
  • the consensus algorithm allocation module includes: a work type determining unit, configured to determine a working type of the hardware device; and a consensus algorithm assigning unit, configured to determine, from the first preset mapping library, the hardware A consensus algorithm corresponding to the working type of the device, and the determined consensus algorithm is allocated to the corresponding hardware device; wherein the first preset mapping library is used to record different consensus algorithms corresponding to different work types.
  • the work type determining unit is configured to obtain a device type sent by the hardware device, and then determine, from the second preset mapping library, a work type corresponding to the device type;
  • the second preset mapping library is used to record different work types corresponding to different device types.
  • the working type determining unit is specifically configured to determine a working type of the hardware device by directly acquiring a working type sent by the hardware device.
  • the consensus algorithm allocation module includes: a mapping library sending unit, configured to send a third preset mapping library to the hardware device, so that the hardware device is from the third pre-pre The mapping library is matched with a corresponding consensus algorithm; wherein the third preset mapping library is used to record different consensus algorithms corresponding to different work types.
  • the work that meets the preset condition includes: obtaining a data collection result that satisfies the first preset condition in the data collection process; and/or obtaining the second preset condition in the data analysis process.
  • the work of the data analysis results includes: obtaining a data collection result that satisfies the first preset condition in the data collection process; and/or obtaining the second preset condition in the data analysis process.
  • the blockchain node service device further includes: a first request response module, configured to acquire a user registration request, and assign a unique user account to the corresponding user; and a second request response module, configured to The user account is in the login state, and the registration request of the plurality of hardware devices corresponding to the user account is obtained, and different device identifiers are assigned to different hardware devices; the information recording module is configured to record the user account and the corresponding office. A device identifier of a plurality of hardware devices.
  • the blockchain node service device further includes: a workload statistics module, configured to collect a sum of workloads submitted by all the hardware devices corresponding to the same user account in a preset time period;
  • the prompting module is configured to determine whether the sum is less than a preset sum threshold, and if yes, trigger corresponding prompt information to prompt the corresponding user to take measures to improve the point acquisition efficiency.
  • the present application discloses a mining device, which is applied to a hardware device, and includes: a consensus algorithm obtaining module, configured to acquire a corresponding consensus algorithm allocated by the block chain node server according to the working type of the hardware device; And a quantity submitting module, configured to acquire a corresponding billing right after completing the corresponding work satisfying the preset condition, and then submit a corresponding workload to the block chain node server; wherein the block After obtaining the workload submitted by the hardware device, the chain node server determines, according to a preset credit reward consensus corresponding to the type of the workload, an integral corresponding to the workload submitted by the hardware device; and an integral acquisition module, configured to: Acquiring the points corresponding to the submitted workload transferred by the blockchain node server; wherein the block chain node server performs corresponding registration and network-wide broadcasting after transferring the points to the hardware device.
  • the mining device further includes: a first work type selection module, configured to: before the consensus algorithm acquisition module acquires a corresponding consensus algorithm allocated by the block chain node server according to the work type of the hardware device Selecting a work type that satisfies the manually input filter condition from all types of work that the hardware device can handle, and sends the filtered work type to the block chain node server.
  • a first work type selection module configured to: before the consensus algorithm acquisition module acquires a corresponding consensus algorithm allocated by the block chain node server according to the work type of the hardware device Selecting a work type that satisfies the manually input filter condition from all types of work that the hardware device can handle, and sends the filtered work type to the block chain node server.
  • the mining device further includes: a second work type selection module, configured to: before the consensus algorithm acquisition module acquires a corresponding consensus algorithm allocated by the block chain node server according to the work type of the hardware device Selecting a work type that satisfies the system preset filter condition from all types of work that the hardware device can handle, and sends the filtered work type to the block chain node server.
  • a second work type selection module configured to: before the consensus algorithm acquisition module acquires a corresponding consensus algorithm allocated by the block chain node server according to the work type of the hardware device Selecting a work type that satisfies the system preset filter condition from all types of work that the hardware device can handle, and sends the filtered work type to the block chain node server.
  • the present application discloses a blockchain node server including a processor and a memory; wherein the processor implements the blockchain node service method disclosed above when executing the computer program stored in the memory.
  • the present application discloses a hardware device including a processor and a memory; wherein the aforementioned mining method is implemented when the processor executes a computer program stored in the memory.
  • the hardware device includes: an OBD box whose work type is collecting vehicle state data; and/or a first in-vehicle device whose work type is analysis of vehicle state data; and/or, the work type is collecting vehicle transactions. a meter for the consumption record; and/or a second in-vehicle device that analyzes the vehicle transaction consumption record; and/or a handheld mobile terminal that operates in a vehicle diagnostic report.
  • the present application discloses a mining system comprising a blockchain node server as disclosed above and a plurality of hardware devices as disclosed above having different types of work.
  • the present application discloses a computer readable storage medium for storing a blockchain node service program; wherein the blockchain node service program is executed by a processor to implement the foregoing disclosed blockchain node service method.
  • the present application discloses a computer readable storage medium for storing a mining program; wherein the mining program is executed by a processor to implement the mining method disclosed above.
  • the present application allocates different consensus algorithms for different hardware devices according to different types of hardware devices, so that hardware devices of different working types can participate in the mining process based on their own working characteristics, thereby obtaining corresponding
  • the integration of the points avoids the problem of low mining efficiency due to mining in a single hardware. That is to say, the types of hardware devices involved in mining in the present application can be various, and are not limited to a specific hardware device, so that one user can simultaneously participate in mining using a plurality of hardware devices.
  • FIG. 1 is a flowchart of a method for serving a blockchain node according to an embodiment of the present application
  • FIG. 2 is a flowchart of a specific blockchain node service method disclosed in an embodiment of the present application
  • FIG. 3 is a flowchart of a specific method for serving a blockchain node according to an embodiment of the present application
  • FIG. 5 is a flow chart of a mining method disclosed in an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a blockchain node service device according to an embodiment of the present application.
  • FIG. 7 is a schematic structural view of a mining device disclosed in an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a blockchain node server according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a hardware device according to an embodiment of the present application.
  • the embodiment of the present application discloses a blockchain node service method, which is applied to a blockchain node server, wherein the blockchain node server in this embodiment may specifically be a zone with strong computing and processing capability in the blockchain network.
  • the blockchain node device is capable of responding to requests initiated by hardware devices that are added to the blockchain network and is capable of rewarding the hardware devices. Referring to Figure 1, the method includes:
  • Step S11 Allocating different consensus algorithms for hardware devices with different working types, so that the hardware device obtains corresponding billing rights after completing corresponding work of the corresponding type.
  • the hardware devices involved in mining are specifically a plurality of hardware devices with different working types.
  • the working type of the hardware device in this embodiment refers to the type of work confirmed by the blockchain node server. Since the type of work that can be handled by the same hardware device is usually not limited to only one type of work, it can usually handle multiple types of work. In order to avoid confusion, the embodiment may select any one or several types of work from all types of work that can be processed by a hardware device by using a manual selection method or a system automatic selection method as the final passable blockchain. The type of work confirmed by the node server.
  • the embodiment may automatically select, by the system, the type of work that consumes the most computing resources from among all types of work that can be processed by one hardware device as the type of work that can be finally confirmed by the blockchain node server, or may be manually selected.
  • the method selects several types of work that satisfy the user's specific wishes from among all types of work that a hardware device can handle as the type of work that can ultimately be confirmed by the blockchain node server.
  • the embodiment may specifically limit various hardware devices that can participate in mining according to the industry attributes corresponding to the blockchain network.
  • the blockchain network is a blockchain network that is open to any sub-sector
  • the multiple hardware devices that can participate in mining in this embodiment may be from different sub-sectors, that is, not Restrictions of the industry; assuming that the blockchain network in this embodiment is a blockchain network that is only for a single sub-sector, the various hardware devices that can participate in mining in this embodiment are from the segment.
  • a variety of hardware devices are possible.
  • the various hardware devices that can participate in mining in this embodiment may specifically include an OBD box that collects vehicle state data, and the work type is to analyze vehicle state data.
  • the first in-vehicle device, the work type is a meter for collecting vehicle transaction consumption records, the second type of in-vehicle device for which the work type is the vehicle transaction consumption record, and the handheld mobile terminal for which the work type is the vehicle diagnosis report.
  • the blockchain node server allocates different consensus algorithms for hardware devices of different working types. After the hardware device obtains the corresponding consensus algorithm, the consensus algorithm will allow the hardware device to obtain the accounting rights after completing the work of the corresponding type and satisfying the preset condition. It can be understood that after any hardware device obtains the accounting right in a certain round of work, it will have the right to submit the corresponding workload to the blockchain node server, that is, to have the corresponding workload packaged into the block. right.
  • Step S12 Acquire a corresponding workload submitted by the hardware device after obtaining the corresponding billing right.
  • the corresponding billing right may be obtained, and the hardware device is obtained by virtue of the obtained billing right.
  • the corresponding workload in the current working process can be submitted to the blockchain node server, so that the blockchain node server rewards the user account corresponding to the hardware device according to the point reward consensus corresponding to the type of the acquired workload. Points. It can be understood that the types of different workloads in this embodiment correspond to different types of work.
  • the submitted workload may specifically be a data analysis result indicating the degree of work effort of the hardware device.
  • the submitted workload may specifically be a data collection result indicating the degree of work effort of the hardware device.
  • Step S13 determining a point corresponding to the workload submitted by the hardware device according to a preset point reward consensus corresponding to the type of the workload, and transferring the point to a user account corresponding to the corresponding hardware device, and then Carry out corresponding registration and broadcast on the whole network.
  • the block chain node server stores different preset point reward consensus corresponding to different types of workloads.
  • the above-mentioned preset point reward consensus is a rule for how to perform a point reward in advance for a certain type of workload.
  • the reward points specified in the corresponding preset rewards consensus will vary. Usually, if a type of workload needs to consume more computing resources, the corresponding reward points will be more. Similarly, if a type of workload needs to consume less computing resources, then the corresponding There will be fewer bonus points.
  • each hardware device corresponds to one user account
  • the same user account may correspond to multiple hardware devices, wherein multiple hardware devices under the same user account may specifically package multiple working types of hardware devices.
  • the embodiments of the present application allocate different consensus algorithms for different hardware devices, so that hardware devices of different working types can participate in the mining process based on their working characteristics, thereby The corresponding points are obtained, thereby avoiding the problem of low mining efficiency in the prior art due to the fact that mining can only be performed by a single hardware. That is, the types of hardware devices involved in mining in the embodiments of the present application may be various, and are not limited to a specific hardware device, so that one user can simultaneously participate in mining using a plurality of hardware devices.
  • the embodiment of the present application discloses a specific blockchain node service method, including:
  • Step S21 Determine a working type of the hardware device, and determine, from the first preset mapping library, a consensus algorithm corresponding to the working type of the hardware device.
  • the first preset mapping library is used to record different consensus algorithms corresponding to different work types.
  • different consensus algorithms corresponding to different work types are recorded in the first preset mapping library. After determining the working type of any hardware device, the first preset mapping library may be searched out. Corresponding consensus algorithm.
  • the determining the working type of the hardware device may include: acquiring a device type sent by the hardware device, and determining, from the second preset mapping library, a device type corresponding to the device type job type.
  • the second preset mapping library is configured to record different work types corresponding to different device types.
  • hardware devices of different device types may have different types of work, for example, hardware devices based on CPU (ie, Central Processing Unit), and GPU-based (ie, Graphics Processing Unit). Hardware devices for calculation, hardware devices based on FPGA (Field-Programmable Gate Array), and hardware devices based on ASIC (Application Specific Integrated Circuits), each of which has a different type of work. .
  • the foregoing second preset mapping library may be created according to the working type that the hardware devices of different device types are good at, so that the hardware devices of different device types can be obtained in the process of completing the work that they are good at. Reward points.
  • the determining the working type of the hardware device may include: determining a working type of the hardware device by directly acquiring a working type sent by the hardware device.
  • the blockchain node server in this embodiment can determine the working type of the hardware device by directly acquiring the manner in which the hardware device sends the work type. It can be understood that the hardware device needs to determine the corresponding work type before sending the work type.
  • the hardware device in this embodiment may specifically select a work type that satisfies the manual input screening condition from all types of work that can be processed by itself, and then send the selected work type to the blockchain node server;
  • the hardware device may specifically select a work type that satisfies the system preset filter condition from all types of work that can be processed by itself, and then send the selected work type to the blockchain node server.
  • Step S22 Allocating the determined consensus algorithm to the corresponding hardware device, so that the hardware device obtains corresponding billing rights after completing the corresponding type of work satisfying the preset condition.
  • the working that meets the preset condition may include: obtaining a data collection result that satisfies the first preset condition in the data collection process; and/or obtaining the second in the data analysis process.
  • Pre-condition data analysis results work.
  • the data collection result that satisfies the first preset condition may specifically be the data collection result of the preset type data, or the data collection and collection result of the data collection amount per unit time greater than the preset collection quantity threshold, or unit time
  • the amount of data collected is the most data acquisition result among all hardware devices of the same working type.
  • the data analysis result satisfying the second preset condition may specifically mean that the data analysis accuracy per unit time is the highest data analysis result among all the hardware devices of the same working type, or the total amount of data of the data analysis result per unit time is at all.
  • the hardware types of work types the most data analysis results.
  • Step S23 Acquire a corresponding workload submitted by the hardware device after obtaining the corresponding billing right.
  • Step S24 determining a point corresponding to the workload submitted by the hardware device according to a preset point reward consensus corresponding to the type of the workload, and transferring the point to a user account corresponding to the corresponding hardware device, and then Carry out corresponding registration and broadcast on the whole network.
  • the embodiment of the present application discloses a specific blockchain node service method, including:
  • Step S31 Send the third preset mapping library to the hardware device, so that the hardware device matches the corresponding consensus algorithm from the third preset mapping library according to its own working type.
  • the third preset mapping library is used to record different consensus algorithms corresponding to different work types.
  • the blockchain node server in this embodiment records different consensus algorithms corresponding to different work types in the third preset mapping library in advance. And then sending the third preset mapping library to the hardware device, so that the hardware device can match the corresponding consensus algorithm from the third preset mapping library according to the working type of the device, based on the matched consensus algorithm, the hardware device It is possible to obtain the corresponding billing rights after completing the work of the corresponding type and satisfying the preset conditions.
  • Step S32 Acquire a corresponding workload submitted by the hardware device after obtaining the corresponding billing right.
  • Step S33 determining a point corresponding to the workload submitted by the hardware device according to a preset point reward consensus corresponding to the type of the workload, and transferring the point to a user account corresponding to the corresponding hardware device, and then Carry out corresponding registration and broadcast on the whole network.
  • an embodiment of the present application discloses a specific blockchain node service method, including:
  • Step S41 Acquire a user registration request, and assign a unique user account to the corresponding user.
  • the user can send a user registration request to the blockchain node server through any hardware device owned by the user.
  • the blockchain node server determines whether the user registration request is a valid user registration request, and if so, assigns the user a unique user account, and if not, sends the user registration request to the user.
  • the hardware device returns a corresponding prompt message to prompt the user to have a problem with the current user registration request, so that the user can resubmit the corrected user registration request.
  • step S42 when the user account is in the login state, the registration request of the plurality of hardware devices corresponding to the user account is obtained, and different device identifiers are assigned to different hardware devices.
  • the user may separately log in to the corresponding user account in each hardware device, and then each hardware device initiates a corresponding registration request to the blockchain node server.
  • each hardware device initiates a corresponding registration request to the blockchain node server.
  • the registration request of all the hardware devices under the user account name is sent to the block through the hardware device.
  • Chain node server It can be understood that the device communication address of the corresponding hardware device is included in each registration request.
  • Step S43 Record the user account and the corresponding device identifiers of the plurality of hardware devices to obtain a fourth preset mapping library.
  • the blockchain node server records the user account and the device identifiers of the plurality of hardware devices corresponding to the user account in the fourth preset mapping library.
  • Step S44 Allocating different consensus algorithms for hardware devices with different working types, so that the hardware device obtains corresponding billing rights after completing corresponding work of the corresponding type.
  • Step S45 Acquire a corresponding workload submitted by the hardware device after obtaining the corresponding billing right.
  • Step S46 determining, according to a preset point reward consensus corresponding to the type of the workload, a score corresponding to the workload submitted by the hardware device, and determining, by using the fourth preset mapping library, a device identifier of the hardware device.
  • the corresponding user account is transferred to the user account, and then registered and broadcasted throughout the network.
  • the blockchain node service method in this embodiment further includes:
  • Counting by the sum of the workloads submitted by all the hardware devices corresponding to the same user account in a preset time period, determining whether the sum is less than a preset total threshold, and if so, triggering corresponding prompt information to prompt
  • the corresponding user takes measures to improve the efficiency of the points. For example, the user may be prompted to add various hardware devices under the account name to the mining pool, so as to jointly mine with various hardware devices under other user account names and obtain corresponding points in proportion, or prompt the user to use cloud computing power to Mining is carried out to improve the efficiency of point acquisition.
  • the following takes the blockchain network of the automobile industry as an example to specifically describe the blockchain node service method in this application.
  • the blockchain node server receives the user's registration request and assigns the user a unique user account.
  • the user account is bound to the device identifier of multiple hardware devices for storage.
  • the owner when the owner registers as a user of the blockchain, the owner can register the in-vehicle device of his own vehicle, the OBD box, the owner's handheld mobile terminal such as a mobile phone, etc. in the blockchain.
  • the blockchain node server is based on the integration (virtual currency) issuance rule, and allocates a corresponding consensus algorithm to the hardware device according to the matching table between the preset hardware device and the consensus algorithm.
  • the matching table between the hardware device and the consensus algorithm may be flexibly set based on the working type of the hardware device.
  • the working table of the hardware device reflects the different processing capabilities of the hardware device for the transaction. Specifically, the hardware device can flexibly set different processing functions of the transaction.
  • the working type of the in-vehicle device is to analyze various vehicle state data and automobile transaction consumption records, and obtain corresponding data analysis results, and the in-vehicle device processing function for the transaction is to package the data analysis result, if the data analysis result is satisfied.
  • the above-mentioned in-vehicle device will have the billing right to pack the data analysis result into the block, and then obtain the score.
  • the working type of the OBD box is specifically collecting various vehicle state data
  • the processing function of the OBD box for the transaction is to package the data collection result that meets the requirements of the automobile blockchain, that is, the OBD box can be used in this embodiment.
  • the corresponding consensus algorithm is set as a consensus algorithm based on the data collection result.
  • the OBD box will have the accounting right to package the data collection result into the block, for example, if one
  • the OBD box will have the right to package the data collected by itself into the block. And get points.
  • the working type of the handheld mobile terminal of the vehicle owner is specifically to obtain a diagnosis report
  • the processing function of the mobile terminal of the vehicle owner for the transaction is to package the diagnostic report that meets the requirements of the automobile blockchain
  • the embodiment can
  • the consensus algorithm corresponding to the mobile terminal of the vehicle owner is set as a consensus algorithm based on the diagnosis report obtained by the owner's handheld mobile terminal.
  • the vehicle owner handheld mobile terminal will have the obtained above.
  • the diagnostic report is packaged into the billing rights of the block. For example, if the total amount of data of a diagnostic report that meets the requirements of the car blockchain acquired by a vehicle owner's handheld mobile terminal per unit time is the most common among all the host mobile terminals. Next, the owner-held mobile terminal will have the right to package the diagnostic report obtained by itself into the block, and then obtain the points.
  • the blockchain node server allocates corresponding points (virtual currency) for each hardware device according to the pre-achieved point reward consensus, and transfers the real-time points (virtual currency).
  • the user account bound to the hardware device is then registered and broadcasted throughout the network.
  • the embodiment of the present application further discloses a mining method applied to hardware devices, including:
  • Step S51 Acquire a corresponding consensus algorithm allocated by the blockchain node server according to the working type of the hardware device;
  • Step S52 Acquire a corresponding billing right after completing the corresponding work satisfying the preset condition based on the consensus algorithm, and then submit a corresponding workload to the blockchain node server; wherein the block chain node server After obtaining the workload submitted by the hardware device, determining a score corresponding to the workload submitted by the hardware device according to a preset credit reward consensus corresponding to the type of the workload;
  • Step S53 Acquire the points corresponding to the submitted workload transferred by the blockchain node server; wherein the block chain node server performs corresponding registration and network broadcast after transferring the points to the hardware device. .
  • the method before the acquiring the consensus algorithm that is allocated by the blockchain node server according to the working type of the hardware device, the method further includes:
  • a work type that satisfies the manually input filter condition is selected from all types of work that the hardware device can handle, and the filtered work type is sent to the block chain node server.
  • the method before the obtaining the corresponding consensus algorithm that is allocated by the block chain node server according to the working type of the hardware device, the method further includes:
  • a work type that satisfies a system preset filter condition is selected from all types of work that the hardware device can handle, and the filtered work type is sent to the block chain node server.
  • the embodiment of the present application further discloses a blockchain node service device, which is applied to a blockchain node server, and includes:
  • the consensus algorithm assigning module 11 is configured to allocate different consensus algorithms for hardware devices with different working types, so that the hardware device obtains corresponding billing rights after completing corresponding work of the corresponding type;
  • the workload obtaining module 12 is configured to obtain a corresponding workload submitted by the hardware device after obtaining the corresponding billing right;
  • the point reward module 13 is configured to determine, according to a preset point reward consensus corresponding to the type of the workload, a score corresponding to the workload submitted by the hardware device, and transfer the point to the corresponding hardware device User account, then register accordingly and broadcast the entire network.
  • the consensus algorithm allocation module 11 may specifically include:
  • a work type determining unit configured to determine a work type of the hardware device
  • a consensus algorithm allocation unit configured to determine, from the first preset mapping library, a consensus algorithm corresponding to the working type of the hardware device, and allocate the determined consensus algorithm to the corresponding hardware device;
  • the first preset mapping library is used to record different consensus algorithms corresponding to different work types.
  • the work type determining unit may be specifically configured to obtain a device type sent by the hardware device, and then determine, from the second preset mapping library, a work type corresponding to the device type;
  • the second preset mapping library is used to record different work types corresponding to different device types.
  • the work type determining unit may be specifically configured to determine a working type of the hardware device by directly acquiring a work type sent by the hardware device.
  • the consensus algorithm allocation module 11 may specifically include:
  • mapping library sending unit configured to send a third preset mapping library to the hardware device, so that the hardware device matches a corresponding consensus algorithm from the third preset mapping library according to its working type;
  • the third preset mapping library is used to record different consensus algorithms corresponding to different work types.
  • the work that meets the preset condition may specifically include:
  • the blockchain node service device in this embodiment may further include:
  • a first request response module configured to obtain a user registration request, and assign a unique user account to the corresponding user
  • a second request response module configured to acquire, when the user account is in a login state, a registration request of multiple hardware devices corresponding to the user account, and assign different device identifiers to different hardware devices;
  • the information recording module is configured to record the user account and the corresponding device identifier of the plurality of hardware devices.
  • the blockchain node service device in this embodiment may further include:
  • a workload statistics module configured to collect a sum of workloads submitted by all the hardware devices corresponding to the same user account in a preset time period
  • the prompting module is configured to determine whether the sum is less than a preset sum threshold, and if yes, trigger corresponding prompt information to prompt the corresponding user to take measures to improve the point acquisition efficiency.
  • the embodiment of the present application further discloses a mining device applied to hardware devices, including:
  • the consensus algorithm obtaining module 21 is configured to obtain a corresponding consensus algorithm allocated by the block chain node server according to the working type of the hardware device;
  • the workload submission module 22 is configured to obtain a corresponding billing right after completing the corresponding work satisfying the preset condition based on the consensus algorithm, and then submit a corresponding workload to the blockchain node server; After obtaining the workload submitted by the hardware device, the blockchain node server determines, according to a preset credit reward consensus corresponding to the type of the workload, a score corresponding to the workload submitted by the hardware device;
  • the point obtaining module 23 is configured to acquire an integral corresponding to the submitted workload transferred by the block chain node server, where the block chain node server performs corresponding registration after transferring the point to the hardware device And the whole network broadcast.
  • the mining device in this embodiment may further include:
  • a first work type selection module configured to: before the consensus algorithm acquisition module 21 acquires a corresponding consensus algorithm allocated by the block chain node server according to the work type of the hardware device, all types of the types that can be processed by the hardware device At work, a work type that satisfies the manually input filter condition is selected, and the filtered work type is sent to the block chain node server.
  • the mining device in this embodiment may further include:
  • a second work type selection module configured to: before the consensus algorithm acquisition module 21 acquires a corresponding consensus algorithm allocated by the block chain node server according to the work type of the hardware device, all types of the types that can be processed by the hardware device At work, a work type that satisfies the system preset filter condition is selected, and the filtered work type is sent to the block chain node server.
  • the present application further discloses a blockchain node server, including a processor 31 and a memory 32.
  • the processor 31 implements the foregoing when executing a computer program saved in the memory 32.
  • Public blockchain node service method Public blockchain node service method.
  • the processor 31 executes the computer subroutine saved in the memory 32, the following steps may be specifically implemented: determining a working type of the hardware device; determining a location from the first preset mapping library. a consensus algorithm corresponding to the working type of the hardware device, and the determined consensus algorithm is allocated to the corresponding hardware device; wherein the first preset mapping library is used to record different consensus algorithms corresponding to different work types .
  • the processor 31 executes the computer subroutine saved in the memory 32, the following steps may be specifically implemented: acquiring the device type sent by the hardware device; determining the The work type corresponding to the device type; wherein the second preset mapping library is used to record different work types corresponding to different device types.
  • the processor 31 executes the computer subroutine saved in the memory 32, the following steps may be specifically implemented: determining the working of the hardware device by directly acquiring the working type sent by the hardware device. Types of.
  • the processor 31 executes the computer subroutine saved in the memory 32
  • the following steps may be specifically implemented: sending a third preset mapping library to the hardware device, so that the hardware device according to the The work type matches the corresponding consensus algorithm from the third preset mapping library; wherein the third preset mapping library is used to record different consensus algorithms corresponding to different work types.
  • the processor 31 executes the computer subroutine saved in the memory 32, the following steps may be further implemented: acquiring a user registration request, and assigning a unique user account to the corresponding user; In the login state, a registration request of a plurality of hardware devices corresponding to the user account is obtained, and different device identifiers are assigned to different hardware devices; and the user accounts and corresponding device identifiers of the plurality of hardware devices are recorded.
  • the processor 31 executes the computer subroutine saved in the memory 32
  • the following steps may be further implemented: collecting all the hardware devices corresponding to the same user account and submitting in a preset time period. The sum of the workloads; determining whether the sum is less than a preset sum threshold, and if so, triggering corresponding prompt information to prompt the corresponding user to take measures to improve the point acquisition efficiency.
  • the blockchain node server further includes an input interface 33, an output interface 34, a power source 35, a communication chip 36, and the like.
  • the present application further discloses a hardware device, including a processor 41 and a memory 42; wherein the processor 41 implements the foregoing disclosed digging when executing the computer program saved in the memory 42. Mining method.
  • the processor 41 executes the computer subroutine saved in the memory 42
  • the following steps may be further implemented: acquiring a corresponding consensus algorithm according to the working type of the hardware device in the blockchain node server.
  • a work type that satisfies the manually entered filter condition is selected from all types of work that the hardware device can handle, and the filtered work type is sent to the block chain node server.
  • the processor 41 executes the computer subroutine saved in the memory 42
  • the following steps may be further implemented: acquiring a corresponding consensus algorithm according to the working type of the hardware device in the blockchain node server.
  • a work type that satisfies the system preset filter condition is selected from all types of work that the hardware device can handle, and the filtered work type is sent to the block chain node server.
  • the foregoing hardware device further includes an input interface 43, an output interface 44, a power source 45, a communication chip 46, and the like.
  • the hardware device that can participate in the mining in this embodiment may be specifically limited according to the industry attribute corresponding to the blockchain network.
  • the blockchain network is a blockchain network that is open to any sub-sector
  • the hardware devices that can participate in mining in this embodiment may be from different sub-sectors, that is, not subdivided.
  • the limitation of the industry; assuming that the blockchain network in this embodiment is a blockchain network that is only for a single sub-sector, the hardware device that can participate in the mining in this embodiment may specifically be from the segment industry. hardware equipment.
  • the hardware device in this embodiment includes: an OBD box whose work type is to collect vehicle state data; and/or, the work type is to analyze vehicle state data.
  • the present application also discloses a mining system comprising a blockchain node server as disclosed in the foregoing and a plurality of hardware devices as disclosed in the foregoing.
  • the present application further discloses a computer readable storage medium for storing a blockchain node service program; wherein the blockchain node service program is executed by a processor to implement a blockchain node as disclosed in the foregoing Service method.
  • the present application also discloses a computer readable storage medium for storing a mining program; wherein the mining program is executed by a processor to implement a mining method as disclosed above.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented directly in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A blockchain node service method and apparatus, a mining method and apparatus, and a device, a system, and a medium. The blockchain node service method comprises: assigning different consensus algorithms to hardware devices of different working types, so that the hardware devices obtain corresponding bookkeeping rights after completing corresponding types of work that satisfy preset conditions; obtaining corresponding workloads submitted after the hardware devices obtain the corresponding bookkeeping rights; according to preset point reward consensuses corresponding to the types of the workloads, determining points corresponding to the workloads submitted by the hardware devices, transferring the points to user accounts corresponding to the hardware devices, and then performing corresponding registration and broadcasting in the entire network. In the solution, according to the differences between the working types of hardware devices, different consensus algorithms are assigned to different hardware devices, and in this way, the hardware devices of the different working types can be involved in a mining process on the basis of work characteristics of the hardware devices, thereby obtaining corresponding points and improving mining efficiency.

Description

区块链节点服务、挖矿方法、装置、设备、系统及介质Block chain node service, mining method, device, equipment, system and medium 技术领域Technical field
本申请涉及区块链技术领域,特别涉及一种区块链节点服务、挖矿方法、装置、设备、系统及介质。The present application relates to the field of blockchain technology, and in particular, to a blockchain node service, mining method, device, device, system and medium.
背景技术Background technique
随着区块链技术的兴起,基于区块链技术的积分发行系统也快速发展。现有的积分(如比特币等虚拟货币)获取方式主要方式为:单一硬件从积分发行平台服务器下载专用的积分运算工具,然后对发生在与该积分发行平台对应的区块链上的交易进行反复运算,通过某一类共识算法获得交易确认权,也即记账权,从而获得交易手续费和积分奖励。积分获取的方式也称为挖矿。With the rise of blockchain technology, the point distribution system based on blockchain technology has also developed rapidly. The main way of obtaining existing points (such as bitcoin and other virtual currency) is as follows: a single hardware downloads a dedicated integral computing tool from the point issuing platform server, and then performs a transaction occurring on the blockchain corresponding to the point issuing platform. Repeated operations, through a certain type of consensus algorithm to obtain transaction confirmation rights, that is, billing rights, thereby obtaining transaction fees and points rewards. The way the points are acquired is also called mining.
然而,现有的挖矿是由单一硬件基于单一共识算法来进行的,这种挖矿方式难以吸引更多的计算资源参与到挖矿进程当中,导致挖矿效率较低,严重限制了区块链网络的快速发展。However, the existing mining is carried out by a single hardware based on a single consensus algorithm. This mining method is difficult to attract more computing resources to participate in the mining process, resulting in low mining efficiency and severely limiting the block. The rapid development of the chain network.
发明内容Summary of the invention
有鉴于此,本申请的目的在于提供一种区块链节点服务、挖矿方法、装置、设备、系统及介质,能够吸引更多的计算资源参与到挖矿过程,提高了挖矿效率。其具体方案如下:In view of this, the purpose of the present application is to provide a blockchain node service, mining method, device, device, system and medium, which can attract more computing resources to participate in the mining process and improve the mining efficiency. The specific plan is as follows:
第一方面,本申请公开了一种区块链节点服务方法,应用于区块链节点服务器,包括:为工作类型不同的硬件设备分配不同的共识算法,以便所述硬件设备在完成相应类型的满足预设条件的工作后获得相应的记账权;获取所述硬件设备在获得相应的记账权后提交的相应的工作量;根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分,并将该积分转移至与相应的所述硬件设备对应的用户账号,然后进行相应的登记并全网广播。In a first aspect, the present application discloses a blockchain node service method, which is applied to a blockchain node server, and includes: assigning different consensus algorithms to hardware devices of different working types, so that the hardware devices are completing corresponding types. Obtaining the corresponding billing right after the work satisfying the preset condition; obtaining the corresponding workload submitted by the hardware device after obtaining the corresponding billing right; determining and coordinating according to the preset credit reward consensus corresponding to the type of the workload The credit corresponding to the workload submitted by the hardware device is transferred to the user account corresponding to the corresponding hardware device, and then the corresponding registration is performed and broadcasted throughout the network.
可选的,所述为工作类型不同的硬件设备分配不同的共识算法,包括:确定所述硬件设备的工作类型;从第一预设映射库中确定出与所述硬件设备的工作类型对应的共识算法,并将确定出的共识算法分配给相应的硬件设备;其中,所述第一预设映射库用于记录与不同的工作类型所对应的不同的共识算法。Optionally, the allocating different consensus algorithms to the hardware devices of different working types, including: determining a working type of the hardware device; determining, from the first preset mapping library, a working type corresponding to the hardware device The consensus algorithm allocates the determined consensus algorithm to the corresponding hardware device; wherein the first preset mapping library is used to record different consensus algorithms corresponding to different work types.
可选的,所述确定所述硬件设备的工作类型,包括:获取所述硬件设备发送的设备类型;从第二预设映射库中确定出与所述设备类型对应的工作类型;其中,所述第二预设映射库用于记录与不同的设备类型所对应的不同的工作类型。Optionally, the determining the working type of the hardware device includes: acquiring a device type sent by the hardware device; determining, from a second preset mapping library, a work type corresponding to the device type; The second preset mapping library is used to record different work types corresponding to different device types.
可选的,所述确定所述硬件设备的工作类型,包括:通过直接获取所述硬件设备发送的工作类型的方式,确定所述硬件设备的工作类型。Optionally, the determining the working type of the hardware device includes: determining a working type of the hardware device by directly acquiring a working type sent by the hardware device.
可选的,所述为工作类型不同的硬件设备分配不同的共识算法,包括:将第三预设映射库发送至所述硬件设备,以便所述硬件设备根据自身的工作类型从所述第三预设映射库中匹配相应的共识算法;其中,所述第三预设映射库用于记录与不同的工作类型所对应的不同的共识算法。Optionally, the allocating different consensus algorithms for the hardware devices with different working types, including: sending a third preset mapping library to the hardware device, so that the hardware device is from the third device according to its own working type. The preset mapping library matches the corresponding consensus algorithm; wherein the third preset mapping library is used to record different consensus algorithms corresponding to different work types.
可选的,所述满足预设条件的工作,包括:在数据采集过程中得到满足第一预设条件的数据采集结果的工作;和/或,在数据分析过程中得到满足第二预设条件的数据分析结果的工作。Optionally, the work that meets the preset condition includes: obtaining a data collection result that satisfies the first preset condition in the data collection process; and/or obtaining the second preset condition in the data analysis process. The work of the data analysis results.
可选的,所述区块链节点服务方法,还包括:获取用户注册请求,并为相应用户分配唯一的用户账号;在所述用户账号处于登录状态下,获取与所述用户账号对应的多个硬件设备的登记请求,并为不同的硬件设备分配不同的设备标识;记录所述用户账号以及相应的所述多个硬件设备的设备标识。Optionally, the method for serving the blockchain node further includes: obtaining a user registration request, and assigning a unique user account to the corresponding user; and acquiring, in the login state, the corresponding one of the user accounts Registering requests of the hardware devices, and assigning different device identifiers to different hardware devices; recording the user accounts and corresponding device identifiers of the plurality of hardware devices.
可选的,所述区块链节点服务方法,还包括:统计与同一所述用户账号对应的所有所述硬件设备在预设时间周期内提交的工作量的总和;判断所述总和是否小于预设总和阈值,如果是,则触发相应的提示信息,以提示相应用户采取措施提升积分获取效率。Optionally, the method for serving the blockchain node further includes: counting a sum of workloads submitted by all the hardware devices corresponding to the same user account in a preset time period; determining whether the sum is less than a pre-predetermined Set the sum threshold, if yes, trigger the corresponding prompt information to prompt the corresponding user to take measures to improve the point acquisition efficiency.
第二方面,本申请公开了一种挖矿方法,应用于硬件设备,包括:获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法;基于所述共识算法在完成相应的满足预设条件的工作后获取相应的记账权,然后向所述区块链节点服务器提交相应的工作量;其中,所述区块链节点服务器在获取到所述硬件设备提交的工作量后,根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分;获取所述区块链节点服务器转移的与提交的工作量对应的积分;其中,所述区块链节点服务器在将该积分转移至所述硬件设备后进行相应的登记和全网广播。In a second aspect, the present application discloses a mining method, which is applied to a hardware device, including: acquiring a corresponding consensus algorithm allocated by a blockchain node server according to a work type of the hardware device; and completing the corresponding process based on the consensus algorithm Obtaining a corresponding billing right after the work satisfying the preset condition, and then submitting a corresponding workload to the block chain node server; wherein the block chain node server obtains the workload submitted by the hardware device And determining, according to a preset credit reward consensus corresponding to the type of the workload, an integral corresponding to the workload submitted by the hardware device; acquiring a score corresponding to the submitted workload transferred by the blockchain node server; The block chain node server performs corresponding registration and network-wide broadcast after transferring the points to the hardware device.
可选的,所述获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,还包括:从所述硬件设备能够处理的所有类型的工作中选择满足人工输入的筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。Optionally, before the obtaining the corresponding consensus algorithm that is allocated by the block chain node server according to the working type of the hardware device, the method further includes: selecting, from all types of work that the hardware device can process, selecting the filter that meets the manual input. The type of work of the condition, and the filtered work type is sent to the blockchain node server.
可选的,所述获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,还包括:从所述硬件设备能够处理的所有类型的工作中选择满足系统预设筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。Optionally, before the obtaining the corresponding consensus algorithm that is allocated by the block chain node server according to the working type of the hardware device, the method further includes: selecting, from all types of work that the hardware device can process, satisfying the system preset screening The type of work of the condition, and the filtered work type is sent to the blockchain node server.
第三方面,本申请公开了一种区块链节点服务装置,应用于区块链节点服务器,包括:共识算法分配模块,用于为工作类型不同的硬件设备分配不同的共识算法,以便所述硬件设备在完成相应类型的满足预设条件的工作后获得相应的记账权;工作量获取模块,用于获取所述硬件设备在获得相应的记账权后提交的相应的工作量;积分奖励 模块,用于根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分,并将该积分转移至与相应的所述硬件设备对应的用户账号,然后进行相应的登记并全网广播。In a third aspect, the present application discloses a blockchain node service device, which is applied to a blockchain node server, and includes: a consensus algorithm allocation module, configured to allocate different consensus algorithms for hardware devices of different working types, so as to The hardware device obtains the corresponding billing right after completing the corresponding type of work satisfying the preset condition; the workload obtaining module is configured to obtain the corresponding workload submitted by the hardware device after obtaining the corresponding billing right; a module, configured to determine, according to a preset point reward consensus corresponding to the type of the workload, a score corresponding to the workload submitted by the hardware device, and transfer the point to a user account corresponding to the corresponding hardware device, Then carry out the corresponding registration and broadcast on the whole network.
可选的,所述共识算法分配模块,包括:工作类型确定单元,用于确定所述硬件设备的工作类型;共识算法分配单元,用于从第一预设映射库中确定出与所述硬件设备的工作类型对应的共识算法,并将确定出的共识算法分配给相应的硬件设备;其中,所述第一预设映射库用于记录与不同的工作类型所对应的不同的共识算法。Optionally, the consensus algorithm allocation module includes: a work type determining unit, configured to determine a working type of the hardware device; and a consensus algorithm assigning unit, configured to determine, from the first preset mapping library, the hardware A consensus algorithm corresponding to the working type of the device, and the determined consensus algorithm is allocated to the corresponding hardware device; wherein the first preset mapping library is used to record different consensus algorithms corresponding to different work types.
可选的,所述工作类型确定单元,具体用于获取所述硬件设备发送的设备类型,然后从第二预设映射库中确定出与所述设备类型对应的工作类型;其中,所述第二预设映射库用于记录与不同的设备类型所对应的不同的工作类型。Optionally, the work type determining unit is configured to obtain a device type sent by the hardware device, and then determine, from the second preset mapping library, a work type corresponding to the device type; The second preset mapping library is used to record different work types corresponding to different device types.
可选的,所述工作类型确定单元,具体用于通过直接获取所述硬件设备发送的工作类型的方式,确定所述硬件设备的工作类型。Optionally, the working type determining unit is specifically configured to determine a working type of the hardware device by directly acquiring a working type sent by the hardware device.
可选的,所述共识算法分配模块,包括:映射库发送单元,用于将第三预设映射库发送至所述硬件设备,以便所述硬件设备根据自身的工作类型从所述第三预设映射库中匹配相应的共识算法;其中,所述第三预设映射库用于记录与不同的工作类型所对应的不同的共识算法。Optionally, the consensus algorithm allocation module includes: a mapping library sending unit, configured to send a third preset mapping library to the hardware device, so that the hardware device is from the third pre-pre The mapping library is matched with a corresponding consensus algorithm; wherein the third preset mapping library is used to record different consensus algorithms corresponding to different work types.
可选的,所述满足预设条件的工作,包括:在数据采集过程中得到满足第一预设条件的数据采集结果的工作;和/或,在数据分析过程中得到满足第二预设条件的数据分析结果的工作。Optionally, the work that meets the preset condition includes: obtaining a data collection result that satisfies the first preset condition in the data collection process; and/or obtaining the second preset condition in the data analysis process. The work of the data analysis results.
可选的,所述区块链节点服务装置,还包括:第一请求响应模块,用于获取用户注册请求,并为相应用户分配唯一的用户账号;第二请求响应模块,用于在所述用户账号处于登录状态下,获取与所述用户账号对应的多个硬件设备的登记请求,并为不同的硬件设备分配不同的设备标识;信息记录模块,用于记录所述用户账号以及相应的所述多个硬件设备的设备标识。Optionally, the blockchain node service device further includes: a first request response module, configured to acquire a user registration request, and assign a unique user account to the corresponding user; and a second request response module, configured to The user account is in the login state, and the registration request of the plurality of hardware devices corresponding to the user account is obtained, and different device identifiers are assigned to different hardware devices; the information recording module is configured to record the user account and the corresponding office. A device identifier of a plurality of hardware devices.
可选的,所述区块链节点服务装置,还包括:工作量统计模块,用于统计与同一所述用户账号对应的所有所述硬件设备在预设时间周期内提交的工作量的总和;提示模块,用于判断所述总和是否小于预设总和阈值,如果是,则触发相应的提示信息,以提示相应用户采取措施提升积分获取效率。Optionally, the blockchain node service device further includes: a workload statistics module, configured to collect a sum of workloads submitted by all the hardware devices corresponding to the same user account in a preset time period; The prompting module is configured to determine whether the sum is less than a preset sum threshold, and if yes, trigger corresponding prompt information to prompt the corresponding user to take measures to improve the point acquisition efficiency.
第四方面,本申请公开了一种挖矿装置,应用于硬件设备,包括:共识算法获取模块,用于获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法;工作量提交模块,用于基于所述共识算法在完成相应的满足预设条件的工作后获取相应的记账权,然后向所述区块链节点服务器提交相应的工作量;其中,所述区块链节点服务器在获取到所述硬件设备提交的工作量后,根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分;积分获取模块,用于获取所述区块链节点服务器转移的与提交的工作量对应的积分;其中,所述区块链节点服务器在将该积分转移至所述硬件设备后进行相应的登记和全网广播。In a fourth aspect, the present application discloses a mining device, which is applied to a hardware device, and includes: a consensus algorithm obtaining module, configured to acquire a corresponding consensus algorithm allocated by the block chain node server according to the working type of the hardware device; And a quantity submitting module, configured to acquire a corresponding billing right after completing the corresponding work satisfying the preset condition, and then submit a corresponding workload to the block chain node server; wherein the block After obtaining the workload submitted by the hardware device, the chain node server determines, according to a preset credit reward consensus corresponding to the type of the workload, an integral corresponding to the workload submitted by the hardware device; and an integral acquisition module, configured to: Acquiring the points corresponding to the submitted workload transferred by the blockchain node server; wherein the block chain node server performs corresponding registration and network-wide broadcasting after transferring the points to the hardware device.
可选的,所述挖矿装置,还包括:第一工作类型选择模块,用于在所述共识算法获取模块获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,从所述硬件设备能够处理的所有类型的工作中选择满足人工输入的筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。Optionally, the mining device further includes: a first work type selection module, configured to: before the consensus algorithm acquisition module acquires a corresponding consensus algorithm allocated by the block chain node server according to the work type of the hardware device Selecting a work type that satisfies the manually input filter condition from all types of work that the hardware device can handle, and sends the filtered work type to the block chain node server.
可选的,所述挖矿装置,还包括:第二工作类型选择模块,用于在所述共识算法获取模块获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,从所述硬件设备能够处理的所有类型的工作中选择满足系统预设筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。Optionally, the mining device further includes: a second work type selection module, configured to: before the consensus algorithm acquisition module acquires a corresponding consensus algorithm allocated by the block chain node server according to the work type of the hardware device Selecting a work type that satisfies the system preset filter condition from all types of work that the hardware device can handle, and sends the filtered work type to the block chain node server.
第五方面,本申请公开了一种区块链节点服务器,包括处理器和存储器;其中,所述处理器执行所述存储器中保存的计算机程序时实现前述公开的区块链节点服务方法。In a fifth aspect, the present application discloses a blockchain node server including a processor and a memory; wherein the processor implements the blockchain node service method disclosed above when executing the computer program stored in the memory.
第六方面,本申请公开了一种硬件设备,包括处理器和存储器;其中,所述处理器执行所述存储器中保存的计算机程序时实现前述公开的挖矿方法。In a sixth aspect, the present application discloses a hardware device including a processor and a memory; wherein the aforementioned mining method is implemented when the processor executes a computer program stored in the memory.
可选的,所述硬件设备包括:工作类型为采集车辆状态数据的OBD盒子;和/或,工作类型为对车辆状态数据进行分析的第一车载设备;和/或,工作类型为采集车辆交易消费记录的计价器;和/或,工作类型为对车辆交易消费记录进行分析的第二车载设备;和/或,工作类型为获取车辆诊断报告的手持移动终端。Optionally, the hardware device includes: an OBD box whose work type is collecting vehicle state data; and/or a first in-vehicle device whose work type is analysis of vehicle state data; and/or, the work type is collecting vehicle transactions. a meter for the consumption record; and/or a second in-vehicle device that analyzes the vehicle transaction consumption record; and/or a handheld mobile terminal that operates in a vehicle diagnostic report.
第七方面,本申请公开了一种挖矿系统,包括如前述公开的区块链节点服务器以及多个工作类型不同的如前述公开的硬件设备。In a seventh aspect, the present application discloses a mining system comprising a blockchain node server as disclosed above and a plurality of hardware devices as disclosed above having different types of work.
第八方面,本申请公开了一种计算机可读存储介质,用于存储区块链节点服务程序;其中,所述区块链节点服务程序被处理器执行时实现前述公开的区块链节点服务方法。In an eighth aspect, the present application discloses a computer readable storage medium for storing a blockchain node service program; wherein the blockchain node service program is executed by a processor to implement the foregoing disclosed blockchain node service method.
第九方面,本申请公开了一种计算机可读存储介质,用于存储挖矿程序;其中,所述挖矿程序被处理器执行时实现前述公开的挖矿方法。In a ninth aspect, the present application discloses a computer readable storage medium for storing a mining program; wherein the mining program is executed by a processor to implement the mining method disclosed above.
可见,本申请根据硬件设备的工作类型的不同,为不同硬件设备分配不同的共识算法,这样方式使得不同工作类型的硬件设备可以基于自身的工作特点参与到挖矿进程当中,以此来获得相应的积分,从而避免了现有技术中由于只能通过单一硬件才能进行挖矿而导致的挖矿效率较低的问题。也即,本申请中参与挖矿的硬件设备的种类可以有多种,不局限在某种特定的硬件设备上,这样一个用户便可以同时利用多种硬件设备参与挖矿。对于个人用户来说,由于能够参与挖矿的硬件设备的种类变多,使得该用户能够整合更多的计算资源来参与挖矿,提升了挖矿效率,由此能够获得更多的积分奖励;对于区块链网络来说,由于打破了原有只允许单一硬件设备参与挖矿的现状,使得用户能够使用不同工作类型的硬件设备参与挖矿以获取积分奖励,由此可以吸引全世界更多的计算资源参与挖矿,极大地促进了本区块链网络的快速发展。It can be seen that the present application allocates different consensus algorithms for different hardware devices according to different types of hardware devices, so that hardware devices of different working types can participate in the mining process based on their own working characteristics, thereby obtaining corresponding The integration of the points avoids the problem of low mining efficiency due to mining in a single hardware. That is to say, the types of hardware devices involved in mining in the present application can be various, and are not limited to a specific hardware device, so that one user can simultaneously participate in mining using a plurality of hardware devices. For individual users, due to the variety of hardware devices that can participate in mining, the user can integrate more computing resources to participate in mining, improve mining efficiency, and thus obtain more points rewards; For the blockchain network, because it breaks the current situation that only allows a single hardware device to participate in mining, the user can use different types of hardware devices to participate in mining to obtain points rewards, thereby attracting more worldwide The computational resources involved in mining have greatly promoted the rapid development of this blockchain network.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is an embodiment of the present application, and those skilled in the art can obtain other drawings according to the provided drawings without any creative work.
图1为本申请实施例公开的一种区块链节点服务方法流程图;1 is a flowchart of a method for serving a blockchain node according to an embodiment of the present application;
图2为本申请实施例公开的一种具体的区块链节点服务方法流程图;2 is a flowchart of a specific blockchain node service method disclosed in an embodiment of the present application;
图3为本申请实施例公开的一种具体的区块链节点服务方法流程图;FIG. 3 is a flowchart of a specific method for serving a blockchain node according to an embodiment of the present application;
图4为本申请实施例公开的一种具体的区块链节点服务方法流程图;4 is a flowchart of a specific blockchain node service method disclosed in an embodiment of the present application;
图5为本申请实施例公开的一种挖矿方法流程图;FIG. 5 is a flow chart of a mining method disclosed in an embodiment of the present application; FIG.
图6为本申请实施例公开的一种区块链节点服务装置结构示意图;FIG. 6 is a schematic structural diagram of a blockchain node service device according to an embodiment of the present application;
图7为本申请实施例公开的一种挖矿装置结构示意图;7 is a schematic structural view of a mining device disclosed in an embodiment of the present application;
图8为本申请实施例公开的一种区块链节点服务器结构示意图;FIG. 8 is a schematic structural diagram of a blockchain node server according to an embodiment of the present disclosure;
图9为本申请实施例公开的一种硬件设备结构示意图。FIG. 9 is a schematic structural diagram of a hardware device according to an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
本申请实施例公开了一种区块链节点服务方法,应用于区块链节点服务器,其中,本实施例中的区块链节点服务器具体可以是区块链网络中计算处理能力较强的区块链节点设备,能够对加入区块链网络中的硬件设备所发起的请求进行响应,并且能够对硬件设备进行积分奖励。参见图1所示,该方法包括:The embodiment of the present application discloses a blockchain node service method, which is applied to a blockchain node server, wherein the blockchain node server in this embodiment may specifically be a zone with strong computing and processing capability in the blockchain network. The blockchain node device is capable of responding to requests initiated by hardware devices that are added to the blockchain network and is capable of rewarding the hardware devices. Referring to Figure 1, the method includes:
步骤S11:为工作类型不同的硬件设备分配不同的共识算法,以便所述硬件设备在完成相应类型的满足预设条件的工作后获得相应的记账权。Step S11: Allocating different consensus algorithms for hardware devices with different working types, so that the hardware device obtains corresponding billing rights after completing corresponding work of the corresponding type.
本实施例中,参与挖矿的硬件设备具体是工作类型不同的多种硬件设备。可以理解的是,本实施例中硬件设备的工作类型是指由区块链节点服务器确认后的工作类型。由于对于同一种硬件设备来说,其能够处理的工作的类型通常不仅仅只局限在一种工作类型,通常可以处理多种类型的工作。为了避免产生混乱,本实施例可以通过人工选择方式或系统自动选择方式,来从一种硬件设备能够处理的所有类型的工作当中选择任意一种或几种的工作类型作为最终可通过区块链节点服务器确认的工作类型。例如,本实施例可以由系统自动从一种硬件设备能够处理的所有类型的工作当中选择消耗最多计算资源的工作类型作为最终可通过区块链节点服务器确认的工作类型,又或者可以通过人工选择方式从一种硬件设备能够处理的所有类型的工作当中选择满足用户特定意愿的若干种工作类型作为最终可通过区块链节点服务器确认的工作类型。In this embodiment, the hardware devices involved in mining are specifically a plurality of hardware devices with different working types. It can be understood that the working type of the hardware device in this embodiment refers to the type of work confirmed by the blockchain node server. Since the type of work that can be handled by the same hardware device is usually not limited to only one type of work, it can usually handle multiple types of work. In order to avoid confusion, the embodiment may select any one or several types of work from all types of work that can be processed by a hardware device by using a manual selection method or a system automatic selection method as the final passable blockchain. The type of work confirmed by the node server. For example, the embodiment may automatically select, by the system, the type of work that consumes the most computing resources from among all types of work that can be processed by one hardware device as the type of work that can be finally confirmed by the blockchain node server, or may be manually selected. The method selects several types of work that satisfy the user's specific wishes from among all types of work that a hardware device can handle as the type of work that can ultimately be confirmed by the blockchain node server.
需要指出的是,本实施例具体可以根据区块链网络所对应的行业属性,对本实施例能够参与挖矿的多种硬件设备进行限制。本实施例中,假设区块链网络是对任意细分行业均开放的区块链网络,则本实施例中能够参与挖矿的多种硬件设备可以来自不同的细分行业,也即不受细分行业的限制;假设本实施例中的区块链网络是只针对单一细分行业的区块链网络,则本实施例中能够参与挖矿的多种硬件设备则是来自该细分行业中的多种硬件设备。It should be noted that the embodiment may specifically limit various hardware devices that can participate in mining according to the industry attributes corresponding to the blockchain network. In this embodiment, if the blockchain network is a blockchain network that is open to any sub-sector, the multiple hardware devices that can participate in mining in this embodiment may be from different sub-sectors, that is, not Restrictions of the industry; assuming that the blockchain network in this embodiment is a blockchain network that is only for a single sub-sector, the various hardware devices that can participate in mining in this embodiment are from the segment. A variety of hardware devices.
例如,对于只针对汽车行业的区块链网络,则本实施例中能够参与挖矿的多种硬件设备具体可以包括工作类型为采集车辆状态数据的OBD盒子、工作类型为对车辆状态数据进行分析的第一车载设备、工作类型为采集车辆交易消费记录的计价器、工作类型为对车辆交易消费记录进行分析的第二车载设备和工作类型为获取车辆诊断报告的手持移动终端等。For example, for a blockchain network that is only for the automotive industry, the various hardware devices that can participate in mining in this embodiment may specifically include an OBD box that collects vehicle state data, and the work type is to analyze vehicle state data. The first in-vehicle device, the work type is a meter for collecting vehicle transaction consumption records, the second type of in-vehicle device for which the work type is the vehicle transaction consumption record, and the handheld mobile terminal for which the work type is the vehicle diagnosis report.
本实施例中,区块链节点服务器为不同工作类型的硬件设备分配不同的共识算法。任一硬件设备在获取到相应的共识算法之后,该共识算法将允许该硬件设备在完成相应类型的并且满足预设条件的工作之后获取记账权。可以理解的是,任一硬件设备在某轮工作过程中获得记账权之后,将拥有把相应的工作量提交到区块链节点服务器的权利,也即拥有将相应工作量打包进区块的权利。In this embodiment, the blockchain node server allocates different consensus algorithms for hardware devices of different working types. After the hardware device obtains the corresponding consensus algorithm, the consensus algorithm will allow the hardware device to obtain the accounting rights after completing the work of the corresponding type and satisfying the preset condition. It can be understood that after any hardware device obtains the accounting right in a certain round of work, it will have the right to submit the corresponding workload to the blockchain node server, that is, to have the corresponding workload packaged into the block. right.
步骤S12:获取所述硬件设备在获得相应的记账权后提交的相应的工作量。Step S12: Acquire a corresponding workload submitted by the hardware device after obtaining the corresponding billing right.
本实施例中,任一硬件设备在某轮工作过程中完成了相应类型的并且满足预设条件的工作之后,将可以获取到相应的记账权,凭借获取到的记账权,该硬件设备能够将本轮工作过程中相应的工作量提交至区块链节点服务器,以便区块链节点服务器根据与获取到的工作量的类型对应的积分奖励共识,奖励与该硬件设备对应的用户账号相应的积分。可以理解的是,本实施例中不同的工作量的类型对应于不同的工作类型。In this embodiment, after any hardware device completes the work of the corresponding type and meets the preset condition in a certain round of work, the corresponding billing right may be obtained, and the hardware device is obtained by virtue of the obtained billing right. The corresponding workload in the current working process can be submitted to the blockchain node server, so that the blockchain node server rewards the user account corresponding to the hardware device according to the point reward consensus corresponding to the type of the acquired workload. Points. It can be understood that the types of different workloads in this embodiment correspond to different types of work.
可以理解的是,对于工作类型为对数据进行分析的硬件设备来说,在获得相应的记账权之后,所提交的工作量具体可以是用于表明该硬件设备的工作付出程度的数据分析结果。对于工作类型为对数据进行采集的硬件设备来说,在获得相应的记账权之后,所提交的工作量具体可以是用于表明该硬件设备的工作付出程度的数据采集结果。It can be understood that, for a hardware device whose work type is data analysis, after obtaining the corresponding billing right, the submitted workload may specifically be a data analysis result indicating the degree of work effort of the hardware device. . For a hardware device whose work type is data collection, after the corresponding billing right is obtained, the submitted workload may specifically be a data collection result indicating the degree of work effort of the hardware device.
步骤S13:根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分,并将该积分转移至与相应的所述硬件设备对应的用户账号,然后进行相应的登记并全网广播。Step S13: determining a point corresponding to the workload submitted by the hardware device according to a preset point reward consensus corresponding to the type of the workload, and transferring the point to a user account corresponding to the corresponding hardware device, and then Carry out corresponding registration and broadcast on the whole network.
可以理解的是,区块链节点服务器中保存有与不同的工作量的类型所对应的不同的预设积分奖励共识。可以理解的是,上述预设积分奖励共识是一种用于针对某种类型的工作量事先约定的如何进行积分奖励的规定。针对不同类型的工作量,相应预设积分奖励共识中所规定的奖励积分会有所差异。通常情况下,如果一种类型的工作量需要消耗较多的计算资源,则相应的奖励积分也会较多,同理,如果一种类型的工作量需要消耗的计算资源较少,则相应的奖励积分也会较少。It can be understood that the block chain node server stores different preset point reward consensus corresponding to different types of workloads. It can be understood that the above-mentioned preset point reward consensus is a rule for how to perform a point reward in advance for a certain type of workload. For different types of workloads, the reward points specified in the corresponding preset rewards consensus will vary. Usually, if a type of workload needs to consume more computing resources, the corresponding reward points will be more. Similarly, if a type of workload needs to consume less computing resources, then the corresponding There will be fewer bonus points.
本实施例中,每个硬件设备均对应于一个用户账号,同一个用户账号可以对应于多个硬件设备,其中,同一个用户账号下的多个硬件设备具体可以包好多种工作类型的硬件设备,也可以均是属于同一种工作类型的多个硬件设 备。可以理解的是,为了让某个硬件设备能够参与挖矿,需要用户在登录到区块链网络之后,向区块链网络登记相应硬件设备的信息,以便该硬件设备获得合法的挖矿权利。In this embodiment, each hardware device corresponds to one user account, and the same user account may correspond to multiple hardware devices, wherein multiple hardware devices under the same user account may specifically package multiple working types of hardware devices. , can also be multiple hardware devices belonging to the same work type. It can be understood that in order for a certain hardware device to participate in mining, the user needs to register the information of the corresponding hardware device with the blockchain network after logging in to the blockchain network, so that the hardware device obtains legal mining rights.
本实施例中,在把相应的积分转移至相应的用户账号之后,需要进行登记并全网广播,以将本次积分奖励事件告知区块链网络中的其他所有节点。In this embodiment, after the corresponding points are transferred to the corresponding user accounts, registration and full network broadcast are required to notify the other points of the blockchain network to all the nodes in the blockchain network.
可见,本申请实施例根据硬件设备的工作类型的不同,为不同硬件设备分配不同的共识算法,这样方式使得不同工作类型的硬件设备可以基于自身的工作特点参与到挖矿进程当中,以此来获得相应的积分,从而避免了现有技术中由于只能通过单一硬件才能进行挖矿而导致的挖矿效率较低的问题。也即,本申请实施例中参与挖矿的硬件设备的种类可以有多种,不局限在某种特定的硬件设备上,这样一个用户便可以同时利用多种硬件设备参与挖矿。对于个人用户来说,由于能够参与挖矿的硬件设备的种类变多,使得该用户能够整合更多的计算资源来参与挖矿,提升了挖矿效率,由此能够获得更多的积分奖励;对于区块链网络来说,由于打破了原有只允许单一硬件设备参与挖矿的现状,使得用户能够使用不同工作类型的硬件设备参与挖矿以获取积分奖励,由此可以吸引全世界更多的计算资源参与挖矿,极大地促进了本区块链网络的快速发展。It can be seen that, according to different working types of hardware devices, the embodiments of the present application allocate different consensus algorithms for different hardware devices, so that hardware devices of different working types can participate in the mining process based on their working characteristics, thereby The corresponding points are obtained, thereby avoiding the problem of low mining efficiency in the prior art due to the fact that mining can only be performed by a single hardware. That is, the types of hardware devices involved in mining in the embodiments of the present application may be various, and are not limited to a specific hardware device, so that one user can simultaneously participate in mining using a plurality of hardware devices. For individual users, due to the variety of hardware devices that can participate in mining, the user can integrate more computing resources to participate in mining, improve mining efficiency, and thus obtain more points rewards; For the blockchain network, because it breaks the current situation that only allows a single hardware device to participate in mining, the user can use different types of hardware devices to participate in mining to obtain points rewards, thereby attracting more worldwide The computational resources involved in mining have greatly promoted the rapid development of this blockchain network.
参见图2所示,本申请实施例公开了一种具体的区块链节点服务方法,包括:As shown in FIG. 2, the embodiment of the present application discloses a specific blockchain node service method, including:
步骤S21:确定所述硬件设备的工作类型,从第一预设映射库中确定出与所述硬件设备的工作类型对应的共识算法。Step S21: Determine a working type of the hardware device, and determine, from the first preset mapping library, a consensus algorithm corresponding to the working type of the hardware device.
其中,所述第一预设映射库用于记录与不同的工作类型所对应的不同的共识算法。The first preset mapping library is used to record different consensus algorithms corresponding to different work types.
本实施例中,在第一预设映射库中记录了与不同工作类型对应的不同的共识算法,当确定出任一硬件设备的工作类型之后,将可以从上述第一预设映射库中查找出相应的共识算法。In this embodiment, different consensus algorithms corresponding to different work types are recorded in the first preset mapping library. After determining the working type of any hardware device, the first preset mapping library may be searched out. Corresponding consensus algorithm.
在一种具体实施方式中,所述确定所述硬件设备的工作类型,具体可以包括:获取所述硬件设备发送的设备类型,从第二预设映射库中确定出与所述设备类型对应的工作类型。其中,所述第二预设映射库用于记录与不同的设备类型所对应的不同的工作类型。In a specific implementation, the determining the working type of the hardware device may include: acquiring a device type sent by the hardware device, and determining, from the second preset mapping library, a device type corresponding to the device type job type. The second preset mapping library is configured to record different work types corresponding to different device types.
可以理解的是,不同设备类型的硬件设备之间,它们各自所擅长的工作类型会有所差异,比如,对于基于CPU(即Central Processing Unit)进行运算的硬件设备、基于GPU(即Graphics Processing Unit)进行运算的硬件设备、基于FPGA(即Field-Programmable Gate Array)进行运算的硬件设备以及基于ASIC(即Application Specific Integrated Circuits)进行运算的硬件设备,它们各自所擅长的工作类型是不尽相同的。本实施例中,可以预先根据不同设备类型的硬件设备所擅长的工作类型,创建上述第二预设映射库,这样可以使得不同设备类型的硬件设备能够在完成其所擅长的工作的过程中获得奖励积分。It can be understood that different types of hardware devices of different device types may have different types of work, for example, hardware devices based on CPU (ie, Central Processing Unit), and GPU-based (ie, Graphics Processing Unit). Hardware devices for calculation, hardware devices based on FPGA (Field-Programmable Gate Array), and hardware devices based on ASIC (Application Specific Integrated Circuits), each of which has a different type of work. . In this embodiment, the foregoing second preset mapping library may be created according to the working type that the hardware devices of different device types are good at, so that the hardware devices of different device types can be obtained in the process of completing the work that they are good at. Reward points.
在另一种具体实施方式中,所述确定所述硬件设备的工作类型,具体可以包括:通过直接获取所述硬件设备发 送的工作类型的方式,确定所述硬件设备的工作类型。In another specific implementation, the determining the working type of the hardware device may include: determining a working type of the hardware device by directly acquiring a working type sent by the hardware device.
也即,本实施例中的区块链节点服务器可以通过直接获取硬件设备发送工作类型的方式来确定该硬件设备的工作类型。可以理解的是,硬件设备在发送工作类型之前,需要先确定出相应的工作类型。具体的,本实施例中硬件设备具体可以从自身能够处理的所有类型的工作中选择满足人工输入的筛选条件的工作类型,然后将选择出来的工作类型发送至区块链节点服务器;当然,本实施例中硬件设备具体也可以从自身能够处理的所有类型的工作中选择满足系统预设筛选条件的工作类型,然后将选择出来的工作类型发送至在区块链节点服务器。That is, the blockchain node server in this embodiment can determine the working type of the hardware device by directly acquiring the manner in which the hardware device sends the work type. It can be understood that the hardware device needs to determine the corresponding work type before sending the work type. Specifically, the hardware device in this embodiment may specifically select a work type that satisfies the manual input screening condition from all types of work that can be processed by itself, and then send the selected work type to the blockchain node server; In the embodiment, the hardware device may specifically select a work type that satisfies the system preset filter condition from all types of work that can be processed by itself, and then send the selected work type to the blockchain node server.
步骤S22:将确定出的共识算法分配给相应的硬件设备,以便所述硬件设备在完成相应类型的满足预设条件的工作后获得相应的记账权。Step S22: Allocating the determined consensus algorithm to the corresponding hardware device, so that the hardware device obtains corresponding billing rights after completing the corresponding type of work satisfying the preset condition.
本实施例中,所述满足预设条件的工作,具体可以包括:在数据采集过程中得到满足第一预设条件的数据采集结果的工作;和/或,在数据分析过程中得到满足第二预设条件的数据分析结果的工作。In this embodiment, the working that meets the preset condition may include: obtaining a data collection result that satisfies the first preset condition in the data collection process; and/or obtaining the second in the data analysis process. Pre-condition data analysis results work.
其中,上述满足第一预设条件的数据采集结果具体可以是指采集到预设类型数据的数据采集结果,或单位时间内数据采集量大于预设采集量阈值的数据采集采集结果,或单位时间内数据采集量在所有同工作类型的硬件设备当中是最多的数据采集结果。The data collection result that satisfies the first preset condition may specifically be the data collection result of the preset type data, or the data collection and collection result of the data collection amount per unit time greater than the preset collection quantity threshold, or unit time The amount of data collected is the most data acquisition result among all hardware devices of the same working type.
上述满足第二预设条件的数据分析结果具体可以是指单位时间内数据分析精度在所有同工作类型的硬件设备当中是最高的数据分析结果,或单位时间内数据分析结果的数据总量在所有同工作类型的硬件设备当中是最多的数据分析结果。The data analysis result satisfying the second preset condition may specifically mean that the data analysis accuracy per unit time is the highest data analysis result among all the hardware devices of the same working type, or the total amount of data of the data analysis result per unit time is at all. Among the hardware types of work types, the most data analysis results.
步骤S23:获取所述硬件设备在获得相应的记账权后提交的相应的工作量。Step S23: Acquire a corresponding workload submitted by the hardware device after obtaining the corresponding billing right.
步骤S24:根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分,并将该积分转移至与相应的所述硬件设备对应的用户账号,然后进行相应的登记并全网广播。Step S24: determining a point corresponding to the workload submitted by the hardware device according to a preset point reward consensus corresponding to the type of the workload, and transferring the point to a user account corresponding to the corresponding hardware device, and then Carry out corresponding registration and broadcast on the whole network.
关于上述步骤S23和S24的具体内容可以参考前述实施例中公开的相应内容,在此不再进行赘述。For the specific content of the above steps S23 and S24, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.
参见图3所示,本申请实施例公开了一种具体的区块链节点服务方法,包括:As shown in FIG. 3, the embodiment of the present application discloses a specific blockchain node service method, including:
步骤S31:将第三预设映射库发送至所述硬件设备,以便所述硬件设备根据自身的工作类型从所述第三预设映射库中匹配相应的共识算法。Step S31: Send the third preset mapping library to the hardware device, so that the hardware device matches the corresponding consensus algorithm from the third preset mapping library according to its own working type.
其中,所述第三预设映射库用于记录与不同的工作类型所对应的不同的共识算法。The third preset mapping library is used to record different consensus algorithms corresponding to different work types.
也即,本实施例中的区块链节点服务器预先在上述第三预设映射库中记录了与不同的工作类型对应的不同的共识算法。然后将上述第三预设映射库发送给硬件设备,这样硬件设备便可根据自身的工作类型从上述第三预设映射库中匹配出相应的共识算法,基于该匹配到的共识算法,硬件设备能够在完成相应类型的并且满足预设条件的工作后获得相应的记账权。That is, the blockchain node server in this embodiment records different consensus algorithms corresponding to different work types in the third preset mapping library in advance. And then sending the third preset mapping library to the hardware device, so that the hardware device can match the corresponding consensus algorithm from the third preset mapping library according to the working type of the device, based on the matched consensus algorithm, the hardware device It is possible to obtain the corresponding billing rights after completing the work of the corresponding type and satisfying the preset conditions.
步骤S32:获取所述硬件设备在获得相应的记账权后提交的相应的工作量。Step S32: Acquire a corresponding workload submitted by the hardware device after obtaining the corresponding billing right.
步骤S33:根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分,并将该积分转移至与相应的所述硬件设备对应的用户账号,然后进行相应的登记并全网广播。Step S33: determining a point corresponding to the workload submitted by the hardware device according to a preset point reward consensus corresponding to the type of the workload, and transferring the point to a user account corresponding to the corresponding hardware device, and then Carry out corresponding registration and broadcast on the whole network.
关于上述步骤S32和S33的具体内容可以参考前述实施例中公开的相应内容,在此不再进行赘述。For the specific content of the above steps S32 and S33, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.
参见图4所示,本申请实施例公开了一种具体的区块链节点服务方法,包括:Referring to FIG. 4, an embodiment of the present application discloses a specific blockchain node service method, including:
步骤S41:获取用户注册请求,并为相应用户分配唯一的用户账号。Step S41: Acquire a user registration request, and assign a unique user account to the corresponding user.
可以理解的是,本实施例中用户可以通过自己拥有的任一硬件设备向区块链节点服务器发送用户注册请求。区块链节点服务器在获取到用户注册请求之后,判断该用户注册请求是否为合法的用户注册请求,如果是,则为该用户分配唯一的用户账号,如果否,则向发送该用户注册请求的硬件设备返回相应的提示信息,以提示用户当前用户注册请求所存在的问题,便于用户重新提交修正后的用户注册请求。It can be understood that in this embodiment, the user can send a user registration request to the blockchain node server through any hardware device owned by the user. After obtaining the user registration request, the blockchain node server determines whether the user registration request is a valid user registration request, and if so, assigns the user a unique user account, and if not, sends the user registration request to the user. The hardware device returns a corresponding prompt message to prompt the user to have a problem with the current user registration request, so that the user can resubmit the corrected user registration request.
步骤S42:在所述用户账号处于登录状态下,获取与所述用户账号对应的多个硬件设备的登记请求,并为不同的硬件设备分配不同的设备标识。In step S42, when the user account is in the login state, the registration request of the plurality of hardware devices corresponding to the user account is obtained, and different device identifiers are assigned to different hardware devices.
本实施例中,具体可以让用户分别在每台硬件设备登录相应的用户账号,接着每台硬件设备分别向区块链节点服务器发起相应的登记请求。为了加快硬件设备的等级速度,本实施例也可以在用户在任一台硬件设备上登录相应的用户账号之后,通过这台硬件设备将该用户账号名下的所有硬件设备的登记请求发送至区块链节点服务器。可以理解的是,每份登记请求中均包含相应硬件设备的设备通信地址。In this embodiment, the user may separately log in to the corresponding user account in each hardware device, and then each hardware device initiates a corresponding registration request to the blockchain node server. In order to speed up the hierarchical speed of the hardware device, in this embodiment, after the user logs in the corresponding user account on any hardware device, the registration request of all the hardware devices under the user account name is sent to the block through the hardware device. Chain node server. It can be understood that the device communication address of the corresponding hardware device is included in each registration request.
步骤S43:记录所述用户账号以及相应的所述多个硬件设备的设备标识,得到第四预设映射库。Step S43: Record the user account and the corresponding device identifiers of the plurality of hardware devices to obtain a fourth preset mapping library.
本实施例中,在用户注册和硬件设备登记完成之后,区块链节点服务器将会在上述第四预设映射库中记录用户账号以及与该用户账号对应的多个硬件设备的设备标识。In this embodiment, after the user registration and the hardware device registration are completed, the blockchain node server records the user account and the device identifiers of the plurality of hardware devices corresponding to the user account in the fourth preset mapping library.
步骤S44:为工作类型不同的硬件设备分配不同的共识算法,以便所述硬件设备在完成相应类型的满足预设条件的工作后获得相应的记账权。Step S44: Allocating different consensus algorithms for hardware devices with different working types, so that the hardware device obtains corresponding billing rights after completing corresponding work of the corresponding type.
步骤S45:获取所述硬件设备在获得相应的记账权后提交的相应的工作量。Step S45: Acquire a corresponding workload submitted by the hardware device after obtaining the corresponding billing right.
上述步骤S44和S45的具体过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For the specific processes of the foregoing steps S44 and S45, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.
步骤S46:根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分,以及利用所述第四预设映射库确定与所述硬件设备的设备标识对应的用户账号,并将该积分转移至该用户账号,然后进行相应的登记并全网广播。Step S46: determining, according to a preset point reward consensus corresponding to the type of the workload, a score corresponding to the workload submitted by the hardware device, and determining, by using the fourth preset mapping library, a device identifier of the hardware device. The corresponding user account is transferred to the user account, and then registered and broadcasted throughout the network.
进一步的,为了吸引更多的计算资源加入到挖矿过程,本实施例中的区块链节点服务方法还包括:Further, in order to attract more computing resources to the mining process, the blockchain node service method in this embodiment further includes:
统计与同一所述用户账号对应的所有所述硬件设备在预设时间周期内提交的工作量的总和,判断所述总和是否小于预设总和阈值,如果是,则触发相应的提示信息,以提示相应用户采取措施提升积分获取效率。例如,可以提示用户将自身账号名下的多种硬件设备加入矿池,以便与其他用户账号名下的多种硬件设备一起共同挖矿并按比例获取相应积分,或者提示用户借助云算力来进行挖矿,以提高积分获取效率。Counting, by the sum of the workloads submitted by all the hardware devices corresponding to the same user account in a preset time period, determining whether the sum is less than a preset total threshold, and if so, triggering corresponding prompt information to prompt The corresponding user takes measures to improve the efficiency of the points. For example, the user may be prompted to add various hardware devices under the account name to the mining pool, so as to jointly mine with various hardware devices under other user account names and obtain corresponding points in proportion, or prompt the user to use cloud computing power to Mining is carried out to improve the efficiency of point acquisition.
下面以汽车行业的区块链网络为例,对本申请中的区块链节点服务方法进行具体说明。The following takes the blockchain network of the automobile industry as an example to specifically describe the blockchain node service method in this application.
首先,区块链节点服务器接收用户的注册请求,并为该用户分配唯一的用户账号。First, the blockchain node server receives the user's registration request and assigns the user a unique user account.
接着,在检测到用户登录上述用户账号后,接收用户的多种硬件设备的登记请求,并为每一个硬件设备分配一个唯一的设备标识。同时将用户账号与多个硬件设备的设备标识绑定存储。例如,当车主登记成为区块链的一个用户后,车主可以将自己的车辆的车载设备、OBD盒子、车主的手持移动终端如手机等登记在区块链中。Then, after detecting that the user logs in to the user account, receiving a registration request of multiple hardware devices of the user, and assigning a unique device identifier to each hardware device. At the same time, the user account is bound to the device identifier of multiple hardware devices for storage. For example, when the owner registers as a user of the blockchain, the owner can register the in-vehicle device of his own vehicle, the OBD box, the owner's handheld mobile terminal such as a mobile phone, etc. in the blockchain.
然后,区块链节点服务器基于积分(虚拟货币)发行规则,并根据预置的硬件设备与共识算法之间的匹配表为硬件设备分配对应的共识算法。其中,该硬件设备与共识算法之间的匹配表可以基于硬件设备的工作类型来进行灵活设置,由于硬件设备的工作类型反映了硬件设备对交易的不同处理能力,所以本实施例中上述匹配表具体可以根据硬件设备对交易的不同处理功能来进行灵活设置。Then, the blockchain node server is based on the integration (virtual currency) issuance rule, and allocates a corresponding consensus algorithm to the hardware device according to the matching table between the preset hardware device and the consensus algorithm. The matching table between the hardware device and the consensus algorithm may be flexibly set based on the working type of the hardware device. The working table of the hardware device reflects the different processing capabilities of the hardware device for the transaction. Specifically, the hardware device can flexibly set different processing functions of the transaction.
例如,车载设备的工作类型是分析各种车辆状态数据和汽车交易消费记录,得到相应的数据分析结果,则车载设备对交易的处理功能为将上述数据分析结果进行打包,如果上述数据分析结果满足相应的预设条件,上述车载设备将具备把上述数据分析结果打包进区块的记账权,进而获得积分。For example, the working type of the in-vehicle device is to analyze various vehicle state data and automobile transaction consumption records, and obtain corresponding data analysis results, and the in-vehicle device processing function for the transaction is to package the data analysis result, if the data analysis result is satisfied. According to the corresponding preset condition, the above-mentioned in-vehicle device will have the billing right to pack the data analysis result into the block, and then obtain the score.
又比如,OBD盒子的工作类型具体是采集各种车辆状态数据,则OBD盒子对交易的处理功能为将符合汽车区块链要求的数据采集结果进行打包,也即,本实施例可以将OBD盒子对应的共识算法设定为基于数据采集结果的共识算法,在数据采集结果满足相应的预设条件时,上述OBD盒子将具备把上述数据采集结果打包进区块的记账权,例如,如果一个OBD盒子单位时间内采集到的符合汽车区块链要求的车辆状态数据的数据总量在所有OBD盒子当中是最多的情况下,该OBD盒子将具备把自身采集到的数据打包进区块的权利,进而获得积分。For example, the working type of the OBD box is specifically collecting various vehicle state data, and the processing function of the OBD box for the transaction is to package the data collection result that meets the requirements of the automobile blockchain, that is, the OBD box can be used in this embodiment. The corresponding consensus algorithm is set as a consensus algorithm based on the data collection result. When the data collection result satisfies the corresponding preset condition, the OBD box will have the accounting right to package the data collection result into the block, for example, if one In the case that the total amount of data of the vehicle status data collected by the OBD box in accordance with the requirements of the car blockchain is the largest among all OBD boxes, the OBD box will have the right to package the data collected by itself into the block. And get points.
再比如,车主的手持移动终端的工作类型具体是获取诊断报告,则车主手持移动终端对交易的处理功能为将符合该汽车区块链要求的诊断报告进行打包,也即,本实施例可以将车主手持移动终端对应的共识算法设定为基于车主手持移动终端获取到的诊断报告的共识算法,在诊断报告获取结果满足相应的预设条件时,上述车主手持移动终端将具备把上述获取到的诊断报告打包进区块的记账权,例如,如果一台车主手持移动终端单位时间内获取到的符合汽车区块链要求的诊断报告的数据总量在所有车主手持移动终端当中是最多的情况下,该车主手持移动终端将具备把自身获取到的诊断报告打包进区块的权利,进而获得积分。For example, the working type of the handheld mobile terminal of the vehicle owner is specifically to obtain a diagnosis report, and the processing function of the mobile terminal of the vehicle owner for the transaction is to package the diagnostic report that meets the requirements of the automobile blockchain, that is, the embodiment can The consensus algorithm corresponding to the mobile terminal of the vehicle owner is set as a consensus algorithm based on the diagnosis report obtained by the owner's handheld mobile terminal. When the diagnosis report acquisition result satisfies the corresponding preset condition, the vehicle owner handheld mobile terminal will have the obtained above. The diagnostic report is packaged into the billing rights of the block. For example, if the total amount of data of a diagnostic report that meets the requirements of the car blockchain acquired by a vehicle owner's handheld mobile terminal per unit time is the most common among all the host mobile terminals. Next, the owner-held mobile terminal will have the right to package the diagnostic report obtained by itself into the block, and then obtain the points.
进一步的,当获取到各硬件设备提交的工作量之后,区块链节点服务器按照预先达成的积分奖励共识,为各个 硬件设备分配相应的积分(虚拟货币),并将实时积分(虚拟货币)转移至硬件设备绑定的用户账号,然后进行登记并全网广播。Further, after obtaining the workload submitted by each hardware device, the blockchain node server allocates corresponding points (virtual currency) for each hardware device according to the pre-achieved point reward consensus, and transfers the real-time points (virtual currency). The user account bound to the hardware device is then registered and broadcasted throughout the network.
进一步的,参见图5所示,本申请实施例还公开了一种挖矿方法,应用于硬件设备,包括:Further, referring to FIG. 5, the embodiment of the present application further discloses a mining method applied to hardware devices, including:
步骤S51:获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法;Step S51: Acquire a corresponding consensus algorithm allocated by the blockchain node server according to the working type of the hardware device;
步骤S52:基于所述共识算法在完成相应的满足预设条件的工作后获取相应的记账权,然后向所述区块链节点服务器提交相应的工作量;其中,所述区块链节点服务器在获取到所述硬件设备提交的工作量后,根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分;Step S52: Acquire a corresponding billing right after completing the corresponding work satisfying the preset condition based on the consensus algorithm, and then submit a corresponding workload to the blockchain node server; wherein the block chain node server After obtaining the workload submitted by the hardware device, determining a score corresponding to the workload submitted by the hardware device according to a preset credit reward consensus corresponding to the type of the workload;
步骤S53:获取所述区块链节点服务器转移的与提交的工作量对应的积分;其中,所述区块链节点服务器在将该积分转移至所述硬件设备后进行相应的登记和全网广播。Step S53: Acquire the points corresponding to the submitted workload transferred by the blockchain node server; wherein the block chain node server performs corresponding registration and network broadcast after transferring the points to the hardware device. .
在一种具体实施方式中,所述获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,还包括:In a specific implementation, before the acquiring the consensus algorithm that is allocated by the blockchain node server according to the working type of the hardware device, the method further includes:
从所述硬件设备能够处理的所有类型的工作中选择满足人工输入的筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。A work type that satisfies the manually input filter condition is selected from all types of work that the hardware device can handle, and the filtered work type is sent to the block chain node server.
在另一种具体实施方式张总,所述获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,还包括:In another specific implementation manner, before the obtaining the corresponding consensus algorithm that is allocated by the block chain node server according to the working type of the hardware device, the method further includes:
从所述硬件设备能够处理的所有类型的工作中选择满足系统预设筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。A work type that satisfies a system preset filter condition is selected from all types of work that the hardware device can handle, and the filtered work type is sent to the block chain node server.
关于上述各个步骤更加具体的过程可以参考前述实施例公开的相应内容,在此不再进行赘述。For a more specific process of the above various steps, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein again.
相应的,参见图6所示,本申请实施例还公开了一种区块链节点服务装置,应用于区块链节点服务器,包括:Correspondingly, as shown in FIG. 6, the embodiment of the present application further discloses a blockchain node service device, which is applied to a blockchain node server, and includes:
共识算法分配模块11,用于为工作类型不同的硬件设备分配不同的共识算法,以便所述硬件设备在完成相应类型的满足预设条件的工作后获得相应的记账权;The consensus algorithm assigning module 11 is configured to allocate different consensus algorithms for hardware devices with different working types, so that the hardware device obtains corresponding billing rights after completing corresponding work of the corresponding type;
工作量获取模块12,用于获取所述硬件设备在获得相应的记账权后提交的相应的工作量;The workload obtaining module 12 is configured to obtain a corresponding workload submitted by the hardware device after obtaining the corresponding billing right;
积分奖励模块13,用于根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分,并将该积分转移至与相应的所述硬件设备对应的用户账号,然后进行相应的登记并全网广播。The point reward module 13 is configured to determine, according to a preset point reward consensus corresponding to the type of the workload, a score corresponding to the workload submitted by the hardware device, and transfer the point to the corresponding hardware device User account, then register accordingly and broadcast the entire network.
在一种具体实施方式中,所述共识算法分配模块11,具体可以包括:In a specific implementation, the consensus algorithm allocation module 11 may specifically include:
工作类型确定单元,用于确定所述硬件设备的工作类型;a work type determining unit, configured to determine a work type of the hardware device;
共识算法分配单元,用于从第一预设映射库中确定出与所述硬件设备的工作类型对应的共识算法,并将确定出的共识算法分配给相应的硬件设备;a consensus algorithm allocation unit, configured to determine, from the first preset mapping library, a consensus algorithm corresponding to the working type of the hardware device, and allocate the determined consensus algorithm to the corresponding hardware device;
其中,所述第一预设映射库用于记录与不同的工作类型所对应的不同的共识算法。The first preset mapping library is used to record different consensus algorithms corresponding to different work types.
本实施例中,所述工作类型确定单元,具体可以用于获取所述硬件设备发送的设备类型,然后从第二预设映射库中确定出与所述设备类型对应的工作类型;其中,所述第二预设映射库用于记录与不同的设备类型所对应的不同的工作类型。另外,所述工作类型确定单元,具体也可以用于通过直接获取所述硬件设备发送的工作类型的方式,确定所述硬件设备的工作类型。In this embodiment, the work type determining unit may be specifically configured to obtain a device type sent by the hardware device, and then determine, from the second preset mapping library, a work type corresponding to the device type; The second preset mapping library is used to record different work types corresponding to different device types. In addition, the work type determining unit may be specifically configured to determine a working type of the hardware device by directly acquiring a work type sent by the hardware device.
在另一种具体实施方式中,所述共识算法分配模块11,具体可以包括:In another specific implementation, the consensus algorithm allocation module 11 may specifically include:
映射库发送单元,用于将第三预设映射库发送至所述硬件设备,以便所述硬件设备根据自身的工作类型从所述第三预设映射库中匹配相应的共识算法;其中,所述第三预设映射库用于记录与不同的工作类型所对应的不同的共识算法。a mapping library sending unit, configured to send a third preset mapping library to the hardware device, so that the hardware device matches a corresponding consensus algorithm from the third preset mapping library according to its working type; The third preset mapping library is used to record different consensus algorithms corresponding to different work types.
本实施例中,所述满足预设条件的工作,具体可以包括:In this embodiment, the work that meets the preset condition may specifically include:
在数据采集过程中得到满足第一预设条件的数据采集结果的工作;和/或,在数据分析过程中得到满足第二预设条件的数据分析结果的工作。The work of obtaining the data collection result satisfying the first preset condition in the data acquisition process; and/or the work of obtaining the data analysis result satisfying the second preset condition in the data analysis process.
进一步的,本实施例中的区块链节点服务装置,还可以包括:Further, the blockchain node service device in this embodiment may further include:
第一请求响应模块,用于获取用户注册请求,并为相应用户分配唯一的用户账号;a first request response module, configured to obtain a user registration request, and assign a unique user account to the corresponding user;
第二请求响应模块,用于在所述用户账号处于登录状态下,获取与所述用户账号对应的多个硬件设备的登记请求,并为不同的硬件设备分配不同的设备标识;a second request response module, configured to acquire, when the user account is in a login state, a registration request of multiple hardware devices corresponding to the user account, and assign different device identifiers to different hardware devices;
信息记录模块,用于记录所述用户账号以及相应的所述多个硬件设备的设备标识。The information recording module is configured to record the user account and the corresponding device identifier of the plurality of hardware devices.
进一步的,本实施例中的区块链节点服务装置,还可以包括:Further, the blockchain node service device in this embodiment may further include:
工作量统计模块,用于统计与同一所述用户账号对应的所有所述硬件设备在预设时间周期内提交的工作量的总和;a workload statistics module, configured to collect a sum of workloads submitted by all the hardware devices corresponding to the same user account in a preset time period;
提示模块,用于判断所述总和是否小于预设总和阈值,如果是,则触发相应的提示信息,以提示相应用户采取措施提升积分获取效率。The prompting module is configured to determine whether the sum is less than a preset sum threshold, and if yes, trigger corresponding prompt information to prompt the corresponding user to take measures to improve the point acquisition efficiency.
关于上述各个模块更加具体的工作过程可以参考前述实施例公开的相应内容,在此不再进行赘述。For a more specific working process of each module described above, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein.
相应的,参见图7所示,本申请实施例还公开了一种挖矿装置,应用于硬件设备,包括:Correspondingly, as shown in FIG. 7 , the embodiment of the present application further discloses a mining device applied to hardware devices, including:
共识算法获取模块21,用于获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法;The consensus algorithm obtaining module 21 is configured to obtain a corresponding consensus algorithm allocated by the block chain node server according to the working type of the hardware device;
工作量提交模块22,用于基于所述共识算法在完成相应的满足预设条件的工作后获取相应的记账权,然后向所述区块链节点服务器提交相应的工作量;其中,所述区块链节点服务器在获取到所述硬件设备提交的工作量后,根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分;The workload submission module 22 is configured to obtain a corresponding billing right after completing the corresponding work satisfying the preset condition based on the consensus algorithm, and then submit a corresponding workload to the blockchain node server; After obtaining the workload submitted by the hardware device, the blockchain node server determines, according to a preset credit reward consensus corresponding to the type of the workload, a score corresponding to the workload submitted by the hardware device;
积分获取模块23,用于获取所述区块链节点服务器转移的与提交的工作量对应的积分;其中,所述区块链节点服务器在将该积分转移至所述硬件设备后进行相应的登记和全网广播。The point obtaining module 23 is configured to acquire an integral corresponding to the submitted workload transferred by the block chain node server, where the block chain node server performs corresponding registration after transferring the point to the hardware device And the whole network broadcast.
进一步的,本实施例中的挖矿装置,还可以包括:Further, the mining device in this embodiment may further include:
第一工作类型选择模块,用于在所述共识算法获取模块21获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,从所述硬件设备能够处理的所有类型的工作中选择满足人工输入的筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。a first work type selection module, configured to: before the consensus algorithm acquisition module 21 acquires a corresponding consensus algorithm allocated by the block chain node server according to the work type of the hardware device, all types of the types that can be processed by the hardware device At work, a work type that satisfies the manually input filter condition is selected, and the filtered work type is sent to the block chain node server.
进一步的,本实施例中的挖矿装置,还可以包括:Further, the mining device in this embodiment may further include:
第二工作类型选择模块,用于在所述共识算法获取模块21获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,从所述硬件设备能够处理的所有类型的工作中选择满足系统预设筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。a second work type selection module, configured to: before the consensus algorithm acquisition module 21 acquires a corresponding consensus algorithm allocated by the block chain node server according to the work type of the hardware device, all types of the types that can be processed by the hardware device At work, a work type that satisfies the system preset filter condition is selected, and the filtered work type is sent to the block chain node server.
关于上述各个模块更加具体的工作过程可以参考前述实施例公开的相应内容,在此不再进行赘述。For a more specific working process of each module described above, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein.
进一步的,参见图8所示,本申请还公开了一种区块链节点服务器,包括处理器31和存储器32;其中,所述处理器31执行所述存储器32中保存的计算机程序时实现前述公开的区块链节点服务方法。Further, referring to FIG. 8, the present application further discloses a blockchain node server, including a processor 31 and a memory 32. The processor 31 implements the foregoing when executing a computer program saved in the memory 32. Public blockchain node service method.
具体的:所述处理器31执行所述存储器32中保存的计算机程序时可以实现以下步骤:Specifically, when the processor 31 executes the computer program saved in the memory 32, the following steps may be implemented:
为工作类型不同的硬件设备分配不同的共识算法,以便所述硬件设备在完成相应类型的满足预设条件的工作后获得相应的记账权;获取所述硬件设备在获得相应的记账权后提交的相应的工作量;根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分,并将该积分转移至与相应的所述硬件设备对应的用户账号,然后进行相应的登记并全网广播。Assigning different consensus algorithms to the hardware devices of different working types, so that the hardware device obtains corresponding billing rights after completing corresponding work of the corresponding type; obtaining the hardware device after obtaining the corresponding billing rights Corresponding workload submitted; determining a score corresponding to the workload submitted by the hardware device according to a preset credit reward consensus corresponding to the type of the workload, and transferring the credit to the corresponding hardware device User account, then register accordingly and broadcast the entire network.
本实施例中,所述处理器31执行所述存储器32中保存的计算机子程序时,可具体实现以下步骤:确定所述硬件设备的工作类型;从第一预设映射库中确定出与所述硬件设备的工作类型对应的共识算法,并将确定出的共识算法分配给相应的硬件设备;其中,所述第一预设映射库用于记录与不同的工作类型所对应的不同的共识算法。In this embodiment, when the processor 31 executes the computer subroutine saved in the memory 32, the following steps may be specifically implemented: determining a working type of the hardware device; determining a location from the first preset mapping library. a consensus algorithm corresponding to the working type of the hardware device, and the determined consensus algorithm is allocated to the corresponding hardware device; wherein the first preset mapping library is used to record different consensus algorithms corresponding to different work types .
本实施例中,所述处理器31执行所述存储器32中保存的计算机子程序时,可具体实现以下步骤:获取所述硬件设备发送的设备类型;从第二预设映射库中确定出与所述设备类型对应的工作类型;其中,所述第二预设映射库用于记录与不同的设备类型所对应的不同的工作类型。In this embodiment, when the processor 31 executes the computer subroutine saved in the memory 32, the following steps may be specifically implemented: acquiring the device type sent by the hardware device; determining the The work type corresponding to the device type; wherein the second preset mapping library is used to record different work types corresponding to different device types.
本实施例中,所述处理器31执行所述存储器32中保存的计算机子程序时,可具体实现以下步骤:通过直接获取 所述硬件设备发送的工作类型的方式,确定所述硬件设备的工作类型。In this embodiment, when the processor 31 executes the computer subroutine saved in the memory 32, the following steps may be specifically implemented: determining the working of the hardware device by directly acquiring the working type sent by the hardware device. Types of.
本实施例中,所述处理器31执行所述存储器32中保存的计算机子程序时,可具体实现以下步骤:将第三预设映射库发送至所述硬件设备,以便所述硬件设备根据自身的工作类型从所述第三预设映射库中匹配相应的共识算法;其中,所述第三预设映射库用于记录与不同的工作类型所对应的不同的共识算法。In this embodiment, when the processor 31 executes the computer subroutine saved in the memory 32, the following steps may be specifically implemented: sending a third preset mapping library to the hardware device, so that the hardware device according to the The work type matches the corresponding consensus algorithm from the third preset mapping library; wherein the third preset mapping library is used to record different consensus algorithms corresponding to different work types.
本实施例中,所述处理器31执行所述存储器32中保存的计算机子程序时,可进一步实现以下步骤:获取用户注册请求,并为相应用户分配唯一的用户账号;在所述用户账号处于登录状态下,获取与所述用户账号对应的多个硬件设备的登记请求,并为不同的硬件设备分配不同的设备标识;记录所述用户账号以及相应的所述多个硬件设备的设备标识。In this embodiment, when the processor 31 executes the computer subroutine saved in the memory 32, the following steps may be further implemented: acquiring a user registration request, and assigning a unique user account to the corresponding user; In the login state, a registration request of a plurality of hardware devices corresponding to the user account is obtained, and different device identifiers are assigned to different hardware devices; and the user accounts and corresponding device identifiers of the plurality of hardware devices are recorded.
本实施例中,所述处理器31执行所述存储器32中保存的计算机子程序时,可进一步实现以下步骤:统计与同一所述用户账号对应的所有所述硬件设备在预设时间周期内提交的工作量的总和;判断所述总和是否小于预设总和阈值,如果是,则触发相应的提示信息,以提示相应用户采取措施提升积分获取效率。In this embodiment, when the processor 31 executes the computer subroutine saved in the memory 32, the following steps may be further implemented: collecting all the hardware devices corresponding to the same user account and submitting in a preset time period. The sum of the workloads; determining whether the sum is less than a preset sum threshold, and if so, triggering corresponding prompt information to prompt the corresponding user to take measures to improve the point acquisition efficiency.
可以理解的是,上述区块链节点服务器还包括输入接口33、输出接口34、电源35、通信芯片36等。It can be understood that the blockchain node server further includes an input interface 33, an output interface 34, a power source 35, a communication chip 36, and the like.
关于上述区块链节点服务方法的更加具体过程可以参考前述实施例公开的相应内容,在此不再进行赘述。For a more specific process of the above-mentioned blockchain node service method, reference may be made to the corresponding content disclosed in the foregoing embodiment, and details are not described herein again.
进一步的,参见图9所示,本申请还公开了一种硬件设备,包括处理器41和存储器42;其中,所述处理器41执行所述存储器42中保存的计算机程序时实现前述公开的挖矿方法。Further, referring to FIG. 9, the present application further discloses a hardware device, including a processor 41 and a memory 42; wherein the processor 41 implements the foregoing disclosed digging when executing the computer program saved in the memory 42. Mining method.
具体的:所述处理器41执行所述存储器42中保存的计算机程序时可以实现以下步骤:Specifically, when the processor 41 executes the computer program saved in the memory 42, the following steps can be implemented:
获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法;基于所述共识算法在完成相应的满足预设条件的工作后获取相应的记账权,然后向所述区块链节点服务器提交相应的工作量;其中,所述区块链节点服务器在获取到所述硬件设备提交的工作量后,根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分;获取所述区块链节点服务器转移的与提交的工作量对应的积分;其中,所述区块链节点服务器在将该积分转移至所述硬件设备后进行相应的登记和全网广播。Acquiring a corresponding consensus algorithm allocated by the blockchain node server according to the work type of the hardware device; acquiring the corresponding billing right after completing the corresponding work satisfying the preset condition, and then going to the block The chain node server submits a corresponding workload; wherein, after obtaining the workload submitted by the hardware device, the block chain node server determines the hardware with the preset point reward consensus corresponding to the type of the workload The integral corresponding to the workload submitted by the device; obtaining the integral corresponding to the submitted workload transferred by the blockchain node server; wherein the blockchain node server performs corresponding after transferring the credit to the hardware device Registration and full network broadcast.
本实施例中,所述处理器41执行所述存储器42中保存的计算机子程序时,可进一步实现以下步骤:在获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,从所述硬件设备能够处理的所有类型的工作中选择满足人工输入的筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。In this embodiment, when the processor 41 executes the computer subroutine saved in the memory 42, the following steps may be further implemented: acquiring a corresponding consensus algorithm according to the working type of the hardware device in the blockchain node server. Previously, a work type that satisfies the manually entered filter condition is selected from all types of work that the hardware device can handle, and the filtered work type is sent to the block chain node server.
本实施例中,所述处理器41执行所述存储器42中保存的计算机子程序时,可进一步实现以下步骤:在获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,从所述硬件设备能够处理的所有类型的工作中选择满足系统预设筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。In this embodiment, when the processor 41 executes the computer subroutine saved in the memory 42, the following steps may be further implemented: acquiring a corresponding consensus algorithm according to the working type of the hardware device in the blockchain node server. Previously, a work type that satisfies the system preset filter condition is selected from all types of work that the hardware device can handle, and the filtered work type is sent to the block chain node server.
可以理解的是,上述硬件设备还包括输入接口43、输出接口44、电源45、通信芯片46等。It can be understood that the foregoing hardware device further includes an input interface 43, an output interface 44, a power source 45, a communication chip 46, and the like.
需要指出的是,本实施例具体可以根据区块链网络所对应的行业属性,对本实施例能够参与挖矿的硬件设备进行限制。本实施例中,假设区块链网络是对任意细分行业均开放的区块链网络,则本实施例中能够参与挖矿的硬件设备可以来自不同的细分行业,也即不受细分行业的限制;假设本实施例中的区块链网络是只针对单一细分行业的区块链网络,则本实施例中能够参与挖矿的硬件设备则具体可以是来自该细分行业中的硬件设备。It should be noted that, in this embodiment, the hardware device that can participate in the mining in this embodiment may be specifically limited according to the industry attribute corresponding to the blockchain network. In this embodiment, if the blockchain network is a blockchain network that is open to any sub-sector, the hardware devices that can participate in mining in this embodiment may be from different sub-sectors, that is, not subdivided. The limitation of the industry; assuming that the blockchain network in this embodiment is a blockchain network that is only for a single sub-sector, the hardware device that can participate in the mining in this embodiment may specifically be from the segment industry. hardware equipment.
例如,对于只针对汽车行业的区块链网络,则本实施例中的所述硬件设备包括:工作类型为采集车辆状态数据的OBD盒子;和/或,工作类型为对车辆状态数据进行分析的第一车载设备;和/或,工作类型为采集车辆交易消费记录的计价器;和/或,工作类型为对车辆交易消费记录进行分析的第二车载设备;和/或,工作类型为获取车辆诊断报告的手持移动终端。For example, for a blockchain network only for the automotive industry, the hardware device in this embodiment includes: an OBD box whose work type is to collect vehicle state data; and/or, the work type is to analyze vehicle state data. a first in-vehicle device; and/or a work type of a meter that collects a vehicle transaction consumption record; and/or a second in-vehicle device that analyzes a vehicle transaction consumption record; and/or, the work type is an acquisition vehicle Handheld mobile terminal for diagnostic reporting.
关于上述挖矿方法的更加具体过程可以参考前述实施例公开的相应内容,在此不再进行赘述。For a more specific process of the above mining method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein.
进一步的,本申请还公开了一种挖矿系统,包括如前述公开的区块链节点服务器以及多个工作类型不同的如前述公开的硬件设备。Further, the present application also discloses a mining system comprising a blockchain node server as disclosed in the foregoing and a plurality of hardware devices as disclosed in the foregoing.
进一步的,本申请还公开了一种计算机可读存储介质,用于存储区块链节点服务程序;其中,所述区块链节点服务程序被处理器执行时实现如前述公开的区块链节点服务方法。Further, the present application further discloses a computer readable storage medium for storing a blockchain node service program; wherein the blockchain node service program is executed by a processor to implement a blockchain node as disclosed in the foregoing Service method.
关于上述区块链节点服务方法的更加具体过程可以参考前述实施例公开的相应内容,在此不再进行赘述。For a more specific process of the above-mentioned blockchain node service method, reference may be made to the corresponding content disclosed in the foregoing embodiment, and details are not described herein again.
进一步的,本申请还公开了一种计算机可读存储介质,用于存储挖矿程序;其中,所述挖矿程序被处理器执行时实现如前述公开的挖矿方法。Further, the present application also discloses a computer readable storage medium for storing a mining program; wherein the mining program is executed by a processor to implement a mining method as disclosed above.
关于上述挖矿方法的更加具体过程可以参考前述实施例公开的相应内容,在此不再进行赘述。For a more specific process of the above mining method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not described herein.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts of the respective embodiments may be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person skilled in the art will further appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of both, in order to clearly illustrate the hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented directly in hardware, a software module executed by a processor, or a combination of both. The software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities. There is any such actual relationship or order between operations. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
以上对本申请所提供的一种区块链节点服务、挖矿方法、装置、设备、系统及介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The above describes a blockchain node service, mining method, device, device, system and medium provided by the present application. The specific examples are used to explain the principle and implementation manner of the present application. The description of the examples is only for helping to understand the method of the present application and its core ideas; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in specific embodiments and application scopes. The description is not to be construed as limiting the present application.

Claims (19)

  1. 一种区块链节点服务方法,其特征在于,应用于区块链节点服务器,包括:A blockchain node service method, which is characterized by being applied to a blockchain node server, comprising:
    为工作类型不同的硬件设备分配不同的共识算法,以便所述硬件设备在完成相应类型的满足预设条件的工作后获得相应的记账权;Assigning different consensus algorithms to hardware devices of different working types, so that the hardware device obtains corresponding billing rights after completing corresponding work of the corresponding type;
    获取所述硬件设备在获得相应的记账权后提交的相应的工作量;Obtaining a corresponding workload submitted by the hardware device after obtaining corresponding billing rights;
    根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分,并将该积分转移至与相应的所述硬件设备对应的用户账号,然后进行相应的登记并全网广播。Determining a score corresponding to the workload submitted by the hardware device according to a preset credit reward consensus corresponding to the type of the workload, and transferring the credit to a user account corresponding to the corresponding hardware device, and then performing corresponding Register and broadcast on the whole network.
  2. 根据权利要求1所述的区块链节点服务方法,其特征在于,所述为工作类型不同的硬件设备分配不同的共识算法,包括:The blockchain node service method according to claim 1, wherein the hardware devices of different working types are assigned different consensus algorithms, including:
    确定所述硬件设备的工作类型;Determining a type of work of the hardware device;
    从第一预设映射库中确定出与所述硬件设备的工作类型对应的共识算法,并将确定出的共识算法分配给相应的硬件设备;Determining, from the first preset mapping library, a consensus algorithm corresponding to the working type of the hardware device, and assigning the determined consensus algorithm to the corresponding hardware device;
    其中,所述第一预设映射库用于记录与不同的工作类型所对应的不同的共识算法。The first preset mapping library is used to record different consensus algorithms corresponding to different work types.
  3. 根据权利要求2所述的区块链节点服务方法,其特征在于,所述确定所述硬件设备的工作类型,包括:The blockchain node service method according to claim 2, wherein the determining the working type of the hardware device comprises:
    获取所述硬件设备发送的设备类型;Obtaining a device type sent by the hardware device;
    从第二预设映射库中确定出与所述设备类型对应的工作类型;Determining a work type corresponding to the device type from the second preset mapping library;
    其中,所述第二预设映射库用于记录与不同的设备类型所对应的不同的工作类型。The second preset mapping library is configured to record different work types corresponding to different device types.
  4. 根据权利要求2所述的区块链节点服务方法,其特征在于,所述确定所述硬件设备的工作类型,包括:The blockchain node service method according to claim 2, wherein the determining the working type of the hardware device comprises:
    通过直接获取所述硬件设备发送的工作类型的方式,确定所述硬件设备的工作类型。The working type of the hardware device is determined by directly obtaining the type of work sent by the hardware device.
  5. 根据权利要求1所述的区块链节点服务方法,其特征在于,所述为工作类型不同的硬件设备分配不同的共识算法,包括:The blockchain node service method according to claim 1, wherein the hardware devices of different working types are assigned different consensus algorithms, including:
    将第三预设映射库发送至所述硬件设备,以便所述硬件设备根据自身的工作类型从所述第三预设映射库中匹配相应的共识算法;Sending a third preset mapping library to the hardware device, so that the hardware device matches the corresponding consensus algorithm from the third preset mapping library according to its working type;
    其中,所述第三预设映射库用于记录与不同的工作类型所对应的不同的共识算法。The third preset mapping library is used to record different consensus algorithms corresponding to different work types.
  6. 根据权利要求1所述的区块链节点服务方法,其特征在于,所述满足预设条件的工作,包括:The blockchain node service method according to claim 1, wherein the work satisfying the preset condition comprises:
    在数据采集过程中得到满足第一预设条件的数据采集结果的工作;Obtaining the data collection result that satisfies the first preset condition in the data collection process;
    和/或,在数据分析过程中得到满足第二预设条件的数据分析结果的工作。And/or, the work of obtaining the data analysis result satisfying the second preset condition in the data analysis process.
  7. 根据权利要求1至6任一项所述的区块链节点服务方法,其特征在于,还包括:The block chain node service method according to any one of claims 1 to 6, further comprising:
    获取用户注册请求,并为相应用户分配唯一的用户账号;Obtain a user registration request and assign a unique user account to the corresponding user;
    在所述用户账号处于登录状态下,获取与所述用户账号对应的多个硬件设备的登记请求,并为不同的硬件设备分配不同的设备标识;Acquiring a registration request of multiple hardware devices corresponding to the user account, and assigning different device identifiers to different hardware devices, when the user account is in a login state;
    记录所述用户账号以及相应的所述多个硬件设备的设备标识。Recording the user account and the corresponding device identifier of the plurality of hardware devices.
  8. 根据权利要求7所述的区块链节点服务方法,其特征在于,还包括:The blockchain node service method according to claim 7, further comprising:
    统计与同一所述用户账号对应的所有所述硬件设备在预设时间周期内提交的工作量的总和;Counting, by a sum of workloads submitted by all the hardware devices corresponding to the same user account in a preset time period;
    判断所述总和是否小于预设总和阈值,如果是,则触发相应的提示信息,以提示相应用户采取措施提升积分获取效率。Determining whether the sum is less than a preset sum threshold, and if so, triggering corresponding prompt information to prompt the corresponding user to take measures to improve the point acquisition efficiency.
  9. 一种挖矿方法,其特征在于,应用于硬件设备,包括:A mining method, characterized in that it is applied to a hardware device, including:
    获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法;Obtaining a corresponding consensus algorithm allocated by the blockchain node server according to the working type of the hardware device;
    基于所述共识算法在完成相应的满足预设条件的工作后获取相应的记账权,然后向所述区块链节点服务器提交相应的工作量;其中,所述区块链节点服务器在获取到所述硬件设备提交的工作量后,根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分;Obtaining a corresponding billing right after completing the corresponding work satisfying the preset condition, and then submitting a corresponding workload to the blockchain node server; wherein the blockchain node server is obtained After the workload submitted by the hardware device, determining a score corresponding to the workload submitted by the hardware device according to a preset credit reward consensus corresponding to the type of the workload;
    获取所述区块链节点服务器转移的与提交的工作量对应的积分;其中,所述区块链节点服务器在将该积分转移至所述硬件设备后进行相应的登记和全网广播。Acquiring the points corresponding to the submitted workload transferred by the blockchain node server; wherein the block chain node server performs corresponding registration and network-wide broadcasting after transferring the points to the hardware device.
  10. 根据权利要求9所述的挖矿方法,其特征在于,所述获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,还包括:The mining method according to claim 9, wherein before the obtaining the consensus algorithm assigned by the block chain node server according to the working type of the hardware device, the method further includes:
    从所述硬件设备能够处理的所有类型的工作中选择满足人工输入的筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。A work type that satisfies the manually input filter condition is selected from all types of work that the hardware device can handle, and the filtered work type is sent to the block chain node server.
  11. 根据权利要求9所述的挖矿方法,其特征在于,所述获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法之前,还包括:The mining method according to claim 9, wherein before the obtaining the consensus algorithm assigned by the block chain node server according to the working type of the hardware device, the method further includes:
    从所述硬件设备能够处理的所有类型的工作中选择满足系统预设筛选条件的工作类型,并将筛选到的工作类型发送至所述区块链节点服务器。A work type that satisfies a system preset filter condition is selected from all types of work that the hardware device can handle, and the filtered work type is sent to the block chain node server.
  12. 一种区块链节点服务装置,其特征在于,应用于区块链节点服务器,包括:A blockchain node service device, which is characterized by being applied to a blockchain node server, comprising:
    共识算法分配模块,用于为工作类型不同的硬件设备分配不同的共识算法,以便所述硬件设备在完成相应类型的满足预设条件的工作后获得相应的记账权;a consensus algorithm allocation module, configured to allocate different consensus algorithms for hardware devices with different working types, so that the hardware device obtains corresponding billing rights after completing corresponding work of the corresponding type;
    工作量获取模块,用于获取所述硬件设备在获得相应的记账权后提交的相应的工作量;a workload acquisition module, configured to acquire a corresponding workload submitted by the hardware device after obtaining the corresponding billing right;
    积分奖励模块,用于根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分,并将该积分转移至与相应的所述硬件设备对应的用户账号,然后进行相应的登记并全网广播。a point reward module, configured to determine, according to a preset point reward consensus corresponding to the type of the workload, a score corresponding to the workload submitted by the hardware device, and transfer the point to a user corresponding to the corresponding hardware device The account number is then registered and broadcasted throughout the network.
  13. 一种挖矿装置,其特征在于,应用于硬件设备,包括:A mining device, characterized in that it is applied to a hardware device, including:
    共识算法获取模块,用于获取区块链节点服务器根据所述硬件设备的工作类型分配的相应的共识算法;a consensus algorithm obtaining module, configured to acquire a corresponding consensus algorithm allocated by the blockchain node server according to the working type of the hardware device;
    工作量提交模块,用于基于所述共识算法在完成相应的满足预设条件的工作后获取相应的记账权,然后向所述区块链节点服务器提交相应的工作量;其中,所述区块链节点服务器在获取到所述硬件设备提交的工作量后,根据与工作量的类型对应的预设积分奖励共识,确定与所述硬件设备提交的工作量对应的积分;a workload submission module, configured to acquire a corresponding billing right after completing the corresponding work satisfying the preset condition, and then submit a corresponding workload to the blockchain node server; wherein the area is After obtaining the workload submitted by the hardware device, the block chain node server determines a score corresponding to the workload submitted by the hardware device according to a preset credit reward consensus corresponding to the type of the workload;
    积分获取模块,用于获取所述区块链节点服务器转移的与提交的工作量对应的积分;其中,所述区块链节点服务器在将该积分转移至所述硬件设备后进行相应的登记和全网广播。a point obtaining module, configured to acquire an integral corresponding to the submitted workload transferred by the blockchain node server; wherein the block chain node server performs corresponding registration after transferring the point to the hardware device Full network broadcast.
  14. 一种区块链节点服务器,其特征在于,包括处理器和存储器;其中,所述处理器执行所述存储器中保存的计算机程序时实现如权利要求1至8任一项所述的区块链节点服务方法。A blockchain node server, comprising: a processor and a memory; wherein the processor implements the blockchain according to any one of claims 1 to 8 when executing a computer program stored in the memory Node service method.
  15. 一种硬件设备,其特征在于,包括处理器和存储器;其中,所述处理器执行所述存储器中保存的计算机程序时实现如权利要求9至11任一项所述的挖矿方法。A hardware device, comprising: a processor and a memory; wherein the mining method of any one of claims 9 to 11 is implemented when the processor executes a computer program stored in the memory.
  16. 根据权利要求15所述的硬件设备,其特征在于,所述硬件设备包括:The hardware device according to claim 15, wherein the hardware device comprises:
    工作类型为采集车辆状态数据的OBD盒子;The job type is an OBD box that collects vehicle status data;
    和/或,工作类型为对车辆状态数据进行分析的第一车载设备;And/or, the work type is a first onboard device that analyzes vehicle status data;
    和/或,工作类型为采集车辆交易消费记录的计价器;And/or, the work type is a meter for collecting vehicle transaction consumption records;
    和/或,工作类型为对车辆交易消费记录进行分析的第二车载设备;And/or, the work type is a second in-vehicle device that analyzes the vehicle transaction consumption record;
    和/或,工作类型为获取车辆诊断报告的手持移动终端。And/or, the type of work is a handheld mobile terminal that obtains a vehicle diagnostic report.
  17. 一种挖矿系统,其特征在于,包括如权利要求14所述的区块链节点服务器以及多个工作类型不同的如权利要求15或16所述的硬件设备。A mining system characterized by comprising the blockchain node server according to claim 14 and a plurality of hardware devices according to claim 15 or 16 having different types of work.
  18. 一种计算机可读存储介质,其特征在于,用于存储区块链节点服务程序;其中,所述区块链节点服务程序被处理器执行时实现如权利要求1至8任一项所述的区块链节点服务方法。A computer readable storage medium for storing a blockchain node service program, wherein the blockchain node service program is executed by a processor to implement the method of any one of claims 1 to Blockchain node service method.
  19. 一种计算机可读存储介质,其特征在于,用于存储挖矿程序;其中,所述挖矿程序被处理器执行时实现如权利要求9至11任一项所述的挖矿方法。A computer readable storage medium for storing a mining program; wherein the mining program is executed by a processor to implement the mining method of any one of claims 9 to 11.
PCT/CN2018/083492 2018-04-18 2018-04-18 Blockchain node service method and apparatus, mining method and apparatus, and device, system, and medium WO2019200558A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/083492 WO2019200558A1 (en) 2018-04-18 2018-04-18 Blockchain node service method and apparatus, mining method and apparatus, and device, system, and medium
CN201880075868.4A CN111433807A (en) 2018-04-18 2018-04-18 Block chain link point service and mining method, device, equipment, system and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/083492 WO2019200558A1 (en) 2018-04-18 2018-04-18 Blockchain node service method and apparatus, mining method and apparatus, and device, system, and medium

Publications (1)

Publication Number Publication Date
WO2019200558A1 true WO2019200558A1 (en) 2019-10-24

Family

ID=68240530

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/083492 WO2019200558A1 (en) 2018-04-18 2018-04-18 Blockchain node service method and apparatus, mining method and apparatus, and device, system, and medium

Country Status (2)

Country Link
CN (1) CN111433807A (en)
WO (1) WO2019200558A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988889A (en) * 2021-03-04 2021-06-18 京东数字科技控股股份有限公司 Method, device, equipment and storage medium for realizing block chain service

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530072A (en) * 2016-11-22 2017-03-22 天津米游科技有限公司 Block chain consensus mechanism
CN107103459A (en) * 2017-04-27 2017-08-29 电子科技大学 Accounting system and method based on block chain with sovereign right
CN107360206A (en) * 2017-03-29 2017-11-17 阿里巴巴集团控股有限公司 A kind of block chain common recognition method, equipment and system
CN107424066A (en) * 2017-07-19 2017-12-01 武汉凤链科技有限公司 A kind of method and its system of mechanism of being built a consensus based on the magnitude of value
US20180005318A1 (en) * 2016-06-30 2018-01-04 Chicago Mercantile Exchange Inc. Derivative Contracts that Settle Based on Transaction Data
WO2018004950A1 (en) * 2016-06-29 2018-01-04 Intel Corporation Energy-efficient bitcoin mining hardware accelerators

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018004950A1 (en) * 2016-06-29 2018-01-04 Intel Corporation Energy-efficient bitcoin mining hardware accelerators
US20180005318A1 (en) * 2016-06-30 2018-01-04 Chicago Mercantile Exchange Inc. Derivative Contracts that Settle Based on Transaction Data
CN106530072A (en) * 2016-11-22 2017-03-22 天津米游科技有限公司 Block chain consensus mechanism
CN107360206A (en) * 2017-03-29 2017-11-17 阿里巴巴集团控股有限公司 A kind of block chain common recognition method, equipment and system
CN107103459A (en) * 2017-04-27 2017-08-29 电子科技大学 Accounting system and method based on block chain with sovereign right
CN107424066A (en) * 2017-07-19 2017-12-01 武汉凤链科技有限公司 A kind of method and its system of mechanism of being built a consensus based on the magnitude of value

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988889A (en) * 2021-03-04 2021-06-18 京东数字科技控股股份有限公司 Method, device, equipment and storage medium for realizing block chain service
CN112988889B (en) * 2021-03-04 2024-02-02 京东科技控股股份有限公司 Method, device, equipment and storage medium for realizing block chain service

Also Published As

Publication number Publication date
CN111433807A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN103902646B (en) Distributed task managing system and method
CN110163474A (en) A kind of method and apparatus of task distribution
CN106294233B (en) A kind of transfer control method and device of direct memory access
CN109712392B (en) Parking information processing method, device, equipment and storage medium based on block chain
CN108268965A (en) For resource allocation, for the vehicles scheduling method and its device
CN110163739B (en) Payment complaint method, device, server and readable storage medium
CN105468619B (en) Resource allocation methods and device for database connection pool
US20180097705A1 (en) Backend Resource Costs For Online Service Offerings
CN107741882A (en) The method and device and electronic equipment of distribution task
CN109656797B (en) Log data association method and device
CN107786628A (en) Business numbering distribution method, device, computer equipment and storage medium
US11533163B2 (en) Mining method and device based on blockchain, and computer readable storage medium
JP2005031776A (en) Server resource totaling method and system, and server therefor
WO2019200558A1 (en) Blockchain node service method and apparatus, mining method and apparatus, and device, system, and medium
CN114971790A (en) Processing method, device and equipment for financing lease service and readable storage medium
CN114064168B (en) Interface optimization method and medical equipment
CN108733545A (en) A kind of method for testing pressure and device
CN113553506A (en) Method and system for recommending shift points, computer equipment and readable storage medium
CN110826943B (en) Method and related equipment for judging whether bus allocation is needed or not and determining bus allocation number
CN110659904B (en) Block chain-based risk data service method and device and electronic equipment
CN111984747B (en) Geographic information data acquisition method, device and equipment
CN114971532B (en) Enterprise portrait establishing and managing method and system
CN116151460A (en) Optimization method and device for intelligent vehicle product, server and storage medium
CN107273279A (en) A kind of bill management method and device
CN108074083B (en) Request processing method, server and client

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18915178

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18915178

Country of ref document: EP

Kind code of ref document: A1