A data collection method, system and storage medium

By implementing regular communication and judgment and local storage mechanism in the data acquisition system, data loss caused by network failure is solved, and data is safely stored and timely restored.

CN114554316BActive Publication Date: 2025-06-06HANGZHOU ANMAISHENG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210182107.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2025-06-06
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

The existing data acquisition methods cause the loss of equipment parameter data in the event of a network failure and cannot be recovered in time.

Method used

The data acquisition method is used to regularly determine whether the communication with the server is normal. If it is normal, the device parameters will be uploaded. If it is abnormal, it will be stored locally. After the communication is restored, the communication capabilities will be provided between the terminal devices. Normal devices can upload data instead of the faulty device.

Benefits of technology

Reduces loss of equipment parameters caused by communication failures, ensuring data integrity and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114554316B_ABST
    Figure CN114554316B_ABST
Patent Text Reader

Abstract

The present application discloses a data acquisition method, system and storage medium, which relates to the technical field of data acquisition, and includes the following steps: regularly judging whether the conventional communication with the server is normal, if the conventional communication with the server is normal, entering the normal working mode; if the conventional communication with the server is abnormal, entering the local working mode; in the normal working mode: obtaining a temporary entrustment instruction, and establishing temporary communication with the terminal device corresponding to the temporary entrustment instruction; determining the monitored device to be temporarily monitored according to the target device information, regularly obtaining the monitored device to be temporarily monitored and the device parameters of the pre-matched monitored device, and uploading the device parameters. In addition to storing data locally, the device parameters can also be uploaded by using the terminal device that normally communicates with the server instead of the terminal device that cannot communicate with the server, thereby reducing the loss of device parameters due to communication failures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data acquisition, and in particular to a data acquisition method, system and storage medium. Background Art

[0002] Battery energy storage power stations generate a large amount of data during operation, such as parameters of key equipment such as batteries and PCS, environmental parameters such as temperature and combustible gas concentration, parameters of auxiliary equipment such as air conditioning and fire fighting equipment, etc. In order to more effectively manage battery energy storage power stations, these data need to be collected and monitored uniformly.

[0003] The existing data collection method is to set up a terminal device near the monitored device, which collects the device data of the monitored device and transmits the device data to the server. Due to the large number of monitored devices, multiple terminal devices need to be set up, and data is transmitted between each terminal device and the server through the network.

[0004] Regarding the above-mentioned related technologies, the inventor believes that when a network error occurs between the terminal device and the server, the server can no longer obtain the data transmitted by the terminal device before the network is repaired, resulting in the loss of all data collected by the monitored device during this time period. Summary of the invention

[0005] In order to reduce data loss, the present application provides a data collection method, system and storage medium.

[0006] In a first aspect, the present application provides a data collection method, which adopts the following technical solution:

[0007] A data collection method, characterized in that it comprises the following steps:

[0008] Regularly determine whether regular communication with the server is normal.

[0009] If the regular communication with the server is normal, it enters the normal working mode;

[0010] If the regular communication with the server is not normal, it enters the local working mode;

[0011] In normal working mode:

[0012] When entering the normal working mode, it is determined whether the device parameters are stored in the local storage space. If the device parameters are stored in the local storage space, the device parameters are uploaded;

[0013] Obtain device parameters regularly and upload the corresponding device parameters;

[0014] Acquire a temporary delegation instruction, wherein the temporary delegation instruction includes target device information;

[0015] Establish temporary communication with the end device corresponding to the target device information; determine the monitored device to be temporarily monitored according to the target device information, regularly obtain the device parameters of the monitored device to be temporarily monitored and the pre-matched monitored device, and upload the device parameters;

[0016] In local working mode:

[0017] Obtain device parameters regularly and store them in local storage space;

[0018] Obtain a call signal and enter a standby mode according to the call signal;

[0019] In standby mode:

[0020] Stop obtaining device parameters and regularly determine whether temporary communication is maintained. If temporary communication is not maintained, enter the local working mode.

[0021] By adopting the above technical solution, if the communication with the server is normal, the regularly collected device parameters will be uploaded to the server; if the communication with the server is abnormal, the regularly collected device parameters will be stored locally and transmitted to the server when the communication with the server is restored. In addition, the end devices have communication capabilities, and the end device that communicates normally with the server can replace the end device that cannot communicate with the server to upload the device parameters, thereby reducing the loss of device parameters due to communication failures.

[0022] Optionally, each monitored device is preset with a corresponding priority level; the method further includes:

[0023] Each time a device parameter is obtained, it is determined whether the device parameter exceeds the preset value.

[0024] If the device parameter exceeds the preset value, the priority level of the corresponding monitored device will be adjusted to high priority;

[0025] If the device parameter is less than or equal to the preset value, the priority level of the corresponding monitored device is adjusted to a low priority level;

