Data processing method and device based on block chain, computer equipment and medium

Through blockchain technology and Internet of Things devices, agricultural product data is collected and encrypted, the authenticity and accuracy problems caused by data dispersion are solved, and efficient claims and data traceability are achieved in agricultural insurance.

CN119293865APending Publication Date: 2025-01-10CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411273958.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The recording methods of agricultural product data in traditional agricultural insurance are highly scattered, which makes it difficult to ensure the authenticity and accuracy of the data, affecting the efficiency and accuracy of the claims process.

Method used

The blockchain-based data processing method is adopted to collect agricultural product data through Internet of Things devices, pre-process and encrypt it, and then store it on the blockchain network to use smart contracts to realize the authenticity and security verification of data.

Benefits of technology

It ensures the authenticity, accuracy and security of agricultural product data, improves the efficiency and accuracy of agricultural insurance claims, and provides untampered data recording and traceability capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293865A_ABST
    Figure CN119293865A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of data processing and the field of financial science and technology, and relates to a block chain-based data processing method, which comprises the steps of collecting agricultural product data based on Internet of Things equipment; preprocessing the agricultural product data to obtain first agricultural product data; packaging the first agricultural product data into a data format matched with the block chain network to obtain second agricultural product data; obtaining a target key; obtaining factor data of multiple encryption algorithms, and determining a target encryption algorithm from all the encryption algorithms based on the factor data; performing encryption processing on the second agricultural product data based on the target key and a target encryption algorithm to obtain target agricultural product data; and storing the target agricultural product data into the block chain network based on the gateway equipment of the Internet of Things. The invention further provides a data processing device based on the block chain, computer equipment and a storage medium. According to the invention, the authenticity and accuracy of the target agricultural product data are effectively ensured based on the data processing mode of the target encryption algorithm and the block chain network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of data processing technology and financial technology, and in particular to blockchain-based data processing methods, devices, computer equipment and storage media. Background Art

[0002] In the traditional agricultural insurance business practice, the collection and management of agricultural product data has always been one of the key factors restricting the efficient and accurate development of the industry. With the acceleration of agricultural modernization, the expansion of farmers' planting and breeding scale and the diversification of types, higher requirements are placed on the comprehensive and accurate recording of agricultural product data.

[0003] However, the current way of recording agricultural product data is highly decentralized, and these data are often scattered among multiple entities such as the government, agricultural cooperatives, individual farmers, and third-party service agencies. This decentralized data situation directly leads to the verification of data authenticity becoming a major problem in the agricultural insurance claims process, and the authenticity and accuracy of agricultural product data cannot be guaranteed. Summary of the invention

[0004] The purpose of the embodiments of the present application is to propose a data processing method, device, computer equipment and storage medium based on blockchain to solve the technical problem that the existing recording method of agricultural product data is highly decentralized and cannot guarantee the authenticity and accuracy of agricultural product data.

[0005] In order to solve the above technical problems, the present application embodiment provides a data processing method based on blockchain, which adopts the following technical solution:

[0006] Collect agricultural product data based on preset IoT devices;

[0007] Preprocessing the agricultural product data to obtain corresponding first agricultural product data;

[0008] Encapsulating the first agricultural product data into a data format that matches the blockchain network to obtain corresponding second agricultural product data;

[0009] Get the target key that meets the preset length condition;

[0010] Obtaining factor data of a plurality of preset encryption algorithms, and determining a target encryption algorithm from all the encryption algorithms based on the factor data;

[0011] Encrypting the second agricultural product data based on the target key and the target encryption algorithm to obtain corresponding target agricultural product data;

[0012] The target agricultural product data is stored in the blockchain network based on a preset Internet of Things gateway device.

[0013] Furthermore, the step of obtaining factor data of a plurality of preset encryption algorithms and determining a target encryption algorithm from all the encryption algorithms based on the factor data specifically includes:

[0014] Obtaining security data, performance data, compatibility data, and popularity data of each of the encryption algorithms;

[0015] Based on the preset scoring rules, the security data, performance data, compatibility data and popularity data of each encryption algorithm are evaluated and processed to obtain the security score, performance score, compatibility score and popularity score of each encryption algorithm;

[0016] Calculating the security score, performance score, compatibility score and popularity score of each encryption algorithm to obtain a comprehensive score of each encryption algorithm;

[0017] Filter out the target comprehensive score with the highest value from all the comprehensive scores;

[0018] Obtain a designated encryption algorithm corresponding to the target comprehensive score, and use the designated encryption algorithm as the target encryption algorithm.

[0019] Furthermore, the step of calculating the security score, performance score, compatibility score and popularity score of each encryption algorithm to obtain a comprehensive score of each encryption algorithm specifically includes:

[0020] Get the preset weight processing algorithm;

[0021] Generate a first weight, a second weight, a third weight and a fourth weight corresponding to the security factor, the performance factor, the compatibility factor and the popularity factor respectively based on the weight processing algorithm;

[0022] Call the preset score calculation formula;

[0023] Based on the first weight, the second weight, the third weight and the fourth weight, the security score, performance score, compatibility score and popularity score of each encryption algorithm are calculated using the score calculation formula to obtain a comprehensive score for each encryption algorithm.

[0024] Furthermore, the step of preprocessing the agricultural product data to obtain corresponding first agricultural product data specifically includes:

[0025] Performing denoising processing on the agricultural product data to obtain corresponding first data;

[0026] Performing data cleaning processing on the first data to obtain corresponding second data;

[0027] Performing format conversion processing on the second data to obtain corresponding third data;

[0028] The third data is used as the first agricultural product data.

[0029] Furthermore, after the step of storing the target agricultural product data in the blockchain network based on the preset Internet of Things gateway device, it also includes:

[0030] Determining whether a claim application triggered by a first user is received; wherein the claim application carries user information of the user and identification information corresponding to the claim subject;

