Data management method, device and equipment, readable storage medium and program product
By deploying oracles and smart contracts on the server, determining the secure data source and uploading data to the blockchain, the problem of low data reliability in the data management of intelligent monitoring equipment is solved, and the safe and reliable upload of data is achieved.
Patent Information
- Application Number
- CN202411250682.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional intelligent monitoring equipment data management methods have the problem of low data reliability, especially the data collected by the ball control equipment is vulnerable to hackers and tampering, and cannot ensure the security of the data when uploading to the blockchain.
By deploying oracles and smart contracts on the server, receiving data collection requests from the ball control device, determining a secure data source, and obtaining target data from the data source, uploading the data to the blockchain through the smart contract, avoiding deployment of control The lack of safety certification when the ball equipment collects data on its own.
Improve data reliability, ensure the security of data when uploading to the blockchain, and avoid the problem of low data reliability in traditional methods.
Smart Images

Figure CN119135692A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a data management method, device, equipment, readable storage medium and program product. Background Art
[0002] With the development of Internet of Things technology, intelligent monitoring equipment, such as ball control equipment, is becoming more and more popular. The data collected by these intelligent monitoring devices usually need to be managed.
[0003] Traditional data management methods are usually based on the decentralized and tamper-proof characteristics of blockchain technology, and the collected data is uploaded to the blockchain for data storage.
[0004] However, traditional monitoring data management methods have the problem of low data reliability. Summary of the invention
[0005] Based on this, it is necessary to provide a data management method, device, equipment, readable storage medium and program product that can improve data reliability in response to the above technical problems.
[0006] In a first aspect, the present application provides a data management method for a server, wherein an oracle and a smart contract are deployed in the server, including:
[0007] Receiving a data collection request sent by the control ball device, the data collection request includes a data type;
[0008] Determine the data source corresponding to the data type through the oracle and smart contract, and obtain the target data from the data source through the oracle;
[0009] Upload target data to the blockchain through smart contracts.
[0010] In one embodiment, determining the data source corresponding to the data type through an oracle and a smart contract includes:
[0011] Determine multiple candidate data sources through oracles and smart contracts;
[0012] The oracle determines the data source corresponding to the data type from multiple candidate data sources.
[0013] In one embodiment, obtaining target data from a data source through an oracle includes:
[0014] Acquire initial data from a data source through an oracle, and in the process of acquiring the initial data, generate acquisition process data through the oracle, where the acquisition process data at least includes a data source identifier corresponding to the data source and the acquisition time of the initial data;
[0015] The initial data and the acquisition process data are taken as the target data.
[0016] In one embodiment, uploading target data to a blockchain via a smart contract includes:
[0017] The target data is processed by smart contracts to obtain the data on the chain;
[0018] Upload the on-chain data to the blockchain.
[0019] In one embodiment, the data collection request also includes a control ball identification, and the target data is uploaded to the blockchain through a smart contract, including:
[0020] Determine the target blockchain through smart contracts and control ball identification;
[0021] Upload the target data to the target blockchain.
[0022] In one embodiment, after uploading the target data to the blockchain through the smart contract, the process further includes:
[0023] Get the on-chain result corresponding to the target data;
[0024] The chain result is sent to the control ball device.
[0025] In a second aspect, the present application further provides a data management device for a server, wherein an oracle and a smart contract are deployed in the server, including:
[0026] A receiving module is used to receive a data collection request sent by the control ball device, where the data collection request includes a data type;
[0027] The determination module is used to determine the data source corresponding to the data type through the oracle and the smart contract, and obtain the target data from the data source through the oracle;
[0028] The on-chain module is used to upload target data to the blockchain through smart contracts.
[0029] In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of the first aspect when executing the computer program.
[0030] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method of the first aspect described above.
[0031] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method in the first aspect are implemented.
[0032] The above-mentioned data management method, device, equipment, readable storage medium and program product receive the data collection request sent by the control ball device, and can determine the data source corresponding to the data type through the oracle and the smart contract, and obtain the target data from the data source through the oracle, and upload the target data to the blockchain through the smart contract, wherein the data collection request includes the data type. In this way, there is no need for the control ball to collect data by itself, but to receive the data collection request sent by the control ball, so that the oracle deployed on the server confirms the secure data source according to the data type included in the data collection request, and then collects the required target data from the data source through the oracle, and uploads the target data to the blockchain, avoiding the problem of low data reliability caused by the lack of security authentication of the data source of the data collected by the control ball device itself in the traditional technology. The technical solution determines the secure data source through the oracle, and then obtains the target data on the chain from the secure data source, thereby ensuring the reliability of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 An application environment diagram of a data management method in an embodiment;
[0035] Figure 2 is a flow chart of a data management method in one embodiment;
[0036] Figure 3 is a flow chart of step 202 in another embodiment;
[0037] Figure 4 is a flowchart of an exemplary data management method in one embodiment;
[0038] Figure 5 is a structural block diagram of a data management device in one embodiment;
[0039] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0041] With the development of Internet of Things technology, intelligent monitoring equipment, such as ball control equipment, is becoming more and more popular. The data collected by these intelligent monitoring devices usually need to be managed.
[0042] Traditional data management methods are usually based on the decentralized and tamper-proof characteristics of blockchain technology, and the collected data is uploaded to the blockchain for data storage.
[0043] However, existing intelligent monitoring equipment has shortcomings in data security and privacy protection. For example, the data collected by the surveillance equipment is easily attacked and tampered by hackers, and traditional data management methods cannot ensure the security of the data uploaded to the blockchain. Therefore, traditional monitoring data management methods have the problem of low data reliability.
[0044] In view of this, the present application provides a data management method, device, equipment, readable storage medium and program product, which receives a data collection request sent by a control ball device, can determine the data source corresponding to the data type through an oracle and a smart contract, and obtain the target data from the data source through the oracle, and can upload the target data to the blockchain through the smart contract, wherein the data collection request includes the data type. In this way, there is no need for the control ball to collect data by itself, but to receive the data collection request sent by the control ball, so that the oracle deployed on the server confirms the secure data source according to the data type included in the data collection request, and then collects the required target data from the data source through the oracle, and uploads the target data to the blockchain, avoiding the problem of low data reliability caused by the lack of security authentication of the data source of the data collected by the control ball device itself in the traditional technology. The present technical solution determines a secure data source through an oracle, and then obtains the target data on the chain from the secure data source, thereby ensuring the reliability of the data.
[0045] The data management method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the control ball device 101 is connected to the server through an external adapter, and the control ball device 101 is deployed with an interface corresponding to the oracle, which can send data requests to the oracle deployed in the server. The number of control ball devices 101 can be multiple, and different control ball devices 101 correspond to unique identifiers; the external adapter supports control ball devices that access different communication protocols. In the embodiment of the present application, the external adapter supports devices that adapt to the MQTT protocol (Message Queuing TelemetryTransport, a lightweight message protocol based on the publish / subscribe mode) and the HTTP protocol (HyperText TransferProtocol, Hypertext Transfer Protocol), and 1 supports cross-chain interoperability protocols, etc.; the server 102 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The server 102 is deployed with an oracle and a smart contract. The oracle can use the related servers of the oracle, and the smart contract can access the blockchain and perform related operations of the blockchain.
[0046] In an exemplary embodiment, Figure 2 As shown, a data management method is provided, which is applied to Figure 1 Taking the server 102 in the example as an example, a oracle and a smart contract are deployed in the server, and the method includes the following steps 201 to 203. Among them:
[0047] Step 201, receiving a data collection request sent by a control ball device.
[0048] The control ball device can be a device used to collect data. Different control ball devices may support different network protocols, such as MQTT protocol, HTTP protocol and cross-chain protocol.
[0049] In an embodiment of the present application, a oracle interface will be deployed on the control ball device so that the control ball device can communicate with the language oracle service.
[0050] In a possible implementation, different control ball devices may collect data of different data types. When the control ball device needs to collect data, the server will receive a data collection request sent by the control ball device, wherein the data collection request includes the data type.
[0051] The data type may be the type of data that the surveillance device needs to collect, such as temperature, location information, etc.
[0052] Optionally, the server can periodically receive data collection requests sent by the control ball device through the oracle. Optionally, when the control ball device triggers a specific event, the server can receive data collection requests sent by the control ball through the oracle.
[0053] Step 202, determine the data source corresponding to the data type through the oracle and the smart contract, and obtain the target data from the data source through the oracle.
[0054] After receiving the data collection request, the server can determine the data source corresponding to the data type by calling the oracle and the smart contract.
[0055] In the embodiment of the present application, the data source is a data source preset in the smart contract and has been securely authenticated. The data source may be a preset URL, an identifier of a data acquisition device, etc., that is, the data source may also be the control device itself.
[0056] In one possible implementation, a mapping function is stored in the smart contract, and the server can call the mapping function based on the data type through an oracle to determine the data source corresponding to the data type.
[0057] In one possible implementation, a mapping table is stored in the smart contract, and the server can use an oracle to look up the table based on the data type to determine the data source corresponding to the data type.
[0058] Once the data source is determined, the server can obtain the target data from the data source through the oracle. Optionally, the server can call the oracle to directly obtain the target data corresponding to the data type from the data source according to the data type; optionally, after the server calls the oracle to directly obtain the data corresponding to the data type from the data source according to the data type, it will also generate a data source identifier and data acquisition time corresponding to the data source at the same time. The server can use the obtained data, data source identifier and data acquisition time as the target data.
[0059] Step 203: Upload the target data to the blockchain through a smart contract.
[0060] After obtaining the target data, the server can upload the target data to the blockchain through a smart contract.
[0061] In one possible implementation, corresponding processing methods will be set in the smart contract for data of different data types. The server can perform preset processing on the target data through the smart contract to obtain the on-chain data, and then upload the on-chain data to the blockchain.
[0062] Regarding preset processing, optionally, it can be a preset encryption processing. For some data, it may be necessary to upload encrypted data to ensure the security of the data. Before uploading the target data to the blockchain through a smart contract, the server can first determine the preset encryption processing method according to the smart contract to obtain the processed chain data. Then, the server uploads the chain data to the blockchain.
[0063] In another possible implementation, the data collection request also includes a control ball identifier, and the server can determine the target blockchain through the smart contract and the control ball identifier, and then upload the target data to the target blockchain.
[0064] For different control ball devices, the server can set a unique, tamper-proof, and privacy-inclusive control ball identifier for each control ball device during its data life cycle based on blockchain technology. For different control ball devices, the server can upload its corresponding data to a specific blockchain. Therefore, in an embodiment of the present application, the server can determine the target blockchain corresponding to the control ball device through a smart contract and the control ball identifier, and then upload the target data to the target blockchain.
[0065] In a possible implementation, after the server uploads the target data to the blockchain through a smart contract, it can also obtain the on-chain result corresponding to the target data, and then send the on-chain result to the control ball device.
[0066] The above data management method receives the data collection request sent by the control ball device, and can determine the data source corresponding to the data type through the oracle and the smart contract, and obtain the target data from the data source through the oracle, and upload the target data to the blockchain through the smart contract, wherein the data collection request includes the data type. In this way, there is no need for the control ball to collect data by itself, but to receive the data collection request sent by the control ball, so that the oracle deployed on the server confirms the secure data source according to the data type included in the data collection request, and then collects the required target data from the data source through the oracle, and uploads the target data to the blockchain, avoiding the problem of low data reliability caused by the lack of security authentication of the data source of the data collected by the control ball device itself in the traditional technology. The technical solution determines the secure data source through the oracle, and then obtains the target data on the chain from the secure data source, thereby ensuring the reliability of the data.
[0067] In one embodiment, based on the above Figure 2 The embodiment shown, see Figure 3 , this embodiment involves the process of determining the data source corresponding to the data type through an oracle and a smart contract. Figure 3 As shown, step 202 may include step 301 and step 302 .
[0068] Step 301, determine multiple candidate data sources through an oracle and a smart contract.
[0069] Step 302, determine the data source corresponding to the data type from multiple candidate data sources through a oracle.
[0070] In an embodiment of the present application, candidate data sources corresponding to different data types are set in the smart contract. The server can call the oracle to screen each candidate data source according to the data type to determine the data source corresponding to the data type.
[0071] After obtaining the data source corresponding to the data type through the above method, the server can obtain the target data from the data source by calling the oracle. In one possible implementation, the server can obtain initial data from the data source through the oracle, and in the process of obtaining the initial data, generate acquisition process data through the oracle, wherein the acquisition process data at least includes the data source identifier corresponding to the data source and the acquisition time of the initial data. Finally, the initial data and the acquisition process data are used as target data.
[0072] In this way, not only can the data obtained from the data source be uploaded to the blockchain, but the data acquisition process can also be retained, ensuring the richness of the data.
[0073] In one embodiment, referring to Figure 4 , provides an exemplary data management method, which is used in a server, in which an oracle and a smart contract are deployed, and the method can be applied to Figure 1 In the implementation environment shown.
[0074] Step 401, receiving a data collection request sent by a control ball device.
[0075] The data collection request includes the data type.
[0076] Step 402, determine multiple candidate data sources through an oracle and a smart contract.
[0077] Step 403, determine the data source corresponding to the data type from multiple candidate data sources through a oracle.
[0078] Step 404, obtaining initial data from the data source through the oracle, and in the process of obtaining the initial data, generating acquisition process data through the oracle.
[0079] The acquisition process data at least includes a data source identifier corresponding to the data source and the acquisition time of the initial data.
[0080] Step 405: Use the initial data and the acquisition process data as target data.
[0081] Step 406: Preset processing is performed on the target data through the smart contract to obtain the on-chain data.
[0082] Step 407, upload the on-chain data to the blockchain.
[0083] Step 408, obtaining the on-chain result corresponding to the target data.
[0084] Step 409, sending the uplink result to the control ball device.
[0085] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0086] Based on the same inventive concept, the embodiment of the present application also provides a data management device for implementing the data management method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data management device embodiments provided below can refer to the limitations on the data management method above, and will not be repeated here.
[0087] In an exemplary embodiment, Figure 5 As shown, a data management device is provided, which is used for a server, in which a oracle and a smart contract are deployed, including: a receiving module 501, a determining module 502 and an on-chain module 503, wherein:
[0088] The receiving module 501 is used to receive a data collection request sent by the control ball device, and the data collection request includes a data type;
[0089] A determination module 502 is used to determine the data source corresponding to the data type through an oracle and a smart contract, and obtain target data from the data source through the oracle;
[0090] The uplink module 503 is used to upload the target data to the blockchain through a smart contract.
[0091] In one embodiment, the determination module 502 includes:
[0092] A candidate determination unit, used to determine multiple candidate data sources through an oracle and a smart contract;
[0093] The target determination unit is used to determine the data source corresponding to the data type from multiple candidate data sources through an oracle.
[0094] In one embodiment, the determination module 502 further includes:
[0095] An acquisition unit, used to acquire initial data from a data source through an oracle, and in the process of acquiring the initial data, generate acquisition process data through the oracle, wherein the acquisition process data at least includes a data source identifier corresponding to the data source and an acquisition time of the initial data;
[0096] The target data determination unit is used to use the initial data and the acquisition process data as target data.
[0097] In one embodiment, the uplink module 503 includes:
[0098] The processing unit is used to perform preset processing on the target data through the smart contract to obtain the data on the chain;
[0099] The first uploading unit is used to upload the on-chain data to the blockchain.
[0100] In one embodiment, the data collection request also includes a control ball identifier, and the uplink module 503 includes:
[0101] A target blockchain determination unit, used to determine the target blockchain through smart contracts and control ball identification;
[0102] The second uploading unit is used to upload the target data to the target blockchain.
[0103] In one embodiment, the apparatus further comprises:
[0104] The result acquisition module is used to obtain the on-chain results corresponding to the target data;
[0105] Feedback module, used to send the uplink results to the control ball device.
[0106] Each module in the above data management device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0107] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data management data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data management method is implemented.
[0108] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0109] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0110] Receiving a data collection request sent by the control ball device, the data collection request includes a data type;
[0111] Determine the data source corresponding to the data type through the oracle and smart contract, and obtain the target data from the data source through the oracle;
[0112] Upload target data to the blockchain through smart contracts.
[0113] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0114] Determine multiple candidate data sources through oracles and smart contracts;
[0115] The oracle determines the data source corresponding to the data type from multiple candidate data sources.
[0116] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0117] Acquire initial data from a data source through an oracle, and in the process of acquiring the initial data, generate acquisition process data through the oracle, where the acquisition process data at least includes a data source identifier corresponding to the data source and the acquisition time of the initial data;
[0118] The initial data and the acquisition process data are taken as the target data.
[0119] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0120] The target data is processed by smart contracts to obtain the data on the chain;
[0121] Upload the on-chain data to the blockchain.
[0122] In one embodiment, the data collection request also includes a control ball identifier, and the processor further implements the following steps when executing the computer program:
[0123] Determine the target blockchain through smart contracts and control ball identification;
[0124] Upload the target data to the target blockchain.
[0125] In one embodiment, after uploading the target data to the blockchain through the smart contract, the processor further implements the following steps when executing the computer program:
[0126] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0127] Get the on-chain result corresponding to the target data;
[0128] The chain result is sent to the control ball device.
[0129] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0130] Receiving a data collection request sent by the control ball device, wherein the data collection request includes a data type;
[0131] Determine a data source corresponding to the data type through the oracle and the smart contract, and obtain target data from the data source through the oracle;
[0132] The target data is uploaded to the blockchain through the smart contract.
[0133] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0134] Determine multiple candidate data sources through the oracle and the smart contract;
[0135] The oracle determines the data source corresponding to the data type from the multiple candidate data sources.
[0136] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0137] Acquire initial data from the data source through the oracle, and in the process of acquiring the initial data, generate acquisition process data through the oracle, wherein the acquisition process data at least includes a data source identifier corresponding to the data source and an acquisition time of the initial data;
[0138] The initial data and the acquisition process data are used as the target data.
[0139] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0140] The target data is processed by the smart contract to obtain the on-chain data;
[0141] The on-chain data is uploaded to the blockchain.
[0142] In one embodiment, the data collection request also includes a control ball identifier, and when the computer program is executed by the processor, the following steps are also implemented:
[0143] Determine the target blockchain through the smart contract and the control ball identifier;
[0144] Upload the target data to the target blockchain.
[0145] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0146] Obtain the on-chain result corresponding to the target data;
[0147] The uplink result is sent to the control ball device.
[0148] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0149] Receiving a data collection request sent by the control ball device, wherein the data collection request includes a data type;
[0150] Determine a data source corresponding to the data type through the oracle and the smart contract, and obtain target data from the data source through the oracle;
[0151] The target data is uploaded to the blockchain through the smart contract.
[0152] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0153] Determine multiple candidate data sources through the oracle and the smart contract;
[0154] The oracle determines the data source corresponding to the data type from the multiple candidate data sources.
[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0156] Acquire initial data from the data source through the oracle, and in the process of acquiring the initial data, generate acquisition process data through the oracle, wherein the acquisition process data at least includes a data source identifier corresponding to the data source and an acquisition time of the initial data;
[0157] The initial data and the acquisition process data are used as the target data.
[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0159] The target data is processed by the smart contract to obtain the on-chain data;
[0160] The on-chain data is uploaded to the blockchain.
[0161] In one embodiment, the data collection request also includes a control ball identifier, and when the computer program is executed by the processor, the following steps are also implemented:
[0162] Determine the target blockchain through the smart contract and the control ball identifier;
[0163] Upload the target data to the target blockchain.
[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0165] Obtain the on-chain result corresponding to the target data;
[0166] The uplink result is sent to the control ball device.
[0167] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0168] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0169] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0170] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data management method, characterized in that: Used for a server, wherein a oracle and a smart contract are deployed in the server, the method comprising: Receiving a data collection request sent by the control ball device, wherein the data collection request includes a data type; Determine a data source corresponding to the data type through the oracle and the smart contract, and obtain target data from the data source through the oracle; The target data is uploaded to the blockchain through the smart contract.
2. The method according to claim 1, characterized in that The determining the data source corresponding to the data type through the oracle and the smart contract includes: Determine multiple candidate data sources through the oracle and the smart contract; The oracle determines the data source corresponding to the data type from the multiple candidate data sources.
3. The method according to claim 1, characterized in that The obtaining target data from the data source through the oracle includes: Acquire initial data from the data source through the oracle, and in the process of acquiring the initial data, generate acquisition process data through the oracle, wherein the acquisition process data at least includes a data source identifier corresponding to the data source and an acquisition time of the initial data; The initial data and the acquisition process data are used as the target data.
4. The method according to claim 1, characterized in that: The uploading of the target data to the blockchain through the smart contract includes: The target data is processed by the smart contract to obtain the on-chain data; The on-chain data is uploaded to the blockchain.
5. The method according to claim 1, characterized in that The data collection request also includes a control ball identification, and uploading the target data to the blockchain through the smart contract includes: Determine the target blockchain through the smart contract and the control ball identifier; Upload the target data to the target blockchain.
6. The method according to claim 1, characterized in that After uploading the target data to the blockchain through the smart contract, the process further includes: Obtain the on-chain result corresponding to the target data; The uplink result is sent to the control ball device.
7. A data management device, characterized in that: Used for a server, wherein a oracle and a smart contract are deployed in the server, the device comprising: A receiving module, used for receiving a data collection request sent by a control ball device, wherein the data collection request includes a data type; A determination module, used to determine the data source corresponding to the data type through the oracle and the smart contract, and obtain target data from the data source through the oracle; The uploading module is used to upload the target data to the blockchain through the smart contract.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
