A method and system for self-management of an Internet of Things gateway in an offline environment
By adjusting the data generation rate of the terminal device and performing data sampling processing, the problem of difficulty in data caching in the offline state of the IoT gateway is solved, data reliability and management efficiency are improved, and the loss of important data is avoided.
Patent Information
- Application Number
- CN202211742276.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Due to limited memory and disk space, IoT gateways cannot effectively cache data when offline, resulting in the omission or loss of important data. Existing technologies may delete or overwrite early data through variable-length encoding and multi-level compression processing, reducing data reliability. sex.
By obtaining the data collection characteristics of the terminal device, determine the data volume reduction ratio, adjust the data generation rate, and perform sampling processing to reasonably cache data in an offline environment.
It reduces the omission of important data, improves data reliability, and improves the management efficiency and disk utilization of the IoT gateway in the offline state.
Smart Images

Figure CN116074380B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Things technology, and in particular to a method and system for self-management of an Internet of Things gateway in an offline environment. Background Art
[0002] With the rapid development of the Internet of Things and the rapid advancement of science and technology, the Internet of Things gateway has solved the problem of point-to-point single network communication of traditional devices. With the help of radio frequency tag technology, sensor technology, remote sensing technology, short-range communication technology, etc., the networking objects have been expanded to a large number of sensors, actuators and other terminal devices of various types. Sensors, actuators and other terminal devices usually have the capabilities of perception, calculation, execution and communication, and are responsible for generating business data, receiving command data, etc., while the Internet of Things gateway is responsible for relaying and transmitting this data information between the terminal device and the remote network. However, the memory and disk space of the Internet of Things gateway are usually limited, the amount of cached data is small, and the disk will be full if it is offline for a long time.
[0003] In order to solve the problem of data caching in the offline state of the IoT gateway, CN202110868558.1 discloses a method for efficiently caching historical data in the offline state of the IoT data collection gateway, which performs variable-length encoding and multi-level compression on the historical data to reduce the storage overhead of the disk. However, when processing offline messages, important early data may be deleted or overwritten, thereby reducing the reliability of the data. Summary of the invention
[0004] One or more embodiments of the present specification provide a method for self-management of an Internet of Things gateway in an offline environment. The method is executed by a processor located in the Internet of Things gateway, and includes: obtaining data collection characteristics of one or more terminals connected to the Internet of Things gateway; determining a data volume reduction ratio of one or more terminals based on the data collection characteristics; issuing instructions to one or more terminals to adjust a data generation rate based on the data volume reduction ratio, and generating target data based on the adjusted data generation rate.
[0005] One of the embodiments of the present specification provides a system for self-management of an Internet of Things gateway in an offline environment, the system comprising: an acquisition module, used to acquire data collection characteristics of one or more terminals connected to the Internet of Things gateway; a determination module, used to determine a data volume reduction ratio of one or more terminals based on the data collection characteristics; a sending module, used to issue instructions to one or more terminals, so that the one or more terminals adjust the data generation rate based on the data volume reduction ratio, and generate target data based on the adjusted data generation rate.
[0006] One or more embodiments of the present specification provide a self-management device for an Internet of Things gateway in an offline environment, the device comprising at least one processor and at least one memory; the at least one memory is used to store computer instructions; and the at least one processor is used to execute at least part of the computer instructions to implement a method for self-management of an Internet of Things gateway in an offline environment.
[0007] One or more embodiments of the present specification provide a computer-readable storage medium, which stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes a method for self-management of an Internet of Things gateway in an offline environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:
[0009] Figure 1 It is a schematic diagram of an application scenario of a self-management system of an Internet of Things gateway in an offline environment according to some embodiments of this specification;
[0010] Figure 2 It is a module diagram of a self-management system of an Internet of Things gateway in an offline environment according to some embodiments of this specification;
[0011] Figure 3 is an exemplary flow chart of a method for self-management of an Internet of Things gateway in an offline environment according to some embodiments of this specification;
[0012] Figure 4 is a schematic diagram of a sampling process according to some embodiments of the present specification;
[0013] Figure 5A is a schematic diagram of determining sampling module parameters according to some embodiments of this specification;
[0014] Figure 5B It is a schematic diagram of determining sampling module parameters according to other embodiments of this specification. DETAILED DESCRIPTION
[0015] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of this specification. For ordinary technicians in this field, this specification can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.
[0016] It should be understood that the "system", "device", "unit" and / or "module" used herein are a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.
[0017] As shown in this specification and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "comprise" and "include" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0018] Flowcharts are used in this specification to illustrate the operations performed by the system according to the embodiments of this specification. It should be understood that the preceding or following operations are not necessarily performed precisely in order. Instead, the steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.
[0019] The IoT gateway is used to collect signals from various terminals and communicate with the Internet. However, when the network is interrupted, due to the limited memory and disk space of the IoT gateway, it cannot cache a large amount of offline data, which can easily cause the omission or loss of important data. CN202110868558.1 discloses a method for efficiently caching historical data in an IoT data collection gateway in an offline state. It only performs variable-length encoding and multi-level compression on the data uploaded by the terminal device. When the amount of data generated by the terminal exceeds the disk space, the gateway will delete the early historical cache files, resulting in the loss of early data. Therefore, it is only suitable for offline data processing in a short period of time.
[0020] Therefore, some embodiments of this specification are based on the data collection characteristics of the terminal connected to the IoT gateway; determine the data volume reduction ratio of the terminal; make the terminal adjust the data generation rate; and perform sampling processing on the data collected and uploaded from the terminal, and the sampling processing is performed based on the sampling rate. For example, according to the collection frequency and data generation rate in the data collection characteristics, the data volume reduction ratio is determined, and the greater the collection frequency and the greater the data generation rate, the greater the data volume reduction ratio can be. By making the terminal adjust the data generation rate and sample the data, reasonable data caching in the offline state is completed.
[0021] Figure 1 It is a schematic diagram of an application scenario of a self-management system of an Internet of Things gateway in an offline environment according to some embodiments of this specification.
[0022] like Figure 1As shown, in the application scenario, a gateway device 110, a processor 120, a storage device 130, a terminal device 140, a network 150 and a carrier 160 may be included. The embodiments of this specification can be applied to different transportation systems. For example, rickshaws, means of transportation (for example, bicycles, motorcycles, etc.), cars (for example, small cars, buses, large transport vehicles, etc.), unmanned driving, ships and other carriers. The application scenarios of different embodiments of this specification include but are not limited to one or a combination of several of the transportation industry, warehousing and logistics industry, logistics supply chain management, environmental monitoring management, disaster warning management, etc. It should be understood that the application scenarios of the systems and methods of this specification are only some examples or embodiments of this specification. For ordinary technicians in this field, without paying creative labor, this specification can also be applied to other similar scenarios based on these drawings. For example, other similar Internet of Things systems.
[0023] In some embodiments, the gateway device 110 may be applied to a carrier 160 to collect signals from various terminal devices 140 on the carrier 160 and communicate with the processor 120 through a network 150 .
[0024] In some embodiments, the terminal device 140 can be set on a ship, and the gateway device 110 can obtain the sea wave condition information and ship movement speed information collected by the terminal device 140 through the network 150. The processor 120 can receive the collected information transmitted from the gateway device 110 and perform information analysis based on the collected information.
[0025] In some embodiments, the terminal device 140 can be set in a car, the gateway device 110 can obtain the ambient light intensity and road environment information collected by the terminal device 140 through the network 150, and the processor 120 can receive the collected information transmitted from the gateway device 110, and adjust the illumination intensity of the car lights based on the collected information.
[0026] The above method is only for ease of understanding, and the system can also implement the method in this specification in other feasible operation modes.
[0027] The gateway device 110 refers to a device with network access capability. The gateway device 110 may be an internetwork connector of the Internet of Things, with one end connected to the processor 120 and the other end connected to the terminal device 140 to achieve network interconnection between the processor 120 and the terminal device 140.
[0028] In some embodiments, the gateway device 110 transparently transmits information of the locally connected terminal device 140 to the processor 120, or connects the control instructions of the processor 120 to the local terminal device 140. The gateway device 110 may include a processing unit, a storage unit, etc. For example, the gateway device may be a router. For example, the gateway device 110 may also be a computer.
[0029] The processor 120 may process data and / or information obtained from the gateway device 110 or system components. The processor may execute program instructions based on these data, information and / or processing results to perform one or more functions described in this specification. In some embodiments, the processor 120 may include one or more sub-processing devices (e.g., a single-core processing device or a multi-core multi-core processing device). By way of example only, the processor 120 may include a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a microprocessor, etc., or any combination thereof.
[0030] The storage device 130 may be used to store data and / or instructions. The storage device 130 may include one or more storage components, each of which may be an independent device or a part of another device. In some embodiments, the storage device 130 may include a random access memory (RAM), a read-only memory (ROM), a mass storage device, etc., or any combination thereof. Exemplarily, the mass storage device may include a magnetic disk, an optical disk, a solid-state disk, etc.
[0031] In some embodiments, the gateway device 110 , the terminal device 140 , and other possible system components may include a processor 120 and / or a storage device 130 .
[0032] The terminal device 140 may have the capabilities of perception, calculation, execution and communication, and is responsible for generating business data, receiving command data, etc. The terminal device 140 may include one or more sub-functional devices (e.g., a single sensor device or a sensor system device composed of multiple sensor devices). For example, the terminal device 140 may be a device on a ship for collecting data, including but not limited to: a detection terminal for monitoring draft depth, a detection terminal for monitoring whether there is anomaly (available images) around.
[0033] In some embodiments, the terminal device 140 can be one of various acquisition devices, industrial control equipment, intelligent instrumentation equipment, local monitoring equipment, sensor devices, or any combination thereof, such as a camera 140-1, a temperature sensor 140-2, a smoke alarm 140-3, a detector 140-4, or any combination thereof.
[0034] The above examples are only used to illustrate the wide range of the terminal device 140 rather than to limit its scope.
[0035] Data refers to the digital representation of information, which can include various types, such as binary data, text data, image data, video data, etc. Instructions refer to programs that can control devices or components to perform specific functions.
[0036] The network 150 may connect the components of the system and / or connect the system to external resources. The network 150 enables the processor 120 to communicate with the gateway device 110. In some embodiments, the network 150 may be any one or more of a wired network or a wireless network. For example, the network 150 may include a cable network, an optical fiber network, a telecommunications network, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network (ZigBee), a near field communication (NFC), an in-device bus, an in-device line, a cable connection, or the like, or any combination thereof.
[0037] The carrier 160 refers to a device that carries the terminal device 140. The terminal device 140 may be provided at one or more locations on the carrier 160 to reflect the status of the terminal device 140. The carrier 160 includes, but is not limited to, a rickshaw, a means of transportation (e.g., a bicycle, an electric motorcycle, etc.), a ship 160-1 (e.g., a boat, a ship, a large transport ship, etc.), a car 160-2 (e.g., a small car, a bus, a large transport vehicle, etc.), and the like.
[0038] Figure 2 According to some embodiments of this specification, the module diagram of the Internet of Things gateway self-manages the system in an offline environment. Figure 2 As shown, the self-management system 200 of the Internet of Things gateway in an offline environment may include an acquisition module 210, a determination module 220, and a sending module 230.
[0039] The acquisition module 210 can be used to acquire data collection characteristics of one or more terminals connected to the Internet of Things gateway.
[0040] For more information about acquiring the data collection characteristics of the terminal and related information, please refer to Figure 3 .
[0041] The determination module 220 may be configured to determine a data volume reduction ratio of the one or more terminals based on the data collection characteristics.
[0042] In some embodiments, the determination module is further used to: determine the data coverage of the one or more terminals based on the data collection characteristics; determine the data importance of the one or more terminals based on the type of collected data of the one or more terminals; and determine the data volume reduction ratio of the one or more terminals based on the data coverage and the data importance.
[0043] In some embodiments, the data importance is related to a decision requirement, and the decision requirement is determined based on a sampling module parameter, and the sampling module parameter corresponds to at least one decision in a decision set corresponding to the carrier.
[0044] For the decision requirement, sampling module parameters and related information, please refer to Figure 5.
[0045] The sending module 230 may be configured to send instructions to the one or more terminals, so that the one or more terminals adjust the data generation rate based on the data volume reduction ratio, and generate target data based on the adjusted data generation rate.
[0046] For information about the terminal adjusting the data generation rate based on the data volume reduction ratio and related information, please refer to Figure 3 .
[0047] In some embodiments, the system also includes a sampling processing module, which is used to: perform sampling processing on the data collected and uploaded from the one or more terminals, the sampling processing is performed based on a sampling rate, and determining the sampling rate includes: obtaining the current remaining capacity of the Internet of Things gateway; based on the current remaining capacity and the uploaded data characteristics of the one or more terminals, determining the sampling rate of the one or more terminals.
[0048] It should be noted that the above description of the self-management system and its modules of the IoT gateway in an offline environment is only for the convenience of description and cannot limit this specification to the scope of the embodiments. It is understandable that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine the modules or form a subsystem to connect with other modules without deviating from this principle. In some embodiments, Figure 2 The acquisition module, determination module and sending module disclosed in the specification can be different modules in a system, or one module can realize the functions of two or more modules. For example, each module can share a storage module, or each module can have its own storage module. Such variations are all within the protection scope of this specification.
[0049] Figure 3 FIG. 1 is an exemplary flow chart of a method for self-management of an IoT gateway in an offline environment according to some embodiments of this specification. Figure 3 As shown, process 300 includes the following steps.
[0050] Step 310: Acquire data collection characteristics of one or more terminals connected to the Internet of Things gateway.
[0051] The terminal is a device on a carrier (such as a ship) for collecting data. In some embodiments, the terminal is each detection device on the carrier for sensing data. For example, a ship can be deployed with the following terminals: a detection terminal for monitoring draft depth, which can collect draft depth data through laser, ultrasound, images, etc.; a detection terminal for monitoring whether there are abnormalities around, which can collect data on whether there are other ships approaching through images, etc.; a detection terminal for monitoring sea surface wave conditions; a detection terminal for monitoring the speed of the ship, etc.
[0052] The IoT gateway is a gateway on a carrier object, which is used to collect signals from various terminals and communicate with the Internet. For example, a gateway on a carrier (such as a ship or a truck) is used to collect signals from various terminals on the carrier and communicate with the processor. For more information about IoT gateways and related information, see Figure 1 .
[0053] Data collection characteristics are characteristics related to the data collection process of the terminal. For example, the data collection characteristics of the terminal can be information such as the frequency of data collection by the terminal, which can include: collection frequency, collection accuracy, and data generation rate. The data generation rate can be determined by the collection frequency and collection accuracy.
[0054] The acquisition frequency refers to the number of times a terminal acquires or generates data within a period of time. In some embodiments, the acquisition frequency may be the number of times a terminal acquires data within a period, and the period may be any positive number, such as 5s, 10s, 100s, etc. For example, the acquisition frequency of terminal 1 may be 44 times / s, and terminal 1 acquires and generates data 44 times per second.
[0055] The acquisition accuracy refers to the accuracy of the data collected or generated by the terminal. In some embodiments, the acquisition accuracy refers to the number of digits after the decimal point retained when collecting data. For example, if the sampling accuracy of terminal 1 is 4, the data collected by terminal 1 retains four digits after the decimal point.
[0056] The data generation rate and related information thereof may refer to the description of step 330 in this specification.
[0057] In some embodiments, the acquisition module 210 may acquire data collection features from a terminal (e.g., terminal device 140). In some embodiments, the acquisition module 210 may acquire data collection features from a storage device (e.g., storage device 130). In some embodiments, the acquisition module 210 may acquire data collection features of one or more terminals connected to the IoT gateway from other data sources and in any reasonable manner.
[0058] Step 320: Determine a data volume reduction ratio of the one or more terminals based on the data collection characteristics.
[0059] The data volume reduction ratio is the ratio of the reduction in the amount of data generated by the terminal. In some embodiments, a specific data volume reduction ratio can be achieved by reducing at least one of the terminal's acquisition frequency and acquisition accuracy. For example, if the terminal's acquisition frequency is 44 times per hour and the data volume reduction ratio is one-half, then according to the data volume reduction ratio, the terminal's acquisition frequency will be reduced to 22 times per hour.
[0060] In some embodiments, the data volume reduction ratio can be determined based on the acquisition frequency and data generation rate in the data acquisition characteristics. The greater the acquisition frequency and the data generation rate, the greater the data volume reduction ratio can be.
[0061] In some embodiments, determining the data volume reduction ratio of the one or more terminals based on the data collection characteristics includes: determining the data coverage of the one or more terminals based on the data collection characteristics; determining the data importance of the one or more terminals based on the type of data collected by the one or more terminals; and determining the data volume reduction ratio of the one or more terminals based on the data coverage and the data importance.
[0062] The data coverage of a terminal is an indicator used to measure whether the data collected by the terminal is sufficient, whether it is sufficient to reflect the real situation, and whether the data is representative enough. Data coverage can be expressed in many ways. For example, it can be expressed by a numerical value (such as 0.2, 0.8, etc.). The higher the numerical value, the higher the coverage. For another example, data coverage can be expressed by levels, such as high coverage, relatively high coverage, low coverage, etc.
[0063] In some embodiments, if the data collected by the terminal is sufficient to reflect the actual situation monitored by the terminal, the data coverage of the terminal is high; if the data collected by the terminal is small and cannot reflect the actual situation monitored by the terminal, the data coverage of the terminal is low.
[0064] In some embodiments, the greater the sampling frequency and the greater the sampling accuracy of the terminal, the greater the data coverage of the terminal.
[0065] In some embodiments, the data coverage of a terminal is also related to the inherent data sensitivity of the data collected by the terminal.
[0066] The inherent data sensitivity of a terminal is the degree of change of the terminal data over time, which is related to the inherent factors of the terminal data. If the trend of the terminal data changing over time is usually basically unchanged or changes slowly, the inherent data sensitivity of the terminal is low. For example, for a detection terminal that monitors draft depth, if the ship / cargo ship is docked at the shore (there are no big waves on the water surface), the draft depth basically remains unchanged, and even in the process of unloading or loading, the draft depth will not change greatly instantly, but will increase or decrease slowly. Therefore, at this time, the inherent data sensitivity of the detection terminal that monitors draft depth is low.
[0067] In some embodiments, the inherent data sensitivity may be obtained through prior knowledge. For example, the inherent data sensitivity may be a parameter pre-set and stored in the storage device 130 according to different scenarios.
[0068] In some embodiments, the inherent data sensitivity and data coverage may be negatively correlated. For example, under the condition that the sampling frequency and sampling accuracy remain the same, the lower the inherent data sensitivity of the terminal, the greater the data coverage; the higher the inherent data sensitivity of the terminal, the smaller the data coverage.
[0069] In some embodiments of the present specification, by taking inherent data sensitivity as a factor affecting data coverage, different data reduction ratios are determined based on the differences in data from each terminal, so that the IoT gateway can accurately adjust the data generation rate of the terminal in an offline state, which helps to improve the management efficiency and quality of the IoT gateway in an offline state.
[0070] The data importance of the terminal can be used to measure the importance of the data collected by the terminal, which is related to the scenario the carrier is in. For example, when a ship is at the shore, the sea surface waves usually pose less threat to the safety of the ship, while the draft usually poses a greater threat to the safety of the ship (for example, too deep a draft may cause the ship to hit the bottom or sink, etc.). Therefore, a detection terminal that monitors the draft can have a higher data importance than a detection terminal that monitors the sea surface wave conditions.
[0071] In some embodiments, the data importance can be a Boolean value, an integer value, a real value with a limited range, a real value with an unlimited range, a fraction, an array, a matrix, or other expressions. In some embodiments, the data importance can be divided into different importance levels according to the importance value difference through statistics or experience, such as very important, generally important, unimportant, etc.
[0072] In some embodiments, the data importance can be obtained through prior knowledge. For example, the data importance can be preset according to different scenarios based on prior knowledge to determine the importance of the data collected by different terminals. The data importance can be a parameter pre-set and stored in the storage device 130.
[0073] In some embodiments, data importance is related to decision requirements and related information can be seen in FIG5 .
[0074] In some embodiments, modeling can be performed or various data analysis algorithms, such as regression analysis, can be used to analyze and process the data coverage and the data importance to obtain the data volume reduction ratio of one or more terminals.
[0075] In some embodiments, the storage device 130 may store a relationship mapping table of data coverage, data importance and data volume reduction ratio, and determine the data volume reduction ratio of the one or more terminals based on at least one of the data coverage and data importance by using a table lookup method.
[0076] In some embodiments, if the data coverage is higher and the data importance is lower, the data volume reduction ratio may be greater. For example, when a ship is at the shore, the data coverage of the detection terminal monitoring the sea surface wave conditions is high and the data importance is low, then the data volume reduction ratio of the detection terminal monitoring the sea surface wave conditions is correspondingly greater.
[0077] In some embodiments, the data volume reduction ratio is also related to the offline time and the estimated offline time.
[0078] The offline time may be the duration of this offline state. The offline time may be represented in a variety of ways, such as 30 minutes offline, 1 hour offline, and may also include the start time of this offline state (e.g., from 8:00 am on October 1, 2022 to the present).
[0079] The estimated offline duration may be the estimated end time of the current offline state. For example, the estimated offline duration is until 00:00 on January 1, 2023. The estimated offline duration may also be the estimated maximum duration of the current offline state. For example, the estimated offline duration is 72 hours.
[0080] In some embodiments, the estimated offline duration can be estimated based on multiple historical offline situations (eg, duration).
[0081] In some embodiments, an estimation model may be used to analyze and process multiple historical offline durations to obtain the current estimated offline duration. The estimation model may be a random forest model, a neural network model, or other models.
[0082] In some embodiments, the data volume reduction ratio can decrease as the offline time increases. For example, when the offline state has just begun, the offline time is short and the data volume reduction ratio can be large; as the offline time gradually approaches the estimated offline time, the data volume reduction ratio can gradually decrease. The closer the data is to the next online state of the IoT gateway, the more meaningful it is, and correspondingly, the smaller the data volume reduction ratio of the terminal is.
[0083] The above embodiment has at least the following beneficial effects: based on the offline time and the estimated offline time, different data volume reduction ratios are determined, so that the IoT gateway can timely adjust the data generation rate of the terminal in the offline state, reduce the omission of important data, and improve the reliability of data.
[0084] Step 330: issuing instructions to the one or more terminals, so that the one or more terminals adjust the data generation rate based on the data volume reduction ratio, and generate target data based on the adjusted data generation rate.
[0085] The data generation rate is the rate at which the terminal generates data, and the data generation rate is related to the terminal's acquisition frequency and acquisition accuracy. For example, when the acquisition frequency is 44 times per second and the acquisition accuracy is 2, the detection terminal for monitoring draft depth collects data 44 times per second, and each data retains 2 decimal places. Then the ship draft depth data generated in one second is 1.01, 1.38, 1.29, 1.88...... (44 sampled data).
[0086] The target data is data generated by the terminal according to the adjusted data generation rate, for example, the draft depth data of the ship generated by the detection terminal for monitoring the draft depth according to at least one of the adjusted collection frequency and collection accuracy.
[0087] In some embodiments, the terminal receives an instruction to adjust the data generation rate sent by the Internet of Things gateway; reduces the current data generation rate and updates it according to the data volume reduction ratio carried in the instruction; obtains the corresponding collection frequency and collection accuracy based on the updated data generation rate, thereby generating target data based on at least one of the collection frequency and collection accuracy.
[0088] An embodiment of the present specification determines the data volume reduction ratio of each terminal through the data collection characteristics of the terminal, so that the terminal reduces the data generation rate according to the data volume reduction ratio, so that the Internet of Things gateway reduces the data collected from each terminal in an offline environment, reduces the storage overhead of the Internet of Things gateway in the offline environment, and improves the utilization rate of the disk while ensuring data reliability.
[0089] Figure 4 is a schematic diagram 400 of a sampling process according to some embodiments of the present specification.
[0090] In some embodiments, sampling processing is performed on data collected and uploaded from one or more terminals, and the sampling processing is performed based on a sampling rate.
[0091] like Figure 4 As shown, the processor 120 can obtain the current remaining capacity 420 of the Internet of Things gateway, and determine the sampling rate 440 of one or more terminals based on the current remaining capacity 420 and the uploaded data characteristics 430 of one or more terminals.
[0092] The sampling rate 440 may refer to the ratio of the number of samples of data extracted by the terminal in a unit time to the total amount of data of the terminal. For example, the total amount of data collected and uploaded by the processor 120 from a terminal in a unit time (e.g., 1s, etc.) is 5Mb, and the number of samples of the extracted data is 0.5Mb, then the sampling rate 440 is 0.5Mb / 5Mb=10%.
[0093] The sampling rate 440 may also refer to the ratio of the number of samples of data extracted by multiple terminals in a unit time to the total amount of data of the multiple terminals. For example, the total amount of data collected and uploaded by the processor 120 from multiple terminals in a unit time (e.g., 1s, etc.) is 50Mb, and the number of samples of the extracted data is 10Mb, then the sampling rate 440 is 10Mb / 50Mb=20%.
[0094] In some embodiments, the processor 120 may obtain the current remaining capacity of the IoT gateway, and determine the sampling rate 440 of one or more terminals based on the current remaining capacity 420 of the IoT gateway and the upload data characteristics 430 of one or more terminals.
[0095] The current remaining capacity 420 of the IoT gateway refers to the currently available capacity of the IoT gateway. For example, if the capacity of the IoT gateway is 32 GB, of which 20 GB has been used, the current remaining capacity 420 of the IoT gateway is 12 GB.
[0096] When the current remaining capacity 420 of the IoT gateway is large, it is considered that the transmission load of the IoT gateway is low, and the sampling rate 440 of the terminal can be higher. Conversely, when the current remaining capacity 420 of the IoT gateway is small, it is considered that the transmission load of the IoT gateway is high, and the sampling rate 440 of the terminal can be lower.
[0097] The upload data feature 430 refers to the feature of the data uploaded by one or more terminals. For example, the upload data feature 430 may include relatively smooth data, good data stability, large data change range, etc.
[0098] In some embodiments, the sampling rate 440 may be determined based on the upload data characteristics 430 of one or more terminals. For example, if the upload data characteristics 430 of terminal A are: the data is relatively smooth and stable, then the sampling rate 440 of terminal A may be relatively low; if the upload data characteristics 430 of terminal B are: the data has a large range of changes, then the sampling rate 440 of terminal B may be relatively high.
[0099] In some embodiments, the processor 120 may determine the data smoothness 450 based on the uploaded data characteristics, and determine the sampling rate 440 based on the data smoothness 450 .
[0100] Data stationarity refers to the degree to which the mean, variance, and covariance of the data change over time. For example, if the mean, variance, and covariance of the data change less over time, the data stationarity of the data is high. On the contrary, if the mean, variance, and covariance of the data change more over time, the data stationarity of the data is low. For data with high data stationarity, a lower sampling rate can be used for sampling to save resources.
[0101] Data stationarity 450 may be determined in various ways, for example, based on statistical characteristics of the data sequence (eg, mean, variance, covariance, etc.), stationarity check, etc.
[0102] Data stationarity 450 can also be quantified into multiple values based on the verification results of the stationarity verification. For example, the stationarity can be verified using methods such as unit root test, Dickey-Fuller test (DF test), augmented Dickey-Fuller test (ADF test), etc. For example, when the p-value (significance test statistic P value) obtained by the ADF test is less than the preset confidence (e.g., 10%, 5%, 1%), the data sequence is considered to be stationary.
[0103] When an autoregressive process: y t =by t-1 +a+∈ t (where ∈ t It is assumed that the mean is equal to 0, a is the constant term, and b is the lag term coefficient). If the lag term coefficient b is 1, it is called a unit root.
[0104] In statistics, the DF test can test whether an autoregressive model has a unit root. The DF test is used to determine the existence of a unit root in a data series, thereby helping to determine whether the data series is stationary.
[0105] The ADF test is an extension of the DF test. The ADF test is to determine whether the data sequence has a unit root. If the data sequence is stable, there is no unit root, otherwise, there is a unit root.
[0106] In some embodiments, data stability 450 may also be related to inherent data sensitivity 460. For example, under the same other conditions (e.g., the statistical characteristics of the data sequence are the same, etc.), the larger the inherent data sensitivity 460 is, the more frequent the changes in the collected data are, and the larger the data stability 450 should be, so that the IoT gateway can collect data stably. For more information about inherent data sensitivity 460, please refer to Figure 3 Related description in .
[0107] In some embodiments, the processor 120 may determine the data smoothness 450 based on the uploaded data characteristics 430 and the inherent data sensitivity 460 of one or more terminals, and determine the sampling rate 440 based on the current remaining capacity 420 of the IoT gateway and the data smoothness 450 .
[0108] like Figure 4 As shown in the dotted box in , the processor 120 can determine the sampling rate 440 according to the current remaining capacity 420, data stability 450, offline time 470 and estimated offline time 480 of the IoT gateway, wherein the data stability 450 is determined based on the uploaded data characteristics 430 and inherent data sensitivity 460 of one or more terminals.
[0109] In some embodiments of the present specification, data smoothness is determined based on inherent data sensitivity, so that the Internet of Things gateway can improve the data smoothness of data collection in an offline environment, thereby improving the stability of the Internet of Things gateway.
[0110] In some embodiments, the sampling rate 440 may also be related to the offline time 470 and the estimated offline time 480. For example, the larger the offline time 470 is (the closer it is to the estimated offline time), the more meaningful the data is. Therefore, when the IoT gateway is just offline, the offline time 470 is shorter and the sampling rate 440 may be smaller. As the offline time 470 gradually approaches the estimated offline time 480, the sampling rate 440 may gradually increase. For more information about the offline time 470 and the estimated offline time 480, please refer to Figure 3 Related description in .
[0111] like Figure 4As shown, in some embodiments, the processor 120 can determine the data smoothness 450 based on the uploaded data characteristics 430 and the inherent data sensitivity 460 of one or more terminals, determine the sampling rate 440 based on the current remaining capacity 420 of the Internet of Things gateway, the data smoothness 450, the offline time 470 and the estimated offline time 480, and perform sampling processing 410 on the data collected and uploaded from one or more terminals 140 based on the sampling rate 440.
[0112] In some embodiments of the present specification, the sampling rate is determined based on the offline time and the estimated offline time, so that the IoT gateway can use a relatively low sampling rate when it is just offline, while ensuring the sampling processing efficiency and reducing the growth rate of the used disk space.
[0113] In some embodiments of the present specification, a sampling rate is determined based on data smoothness, and data collected and uploaded from one or more terminals is sampled and processed based on the sampling rate, so that the IoT gateway can verify data smoothness in an offline environment, thereby improving disk utilization while ensuring sampling processing efficiency.
[0114] It should be noted that the above description of the schematic diagram 400 is only for example and explanation, and does not limit the scope of application of this specification. For those skilled in the art, various modifications and changes can be made to the schematic diagram 400 under the guidance of this specification. However, these modifications and changes are still within the scope of this specification.
[0115] In some embodiments, the data importance is related to a decision requirement, and the decision requirement is determined based on a sampling module parameter, and the sampling module parameter corresponds to at least one decision in a decision set corresponding to the carrier.
[0116] Decision refers to a predictive action plan made by the processor 120. For example, the decision may include predicting the risk of sinking, predicting the risk of running aground, predicting the risk of collision, etc.
[0117] Depending on the carrier, there may be different decisions or decision sets. For example, based on the environmental data and water level information collected by the terminals deployed in various places on the ship, the ship's failure risk value is predicted. "Predicting the ship's failure risk value" is a decision, and "failure risk value" is the decision result. A decision set refers to a set of multiple decisions.
[0118] The decision-making requirement refers to the usefulness of the data collected by the terminal for the decision-making in the process of the carrier performing the operation. For example, if a decision (such as predicting the risk of a shipwreck) requires the collected data of terminal 1 and terminal 2 to be input into the decision model to obtain the first prediction result; after the collected data of terminal 1 is input into the sampling module (for example, sampling module 1), and then input into the decision model, the second prediction result obtained is not significantly different from the first prediction result, and in multiple decisions, the collected data of terminal 1 has the above characteristics, then it is considered that the collected data of terminal 1 is not very useful for predicting the risk of a shipwreck, that is, the data importance of the collected data of terminal 1 is not great, and the data generation rate of the collected data of terminal 1 should be reduced when offline (for example, by reducing the collection frequency or collection accuracy, etc.).
[0119] In some embodiments, the decision requirement can be determined based on the sampling module parameters. For example, assuming that the carrier (e.g., a ship) needs to perform 10 types of decisions (e.g., decisions D1 to D10) in daily operations, the decision requirement corresponding to the data collected by the terminal 1 is determined based on max(a1, a2, ..., a10), where a1, a2, ..., a10 are the sampling module parameters corresponding to the terminal 1 in decisions D1 to D10.
[0120] Sampling module parameters refer to the parameters related to the sampling module. Sampling module parameters include sampling accuracy and sampling frequency.
[0121] Sampling accuracy refers to the accuracy of the sampling module in sampling the sensor's sampled data. For example, when the sampling accuracy of the sensor is 3 and the sampling accuracy of the sampling module is 2, the sensor data of the real environment collected by the sensor can be: 1.111, 1.121, 1.311 (that is, 3 decimal places are retained), and the data processed by the sampling module are: 1.11, 1.12, 1.31 (that is, 2 decimal places are retained).
[0122] Sampling frequency refers to the frequency at which the sampling module samples the sensor's sampled data. For example, the sensor's acquisition frequency is 9 times / s. In one second, the data collected by the sensor is: 1, 3, 2, 2, 1, 3, 1, 1, 5. The sampling frequency of the sampling module is 0.5. Then, the data obtained after processing by the sampling module is: 1, 2, 1, 1, 5 (i.e., sampling is performed every other acquired data).
[0123] The sampling module parameters and the decision requirement have the following relationship: the smaller the sampling accuracy and the smaller the sampling frequency, the smaller the decision requirement. Conversely, the greater the sampling accuracy and the greater the sampling frequency, the greater the decision requirement.
[0124] Figure 5A and Figure 5Bis a schematic diagram of determining sampling module parameters according to some embodiments of this specification. Figure 5A and Figure 5B Describe the method for determining the sampling module parameters.
[0125] Step 1: In a certain time period, the decision model 540 receives the collected data 510 of terminal 1, the collected data 520 of terminal 2, ..., and the collected data 530 of terminal N as input, and outputs the decision result r of decision D1. Decision D1 corresponds to a decision model 540, which is used to predict / calculate the decision result of decision D1.
[0126] Step 2: The collected data of each terminal is sampled based on the sampling module parameters corresponding to the sampling module, and the sampled data is input into the decision model 540, that is, the collected data 510 of terminal 1, the collected data 520 of terminal 2, ..., and the collected data 530 of terminal N are respectively input into the sampling module 1, the sampling module 2, ..., and the sampling module N for sampling, and the sampled data is input into the decision model 540 to obtain the decision result r'. The sampling module parameters include sampling accuracy and sampling frequency, and the sampling module parameters can be adjusted.
[0127] Step 3: Select different sampling module parameters to construct different sampling module combinations (i.e., combinations of sampling module 1, sampling module 2, ..., sampling module N with different sampling module parameters), execute Step 2 multiple times, and obtain a large number of decision results r′;
[0128] Step 4: Obtain one or more decision results r′ that meet the required conditions (for example, the required conditions may be: the similarity with the decision result R is greater than a preset similarity threshold, etc.);
[0129] Step 5: According to the different sampling modules of terminal 1 corresponding to the multiple decision results r′ (i.e., sampling modules 1 with different sampling module parameters), the sampling module parameters of the multiple sampling modules 1 with different sampling module parameters are weighted based on similarity to determine the sampling module parameter a1 corresponding to the decision D1 of terminal 1. For example:
[0130] Assume that there are three decision results r' that meet the requirements, recorded as r1', r2', and r3' respectively, then:
[0131] Assume that the sampling module parameter corresponding to terminal 1 is al, then:
[0132] a1=k1*b+k2*c+k3*d, where:
[0133] b is the sampling module parameter of the sampling module corresponding to terminal 1 when outputting decision result r1′, c is the sampling module parameter of the sampling module corresponding to terminal 1 when outputting decision result r2′, and d is the sampling module parameter of the sampling module corresponding to terminal 1 when outputting decision result r3′. Among them, k1, k2, and k3 are the weights of sampling module parameters b, c, and d, respectively. k1 is determined based on the similarity between decision result r1′ and decision result r, k2 is determined based on the similarity between decision result r2′ and decision result r, and k3 is determined based on the similarity between decision result r3′ and decision result r. The greater the similarity, the greater the weight of the corresponding sampling module parameter.
[0134] In some embodiments, the sampling module parameters of other terminals may also be determined in the same manner as the aforementioned terminal 1 determines the sampling module parameters.
[0135] In some embodiments, when the sampling module parameters used to calculate the decision demand are finally determined based on max(a1, a2, ..., a10), the maximum value is determined based on the weighted values of the sampling module parameters. For example, when the processor 120 determines max(a1, a2, ..., a10), the maximum value can be determined based on the weighted values of the sampling module parameters. For example, a1 = (1, 2), a2 = (2, 1), and the weights of the sampling module parameters are 0.3 and 0.7 respectively. The weighted result of the vector a1 is 1 × 0.3 + 2 × 0.7 = 1.7, and the weighted result of the vector a2 is 2 × 0.3 + 1 × 0.7 = 1.3, 1.7 > 1.3, and max(a1, a2) = a1.
[0136] The weight of the sampling module parameters can be related to the data stability of the data actually collected by the terminal. For example, the greater the data stability, the smaller the weight of the sampling frequency (which reduces the importance of the data), and the greater the weight of the sampling accuracy (which increases the importance of the data). For more information about data stability, please refer to Figure 4 Related description in .
[0137] In some embodiments of the present specification, sampling module parameters of decision requirements are determined based on weighted values of sampling module parameters, so that the Internet of Things gateway can collect data from each terminal in an offline environment in a targeted manner, giving priority to collecting data with high importance, thereby alleviating the storage pressure of the Internet of Things gateway in an offline environment and improving resource utilization.
[0138] In some embodiments of the present specification, by determining the sampling module parameters, the decision-making requirement of the terminal's collected data is determined, so that the Internet of Things gateway can reduce the collection of terminal data with low data importance, alleviate the storage pressure of the Internet of Things gateway in an offline environment, and improve resource utilization.
[0139] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are suggested in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.
[0140] At the same time, this specification uses specific words to describe the embodiments of this specification. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of this specification. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures or characteristics in one or more embodiments of this specification can be appropriately combined.
[0141] In addition, unless explicitly stated in the claims, the order of the processing elements and sequences described in this specification, the use of alphanumeric characters, or the use of other names are not intended to limit the order of the processes and methods of this specification. Although the above disclosure discusses some invention embodiments that are currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of this specification. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only by software solutions, such as installing the described system on an existing server or mobile device.
[0142] Similarly, it should be noted that in order to simplify the description disclosed in this specification and thus help understand one or more embodiments of the invention, in the above description of the embodiments of this specification, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the subject matter of this specification are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.
[0143] In some embodiments, numbers describing the number of components and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of this specification are approximate values, in specific embodiments, the setting of such numerical values is as accurate as possible within the feasible range.
[0144] Each patent, patent application, patent application publication, and other materials, such as articles, books, specifications, publications, documents, etc., cited in this specification are hereby incorporated by reference in their entirety. Except for application history documents that are inconsistent with or conflicting with the contents of this specification, documents that limit the broadest scope of the claims of this specification (currently or later attached to this specification) are also excluded. It should be noted that if the descriptions, definitions, and / or use of terms in the materials attached to this specification are inconsistent or conflicting with the contents described in this specification, the descriptions, definitions, and / or use of terms in this specification shall prevail.
[0145] Finally, it should be understood that the embodiments described in this specification are only used to illustrate the principles of the embodiments of this specification. Other variations may also fall within the scope of this specification. Therefore, as an example and not a limitation, alternative configurations of the embodiments of this specification may be considered consistent with the teachings of this specification. Accordingly, the embodiments of this specification are not limited to the embodiments explicitly introduced and described in this specification.
Claims
1. A method for self-management of an Internet of Things gateway in an offline environment, executed by a processor, the processor being located in the Internet of Things gateway, the method comprising: Acquire data collection characteristics of one or more terminals connected to the Internet of Things gateway; Based on the data collection characteristics, determining a data volume reduction ratio of the one or more terminals; issuing instructions to the one or more terminals, so that the one or more terminals adjust a data generation rate based on the data amount reduction ratio, and generate target data based on the adjusted data generation rate; The determining, based on the data collection characteristics, a data volume reduction ratio of the one or more terminals includes: Determining data coverage of the one or more terminals based on the data collection characteristics; Determining the importance of data of the one or more terminals based on the type of the collected data of the one or more terminals; Based on the data coverage and the data importance, the data amount reduction ratio of the one or more terminals is determined.
2. According to the method of claim 1, the data importance is related to the decision requirement, and the decision requirement is determined based on a sampling module parameter, and the sampling module parameter corresponds to at least one decision in a decision set corresponding to a carrier; the carrier refers to a device that carries the one or more terminals.
3. The method according to claim 1, further comprising: Sampling the data collected and uploaded from the one or more terminals is performed, where the sampling is performed based on a sampling rate, and determining the sampling rate includes: Obtaining the current remaining capacity of the IoT gateway; The sampling rates of the one or more terminals are determined based on the current remaining capacity and upload data characteristics of the one or more terminals.
4. A system for self-management of an Internet of Things gateway in an offline environment, the system comprising: An acquisition module, used to acquire data collection characteristics of one or more terminals connected to the Internet of Things gateway; A determination module, configured to determine a data volume reduction ratio of the one or more terminals based on the data collection characteristics; a sending module, configured to send an instruction to the one or more terminals, so that the one or more terminals adjust the data generation rate based on the data volume reduction ratio, and generate target data based on the adjusted data generation rate; The determination module is further used for: Determining data coverage of the one or more terminals based on the data collection characteristics; Determining the importance of data of the one or more terminals based on the type of the collected data of the one or more terminals; Based on the data coverage and the data importance, the data amount reduction ratio of the one or more terminals is determined.
5. According to the system of claim 4, the data importance is related to the decision requirement, and the decision requirement is determined based on a sampling module parameter, and the sampling module parameter corresponds to at least one decision in a decision set corresponding to a carrier; the carrier refers to a device that carries the one or more terminals.
6. The system according to claim 4, further comprising a sampling processing module, wherein the sampling processing module is configured to: Sampling the data collected and uploaded from the one or more terminals is performed, where the sampling is performed based on a sampling rate, and determining the sampling rate includes: Obtaining the current remaining capacity of the IoT gateway; The sampling rates of the one or more terminals are determined based on the current remaining capacity and upload data characteristics of the one or more terminals.
7. A self-management device for an Internet of Things gateway in an offline environment, characterized in that: The apparatus comprises at least one processor and at least one memory; The at least one memory is used to store computer instructions; The at least one processor is configured to execute at least part of the computer instructions to implement the method according to any one of claims 1 to 3.
8. A computer-readable storage medium, wherein the storage medium stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes the self-management method of an Internet of Things gateway in an offline environment as described in any one of claims 1 to 3.
Citation Information
Patent Citations
A method for efficiently caching historical data in offline state of IoT data collection gateway
CN113821163B
Data storage frequency processing method and device, electronic device and storage medium
CN111194055A