[0031] If so, extracting the user information and the identification information from the claim application;

[0032] Verifying the user information based on a preset authority control policy;

[0033] If the user information passes the verification, obtaining third agricultural product data corresponding to the identification information from the blockchain network;

[0034] Calling a smart contract corresponding to agricultural insurance, and comparing the third agricultural product data with the compensation conditions in the smart contract to determine whether the third agricultural product data meets the compensation conditions;

[0035] If so, the compensation processing corresponding to the claim subject is executed based on the smart contract.

[0036] Furthermore, after the step of storing the target agricultural product data in the blockchain network based on the preset Internet of Things gateway device, it also includes:

[0037] Determining whether a query request triggered by a second user is received;

[0038] If yes, display the preset query page;

[0039] receiving a query condition input by the second user in the query page;

[0040] Construct a corresponding query statement based on the query condition, and send the query statement to the blockchain network;

[0041] Receiving a query result corresponding to the query statement returned by the blockchain network;

[0042] The query result is displayed based on the query page.

[0043] Furthermore, after the step of storing the target agricultural product data in the blockchain network based on the preset Internet of Things gateway device, it also includes:

[0044] Determining whether an anti-counterfeiting verification code entered by a third user in a preset traceability query page is received;

[0045] If yes, verify the anti-counterfeiting verification code;

[0046] If the anti-counterfeiting verification code passes the verification, the product traceability information corresponding to the anti-counterfeiting verification code is obtained from the blockchain network, and the product traceability information is displayed on the traceability query page;

[0047] If the anti-counterfeiting verification code fails to pass the verification, preset risk warning information is generated, and the risk warning information is displayed on the traceability query page.

[0048] In order to solve the above technical problems, the embodiment of the present application also provides a data processing device based on blockchain, which adopts the following technical solution:

[0049] A collection module, used to collect agricultural product data based on preset IoT devices;

[0050] A preprocessing module, used for preprocessing the agricultural product data to obtain corresponding first agricultural product data;

[0051] A packaging module, used to package the first agricultural product data into a data format that matches the blockchain network to obtain corresponding second agricultural product data;

[0052] A first acquisition module, used to acquire a target key that meets a preset length condition;

[0053] A determination module, used to obtain factor data of a plurality of preset encryption algorithms, and determine a target encryption algorithm from all the encryption algorithms based on the factor data;

[0054] An encryption module, used for encrypting the second agricultural product data based on the target key and the target encryption algorithm to obtain corresponding target agricultural product data;

[0055] A storage module is used to store the target agricultural product data in the blockchain network based on a preset Internet of Things gateway device.

[0056] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0057] Collect agricultural product data based on preset IoT devices;

[0058] Preprocessing the agricultural product data to obtain corresponding first agricultural product data;

[0059] Encapsulating the first agricultural product data into a data format that matches the blockchain network to obtain corresponding second agricultural product data;

[0060] Get the target key that meets the preset length condition;

[0061] Obtaining factor data of a plurality of preset encryption algorithms, and determining a target encryption algorithm from all the encryption algorithms based on the factor data;

[0062] Encrypting the second agricultural product data based on the target key and the target encryption algorithm to obtain corresponding target agricultural product data;

[0063] The target agricultural product data is stored in the blockchain network based on a preset Internet of Things gateway device.

[0064] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0065] Collect agricultural product data based on preset IoT devices;

[0066] Preprocessing the agricultural product data to obtain corresponding first agricultural product data;

[0067] Encapsulating the first agricultural product data into a data format that matches the blockchain network to obtain corresponding second agricultural product data;

[0068] Get the target key that meets the preset length condition;

[0069] Obtaining factor data of a plurality of preset encryption algorithms, and determining a target encryption algorithm from all the encryption algorithms based on the factor data;

[0070] Encrypting the second agricultural product data based on the target key and the target encryption algorithm to obtain corresponding target agricultural product data;

[0071] The target agricultural product data is stored in the blockchain network based on a preset Internet of Things gateway device.

[0072] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0073] This application first collects agricultural product data based on a preset Internet of Things device, and pre-processes the agricultural product data to obtain the corresponding first agricultural product data; then encapsulates the first agricultural product data into a data format that matches the blockchain network to obtain the corresponding second agricultural product data; then obtains a target key that meets the preset length condition; subsequently obtains factor data of a plurality of preset encryption algorithms, and determines the target encryption algorithm from all the encryption algorithms based on the factor data; further encrypts the second agricultural product data based on the target key and the target encryption algorithm to obtain the corresponding target agricultural product data; finally, based on the preset Internet of Things gateway device, the target agricultural product data is stored in the blockchain network. This application collects agricultural product data by using an Internet of Things device, and pre-processes and formats the agricultural product data to obtain the second agricultural product data, and then uses the target key and the target encryption algorithm to encrypt the second agricultural product data to obtain the corresponding target agricultural product data, and subsequently uses the Internet of Things gateway device to store the target agricultural product data in the blockchain network, so as to record the encrypted target agricultural product data on an unalterable distributed ledger. In the chain process, the encrypted target agricultural product data is verified by consensus of multiple nodes, which effectively ensures the authenticity, accuracy and security of the target agricultural product data. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0075] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0076] Figure 2 A flowchart of an embodiment of a blockchain-based data processing method according to the present application;

[0077] Figure 3 is a schematic structural diagram of an embodiment of a blockchain-based data processing device according to the present application;

[0078] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0079] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0080] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0081] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0082] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0083] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0084] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing. In addition to the laptop computer 1011, the tablet computer 1012 or the mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer, a desktop computer, etc.

[0085] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .

[0086] It should be noted that the blockchain-based data processing method provided in the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the blockchain-based data processing device is generally set in the server / terminal device.

