Gateway distributed cache transmission system and method

Through the coordinated working of distributed gateway devices, the optimal gateway equipment is determined using parameters such as networking signal strength and network disconnection rate, which solves the problem of data being unable to be uploaded in large gateway environments, and realizes data integrity and timeliness, which is suitable for scenarios where complete data analysis is required.

CN120358281AActive Publication Date: 2025-07-22SHANDONG YOU INTERNET OF THINGS CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510827700.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-07-22
Estimated Expiration
2045-06-20

AI Technical Summary

Technical Problem

In a large gateway acquisition environment, network signal poor results in data being unable to be uploaded to the server, and existing cache methods destroy data integrity and cannot meet the needs of complete data analysis.

Method used

The gateway distributed cache transmission system is adopted to determine the optimal gateway equipment through the collaborative work of distributed gateway equipment, and the current network signal strength, alarm data upload frequency and network disconnection rate, so as to realize temporary storage and upload of alarm data, rationally utilize the cache space, and ensure data integrity.

Benefits of technology

In the case of unstable network signals, ensure the timely upload of high-priority alarm data and other data, maximize the use of cache space, ensure data integrity, and be suitable for scenarios where complete data analysis is required.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358281A_ABST
    Figure CN120358281A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of Internet of Things, and provides a gateway distributed cache transmission system and method in order to solve the problem that an existing cache transmission method cannot guarantee data integrity. The gateway distributed cache transmission system comprises a plurality of distributed gateway devices which are the same in type and communicate with a server. When any gateway device is in a state of normal data acquisition work and network disconnection, the gateway device is marked as a gateway device A; if the terminal equipment data collected by the gateway equipment A is non-alarm data, the gateway equipment A caches the collected terminal equipment data to a data cache module of the gateway equipment A; if the terminal equipment data collected by the gateway equipment A is alarm data, the gateway equipment A searches other gateway equipment, determines the optimal gateway equipment and sends the alarm data to the optimal gateway equipment, and the optimal gateway equipment sends the alarm data to a server of the gateway equipment A through a temporary process. The method is suitable for scenes needing complete data analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of the Internet of Things, and particularly relates to a gateway distributed cache transmission system and method. Background Art

[0002] The statements in this part only provide background technical information related to the present invention and do not necessarily constitute prior art.

[0003] The gateway is used to collect terminal data and upload it to the server platform, and the server platform analyzes the received data. In a large-scale gateway (such as dozens, hundreds, or thousands of gateways) collection environment, the large-scale gateway may have few base stations deployed in remote locations, or the signal may be interfered with and unable to connect to the server normally, ultimately resulting in the inability to upload data to the server platform.

[0004] When the terminal data collected by the gateway cannot be uploaded to the server platform due to poor network signal, the gateway will cache the data in its own device for data caching to ensure the integrity of the data. However, as the caching time extends, a large amount of cached data will appear, which will occupy the cache space reserved by the gateway device itself. To solve the above problems, the prior art generally uses a circular caching method to eliminate old cached data and save new cached data, which destroys the integrity of the data and is not applicable to scenarios that require complete data analysis. Summary of the Invention

[0005] To solve the technical problems existing in the above background art, the present invention provides a gateway distributed cache transmission system and method, which can reasonably utilize the cache space of all gateway devices on site, cache all data as much as possible, and ensure the integrity of the data.

[0006] To achieve the above object, the present invention adopts the following technical solutions: The first aspect of the present invention provides a gateway distributed cache transmission system.

[0007] A gateway distributed cache transmission system includes: a plurality of distributed gateway devices of the same type that communicate with the server; each gateway device includes a collection module, a data cache module, a wireless transmission module, and a search module; each gateway device collects terminal device data through its own collection module and uploads it to the server through the wireless transmission module; When any gateway device is in a normal data collection and disconnected network state, it is denoted as gateway device A; if the terminal device data collected by gateway device A is non-alarm data, then gateway device A is used to: cache the non-alarm data it collects into its own data cache module; If the terminal device data collected by gateway device A is alarm data, gateway device A is used to: search for other gateway devices through a search module and determine the optimal gateway device, and after the optimal gateway device allows a response, send the alarm data to the optimal gateway device through the search module, and the optimal gateway device sends the alarm data to the server of gateway device A through a temporary process.

[0008] As an implementation, in gateway device A, the optimal gateway device is determined according to parameters such as the current network connection signal strength, the alarm data upload frequency coefficient within a unit time, and the network disconnection rate within a set time.