[0026] In normal working mode:

[0027] Regularly obtain device parameters, including the following steps:

[0028] After obtaining the device parameters, determine whether the priority level corresponding to the monitored device is high priority.

[0029] If the priority level corresponding to the monitored device is high priority, the device parameters are obtained again after the interval of the first time value;

[0030] If the priority level corresponding to the monitored device is not a high priority, the device parameters are acquired again after an interval of a second time value, wherein the second time value is greater than the first time value.

[0031] Optionally, the method further comprises: when performing mode switching, generating a corresponding mode switching signal, and transmitting the mode switching signal to other terminal devices in the same group as preset;

[0032] When entering the local working mode or obtaining the mode switching signal in the local working mode, it is determined whether the working modes corresponding to the preset same group end devices are all local working modes.

[0033] If the working modes corresponding to the devices in the same group are all local working modes, the device parameters of the monitored devices with corresponding priority levels are obtained according to the pre-stored permissions;

[0034] When the pre-stored permission is of high priority, the device parameters of the monitored device with high priority are obtained regularly at intervals of a preset first time value, and the corresponding device parameters are stored in the local storage space under the same pre-stored permission;

[0035] When the pre-stored authority is of low priority, the device parameters of the monitored device of low priority are obtained periodically at intervals of a preset second time value, and the corresponding device parameters are stored in the local storage space under the same preset authority at preset intervals.

[0036] Optionally, if the working modes corresponding to the devices in the same group are all local working modes, storing the corresponding device parameters in the local storage space includes the following steps:

[0037] Determine whether the local storage space corresponding to the end devices in the same group and with the same priority permissions is full.

[0038] If the local storage space corresponding to the terminal devices in the same group and with the same priority authority is not full, the device parameters are stored in the local storage space corresponding to the terminal devices in the same group and with the same priority authority;

[0039] If the local storage space corresponding to the terminal devices in the same group and with the same priority is full, the device parameters with the earliest storage time will be replaced by the current device parameters.

[0040] Optionally, if the working modes corresponding to the devices in the same group are all local working modes, and the priority level corresponding to the monitored device is adjusted from low priority to high priority, a count value N corresponding to the monitored device is established, and the count value N=1, and each time the device parameters of the monitored device are obtained, it is determined whether the count value N exceeds the preset number of times.

[0041] If the count value N does not exceed the preset number of times, after the storage of the currently acquired device parameter is completed, the device parameter is marked as irreplaceable, and N=N+1;

[0042] If the count value N exceeds the preset number of times, the count value N is deleted and the determination of whether the count value N exceeds the preset number of times is stopped;

[0043] When replacing the device parameters with the oldest storage time with the current device parameters, exclude the device parameters marked as non-replaceable.

[0044] Optionally, each monitored device corresponds to a priority level;

[0045] Regularly obtaining the monitored device that needs to be temporarily monitored and the device parameters of the pre-matched monitored device includes the following steps:

[0046] Determine the number M1 of monitored devices that need to be temporarily monitored and have a low priority level, and the number M2 of monitored devices that are pre-matched and have a low priority level;

[0047] The preset initial interval time is expanded to the temporary interval time according to the ratio of (M1+M2) / M2, and the device parameters of the monitored devices to be temporarily monitored and the pre-matched monitored devices are obtained in sequence during the temporary interval time.

[0048] Optionally, if the working modes corresponding to the devices in the same group are not all local working modes, storing the corresponding device parameters in the local storage space includes the following steps:

[0049] Determine whether the local storage space is full.

[0050] If the local storage space is not full, the device parameters are stored in the local storage space;

[0051] If the local storage space is full, the device parameters with the earliest storage time will be replaced by the current device parameters.

[0052] In a second aspect, the present application provides a data acquisition system, which adopts the following technical solution:

[0053] A data acquisition system includes a terminal device and a server.

[0054] The server is used to establish regular communication with the end device and receive device parameters uploaded by the end device;

[0055] The working modes of the terminal device include local working mode and normal working mode;

[0056] The terminal device is used to periodically determine whether the regular communication with the server is normal.

[0057] If the regular communication with the server is normal, it enters the normal working mode;

[0058] If the regular communication with the server is not normal, it enters the local working mode;

[0059] When the terminal device enters the normal working mode, it determines whether the device parameters are stored in the local storage space. If the device parameters are stored in the local storage space, the device parameters are uploaded;

[0060] In normal working mode:

[0061] The terminal device is used to obtain device parameters regularly and upload the corresponding device parameters;

[0062] The terminal device is also used to obtain a temporary entrustment instruction, wherein the temporary entrustment instruction includes target device information; the terminal device is used to establish temporary communication with the terminal device corresponding to the target device information, and determine the monitored device to be temporarily monitored according to the target device information, regularly obtain the monitored device to be temporarily monitored and the device parameters of the pre-matched monitored device, and upload the device parameters;