[0087] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0088] Continue to refer Figure 2 , showing a flowchart of an embodiment of a blockchain-based data processing method according to the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. The blockchain-based data processing method provided in the embodiment of the present application can be applied to any scenario where data storage is required, and the blockchain-based data processing method can be applied to products in these scenarios, for example, agricultural insurance business data storage in the financial insurance field. The blockchain-based data processing method includes the following steps:

[0089] Step S201, collecting agricultural product data based on preset Internet of Things devices.

[0090] In this embodiment, the blockchain-based data processing method is executed on an electronic device (e.g. Figure 1The server / terminal device shown in the figure) can obtain agricultural product data through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wi deband) connection, and other wireless connection methods currently known or developed in the future. The execution subject of this application may be a data processing system, and may be referred to as a system. Specifically, the architecture design of the system includes: 1. Layered architecture design. The system adopts a layered architecture design, including an application layer, a contract layer, a network layer and a data layer. The application layer provides users with a visual front-end interface and is responsible for interaction and business logic processing. The contract layer contains smart contracts that encode agricultural insurance business rules and is responsible for automating the execution of key processes. The network layer realizes distributed consensus and reliable transmission based on blockchain technology. The data layer is responsible for collecting, storing and managing data throughout the life cycle of agricultural products. 2. Application of blockchain technology. Based on the blockchain network, an agricultural insurance traceability system including modules such as mobile applications, smart contracts, and data collection is constructed. Farmers, insurance companies, regulatory authorities and other participants play different roles in the system to achieve data collection, claims review, supervision and other functions. 3. IoT data collection. The system uploads data related to agricultural product production, processing and sales through the middle platform. The middle platform provides relevant upload, modification, query and verification interfaces to ensure the authenticity and validity of all data. And all data modification records will be fully recorded, which can effectively guarantee the authenticity of traceability result information. Among them, suitable IoT devices such as temperature and humidity sensors, light sensors, cameras, etc. can be selected according to the planting or breeding needs of agricultural products. Then install the IoT devices at key locations of agricultural product planting and breeding bases to ensure that the required data can be fully covered and accurately collected. In addition, configure the parameters of IoT devices, such as sampling frequency, data transmission method, etc., to meet the needs of data collection. And ensure that the IoT devices can be stably connected to the Internet or local area network for real-time data transmission.

[0091] Step S202, preprocessing the agricultural product data to obtain corresponding first agricultural product data.

[0092] In this embodiment, the above-mentioned specific implementation process of preprocessing the agricultural product data to obtain the corresponding first agricultural product data will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated in detail here.

[0093] Step S203: encapsulate the first agricultural product data into a data format that matches the blockchain network to obtain corresponding second agricultural product data.

[0094] In this embodiment, the first agricultural product data obtained after preprocessing can be encapsulated into a format recognizable by the blockchain network, such as a transaction or a block, to obtain the corresponding second agricultural product data. Each block or transaction usually contains metadata (such as a timestamp, trader information, etc.) and a payload (i.e., actual data).

[0095] Step S204, obtaining a target key that meets a preset length condition.

[0096] In this embodiment, the length condition is greater than 128 bits. By selecting a strong key greater than 128 bits for encryption, such as a 192-bit or 256-bit target key, the security of encryption can be effectively ensured.

[0097] Step S205: Obtain factor data of a plurality of preset encryption algorithms, and determine a target encryption algorithm from all the encryption algorithms based on the factor data.

[0098] In this embodiment, the above-mentioned factor data of the preset multiple encryption algorithms are obtained, and the specific implementation process of the target encryption algorithm is determined from all the encryption algorithms based on the factor data. This application will provide further detailed descriptions of this in subsequent specific embodiments, and will not be elaborated in detail here.

[0099] Step S206, encrypting the second agricultural product data based on the target key and the target encryption algorithm to obtain corresponding target agricultural product data.

[0100] In this embodiment, the second agricultural product data is encrypted by using the target key and the target encryption algorithm to generate corresponding encrypted target agricultural product data, and the encrypted data block can only be decrypted by an entity with a correct key.

[0101] Step S207: storing the target agricultural product data in the blockchain network based on a preset Internet of Things gateway device.

[0102] In this embodiment, the IoT gateway device is responsible for converting the data from the IoT device, i.e., the target agricultural product data, into a protocol format suitable for blockchain network transmission, and selecting the best route to forward the target agricultural product data to the appropriate node in the blockchain network. The target agricultural product data is uploaded to the blockchain network by using the IoT gateway device and recorded in an unalterable distributed ledger. During the chaining process, the target agricultural product data is encrypted and verified by consensus of multiple nodes, ensuring the authenticity and security of the target agricultural product data. At the same time, each data record will be associated with a unique hash fingerprint to provide a basis for subsequent traceability.

[0103] This application collects agricultural product data by using an IoT device, and pre-processes and formats the agricultural product data to obtain second agricultural product data, and then uses a target key and a target encryption algorithm to encrypt the second agricultural product data to obtain corresponding target agricultural product data, and subsequently uses an IoT gateway device to store the target agricultural product data in a blockchain network, so as to record the encrypted target agricultural product data in an unalterable distributed ledger. During the chaining process, the encrypted target agricultural product data is verified by consensus of multiple nodes, effectively ensuring the authenticity, accuracy and security of the target agricultural product data.

[0104] In some optional implementations, step S205 includes the following steps:

[0105] The security data, performance data, compatibility data and popularity data of each of the encryption algorithms are obtained.

[0106] In this embodiment, the above-mentioned encryption algorithms may at least include AES, DES, B l owfish and other algorithms. The above-mentioned security data refers to the ability data of the algorithm to resist various attacks (such as brute force cracking, man-in-the-middle attack, differential cryptanalysis, etc.). The above-mentioned performance data refers to the speed of the algorithm during encryption and decryption and resource consumption (such as CPU, memory). The above-mentioned compatibility data refers to the support level data of the algorithm in different platforms, operating systems and programming languages. The above-mentioned popularity data refers to the frequency of use and recognition data of the algorithm in the industry, open source community and actual applications. Among them, the security data, performance data, compatibility data and popularity data of each of the encryption algorithms can be determined by actually testing various encryption algorithms.

