Alarm data collection method and device, electronic equipment and storage medium
By sending a data re-collection request to the operation and maintenance center and matching alarm data, the problem of out-of-order storage after communication interruption was solved, and accurate updates of alarm data in the alarm database were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNITED NETWORK COMM GRP CO LTD
- Filing Date
- 2022-12-16
- Publication Date
- 2026-05-19
AI Technical Summary
In existing technologies, alarm data collected after communication between the operation and maintenance center and electronic equipment is interrupted is stored out of order, resulting in low accuracy of alarm data in the alarm database.
Send a data acquisition request to the operation and maintenance center to obtain the retransmitted alarm data. Based on the preset pairing strategy that the clearing status of the same alarm event occurs after the active alarm status, pair the retransmitted alarm data with the alarm data during the estimated communication interruption period to obtain the status-updated alarm data and cache it in the alarm database.
It improves the accuracy of alarm data in the alarm database, ensures that the status of the same alarm event is updated correctly, and avoids the problem of accidentally clearing the alarm status.
Smart Images

Figure CN115809273B_ABST
Abstract
Description
Technical Field
[0001] This application relates to alarm data technology, and more particularly to an alarm data acquisition method, apparatus, electronic device and storage medium. Background Technology
[0002] With the development of alarm data technology, operators' electronic equipment can collect alarm data reported by the Operation and Maintenance Center (OMC) in each province through direct acquisition via Enterprise Service Bus (ESB) and store it in the alarm database to ensure the integrity of the alarm data in the alarm database.
[0003] Currently, when a communication interruption occurs between the operation and maintenance center and the electronic equipment, the period of communication interruption is first determined, and then the alarm data of each operation and maintenance center during the communication interruption period is collected.
[0004] However, since the alarm data collected from each operation and maintenance center is out of order, directly storing the out-of-order alarm data in the alarm database will result in low accuracy of the alarm data stored in the alarm database. Summary of the Invention
[0005] This application provides an alarm data acquisition method, apparatus, electronic device, and storage medium to solve the technical problem of low accuracy in the acquisition of alarm data in the prior art.
[0006] Firstly, this application provides an alarm data collection method, including:
[0007] Send a data re-collection request to at least one operation and maintenance center;
[0008] Obtain multiple retransmission alarm data returned by the at least one operation and maintenance center in response to the data retransmission request. The multiple retransmission alarm data are alarm data that were not uploaded to the electronic device during the estimated communication interruption period, and the actual communication interruption period is within the estimated communication interruption period.
[0009] Obtain multiple alarm data from the at least one operation and maintenance center during the estimated communication interruption from the alarm database;
[0010] Based on a preset pairing strategy where the clearing of alarm status occurs after the active alarm status of the same alarm event, multiple alarm data during the estimated communication interruption period are paired with corresponding retransmission alarm data to obtain multiple status-updated alarm data.
[0011] The alarm data with the multiple status updates are cached in the alarm database.
[0012] In one embodiment, sending a data replenishment request to at least one operation and maintenance center includes:
[0013] Determine whether the serial numbers of multiple real-time alarm data uploaded by the operation and maintenance centers of each province are consecutive within a preset time period;
[0014] If it is determined that the serial numbers of multiple real-time alarm data uploaded by at least one operation and maintenance center are not consecutive, a data supplementation request is sent to the at least one operation and maintenance center.
[0015] In one embodiment, before determining whether the serial numbers of multiple alarm data uploaded by the operation and maintenance centers at each province within a preset time period are consecutive, the method further includes:
[0016] During the process of uploading multiple real-time alarm data from the operation and maintenance centers of each province to the alarm database in real time, the received multiple first real-time alarm data are paired with corresponding second real-time alarm data according to the preset pairing strategy; the first real-time alarm data is real-time alarm data in the active alarm state, and the second real-time alarm data is the same alarm event as the first real-time alarm data and in the cleared alarm state.
[0017] Store the second real-time alarm data that failed to match.
[0018] In one embodiment, acquiring multiple retransmission alarm data returned by the at least one operation and maintenance center in response to the data retransmission request includes:
[0019] Determine whether the number of the multiple retransmitted alarm data is greater than a preset value;
[0020] If it is determined to be less than a preset value, then multiple supplementary alarm data returned by the at least one operation and maintenance center through the real-time data transmission channel are obtained;
[0021] If it is determined to be greater than or equal to the preset value, then multiple retransmission alarm data returned by the at least one operation and maintenance center through the file transfer channel are obtained.
[0022] Secondly, this application provides an alarm data acquisition device, comprising:
[0023] The supplementary data acquisition request module is used to send a supplementary data acquisition request to at least one operation and maintenance center;
[0024] The data acquisition module is used to acquire multiple data acquisition alarms returned by the at least one operation and maintenance center in response to the data acquisition request. The multiple data acquisition alarms are alarms that were not uploaded to the electronic device during the estimated communication interruption period, and the actual communication interruption period is within the estimated communication interruption period.
[0025] An alarm data acquisition module is used to acquire multiple alarm data from the at least one operation and maintenance center during the estimated communication interruption period from the alarm database;
[0026] The data pairing module is used to pair multiple alarm data during the estimated communication interruption period with the corresponding retransmission alarm data based on a preset pairing strategy that the clearing alarm state of the same alarm event occurs after the active alarm state, so as to obtain multiple state-updated alarm data.
[0027] The paired data caching module is used to cache the alarm data of the multiple status updates to the alarm database.
[0028] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0029] The memory stores computer-executed instructions;
[0030] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect.
[0031] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0032] The alarm data acquisition method, apparatus, electronic device, and storage medium provided in this application send a data supplementation request to at least one operation and maintenance center; acquire multiple retransmitted alarm data returned by the at least one operation and maintenance center in response to the data supplementation request, wherein the multiple retransmitted alarm data are alarm data that were not uploaded to the electronic device during the estimated communication interruption period, and the actual communication interruption period is within the estimated communication interruption period; acquire multiple alarm data from the at least one operation and maintenance center during the estimated communication interruption period from the alarm database; based on a preset pairing strategy that the clearing state of the same alarm event occurs after the active alarm state, pair the multiple alarm data during the estimated communication interruption period with the corresponding retransmitted alarm data to obtain multiple state-updated alarm data; and cache the multiple state-updated alarm data in the alarm database. After collecting multiple retransmitted alarm data, following the preset pairing strategy that the cleared alarm state of the same alarm event occurs after the active alarm state, multiple alarm data during the estimated communication interruption period are paired with the corresponding retransmitted alarm data. This allows alarm events in the active alarm state during the estimated communication interruption period to be paired with the same retransmitted alarm events in the cleared alarm state that occurred afterward, and alarm events in the cleared alarm state during the estimated communication interruption period to be matched with the same retransmitted alarm events in the active alarm state that occurred before them. This updates the status of alarm data in the alarm database, resulting in accurate alarm data. Attached Figure Description
[0033] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0034] Figure 1 This is a schematic diagram illustrating the timing disorder that may occur during supplementary sampling, according to an embodiment of this application.
[0035] Figure 2 This is an application scenario diagram illustrating the alarm data acquisition method of this application embodiment;
[0036] Figure 3 This is a flowchart illustrating an embodiment of the alarm data acquisition method of this application;
[0037] Figure 4 This is a flowchart illustrating another embodiment of the alarm data acquisition method of this application;
[0038] Figure 5 This is a schematic diagram illustrating the structure of the alarm data acquisition method implemented in this application;
[0039] Figure 6 This is a schematic diagram of the electronic device used to implement the alarm data acquisition method.
[0040] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0041] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0042] To clearly understand the technical solution of this application, the solutions of the prior art will be described in detail first.
[0043] In traditional methods, when communication between the operation and maintenance center and electronic equipment is interrupted, alarm data from each operation and maintenance center is typically collected as active alarm data. However, because the data collected from each operation and maintenance center is out of order, directly storing this out-of-order alarm data in the alarm database reduces the accuracy of the alarm data stored there. Specifically, the drawback of this traditional approach can be understood as follows: due to the inherent limitations of each operation and maintenance center, the alarm data collected from them to the electronic equipment is out of order. Often, the cleared alarm status of the same alarm event arrives at the electronic equipment before the active alarm status. Since the corresponding active alarm status for that alarm event has not yet arrived at the electronic equipment, in the traditional approach, the cleared alarm status of that alarm event will be cleared by the electronic equipment. Because the cleared alarm status arrives first and is discarded, the active alarm status of the same alarm event uploaded subsequently will remain in an active state and cannot be cleared. This results in the alarm event actually being cleared, but the alarm event exported from the alarm database still showing an active alarm status.
[0044] For example, such as Figure 1As shown, a network outage occurred between time points 2 and 3, causing the electronic device to miss receiving active and cleared alarms between sequence numbers 2 and 1200. The aforementioned data recovery mechanism retrieved these lost alarm data between time points 5 and 6. After the loss and recovery mechanism, the actual alarm sequence numbers received by the electronic device for the above-listed alarm data became: sequence number 1 (active alarm 1), sequence number 1300 (cleared alarm 3), sequence number 2 (active alarm 2), and sequence number 1200 (active alarm 3). Specifically, active alarm 1 means alarm event 1 is in an active alarm state, active alarm 2 means alarm event 2 is in an active alarm state, active alarm 3 means alarm event 3 is in an active alarm state, and cleared alarm 3 means alarm event 3 is in a cleared alarm state.
[0045] As can be seen, after the above process, the alarm data (active alarm 3 and cleared alarm 3) that were originally in the normal order now arrive at the electronic device in the reverse order, meaning that cleared alarm 3 arrives before active alarm 3. Since there is no active alarm 3 in the electronic device when cleared alarm 3 arrives, the update operation has no effect, and the cleared alarm is discarded after the update operation. Subsequently, when active alarm 3 arrives and is entered into the database, because the previous cleared alarm 3 has already arrived and been discarded, active alarm 3 will remain in an active state and cannot be cleared.
[0046] Therefore, when faced with the technical problems of existing technologies, the inventors, through creative research, discovered that in order to improve the accuracy of alarm data stored in the alarm database, the electronic device first acquires multiple supplementary alarm data, and then pairs these multiple supplementary alarm data with multiple alarm data stored in the alarm database during the estimated communication interruption period, based on a preset pairing strategy, to obtain multiple status-updated alarm data and store them in the alarm database. After collecting multiple retransmitted alarm data, following the preset pairing strategy that the cleared alarm state of the same alarm event occurs after the active alarm state, multiple alarm data during the estimated communication interruption period are paired with the corresponding retransmitted alarm data. This allows alarm events in the active alarm state during the estimated communication interruption period to be paired with the same retransmitted alarm events in the cleared alarm state that occurred afterward, and alarm events in the cleared alarm state during the estimated communication interruption period to be matched with the same retransmitted alarm events in the active alarm state that occurred before them. This updates the status of alarm data in the alarm database, resulting in accurate alarm data.
[0047] like Figure 2As shown in the embodiment of this application, the alarm data acquisition method is used in a network architecture that includes an electronic device 10 and at least one operation and maintenance center 20, which are connected for communication. The electronic device 10 sends a data supplementation request to at least one operation and maintenance center 20; it acquires multiple supplementary alarm data returned by at least one operation and maintenance center 20 in response to the data supplementation request. These multiple supplementary alarm data are alarm data that were not uploaded to the electronic device 10 during the estimated communication interruption period, and the actual communication interruption period falls within the estimated communication interruption period. Multiple alarm data from at least one operation and maintenance center 20 during the estimated communication interruption period are retrieved from the alarm database; based on a preset pairing strategy where the clearing state of the same alarm event occurs after the active alarm state, the multiple alarm data during the estimated communication interruption period are paired with the corresponding supplementary alarm data to obtain multiple state-updated alarm data; and the multiple state-updated alarm data are cached in the alarm database.
[0048] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0049] Figure 3 This application provides an embodiment of an alarm data collection method, such as... Figure 3 As shown, the entity executing the alarm data collection method provided in this embodiment is an electronic device. Therefore, the alarm data collection method provided in this embodiment includes the following steps:
[0050] Step 101: Send a data re-collection request to at least one operation and maintenance center.
[0051] In this context, the operation and maintenance center refers to the functional entities within the operation and maintenance system, each capable of managing multiple network devices. A single province can have multiple operation and maintenance centers. After electronic devices establish a real-time alarm set connection with a specific operation and maintenance center at the provincial level via the Enterprise Service Bus (ESB) socket transmission channel, the operation and maintenance center will report relevant alarm data from the network devices it manages in real time, tagging each alarm with an alarm serial number. This real-time reporting of alarm data from the network devices managed by the operation and maintenance center can be understood as each operation and maintenance center reporting network faults, power supply faults, etc., of multiple network devices under its management via the ESB. The alarm events, active alarm states, and cleared alarm states can be understood as follows: For example, a network fault or power supply fault in network device A can be considered an alarm event, and in an active alarm state. After a period of time, once network device A with the network fault is repaired, the alarm event changes to a cleared alarm state. Each alarm data includes an alarm event and the status of that alarm event. The status of the alarm event is either active alarm status or cleared alarm status.
[0052] When each operation and maintenance center uploads alarm data, the transmission is independent and parallel, without affecting each other. Therefore, when an operation and maintenance center loses connection with the enterprise service bus of the electronic equipment, other provincial operation and maintenance centers will not be affected. Furthermore, on the electronic equipment side, multiple alarm data partitions can be set up for each operation and maintenance center, and each partition carries a corresponding operation and maintenance center identifier. Thus, when a discontinuity in alarm data is detected in a partition, the operation and maintenance center whose communication with the electronic equipment was interrupted can be immediately determined based on the identifier carried by that partition.
[0053] Communication interruptions can cause some alarm data to fail to be uploaded to electronic devices, while the operation and maintenance center still has a cache. Since a data re-acquisition request can be sent to the operation and maintenance center after a network disconnection between the operation and maintenance center and the electronic devices, the alarm data that failed to be uploaded before can be retrieved again.
[0054] Step 102: Obtain multiple retransmission alarm data returned by the at least one operation and maintenance center in response to the data retransmission request.
[0055] Several of the supplementary alarm data are alarm data that were not uploaded to electronic devices during the estimated communication interruption period. The actual communication interruption period falls within the estimated communication interruption period. The actual communication interruption period refers to the period from when the operation and maintenance center and the electronic devices actually disconnect and reconnect. The actual communication interruption period falling within the estimated communication interruption period means that the estimated disconnection time is earlier than the actual disconnection time, and the estimated reconnection time is later than the actual reconnection time. The reason for acquiring alarm data not uploaded to electronic devices during the estimated communication interruption period is that there is a clock mechanism discrepancy between the operation and maintenance center and the electronic devices, as well as several network layers separating them, resulting in transmission delays in alarm data transmission. Therefore, the electronic devices cannot accurately know when the actual communication interruption began and when it reconnected. Using a longer time period (the estimated communication interruption period) as the interval for supplementary alarm data collection can prevent the omission of alarm data to be supplemented.
[0056] Each supplementary alarm data transmission includes an alarm event and the status of that alarm event. The status of the alarm event is either an active alarm status or a cleared alarm status, as mentioned above.
[0057] Step 103: Obtain multiple alarm data from the alarm database for the at least one operation and maintenance center during the estimated communication interruption period.
[0058] The at least one operation and maintenance center mentioned in step 101 refers to the operation and maintenance center where communication with the electronic equipment was interrupted. The alarm data obtained from the alarm database for the at least one operation and maintenance center during the estimated communication interruption period is the alarm data uploaded to the alarm database in real time via the Socket transmission channel before and after the actual communication interruption. For example, if the actual communication interruption period is 11:00-11:30 and the estimated communication interruption period is 10:00-12:00, no alarm data can be uploaded to the alarm database during the actual communication interruption period. Therefore, the alarm data for the estimated communication interruption period only includes alarm data between 10:00-11:00 and 11:30-12:00.
[0059] Step 104: Based on the preset pairing strategy that the clearing state of the same alarm event occurs after the active alarm state, the multiple alarm data during the estimated communication interruption period are paired with the corresponding retransmission alarm data to obtain multiple state-updated alarm data.
[0060] The preset pairing strategy is determined based on the principle that the clearing state of the same alarm event should occur after the active alarm state. It can be used to change the state of an alarm event in the alarm data from active alarm state to cleared alarm state. The reason for setting the clearing state of the same alarm event to occur after the active alarm state is that any alarm event must first trigger an alarm (i.e., active alarm state) before it can be cleared (i.e., cleared alarm state).
[0061] As mentioned above, since the alarm data collected in the supplementary collection (i.e., multiple alarm data during the estimated communication interruption period) is out of order, the electronic equipment performs time sequence correction on it. It compares the multiple supplementary alarm data collected in the supplementary collection with the alarm data for the corresponding time period (the estimated communication interruption period) already stored in the alarm database, thereby changing / updating the status of the alarm data in the alarm database and obtaining accurate alarm data.
[0062] The comparison process involves using a preset pairing strategy based on the fact that the clearing state of the same alarm event occurs after the active alarm state. Multiple alarm data during the estimated communication interruption period are paired with the corresponding retransmission alarm data to obtain multiple state-updated alarm data.
[0063] Step 105: Cache the multiple status-updated alarm data into the alarm database.
[0064] In other words, status-updated alarm data is alarm data whose status has been accurately changed. Cache multiple status-updated alarm data in the alarm database to improve the accuracy of the alarm data stored in the alarm database.
[0065] In this application, a data re-collection request is sent to at least one operation and maintenance center; multiple retransmission alarm data returned by the at least one operation and maintenance center in response to the data re-collection request are obtained, wherein the multiple retransmission alarm data are alarm data that were not uploaded to electronic devices during the estimated communication interruption period, and the actual communication interruption period is within the estimated communication interruption period; multiple alarm data of the at least one operation and maintenance center during the estimated communication interruption period are obtained from the alarm database; based on a preset pairing strategy that the clearing state of the same alarm event occurs after the active alarm state, the multiple alarm data during the estimated communication interruption period are paired with the corresponding retransmission alarm data to obtain multiple state-updated alarm data; and the multiple state-updated alarm data are cached in the alarm database. After collecting multiple retransmitted alarm data, following the preset pairing strategy that the cleared alarm state of the same alarm event occurs after the active alarm state, multiple alarm data during the estimated communication interruption period are paired with the corresponding retransmitted alarm data. This allows alarm events in the active alarm state during the estimated communication interruption period to be paired with the same retransmitted alarm events in the cleared alarm state that occurred afterward, and alarm events in the cleared alarm state during the estimated communication interruption period to be matched with the same retransmitted alarm events in the active alarm state that occurred before them. This updates the status of alarm data in the alarm database, resulting in accurate alarm data.
[0066] As an alternative implementation method, such as Figure 4 As shown, in this embodiment, step 102 includes the following steps:
[0067] Step 201: Determine whether the serial numbers of multiple real-time alarm data uploaded by the operation and maintenance centers of each province within a preset time period are consecutive.
[0068] The preset duration is manually set. By checking whether the serial numbers of multiple real-time alarm data within the preset duration are consecutive, it is determined whether there is a communication interruption between the operation and maintenance center and the electronic equipment. Consecutive serial numbers indicate no communication interruption, while discontinuous serial numbers indicate a communication interruption.
[0069] Real-time alarm data is simply alarm data; the difference lies in the terminology. For the same alarm event, the active alarm status and the cleared alarm status each occupy a separate serial number. For example, as mentioned above... Figure 1 In the middle, when alarm event 3 is in the active alarm state, the serial number is 1200; when alarm event 3 is in the cleared alarm state, the serial number is 1300.
[0070] Step 202: If it is determined that the serial numbers of multiple real-time alarm data uploaded by at least one operation and maintenance center are not consecutive, a data supplementation request is sent to the at least one operation and maintenance center.
[0071] If it is determined that the serial numbers of multiple real-time alarm data uploaded by at least one operation and maintenance center are not consecutive, it indicates that there is a communication interruption between the at least one operation and maintenance center and the electronic equipment. In order to collect the alarm data during the communication interruption period, or alarm data for a longer period of time (e.g., the estimated communication interruption period), a data collection request is sent to at least one operation and maintenance center to instruct the at least one operation and maintenance center to re-upload the alarm data.
[0072] In this embodiment, it is determined whether the serial numbers of multiple real-time alarm data uploaded by the operation and maintenance centers at each province are consecutive within a preset time period. If it is determined that the serial numbers of multiple real-time alarm data uploaded by at least one operation and maintenance center are not consecutive, a data supplementation request is sent to the at least one operation and maintenance center. Based on whether the serial numbers of multiple real-time alarm data uploaded by the operation and maintenance centers are consecutive, it is determined whether a communication interruption has occurred between each operation and maintenance center and the electronic equipment, so that the data supplementation request can be accurately sent to the at least one operation and maintenance center that should supplement the data.
[0073] As an optional implementation, in this embodiment, before step 101, the following steps are also included:
[0074] Step 301: During the process of uploading multiple real-time alarm data from the operation and maintenance centers of each province to the alarm database in real time, the real-time clearing alarm status is matched with the corresponding real-time activity alarm status according to the preset matching strategy. The real-time alarm data is either a real-time activity alarm status or a real-time clearing alarm status.
[0075] The real-time alarm data can be either the first real-time alarm data or the second real-time alarm data. The first real-time alarm data is the real-time alarm data when the alarm event is in an active alarm state, and the second real-time alarm data is the real-time alarm data for the same alarm event as the first real-time alarm data but in a cleared alarm state.
[0076] In other words, before supplementary data collection occurs, during the normal uploading of real-time alarm data, multiple real-time alarm data from the operation and maintenance centers at each province are uploaded to the alarm database in real time via the enterprise service bus's Socket transmission channel. When uploading each real-time alarm data to the alarm database, an insertion operation is performed on each first real-time alarm data. When a second real-time alarm data with the same alarm event as the first real-time alarm data and in a cleared state is received, the first and second real-time alarm data are paired. This pairing must also follow a preset pairing strategy; that is, the pairing will only succeed if the first real-time alarm data occurs before the second real-time alarm data.
[0077] Step 302: Store the second real-time alarm data that failed to pair in the alarm database.
[0078] Unlike traditional solutions that delete unpaired second real-time alarm data, this embodiment stores the unpaired second real-time alarm data. After storage, during the re-collection process, these unpaired second real-time alarm data can be paired through step 104, thereby preventing the first real-time alarm data that can be paired with these unpaired second real-time alarm data from remaining in the same state, leading to erroneous alarm data.
[0079] The first real-time alarm data may not necessarily have a corresponding second real-time alarm data at this stage. The first real-time alarm data that cannot be matched can still be used as alarm data stored in the alarm database in step 103. When the corresponding retransmitted alarm data is obtained through supplementary acquisition, the corresponding status-updated alarm data can be obtained.
[0080] In this embodiment, during the real-time uploading of multiple real-time alarm data from various provincial operation and maintenance centers to the alarm database, multiple received first real-time alarm data are paired with corresponding second real-time alarm data according to the preset pairing strategy. The first real-time alarm data refers to real-time alarm data where the alarm event is in an active alarm state, and the second real-time alarm data refers to alarm data related to the same alarm event as the first real-time alarm data but in a cleared alarm state. Second real-time alarm data that cannot be paired are stored. Because the first and second real-time alarm data that can be paired are paired, and the second real-time alarm data that cannot be paired are stored, the status of the supplemented first real-time alarm data can be changed after these unpaired second real-time alarm data are collected, thus making the status of the alarm data stored in the alarm database more accurate.
[0081] As an optional implementation, in this embodiment, step 102 includes the following steps:
[0082] Step 401: Determine whether the number of the multiple retransmission alarm data is greater than a preset value.
[0083] The preset value can be determined based on experience, for example, the preset value can be set to 1000.
[0084] Step 402: If it is determined that the value is less than the preset value, then obtain multiple supplementary alarm data returned by the at least one operation and maintenance center through the real-time data transmission channel.
[0085] The real-time data transmission channel is the Socket transmission channel. If the number of supplementary alarm data is less than a preset value, at least one operation and maintenance center is instructed to still report the supplementary alarm data through the Socket transmission channel used in the original real-time processing. Thus, the electronic device can obtain multiple supplementary alarm data returned by at least one operation and maintenance center through the real-time data transmission channel.
[0086] Step 403: If it is determined that the value is greater than or equal to the preset value, then obtain multiple retransmission alarm data returned by the at least one operation and maintenance center through the file transfer channel.
[0087] The file transfer channel is the FTP (File Transfer Protocol) transfer channel. If the number of retransmitted alarm data is greater than or equal to a preset value, at least one operation and maintenance center is instructed to report the retransmitted alarm data through the FTP transfer channel, so that the electronic device can obtain multiple retransmitted alarm data returned by at least one operation and maintenance center through the file transfer channel.
[0088] Specifically, if the operation and maintenance center determines that the retransmitted alarm data is greater than or equal to the preset value, it first stores the generated files of these retransmitted alarm data in the designated directory of the operation and maintenance center. The FTP transfer channel of the electronic equipment periodically scans these designated directories of the operation and maintenance center. If a new file is found to be generated, the new file is moved to the designated directory of the enterprise service bus to complete the upload of the retransmitted alarm data.
[0089] In this embodiment, it is determined whether the number of the multiple retransmitted alarm data is greater than a preset value. If it is determined to be less than the preset value, then the multiple retransmitted alarm data returned by the at least one operation and maintenance center through the real-time data transmission channel are acquired. If it is determined to be greater than or equal to the preset value, then the multiple retransmitted alarm data returned by the at least one operation and maintenance center through the file transfer channel are acquired. By comparing the number of retransmitted alarm data with the preset value, different data transmission channels can be used to transmit the retransmitted alarm data, thereby making efficient use of these data transmission channels. Furthermore, when the data volume is large, using the file transfer channel to transmit data can also make the data transmission efficiency higher.
[0090] As an optional implementation, in this embodiment, step 104 includes the following steps:
[0091] Step 501: Sort the multiple retransmission alarm data based on the timestamps of the multiple alarm data during the estimated communication interruption period.
[0092] All alarm data uploaded by the operation and maintenance center to electronic equipment carries a timestamp. The timestamp on the retransmitted alarm data indicates the time when the retransmitted alarm data occurred. The timestamp on the alarm data during the estimated communication interruption period indicates the time when the alarm data occurred during the estimated communication interruption period. By sorting multiple retransmitted alarm data and multiple alarm data during the estimated communication interruption period according to their timestamps, the chronological order of the occurrence of each alarm data during the estimated communication interruption period and multiple retransmitted alarm data can be determined.
[0093] Step 502: Based on the preset pairing strategy that the clearing state of the same alarm event occurs after the active alarm state, the first alarm data during the estimated communication interruption period is paired with the corresponding first retransmission alarm data, and the second alarm data during the estimated communication interruption period is paired with the corresponding second retransmission alarm data.
[0094] The first alarm data is alarm data in the estimated active alarm state during the communication interruption period, and the first retransmission alarm data is retransmission alarm data in the same alarm event as the first alarm data and in the cleared alarm state. The second alarm data is alarm data in the estimated cleared alarm state during the communication interruption period and which is not paired, and the second retransmission alarm data is retransmission alarm data in the same alarm event as the second alarm data and in the active alarm state.
[0095] This step involves pairing the first alarm data during the estimated communication interruption period with the first retransmitted alarm data acquired during the actual communication interruption period, and pairing the second alarm data during the estimated communication interruption period with the second retransmitted alarm data acquired during the actual communication interruption period. This allows the first alarm data during the estimated communication interruption period to be paired with the corresponding first retransmitted alarm data that was not uploaded during the actual communication interruption period, and the second alarm data during the estimated communication interruption period to be paired with the corresponding second retransmitted alarm data that was not uploaded during the actual communication interruption period, thereby achieving a change in the state of the alarm event.
[0096] It should be noted that the relationship between the second alarm data during the estimated communication interruption period and the second real-time alarm data that failed to match in step 302 can be understood as follows: the second alarm data during the estimated communication interruption period is a part of the second real-time alarm data that failed to match in step 302, and the second real-time alarm data taken is this part of the second real-time alarm data during the estimated communication interruption period.
[0097] Step 503: Obtain the alarm data of the multiple status updates.
[0098] Specifically, after pairing all second alarm data during the estimated communication interruption period with their corresponding second retransmission alarm data, multiple status-updated alarm data can be obtained. It should be understood that the second alarm data during the estimated communication interruption period refers to alarm data for which the alarm event is in the cleared state and has not been paired. To avoid multiple unpaired second retransmission alarm data being collected, thus preventing the alarm state from being unable to be cleared, pairing continues until all second alarm data is complete. The first alarm data during the estimated communication interruption period may not have corresponding first retransmission alarm data in the currently collected retransmission alarm data; therefore, it is not necessary to pair all first alarm data during the estimated communication interruption period.
[0099] In this embodiment, the multiple retransmission alarm data are sorted based on their timestamps and the timestamps of multiple alarm data during the estimated communication interruption period. Based on a preset pairing strategy where the clearing state of the same alarm event occurs after the active alarm state, the first alarm data during the estimated communication interruption period is paired with the corresponding first retransmission alarm data; and the second alarm data during the estimated communication interruption period is paired with the corresponding second retransmission alarm data; thus obtaining the multiple state-updated alarm data. Because the first alarm data during the estimated communication interruption period is paired with the corresponding first retransmission alarm data based on the timestamps of the retransmission alarm data and the multiple alarm data during the estimated communication interruption period, and the second alarm data during the estimated communication interruption period is paired with the corresponding second retransmission alarm data based on the preset pairing strategy, the state of each alarm data during the estimated communication interruption period can be accurately updated after retransmission.
[0100] As an optional implementation, in this embodiment, step 105 further includes the following steps:
[0101] Step 601: In response to a data query request sent by the user terminal, the data query request includes the alarm time.
[0102] The alarm time refers to the time when the alarm occurred, which can be a specific point in time or a period of time. Users send data query requests through their user terminals, generally based on business needs, such as analyzing alarm data over a period of time or at a specific point in time to determine the future availability of each network device or whether maintenance is required.
[0103] Step 602: Obtain alarm data corresponding to the alarm time from the alarm database and send it to the user terminal.
[0104] That is, alarm data based on user needs is returned to the user terminal.
[0105] In this embodiment, in response to a data query request sent by a user terminal, the data query request including the alarm time; alarm data corresponding to the alarm time is retrieved from the alarm database and sent to the user terminal. Since the status of alarm events in the alarm data stored in the alarm database is accurate after steps 101-104, the alarm data obtained from the alarm database can be effectively used in other business scenarios.
[0106] Figure 5 This is a schematic diagram of the structure of an alarm data acquisition device provided in an embodiment of this application, as shown below. Figure 5 As shown, the alarm data acquisition device 40 provided in this embodiment is located in an electronic device. Therefore, the alarm data acquisition device 40 provided in this embodiment includes:
[0107] The supplementary data acquisition request module 41 is used to send a data supplementary acquisition request to at least one operation and maintenance center.
[0108] The data acquisition module 42 is used to acquire multiple data acquisition alarms returned by the at least one operation and maintenance center in response to the data acquisition request. The multiple data acquisition alarms are alarms that were not uploaded to the electronic device during the estimated communication interruption period, and the actual communication interruption period is within the estimated communication interruption period.
[0109] Alarm data acquisition module 43 is used to acquire multiple alarm data from the alarm database of the at least one operation and maintenance center during the estimated communication interruption period;
[0110] Data pairing module 44 is used to pair multiple alarm data during the estimated communication interruption period with corresponding retransmission alarm data based on a preset pairing strategy that the clearing alarm state of the same alarm event occurs after the active alarm state, so as to obtain multiple state-updated alarm data.
[0111] The pairing data caching module 45 is used to cache the multiple status-updated alarm data into the alarm database.
[0112] Optionally, when sending a data supplementation request to at least one operation and maintenance center, the supplementation request acquisition module 41 is specifically used to: determine whether the serial numbers of multiple real-time alarm data uploaded by the operation and maintenance centers at each province are consecutive within a preset time period; if it is determined that the serial numbers of multiple real-time alarm data uploaded by at least one operation and maintenance center are not consecutive, then a data supplementation request is sent to the at least one operation and maintenance center.
[0113] Optionally, before determining whether the serial numbers of multiple alarm data uploaded by the operation and maintenance centers at each province within a preset time period are consecutive, the alarm data acquisition device 40 is further specifically used to: during the process of uploading multiple real-time alarm data from the operation and maintenance centers at each province to the alarm database in real time, pair the received multiple first real-time alarm data with corresponding second real-time alarm data according to the preset pairing strategy; the first real-time alarm data is real-time alarm data in the active alarm state, and the second real-time alarm data is the same alarm event as the first real-time alarm data and in the cleared alarm state; and store the second real-time alarm data that cannot be paired.
[0114] Optionally, the data acquisition module 42, when acquiring multiple data transfer alarms returned by at least one operation and maintenance center in response to the data acquisition request, is specifically configured to: determine whether the number of the multiple data transfer alarms is greater than a preset value; if it is determined to be less than the preset value, acquire the multiple data transfer alarms returned by the at least one operation and maintenance center through the real-time data transmission channel; if it is determined to be greater than or equal to the preset value, acquire the multiple data transfer alarms returned by the at least one operation and maintenance center through the file transfer channel.
[0115] Optionally, the data pairing module 44, when pairing multiple alarm data during the estimated communication interruption period with corresponding retransmission alarm data based on a preset pairing strategy where the clearing state of the same alarm event occurs after the active alarm state, to obtain multiple state-updated alarm data, specifically performs the following: sorting based on the timestamps of the multiple retransmission alarm data and the timestamps of the multiple alarm data during the estimated communication interruption period; and pairing the first alarm data during the estimated communication interruption period with the corresponding first retransmission alarm data based on the preset pairing strategy where the clearing state of the same alarm event occurs after the active alarm state. Yes; the first alarm data is the alarm data in the estimated communication interruption period when the alarm event is in the active alarm state, and the first retransmission alarm data is the retransmission alarm data in the same alarm event as the first alarm data and in the cleared alarm state; and the second alarm data in the estimated communication interruption period is paired with the corresponding second retransmission alarm data; the second alarm data is the alarm data in the estimated communication interruption period when the alarm event is in the cleared alarm state and is not paired, and the second retransmission alarm data is the retransmission alarm data in the same alarm event as the second alarm data and in the active alarm state; obtain the multiple state-updated alarm data.
[0116] Optionally, after caching the multiple status-updated alarm data into the alarm database, the alarm data acquisition device 40 is further configured to: respond to a data query request sent by a user terminal, the data query request including the alarm time; obtain the alarm data corresponding to the alarm time from the alarm database, and send it to the user terminal.
[0117] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment, the device being as follows: Figure 6 As shown, the electronic device includes: a memory 51 and a processor 52; the memory 51 is a memory for storing processor-executable instructions; the processor 52 is used to run computer programs or instructions to implement the alarm data acquisition method provided in any of the above embodiments.
[0118] The memory 51 is used to store programs. Specifically, the program may include program code, which includes computer operation instructions. The memory 51 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device.
[0119] The processor 52 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this disclosure.
[0120] Optionally, in specific implementations, if the memory 51 and processor 52 are implemented independently, then the memory 51 and processor 52 can be interconnected via bus 53 to complete mutual communication. Bus 53 can be an Industry Standard Architecture (ISA) bus 53, a Peripheral Component Interconnect (PCI) bus 53, or an Extended Industry Standard Architecture (EISA) bus 53, etc. Bus 53 can be divided into address bus 53, data bus 53, control bus 53, etc. For ease of representation, Figure 6 The bus 53 is represented by a single thick line, but this does not mean that there is only one bus 53 or only one type of bus 53.
[0121] Optionally, in a specific implementation, if the memory 51 and the processor 52 are integrated on a single chip, then the memory 51 and the processor 52 can communicate with each other through an internal interface.
[0122] A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the aforementioned alarm data acquisition method.
[0123] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0124] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for collecting alarm data, characterized in that, Each alarm data includes an alarm event and the status of that alarm event; Applied to electronic devices, the method includes: Send a data supplementation request to at least one operation and maintenance center; the data supplementation request is triggered by determining whether the serial numbers of multiple real-time alarm data uploaded by the operation and maintenance centers of each province are consecutive within a preset time period. If it is determined that the serial numbers of multiple real-time alarm data uploaded by at least one operation and maintenance center are not consecutive, the data supplementation request is sent to the at least one operation and maintenance center. The system acquires multiple retransmission alarm data returned by the at least one operation and maintenance center in response to the data retransmission request. The multiple retransmission alarm data are alarm data that were not uploaded to the electronic device during the estimated communication interruption period. The actual communication interruption period is within the estimated communication interruption period, and the start time of the estimated communication interruption period is earlier than the start time of the actual communication interruption, and the end time of the estimated communication interruption period is later than the end time of the actual communication interruption. Determine whether the number of the multiple retransmission alarm data is greater than a preset value; if it is determined to be less than the preset value, then obtain the multiple retransmission alarm data returned by the at least one operation and maintenance center through the real-time data transmission channel; if it is determined to be greater than or equal to the preset value, then obtain the multiple retransmission alarm data returned by the at least one operation and maintenance center through the file transfer channel. Obtain multiple alarm data from the at least one operation and maintenance center during the estimated communication interruption from the alarm database; Based on a preset pairing strategy where the clearing state of the same alarm event occurs after the active alarm state, multiple alarm data during the estimated communication interruption period are paired with corresponding retransmission alarm data to obtain multiple state-updated alarm data. The pairing includes: pairing the first alarm data where the alarm event during the estimated communication interruption period is in the active alarm state with the first retransmission alarm data corresponding to the same alarm event and in the clearing state; and pairing the second alarm data where the alarm event during the estimated communication interruption period is in the clearing alarm state and is not paired with the second retransmission alarm data corresponding to the same alarm event and in the active alarm state. The alarm data with the multiple status updates are cached in the alarm database.
2. The method according to claim 1, characterized in that, Before determining whether the serial numbers of multiple real-time alarm data uploaded by the operation and maintenance centers at each province within a preset time period are consecutive, the method further includes: During the process of uploading multiple real-time alarm data from the operation and maintenance centers of each province to the alarm database in real time, the received multiple first real-time alarm data are paired with corresponding second real-time alarm data according to the preset pairing strategy; the first real-time alarm data is real-time alarm data in the active alarm state, and the second real-time alarm data is the same alarm event as the first real-time alarm data and in the cleared alarm state. The second real-time alarm data that failed to pair is stored in the alarm database.
3. The method according to claim 1, characterized in that, The preset pairing strategy, which determines that the clearing of alarm status based on the same alarm event occurs after the active alarm status, pairs multiple alarm data during the estimated communication interruption period with corresponding retransmission alarm data to obtain multiple status-updated alarm data, including: The data is sorted based on the timestamps of the multiple retransmission alarm data and the timestamps of the multiple alarm data during the estimated communication interruption period; Based on a preset pairing strategy where the clearing state of the same alarm event occurs after the active alarm state, the first alarm data during the estimated communication interruption period is paired with the first retransmission alarm data of the same alarm event that is in the clearing state. The second alarm data during the estimated communication interruption period is then paired with the second retransmission alarm data corresponding to the same alarm event and in an active alarm state. Obtain alarm data updated for the multiple states.
4. The method according to claim 1, characterized in that, After caching the multiple status-updated alarm data in the alarm database, the method further includes: In response to a data query request sent by a user terminal, the data query request includes an alarm time; The alarm data corresponding to the alarm time is retrieved from the alarm database and sent to the user terminal.
5. An alarm data acquisition device, characterized in that, The device includes: The supplementary data acquisition request module is used to send a supplementary data acquisition request to at least one operation and maintenance center. The supplementary data acquisition request is triggered by determining whether the serial numbers of multiple real-time alarm data uploaded by the operation and maintenance centers of each province are consecutive within a preset time period. If it is determined that the serial numbers of multiple real-time alarm data uploaded by at least one operation and maintenance center are not consecutive, the supplementary data acquisition request is sent to the at least one operation and maintenance center. The data acquisition module is used to acquire multiple data transfer alarms returned by the at least one operation and maintenance center in response to the data transfer request. These multiple data transfer alarms are alarms that were not uploaded to the electronic device during the estimated communication interruption period. The actual communication interruption period falls within the estimated communication interruption period, and the start time of the estimated communication interruption period is earlier than the start time of the actual communication interruption, while the end time of the estimated communication interruption period is later than the end time of the actual communication interruption. The data acquisition module is also used to determine whether the number of the multiple data transfer alarms is greater than a preset value. If it is determined to be less than the preset value, the module acquires multiple data transfer alarms returned by the at least one operation and maintenance center through the real-time data transmission channel. If it is determined to be greater than or equal to the preset value, the module acquires multiple data transfer alarms returned by the at least one operation and maintenance center through the file transfer channel. An alarm data acquisition module is used to acquire multiple alarm data from the at least one operation and maintenance center during the estimated communication interruption period from the alarm database; The data pairing module is used to pair multiple alarm data during the estimated communication interruption period with corresponding retransmission alarm data based on a preset pairing strategy where the cleared alarm state of the same alarm event occurs after the active alarm state, thereby obtaining multiple alarm data with updated states. The pairing includes: pairing the first alarm data where the alarm event during the estimated communication interruption period is in the active alarm state with the first retransmission alarm data corresponding to the same alarm event and in the cleared alarm state; and pairing the second alarm data where the alarm event during the estimated communication interruption period is in the cleared alarm state and has not been paired with the second retransmission alarm data corresponding to the same alarm event and in the active alarm state. The paired data caching module is used to cache the alarm data of the multiple status updates to the alarm database.
6. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-4.