[0063] In local working mode:

[0064] The end device is used to periodically obtain device parameters and store the device parameters in the local storage space;

[0065] It is also used to obtain a call signal and enter a standby mode according to the call signal;

[0066] In standby mode:

[0067] The end device stops obtaining device parameters and is used to periodically determine whether temporary communication is maintained. If temporary communication is not maintained, it enters the local working mode.

[0068] In a third aspect, the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute any of the above methods.

[0069] In summary, the present application includes at least one of the following beneficial technical effects: if the communication with the server is normal, the periodically collected device parameters are uploaded to the server; if the communication with the server is abnormal, the periodically collected device parameters are stored locally and transmitted to the server when the communication with the server is restored; in addition, the end devices have communication capabilities, and the end device that communicates normally with the server can replace the end device that cannot communicate with the server to upload the device parameters, thereby reducing the loss of device parameters due to communication failures. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 It is a flowchart of the steps of switching working modes in an embodiment of the present application.

[0071] Figure 2 It is a flowchart of the steps of storing parameters of a single terminal device in a local working mode according to an embodiment of the present application.

[0072] Figure 3 This is a flow chart of the steps when the terminal device of an embodiment of the present application is in normal working mode.

[0073] Figure 4 It is a system block diagram of an embodiment of the present application. DETAILED DESCRIPTION

[0074] The following is combined with Figures 1 to 4 This application is described in further detail.

[0075] The embodiment of the present application discloses a data collection method, which is applied to a data collection system constructed by a terminal device and a server. The system has multiple terminal devices, and the server communicates with the multiple terminal devices via the Internet, while the terminal devices communicate with each other via Ethernet.

[0076] A data collection method, see Figures 1 to 3 , including the following steps:

[0077] S100. Regularly determine whether the regular communication with the server is normal.

[0078] If the normal communication with the server is normal, it enters the normal working mode.

[0079] If normal communication with the server is not normal, enter local working mode.

[0080] The local working mode refers to the working mode in which the terminal device collects the device parameters of the monitored device and stores the device parameters in the local storage space.

[0081] The normal working mode refers to the working mode in which the terminal device collects the device parameters of the monitored device and uploads the device parameters to the server.

[0082] Conventional communication refers to a communication method in which a server and an end device notify each other of a status. In this embodiment, conventional communication refers to the server and the end device sending heartbeat packets to each other.

[0083] In step S100, the terminal device periodically determines whether the regular communication with the server is normal. When the terminal device can regularly receive the heartbeat packet sent by the server, the terminal device determines that the regular communication is normal. Otherwise, the terminal device determines that the regular communication is abnormal.

[0084] Among them, the time for regular judgment is set manually, and its specific value is related to the frequency of sending heartbeat packets sent by the server to the end device. To ensure that normally sent heartbeat packets are not missed, the interval time between two adjacent judgments of the end device must at least cover the interval time required for sending two adjacent heartbeat packets.

[0085] In contrast, the server has an operation step of regularly judging whether the regular communication with the end device is normal. Specifically, when the server can regularly receive the heartbeat packet sent by the end device, the server considers that the end device is in the normal working mode; otherwise, the server considers that the end device is in the local working mode.

[0086] In addition, in this embodiment, the local working mode is used as the initial working mode of the terminal device, that is, the terminal device automatically enters the local working mode after being turned on. The subsequent working modes are adjusted by the terminal device itself according to the normal communication conditions between the terminal device and the server.

[0087] In local working mode:

[0088] S200: Periodically obtain device parameters and store the device parameters in a local storage space.

[0089] Device parameters are data generated by the monitored device when it is working. Each terminal device is pre-set with the information of the monitored device that needs to collect device parameters.

[0090] Depending on the type of monitored equipment, there are also various equipment parameters, such as battery current, battery voltage, battery temperature, ambient temperature, air conditioning power, etc. Among them, for key data such as battery current, battery voltage, and battery temperature, the terminal device will also perform additional abnormality identification.

[0091] The specific abnormality identification method is: each time a device parameter is obtained, it is determined whether the device parameter exceeds the preset value. If the device parameter exceeds the preset value, it indicates that the monitored device corresponding to the device parameter is abnormal. If the device parameter is less than or equal to the preset value, it indicates that the monitored device corresponding to the device parameter is normal.

[0092] In this embodiment, different key data correspond to different preset values, for example, the preset value corresponding to the battery voltage is A, and the preset value corresponding to the battery temperature is B. And the abnormality is determined as long as any key data in the device parameter exceeds the corresponding preset value, the monitored device will be identified as abnormal.

[0093] Periodically acquiring device parameters refers to sampling the device parameters of the monitored device at preset time intervals.