[0009] As an implementation, in gateway device A, the process of determining the optimal gateway device is as follows: For each gateway device searched by gateway device A, calculate the value corresponding to each gateway device according to a preset screening principle formula, and the gateway device corresponding to the largest value is the optimal gateway device; The screening principle formula is: ; Among them, is the maximum value of the alarm data upload frequency coefficients of all gateway devices searched by gateway device A, is the minimum value of the alarm data upload frequency coefficients of all gateway devices searched by gateway device A, s is the alarm data upload frequency coefficient of the currently calculated gateway device; is the maximum value of the network connection signal strengths of all devices searched by gateway device A, is the minimum value of the network connection signal strengths of all gateway devices searched by device A, i is the network connection signal strength of the currently calculated gateway device; is the maximum value of the network disconnection rates of all gateway devices searched by gateway device A, is the minimum value of the network disconnection rates of all gateway devices searched by gateway device A, k is the network disconnection rate of the currently calculated gateway device; , and are all constant coefficients.

[0010] As an implementation, the optimal gateway device is used to: after the temporary process finishes sending the alarm data of gateway device A, keep the connection of the temporary process alive for a set time period. If new alarm data of gateway device A is received within the preset time period, upload the new alarm data to the server of gateway device A and restart the timing of the set time period; if no new alarm data of gateway device A is received within the set time period, the optimal gateway device disconnects the connection with the server of gateway device A and closes the temporary process.

[0011] As an implementation manner, when the network of gateway device A has not been restored within a set time period and the remaining cache space of its own data cache module reaches a first preset threshold, gateway device A is used to: search for other gateway devices through a search module, and determine an optimal gateway device according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate of the searched gateway devices, and upload the data in the data cache module of gateway device A itself to the optimal gateway device.

[0012] As an implementation manner, in gateway device A, the process of determining an optimal gateway device according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate of the searched gateway devices is as follows: According to the formula , calculate the values corresponding to each of the searched gateway devices; Select the gateway device corresponding to the largest value as the optimal gateway device; Wherein, is the maximum value of the current cache space utilization rates of all gateway devices searched by gateway device A, is the minimum value of the current cache space utilization rates of all gateway devices searched by device A, p is the current cache space utilization rate of the currently calculated gateway device; is the maximum value of the cache space growth rates of all gateway devices searched by gateway device A, is the minimum value of the cache space growth rates of all gateway devices searched by gateway device A, g is the cache space growth rate of the currently calculated gateway device; and are both constant coefficients.

[0013] As an implementation manner, when the network of gateway device A has not been restored within a set time period, the remaining cache space of its own data cache module reaches a first preset threshold, and the remaining cache space of the determined optimal gateway device is less than a second preset threshold, gateway device A is used to: re-search for other gateway devices through a search module, and re-determine an optimal gateway device according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate of the searched gateway devices, and upload the data in the data cache module of gateway device A itself to the re-determined optimal gateway device.

[0014] As an implementation, when the remaining cache spaces of the gateway devices that can be searched by gateway device A do not meet the set requirements, gateway device A is used to: sort all the gateway devices it has searched according to their performance, select the gateway device with the best performance as the entrusted object of gateway device A for searching, and determine the corresponding optimal gateway device of the entrusted object; wherein, the performance of the gateway device is determined according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate; If the gateway device entrusted by gateway device A searches for the corresponding optimal gateway device, the entrusted gateway device notifies gateway device A to send the subsequent cache data to the entrusted gateway device, and then the entrusted gateway device forwards it to the corresponding optimal gateway device for storage; If all the gateway devices searched by the gateway device entrusted by gateway device A are unavailable, the entrusted gateway device notifies gateway device A, and gateway device A re-trusts the corresponding gateway device to continue searching in the order of the performance of all the gateway devices it has searched.

[0015] As an implementation, when gateway device A resumes the network, gateway device A preferentially uploads its own data to the server, and then retrieves the stored data from other devices according to the storage path in the order of the data storage time, and uploads it to the server; When gateway device A cannot resume the network and all the gateway devices in the current area cannot continue to store data, the terminal device data stored in gateway device A is uploaded to the server of gateway device A through a temporary process, and at the same time, gateway device A clears the recorded allowed storage time and storage path of the gateway device.

[0016] The second aspect of the present invention provides a gateway distributed cache transmission method.

