A method and system for detecting illegal external connections of assets based on network inspection

By performing token processing and statistical test algorithm analysis on log data, combined with the binomial test algorithm, the problem of difficulty in obtaining label data and difficulty in feature extraction in artificial intelligence anomaly detection is solved, improving the accuracy and efficiency of anomaly detection, and realizing Efficient detection of illegal external devices.

CN118199972BActive Publication Date: 2024-08-30JINQICHUANG (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410314570.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-19
Publication Date
2024-08-30
Estimated Expiration
2044-03-19

AI Technical Summary

Technical Problem

Anomaly detection based on artificial intelligence is limited by the difficulty in obtaining label data during the model training process, and it is difficult to effectively extract the characteristics of heterogeneous log data, resulting in low anomaly detection accuracy in log data analysis and difficulty in applying to actual scenarios.

Method used

Adopt an asset violation external detection method based on network inspection, perform token processing on log data, and combine statistical test algorithm and binomial test algorithm to initialize the token change type and calculate the token impact weight to reduce the false alarm rate , improve the accuracy of anomaly detection.

Benefits of technology

It improves the efficiency of log data detection, optimizes the feature extraction method, omits the acquisition of label data, improves the detection efficiency, accuracy and feasibility of illegal external equipment, and reduces the false alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118199972B
    Figure CN118199972B
Patent Text Reader

Abstract

The present invention provides a method and system for detecting illegal external connection of assets based on network inspection, which relates to the technical field of data processing. The method comprises: collecting log data of a device to be detected; preprocessing each log line; assigning a token to each preprocessed log line; initializing the change type of each token; counting the number of occurrences of the event type; introducing a binomial test algorithm to detect the first change significance value of each token; constructing an event detection function to calculate the second change significance value of each token sequence; calculating the token influence weight based on the rule of negative correlation with the type change frequency; correcting the second change significance value based on the token influence weight; outputting the token corresponding to the first significance value and the token sequence corresponding to the second change significance value; tracking the output token and token sequence, outputting the corresponding external connection device, and issuing an alarm. The detection efficiency, accuracy and feasibility of illegal external connection devices are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for detecting illegal external connections of assets based on network inspection. Background Art

[0002] Network Scanning is the active or passive scanning and detection of assets in the network to identify all known and unknown network devices and hosts, including scanning of IP address ranges, port scanning, protocol identification, etc. Asset illegal external communication refers to improper or unauthorized communication between internal assets of an organization (such as servers, workstations, network devices, etc.) and external networks. Such communication behavior may violate the organization's security strategy or policy regulations, and may also lead to security risks and data leakage. Use known security policies, rules or patterns to analyze network data and identify potential violations, such as communication with known malicious IP addresses, communication using non-standard ports, etc. With this method, organizations can effectively monitor and protect their network assets, promptly detect and respond to potential security threats, and thus improve network security.

[0003] In order to effectively deal with these threats, various asset illegal external connection detection methods continue to emerge. These methods cover multiple aspects such as network traffic analysis, threat intelligence, behavioral analysis, data security strategies and anomaly detection. By comprehensively using these technical means, timely discovery, analysis and prevention of external connection behaviors can be achieved, thereby ensuring the security of the organization's network security and information assets. Anomaly detection through analysis of log data is an effective method of existing technology. This method analyzes the log data generated by the system to identify abnormal patterns or abnormal events, as well as activities that do not conform to normal behavior. Then, the system can take corresponding measures, such as alarms, blocking, or investigations, to deal with the detected anomalies. The current detection method based on anomaly analysis of log data introduces artificial intelligence for anomaly detection to improve the efficiency of anomaly detection.

[0004] However, AI-based anomaly detection is limited by the difficulty in obtaining labeled data during model training and the lack of effective feature extraction for heterogeneous log data, resulting in low anomaly detection accuracy in log data analysis and difficulty in applying to actual scenarios. Summary of the invention

[0005] In order to solve the technical problems in the prior art that artificial intelligence-based anomaly detection is limited by the difficulty in obtaining label data during the model training process and the lack of effective feature extraction for heterogeneous log data, resulting in low anomaly detection accuracy in log data analysis and difficulty in application in actual scenarios, the present invention provides an asset illegal external connection detection method and system based on network inspection.

[0006] The technical solution provided by the embodiment of the present invention is as follows:

[0007] First aspect

[0008] An embodiment of the present invention provides a method for detecting illegal external connections of assets based on network inspection, comprising:

[0009] S1: Collecting log data of a device to be detected, wherein the log data includes a plurality of log lines;

[0010] S2: Perform preprocessing including standardization and deduplication on each log line;

[0011] S3: assigning an event type to each preprocessed log line and decomposing each log line into multiple tokens, wherein the tokens are concatenated into a token sequence according to the corresponding log lines, wherein the tokens include words, numbers, and symbols;

[0012] S4: Initializing the change type of each token in combination with the statistical inspection algorithm, wherein the change type includes time sequence, static, ascending, descending, continuous, range, unique, discrete and others;

[0013] S5: Count the number of occurrences of the event type;

[0014] S6: When the number of occurrences is greater than a preset number of occurrences, a binomial test algorithm is introduced to detect a first change significance value of each token;

[0015] S7: construct an event detection function to calculate the second change significance value of each token sequence;

[0016] S8: Calculate the token influence weight based on the rule of negative correlation with the frequency of type change;

[0017] S9: modifying the second change significance value based on the token influence weight;

[0018] S11: Track the output tokens and token sequences, output the corresponding external devices, and sound an alarm.

[0019] Second aspect

[0020] An embodiment of the present invention provides an asset illegal external connection detection system based on network inspection, comprising:

[0021] processor;

[0022] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for detecting illegal external connections of assets based on network inspection as described in the first aspect is implemented.

[0023] The third aspect

[0024] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for detecting illegal external connections of assets based on network inspection as described in the first aspect is implemented.

[0025] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0026] The present invention performs token processing on log data, that is, marks the log data, thereby improving the subsequent detection efficiency of the log data, and combines the statistical test algorithm to initialize the change type of each token, replacing the conventional form of feature extraction, and divides the change type into chronological, static, ascending, descending, continuous, range, unique, discrete and others. The introduction of the statistical test algorithm increases the initialization accuracy of the change type, and then combines the binomial test algorithm to evaluate the abnormal situation of the token and the token sequence through the change significance value of each token and the token sequence. Through the binomial test algorithm, the change of the token can be statistically analyzed to determine whether the change is significant, which can reduce the false alarm rate and improve the accuracy of anomaly detection. Based on the rule of negative correlation with the frequency of type change, the calculated token influence weight is used to correct the significance of the token sequence, weaken the influence weight of the frequently changing regular tokens, increase the ability of the event type to reflect the abnormal data changes, better reflect the abnormal behavior of the system, and then track the illegal external devices according to the abnormal data, complete the network inspection in an unsupervised manner, optimize the feature extraction method, omit the acquisition of label data, further improve the detection efficiency, accuracy and feasibility of illegal external devices, and reduce the false alarm rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1 A flowchart of a method for detecting illegal external connections of assets based on network inspection provided by an embodiment of the present invention;