[0094] The end device can only collect the device parameters of one monitored device in the same time period. When the end device needs to collect the device parameters of multiple monitored devices, it needs to take turns to sample. For example, if one end device corresponds to 10 monitored devices and the preset time interval is 10 minutes, the sampling time allocated to each monitored device is 2 minutes. For a single monitored device, it is still sampled once every 10 minutes. Of course, the actual sampling time is very short and does not take 2 minutes. The reason why the sampling time is arranged to be longer is to reduce the sampling frequency, thereby reducing the pressure of data transmission and processing.

[0095] However, for abnormal monitored devices, their subsequent working changes need to be closely monitored, which requires the end device to speed up the frequency of obtaining device parameters of the abnormal monitored devices.

[0096] To this end, a priority level corresponding to the monitored device is configured in the terminal device. When the terminal device collects the device parameters of the monitored device, it selects different sampling intervals to obtain the corresponding device parameters according to the different priority levels corresponding to the monitored devices. Among them, the sampling interval corresponding to the high-priority monitored device is shorter than the sampling interval corresponding to the same monitored device with a low priority.

[0097] The initial priority level of the monitored device is low by default. If the device parameter exceeds the preset value, that is, the monitored device corresponding to the device parameter is abnormal, the priority level of the corresponding monitored device will be adjusted to high priority. If the device parameter is less than or equal to the preset value, that is, the monitored device corresponding to the device parameter is normal, the priority level of the corresponding monitored device will be adjusted to low priority.

[0098] Storing device parameters in local storage space includes the following steps:

[0099] S210: Determine whether the local storage space is full.

[0100] The local storage space of the terminal device has a small capacity. If it is continuously used to store data, the terminal device is prone to full storage. Therefore, when newly acquired device parameters are obtained, it is necessary to first determine whether its own storage space is full, and then process the newly acquired device parameters based on the determination result.

[0101] S220: If the local storage space is not full, store the device parameters in the local storage space.

[0102] When the local storage space is not full, the acquired device parameters can be stored in the local storage space.

[0103] In one embodiment, in order to further reduce the local storage pressure, when the local storage space is not full, the acquired device parameters also need to be further determined based on their corresponding priority levels to determine whether to store them.

[0104] Specifically, when the priority level corresponding to the device parameters is high priority, each acquired device parameter is stored; when the priority level corresponding to the device parameters is low priority, the corresponding device parameters are stored in an interval storage manner. For example, the low-priority monitored devices are still sampled every 10 minutes. As long as the sampled device parameters always correspond to the low priority, the data is stored in an interval of 4 times, that is, the device parameters of the low-priority monitored devices are stored every 40 minutes.

[0105] S230: If the local storage space is full, replace the device parameters with the earliest storage time with the current device parameters.

[0106] Regardless of whether the newly acquired device parameter corresponds to a high priority or a low priority, it is first determined whether there is a device parameter corresponding to a low priority in the local storage space.

[0107] If there are device parameters corresponding to a low priority in the local storage space, the newly acquired device parameters will replace the earliest stored device parameters corresponding to the low priority.

[0108] If there is no device parameter corresponding to the low priority in the local storage space, it is determined whether the newly acquired device parameter corresponds to the high priority.

[0109] If the newly acquired device parameter corresponds to a high priority, the newly acquired device parameter replaces the earliest stored device parameter corresponding to the high priority.

[0110] If the newly acquired device parameter corresponds to a low priority, the newly acquired device parameter is not stored.

[0111] In one embodiment, since the priority level of the monitored device may change at any time, there are two situations: "the monitored device is already in high priority before the terminal device enters the local working mode" and "the monitored device changes from low priority to high priority when the terminal device is in the local working mode". Once the terminal device is in the local working mode for a long time and the above-mentioned storage method is adopted, the device parameters stored in the terminal device will not be able to reflect the difference between the above-mentioned two situations. Therefore, it is necessary to further define the local storage method of the terminal device.

[0112] Specifically, when the terminal device is in the local working mode and the priority level corresponding to the monitored device is adjusted from low priority to high priority, a count value N corresponding to the monitored device is established, and the count value N=1, and each time the device parameters of the monitored device are obtained, it is determined whether the count value N exceeds the preset number of times.

[0113] If the count value N does not exceed the preset number of times, after the storage of the currently acquired device parameter is completed, the device parameter is marked as irreplaceable, and N=N+1.

[0114] If the count value N exceeds the preset number of times, the count value N is deleted, and the determination of whether the count value N exceeds the preset number of times is stopped.

[0115] When replacing the device parameters with the oldest storage time with the current device parameters, exclude the device parameters marked as non-replaceable.

[0116] Among them, the device parameters marked as irreplaceable are no longer involved in the time sorting of the local storage space, and thus the device parameters with the earliest storage time will not be replaced.