[0017] A gateway distributed cache transmission method, which is based on the above gateway distributed cache transmission system, includes: Judging whether the network of the gateway device with normal data collection work is disconnected. If so, this gateway device is denoted as gateway device A; If the terminal device data collected by gateway device A is non-alarm data, gateway device A caches the terminal device data it has collected into its own data cache module; If the terminal device data collected by gateway device A is alarm data, gateway device A searches for other gateway devices through the search module, determines the optimal gateway device according to parameters such as the current network connection signal strength of each gateway device searched by gateway device A, the alarm data upload frequency coefficient per unit time, and the network disconnection rate within a set time, and after the optimal gateway device allows a response, sends the alarm data to the optimal gateway device through the search module. The optimal gateway device then sends the alarm data to the server of gateway device A through a temporary process.

[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) In view of the situation of network signal disconnection in a large-scale gateway collection environment, the present invention determines the type of terminal device data collected. When the terminal device data collected by the gateway device is non-alarm data, the collected terminal device data is cached in its own data cache module; when the terminal device data collected by the gateway device is alarm data, other gateway devices are searched, and the optimal gateway device is determined according to parameters such as the current network connection signal strength, the alarm data upload frequency coefficient per unit time, and the network disconnection rate within a set time. Then, the optimal gateway device sends the alarm data to the server of the gateway device through a temporary process, achieving the effect of using on-site resources to upload high-priority alarm data to the server as soon as possible.

[0019] (2) Also within a set time period, when the network of the gateway device is not restored and the remaining cache space of its own data cache module reaches the first preset threshold, the gateway device searches for other gateway devices through the search module, and performs an operation of transferring and storing terminal device data or an operation of continuing to search for other gateway devices according to the remaining cache space of the searched gateway devices, achieving the effect of using on-site resources to store as much cached data as possible, and uploading all data to the server when the device cannot restore the network, ensuring the integrity of the data.

[0020] Advantages of additional aspects of the present invention will be partially given in the following description, partially become apparent from the following description, or be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The specification drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention.

[0022] Figure 1 It is a schematic structural diagram of a gateway distributed cache transmission system according to an embodiment of the invention; Figure 2 It is a schematic structural diagram of a gateway device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0023] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0024] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.

[0025] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0026] Figure 1 A gateway distributed cache transmission system according to an embodiment of the present invention is provided, including: a plurality of distributed gateway devices of the same type that communicate with a server; each gateway device includes a collection module, a data cache module, a wireless transmission module, and a search module, as Figure 2 shown; each gateway device collects terminal device data through its own collection module and uploads it to the server through the wireless transmission module.

[0027] In this embodiment, the collection module can be composed of existing sensing elements and their peripheral circuits, which will not be elaborated here; The data cache module of this embodiment can be composed of a buffer, such as devices like ROM; The wireless transmission module of this embodiment corresponds to a specific wireless network. For example, when the wireless network is 4G, the wireless transmission module is a 4G network transmission module; The search module of this embodiment includes, but is not limited to, methods such as Wifi / Lora, and can be set according to the needs of those skilled in the art.

[0028] In Figure 1Among them, gateway devices B, C, D, E, F, G, H, and I are all gateway devices of the same type as gateway device A. Gateway device A can search for gateway devices B, C, H, and I through the search module; gateway device B can search for gateway devices E and F through the search module; gateway device C can search for gateway devices D and G through the search module; gateway device D can search for gateway devices C and G through the search module; gateway device E can search for gateway devices B and F through the search module; gateway device F can search for gateway devices B and E through the search module; gateway device G can search for gateway devices C and D through the search module; gateway device H can search for gateway device A through the search module; gateway device I can search for gateway device A through the search module.

[0029] For example, gateway devices A, B, C, D, E, F, G, H, and I can all normally collect data and upload the data to the server through a wireless network (such as 4G). Gateway device A can search for gateway devices B, C, H, and I through the Wifi / Lora search module, and gateway device B can search for gateway devices E and F through the Wifi / Lora search module. Each gateway device can search for other gateway devices near itself.

[0030] When any gateway device is in a normal data collection working state and disconnected from the network, it is denoted as gateway device A; if the terminal device data collected by gateway device A is non-alarm data, then gateway device A is used to cache the non-alarm data it collects into its own data cache module; If the terminal device data collected by gateway device A is alarm data, then gateway device A searches for other gateway devices through the search module, and determines the optimal gateway device according to parameters such as the current network connection signal strength, the alarm data upload frequency coefficient per unit time, and the disconnection rate within a set time of each gateway device searched by gateway device A. After the optimal gateway device allows a response, the alarm data is sent to the optimal gateway device through the search module, and the optimal gateway device sends the alarm data to the server of gateway device A through a temporary process.

