Wireless device and data storage method
By allocating a shared data buffer based on measurement periods and data lengths, the wireless device optimizes storage and transmission, addressing inefficiencies in existing wireless sensors and reducing current consumption.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- AZBIL CORP
- Filing Date
- 2022-12-28
- Publication Date
- 2026-07-06
AI Technical Summary
Existing wireless sensors face challenges in efficiently managing data storage and transmission cycles, leading to inefficient use of buffer capacity and increased current consumption due to varying data measurement cycles and types, which conventional methods fail to address.
A wireless device and data storage method that allocates a shared large data buffer based on the measurement period and data length of each type, calculating the capacity and starting position of each data area to optimize storage and transmission, and automatically adjusts when measurement periods change.
This approach efficiently utilizes buffer capacity, extends data transmission cycles, and reduces current consumption by minimizing wasted space and optimizing data storage and transmission.
Smart Images

Figure 0007885112000005 
Figure 0007885112000006 
Figure 0007885112000007
Abstract
Description
Technical Field
[0001] The present invention relates to a wireless device and a data storage method capable of suppressing current consumption by extending a data transmission cycle.
Background Art
[0002] In various diagnostic techniques based on operation data such as valve data and in equipment monitoring devices such as wireless sensors installed in facilities, multiple types of data are measured at different cycles, or the measured data is periodically transmitted wirelessly. The measurement cycle of data varies for each site.
[0003] In devices such as battery-powered wireless sensors, there is a requirement to suppress current consumption. In the technique disclosed in Patent Document 1, an application for monitoring the usage status of a device is installed in a mobile device, and the monitoring results are transmitted to a server, thereby optimizing access from the server side according to the usage status to suppress the current consumption of the mobile device. However, since the technique disclosed in Patent Document 1 is a method of suppressing current consumption by reducing the access frequency from the server to the device, there is a problem that the effect of suppressing current consumption is limited when there is little or no access from the server side.
[0004] In addition, some wireless sensors are devices that measure data and temporarily store it in an internal data buffer, and then transmit the data stored in the data buffer. In the case of such a device, the method of transmitting data at the timing when the data buffer is full or when a certain amount or more has accumulated can extend the transmission cycle the most and suppress current consumption. Therefore, how to efficiently store data is an important factor for extending the transmission cycle, but such a method has not been realized in the conventional technology.
[0005] Furthermore, some wireless sensors measure multiple types of physical quantities at different intervals. Such devices present the following challenges. For example, suppose there are three types of data: data A with a short measurement cycle, and data B and C with long measurement cycles, and a data buffer array of roughly the same size is prepared for each. As shown in Figure 8, the capacity of data buffer 100-A for data A with a short measurement cycle is quickly filled, and data A is transmitted. At this time, the data buffers 100-B and 100-C for data B and C are transmitted at a time when there is still capacity available, so the free capacity of data buffers 100-B and 100-C is wasted. Furthermore, in order to eliminate such waste, it is necessary to secure buffer capacity that matches the measurement cycle of the data, but since the measurement cycle of the data differs from customer to customer, for example, it has been difficult to secure an appropriate buffer capacity in advance. [Prior art documents] [Patent Documents]
[0006] [Patent Document 1] Special Publication No. 2013-539258 [Overview of the Initiative] [Problems that the invention aims to solve]
[0007] The present invention was made to solve the above problems, and aims to provide a wireless device and a data storage method that can reduce current consumption by extending the data transmission cycle. [Means for solving the problem]
[0008] The wireless device of the present invention is characterized by comprising: a storage unit for storing data; a setting unit configured to secure a data buffer in the storage area of the storage unit, calculate the capacity and starting position of a data area to be allocated to each of the multiple types of physical quantities from the area of the data buffer based on the measurement period and data length of each of the multiple types of physical quantities, and set up a plurality of data areas; and a data acquisition unit configured to acquire each of the multiple types of physical quantities at a predetermined measurement period and store the data of each acquired physical quantity in the corresponding data area. Furthermore, one example of the configuration of the wireless device of the present invention is characterized by further comprising a wireless communication unit for transmitting data to an external source, and a control unit configured to retrieve data from the data area when the amount of stored data exceeds a threshold and to request the wireless communication unit to transmit the data.
[0009] Furthermore, in one example of the configuration of the wireless device of the present invention, the setting unit is characterized by calculating the number of acquisitions per unit time for each physical quantity based on the measurement cycle, calculating the ratio of the capacity of each data area to the capacity of the data buffer for each physical quantity based on the number of acquisitions and the data length, calculating the capacity of each data area for each physical quantity based on the ratio and the capacity of the data buffer, and calculating the starting position of each data area for each physical quantity based on the position of the data buffer in the storage area of the storage unit and the capacity of each data area. Furthermore, in one example of the configuration of the wireless device of the present invention, the setting unit is characterized in that it sets the data area during the initial setup of the wireless device. Furthermore, in one example of the configuration of the wireless device of the present invention, the setting unit is characterized in that it resets the data area when the measurement period of at least one of the multiple types of physical quantities is changed.
[0010] Furthermore, the data storage method for a wireless device of the present invention is characterized by including: a first step of securing a data buffer in the storage area of the storage unit of the wireless device; a second step of calculating the capacity and starting position of a data area to be allocated to each of the multiple types of physical quantities from the data buffer area based on the measurement period and data length of each of the multiple types of physical quantities, and setting up a plurality of data areas; and a third step of acquiring each of the multiple types of physical quantities at a predetermined measurement period and storing the data of each acquired physical quantity in the corresponding data area. Furthermore, one example configuration of the data storage method for the wireless device of the present invention is characterized by further including a fourth step of retrieving data from the data area when the amount of data stored exceeds a threshold and transmitting it to the outside.
[0011] Furthermore, in one example configuration of the data storage method for the wireless device of the present invention, the second step is characterized by including the steps of: calculating the number of acquisitions per unit time for each physical quantity based on the measurement cycle; calculating the ratio of the capacity of each data area to the capacity of the data buffer for each physical quantity based on the number of acquisitions and the data length; calculating the capacity of each data area for each physical quantity based on the ratio and the capacity of the data buffer; and calculating the starting position of each data area for each physical quantity based on the position of the data buffer in the storage area of the storage unit and the capacity of each data area. Furthermore, in one example configuration of the data storage method for the wireless device of the present invention, the second step is characterized in that it includes a step of setting the data area during the initial setup of the wireless device. Furthermore, in one example configuration of the data storage method for the wireless device of the present invention, the second step is characterized in that it includes a step of resetting the data area when the measurement period of at least one of the plurality of types of physical quantities is changed. [Effects of the Invention]
[0012] According to the present invention, by providing a setting unit, data can be efficiently stored in the data buffer of the storage unit, and the data transmission cycle can be extended. This reduces wasted free space in the data buffer while suppressing the current consumption of the wireless device. In the present invention, even when the data transmission cycle differs depending on the site, the allocation of data areas to each physical quantity can be set automatically, and the capacity of the storage unit can be utilized efficiently. [Brief explanation of the drawing]
[0013] [Figure 1] Figure 1 is a diagram illustrating the principle of the present invention. [Figure 2] Figure 2 is a block diagram showing the configuration of a wireless device according to the first embodiment of the present invention. [Figure 3] Figure 3 is a block diagram showing an example of the configuration of the calculation unit according to the first embodiment of the present invention. [Figure 4] Figure 4 is a flowchart illustrating the initial setup process for a wireless device according to the first embodiment of the present invention. [Figure 5] Figure 5 is a diagram illustrating the initial setup process for a wireless device according to the first embodiment of the present invention. [Figure 6] Figure 6 is a flowchart illustrating the measurement process for a wireless device according to the first embodiment of the present invention. [Figure 7] Figure 7 is a block diagram showing an example of the configuration of a computer that implements a wireless device according to the first to third embodiments of the present invention. [Figure 8] Figure 8 illustrates the conventional challenges. [Modes for carrying out the invention]
[0014] [Principle of the invention] The inventor devised a method to automatically change the allocation of a single large buffer, as follows: (a) Share a single large data buffer for multiple types of data. (b) Calculate the ratio of the capacity of each data area to the capacity of the data buffer based on the measurement period and data length of each data. (c) Calculate the capacity of each data area based on the ratio and the capacity of the data buffer, calculate the starting position of each data area, and set each data area on the data buffer. (d) Store the data corresponding to each data area.
[0015] The reason for using one buffer with a large capacity as in the present invention is to maximize the use of the limited memory of the microcomputer and maximize the data transmission period. By securing a buffer with a size that can maximize the memory capacity and changing the allocation of its array, different types of data can make the most of the memory capacity regardless of their respective measurement periods, and the transmission period can also be maximized.
[0016] The calculation process in the present invention is as follows. First, three types of physical quantities A, B, and C are measured at their respective measurement periods T A , T B , T C and the data length at one measurement of each physical quantity is D A , D B , D C . It is assumed that the measurement periods T A , T B , T C can be either the same value or different values.
[0017] (I) Calculate the frequencies F A , F B , F C of the measurements of the physical quantities A, B, and C as follows. The frequencies F A , F B , F C indicate the number of acquisitions per unit time (1 second) of each data.
[0018]
Equation
[0019] (II) The ratio R of the capacity of the data area for each physical quantity A, B, and C to the total capacity of the data buffer. A ,R B ,R C The following calculation is performed:
[0020]
number
[0021] (III) Capacity L of the data area for physical quantities A, B, and C A ,L B ,L C The following is calculated, where L is the total buffer capacity. L A =R A ×L ···(7) L B =R B ×L ···(8) L C =R C ×L ···(9)
[0022] (IV) Data area capacity L A ,L B ,L C Offset value O for data of physical quantities B and C B ,O C The following calculation is performed: O B =L A ...(10) O C =O B +L B ...(11)
[0023] The offset value O calculated in (IV) above B ,O C Based on this, the starting position of each data area is determined, and the data is stored so that it fits within that area (Figure 1). In one buffer X, the starting position of the data area for physical quantity A is 0, and the starting position of the data area for physical quantity B is O B The starting position of the data area for the physical quantity C is O C That is the case.
[0024] In this example, we used a case with three types of data, but there are no restrictions on the types of data; for example, even if there are four or five types of data, the same procedure can be used to determine the allocation.
[0025] [First Embodiment] Hereinafter, embodiments of the present invention will be described with reference to the drawings. Figure 2 is a block diagram showing the configuration of a wireless device according to the first embodiment of the present invention. The wireless device 1 consists of multiple sensors 2-A, 2-B, 2-C that measure multiple types of physical quantities A, B, and C, a data acquisition unit 3, a storage unit 4, a calculation unit 5, a wireless communication unit 6, and a power supply unit 7 (battery) that supplies power to each part of the wireless device 1.
[0026] Figure 3 is a block diagram showing an example configuration of the arithmetic unit 5. The arithmetic unit 5 includes a setting unit 50 and a control unit 51.
[0027] Figure 4 is a flowchart illustrating the initial setup process for the wireless device 1. The setup unit 50, for example, during the initial setup when the wireless device 1 is started up, reserves a data buffer 40 of the maximum size that can be reserved in the storage area of the storage unit 4, as shown in Figure 5 (Step S100 in Figure 4). The setup unit 50 reserves the remaining area of the storage area of the storage unit 4 as the data buffer 40, excluding the area predetermined as the storage area necessary for the operation of the wireless device 1 (for example, the program storage area and registers). The capacity of this data buffer 40 is L as described above.
[0028] Next, the setting unit 50 sets the measurement period T of the predetermined physical quantities A, B, and C. A ,T B ,T C and the data length D of physical quantities A, B, and C A ,D B ,D C Based on this, the processing steps (I) to (IV) above calculates the capacity and starting position of the data area to be allocated to each of the physical quantities A, B, and C within the data buffer 40 (Figure 4, step S101). In the above example, the starting position (address) of the data buffer 40 is AD. STARTIf we set this to 0, the starting position of the data area for physical quantity A is 0 and its capacity is L. A The starting position of the data area for physical quantity B is O B The capacity is L B The starting position of the data area for the physical quantity C is O C The capacity is L C That is the case.
[0029] Then, based on the calculation results, the setting unit 50 sets data areas 41-A, 41-B, and 41-C on the data buffer 40 to be assigned to the respective data of physical quantities A, B, and C, as shown in Figure 5 (Figure 4, step S102). In this embodiment, for example, physical quantity A is the valve opening degree, physical quantity B is the internal temperature of the equipment, and physical quantity C is the power supply voltage of the equipment. This completes the operation of the setting unit 50 during initial setup.
[0030] Figure 6 is a flowchart illustrating the measurement process of the wireless device 1. The data acquisition unit 3 acquires data of physical quantities A, B, and C measured by sensors 2-A, 2-B, and 2-C at a predetermined measurement cycle T. A ,T B ,T C The data is acquired using the following method (Figure 6, steps S200, S201). Data acquisition may involve acquiring digital data output from sensors 2-A, 2-B, and 2-C, or the analog signals output from sensors 2-A, 2-B, and 2-C may be converted into digital data by the data acquisition unit 3.
[0031] The data acquisition unit 3 stores the acquired data for physical quantities A, B, and C in the corresponding data areas 41-A, 41-B, and 41-C (Figure 6, step S202). The data acquisition unit 3 performs the processing in steps S200 to S202 independently for each physical quantity A, B, and C.
[0032] Next, the control unit 51 monitors the amount of data stored in each data area 41-A, 41-B, and 41-C. When the amount of data stored exceeds a threshold (YES in step S203 of Figure 6), it retrieves data from the data area where the amount of data stored exceeds the threshold and requests the wireless communication unit 6 to transmit the data (step S204 of Figure 6).
[0033] Capacity L of each data area 41-A, 41-B, 41-C A ,L B ,L C As described above, the measurement period T of physical quantities A, B, and C is A ,T B ,T C It is a variable quantity that changes depending on the situation. For example, the capacity L of data areas 41-A, 41-B, and 41-C A ,L B ,L C A predetermined percentage (for example, 90%) of the data storage amount can be set as the threshold for the amount of data stored. For example, the control unit 51 will determine when the amount of data stored in data area 41-A is capacity L. A When it reaches 90% or more, data is retrieved from data area 41-A and a request is made to the wireless communication unit 6 to transmit the data.
[0034] The wireless communication unit 6 wirelessly transmits the data received from the control unit 51 to a higher-level device (not shown) (Figure 6, step S204). The control unit 51 and the wireless communication unit 6 independently perform the processing in steps S203 to S205 for each of the physical quantities A, B, and C.
[0035] Thus, in this embodiment, data can be efficiently stored in the data buffer 40 of the storage unit 4, and the data transmission cycle can be extended. This reduces wasted free space in the data buffer 40 while suppressing the current consumption of the wireless device 1.
[0036] [Second Example] In the first embodiment, three types of physical quantities were measured, but there are no exceptions. For example, even if the number of physical quantities to be acquired increases to include acceleration, pressure, external temperature, etc., in addition to valve opening, internal temperature, and voltage as in the first embodiment, the same method as in the first embodiment can be used.
[0037] The predetermined measurement period of a physical quantity i (i = A, B, C, ...) is T. i , data length D iTherefore, the measurement frequency F of the physical quantity i calculated in the above process (I) is i This is the same as equations (1) to (3), as follows:
[0038]
number
[0039] That is, frequency F i The measurement period T i It is the reciprocal of the above. The ratio R of the data area capacity calculated in the process of (II) above. i This is the same as equations (4) to (6), as follows:
[0040]
number
[0041] In other words, frequency (number of acquisitions per unit time) F i and data length D i The product of and is the amount of data per unit time for physical quantity i, and the sum of the amount of data per unit time for each physical quantity is taken as the denominator, and the amount of data per unit time for physical quantity i is F i ×D i By taking as the numerator, the ratio R i The capacity L of the data area for the physical quantity i, calculated in the process (III) above. i This is the same as equations (7) to (9), as follows: L i =R i ×L ···(14)
[0042] In other words, ratio R i The product of the capacity L of the data buffer 40 is the capacity L i Let's assume that the starting position O of the data area for the physical quantity i is calculated in the process described in (IV) above. i This is the same as equations (10) and (11), as follows: O i =O i-1 +L i-1 ...(15)
[0043] L i-1 is the capacity of the data area for physical quantity (i - 1), which is allocated immediately before the data area for physical quantity i, O i-1 is the starting position of the data area for physical quantity (i - 1). In the process of (IV) above, it is assumed that the data area 41 - A for physical quantity A is arranged at the head of the data buffer 40, and the head position (address) AD START of the data buffer 40 in the storage area of the storage unit 4 is set to 0. For physical quantity A, O i-1 ,L i-1 both become 0, so the starting position (offset value) of the data area 41 - A is O A = AD START = 0. Thus, the present invention can be applied even when the number of types of physical quantities to be measured is two or more than three.
[0044] [Third Embodiment] In the first embodiment, the process of the setting unit 50 is performed at the time of initial setting. However, when the measurement period of at least one of a plurality of types of physical quantities is changed by some event, the setting unit 50 may automatically detect the change in the measurement period and perform the processes of steps S100 to S102 again.
[0045] The storage unit 4 and the calculation unit 5 described in the first to third embodiments can be realized by a computer including a CPU (Central Processing Unit), a storage device, and an interface, and a program for controlling these hardware resources. A configuration example of this computer is shown in FIG. 7.
[0046] The computer comprises a CPU 200, a storage device 201, and an interface device (I / F) 202. The hardware of the data acquisition unit 3 and the hardware of the wireless communication unit 6 are connected to the I / F 202. In such a computer, the program for realizing the data storage method (data transmission method) of the present invention is stored in the storage device 201. The CPU 200 executes the processes described in the first to third embodiments according to the program stored in the storage device 201. [Industrial applicability]
[0047] This invention can be applied to wireless devices that transmit data externally. [Explanation of symbols]
[0048] 1... Wireless device, 2-A, 2-B, 2-C... Sensors, 3... Data acquisition unit, 4... Storage unit, 5... Calculation unit, 6... Wireless communication unit, 7... Power supply unit, 40... Data buffer, 41-A, 41-B, 41-C... Data area, 50... Setting unit, 51... Control unit.
Claims
1. A storage unit for storing data, A setting unit is configured to allocate a data buffer in the storage area of the storage unit, and to calculate the capacity and starting position of a data area to be allocated to each of the multiple types of physical quantities from the data buffer area based on the measurement period and data length of each of the multiple types of physical quantities, and to set up a plurality of the data areas. A data acquisition unit configured to acquire the aforementioned multiple types of physical quantities at predetermined measurement cycles and store the data of each acquired physical quantity in the corresponding data area, A wireless communication unit for transmitting data to an external source, A control unit configured to retrieve data from the data area when the amount of stored data exceeds a threshold and to request data transmission from the wireless communication unit, Equipped with A wireless device characterized by the following features.
2. In the wireless device according to claim 1, The setting unit calculates the number of acquisitions per unit time for each physical quantity based on the measurement cycle, calculates the ratio of the capacity of each data area to the capacity of the data buffer for each physical quantity based on the number of acquisitions and the data length, calculates the capacity of each data area for each physical quantity based on the ratio and the capacity of the data buffer, and calculates the starting position of each data area for each physical quantity based on the position of the data buffer in the storage area of the storage unit and the capacity of each data area. A wireless device characterized by the following features.
3. In the wireless device according to claim 1, The setting unit sets the data area during the initial setup of the wireless device. A wireless device characterized by the following features.
4. In the wireless device according to claim 1, The setting unit resets the data area when the measurement cycle of at least one of the multiple types of physical quantities is changed. A wireless device characterized by the following features.
5. The first step is to allocate a data buffer in the storage area of the wireless device's storage unit, A second step of calculating the capacity and starting position of data areas to be allocated to each of the multiple types of physical quantities within the data buffer area based on the measurement period and data length of each of the multiple types of physical quantities, and setting up multiple data areas. A third step involves acquiring each of the aforementioned multiple types of physical quantities at predetermined measurement cycles and storing the data of each acquired physical quantity in the corresponding data area. A fourth step involves extracting data from the data area where the amount of data stored exceeds a threshold and transmitting it externally. including A method for storing data in a wireless device, characterized by the features described above.
6. In the data storage method for a wireless device according to claim 5, The second step includes calculating the number of acquisitions per unit time for each physical quantity based on the measurement cycle, calculating the ratio of the capacity of each data area to the capacity of the data buffer for each physical quantity based on the number of acquisitions and the data length, calculating the capacity of each data area for each physical quantity based on the ratio and the capacity of the data buffer, and calculating the starting position of each data area for each physical quantity based on the position of the data buffer in the storage area of the storage unit and the capacity of each data area. A method for storing data in a wireless device, characterized by the features described above.
7. In the data storage method for a wireless device according to claim 5, The second step includes setting the data area during the initial setup of the wireless device. A method for storing data in a wireless device, characterized by the features described above.
8. In the data storage method for a wireless device according to claim 5, The second step includes resetting the data area when the measurement period of at least one of the multiple types of physical quantities is changed. A method for storing data in a wireless device, characterized by the features described above.