[0117] The preset number of times is set by the staff, usually 10 times. The purpose of setting the preset number of times is to save the first 10 device parameters of the monitored device that has just been converted to a high priority, so that the staff can have a clearer understanding of the time when the abnormality of the monitored device occurs later, and make a more accurate judgment on the cause of the abnormality.

[0118] In normal working mode:

[0119] S300: When entering the normal working mode, determine whether device parameters are stored in the local storage space.

[0120] If the device parameters are stored in the local storage space, the device parameters will be uploaded.

[0121] Of course, if there are no device parameters in the local storage space, there is no need to upload the local device parameters.

[0122] S400, regularly obtain device parameters, and upload the corresponding device parameters.

[0123] Among them, regularly obtaining device parameters includes the following steps:

[0124] After obtaining the device parameters, determine whether the priority level corresponding to the monitored device is high priority.

[0125] If the priority level corresponding to the monitored device is high priority, the device parameters are obtained again after the interval of the first time value;

[0126] If the priority level corresponding to the monitored device is not a high priority, the device parameters are acquired again after an interval of a second time value, wherein the second time value is greater than the first time value.

[0127] It can be seen that the method of periodically acquiring device parameters in step S400 is the same as that in step S200.

[0128] However, the processing method of the acquired device parameters in step S400 is different from that in step S200. In step S400, no matter whether the acquired device parameters correspond to a high priority or a low priority, the terminal device will transmit them to the server.

[0129] The above data collection methods are all for a single terminal device working independently, but in actual use, multiple terminal devices are often set as the same group. The terminal devices in the same group will communicate with each other and use different data collection methods according to the different working modes of the terminal devices in the same group.

[0130] Taking an end device in a group in normal working mode and local working mode as an example, the differences between data collection methods when working in a group and when working independently are specifically introduced.

[0131] When a group is formed, each terminal device in the group is assigned a different number. For example, when the group consists of four terminal devices, the four terminal devices are respectively assigned numbers 1, 2, 3 and 4.

[0132] When each terminal device performs mode switching, the terminal device generates a corresponding mode switching signal and transmits the mode switching signal to other terminal devices in the same group that are preset.

[0133] For example, when terminal device No. 1 enters local working mode from normal working mode, terminal device No. 1 generates a mode switching signal representing entering local working mode and sends it to terminal devices No. 2, No. 3 and No. 4 respectively. The terminal device that receives the mode switching signal then records the current working mode of the corresponding numbered terminal device according to the mode switching signal.

[0134] It should be noted that when entering normal working mode from standby mode or entering standby mode from local working mode, the terminal device will not generate a mode switching signal. In other words, the working mode of other terminal devices recorded in the current terminal device is either normal working mode or local working mode.

[0135] In normal working mode:

[0136] S500: Acquire a temporary delegation instruction, wherein the temporary delegation instruction includes target device information.

[0137] The temporary delegation instruction is sent by the server. After the server does not receive the heartbeat packet sent by the end device within a certain period of time, the server has considered that the end device is in the local working mode. At this time, the server sends a temporary delegation instruction to the end device in the same group as the end device and in the normal working mode.

[0138] In this embodiment, the server preferentially sends temporary delegation instructions to terminal devices with smaller number values ​​in the same group. For example, when terminal device No. 2 is in local working mode, the server sends the temporary delegation instruction to terminal device No. 1 in the same group; when terminal devices No. 1 and No. 3 are both in local working mode, the server sends the temporary delegation instruction to terminal device No. 3 in the same group.

[0139] S510. Establish temporary communication with the end device corresponding to the target device information.

[0140] Ad hoc communication refers to the communication mode established between end devices.

[0141] The method of establishing temporary communication is that the end device continuously sends a call signal to the end device corresponding to the target device information after receiving the temporary entrustment instruction. And the establishment of temporary communication does not consider whether the target end device will send a signal feedback to the end device that sends the call signal. When the end device receives a stop instruction from the end device or server corresponding to the target device signal, the current end device will stop sending the call signal, that is, the temporary communication is disconnected.

[0142] S520: Determine the monitored device that needs to be temporarily monitored according to the target device information, regularly obtain the device parameters of the monitored device that needs to be temporarily monitored and the pre-matched monitored device, and upload the device parameters.

[0143] The monitored device that needs to be temporarily monitored refers to the monitored device that is allocated to the terminal device monitoring corresponding to the target device information.

[0144] When the front-end device sends the call signal, it collects the corresponding device parameters on behalf of the end device corresponding to the target device information and completes the transmission of the device parameters to the server, thereby avoiding the end device in the local working mode from performing local storage and reducing the loss of device parameters.

[0145] Since the current end device needs to collect device parameters of the originally allocated monitored devices in addition to the monitored devices that need to be temporarily monitored, the collection time of the current end device will change accordingly as the number of monitored devices that need to be collected increases.

[0146] Specifically, regularly obtaining the monitored device that needs to be temporarily monitored and the device parameters of the pre-matched monitored device includes the following steps:

[0147] S521, determining the number M1 of monitored devices that need to be temporarily monitored and have a low priority level, and the number M2 of monitored devices that are pre-matched and have a low priority level.

[0148] S522 , expanding the preset initial interval time to the temporary interval time according to the ratio of (M1+M2) / M2, and sequentially acquiring the monitored devices to be temporarily monitored and the device parameters of the pre-matched monitored devices during the temporary interval time.

[0149] The initial interval time is set by the staff, usually 10 minutes. Assuming M1 is 10 and M2 is 10, the temporary interval time will be adjusted to 20 minutes. Within 20 minutes, the collection time allocated to each monitored device is still 1 minute.

[0150] In this embodiment, the collection interval is increased to adapt to the increase of monitored devices. Of course, the collection time can also be shortened to adapt to the increase of monitored devices. For example, if the collection time is shortened from 1 minute to 30 seconds, it only takes 10 minutes to complete the sampling of 20 monitored devices. In addition, increasing the collection interval and shortening the collection time can also be used in combination, and the specific method is set by the staff according to the actual situation.

[0151] In local working mode:

[0152] S240: When entering the local working mode or obtaining a mode switching signal in the local working mode, determine whether the working modes corresponding to the preset same-group terminal devices are all local working modes.

[0153] S241. If the working modes corresponding to the devices in the same group are not all local working modes, the current device collects and stores device parameters in the same way as when working independently.

[0154] When there is a normal working mode in the same group of terminal devices, in theory, the server will arrange the terminal devices in the normal working mode to collect the device parameters of the monitored device assigned to the current terminal device in a relatively timely manner. Then the current terminal device only needs to store the device parameters in a short time. Therefore, the storage method in step S200 can be used.

[0155] When other end devices in the same group send a calling signal, the current end device obtains the calling signal and enters the standby mode according to the calling signal.

[0156] In standby mode:

[0157] S242: Stop acquiring the device parameters of the pre-matched monitored device.

[0158] In order to avoid repeated data collection, the terminal device in the standby mode no longer collects parameters of the pre-matched monitored device.

[0159] And after receiving the calling signal, the current end device transmits the device parameters stored locally to the end device that initiated the calling signal.

[0160] S243. Regularly determine whether the temporary communication is maintained.

[0161] If temporary communication is maintained, the end device continues to maintain the standby mode.

[0162] If the temporary communication is not maintained, the terminal device re-enters the local working mode.

[0163] Whether the temporary communication is maintained depends on whether the end device receives the call signal within the periodic determination interval. The periodic determination interval of whether the temporary communication is maintained by the end device at least covers the time interval required for sending two adjacent call signals.

[0164] In addition to the temporary communication not being maintained, the end device can also directly enter the normal working mode according to the heartbeat packet sent by the server. And when the end device receives a call signal in the normal working mode, the end device sends a stop signal to the end device that sends the call signal, and the corresponding end device stops sending the call signal after receiving the stop signal.

[0165] S244: If the working modes corresponding to the devices in the same group are all local working modes, then the device parameters of the monitored devices of the corresponding priority level are obtained according to the pre-stored permissions.

[0166] When the pre-stored permission is of high priority, the device parameters of the monitored device of high priority are obtained regularly at intervals with a preset first time value, and the corresponding device parameters are stored in the local storage space under the same pre-stored permission.

[0167] When the pre-stored authority is of low priority, the device parameters of the monitored device of low priority are obtained periodically at intervals of a preset second time value, and the corresponding device parameters are stored in the local storage space under the same preset authority at preset intervals.

[0168] The local storage space under the same pre-storage permission refers to the sum of the local storage spaces of the terminal devices with the same pre-storage permission in the group.

[0169] Assume that there are four end devices in a group, and the pre-stored permissions of end devices 1 and 2 are high priority, and the pre-stored permissions of end devices 3 and 4 are low priority. Then when the four end devices in the group are in local working mode, the storage space of end devices 1 and 2 is used to store the corresponding high-priority device parameters collected by the entire group, and the storage space of end devices 3 and 4 is used to store the corresponding low-priority device parameters collected by the entire group.

[0170] As for the collection of device parameters, the terminal device can collect the device parameters of the monitored device that are pre-assigned, and then transmit the device parameters corresponding to high and low priorities to the corresponding terminal devices separately; or the device parameters corresponding to high priority can be directly handed over to the terminal device with high priority pre-stored authority for collection, and the terminal device used for collecting device parameters can be reallocated after the priority level of the monitored device changes. In this embodiment, the former collection method is adopted.

[0171] When using local storage space under the same pre-stored permissions, communication is required between the end devices in the same group to determine whether the corresponding local storage space is full, and if so, to determine the device parameters that need to be replaced. The overall communication volume will be much higher than when working independently. However, compared to end devices working independently, a group sharing local storage space can maximize the utilization of the storage space, thereby retaining more device parameters.