[0029] Figure 2 A schematic diagram of a token detection structure provided by an embodiment of the present invention;

[0030] Figure 3 A schematic diagram of the structure of an asset illegal external connection detection system based on network inspection provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0032] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0033] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0034] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.

[0035] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0036] Reference Manual Attached Figure 1 , showing a flow chart of a method for detecting illegal external connections of assets based on network inspection provided by an embodiment of the present invention.

[0037] The embodiment of the present invention provides a method for detecting illegal external connection of assets based on network inspection, which can be implemented by a device for detecting illegal external connection of assets based on network inspection, and the device for detecting illegal external connection of assets based on network inspection can be a terminal or a server. The processing flow of the method for detecting illegal external connection of assets based on network inspection can include the following steps:

[0038] S1: Collect log data of the device to be tested.

[0039] The log data includes multiple log lines.

[0040] Among them, log data may contain various operations, events, status changes and other information of the device, usually recorded in text form. These log data are records of the operating status and operating behavior of the device, which can help administrators and security analysts understand the operation of the system, discover abnormal behaviors and security events, and perform troubleshooting and performance optimization. In anomaly detection, these log data can be used to identify abnormal behaviors and potential security threats in the system. Log data provides the necessary information basis for subsequent anomaly detection.

[0041] S2: Perform preprocessing on each log line, including standardization and deduplication.

[0042] It should be noted that standardization and deduplication preprocessing can improve the quality and consistency of log data, reduce the interference of duplicate information on subsequent processing, reduce the complexity of data processing, and improve detection efficiency.

[0043] Specifically, log data is standardized to ensure that all log lines have the same format and structure, which can be achieved by removing unnecessary spaces, unifying date and time formats, and normalizing fields. Duplicate log lines can be identified and removed using a hash algorithm or by comparing adjacent log lines. Duplicate log lines are removed to reduce the amount of data to be processed later and improve processing efficiency.

[0044] S3: Assign an event type to each preprocessed log line and decompose each log line into multiple tokens. The tokens are concatenated into a token sequence according to the corresponding log lines.

[0045] Among them, tokens include words, numbers, and symbols.

