Alarm method and device based on data communication thread and storage medium thereof

Through continuous symbiotic data communication threads and shared alarm weight mapping tables, the problem of waste of alarm data frame transmission resources in quantum secure encrypted communication is solved, efficient resource utilization and low-cost communication are realized, and the user operation of the system is improved and Processing efficiency.

CN118984265APending Publication Date: 2024-11-19MATRICTIME DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410982175.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

In quantum secure encrypted communication, the prior art wastes too much resources when sending alarm data frames through a single thread, resulting in excessive consumption of system resources and inefficient transmission of alarm information.

Method used

The continuous symbiotic data communication thread is used to monitor the status parameter values ​​of the transmitted data frame in real time, generate alarm messages and send them through the data communication thread, delay processing of the next set of transmitted data frames, and share the alarm weight mapping table to reduce communication costs.

Benefits of technology

Effectively utilize system resources, reduce resource consumption, improve user operability and system processing efficiency, reduce communication costs, and have the ability to expand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984265A_ABST
    Figure CN118984265A_ABST
Patent Text Reader

Abstract

The invention discloses an alarm method and device based on a data communication thread and a storage medium, and the method comprises the steps that a transmitting end transmits a transmission data frame to a receiving end through the data communication thread, and carries out the real-time monitoring; the state parameter values in all the transmission data frames are compared with a preset alarm parameter value, and when an alarm parameter condition is triggered, an alarm message is generated and an alarm sending identifier is opened; after the target data frame is sent to the receiving end through the data communication thread, an alarm message sending interface is called to send an alarm message to the receiving end through the data communication thread; wherein the data communication thread is a thread in which the transmission delay between the two groups of transmission data frames is greater than the alarm message transmission time. According to the invention, through the repeating symbiotic data communication thread, service resources are reasonably and effectively utilized, and the consumption of system resources is reduced; and the data frame problem is sent to the receiving end through the alarm message, so that the user can know the state of the current data more clearly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data communication technology, and in particular to an alarm method, device and storage medium based on a data communication thread. Background Art

[0002] The data alarm mechanism is a mechanism for the sender to better pass the relevant information of the data transmission in the program system to the receiver. Its purpose is to accurately inform the data problems so that maintenance personnel can locate and solve the problems in time; remind the user of the current data status so that the user can take corresponding measures to deal with the problems.

[0003] The current quantum secure encryption communication is divided into two communication channels, the uplink and downlink, which manage the data processing in their own direction. The alarm is sent from the sender (i.e., the ground card) to the receiver (i.e., the tablet). Compared with the ground card, it belongs to the data processing on the downlink communication channel. The uplink communication channel only has monitoring request messages, and no alarm-related information.

[0004] Data processing is done in frames; that is, a thread in the downlink communication channel can only process one frame of data in one processing process, from receiving the source data to processing, encryption and decryption, and then packaging it until it is sent out. So when a frame of data triggers an alarm, how is the alarm data sent to the background? The normal way is to start another thread. When the alarm is triggered, the corresponding alarm data frame is sent by a separate thread. However, based on the application scenario of the product, starting another thread will waste too many resources.

[0005] Therefore, how to achieve efficient transmission of alarm data frames has become a technical problem that needs to be solved urgently. Summary of the invention

[0006] Purpose of the invention: To solve the related technical problems raised in the background technology, the present invention provides an alarm method, device and storage medium based on data communication thread, which adopts continuous symbiotic data communication thread, reasonably and effectively utilizes business resources and reduces the consumption of system resources.

[0007] Technical solution: The present invention provides an alarm method based on a data communication thread, comprising the following steps:

[0008] The sending end sends multiple groups of transmission data frames to the receiving end through the data communication thread, and monitors the status parameter values ​​in all transmission data frames in real time;

[0009] Compare the state parameter values ​​in all transmission data frames with the preset alarm parameter values. When any value in the state parameter values ​​of a transmission data frame triggers the alarm parameter condition, define the transmission data frame as a target data frame; then, generate an alarm message of the target data frame and turn on the alarm sending flag in the target data frame;

[0010] After the target data frame is sent to the receiving end through the data communication thread, based on the alarm sending flag being turned on, the sending end calls the alarm message sending interface to send the alarm message of the target data frame to the receiving end through the data communication thread; the sending end continues to send the remaining transmission data frames to the receiving end through the data communication thread;