[0107] The security data, performance data, compatibility data and popularity data of each encryption algorithm are evaluated and processed based on preset scoring rules to obtain the security score, performance score, compatibility score and popularity score of each encryption algorithm.

[0108] In this embodiment, corresponding scoring rules are set for various factor data. Specifically, 1. For security. Evaluation criteria: algorithm's anti-cracking ability (based on key length, number of encryption rounds, etc.); resistance to known cryptanalysis attacks (such as differential cryptanalysis, linear cryptanalysis, etc.); whether there are known security vulnerabilities or weaknesses. Scoring criteria (out of 10 points): No known security vulnerabilities: 5 points. Strong anti-cracking ability (such as key length ≥ 256 bits): 3 points. Effective resistance to known cryptanalysis attacks: 2 points. 2. For performance. Evaluation criteria: encryption and decryption speed (processing speed, such as the amount of data encrypted / decrypted per second); resource consumption (CPU usage, memory usage, etc.); whether hardware acceleration is supported (such as AES-NI instruction set). Scoring criteria (out of 10 points): High-speed encryption / decryption (relative to other algorithms): 5 points. Low resource consumption: 3 points. Support for hardware acceleration: 2 points. 3. Regarding compatibility. Evaluation criteria: Support on different operating systems (such as Windows, Linux, macOS, etc.); Library and tool support in different programming languages; Compatibility with existing systems and standards (such as TLS / SSL protocol, VPN protocol, etc.); Scoring criteria (out of 10 points): Wide support for various operating systems: 4 points. Support for multiple programming language libraries: 3 points. Compatibility with existing systems and standards: 3 points. 4. Regarding popularity. Evaluation criteria: Frequency of use in the industry and open source community. Whether it is adopted by well-known projects and companies. The richness of related tutorials, documents and community resources. Scoring criteria (out of 10 points): High frequency of use (based on market reports or statistics): 4 points. Adoption by well-known projects and companies: 3 points. Rich tutorials, documents and community resources: 3 points.

[0109] The security score, performance score, compatibility score and popularity score of each encryption algorithm are calculated and processed to obtain a comprehensive score of each encryption algorithm.

[0110] In this embodiment, the above-mentioned security score, performance score, compatibility score and popularity score of each encryption algorithm are calculated and processed to obtain the specific implementation process of the comprehensive score of each encryption algorithm. This application will provide further detailed descriptions of this in subsequent specific embodiments and will not be elaborated in detail here.

[0111] The target comprehensive score with the highest value is selected from all the comprehensive scores.

[0112] In this embodiment, all the comprehensive scores may be numerically compared to select the target comprehensive score with the highest value from among all the comprehensive scores.

[0113] Obtain a designated encryption algorithm corresponding to the target comprehensive score, and use the designated encryption algorithm as the target encryption algorithm.

[0114] In this embodiment, the target encryption algorithm is the algorithm with the highest comprehensive score among all encryption algorithms.

[0115] The present application evaluates and processes the security data, performance data, compatibility data and popularity data of each encryption algorithm obtained based on the use of preset scoring rules, obtains the security score, performance score, compatibility score and popularity score of each encryption algorithm, and then calculates and processes the security score, performance score, compatibility score and popularity score of each encryption algorithm to obtain the comprehensive score of each encryption algorithm, and then selects the designated encryption algorithm with the highest comprehensive score from all encryption algorithms as the final target encryption algorithm. Since the target encryption algorithm has the optimal comprehensive ability corresponding to security, performance, compatibility and popularity, it effectively improves the determination accuracy and determination intelligence of the target encryption algorithm. And subsequently, by using the selected optimal target encryption algorithm to encrypt the second agricultural product data to obtain the target agricultural product data, the encryption processing efficiency of the second agricultural product data can be effectively improved, and the data security of the obtained target agricultural product data can be guaranteed.

[0116] In some optional implementations of this embodiment, the security score, performance score, compatibility score, and popularity score of each encryption algorithm are calculated to obtain a comprehensive score of each encryption algorithm, including the following steps:

[0117] Get the preset weight processing algorithm.

[0118] In this embodiment, there is no specific limitation on the selection of the above-mentioned weight processing algorithm, and any one of entropy method, principal component analysis method, AHP hierarchical analysis method, factor analysis method, standardization method, etc. can be used.

[0119] Based on the weight processing algorithm, a first weight, a second weight, a third weight and a fourth weight are generated corresponding to the security factor, the performance factor, the compatibility factor and the popularity factor respectively.

[0120] In this embodiment, weight calculation processing can be performed on all factors (security factors, performance factors, compatibility factors and popularity factors) according to the operating steps of calculating weights matched in the above-mentioned weight processing algorithm, so as to obtain the first weight, second weight, third weight and fourth weight corresponding to the security factor, performance factor, compatibility factor and popularity factor respectively.

[0121] Call the preset score calculation formula.

[0122] In this embodiment, the above score calculation formula may specifically include: S=a*M+b*N+c*O+d*P, wherein S is the algorithm score, M is the security score, a is the first weight, N is the performance score, b is the second weight, O is the compatibility score, c is the third weight, P is the popularity score, and d is the fourth weight.

[0123] Based on the first weight, the second weight, the third weight and the fourth weight, the security score, performance score, compatibility score and popularity score of each encryption algorithm are calculated using the score calculation formula to obtain a comprehensive score for each encryption algorithm.