[0046] It should be noted that assigning event types to log lines and decomposing them into token sequences helps convert complex log information into structured data, which is convenient for subsequent processing and analysis.

[0047] Specifically, tokens can be assigned to each preprocessed log line through regular expressions, for example, using a tree parser AMiner or AECID-TG to complete the assignment of log lines. The event type is defined by a parser path set that matches the log line. The parser will parse the log line and convert it into a location defined by the parser, and then assign the matching event type. In addition, the parser also provides information about which tokens are static and which are variable.

[0048] S4: Initialize the change type of each token in combination with the statistical test algorithm.

[0049] Among them, the change types include chronological, static, ascending, descending, continuous, range, unique, discrete, and others.

[0050] It should be noted that the various token change types defined include chronological, static, ascending, descending, continuous, range, unique, discrete, etc. These change types can help describe the different change patterns of tokens in event sequences, so as to better understand the characteristics and behaviors of events, simplify the feature extraction process and dimensions, and improve the efficiency and accuracy of abnormal data detection.

[0051] In a possible implementation, S4 specifically includes:

[0052] S401: Acquire multiple observation values ​​of a token.

[0053] S402: Determine whether the observed values ​​of the token all have values ​​of the time structure. If so, set the change type of the token to time sequence and proceed to S409. Otherwise, proceed to S403, where the time structure is specifically:

[0054] [bd HH:MM:SS]

[0055] Among them, b represents the name of the month, d represents the day, HH represents the hour, MM represents the minute, and SS represents the second.

[0056] S403: When all observed values ​​are the same, the token change type is set to static.

[0057] S404: Determine whether the token is numerical data composed of numbers. If so, proceed to S405; otherwise, proceed to S406.

[0058] The second test checks if a token t has a static type. A mutable token can still have a static data type, since, for example, a mutable token used as a placeholder for an IP address may have a static value because only one IP address appears in the log data at hand. This test evaluates to true if all values ​​vt,i of a token t are identical. Before testing if a token t has an ascending, descending, or continuous type, all values ​​of a token t are evaluated to see if they are numeric, since these types require numeric values. If the value vt,i of a token t is numeric, then the test for whether the value of token t is ascending or descending will continue, otherwise the test for discrete types will continue directly. Assuming that the value of a token t is numeric, then the test for whether the value vt,i of a token t is ascending or descending will be performed by verifying that the value vt,i of a token t satisfies the conditions vt,1≤vt,2≤…≤vt,nt (ascending) or vt,1≥vt,2≥…≥vt,nt (descending).

[0059] S405: When the observed value meets the ascending rule, the token change type is set to ascending order. When the observed value meets the descending rule, the token change type is set to descending order. The ascending rule and the descending rule are:

[0060] Ascending rule: v t,1 ≤v t,2 ≤...≤v t,n

[0061] Descending rule: v t,1 ≥v t,2 ≥...≥v t,n

[0062] Among them, v t,i ,i=1,2,…,n represents the value of token t in the token sequence in the i-th observation, and n represents the maximum number of observations.

[0063] S406: Setting continuity judgment conditions, wherein the continuity judgment conditions include a first continuity judgment condition and a second continuity judgment condition, wherein the first continuity judgment condition is that the token is an integer or a floating point number, and the second continuity judgment condition is that the ratio of the number of different values ​​of the token to the maximum number of observations is less than a preset ratio:

[0064]

[0065] Among them, V t represents the number of different values ​​of the token, and τ represents the preset ratio.

[0066] Optionally, the preset ratio is τ=0.2.

[0067] It should be noted that this formula requires all values ​​to be integers, but floating point numbers are also acceptable. Secondly, it requires that the values ​​have a certain uniqueness, and each unique value appears at least 5 times to distinguish between consecutive and unique cases.

[0068] S407: Determine whether the tokens are independent by using the Durbin-Watson statistic, which is calculated as follows:

[0069]

[0070] Where d represents the Durbin-Watson statistic, v t,i-1 represents the value of token t in the token sequence at the i-1th observation.

[0071] The Durbin-Watson statistic is used to measure the degree of autocorrelation in a given sample at lag 1. It is calculated by taking the ratio of the sum of squares of differences between adjacent observations to the sum of squares of all observations.

[0072] In one possible implementation, whether a token is independent is determined by the Durbin-Watson statistic, specifically:

[0073] When the value of the Durbin-Watson statistic satisfies the positive correlation condition or the negative correlation condition, it is determined that the token is related to other tokens; otherwise, the token is determined to be independent:

[0074] The positive correlation condition is: d < d0, where d0 represents the critical value of correlation.

[0075] The negative correlation condition is: (4 - d) < d0.

