A Fabric-based method and system for information sharing between cross-departmental Internet of Things systems
By adopting Fabric-based information sharing method in the Internet of Things system, using Hadoop cluster to store event resources and trigger smart contracts, the reliability and security issues of direct communication between devices in the Internet of Things system are solved, and efficient and secure information sharing between devices is achieved.
Patent Information
- Application Number
- CN202111373644.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-11-19
AI Technical Summary
Existing IoT systems have reliability and security problems when directly communicating between devices, and traditional third-party platforms have low transmission efficiency, making it impossible to achieve highly interactive inter-device communication.
The information sharing method between cross-department Internet of Things systems based on Fabric is adopted. Event resources and information are obtained through the first device module, and event resources and information are transmitted to the Hadoop module and respond to the Fabric module, triggering smart contracts and storing event information. The second device module obtains the triggering of smart contracts in real time, issues working instructions, and enhances security and reliability.
It realizes the security and reliability of information sharing among devices, avoids the failure risk of direct device interaction, enhances the interactivity of communication, and stores event resources through Hadoop clusters to ensure its security and traceability.
Smart Images

Figure CN114116897B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Things, and in particular to a Fabric-based method and system for information sharing between cross-departmental Internet of Things systems. Background Art
[0002] With the in-depth development of the Internet of Things, the number of connected devices in the Internet of Things network is increasing, and they are easily exposed to malicious attacks. If direct communication is used, when a device has a problem, the entire system will fail, which brings great difficulties to resource sharing. Traditional smart city infrastructure uses a closed-loop Internet of Things system to manage, analyze and control data, lacking a highly reliable and securely shared network architecture.
[0003] In order to avoid the problems caused by direct communication between devices, existing technologies often introduce third-party platforms as information transmission channels to achieve information interaction between devices. However, third-party platforms still have security issues and low transmission efficiency, and cannot achieve highly interactive communication between devices. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a method and system for information sharing between cross-departmental Internet of Things systems based on Fabric.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A Fabric-based method for information sharing between cross-departmental Internet of Things systems includes the following steps:
[0007] Acquire the first event resource and the first event information through the first device module, transmit the first device ID and the first event resource to the Hadoop module, and respond to the Fabric module according to the first event information and time information;
[0008] The first event resource is stored in the Hadoop cluster according to the first device ID by the Hadoop module;
[0009] Trigger the smart contract of the first event information through the Fabric module and store the event information and time information;
[0010] Obtain the triggering status of the smart contract in real time through the second device module:
[0011] When the Fabric module is detected to trigger the smart contract of the first event information, the Fabric module is responded with the second event information and time information;
[0012] When the Fabric module is detected to trigger the smart contract of the second event information, a second device work instruction is issued.
[0013] Further, after issuing the second device working instruction, the Fabric module is responded with the second device working status information and time information.
[0014] Furthermore, the stored event information and time information are displayed through a front-end display module.
[0015] Furthermore, the front-end display module obtains event information every 1 to 3 seconds by polling.
[0016] Furthermore, the Fabric module triggers the smart contract through the Fabric web server.
[0017] Furthermore, the first device module communicates with the Fabric module according to the http protocol.
[0018] Furthermore, the event resources include but are not limited to images.
[0019] Furthermore, the Fabric module is constructed using a docker container method.
[0020] A Fabric-based inter-departmental Internet of Things system information sharing system includes a first device module, a second device module, a Hadoop module, a Fabric module and a database module, wherein:
[0021] The first device module is used to obtain the first event resource and the first event information, transmit the first device ID and the first event resource to the Hadoop module, and respond to the Fabric module according to the first event information and time information;
[0022] The Hadoop module is used to store the first event resource in the Hadoop cluster according to the first device id;
[0023] The Fabric module is used to trigger the smart contract corresponding to the event information and transmit the event information and time information to the database module;
[0024] The database module is used to store event information and time information;
[0025] The second device module is used to obtain the triggering status of the smart contract in real time. When it is detected that the Fabric module triggers the smart contract of the first event information, it responds to the Fabric module with the second event information and time information. When it is detected that the Fabric module triggers the smart contract of the second event information, it issues a second device work instruction.
[0026] Furthermore, the database is a key-value database.
[0027] Compared with the prior art, the present invention has the following advantages:
[0028] 1. The present invention stores the events generated by the device based on the Fabric network to ensure its security and traceability, and combines with the smart contract. After the first device module obtains the event information, it responds to the Fabric module, and the Fabric module calls the relevant smart contract. At the same time, the second device module obtains the call situation in real time and makes relevant decisions, avoiding the direct interaction of the Internet of Things devices, and there is no need to set up a third-party platform. The interactivity of communication between devices is ensured while enhancing security; and the event resources are stored through the Hadoop cluster to ensure its security and reliability.
[0029] 2. The device module of the present invention communicates with the Fabric module using a web method (http protocol), and the learning cost is low.
[0030] 3. The Fabric module of the present invention runs in docker and can be transplanted to other machines through the docker container, which has strong applicability.
[0031] 4. The database of the present invention adopts a key-value database, which avoids the coupling phenomenon between data. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a schematic diagram of the method flow of the present invention.
[0033] Figure 2 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION
[0034] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0035] This embodiment provides a method for sharing information between cross-departmental IoT systems based on Fabric. Figure 1 As shown, the method realizes the non-inductive charging of the car, and specifically includes the following steps:
[0036] The first event resource and the first event information are acquired through the first device module, the first device ID and the first event resource are transmitted to the Hadoop module, and the Fabric module is responded to according to the first event information and the time information.
[0037] In this embodiment, the first device module is a camera module, which can obtain a vehicle entry image as a first event resource and related vehicle information (license plate number, etc.) as first event information.
[0038] The first event resource is stored in the Hadoop cluster according to the first device ID through the Hadoop module.
[0039] The smart contract of the first event information is triggered through the Fabric module, and the event information and time information are stored.
[0040] Get the triggering status of the smart contract in real time through the RPC server of the second device module:
[0041] When the Fabric module is detected to trigger the smart contract of the first event information, the Fabric module is responded with the second event information and time information;
[0042] When the Fabric module is detected to trigger the smart contract of the second event information, a second device work instruction is issued.
[0043] In this embodiment, the second device module is arranged in the charging pile, and the second device working instruction is to enable the charging pile to start charging.
[0044] This embodiment also provides a Fabric-based cross-departmental Internet of Things system information sharing system, such as Figure 2 As shown, the system realizes the senseless charging of the car, including a first device module, a second device module, a Hadoop module, a Fabric module and a database module, wherein:
[0045] First device module: In this embodiment, the first device module is a camera module, which can obtain a vehicle entry image as a first event resource and related vehicle information (license plate number, etc.) as first event information. The specific workflow is as follows:
[0046] After acquiring the image, the device ID and the image of the camera module are transmitted to the Hadoop module, and the Fabric module is responded to according to the first event information and the current time information.
[0047] Hadoop module: The architecture design of the Hadoop distributed cluster is used to implement the storage of the first event resource. After obtaining the device ID and image transmitted by the camera module, the Hadoop module stores the image in a specific location in the Hadoop cluster according to the device ID.
[0048] Fabric module: It is constructed in the form of a docker container, initialized with public and private keys and cryptographic suites, enables Fabric-Ca and CouchDB, uses a 1orderer+4peers network topology, and after receiving a vehicle information response, uses the Fabric web server to call the smart contract for the corresponding event based on the event information of the response, and generates records of the event information and time information and transmits them to the database module.
[0049] Database module (couchdb module): In this embodiment, the database module adopts a key-value database to avoid coupling between data.
[0050] Second device module: In this embodiment, the second device module is set in the charging pile, and the triggering status of the smart contract of the first event information (vehicle information) is obtained in real time through the RPC server, and the Fabric module is responded to according to the second event information (charging pile information) and time information. At this time, the Fabric module calls the smart contract of the second event information, and transmits the charging pile information and time information to the database module. At this time, the RPC server issues a charging pile work instruction according to the triggering status of the smart contract of the second event information, and at the same time, calls the smart contract of the charging work status event according to the second device work information (charging pile work status information) and time information at this time, and transmits the event information (charging pile work status information) and time information to the database module.
[0051] The complete workflow of this system is as follows:
[0052] 1. The camera module obtains the image information of the vehicle entering, the vehicle information and the current time information.
[0053] 2. The camera module transmits the device ID and image information to the Hadoop module, which responds to the Fabric module based on the vehicle information and current time information.
[0054] 3. The Hadoop module stores the image to a specific location in the Hadoop cluster based on the device id.
[0055] 4. After receiving the vehicle information response, the Fabric module calls the smart contract of the vehicle event and transmits the vehicle information and time information to the database module.
[0056] 5. The charging pile module monitors the call of the smart contract of the vehicle event in real time. When the smart contract calling the vehicle event is detected, it responds to the Fabric module with the charging pile information and time information.
[0057] 6. After receiving the charging pile information response, the Fabric module calls the smart contract of the charging event and transmits the charging pile information and time information to the database module.
[0058] 7. After calling the smart contract of the charging event, the charging pile module issues a command for the charging pile to charge.
[0059] 8. The charging pile module senses the voltage change and responds to the Fabric module with the charging pile working information and time information.
[0060] 9. After receiving the response of the charging pile working information, the Fabric module calls the smart contract of the charging working status event, generates a record with the charging pile working information and time information, and transmits it to the database module.
[0061] The above is the workflow of a Fabric-based cross-departmental IoT system information sharing system provided by this embodiment. At the same time, this embodiment also builds a web front-end to visualize the on-chain data in the system, obtains data in a polling manner, obtains event information every 2 seconds, and displays it on the front-end display screen. At this time interval, event information will not form a blockage.
[0062] This embodiment further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by the processor, the method for sharing information between inter-departmental Internet of Things systems based on Fabric as mentioned in this embodiment can be implemented, and any combination of one or more computer-readable media can be used. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0063] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A Fabric-based method for information sharing between cross-departmental Internet of Things systems, characterized in that: The following steps are involved: Acquire the first event resource and the first event information through the first device module, transmit the first device ID and the first event resource to the Hadoop module, and respond to the Fabric module according to the first event information and time information; The first event resource is stored in the Hadoop cluster according to the first device ID by the Hadoop module; Trigger the smart contract of the first event information through the Fabric module and store the event information and time information; Obtain the triggering status of the smart contract in real time through the second device module: When the Fabric module is detected to trigger the smart contract of the first event information, the Fabric module is responded with the second event information and time information; When the Fabric module is detected to trigger the smart contract of the second event information, a second device work instruction is issued.
2. According to the Fabric-based cross-departmental Internet of Things system information sharing method according to claim 1, it is characterized in that: After issuing the second device working instruction, the Fabric module is responded with the second device working status information and time information.
3. According to the Fabric-based cross-departmental Internet of Things system information sharing method according to claim 1, it is characterized in that: The stored event information and time information are displayed through the front-end display module.
4. According to claim 3, a Fabric-based cross-departmental Internet of Things system information sharing method is characterized in that: The front-end display module obtains event information every 1 to 3 seconds by polling.
5. The method for sharing information among inter-departmental Internet of Things systems based on Fabric according to claim 1, characterized in that: The Fabric module triggers the smart contract through the Fabric web server.
6. The Fabric-based cross-departmental Internet of Things system information sharing method according to claim 1 is characterized in that: The first device module communicates with the Fabric module according to the http protocol.
7. The Fabric-based cross-departmental Internet of Things system information sharing method according to claim 1 is characterized in that: The event resources include but are not limited to images.
8. The Fabric-based cross-departmental Internet of Things system information sharing method according to claim 1 is characterized in that: The Fabric module is constructed using a docker container method.
9. A Fabric-based inter-departmental Internet of Things system information sharing system, characterized in that: It includes a first device module, a second device module, a Hadoop module, a Fabric module and a database module, wherein: The first device module is used to obtain the first event resource and the first event information, transmit the first device ID and the first event resource to the Hadoop module, and respond to the Fabric module according to the first event information and time information; The Hadoop module is used to store the first event resource in the Hadoop cluster according to the first device id; The Fabric module is used to trigger the smart contract corresponding to the event information and transmit the event information and time information to the database module; The database module is used to store event information and time information; The second device module is used to obtain the triggering status of the smart contract in real time. When it is detected that the Fabric module triggers the smart contract of the first event information, it responds to the Fabric module with the second event information and time information. When it is detected that the Fabric module triggers the smart contract of the second event information, it issues a second device work instruction.
10. The Fabric-based cross-departmental Internet of Things system information sharing system according to claim 9, characterized in that: The database is a key-value database.
Citation Information
Patent Citations
Blockchain transaction method and device
CN110298755A
Securing access to confidential data using a blockchain ledger
CN110785981A