[0031] Among them, if the terminal device data collected by gateway device A is alarm data, the process of determining the optimal gateway device according to parameters such as the current network connection signal strength, the alarm data upload frequency coefficient per unit time, and the disconnection rate within a set time is as follows: For each gateway device searched by gateway device A, calculate the value corresponding to each gateway device according to the preset screening principle formula, and the gateway device corresponding to the largest value is the optimal gateway device; The screening principle formula is: ; Among them, is the maximum value of the alarm data upload frequency coefficients of all gateway devices searched by gateway device A, The minimum value of the alarm data upload frequency coefficient for all gateway devices searched by gateway device A, and s is the alarm data upload frequency coefficient of the currently calculated gateway device; The maximum value of the network connection signal strength of all devices searched by gateway device A, The minimum value of the network connection signal strength of all gateway devices searched by device A, and i is the network connection signal strength of the currently calculated gateway device; The maximum value of the disconnection rate of all gateway devices searched by gateway device A, The minimum value of the disconnection rate of all gateway devices searched by gateway device A, and k is the disconnection rate of the currently calculated gateway device; , and are all constant coefficients. For example, is 0.2, is 0.3, is 0.5; , and The specific values of these three can be adjusted according to the actual situation and experience.

[0032] In this embodiment, the optimal gateway device is determined by parameters such as the current network connection signal strength, the alarm data upload frequency coefficient within a unit time, and the disconnection rate within a set time, which can avoid the loss of alarm data during transmission and ensure the integrity of the data.

[0033] Suppose that if the terminal device data collected by gateway device A is alarm data, and when the determined optimal gateway device is gateway device B, gateway device A entrusts gateway device B to start a temporary process to connect to the server of device A and upload the alarm data to the server of gateway device A. After receiving the entrustment from device A, gateway device B starts a temporary process to connect to the server of gateway device A and sends an allow response to gateway device A. After receiving the allow response from gateway device B, gateway device A sends the alarm data to gateway device B through the search module. After receiving the data, gateway device B sends the alarm data to the server of gateway device A through the temporary process.

[0034] Among them, after the optimal gateway device finishes sending the alarm data of gateway device A through the temporary process, it keeps the temporary process connection alive for a set time period (such as 10s). If new alarm data of gateway device A is received within the preset time period (such as 10s), it uploads the new alarm data to the server of gateway device A and restarts the timing of the set time period (such as 10s); if no new alarm data of gateway device A is received within the set time period (such as 10s), the optimal gateway device disconnects from the server of gateway device A and closes the temporary process.

[0035] When the network of gateway device A has not been restored within a set time period and the remaining cache space of its own data cache module reaches the first preset threshold (such as 90%), gateway device A is used to search for other gateway devices through a search module, and determine the optimal gateway device according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate of the searched gateway devices, and upload the data in the data cache module of gateway device A itself to the optimal gateway device.

[0036] Specifically, the process of determining the optimal gateway device according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate of the searched gateway devices is as follows: According to the formula , calculate the values corresponding to each of the searched gateway devices; Select the gateway device corresponding to the largest value as the optimal gateway device; Wherein, is the maximum value of the current cache space utilization rates of all gateway devices searched by gateway device A, is the minimum value of the current cache space utilization rates of all gateway devices searched by device A, p is the current cache space utilization rate of the currently calculated gateway device; is the maximum value of the cache space growth rates of all gateway devices searched by gateway device A, is the minimum value of the cache space growth rates of all gateway devices searched by gateway device A, g is the cache space growth rate of the currently calculated gateway device; and are both constant coefficients. For example, and are 0.6 and 0.4 respectively; and The specific values of can be adjusted according to actual situations and experience. When the network of gateway device A has not been restored within a set time period and the remaining cache space of its own data cache module reaches the first preset threshold (such as 90%), the optimal gateway device is determined according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate of the gateway device in this embodiment, which can make full use of existing resources and achieve the effect of storing as much cache data as possible. When the network of gateway device A has not been restored within a set time period and the remaining cache space of its own data cache module reaches the first preset threshold (such as 90%), and the remaining cache space of the determined optimal gateway device is less than the second preset threshold (such as 30%), gateway device A is used to re-search for other gateway devices through the search module, and re-determine the optimal gateway device according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate of the searched gateway devices, and upload the data in the data cache module of gateway device A itself to the re-determined optimal gateway device.