[0076] It should be noted that determining whether tokens are independent through the Durbin-Watson statistic has the advantages of objectivity and standardization. By comparing the statistic with the preset critical value, the degree of correlation between data can be quantitatively analyzed, with a wide range of applications and strong interpretability and operability, which helps to effectively conduct data analysis and decision-making.

[0077] S408: When the token satisfies the continuity judgment condition but is not independent, set the change type of the token to range.

[0078] In a possible implementation, the range [a, b] is specifically:

[0079] a = min(v t,i ) - c(max(v t,i ) - min(v t,i ))

[0080] b = max(v t,i ) - c(max(v t,i ) - min(v t,i ))

[0081] Where a and b represent the upper and lower limits of the range respectively, max represents taking the maximum value, min represents taking the minimum value, and c ∈ [0, ∞) represents an adjustable scale coefficient.

[0082] S409: When the values of the tokens are all different, set the change type of the token to unique.

[0083] S410: When the token satisfies the second continuity judgment condition, set the change type of the token to discrete; otherwise, set the change type of the token to other.

[0084] The order of testing is crucial. We choose the order defined at the beginning of this section to avoid inadvertently assigning the wrong type to a token. For example, a timestamp may also be classified as a discrete token. Through this testing order, the change types of each token and token sequence can be effectively determined, which can improve the accuracy of subsequent anomaly detection based on this change type.

[0085] S5: Count the occurrence times of the event type.

[0086] Among them, the number of occurrences is counted after initialization. It is the number of times each event type recurs after initialization. The next step of processing is performed only when a certain number of times is reached. The advantage of this is to avoid judging whether an abnormality has occurred when the number of occurrences is too small. The change in type requires time accumulation to more accurately judge whether a change has occurred, which can greatly reduce the misjudgment rate.

[0087] S6: When the number of occurrences is greater than the preset number of occurrences, a binomial test algorithm is introduced to detect the first change significance value of each token.

[0088] Among them, the null hypothesis of the binomial test is that the probability of the occurrence of two possible events is equal, that is, in this case, the number of changes conforms to the binomial distribution. The alternative hypothesis is that the probability of one event is greater than the probability of the other event, that is, in this case, the number of changes no longer conforms to the binomial distribution. By calculating the value of the binomial test, the probability of observing the current number of changes under the null hypothesis can be obtained. If the value is less than the preset significance level (usually 0.05), the null hypothesis can be rejected, and it is believed that the change of the token is significant, that is, a real change has occurred.

[0089] The binomial test algorithm is used to evaluate the first change significance value of each token to help determine which tokens have undergone significant changes, so as to further analyze and monitor the changes in the event sequence. The introduction of the binomial test algorithm to detect the change significance value of the token helps to identify significant changes in token behavior and improves the accuracy and sensitivity of anomaly detection.

[0090] It should be noted that those skilled in the art can set the size of the preset number of occurrences according to actual needs, and the present invention is not limited here.

[0091] Specifically, the preset number of occurrences can be set to 50 or 100.

[0092] In a possible implementation, S6 specifically includes:

[0093] S601: Count the test results of token change types within the number of occurrences.

[0094] S602: Calculate the first change significance value of the token according to the change type test result:

[0095]

[0096]

[0097] Where T represents the first change significance value, c represents the number of consistent test results, m represents the number of occurrences, p0 represents the binomial distribution reference probability, that is, the probability of consistent test results assuming that the original token allocation is correct, and B(i|p0,m) represents the probability of observing consistent test results i times under the conditions of given m and p0. The probability that the test results are consistent occurs i times, (1-p0) m-i It indicates that the probability of inconsistent test results occurs mi times, The number of all possible combinations of selecting i elements within the number of occurrences.

[0098] It should be noted that the calculation process comprehensively considers the various changes of the tokens, and calculates the first change significance value of each token by using the binomial distribution statistical method, thereby ensuring the comprehensiveness, statistical reliability and objectivity of the evaluation results. This calculation method can not only eliminate random errors and improve the accuracy of the results, but also quantify the degree of token changes, providing strong support for subsequent processing and decision-making.

[0099] S7: Construct an event detection function to calculate the second change significance value of each token sequence.

[0100] The event detection function may be a mathematical function or algorithm, the purpose of which is to determine whether there is an abnormal or significant change based on the data features or patterns in the token sequence. The obtained second change significance value can help identify which token sequence changes are significant, thereby providing more insights into the event sequence and facilitating further anomaly detection or decision making.

[0101] In a possible implementation, the event detection function is specifically:

[0102]

[0103] Among them, EI e represents the second significant change value, π represents pi, tan -1 represents the inverse tangent function, o represents the number of event types, i represents the i-th event type, Represents the token value of the j-th token of event type e.