[0011] The data communication thread is a thread in which the sending delay between two groups of transmission data frames is greater than the sending time of the alarm message.

[0012] Furthermore, the status parameter values ​​include a remaining key amount, a network abnormality value, and a device operation abnormality value.

[0013] Furthermore, the alarm triggering parameter condition refers to:

[0014] When the remaining key amount in the status parameter value of a certain transmission data frame is less than or equal to the preset key threshold in the preset alarm parameter value, the remaining key amount triggers the alarm parameter condition; when the network anomaly value in the status parameter value of a certain transmission data frame is greater than or equal to the preset network anomaly threshold in the preset alarm parameter value, the network anomaly value triggers the alarm parameter condition; when the device operation anomaly value in the status parameter value of a certain transmission data frame is greater than or equal to the preset device operation anomaly threshold in the preset alarm parameter value, the device operation anomaly value triggers the alarm parameter condition.

[0015] Furthermore, before the step of sending the plurality of groups of transmission data frames to the receiving end through the data communication thread, the method further comprises the following steps:

[0016] An alarm weight mapping table is preset between the sending end and the receiving end, and based on the preset alarm weight mapping table, the weight value of the alarm level corresponding to the state parameter value when the alarm parameter condition is triggered is determined.

[0017] Furthermore, the alarm message is an alarm data frame, and the alarm data frame includes a weight value of the alarm level.

[0018] The present invention also includes a computer device, which includes at least a processor and a memory, and the processor is used to implement the alarm method based on data communication thread as described in any one of the above claims when executing a computer program stored in the memory.

[0019] The present invention also includes a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the alarm method based on a data communication thread as claimed in any one of the above claims.

[0020] Beneficial effects of the present invention:

[0021] (1) Data frame problems are sent to the receiving end through alarm messages, allowing users to know the current data status more clearly, improving the user operability of the system;

[0022] (2) Continuous symbiotic data communication threads make reasonable and effective use of business resources and reduce the consumption of system resources;

[0023] (3) The shared alarm weight mapping table, that is, the shared alarm evaluation criteria, greatly reduces the communication cost and improves the efficiency of the system in processing messages. At the same time, it also has the ability to expand the maintenance of alarm types. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0025] Figure 1 It is a flow chart of the alarm method based on data communication thread of the present invention;

[0026] Figure 2 This is a flow chart of Example 2;

[0027] Figure 3 To express intent for the alarm weight mapping;

[0028] Figure 4 Another schematic diagram of the alarm weight mapping table. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0030] Example 1

[0031] At present, in the process of quantum secure encrypted communication, when a frame of data triggers an alarm, a new thread is started. After the alarm is triggered, the corresponding alarm data frame is sent by a separate thread. However, based on the application scenarios of the product, this will waste too many resources. The present invention is to solve this technical problem.

[0032] In view of this, an embodiment of the present invention proposes an alarm method based on a data communication thread. The method solves the problem of too much waste of resources caused by using a separate thread to send corresponding alarm data frames by using a continuous symbiotic data communication thread, and reduces the consumption of system resources. The method specifically includes the following steps:

[0033] like Figure 1 As shown, first, the sending end sends multiple groups of transmission data frames to the receiving end through the data communication thread, and monitors the state parameter values ​​in all transmission data frames in real time; the state parameter values ​​include the remaining key amount, network abnormality value and device operation abnormality value. Of course, the state parameter values ​​can also include others, such as network port abnormality value, etc.;

[0034] The state parameter values ​​in all transmission data frames are compared with the preset alarm parameter values. When any value in the state parameter value of a transmission data frame triggers the alarm parameter condition, the transmission data frame is defined as the target data frame; wherein the triggering alarm parameter condition means: when the remaining key amount in the state parameter value of a transmission data frame is less than or equal to the preset key threshold value in the preset alarm parameter value, the remaining key amount triggers the alarm parameter condition; when the network abnormality value in the state parameter value of a transmission data frame is greater than or equal to the preset network abnormality threshold value in the preset alarm parameter value, the network abnormality value triggers the alarm parameter condition; when the device operation abnormality value in the state parameter value of a transmission data frame is greater than or equal to the preset device operation abnormality threshold value in the preset alarm parameter value, the device operation abnormality value triggers the alarm parameter condition. When the alarm parameter condition is triggered, the transmission data frame is defined as the target data frame, and then, an alarm message of the target data frame is generated and the alarm sending flag in the target data frame is turned on; generating an alarm message is to generate an alarm data frame, and the content in the alarm data frame is how much a certain value in the state parameter value is, which triggers the alarm parameter condition. Turn on the alarm sending flag, which is called bAlFlag. As long as the alarm parameter conditions are triggered, the alarm information can be accurately reported. For example, if the remaining keys are insufficient when using the key, the current remaining key quantity and the business-related information of the current communication will be accurately reported.

