Blockchain-based cross-chain communication methods
By designing a blockchain-based cross-chain communication method in scenarios such as life parks, industrial parks, and industrial parks, the problem of insufficient application of cross-chain communication in the existing technology in these scenarios is solved, and information synchronization between the main and secondary blockchains and prediction of the change trend of scene details is realized, providing personnel with convenient services and efficient scheduling support.
Patent Information
- Application Number
- CN202410331639.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2043-05-08
AI Technical Summary
The existing cross-chain communication methods are mainly used in the field of cross-border trade, and lack the application for personnel flow arrangement, data synchronization and scenario details prediction in scenarios such as living parks, industrial parks, and industrial parks.
A cross-chain communication method based on blockchain was designed. By establishing a main blockchain and multiple sub-blockchains, Bluetooth communication is used between chains to establish a cloud platform and APP. Each sub-blockchain is deployed in different environments, collects environment details and sends it to the management end with TCP data frame code. The AI intelligent algorithm training result model is used to realize cross-chain communication and information synchronization between main and sub-blockchains.
It realizes the prediction of the changes in the detailed information of the main and secondary blockchain scenarios, synchronizes inter-chain data, provides convenient services for personnel, and reduces the difficulty of deploying cross-chain communication methods in personnel scheduling.
Smart Images