[0104] It should be noted that this function traverses each event type and its corresponding token value, and uses the properties of the arctangent function to convert these values into numerical values within an angular range. This angular range is defined by the pi constant π. By calculating the angles corresponding to the token values of each event type and summing them up, the final second change significance value is obtained. This calculation method can comprehensively consider the changes of each event type and its token value, so as to more accurately evaluate the occurrence and change trend of events.

[0105] Refer to the appended drawings of the specification Figure 2 , which shows a schematic structural diagram of a token detection provided by an embodiment of the present invention.

[0106] Among them, the token value can be obtained by using ordinary statistical methods or according to a token statistical function. Specifically:

[0107] The token detection function TIt takes into account the historical record of the data type adopted by the token t, as Figure 2 shown. Therefore, we define the vector:

[0108]

[0109]

[0110] Among them, n0 < n1 < n2 < n3 are natural numbers. DTt,ref is a reference vector that stores the data type dtt adopted by the token t between the update steps n0 and n1. DTt,con is a control vector that stores the data type dtt adopted by the token t between the update steps n2 and n3. Figure 2 Describes the time windows considered by these two vectors. Figure 2 The scale in represents the update step, the arrow direction represents the time window moving direction, and the time window moves forward one step in each update step. The number of update steps for configuring the calculation index can be customized, and the default value is set to 10. If the index is calculated in each update step, this will increase the false alarm rate because the index analyzes long-term behavior. The token detection function TIt takes into account the similarity between DTt,ref and DTt,con for the token t. The token detection function is specifically:

[0111]

[0112] Among them, datatypes is the set of all occurring data types. The token detection function TIt∈[0,1] returns a value close to 1 if the two vectors are not similar, which means that the probability of anomaly is high. The anomaly threshold can be specifically set to TIt=0.7. If the data type type does not appear in the reference vector DTt,ref, dtype is defined as the relative frequency of type in the vector DTt,con. If the data type type is neither discrete nor range, dtype represents the difference in relative frequencies between the vectors DTt,ref and DTt,con. If type is discrete, the relative frequency difference of discrete data types in the vectors DTt,ref and DTt,con is returned, as well as the relative frequency difference of new values ​​that have been added to the discrete distribution.

[0113] It should be noted that the event indicator EIe∈[0, 1] is built on top of the token indicator. The event indicator EIe takes into account the information of all token indicators TIt of event e. Once again, EIe values ​​close to 1 indicate abnormal system behavior. Even if the token indicators TIt of some events e are moderately high and only one TIt is significantly high, the inverse tangent function in the formula ensures that the event indicator EIe reports accurate values ​​during anomaly detection. Therefore, it can detect gradual changes in system behavior, which cannot be detected by traditional anomaly detection systems. Traditional anomaly detection methods usually consider single log lines or log lines within a specific time window, which reflect specific point events.

[0114] S8: Calculate the token impact weight based on the rule of being negatively correlated with the frequency of type change.

[0115] In a possible implementation, the token influence weight is specifically:

[0116]

[0117] Among them, IW t represents the token influence weight of token t, Indicates the token value TI t The set of tokens greater than or equal to 0.5, p represents the total number of tokens, and q represents the number of used tokens.

[0118] It should be noted that, through this calculation method, the impact weight of tokens that are used less frequently will be higher, while the impact weight of tokens that are used more frequently will be reduced accordingly. This helps to discover abnormal data with lower frequency and reduce the impact of regular data that changes frequently.

[0119] S9: Modifying the second change significance value based on the token influence weight.

[0120] It should be noted that by calculating the token influence weight and correcting the second change significance value, the influence of high index value tokens on the event index can be reduced, thereby improving the robustness and accuracy of the event index.

[0121] It should be noted that the weights of token metrics can increase the robustness of event metrics. These weights IWt ensure that tokens with generally unstable data types, i.e. tokens t that often have high token metrics, have less impact on event metrics. Only token metrics that exceed a token value greater than or equal to 0.5 are considered in the calculation. Therefore, the higher the previous token metrics, the lower their weights are, and therefore the less impact they have on the event metrics. This approach is designed to reduce the impact of tokens that often show high metric values ​​on the event metrics, in order to improve the robustness of the event metrics and better reflect changes in system behavior.

[0122] In a possible implementation, S9 specifically includes:

[0123] S901: Substitute the token influence weight into the event detection function to modify the second change significance value:

[0124]

[0125] Among them, EI e ' represents the corrected second change significance value.

[0126] This weight is calculated to adjust the impact of token metrics on event metrics. In this case, event metrics are metrics used to detect anomalies or changes, while token metrics are used to represent the stability of the data type of each token. By calculating the weight, it is possible to ensure that tokens with generally unstable data types have less impact on event metrics, thereby increasing the robustness and accuracy of event metrics.