[0037] For example, assume that the performance ranking of gateway devices is determined based on parameters such as the cache space growth rate per unit time and the current cache space utilization rate, and the ranking is Gateway Device B > Gateway Device C > Gateway Device H > Gateway Device I. When Gateway Device B is the optimal gateway device, Gateway Device A sends a request to Gateway Device B to temporarily store the cache data of Gateway Device A. After receiving the permission response from Gateway Device B, Gateway Device A records the currently permitted storage time and storage path. Gateway Device A then starts sending subsequent collected ordinary data to Gateway Device B for storage. When the space in the data cache module of Gateway Device B is stored to 70% (or other value), Gateway Device B notifies Gateway Device A that it can no longer store data, and Gateway Device A searches for other available gateway devices nearby again.

[0038] Based on parameters such as the cache space growth rate per unit time and the current cache space utilization rate, the optimal gateway device is determined. If the determined optimal gateway device is Gateway Device C, after Gateway Device A receives the response from Gateway Device C permitting storage, Gateway Device A records the currently permitted storage time and storage path of the gateway device and starts sending subsequent cache data to Gateway Device C. Similarly, when Gateway Device C can no longer store data, Gateway Device A will ask whether Gateway Device H and Gateway Device I can store the data. If they can, based on parameters such as the cache space growth rate per unit time and the current cache space utilization rate, the optimal gateway device is determined and then the storage is carried out.

[0039] When the remaining cache spaces of all gateway devices that Gateway Device A can search for do not meet the set requirements, all the gateway devices searched by Gateway Device A are sorted according to their performance, and the gateway device with the best performance is selected as the entrusted object of Gateway Device A for searching, and the corresponding optimal gateway device of the entrusted object is determined. Among them, the performance of the gateway device is determined based on parameters such as the cache space growth rate per unit time and the current cache space utilization rate. If the gateway device entrusted by Gateway Device A searches for the corresponding optimal gateway device, the entrusted gateway device notifies Gateway Device A to send subsequent cache data to the entrusted gateway device, and then the entrusted gateway device forwards it to the corresponding optimal gateway device for storage.

[0040] For example, if gateway device B searches and finds available gateway devices E and F nearby, and the optimal gateway device determined by parameters such as the cache space growth rate per unit time and the current cache space utilization rate is gateway device E, then gateway device B notifies gateway device A to send subsequent cached data to gateway device B, and then gateway device B forwards it to gateway device E for storage. Gateway device A records the current device-allowed storage time and storage path. When the space of the data cache module of gateway device E is stored to 70% (or other), gateway device E notifies gateway device B that it can no longer store data, and gateway device B notifies gateway device A that gateway device E can no longer store. Then gateway device B searches for other available devices nearby again. When gateway device B searches for other available gateway devices, it re-determines the corresponding optimal gateway device according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate, and notifies gateway device A that it can continue to transfer and store to the corresponding optimal gateway device.

[0041] If all the gateway devices searched by the gateway device entrusted by gateway device A are unavailable, then the entrusted gateway device notifies gateway device A, and gateway device A re-trusts the corresponding gateway device to continue the search in the order of the performance of all the gateway devices it has searched.

[0042] For example, if gateway device B searches and finds no available devices nearby, then gateway device B notifies gateway device A. Gateway device A entrusts the searched gateway device C to search whether there are available devices near gateway device C. If there are, the corresponding optimal gateway device is determined according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate. If all the gateway devices near gateway device A have been entrusted, then gateway device A entrusts gateway device B to let gateway device B entrust gateway device E to search whether there are available gateway devices near gateway device E. And so on.

[0043] When gateway device A restores the network, gateway device A first uploads its own data to the server, and then, according to the time sequence of data storage, retrieves the stored data from other devices according to the storage path and uploads it to the server.