[0172] The present application also discloses a data acquisition system. Figure 4 , including multiple terminal devices and a server, each terminal device communicates with the server via the Internet, and the terminal devices communicate with each other via Ethernet.

[0173] The server is used to establish regular communication with the end device and receive device parameters uploaded by the end device.

[0174] The working modes of the terminal device include local working mode and normal working mode.

[0175] The terminal device is used to periodically determine whether the regular communication with the server is normal.

[0176] If the normal communication with the server is normal, it enters the normal working mode.

[0177] If normal communication with the server is not normal, enter local working mode.

[0178] When the terminal device enters the normal working mode, it determines whether the device parameters are stored in the local storage space. If the device parameters are stored in the local storage space, the device parameters are uploaded.

[0179] In normal working mode:

[0180] The terminal device is used to obtain device parameters regularly and upload the corresponding device parameters.

[0181] The terminal device is also used to obtain temporary delegation instructions, wherein the temporary delegation instructions include target device information; the terminal device is used to establish temporary communication with the terminal device corresponding to the target device information, and determine the monitored device that needs to be temporarily monitored based on the target device information, regularly obtain the monitored device that needs to be temporarily monitored and the device parameters of the pre-matched monitored device, and upload the device parameters.

[0182] In local working mode:

[0183] The terminal device is used to periodically obtain device parameters and store the device parameters in the local storage space.

[0184] It is also used to obtain a call signal and enter standby mode according to the call signal.

[0185] In standby mode:

[0186] The end device stops obtaining device parameters and is used to periodically determine whether temporary communication is maintained. If temporary communication is not maintained, it enters the local working mode.

[0187] The embodiment of the present application also discloses a computer-readable storage medium storing a computer program that can be loaded by a processor and execute any of the above-mentioned data acquisition methods.

[0188] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A data collection method, It is characterized in that The data collection method is applied to a battery energy storage power station, which includes a server, a plurality of monitored devices, and a plurality of terminal devices, wherein the terminal devices are all connected to the server in communication, and each of the terminal devices is connected to one or more monitored devices in communication, and a plurality of the terminal devices form a group; for each of the terminal devices in the battery energy storage power station, the data collection method includes the following steps: Regularly determine whether regular communication with the server is normal. If the regular communication with the server is normal, the normal working mode is entered, wherein the regular communication refers to a communication mode in which the server and the server are notified of the status of each other; If the regular communication with the server is not normal, it enters the local working mode; In normal working mode: When entering the normal working mode, it is determined whether the device parameters are stored in the local storage space. If the device parameters are stored in the local storage space, the device parameters are uploaded; Obtain device parameters regularly and upload the corresponding device parameters; Acquire a temporary delegation instruction issued by the server after detecting that the terminal device in the same group is in a local working mode, wherein the temporary delegation instruction includes target device information; Establishing temporary communication with the terminal device corresponding to the target device information, wherein the temporary communication is a communication mode established with other terminal devices; determining the monitored device to be temporarily monitored according to the target device information, regularly obtaining the device parameters of the monitored device to be temporarily monitored and the pre-matched monitored device, and uploading the device parameters; In local working mode: Obtain device parameters regularly and store them in local storage space; Acquire a call signal sent by other end devices in the same group after receiving the temporary delegation instruction and enter a standby mode according to the call signal; In standby mode: Stop obtaining device parameters and regularly determine whether temporary communication is maintained. If temporary communication is not maintained, enter the local working mode.

2. A data collection method according to claim 1, It is characterized in that Each monitored device is preset with a corresponding priority level; the method further includes: Whenever a device parameter is obtained, it is determined whether the device parameter exceeds the preset value. If the device parameter exceeds the preset value, the priority level of the corresponding monitored device will be adjusted to high priority; If the device parameter is less than or equal to the preset value, the priority level of the corresponding monitored device is adjusted to a low priority level; In normal working mode: regularly obtaining device parameters includes the following steps: after obtaining the device parameters, determining whether the priority level corresponding to the monitored device is a high priority; if the priority level corresponding to the monitored device is a high priority, obtaining the device parameters again after an interval of a preset first time value; if the priority level corresponding to the monitored device is not a high priority, obtaining the device parameters again after an interval of a preset second time value, wherein the second time value is greater than the first time value.