[0127] Specifically, if a token's metric history indicates that its data type changes frequently, the weight of that token will be reduced, reducing its impact on the event metric. Conversely, if a token's metric history indicates that its data type is relatively stable, the weight of that token will be increased, increasing its impact on the event metric. This adjustment can help improve the accuracy of event metrics, making them more robust to detecting anomalies or changes in the data.

[0128] S10: When the first significance value is greater than the first preset significance value or the modified second change significance value is greater than the second preset significance value, output the token corresponding to the first significance value and the token sequence corresponding to the second change significance value.

[0129] It should be noted that if the first significance value is greater than the first preset significance value, in this case, it means that the first change of a token is determined to be statistically significant by a certain test method, that is, some abnormal or important change has occurred. If the corrected second change significance value is greater than the second preset significance value, in this case, it means that the second change significance value of the token sequence calculated by the event detection function exceeds the set threshold, that is, the impact of the change of the token sequence on the event is considered to be significant.

[0130] It should be noted that those skilled in the art can set the first preset significance value and the second preset significance value according to actual needs, and the present invention is not limited thereto.

[0131] Among them, the first preset significance value is generally 0.05, 0.01 or 0.10. The significance level represents the probability of making a type I error (rejecting a null hypothesis that is actually true) allowed in the hypothesis test. Usually, the commonly used values ​​of the significance level are 0.05, 0.01 or 0.10, but other significance levels can also be selected depending on the specific research and field. The value of the second preset significance value can be 0.6.

[0132] For example, when the significance level is 0.05, it means that the researcher is willing to accept the risk of making a Type I error in 5% of cases, that is, there is a 5% probability of rejecting a null hypothesis that is actually true. In hypothesis testing, if the calculated probability (P value) is less than or equal to 0.05, we reject the null hypothesis and accept the alternative hypothesis. If the P value is greater than 0.05, the null hypothesis cannot be rejected. When choosing a significance level, you need to consider the specific context of the study, the purpose of the study, and the relative importance you attach to Type I errors and Type II errors (accepting a null hypothesis that is actually false).

[0133] S11: Track the output tokens and token sequences, output the corresponding external devices, and sound an alarm.

[0134] Specifically, the tokens and token sequences of previously detected abnormal events are tracked to determine their paths and impact ranges in the network or system. This may involve further analysis and tracking of network traffic, log data and other information. In the process of tracing, the external devices associated with the abnormal events are determined, that is, the devices or hosts that may be involved in the illegal behavior. These external devices may be devices that initiate abnormal behavior, or devices that are attacked or affected. Once the external devices are determined, the system can issue an alarm to the relevant security personnel or system administrators according to pre-set rules or policies. Alerts can take many forms, such as sending emails, generating reports, triggering alarm notifications, etc., so that necessary countermeasures can be taken in a timely manner. Through this process, the system can detect abnormal behavior in a timely manner and take corresponding countermeasures to ensure the security of the network and system.

[0135] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0136] The present invention tokenizes the log data, that is, marks the log data, thereby improving the subsequent detection efficiency of the log data, and initializes the change type of each token in combination with a statistical test algorithm, replacing the conventional form of feature extraction, and divides the change type into time sequence, static, ascending, descending, continuous, range, unique, discrete and others. The introduction of the statistical test algorithm increases the initialization accuracy of the change type, and then combines the binomial test algorithm to evaluate the abnormality of the token and the token sequence through the change significance value of each token and the token sequence. Through the binomial test algorithm, the change of the token can be statistically analyzed to determine whether the change is significant, which can reduce the false alarm rate and improve the accuracy of abnormal detection. Based on the rule of being negatively correlated with the type change frequency, the calculated token influence weight corrects the significance of the token sequence, weakens the influence weight of the frequently changing conventional token, increases the reflection ability of the event type for the abnormal data change, better reflects the abnormal behavior of the system, and then tracks the illegal external connection device according to the abnormal data situation, completes the network inspection in an unsupervised manner, optimizes the feature extraction method, omits the acquisition of label data, further improves the detection efficiency, accuracy and feasibility of the illegal external connection device, and reduces the false alarm rate.

[0137] Reference Manual Attached Figure 3 , showing a structural schematic diagram of an asset illegal external connection detection system based on network inspection provided by the present invention.

[0138] The present invention further provides an asset illegal external connection detection system 20 based on network inspection, which is applied to the above-mentioned asset illegal external connection detection method based on network inspection, and comprises:

[0139] Processor 201;

[0140] The memory 202 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 201, the asset illegal external connection detection method based on network inspection as in the method embodiment is implemented.