[0124] In this embodiment, the first weight, the second weight, the third weight, the fourth weight and the security score, performance score, compatibility score and popularity score of each encryption algorithm can be substituted into the corresponding positions in the above score calculation formula for calculation, so as to obtain a comprehensive score for each encryption algorithm.

[0125] This application generates the first weight, second weight, third weight and fourth weight corresponding to the security factor, performance factor, compatibility factor and popularity factor respectively based on the preset weight processing algorithm, and then calculates and processes the security score, performance score, compatibility score and popularity score of each encryption algorithm based on the use of the score calculation formula, so as to achieve the rapid and accurate generation of the comprehensive score of each encryption algorithm, and ensure the data accuracy of the generated comprehensive score of each encryption algorithm. It is conducive to the subsequent determination of the target encryption algorithm used for the encryption processing of the second agricultural product data from all encryption algorithms according to the obtained comprehensive score of each encryption algorithm, thereby effectively improving the determination accuracy and intelligence of the target encryption algorithm.

[0126] In some optional implementations, step S202 includes the following steps:

[0127] The agricultural product data is subjected to denoising processing to obtain corresponding first data.

[0128] In this embodiment, the above-mentioned denoising process refers to using a filtering algorithm or data cleaning technology to remove noise and abnormal values ​​in the original agricultural product data to improve data quality.

[0129] Perform data cleaning on the first data to obtain corresponding second data.

[0130] In this embodiment, the data cleaning process refers to checking and deleting duplicate data, incomplete data or invalid data to ensure the integrity and accuracy of the data.

[0131] Perform format conversion processing on the second data to obtain corresponding third data.

[0132] In this embodiment, the above-mentioned format conversion processing refers to converting the second data obtained after cleaning into a unified format, such as JSON, XML, etc., for subsequent processing and storage.

[0133] The third data is used as the first agricultural product data.

[0134] This application performs denoising, data cleaning and format conversion on agricultural product data to achieve intelligent and rapid preprocessing of agricultural product data, thereby effectively ensuring the accuracy and standardization of the generated first agricultural product data.

[0135] In some optional implementations, after step S207, the electronic device may further perform the following steps:

[0136] Determine whether a claim application triggered by a first user is received; wherein the claim application carries user information of the user and identification information corresponding to the claim subject.

[0137] In this embodiment, a user-friendly front-end interface including a claim application form, a claim status query and other functions is pre-designed according to business needs. The first user may be a farmer who has a need to make an agricultural insurance claim. The first user may trigger a corresponding claim application by clicking a claim button in the above-mentioned front-end interface, and may simultaneously enter corresponding user information and identification information corresponding to the claim subject in the front-end page. The above-mentioned claim subject may refer to a specific agricultural product that has suffered a natural disaster or accidental loss. The above-mentioned identification information may refer to the name information corresponding to the claim subject.

[0138] If so, extract the user information and the identification information from the claim application.

[0139] In this embodiment, the claim application may be parsed to extract corresponding user information and identification information corresponding to the claim mark.

[0140] The user information is verified based on a preset authority control policy.

[0141] In this embodiment, according to the actual permission control requirements, a detailed permission control strategy is pre-formulated to clarify the operation permissions and data access permissions of each role. The operations of the participants can be controlled and restricted according to the constructed permission control strategy to ensure the security of data and operations. Among them, public key cryptography technology is used to realize the identity authentication and permission management of the participants. Each participant has a public key and a private key pair. The public key is used to encrypt data and verify signatures, and the private key is used to decrypt data and generate signatures. In addition, a digital certificate is issued to the participant, which contains the public key and identity information. When the participant performs an operation, the private key is used to sign the data, and the signature is sent together with the data to other participants or the system platform for verification.

[0142] Specifically, the process of building a trust mechanism includes: 1. Participation of multiple parties. The system brings together farmers, insurance companies, regulatory authorities and other parties to participate. Each party plays different roles in the system, such as farmers providing production data, insurance companies underwriting claims, and regulatory authorities supervising and managing. Through the joint participation of multiple parties, an ecological environment of mutual supervision and collaboration has been formed. 2. Identity authentication and authority control The system uses public key cryptography to implement identity authentication and authority control of participants. Each participant has a unique digital identity certificate to verify identity and authority. The system sets up refined access control strategies according to different roles to ensure the security of data and operations. 3. Distributed consensus mechanism The system is based on the distributed consensus mechanism of blockchain to establish trust between participants. All transaction records and data changes need to be verified and agreed upon by multiple nodes, and the data is difficult to be tampered with. At the same time, the consensus mechanism also ensures the high availability and anti-censorship of the system.

[0143] If the user information passes the verification, the third agricultural product data corresponding to the identification information is obtained from the blockchain network.

[0144] In this embodiment, if the user information passes the verification, it is determined that the user has passed the identity authentication and authority control, and then the agricultural product data record related to the identification information corresponding to the claim subject will be retrieved from the blockchain network, that is, the above-mentioned third agricultural product data.

[0145] Call the smart contract corresponding to the agricultural insurance, and compare the third agricultural product data with the compensation conditions in the smart contract to determine whether the third agricultural product data meets the compensation conditions.

[0146] In this embodiment, the third agricultural product data is compared with the compensation conditions in the smart contract, and it is determined whether the third agricultural product data meets the compensation conditions. If the compensation conditions are met, the smart contract will automatically trigger and execute the subsequent compensation process. Among them, the design process of the smart contract includes: Step 1: Demand analysis and rule determination. 1) Analyze agricultural insurance business needs: In-depth understanding of the specific business needs of agricultural insurance, including insurance coverage, compensation standards, claims conditions, etc. 2) Determine contract rules: According to business needs, clarify the specific rules and terms that should be included in the smart contract to ensure the accuracy and completeness of the contract content. Step 2: Contract coding and testing. 1) Select a development environment: Select a suitable smart contract development environment, such as Solidi ty (for Ethereum), Go (for Fabric, etc.). 2) Write a smart contract: According to the determined contract rules, use the corresponding programming language to write the smart contract code. The code must include contract state variables, functions (such as insurance, claim application, payment calculation, etc.) and events. 3) Contract testing: Perform unit testing and integration testing on smart contracts in the development environment to ensure the correctness and security of the contract logic. Step 3: Contract deployment. 1) Select a blockchain platform: Select a suitable blockchain platform (such as Ethereum, Hyperledger Fabric, etc.) to deploy smart contracts based on business needs and technology selection. 2) Deploy contracts: Deploy the written and tested smart contracts to the blockchain platform to make them an integral part of the blockchain network.