[0044] When the gateway device A fails to restore the network and all gateway devices in the current area are unable to continue storing data, the terminal device data stored in the gateway device A is uploaded to the server of the gateway device A through a temporary process. Meanwhile, the gateway device A clears the recorded allowed storage time and storage path of the gateway device. For example, when the gateway device A fails to restore the network and all devices in the current area are unable to continue storing data, the gateway device A notifies the gateway device B and the gateway device C to enable the temporary process to connect to the server of the gateway device A, and uploads the cached data of the gateway device A to the server of the gateway device A through the temporary process. Meanwhile, the gateway device A clears the recorded allowed storage time and storage path of the gateway device. Then the gateway device A entrusts the gateway device B to notify the gateway device E and the gateway device F to enable the temporary process to connect to the server of the gateway device A, and upload the cached data of the gateway device A to the server of the gateway device A. After the gateway device B uploads all the cached data of the gateway device A to the server of the gateway device A, the gateway device A sends its own cached data to the gateway device B, and the temporary process of the gateway device B uploads it to the server of the gateway device A. When the gateway device opens the temporary process to upload the data of the gateway device A to the server of the gateway device A, it closes the temporary process. This process is repeated until all the cached data of the gateway device A is uploaded to the server of the gateway device A.

[0045] In one or more embodiments, a gateway distributed cache transmission method is further provided, which is based on the above gateway distributed cache transmission system and includes: Determine whether the network of the gateway device with normal data acquisition work is disconnected. If so, record this gateway device as the gateway device A; If the terminal device data collected by the gateway device A is non-alarm data, the gateway device A caches the terminal device data it collects into its own data cache module; If the terminal device data collected by the gateway device A is alarm data, the gateway device A searches for other gateway devices through the search module, and determines the optimal gateway device according to parameters such as the current network connection signal strength, the alarm data upload frequency coefficient per unit time, and the network disconnection rate within the set time of each gateway device searched by the gateway device A. After the optimal gateway device allows a response, the alarm data is sent to the optimal gateway device through the search module, and the optimal gateway device sends the alarm data to the server of the gateway device A through a temporary process.

[0046] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. 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 gateway distributed cache transmission system, characterized in that Including: A number of distributed gateway devices of the same type that communicate with the server; each gateway device includes a collection module, a data cache module, a wireless transmission module, and a search module; each gateway device collects terminal device data through its own collection module and uploads it to the server through the wireless transmission module; When any gateway device is in a normal data collection state and has a disconnected network, it is recorded as gateway device A; If the terminal device data collected by gateway device A is non-alarm data, gateway device A is used to: cache the non-alarm data it collects into its own data cache module; If the terminal device data collected by gateway device A is alarm data, gateway device A is used to: search for other gateway devices through the search module and determine the optimal gateway device, and after the optimal gateway device allows a response, send the alarm data to the optimal gateway device through the search module, and the optimal gateway device sends the alarm data to the server of gateway device A through a temporary process.

2. The gateway distributed cache transmission system according to claim 1, characterized in that In gateway device A, the optimal gateway device is determined according to parameters such as the current network connection signal strength, the alarm data upload frequency coefficient per unit time, and the network disconnection rate within a set time.

3. The gateway distributed cache transmission system according to claim 2, wherein In gateway device A, the process of determining the optimal gateway device is as follows: For each gateway device searched by gateway device A, calculate the value corresponding to each gateway device according to a preset screening principle formula, and the gateway device corresponding to the largest value is the optimal gateway device; The screening principle formula is as follows: ; Among them, is the maximum value of the alarm data upload frequency coefficient of all gateway devices searched by gateway device A, is the minimum value of the alarm data upload frequency coefficient of all gateway devices searched by gateway device A, and s is the alarm data upload frequency coefficient of the currently calculated gateway device; is the maximum value of the network connection signal strength of all devices searched by gateway device A, is the minimum value of the network connection signal strength of all gateway devices searched by device A, and i is the network connection signal strength of the currently calculated gateway device; is the maximum value of the network disconnection rate of all gateway devices searched by gateway device A, is the minimum value of the network disconnection rate of all gateway devices searched by gateway device A, and k is the network disconnection rate of the currently calculated gateway device; , and are all constant coefficients.

4. The gateway distributed cache transmission system according to claim 1, wherein The optimal gateway device is used to: after the temporary process sends the alarm data of gateway device A, keep the connection of the temporary process alive for a set time period. If new alarm data of gateway device A is received within the preset time period, upload the new alarm data to the server of gateway device A and restart the timing of the set time period; if no new alarm data of gateway device A is received within the set time period, the optimal gateway device disconnects the connection with the server of gateway device A and closes the temporary process.