[0141] The network patrol-based asset illegal external connection detection system 20 provided by the present invention can execute the above-mentioned network patrol-based asset illegal external connection detection method and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.

[0142] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0143] The present invention tokenizes the log data, that is, marks the log data, thereby improving the subsequent detection efficiency of the log data, and initializes the change type of each token in combination with a statistical test algorithm, replacing the conventional form of feature extraction, and divides the change type into time sequence, static, ascending, descending, continuous, range, unique, discrete and others. The introduction of the statistical test algorithm increases the initialization accuracy of the change type, and then combines the binomial test algorithm to evaluate the abnormality of the token and the token sequence through the change significance value of each token and the token sequence. Through the binomial test algorithm, the change of the token can be statistically analyzed to determine whether the change is significant, which can reduce the false alarm rate and improve the accuracy of abnormal detection. Based on the rule of being negatively correlated with the type change frequency, the calculated token influence weight corrects the significance of the token sequence, weakens the influence weight of the frequently changing conventional token, increases the reflection ability of the event type for the abnormal data change, better reflects the abnormal behavior of the system, and then tracks the illegal external connection device according to the abnormal data situation, completes the network inspection in an unsupervised manner, optimizes the feature extraction method, omits the acquisition of label data, further improves the detection efficiency, accuracy and feasibility of the illegal external connection device, and reduces the false alarm rate.

[0144] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0145] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0146] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When a computer instruction or computer program is loaded or executed on a computer, a process or function according to an embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0147] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0148] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0149] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0150] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0151] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0152] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0153] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0154] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0155] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0156] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a method for detecting illegal external connections of assets based on network inspection as in a method embodiment.

[0157] A computer-readable storage medium provided by the present invention can implement the steps and effects of the asset illegal external connection detection method based on network patrol of the above method embodiment. To avoid repetition, the present invention will not go into details.

[0158] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0159] The present invention tokenizes the log data, that is, marks the log data, thereby improving the subsequent detection efficiency of the log data, and initializes the change type of each token in combination with a statistical test algorithm, replacing the conventional form of feature extraction, and divides the change type into time sequence, static, ascending, descending, continuous, range, unique, discrete and others. The introduction of the statistical test algorithm increases the initialization accuracy of the change type, and then combines the binomial test algorithm to evaluate the abnormality of the token and the token sequence through the change significance value of each token and the token sequence. Through the binomial test algorithm, the change of the token can be statistically analyzed to determine whether the change is significant, which can reduce the false alarm rate and improve the accuracy of abnormal detection. Based on the rule of being negatively correlated with the type change frequency, the calculated token influence weight corrects the significance of the token sequence, weakens the influence weight of the frequently changing conventional token, increases the reflection ability of the event type for the abnormal data change, better reflects the abnormal behavior of the system, and then tracks the illegal external connection device according to the abnormal data situation, completes the network inspection in an unsupervised manner, optimizes the feature extraction method, omits the acquisition of label data, further improves the detection efficiency, accuracy and feasibility of the illegal external connection device, and reduces the false alarm rate.

[0160] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0161] Compared with the prior art, the above technical solution has at least the following beneficial effects:

[0162] In the present invention, the light and shadow of the static objects can be optimized based on the light baking technology, and the light streaming of the game animation can be optimized based on the light streaming processing technology, and the screen of the nostalgic online game can be optimized to enhance the attractiveness of the nostalgic online game to new players and enhance the market competitiveness of the nostalgic online game.

[0163] There are a few points to note:

[0164] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.

[0165] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.

[0166] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0167] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for detecting illegal external connections of assets based on network inspection, characterized in that: include: S1: Collecting log data of a device to be detected, wherein the log data includes a plurality of log lines; S2: Perform preprocessing including standardization and deduplication on each log line; S3: assigning an event type to each preprocessed log line and decomposing each log line into multiple tokens, wherein the tokens are concatenated into a token sequence according to the corresponding log lines, wherein the tokens include words, numbers, and symbols; S4: Initializing the change type of each token in combination with the statistical inspection algorithm, wherein the change type includes time sequence, static, ascending, descending, continuous, range, unique, discrete and others; S5: Count the number of occurrences of the event type; S6: When the number of occurrences is greater than a preset number of occurrences, a binomial test algorithm is introduced to detect a first change significance value of each token; S7: construct an event detection function to calculate the second change significance value of each token sequence; S8: Calculate the token influence weight based on the rule of negative correlation with the frequency of type change; S9: modifying the second change significance value based on the token influence weight; S10: when the first change significance value is greater than a first preset significance value or the modified second change significance value is greater than a second preset significance value, outputting a token corresponding to the first change significance value and a token sequence corresponding to the second change significance value; S11: Track the output tokens and token sequences, output the corresponding external devices, and issue an alarm; Wherein, the S6 specifically includes: S601: Counting the test results of the token change type within the number of occurrences; S602: Calculate the first change significance value of the token according to the change type test result: Wherein, T represents the first change significance value, c represents the number of consistent test results, m represents the number of occurrences, p0 represents the binomial distribution reference probability, i.e., the probability of consistent test results assuming that the original token allocation is correct, B(i|p0,m) represents the probability of observing consistent test results i times under the conditions of given m and p0, The probability that the test results are consistent occurs i times, (1-p0) m-i It indicates that the probability of inconsistent test results occurs mi times, The number of all possible combinations of selecting i elements within the stated number of occurrences; The event detection function is specifically: Among them, EI e represents the second significant change value, π represents pi, tan -1 represents the inverse tangent function, o represents the number of event types, i represents the i-th event type, The token value representing the jth token of event type e; The token influence weight is specifically: Among them, IW t represents the token influence weight of token t, Indicates the token value TI t The set of tokens greater than or equal to 0.5, p represents the total number of tokens, and q represents the number of used tokens.