[0147] If so, the compensation processing corresponding to the claim subject is executed based on the smart contract.

[0148] In this embodiment, the above compensation processing includes compensation calculation and compensation transfer. Compensation calculation includes: according to the compensation standard and the loss of agricultural products, the smart contract automatically calculates the compensation amount using a preset compensation calculation formula. Compensation transfer includes: automatically transferring the calculated compensation amount to the account designated by the farmer to realize the automation of the compensation process.

[0149] After receiving the claim application triggered by the first user, this application will first extract the user information and the identification information from the claim application, and use the preset authority control strategy to verify the user information. If the user information passes the verification, the third agricultural product data corresponding to the identification information is obtained from the blockchain network, and then the smart contract corresponding to the agricultural insurance is called, and the third agricultural product data is compared with the compensation conditions in the smart contract to determine whether the third agricultural product data meets the compensation conditions. If the compensation conditions are met, the compensation processing corresponding to the claim subject is automatically executed based on the smart contract. It is achieved that when the smart contract is triggered, the corresponding claim processing can be automatically executed in the blockchain network without manual intervention, which effectively improves the processing efficiency and accuracy of the claims business.

[0150] In some optional implementations of this embodiment, after step S207, the electronic device may further perform the following steps:

[0151] Determine whether a query request triggered by a second user is received.

[0152] In this embodiment, the second user may be a farmer. A query button corresponding to the data query function is pre-set in the system, and the user can trigger the corresponding query request by clicking the query button. Among them, an interface with the blockchain is designed in the system to obtain the stored agricultural product data from the blockchain network. At the same time, a database needs to be maintained for storing and managing query requests, query results and other data.

[0153] If yes, display the default query page.

[0154] In this embodiment, a user-friendly visualization page is pre-developed, namely the above-mentioned query page, which provides a query input box, screening conditions (such as time, location, link, etc.) and a query result display area. Users can enter query conditions through the interface to perform corresponding data query processing.

[0155] Receive the query condition entered by the second user in the query page.

[0156] In this embodiment, the query conditions may be input according to the personal needs of the second user, and may include conditions such as time, location, and link.

[0157] Construct a corresponding query statement based on the query condition, and send the query statement to the blockchain network.

[0158] In this embodiment, a corresponding query statement can be constructed according to the query conditions input by the second user, and a query request can be sent to the blockchain network so that the blockchain network can retrieve data according to the query request and feedback the query results obtained by the retrieval.

[0159] Receive a query result corresponding to the query statement returned by the blockchain network.

[0160] In this embodiment, after receiving the query result returned by the blockchain network, the query result can also be formatted to ensure that it matches the data display format of the query page, thereby improving the intelligence of the data display.

[0161] The query result is displayed based on the query page.

[0162] In this embodiment, the user can view the traceability information of specific agricultural products on the query page, including data on each link such as planting, breeding, processing, and circulation.

[0163] After receiving the query request triggered by the second user, the present application will intelligently display a preset query page, and receive the query conditions entered by the second user in the query page, and then construct a corresponding query statement based on the query conditions, and send the query statement to the blockchain network, and subsequently receive the query result corresponding to the query statement returned by the blockchain network and display it in the query page, so as to realize the use based on the query page and the blockchain network, and can automatically and accurately provide the user with corresponding data query and display services according to the query request of the second user, thereby improving the intelligence of data query and improving the user experience.

[0164] In some optional implementations of this embodiment, after step S207, the electronic device may further perform the following steps:

[0165] It is determined whether an anti-counterfeiting verification code input by a third user in a preset traceability query page is received.

[0166] In this embodiment, the system also provides an anti-counterfeiting traceability query function. Specifically, a unique QR code label is generated on the packaging of agricultural products in advance, and the QR code is associated with the traceability information on the blockchain. This QR code can contain basic information of the product, production batch number, anti-counterfeiting verification code, etc. Consumers can scan the QR code on the product packaging through terminal devices such as mobile phones to enter the traceability query page. On the traceability query page, users can enter the anti-counterfeiting verification code for verification and view the detailed traceability information of the product.

[0167] If yes, the anti-counterfeiting verification code is verified.

[0168] In this embodiment, the anti-counterfeiting verification code is verified by using a preset anti-counterfeiting database, and if data matching the anti-counterfeiting verification code is stored in the anti-counterfeiting database, the anti-counterfeiting verification code is determined to have passed the verification, otherwise the anti-counterfeiting verification code is determined to have failed the verification. The anti-counterfeiting database is a pre-built database storing a plurality of legal anti-counterfeiting verification codes of agricultural products.

[0169] If the anti-counterfeiting verification code passes the verification, the product traceability information corresponding to the anti-counterfeiting verification code is obtained from the blockchain network, and the product traceability information is displayed on the traceability query page.

[0170] In this embodiment, if the anti-counterfeiting verification code passes the verification, the corresponding product traceability information can be retrieved and returned from the blockchain network based on the anti-counterfeiting verification code input by the third user, and the product traceability information can be displayed in the traceability query page.

[0171] If the anti-counterfeiting verification code fails to pass the verification, preset risk warning information is generated, and the risk warning information is displayed on the traceability query page.