5. The gateway distributed cache transmission system according to claim 1, wherein When, within the set time period, the network of gateway device A has not recovered and the remaining cache space of its own data cache module reaches the first preset threshold, gateway device A is used to: search for other gateway devices through the search module, and determine the optimal gateway device according to parameters such as the cache space growth rate per unit time and the current cache space usage rate of the searched gateway devices, and upload the data in the data cache module of gateway device A itself to the optimal gateway device.

6. The gateway distributed cache transmission system according to claim 5, wherein In gateway device A, the process of determining the optimal gateway device according to parameters such as the cache space growth rate per unit time and the current cache space usage rate of the searched gateway devices is as follows: According to the formula , calculate the values corresponding to each of the searched gateway devices; Select the gateway device corresponding to the largest value as the optimal gateway device; wherein, is the maximum value of the current cache space utilization rate of all gateway devices searched by gateway device A, is the minimum value of the current cache space utilization rate of all gateway devices searched by device A, and p is the current cache space utilization rate of the currently calculated gateway device; is the maximum value of the cache space growth rate of all gateway devices searched by gateway device A, is the minimum value of the cache space growth rate of all gateway devices searched by gateway device A, and g is the cache space growth rate of the currently calculated gateway device; and are both constant coefficients.

7. The gateway distributed cache transmission system according to claim 5, characterized in that, When, within a set time period, the network of gateway device A has not been restored, the remaining cache space of its own data cache module reaches a first preset threshold, and the remaining cache space of the determined optimal gateway device is less than a second preset threshold, gateway device A is used to: re-search for other gateway devices through the search module, and re-determine the optimal gateway device according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate of the searched gateway devices, and upload the data in the data cache module of gateway device A itself to the re-determined optimal gateway device.

8. The gateway distributed cache transmission system according to claim 5, characterized in that, When the remaining cache spaces of the gateway devices that gateway device A can search for do not meet the set requirements, gateway device A is used to: sort all the gateway devices it has searched for according to performance from good to bad, select the gateway device with the best performance as the entrusted object of gateway device A for searching and determine the corresponding optimal gateway device of the entrusted object; wherein, the performance of the gateway device is determined according to parameters such as the cache space growth rate per unit time and the current cache space utilization rate. If the gateway device entrusted by gateway device A searches for the corresponding optimal gateway device, the entrusted gateway device notifies gateway device A to send the subsequent cache data to the entrusted gateway device, and then the entrusted gateway device forwards it to the corresponding optimal gateway device for storage. If all the gateway devices searched by the gateway device entrusted by gateway device A are unavailable, the entrusted gateway device notifies gateway device A, and gateway device A re-trusts the corresponding gateway device to continue searching in the order of performance of all the gateway devices it has searched for.

9. The gateway distributed cache transmission system according to claim 1, wherein When gateway device A restores its network, gateway device A preferentially uploads its own data to the server, and then retrieves the stored data from other devices according to the time sequence of data storage and the stored path, and uploads it to the server. When gateway device A cannot restore its network and all gateway devices in the current area cannot continue to store data, the terminal device data stored with gateway device A is uploaded to the server of gateway device A through a temporary process, and at the same time, gateway device A clears the recorded allowable storage time and storage path of the gateway device.

10. A gateway distributed cache transmission method, characterized in that, Based on the gateway distributed cache transmission system according to any one of claims 1-9, comprising: Judging whether the network of the gateway device with normal data acquisition work is disconnected. If so, this gateway device is denoted as gateway device A. If the terminal device data collected by gateway device A is non-alarm data, gateway device A caches the terminal device data it has collected into its own data cache module. If the terminal device data collected by gateway device A is alarm data, gateway device A searches for other gateway devices through the search module, and determines the optimal gateway device according to parameters such as the current network connection signal strength, the alarm data upload frequency coefficient per unit time, and the network disconnection rate within a set time of each gateway device searched by gateway device A. After the optimal gateway device allows a response, the alarm data is sent to the optimal gateway device through the search module, and the optimal gateway device sends the alarm data to the server of gateway device A through a temporary process.

Citation Information

Patent Citations

  • Data cache method and device for distributed object storage, equipment and medium

    CN109451029A

  • Data processing method and device and storage medium

    CN110535965A

  • Multi-level caching method for coping with large-flow data

    CN112699154A

  • Data acquisition system and method, electronic equipment and storage medium

    CN113190583A

  • Distributed node index and alarm caching method and device and electronic equipment

    CN115664940A