[0035] After the target data frame is sent to the receiving end through the data communication thread, that is, after the target data frame is processed by the normal process of the thread, based on the alarm sending flag bAlFlag being turned on, the sending end calls the alarm message sending interface to send the alarm message of the target data frame to the receiving end through the data communication thread; when the alarm message sending interface call is completed, the thread processing process is completed, and the loop returns to the beginning, waiting to process the next frame, that is, the sending end continues to send the remaining transmission data frames to the receiving end through the data communication thread. From the above, it can be seen that the data communication thread originally only sends one frame (transmission data frame) at a time, and now it processes and sends two frames (target data frame + alarm data frame) at a time, which is equivalent to artificially delaying the processing time of the next transmission data frame, which is disadvantageous to customers relative to the business.

[0036] Therefore, it is necessary to select a data communication thread for processing, which is a thread whose transmission delay between two groups of transmission data frames is greater than the alarm message sending time; for example, in the actual business of a certain thread, two orderly and continuous transmission data frames A and B are processed. After processing A and before processing B frame, the time difference is 2ms; and the time used to send the alarm message is only 1ms. In this way, after processing frame A, processing the alarm message again will not affect the time difference of processing frame B. Based on this, the system selects the thread that processes the control instruction data to process the alarm message, which just meets the above requirements. The present invention sends both the alarm data and the business data (transmission data frame) when a data communication thread is processed once, that is, double sending at a time, which is called a continuous symbiotic data communication thread. The communication thread reasonably and effectively utilizes business resources and reduces the consumption of system resources; and the data frame problem is sent to the receiving end through the alarm message, so that the user can know the current data status more clearly, and the user operability of the system is increased.

[0037] An embodiment of the present invention further provides a computer device, which includes at least a processor and a memory, wherein the memory stores a computer program, and the processor is used to implement the alarm method based on a data communication thread of an embodiment of the present invention when executing the computer program stored in the memory.

[0038] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the alarm method based on a data communication thread of the embodiment of the present invention is implemented.

[0039] Example 2

[0040] like Figure 2As shown, it is well known that the alarm message needs to display some information such as the value of a certain item in the state parameter value. If all of these are carried through the alarm message communication, it will affect the service bandwidth. In order to more effectively transmit the alarm message, i.e., the alarm data frame, so that the alarm message carries less data and reduces the probability of such alarm message data occupying the service data bandwidth, this embodiment adopts a shared alarm weight mapping table to save bandwidth and system resources.

[0041] This embodiment is basically the same as Embodiment 1, except that: before the step of sending the plurality of groups of transmission data frames to the receiving end through the data communication thread at the sending end, the method further includes the following steps:

[0042] An alarm weight mapping table is preset between the sending end and the receiving end, and based on the preset alarm weight mapping table, the weight value of the alarm level corresponding to the state parameter value when the alarm parameter condition is triggered is determined. In other words, the alarm weight mapping table divides the alarm levels according to the state parameter values ​​when the alarm parameter conditions are triggered, and each alarm level has a corresponding weight value; the alarm weight mapping table can be as follows Figure 3 As shown, for example, when the remaining key amount is less than or equal to the preset key threshold in the preset alarm parameter value, the remaining key amount triggers the alarm parameter condition, and the preset key threshold is 20%. When the remaining key amount is 15%<X≤20%, the alarm level is general, and the corresponding weight value is 0; when the remaining key amount is 10%<X≤15%, the alarm level is more serious, and the corresponding weight value is 1; when the remaining key amount is 5%<X≤10%, the alarm level is serious, and the corresponding weight value is 2; when the remaining key amount is X≤5%, the alarm level is dangerous, and the corresponding weight value is 3; the weight values ​​of the alarm levels corresponding to the state parameter values ​​are preset and sorted at the sending end and the receiving end.