Figure CN118282603B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cross-chain communication technology, and specifically to a cross-chain communication method based on blockchain. Background Art
[0002] As the foundation of the decentralized value network in the future, blockchain technology is considered to be the core technology with the greatest potential to trigger the fifth wave of disruptive revolution after steam engines, electricity, information and Internet technology, which has attracted widespread attention from government departments, financial institutions, technology companies and capital markets. At present, blockchain has been cross-innovated with new technologies and applications such as cloud computing, big data, and artificial intelligence, and has evolved into a new generation of network infrastructure. Its related applications have also been gradually implemented, empowering major fields such as national finance, justice, government affairs, and medical care. At present, cross-chain communication methods are mostly used in the field of cross-border trade, while cross-chain communication methods are used in living parks, industrial parks, and industrial parks to complete personnel flow arrangements, synchronize data positioning, and predict changes in scene details. Therefore, it is necessary to design a cross-chain communication method based on blockchain that can realize high-speed and stable cross-chain communication between the main and secondary blockchains, predict the change trend of the main and secondary chains, and synchronize data between chains to provide services for personnel. Summary of the invention
[0003] The purpose of the present invention is to provide a cross-chain communication method based on blockchain to solve the problems raised in the above background technology.
[0004] In order to solve the above technical problems, the present invention provides the following technical solutions: a cross-chain communication method based on blockchain, the method comprising the following steps:
[0005] Step 1: Establish a main blockchain and multiple sub-blockchains. The chains can communicate with each other via Bluetooth at any time. Establish a cloud platform. The main blockchain reports data to the cloud platform first, and the sub-blockchain reports data to the cloud platform secondly. Establish a management platform and APP;
[0006] Step 2: Deploy each sub-blockchain in a different environment. Each sub-blockchain collects detailed information about the environment in which it is located. The sub-blockchain sends the collected information to the management end in the form of TCP data frame encoding.
[0007] Step 3: The cloud platform decodes the data frames sent by all sub-blockchains, the management end gives the corresponding processing method to the data information, and the application layer encodes the processing method as a data frame and sends it back to the cloud platform;
[0008] Step 4: AI intelligent algorithm training and learning, training the result model based on the information processing method corresponding to different detailed information in each scenario;
[0009] Step 5: Cross-chain communication is enabled between the main blockchain and multiple secondary blockchains. The AI intelligent algorithm provides detailed processing rules for user scenarios, and the management end conducts IoT positioning communication with each main blockchain.
[0010] According to the above technical solution, the steps of establishing a main blockchain and multiple sub-blockchains, communicating between the chains via Bluetooth at any time, establishing a cloud platform, the main blockchain reporting data to the cloud platform first, and the sub-blockchain reporting data to the cloud platform secondly, and establishing a management platform and APP include:
[0011] The main blockchain is equipped with a user-side APP, which incorporates AI intelligent algorithms to provide services to users;
[0012] Equipped with communication modules and collection modules in multiple secondary blockchains;
[0013] The secondary blockchain is mainly deployed in the corridors, rooms, walls, fire escapes, and windows of buildings or parks;
[0014] The main blockchain and the secondary blockchain are connected temporarily, quickly and stably using Bluetooth technology.
[0015] In order to ensure a high-strength signal and stable connection between the primary and secondary blockchains, the connection distance is set to be no less than 40 meters and no more than 100 meters;
[0016] Establish cloud platform and database at the transport layer;
[0017] The transport layer communicates with the primary and secondary blockchains using TCP and HTTP protocols.
[0018] Set the main blockchain to communicate with the cloud platform using HTTP protocol and the highest priority 1;
[0019] Set other secondary blockchains to communicate with the cloud platform using TCP protocol and sub-priority 2;
[0020] Deploy the management platform and management APP, and communicate with the cloud platform using the HTTP protocol.
[0021] According to the above technical solution, the steps of deploying each sub-blockchain in a different environment, collecting specific details of the environment in which each sub-blockchain is located, and sending the collected information to the management end in TCP data frame encoding include:
[0022] The administrator first deploys multiple secondary blockchains throughout the test site;
[0023] Administrators simulate different fire environments in various locations for the secondary blockchain to collect data;
[0024] The different fire environments simulated are:
[0025] The fire has just appeared 01, the fire is spreading 02, the fire is gradually expanding 03, the fire is rapidly expanding 04, the fire is huge 05... Other extension items NN;
[0026] Deploy each secondary blockchain in different simulated fire environments;
[0027] The secondary blockchain collects detailed information in the fire environment through the collection module. The detailed information includes:
[0028] Oxygen concentration 01, smoke concentration 02, ambient temperature 03, CO concentration 04, flame coverage 05... other extended items NN;
[0029] The administrator simulated a fire environment with power outage and signal interference;
[0030] The secondary blockchain uses the fire-resistant module and the narrowband Internet of Things NB-IoT technology to ensure that the secondary blockchain transmits data to the cloud platform with high stability, low power consumption and long battery life in the event of a power outage;
[0031] NB-IoT mainly sends data to the cloud platform in the form of hexadecimal encoding through TCP data frames;
[0032] The data frame format is:
[0033] QT 01 / 01 / 0102 0304 / FA / BN;
[0034] Where QT represents: the frame header of the data frame;
[0035] 01 represents: data sent by secondary blockchain 1;
[0036] / 01 represents: the secondary blockchain 1 is currently in the scene of "fire just appeared";
[0037] / 0102 0304 represents: specific details of the current fire environment;
[0038] / FA represents: the remaining battery life hours of the NB-IoT module of the secondary blockchain 1;
[0039] / BN stands for: the end of the data frame.
[0040] According to the above technical solution, the cloud platform decodes the data frames sent by all sub-blockchains, the management end gives a corresponding processing method to the data information, and the application layer encodes the processing method as a data frame and sends it back to the cloud platform, including:
[0041] All TCP data frames sent by the secondary blockchain to the cloud platform;
[0042] The cloud platform performs hexadecimal-binary decoding;
[0043] The cloud platform matches the decoded data information with the different fire environments simulated by the management end, and stores them all in the database.
[0044] The management end sends a call request at the application layer.
[0045] The cloud platform encodes the data information as a binary-octal HTTP data frame.
[0046] The HTTP data frame is sent to the application layer, and the application layer decodes the data frame into scene graphs, numbers, and Chinese characters.
[0047] The management end makes different processing rules according to the different environmental details corresponding to the simulated fire environments;
[0048] The processing rules are as follows:
[0049] Use CO2 fire extinguishing agent to extinguish fire 01, use foam fire extinguishing agent to extinguish fire 02, close doors and windows 03, open doors and windows 04, escape quickly 05, cover mouth and nose to escape 06, push open doors and windows 07, bypass this area 10 ... other extension items 77;
[0050] The application layer encodes the processing rules made by the management end in HTTP data frames;
[0051] The coded content is:
[0052] XF / 02 / 0102 0304 / 0507 FX;
[0053] Among them, XF and FX represent: the frame header and frame tail of HTTP data frame;
[0054] / 02 represents: in the "fire spread" scene;
[0055] / 0102 0304 represents: specific details of the fire in this scenario;
[0056] / 0507 represents: the way to deal with this scenario and this detailed information.
[0057] According to the above technical solution, the AI intelligent algorithm training and learning, the information processing method corresponding to different detailed information in each scenario, and the steps of training the achievement model include:
[0058] After receiving the HTTP data frame sent by the application layer, the cloud platform performs octal-binary decoding and stores the decoding result in the database;
[0059] AI intelligent algorithm calls HTTP data frame information and TCP data frame information;
[0060] Convert all HTTP data frame information into the matrix {H};
[0061] The AI algorithm uses each type of detailed information corresponding to each fire scenario as the first element of each column of the matrix;
[0062] The processing method corresponding to each detail information is used as an element in the same column;
[0063] The AI intelligent algorithm converts all TCP data frame information into the matrix {T};
[0064] Use each fire scene as the first element of each row;
[0065] Use the detailed information corresponding to the scene as elements in the same row;
[0066] Transpose the matrix {H} to get {H} T ;
[0067] The matrix {T} is inverted to obtain {T} -1 ;
[0068] The matrix {HT} is obtained by multiplying the two matrices;
[0069] Through Fourier convolution, the eigenvalue matrix {λ} is obtained;
[0070] The {λ} matrix serves as the reference model of AI. AI repeatedly trains and optimizes the model to eventually obtain a model library.
[0071] According to the above technical solution, cross-chain communication is enabled between the main blockchain and multiple secondary blockchains, and the AI intelligent algorithm gives detailed processing rules for user scenarios. The steps of the management end performing IoT positioning communication with each main blockchain include:
[0072] After the AI intelligent algorithm obtains the model library, the management side deploys a secondary blockchain in various locations within the building or park;
[0073] After deployment, each secondary blockchain automatically detects environmental parameters within the deployment environment throughout the day;
[0074] When any secondary blockchain detects any fire scenario:
[0075] The secondary blockchain establishes a temporary communication channel with each nearby primary blockchain using Bluetooth technology;
[0076] Send a hexadecimal-encoded UDP data frame to the main blockchain, the data frame content is:
[0077] UD BA / 01 / 0102 0304 ED;
[0078] Wherein UD represents: the frame header of the data frame;
[0079] BA stands for: Alarm information sent by the No. 186 secondary blockchain to the main blockchain;
[0080] / 01 represents: The environment of the No. 186 deputy blockchain is "a fire has just occurred";
[0081] / 0102 0304 represents: current scene details;
[0082] ED stands for: the end of the data frame;
[0083] After the secondary blockchain sends the UDP data frame to all nearby primary blockchains, the primary blockchain receives the hexadecimal UDP data frame and performs hexadecimal-decimal decoding;
[0084] After decoding, the AI intelligent algorithm determines the specific location coordinates of the alarm secondary blockchain based on the "BA" in the UDP data frame;
[0085] Determine the scene information at the location coordinates according to " / 01" and " / 0102 0304";
[0086] AI then compares and analyzes the achievement model library with the real-time scenario information, and uses the matrix algorithm to solve the eigenvalue matrix, thereby determining the treatment method that should be adopted for the location of the No. 186 sub-blockchain;
[0087] AI then decodes the above information into Chinese characters, numbers and location coordinates, and displays them on the APP;
[0088] People in a building or park go to the location to deal with the danger or flee from the location for emergency avoidance based on the coordinate map of the danger location displayed on the APP, scene details and the handling method given by AI.
[0089] According to the above technical solution, the steps of the management end performing IoT positioning communication with each main blockchain include:
[0090] When any secondary blockchain detects a dangerous situation:
[0091] First, conduct cross-chain communication with all main blockchains;
[0092] The secondary blockchain then uses AI to "predict" the trend of changes in the danger level based on changes in fire scene details;
[0093] If: it is predicted that the personnel can handle the dangerous situation in time, the secondary blockchain will not alert the management end;
[0094] If: AI predicts that the danger level will become increasingly serious, the fire will be uncontrollable, and people will have no choice but to flee;
[0095] The secondary blockchain immediately alerts the management end through NB-IoT, and the management end promptly goes to the location on the location coordinate map to carry out emergency rescue;
[0096] When people fail to escape in time when the danger is minor:
[0097] The APP in the hands of the personnel is a main blockchain, which communicates cross-chain with all the secondary blockchains within a 100-meter sphere.
[0098] The main blockchain obtains the current scene and scene details detected by all secondary blockchains within the range;
[0099] AI analyzes the corresponding processing methods of all sub-blockchain locations;
[0100] AI decoding data is displayed on the APP;
[0101] The main blockchain allows escapees to plan escape routes and avoidance methods in the form of maps and voice text on the APP;
[0102] When people are unable to escape and are trapped in a building:
[0103] The main blockchain communicates with all nearby secondary blockchains across chains and jointly sends the location information to the management end;
[0104] The management personnel immediately went to the specific location coordinate map of the trapped people and started the rescue work;
[0105] Even if people change their location within the building to avoid danger, the blockchain continues to send real-time and specific locations to managers to carry out precise rescue of the people.
[0106] According to the above technical solution, the main blockchain includes:
[0107] The user-side APP is used to receive UDP data frames sent by all sub-blockchains within the range using Bluetooth technology, exchange data with the cloud platform using HTTP protocol, encode and decode UDP data frames, and locate the blockchain location;
[0108] AI intelligent algorithm is used to compare and analyze the scene information sent by all sub-blockchains within the range with the model library, plan escape routes and handling methods for personnel, predict danger levels, and predict scene change trends.
[0109] According to the above technical solution, the secondary blockchain includes:
[0110] The communication module is used to communicate across the blockchain with all main blockchains within the range using Bluetooth technology, encode the scene details in hexadecimal, send UDP data frames to the main blockchain, exchange data with the cloud platform using NB-IoT, and send hexadecimal HTTP encoded data to the platform;
[0111] The collection module is used to collect scene modes and scene details within the environment where the secondary blockchain is located;
[0112] AI intelligent algorithms are used to predict the level of dangerous situations, predict whether personnel can handle dangerous situations in a timely manner, and predict the trend of scene changes.
[0113] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: the present invention, by setting up and establishing a main and secondary blockchain, the chains communicate with each other by Bluetooth, establish a cloud platform and an APP, and deploy each secondary blockchain in a different environment. The secondary chain collects environmental detail information, and the secondary chain sends the information to the management end in TCP data frame encoding. The platform decodes the data frame, and the management end gives a processing method for the information, and sends it back to the platform in frame encoding. The AI intelligent algorithm is trained, and an achievement model is trained in the information processing method corresponding to different detail information in each scene. Cross-chain communication is enabled between the main chain and multiple secondary blockchains, and the AI algorithm gives personnel scene detail processing rules. The management end performs Internet of Things positioning communication with each main blockchain, so that the existing system can predict the scene detail information change trend of the main and secondary blockchains, synchronize the information between the main and secondary blockchains, provide convenient services for personnel, and reduce the deployment difficulty of the cross-chain communication method in personnel scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0114] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0115] Figure 1 A flowchart of a cross-chain communication method based on blockchain provided in Embodiment 1 of the present invention;
[0116] Figure 2 A schematic diagram of the module composition of a cross-chain communication system based on blockchain provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0117] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0118] Embodiment 1: Figure 1 This is a flowchart of a cross-chain communication method based on blockchain provided in Example 1 of the present invention. This embodiment can be applied to the scenario of fire escape in a building or park. This method can be executed by a cross-chain communication method based on blockchain provided in this embodiment, such as Figure 1 As shown, the method specifically comprises the following steps:
[0119] Step 1: Establish a main blockchain and multiple sub-blockchains. The chains can communicate with each other via Bluetooth at any time. Establish a cloud platform. The main blockchain reports data to the cloud platform first, and the sub-blockchain reports data to the cloud platform secondly. Establish a management platform and APP.
[0120] In an embodiment of the present invention, a user-side APP is installed in the main blockchain, and an AI intelligent algorithm is added to the APP to provide services for users. Communication modules and collection modules are installed in multiple sub-blockchains. The sub-blockchains are mainly deployed in corridors, rooms, walls, fire passages, and windows in buildings or parks. The main and sub-blockchains are mainly connected temporarily, high-speed, and stably using Bluetooth technology. In order to ensure that there is a high-intensity signal and a stable connection between the main and sub-blockchains, the connection distance is set to be no less than 40 meters and no more than 100 meters. A cloud platform and a database are established at the transport layer. The transport layer and the main and sub-blockchains interact and communicate with each other using the TCP protocol and the HTTP protocol. The main blockchain is set to communicate with the cloud platform using the HTTP protocol and the highest priority 1, and other sub-blockchains are set to communicate with the cloud platform using the TCP protocol and the secondary priority 2. The management platform and the management-side APP are deployed, and communicate with the cloud platform using the HTTP protocol.
[0121] Step 2: Deploy each sub-blockchain in a different environment. Each sub-blockchain collects detailed information about the environment in which it is located. The sub-blockchain sends the collected information to the management end in the form of TCP data frame encoding.
[0122] S21: In an embodiment of the present invention, the administrator first deploys multiple sub-blockchains in various places in the test site. The administrator simulates different fire environments in various places for the sub-blockchains to collect data. The simulated different fire environments include: the fire has just appeared 01, the fire is spreading 02, the fire is gradually expanding 03, the fire is rapidly expanding 04, the fire is huge 05... and other extension items NN. Each sub-blockchain is deployed in a different simulated fire environment. The sub-blockchain collects detailed information in the fire environment through the collection module. The detailed information includes: oxygen concentration 01, smoke concentration 02, ambient temperature 03, CO concentration 04, flame coverage 05... and other extension items NN.
[0123] S22: The administrator simulates a fire environment in which the power system is out of power and there is signal interference. The sub-blockchain uses the fire-resistant module and the narrowband Internet of Things NB-IoT technology to ensure that the sub-blockchain transmits data to the cloud platform with high stability, low power consumption and long battery life in the event of a power outage. NB-IoT mainly sends data to the cloud platform in the form of hexadecimal encoding through TCP data frames. The data frame format is: QT 01 / 01 / 0102 0304 / FA / BN, where QT represents: the frame header of the data frame, 01 represents: the data sent by the sub-blockchain 1, / 01 represents: the current scene of "fire just appeared" in the sub-blockchain 1, / 0102 0304 represents: the specific details of the current fire environment, / FA represents: the remaining battery life hours of the NB-IoT module of the sub-blockchain 1, and / BN represents: the frame tail of the data frame.
[0124] Step 3: The cloud platform decodes the data frames sent by all sub-blockchains, the management end gives the corresponding processing method to the data information, and the application layer encodes the processing method as a data frame and sends it back to the cloud platform.
[0125] In the embodiment of the present invention, the TCP data frames sent by all sub-blockchains to the cloud platform are decoded by the cloud platform in hexadecimal-binary. The decoded data information is matched one by one by the cloud platform with different fire environments simulated by the management end, and all are stored in the database. The management end sends a call request at the application layer, and the cloud platform encodes the data information in binary-octal HTTP data frame. The HTTP data frame is sent to the application layer, and the application layer decodes the data frame into scene graphs, numbers, and Chinese characters. The management end makes different processing rules according to the different environmental detail information corresponding to the simulated different fire environments. The processing rules are: extinguishing the fire with CO2 fire extinguishing agent 01, extinguishing the fire with foam fire extinguishing agent 02, closing doors and windows 03, opening doors and windows 04, escaping quickly 05, covering the mouth and nose to escape 06, pushing open doors and windows 07, bypassing this area 10...other extensions 77, the application layer encodes the processing rules made by the management end in HTTP data frames, and the encoding content is: XF / 02 / 0102 0304 / 0507 FX, where XF and FX represent the header and footer of the HTTP data frame, / 02 represents the "fire spread" scenario, / 0102 0304 represents the specific details of the fire in this scenario, and / 0507 represents the processing method that should be made for this scenario and the details.
[0126] Step 4: AI intelligent algorithm training and learning, information processing methods corresponding to different detailed information in each scenario, and training the results model.
[0127] In the embodiment of the present invention, after the cloud platform receives the HTTP data frame sent by the application layer, it performs octal-binary decoding, and the decoding result is stored in the database. The AI intelligent algorithm calls the HTTP data frame information and the TCP data frame information, and converts all the HTTP data frame information into the matrix {H}. The AI algorithm uses each type of detail information corresponding to each fire scene as the first column element of each column of the matrix, and uses the processing method corresponding to each detail information as the same column element. The AI intelligent algorithm converts all the TCP data frame information into the matrix {T}, uses each fire scene as the first row element of each row, and uses the detail information corresponding to the scene as the same row element. The matrix {H} is transposed to obtain {H} T , the matrix {T} is inversely operated to obtain
[0128] {T} -1 , multiply the two matrices to get the matrix {HT}, and through Fourier convolution, get the eigenvalue matrix {λ}. The {λ} matrix is used as the reference model of AI. AI repeatedly trains and optimizes the model, and finally obtains the achievement model library. The achievement model library is composed of the arrangement and combination of fire scenes, scene details, and processing methods.
[0129] Step 5: Cross-chain communication is enabled between the main blockchain and multiple secondary blockchains. The AI intelligent algorithm provides detailed processing rules for user scenarios, and the management end conducts IoT positioning communication with each main blockchain.
[0130] S51: In an embodiment of the present invention, after the AI intelligent algorithm obtains the achievement model library, the management end deploys a secondary blockchain in various places in the building or park. After deployment, each secondary blockchain automatically detects environmental parameters within the deployment environment throughout the day. When any secondary blockchain detects the occurrence of any fire scene: the secondary blockchain uses Bluetooth technology to establish a temporary communication channel with each nearby main blockchain, and sends a hexadecimal-encoded UDP data frame to the main blockchain. The content of the data frame is: UD BA / 01 / 0102 0304 ED, where UD represents: the frame header of the data frame, BA represents: the alarm information sent by the No. 186 secondary blockchain to the main blockchain, / 01 represents: the environment of the No. 186 secondary blockchain is "fire has just appeared", / 01020304 represents: the current scene detail information, and ED represents: the frame tail of the data frame.
[0131] S52: After the secondary blockchain sends the UDP data frame to all nearby main blockchains, the main blockchain receives the hexadecimal UDP data frame and performs hexadecimal-decimal decoding. After decoding, the AI intelligent algorithm determines the specific location coordinates of the alarm secondary blockchain according to the "BA" in the UDP data frame, and determines the scene information at the location coordinates according to " / 01" and " / 0102 0304". AI then refers to the achievement model library and compares and analyzes the real-time scene information, and uses the matrix algorithm to solve the eigenvalue matrix, thereby determining the processing method that should be taken for the location of the No. 186 secondary blockchain. AI then decodes the above information into Chinese characters, numbers and location coordinate diagrams, and displays them on the APP. People in the building or park go to the location to deal with the danger or escape from the location for emergency avoidance according to the dangerous situation location coordinate diagram, scene details and processing methods given by AI displayed on the APP.
[0132] S53: When any secondary blockchain detects a dangerous situation, it first conducts cross-chain communication with all main blockchains. The secondary blockchain then calls AI to "predict" the trend of changes in the danger level according to the changes in the detailed information of the fire scene. If: it is predicted that the personnel can deal with the dangerous situation in time, the secondary blockchain will not alarm the management end. If: AI predicts that the danger level will become higher and higher, the fire will be uncontrollable, and the personnel will have to flee. The secondary blockchain will immediately alarm the management end through NB-IoT, and the management end will promptly go to the location on the location coordinate map to carry out emergency rescue.
[0133] S54: When personnel fail to escape in time when the danger is minor: the APP in the personnel's hand is a main blockchain, and the main blockchain communicates cross-chain with all sub-blockchains within a 100-meter sphere. The main blockchain obtains the current scene and scene details detected by all sub-blockchains within the range, and AI analyzes the corresponding processing methods of all sub-blockchains. AI decodes the data and displays it on the APP. The main blockchain plans escape routes and avoidance methods for escapees in the form of maps and voice text on the APP. When personnel cannot escape and are trapped in a building: the main blockchain communicates cross-chain with all nearby sub-blockchains, and jointly sends the location information to the management end. The management personnel immediately go to the specific location coordinate map of the trapped personnel to carry out rescue work. Even if the personnel change their positions in the building to avoid danger, the blockchain continues to send the real-time specific location to the management personnel to carry out precise rescue of the personnel.
[0134] Compared with the existing blockchain cross-chain communication methods on the market, this method first deploys multiple secondary blockchains, uses NB-IoT technology and encoding and decoding technology to enable AI to train a model library of scene information processing methods, and then deploys all primary and secondary blockchains to actual scenarios. When a dangerous situation occurs, cross-chain communication is carried out between the primary and secondary blockchains. The secondary blockchain calls AI to predict whether the personnel in the primary blockchain can handle the dangerous situation, and then alarms the management end. The primary blockchain communicates cross-chain with all secondary blockchains within the range, and calls AI to plan escape routes and risk avoidance methods or dangerous situation handling methods for personnel. Through the method of cross-chain communication between the primary and secondary blockchains and AI assistance, the safety of personnel is greatly guaranteed, and the detailed processing rules of the inter-chain scenes are simplified.
[0135] Embodiment 2: Embodiment 2 of the present invention provides a cross-chain communication system based on blockchain. Figure 2 A schematic diagram of the module composition of a cross-chain communication system based on blockchain provided in Embodiment 2 of the present invention is shown in FIG. Figure 2 As shown, the system includes:
[0136] The management platform is used to perform octal-binary decoding on the HTTP data frames sent by the cloud platform, set the corresponding processing methods for each scenario corresponding to different scenario details, and send HTTP data frames to the cloud platform;
[0137] The management APP is used for real-time communication between management personnel and the primary and secondary blockchains, sharing location information, and accurately positioning and rescuing trapped people;
[0138] The cloud platform is used to encode and decode HTTP data frames and TCP data frames, and provide scene detail information matrix for AI intelligent algorithms;
[0139] The main blockchain is used to communicate with the cloud platform using the HTTP protocol and to communicate across blockchains with all sub-blockchains within range using Bluetooth technology;
[0140] The secondary blockchain is used to send UDP data frames to all main blockchains within the range and conduct cross-chain communication with the main blockchain using Bluetooth technology.
[0141] In some embodiments of the invention, the main blockchain includes:
[0142] The user-side APP is used to receive UDP data frames sent by all sub-blockchains within the range using Bluetooth technology, exchange data with the cloud platform using HTTP protocol, encode and decode UDP data frames, and locate the blockchain location;
[0143] AI intelligent algorithm is used to compare and analyze the scene information sent by all sub-blockchains within the range with the model library, plan escape routes and handling methods for personnel, predict danger levels, and predict scene change trends.
[0144] In some embodiments of the invention, the secondary blockchain includes:
[0145] The communication module is used to communicate across the blockchain with all main blockchains within the range using Bluetooth technology, encode the scene details in hexadecimal, send UDP data frames to the main blockchain, exchange data with the cloud platform using NB-IoT, and send hexadecimal HTTP encoded data to the platform;
[0146] The collection module is used to collect scene modes and scene details within the environment where the secondary blockchain is located;
[0147] AI intelligent algorithms are used to predict the level of dangerous situations, predict whether personnel can handle dangerous situations in a timely manner, and predict the trend of scene changes.
[0148] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0149] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A cross-chain communication method based on blockchain, characterized in that: The method comprises the following steps: Step 1: Establish a main blockchain and multiple sub-blockchains. The chains can communicate with each other via Bluetooth at any time. Establish a cloud platform. The main blockchain reports data to the cloud platform first, and the sub-blockchain reports data to the cloud platform secondly. Establish a management platform and APP; Step 2: Deploy each sub-blockchain in a different environment. Each sub-blockchain collects detailed information about the environment in which it is located. The sub-blockchain sends the collected information to the management end in the form of TCP data frame encoding. Step 3: The cloud platform decodes the data frames sent by all sub-blockchains, the management end gives the corresponding processing method to the data information, and the application layer encodes the processing method as a data frame and sends it back to the cloud platform; Step 4: AI intelligent algorithm training and learning, training the result model based on the information processing method corresponding to different detailed information in each scenario; Step 5: The main blockchain and multiple secondary blockchains start cross-chain communication. The AI intelligent algorithm gives detailed processing rules for user scenarios, and the management end conducts IoT positioning communication with each main blockchain. The steps of establishing a main blockchain and multiple secondary blockchains, communicating between the chains via Bluetooth at any time, establishing a cloud platform, the main blockchain reporting data to the cloud platform first, and the secondary blockchain reporting data to the cloud platform secondly, and establishing a management platform and APP include: The main blockchain is equipped with a user-side APP, which incorporates AI intelligent algorithms to provide services to users; Equipped with communication modules and collection modules in multiple secondary blockchains; The secondary blockchain is deployed in the corridors, rooms, walls, fire escapes, and windows of buildings or parks; The main and secondary blockchains are connected temporarily, quickly and stably using Bluetooth technology; In order to ensure a high-strength signal and stable connection between the primary and secondary blockchains, the connection distance is set to be no less than 40 meters and no more than 100 meters; Establish cloud platform and database at the transport layer; The transport layer communicates with the primary and secondary blockchains using TCP and HTTP protocols. Set the main blockchain to communicate with the cloud platform using HTTP protocol and the highest priority; Set other secondary blockchains to communicate with the cloud platform using TCP protocol and secondary priority; Deploy the management platform and management APP, and communicate with the cloud platform via HTTP protocol; The steps of deploying each secondary blockchain in a different environment, each secondary blockchain collecting specific detailed information of the environment, and the secondary blockchain sending the collected information to the management end in TCP data frame encoding include: The administrator first deploys multiple secondary blockchains throughout the test site; Administrators simulate different fire environments in various locations for the secondary blockchain to collect data; The different fire environments simulated are: The fire has just appeared, the fire is spreading, the fire is gradually expanding, the fire is rapidly expanding, and the fire is huge; Deploy each secondary blockchain in different simulated fire environments; The secondary blockchain collects detailed information in the fire environment through the collection module. The detailed information includes: Oxygen concentration, smoke concentration, ambient temperature, CO concentration, flame coverage; The administrator simulated a fire environment with power outage and signal interference; The secondary blockchain uses the fire-resistant module and the narrowband Internet of Things NB-IoT technology to ensure that the secondary blockchain transmits data to the cloud platform with high stability, low power consumption and long battery life in the event of a power outage; NB-IoT sends data to the cloud platform in hexadecimal encoding via TCP data frames; The data frame format is: QT 01 / 01 / 0102 0304 / FA / BN; Where QT represents: the frame header of the data frame; 01 represents: data sent by secondary blockchain 1; / 01 represents: the secondary blockchain 1 is currently in the scene of "fire just broke out"; / 0102 0304 represents: specific details of the current fire environment; / FA represents: the remaining battery life hours of the NB-IoT module of the secondary blockchain 1; / BN stands for: the end of the data frame; The cloud platform decodes the data frames sent by all secondary blockchains, the management end gives a corresponding processing method to the data information, and the application layer encodes the processing method as a data frame and sends it back to the cloud platform, including: All TCP data frames sent by the secondary blockchain to the cloud platform; The cloud platform performs hexadecimal-binary decoding; The cloud platform matches the decoded data information with the different fire environments simulated by the management end, and stores them all in the database. The management end sends a call request at the application layer. The cloud platform encodes the data information as a binary-octal HTTP data frame. The HTTP data frame is sent to the application layer, and the application layer decodes the data frame into scene graphs, numbers, and Chinese characters. The management end makes different processing rules according to the different environmental details corresponding to the simulated fire environments; The processing rules are as follows: Use CO2 fire extinguisher to extinguish fire, use foam fire extinguisher to extinguish fire, close doors and windows, open doors and windows, escape quickly, cover your mouth and nose to escape, push open doors and windows, bypass this area; The application layer encodes the processing rules made by the management end in HTTP data frames; The coded content is: XF / 02 / 0102 0304 / 0507 FX; Among them, XF and FX represent: the frame header and frame tail of HTTP data frame; / 02 represents: in the "fire spread" scene; / 0102 0304 represents: specific details of the fire in this scenario; / 0507 stands for: the way to deal with this scenario and this detailed information; The AI intelligent algorithm training and learning, the information processing method corresponding to different detailed information in each scenario, and the steps of training the achievement model include: After receiving the HTTP data frame sent by the application layer, the cloud platform performs octal-binary decoding and stores the decoding result in the database; AI intelligent algorithm calls HTTP data frame information and TCP data frame information; Convert all HTTP data frame information into the matrix {H}; The AI algorithm uses each type of detailed information corresponding to each fire scenario as the first element of each column of the matrix; The processing method corresponding to each detail information is used as an element in the same column; The AI intelligent algorithm converts all TCP data frame information into the matrix {T}; Use each fire scene as the first element of each row; Use the detailed information corresponding to the scene as elements in the same row; Transpose the matrix {H} to obtain {H}T; The matrix {T} is inverted to obtain {T}-1; The matrix {HT} is obtained by multiplying the two matrices; Through Fourier convolution, the eigenvalue matrix {λ} is obtained; The {λ} matrix is used as a reference model for AI. AI repeatedly trains and optimizes the model to eventually obtain a model library. The main blockchain and multiple secondary blockchains start cross-chain communication, the AI intelligent algorithm gives detailed processing rules for user scenarios, and the management end performs IoT positioning communication with each main blockchain, including: After the AI intelligent algorithm obtains the model library, the management side deploys a secondary blockchain in various locations within the building or park; After deployment, each secondary blockchain automatically detects environmental parameters within the deployment environment throughout the day; When any secondary blockchain detects any fire scenario: The secondary blockchain establishes a temporary communication channel with each nearby primary blockchain using Bluetooth technology; Send a hexadecimal-encoded UDP data frame to the main blockchain, the data frame content is: UD BA / 01 / 0102 0304 ED; Wherein UD represents: the frame header of the data frame; BA stands for: Alarm information sent by the No. 186 secondary blockchain to the main blockchain; / 01 represents: The environment of the No. 186 deputy blockchain is "a fire has just occurred"; / 0102 0304 represents: current scene details; ED stands for: the end of the data frame; After the secondary blockchain sends the UDP data frame to all nearby primary blockchains, the primary blockchain receives the hexadecimal UDP data frame and performs hexadecimal-decimal decoding; After decoding, the AI intelligent algorithm determines the specific location coordinates of the alarm secondary blockchain based on the "BA" in the UDP data frame; Determine the scene information at the location coordinates based on " / 01" and " / 0102 0304"; AI then compares and analyzes the achievement model library with the real-time scenario information, and uses the matrix algorithm to solve the eigenvalue matrix, thereby determining the treatment method that should be adopted for the location of the No. 186 sub-blockchain; AI then decodes the above information into Chinese characters, numbers and location coordinates, and displays them on the APP; People in a building or park go to the location to deal with the danger or flee from the location for emergency avoidance based on the coordinate map of the danger location displayed on the APP, scene details and the handling method given by AI.
Citation Information
Patent Citations
Internet of Things system cross-chain interaction method based on block chain
CN114363352A
Systems, methods, and apparatuses for implementing a multi tenant blockchain platform for managing einstein platform decisions using distributed ledger technology (DLT)
US20200252205A1