2. The method for detecting illegal external connections of assets based on network inspection according to claim 1 is characterized in that: The S4 specifically includes: S401: Acquire multiple observation values ​​of the token; S402: Determine whether the observed values ​​of the token all have a time structure value. If so, set the change type of the token to time sequence and proceed to S409. Otherwise, proceed to S403, wherein the time structure is specifically: [bd HH:MM:SS] Among them, b represents the name of the month, d represents the day, HH represents the hour, MM represents the minute, and SS represents the second; S403: When all the observed values ​​are the same, the change type of the token is set to static; S404: Determine whether the token is numerical data composed of numbers, if so, proceed to S405, otherwise, proceed to S406; S405: When the observed value satisfies the ascending rule, the change type of the token is set to ascending order; when the observed value satisfies the descending rule, the change type of the token is set to descending order. The ascending rule and the descending rule are respectively: Ascending rule: v t,1 ≤v t,2 ≤…≤v t,n Descending rule: v t,1 ≥v t,2 ≥…≥v t,n Among them, v t,i , i = 1, 2, ..., n represents the value of token t in the token sequence in the i-th observation, and n represents the maximum number of observations; S406: Set the continuity judgment conditions, where the continuity judgment conditions include a first continuity judgment condition and a second continuity judgment condition. The first continuity judgment condition is that the token is an integer or a floating point number, and the second continuity judgment condition is that the ratio of the number of different values of the token to the maximum number of observations is less than a preset ratio: Among them, V t represents the number of different values ​​of the token, and τ represents the preset ratio; S407: Determine whether the token is independent through the Durbin-Watson statistic. The calculation method of the Durbin-Watson statistic is: Where, d represents the Durbin-Watson statistic, v t,i-1 represents the value of token t in the token sequence at the i-1th observation; S408: When the token meets the continuity judgment conditions but is not independent, set the change type of the token to the range [a, b], where a and b represent the upper and lower limits of the range respectively; S409: When the values of the token are all different, set the change type of the token to unique; S410: When the token meets the second continuity judgment condition, set the change type of the token to discrete; otherwise, set the change type of the token to other.

3. The asset illegal external connection detection method based on network inspection according to claim 2 is characterized in that: The determination of whether the token is independent through the Durbin-Watson statistic is specifically: When the value of the Durbin-Watson statistic meets the positive correlation condition or the negative correlation condition, determine that the token is related to other tokens; otherwise, determine that the token is independent: The positive correlation condition is: d < d0, where d0 represents the correlation critical value; The negative correlation condition is: (4 - d) < d0.

4. The method for detecting illegal external connections of assets based on network inspection according to claim 2 is characterized in that: The specific range [a, b] is: a=min(v t,i )-c(max(v t,i )-min(v t,i )) b=max(v t,i )-c(max(v t,i )-min(v t,i )) where max represents taking the maximum value, min represents taking the minimum value, and c ∈ [0, ∞) represents an adjustable scale coefficient.

5. The method for detecting illegal external connections of assets based on network inspection according to claim 1 is characterized in that: The specific content of S9 is: S901: Substitute the token influence weight into the event detection function to correct the second change significance value: Among them, EI e ' represents the corrected second change significance value.

6. A network inspection-based asset illegal external connection detection system, characterized in that: including: a processor; a memory, on which computer-readable instructions are stored. When the computer-readable instructions are executed by the processor, the asset illegal external connection detection method based on network patrol as described in any one of claims 1 to 5 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the asset illegal external connection detection method based on network patrol as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Data log stream processing using probabilistic data structures

    US10853359B1

  • KR20230114157A