[0043] The alarm weight mapping table can also be Figure 4 As shown, for example, when the remaining key amount is less than or equal to the preset key threshold in the preset alarm parameter value, the remaining key amount triggers the alarm parameter condition, and the preset key threshold is 20%. When the remaining key amount is at X≤20%, the alarm level is general, and the corresponding weight value is 0; for example, when the device operation abnormality value is greater than or equal to the preset device operation abnormality threshold, the device operation abnormality value triggers the alarm parameter condition, and the device operation abnormality value can be temperature, memory occupancy, etc.; taking temperature as an example here, the preset device operation abnormality threshold is 75℃, when the device operation abnormality value is at 75℃≤M, the alarm level is serious, and the corresponding weight value is 1; the weight values ​​of the alarm levels corresponding to the status parameter values ​​are preset and sorted at the sending and receiving ends.

[0044] Later, the sender calls the alarm message sending interface to send the alarm message of the target data frame to the receiver through the data communication thread; the alarm message is an alarm data frame, which includes the weight value of the alarm level. It can be seen that the alarm message only carries the weight value. This shared alarm evaluation standard greatly reduces the communication cost and improves the efficiency of the system in processing messages. At the same time, the maintenance of the alarm type also has the ability to expand, which effectively saves the complexity of the code logic and makes the utilization efficiency between the system modules higher and more effective.

Claims

1. An alarm method based on data communication thread, characterized in that: The following steps are involved: The sending end sends multiple groups of transmission data frames to the receiving end through the data communication thread, and monitors the status parameter values ​​in all transmission data frames in real time; Compare the state parameter values ​​in all transmission data frames with the preset alarm parameter values, and when any value in the state parameter value of a transmission data frame triggers the alarm parameter condition, define the transmission data frame as a target data frame; Then, an alarm message of a target data frame is generated and an alarm sending flag in the target data frame is turned on; After the target data frame is sent to the receiving end through the data communication thread, based on the alarm sending flag being turned on, the sending end calls the alarm message sending interface to send the alarm message of the target data frame to the receiving end through the data communication thread; the sending end continues to send the remaining transmission data frames to the receiving end through the data communication thread; The data communication thread is a thread in which the sending delay between two groups of transmission data frames is greater than the sending time of the alarm message.

2. The alarm method based on data communication thread according to claim 1, characterized in that: The status parameter values ​​include the remaining key amount, network abnormality value and device operation abnormality value.

3. The alarm method based on data communication thread according to claim 2, characterized in that: The trigger alarm parameter condition refers to: When the remaining key amount in the status parameter value of a certain transmission data frame is less than or equal to the preset key threshold in the preset alarm parameter value, the remaining key amount triggers the alarm parameter condition; when the network anomaly value in the status parameter value of a certain transmission data frame is greater than or equal to the preset network anomaly threshold in the preset alarm parameter value, the network anomaly value triggers the alarm parameter condition; when the device operation anomaly value in the status parameter value of a certain transmission data frame is greater than or equal to the preset device operation anomaly threshold in the preset alarm parameter value, the device operation anomaly value triggers the alarm parameter condition.

4. The alarm method based on data communication thread according to claim 1, characterized in that: Before the step of sending the plurality of groups of transmission data frames to the receiving end through the data communication thread at the sending end, the method further comprises the following steps: An alarm weight mapping table is preset between the sending end and the receiving end, and based on the preset alarm weight mapping table, the weight value of the alarm level corresponding to the state parameter value when the alarm parameter condition is triggered is determined.

5. The alarm method based on data communication thread according to claim 4 is characterized in that: The alarm message is an alarm data frame, and the alarm data frame includes a weight value of the alarm level.

6. A computer device, characterized in that: The computer device comprises at least a processor and a memory, and the processor is used to implement the alarm method based on data communication thread as claimed in any one of claims 1 to 5 when executing the computer program stored in the memory.

7. A computer-readable storage medium, characterized in that: It stores a computer program, and when the computer program is executed by a processor, it implements the alarm method based on the data communication thread as described in any one of claims 1-5.