[0172] In this embodiment, the risk warning information may be information used to remind the user that the product may be counterfeit or inferior.

[0173] When the present application receives an anti-counterfeiting verification code input by a third user in a preset traceability query page, the present application will intelligently verify the anti-counterfeiting verification code. If the anti-counterfeiting verification code passes the verification, the product traceability information corresponding to the anti-counterfeiting verification code is obtained from the blockchain network, and the product traceability information is displayed in the traceability query page. If the anti-counterfeiting verification code fails the verification, preset risk warning information is generated, and the risk warning information is displayed in the traceability query page. In this way, the use of the traceability query page and the blockchain network is realized, and the corresponding product traceability and display services can be automatically and accurately provided to the user according to the anti-counterfeiting verification code input by the third user, thereby improving the intelligence of the product traceability processing and the user experience.

[0174] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0175] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target agricultural product data, the above-mentioned target agricultural product data can also be stored in a node of a blockchain.

[0176] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0177] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0178] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0179] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0180] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0181] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a data processing device based on blockchain, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0182] like Figure 3 As shown, the blockchain-based data processing device 300 described in this embodiment includes: a collection module 301, a preprocessing module 302, a packaging module 303, a first acquisition module 304, a determination module 305, an encryption module 306 and a storage module 307. Among them:

[0183] The collection module 301 is used to collect agricultural product data based on preset Internet of Things devices;

[0184] A preprocessing module 302 is used to preprocess the agricultural product data to obtain corresponding first agricultural product data;

[0185] The encapsulation module 303 is used to encapsulate the first agricultural product data into a data format that matches the blockchain network to obtain corresponding second agricultural product data;

[0186] A first acquisition module 304 is used to acquire a target key that meets a preset length condition;

[0187] The determination module 305 is used to obtain factor data of a plurality of preset encryption algorithms, and determine a target encryption algorithm from all the encryption algorithms based on the factor data;

[0188] An encryption module 306 is used to encrypt the second agricultural product data based on the target key and the target encryption algorithm to obtain corresponding target agricultural product data;

[0189] The storage module 307 is used to store the target agricultural product data in the blockchain network based on a preset Internet of Things gateway device.

[0190] In some optional implementations of this embodiment, the determining module 305 includes:

[0191] An acquisition submodule, used to acquire security data, performance data, compatibility data and popularity data of each encryption algorithm;

[0192] An evaluation submodule, for evaluating the security data, performance data, compatibility data and popularity data of each encryption algorithm based on a preset scoring rule, and obtaining a security score, performance score, compatibility score and popularity score of each encryption algorithm;

[0193] A calculation submodule, used to calculate the security score, performance score, compatibility score and popularity score of each encryption algorithm to obtain a comprehensive score of each encryption algorithm;

[0194] A screening submodule, used to screen out the target comprehensive score with the highest value from all the comprehensive scores;

[0195] The first determination submodule is used to obtain a designated encryption algorithm corresponding to the target comprehensive score, and use the designated encryption algorithm as the target encryption algorithm.

[0196] In some optional implementations of this embodiment, the calculation submodule includes:

[0197] An acquisition unit, used to acquire a preset weight processing algorithm;

[0198] A generating unit, configured to generate, based on the weight processing algorithm, a first weight, a second weight, a third weight, and a fourth weight corresponding to the security factor, the performance factor, the compatibility factor, and the popularity factor, respectively;

[0199] A calling unit, used to call a preset score calculation formula;

[0200] A calculation unit is used to calculate the security score, performance score, compatibility score and popularity score of each encryption algorithm based on the first weight, the second weight, the third weight and the fourth weight using the score calculation formula to obtain a comprehensive score for each encryption algorithm.

[0201] In some optional implementations of this embodiment, the preprocessing module 302 includes:

[0202] A first processing submodule, used for performing denoising processing on the agricultural product data to obtain corresponding first data;

[0203] A second processing submodule, used for performing data cleaning processing on the first data to obtain corresponding second data;

[0204] A third processing submodule, used for performing format conversion processing on the second data to obtain corresponding third data;

[0205] The second determining submodule is used to use the third data as the first agricultural product data.

[0206] In some optional implementations of this embodiment, the blockchain-based data processing device further includes:

[0207] A first judgment module is used to judge whether a claim application triggered by a first user is received; wherein the claim application carries user information of the user and identification information corresponding to the claim subject;

[0208] An extraction module, configured to extract the user information and the identification information from the claim application;

[0209] A first verification module, used to verify the user information based on a preset authority control policy;

[0210] A second acquisition module, configured to acquire third agricultural product data corresponding to the identification information from the blockchain network if the user information passes the verification;

[0211] A comparison module, used to call the smart contract corresponding to the agricultural insurance, and compare the third agricultural product data with the compensation conditions in the smart contract to determine whether the third agricultural product data meets the compensation conditions;

[0212] An execution module is used to execute the compensation processing corresponding to the claim subject based on the smart contract.

[0213] In some optional implementations of this embodiment, the blockchain-based data processing device further includes:

[0214] A second determination module, used to determine whether a query request triggered by a second user is received;

[0215] The first display module is used to display a preset query page if yes;

[0216] A first receiving module, used for receiving the query condition input by the second user in the query page;

[0217] A sending module, used to construct a corresponding query statement based on the query condition and send the query statement to the blockchain network;

[0218] A second receiving module is used to receive a query result corresponding to the query statement returned by the blockchain network;

[0219] The second display module is used to display the query result based on the query page.

[0220] In some optional implementations of this embodiment, the blockchain-based data processing device further includes:

[0221] A third judgment module is used to judge whether an anti-counterfeiting verification code input by a third user in a preset traceability query page is received;

[0222] A second verification module is used to verify the anti-counterfeiting verification code if yes;