3. A data collection method according to any one of claims 1 to 2, It is characterized in that The method further comprises: When performing mode switching, a corresponding mode switching signal is generated, and the mode switching signal is transmitted to other terminal devices in the same group as preset; When entering the local working mode or obtaining the mode switching signal in the local working mode, it is determined whether the working modes corresponding to the preset same group end devices are all local working modes. If the working modes corresponding to the devices in the same group are all local working modes, the device parameters of the monitored devices of the corresponding priority level are obtained according to the pre-stored permissions; When the pre-stored permission is of high priority, device parameters of the monitored device of high priority are periodically obtained at intervals of the first time value, and the corresponding device parameters are stored in the local storage space under the same pre-stored permission; When the pre-stored authority is of low priority, the device parameters of the monitored device of low priority are obtained periodically at intervals of the second time value, and the corresponding device parameters are stored in the local storage space under the same preset authority at preset intervals.

4. A data collection method according to claim 3, Features: If the working modes corresponding to the devices in the same group are all local working modes, the corresponding device parameters are stored in the local storage space, including the following steps: Determine whether the local storage space corresponding to the end devices in the same group and with the same priority permissions is full. If the local storage space corresponding to the terminal devices in the same group and with the same priority authority is not full, the device parameters are stored in the local storage space corresponding to the terminal devices in the same group and with the same priority authority; If the local storage space corresponding to the terminal devices in the same group and with the same priority is full, the device parameters with the earliest storage time will be replaced by the current device parameters.

5. A data collection method according to claim 4, It is characterized in that The method further comprises: If the working modes corresponding to the devices in the same group are all local working modes, and the priority level corresponding to the monitored device is adjusted from low priority to high priority, a count value N corresponding to the monitored device is established, and the count value N=1, and each time the device parameters of the monitored device are obtained, it is determined whether the count value N exceeds the preset number of times; If the count value N does not exceed the preset number of times, after the storage of the currently acquired device parameter is completed, the device parameter is marked as irreplaceable, and N=N+1; If the count value N exceeds the preset number of times, the count value N is deleted and the determination of whether the count value N exceeds the preset number of times is stopped; When replacing the device parameters with the oldest storage time with the current device parameters, exclude the device parameters marked as non-replaceable.

6. A data collection method according to claim 1, It is characterized in that Each monitored device corresponds to a priority level; wherein, periodically obtaining device parameters of the monitored devices that need to be temporarily monitored and the pre-matched monitored devices includes the following steps: Determine the number M1 of monitored devices that need to be temporarily monitored and have a low priority level, and the number M2 of monitored devices that are pre-matched and have a low priority level; The preset initial interval time is expanded to the temporary interval time according to the ratio of (M1+M2) / M2, and the device parameters of the monitored devices to be temporarily monitored and the pre-matched monitored devices are obtained in sequence during the temporary interval time.

7. A data collection method according to claim 3, Features: If the working modes corresponding to the devices in the same group are not all local working modes, storing the corresponding device parameters in the local storage space includes the following steps: Determine whether the local storage space is full. If the local storage space is not full, the device parameters are stored in the local storage space; If the local storage space is full, the device parameters with the earliest storage time will be replaced by the current device parameters.

8. A data acquisition system, Features: It includes a server, a monitored device and a plurality of terminal devices, wherein the terminal devices are all connected to the server in communication, each of the terminal devices is connected to one or more monitored devices in communication, and a plurality of the terminal devices form a group; The server is used to establish regular communication with the terminal device and receive device parameters uploaded by the terminal device; The working mode of the terminal device includes a local working mode and a normal working mode; The terminal device is used to periodically determine whether the regular communication with the server is normal. If the regular communication with the server is normal, the normal working mode is entered, wherein the regular communication refers to a communication mode in which the server and the server are notified of the status of each other; If the regular communication with the server is not normal, it enters the local working mode; When the terminal device is in a normal working mode, the terminal device is used to determine whether the device parameters are stored in the local storage space, and if the device parameters are stored in the local storage space, the device parameters are uploaded; The terminal device is also used to periodically obtain device parameters and upload the corresponding obtained device parameters; The terminal device is also used to obtain a temporary entrustment instruction issued by the server after detecting that the terminal device in the same group is in the local working mode, and establish temporary communication with the terminal device corresponding to the target device information, and then determine the monitored device to be temporarily monitored according to the target device information, regularly obtain the device parameters of the monitored device to be temporarily monitored and the pre-matched monitored device, and upload the device parameters; wherein the temporary entrustment instruction includes the target device information; the temporary communication is a communication method established with other terminal devices; When the terminal device is in the local working mode, the terminal device is used to periodically obtain device parameters and store the device parameters in the local storage space; The terminal device is also used to obtain a call signal sent by other terminal devices in the same group after receiving the temporary delegation instruction and enter the standby mode according to the call signal; In standby mode: The terminal device is used to stop acquiring device parameters and to periodically determine whether temporary communication is maintained. If temporary communication is not maintained, the terminal device enters a local working mode.

9. A computer-readable storage medium, It is characterized in that A computer program is stored which can be loaded by a processor and executes a data collection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Business and equipment operation and maintenance monitoring system

    CN104678868A

  • A data processing method and apparatus

    CN108989463A