[0223] A third display module is used to obtain product traceability information corresponding to the anti-counterfeiting verification code from the blockchain network if the anti-counterfeiting verification code passes the verification, and display the product traceability information on the traceability query page;

[0224] The fourth display module is used to generate preset risk warning information if the anti-counterfeiting verification code fails to pass the verification, and display the risk warning information in the traceability query page.

[0225] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0226] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc.

[0227] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0228] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of a data processing method based on blockchain. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0229] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the blockchain-based data processing method.

[0230] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0231] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the blockchain-based data processing method as described above.

[0232] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0233] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A data processing method based on blockchain, characterized in that: The steps include: Collect agricultural product data based on preset IoT devices; Preprocessing the agricultural product data to obtain corresponding first agricultural product data; Encapsulating the first agricultural product data into a data format that matches the blockchain network to obtain corresponding second agricultural product data; Get the target key that meets the preset length condition; Obtaining factor data of a plurality of preset encryption algorithms, and determining a target encryption algorithm from all the encryption algorithms based on the factor data; Encrypting the second agricultural product data based on the target key and the target encryption algorithm to obtain corresponding target agricultural product data; The target agricultural product data is stored in the blockchain network based on a preset Internet of Things gateway device.

2. The data processing method based on blockchain according to claim 1 is characterized in that: The step of obtaining factor data of a plurality of preset encryption algorithms and determining a target encryption algorithm from all the encryption algorithms based on the factor data specifically includes: Obtaining security data, performance data, compatibility data, and popularity data of each of the encryption algorithms; Based on the preset scoring rules, the security data, performance data, compatibility data and popularity data of each encryption algorithm are evaluated and processed to obtain the security score, performance score, compatibility score and popularity score of each encryption algorithm; Calculating the security score, performance score, compatibility score and popularity score of each encryption algorithm to obtain a comprehensive score of each encryption algorithm; Filter out the target comprehensive score with the highest value from all the comprehensive scores; Obtain a designated encryption algorithm corresponding to the target comprehensive score, and use the designated encryption algorithm as the target encryption algorithm.

3. The data processing method based on blockchain according to claim 2 is characterized in that: The step of calculating the security score, performance score, compatibility score and popularity score of each encryption algorithm to obtain a comprehensive score of each encryption algorithm specifically includes: Get the preset weight processing algorithm; Generate a first weight, a second weight, a third weight and a fourth weight corresponding to the security factor, the performance factor, the compatibility factor and the popularity factor respectively based on the weight processing algorithm; Call the preset score calculation formula; Based on the first weight, the second weight, the third weight and the fourth weight, the security score, performance score, compatibility score and popularity score of each encryption algorithm are calculated using the score calculation formula to obtain a comprehensive score for each encryption algorithm.

4. The data processing method based on blockchain according to claim 1 is characterized in that: The step of preprocessing the agricultural product data to obtain corresponding first agricultural product data specifically includes: Performing denoising processing on the agricultural product data to obtain corresponding first data; Performing data cleaning processing on the first data to obtain corresponding second data; Performing format conversion processing on the second data to obtain corresponding third data; The third data is used as the first agricultural product data.

5. The data processing method based on blockchain according to claim 1 is characterized in that: After the step of storing the target agricultural product data in the blockchain network based on the preset Internet of Things gateway device, the method further includes: Determining whether a claim application triggered by a first user is received; wherein the claim application carries user information of the user and identification information corresponding to the claim subject; If so, extracting the user information and the identification information from the claim application; Verifying the user information based on a preset authority control policy; If the user information passes the verification, obtaining third agricultural product data corresponding to the identification information from the blockchain network; Calling a smart contract corresponding to agricultural insurance, and comparing the third agricultural product data with the compensation conditions in the smart contract to determine whether the third agricultural product data meets the compensation conditions; If so, the compensation processing corresponding to the claim subject is executed based on the smart contract.

6. The data processing method based on blockchain according to claim 1 is characterized in that: After the step of storing the target agricultural product data in the blockchain network based on the preset Internet of Things gateway device, the method further includes: Determining whether a query request triggered by a second user is received; If yes, display the preset query page; receiving a query condition input by the second user in the query page; Construct a corresponding query statement based on the query condition, and send the query statement to the blockchain network; Receiving a query result corresponding to the query statement returned by the blockchain network; The query result is displayed based on the query page.

7. The data processing method based on blockchain according to claim 1 is characterized in that: After the step of storing the target agricultural product data in the blockchain network based on the preset Internet of Things gateway device, the method further includes: Determining whether an anti-counterfeiting verification code entered by a third user in a preset traceability query page is received; If yes, verify the anti-counterfeiting verification code; If the anti-counterfeiting verification code passes the verification, the product traceability information corresponding to the anti-counterfeiting verification code is obtained from the blockchain network, and the product traceability information is displayed on the traceability query page; If the anti-counterfeiting verification code fails to pass the verification, preset risk warning information is generated, and the risk warning information is displayed on the traceability query page.

8. A data processing device based on blockchain, characterized in that: include: A collection module, used to collect agricultural product data based on preset IoT devices; A preprocessing module, used for preprocessing the agricultural product data to obtain corresponding first agricultural product data; A packaging module, used to package the first agricultural product data into a data format that matches the blockchain network to obtain corresponding second agricultural product data; A first acquisition module, used to acquire a target key that meets a preset length condition; A determination module, used to obtain factor data of a plurality of preset encryption algorithms, and determine a target encryption algorithm from all the encryption algorithms based on the factor data; An encryption module, used for encrypting the second agricultural product data based on the target key and the target encryption algorithm to obtain corresponding target agricultural product data; A storage module is used to store the target agricultural product data in the blockchain network based on a preset Internet of Things gateway device.

9. A computer device, characterized in that: It includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the blockchain-based data processing method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the blockchain-based data processing method as described in any one of claims 1 to 7.