Log anomaly test method and device and storage medium

By obtaining communication test model information and detection time period, determining log identification information, querying communication equipment to obtain target log information, and identifying assertion content to determine abnormalities, the problem of low log analysis efficiency in the existing technology is solved, and rapid positioning and high efficiency are achieved anomaly detection.

CN118573548APending Publication Date: 2024-08-30GUANGDONG STARTHING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410877958.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The log analysis method in the existing technology is inefficient and difficult to detect communication system abnormalities in time, resulting in continuous consumption of communication equipment performance monitoring resources and low efficiency of analysis and testing.

Method used

By obtaining the communication test model information and detection time period, determine the log identification information, query the communication device to obtain the target log information, identify the assertion content to determine whether there is an abnormality, generate abnormal information, and filter out irrelevant logs to improve processing efficiency.

Benefits of technology

It achieves rapid location of anomalies, improves log analysis efficiency, reduces data processing volume, and can detect communication system anomalies in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118573548A
    Figure CN118573548A
Patent Text Reader

Abstract

The invention provides a log exception test method and device and a storage medium, and relates to the technical field of log processing, the method comprises the following steps: obtaining communication test model information and a detection time period, the communication test model information representing model information used for testing a communication process; determining log identification information according to the communication test model information; querying the communication equipment to obtain target log information according to the log identification information and the detection time period; according to the target log information, assertion content is identified and obtained, and the assertion content represents whether the test result is the same as the expectation; and when the assertion content is that the test result is different from the expectation, determining that an exception exists, and generating corresponding first exception information. The target log information is obtained by querying the log identification information and the detection time period, irrelevant logs are screened out, the data processing amount is reduced, the processing efficiency is improved, meanwhile, whether abnormity exists or not is quickly judged by recognizing assertion content in the target log information, and the abnormity testing efficiency is further 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 log processing, and in particular to a log anomaly testing method, device and storage medium. Background Art

[0002] The communication system generally includes multiple distributed communication devices. When carrying out the communication service process, it is necessary to call the communication service modules in different communication devices to complete the communication service. The stability and reliability of the communication system is the basis for the normal operation of the communication service, so it is necessary to promptly discover the abnormal conditions and problems in the communication system.

[0003] In the prior art, anomalies can be discovered by real-time monitoring of the performance of communication equipment, or by testing whether there are abnormal logs through log analysis to confirm whether the communication equipment is normal. However, the real-time performance monitoring method requires continuous consumption of monitoring resources, and the existing log testing method has the problem of low analysis and testing efficiency, especially for the entire communication system, each communication device will generate log data in the communication service process, and the overall log data volume is large. The efficiency of the existing log analysis method is difficult to meet the needs of timely detection of communication system anomalies. Summary of the invention

[0004] The present invention provides a log anomaly testing method, device and storage medium, which are used to solve the defect of low efficiency in the prior art of analyzing the logs of a communication system to test whether there is an anomaly.

[0005] The present invention provides a log anomaly testing method, comprising: Acquire communication test model information and a detection time period, wherein the communication test model information represents model information used to test a communication process; Determining log identification information according to the communication test model information; According to the log identification information and the detection time period, query the communication device to obtain target log information; According to the target log information, identify and obtain assertion content, where the assertion content indicates whether the test result is the same as expected; When the assertion content is that the test result is different from the expectation, it is determined that an exception exists and corresponding first exception information is generated.

[0006] According to a log anomaly testing method provided by the present invention, the log identification information includes at least two log identifications; querying the communication device to obtain target log information according to the log identification information and the detection time period includes: Selecting the log identifiers in the log identifier information in sequence as processing identifiers; The processing identifier and the processing time period are combined to form a query condition, wherein an initial value of the processing time period is equal to the detection time period; Delaying the processing time period by a preset time value to form a new processing time period, selecting the next log identifier in the log identifier information as the new processing identifier, until all the log identifiers are traversed; According to each of the query conditions, the communication device is queried to obtain target log information.

[0007] According to a log anomaly testing method provided by the present invention, querying a communication device to obtain target log information according to each query condition includes: According to each of the query conditions, query the communication device to obtain a log call chain identifier and a corresponding device identifier, wherein the log call chain identifier represents a generation source of the log; Aggregating the log call chain identifiers of different communication devices and performing deduplication processing to remove duplicate log call chain identifiers to form a first call chain identifier set; According to the device identifier, the first call chain identifier set is grouped to form a second call chain identifier set corresponding to the communication device; According to the second call chain identifier set, query the corresponding communication device to obtain target log information.

[0008] According to a log anomaly testing method provided by the present invention, the log identification information includes at least two log identifications; after querying the communication device to obtain target log information according to the log identification information and the detection time period, the method further includes: Generate at least one set of log identification combinations according to the log identification information, wherein the identification combination is formed by sorting the two log identifications; Determine whether the target log information contains the log identification combination, and if the log identification combination exists, determine the time intervals corresponding to the two log identifications; When the time interval is greater than a preset time threshold, it is determined that an abnormality exists, and second abnormality information corresponding to the corresponding log identifier combination is generated.

[0009] According to a log anomaly testing method provided by the present invention, generating at least one set of log identification combinations according to the log identification information includes: Generate a log identification sequence according to the log identification information; According to the log identifier sequence, every two adjacent log identifiers generate a group of log identifier combinations.

[0010] According to a log anomaly testing method provided by the present invention, the obtaining of communication test model information and detection time period includes: Get scheduled task information; Determine task feature information and a first time period according to the scheduled task information; According to the task characteristic information, a communication test model identifier is determined to acquire communication test model information, and according to the first time period, a detection time period is determined.

[0011] According to a log anomaly testing method provided by the present invention, the obtaining of communication test model information and detection time period includes: Get the input device number and the second time period; Acquire device characteristic information according to the device number, and determine a detection time period according to the second time period; According to the device characteristic information, a communication test model identifier is queried to obtain communication test model information.

[0012] According to a log anomaly testing method provided by the present invention, before acquiring the communication test model information and the detection time period, the method further includes: Get the communication test model; Running the communication test model to call a communication service module of a communication device, so that the communication module generates log information; The communication test model corresponds to the communication test model information.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a log anomaly testing method as described in any one of the above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, a log anomaly testing method as described in any one of the above is implemented.

[0015] The present invention provides a log anomaly testing method, device and storage medium, which have at least the following beneficial effects: the communication test model tests the communication process, so that the corresponding target log information is generated in the communication device. According to the acquired communication test model information, the log identification information carried in the target log information generated by the communication test model is determined, and based on the log identification information and the detection time period, each communication device is queried to accurately obtain the target log information with log identification information generated within the specified detection period. The target log information is identified and processed, and the assertion content therein is obtained. Based on the assertion content, it is determined whether there is an abnormality, and when there is an abnormality, the corresponding first abnormality information is generated, which is convenient for quickly locating the abnormality. In this way, the target log information is obtained by querying the log identification information and the detection time period, and irrelevant logs are screened out to reduce the amount of data processing, which is conducive to improving the processing efficiency. At the same time, by identifying the assertion content in the target log information, it is quickly determined whether there is an abnormality, which is conducive to further improving the efficiency of abnormal testing. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1 This is one of the flow charts of a log anomaly testing method provided by the present invention.

[0018] Figure 2 This is the second flow chart of a log anomaly testing method provided by the present invention.

[0019] Figure 3 This is the third flow chart of a log anomaly testing method provided by the present invention.

[0020] Figure 4 This is the fourth flow chart of a log anomaly testing method provided by the present invention.

[0021] Figure 5 This is the fifth flow chart of a log anomaly testing method provided by the present invention.

[0022] Figure 6 This is the sixth flow chart of a log anomaly testing method provided by the present invention.

[0023] Figure 7 This is the seventh flow chart of a log anomaly testing method provided by the present invention.

[0024] Figure 8This is the eighth flow chart of a log anomaly testing method provided by the present invention.

[0025] Fig. 9 A log anomaly testing method provided by the present invention is a signaling diagram in which one embodiment uses a timed task method.

[0026] Fig.10 A log anomaly testing method provided by the present invention is a signaling diagram in which one embodiment uses an active query method.

[0027] Fig.11 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] Combine the following Figure 1-Figure 10 A log anomaly testing method of the present invention is described, comprising: S100: Acquire communication test model information and a detection time period, wherein the communication test model information represents model information used to test a communication process; S200: Determine log identification information according to the communication test model information; S300: querying a communication device to obtain target log information according to the log identification information and the detection time period; S400: Identify and obtain assertion content according to the target log information, where the assertion content indicates whether the test result is the same as expected; S500: When the assertion content is that the test result is different from the expectation, it is determined that an exception exists and corresponding first exception information is generated.

[0030] The communication test model tests the communication process and generates corresponding target log information in the communication device. According to the acquired communication test model information, the log identification information contained in the target log information generated by the communication test model is determined. Based on the log identification information and the detection time period, each communication device is queried to accurately obtain the target log information with log identification information generated within the specified detection period. The target log information is identified and processed, and the assertion content therein is obtained. Based on the assertion content, it is determined whether there is an abnormality, and when there is an abnormality, the corresponding first abnormality information is generated, so as to facilitate the rapid location of the abnormality. In this way, the target log information is obtained by querying the log identification information and the detection time period, and irrelevant logs are filtered out to reduce the amount of data processing, which is conducive to improving processing efficiency. At the same time, by identifying the assertion content in the target log information, it is quickly determined whether there is an abnormality, which is conducive to further improving the efficiency of abnormality testing.

[0031] The communication test model is used to test the communication process of the communication system, and the communication test model information represents the relevant information of the communication test model, which is convenient for distinguishing different communication test models. It is understandable that the communication system provides different communication services. In order to test different communication services, there can be multiple types of communication test models to test different communication service functions. The operation process of different communication test models is different, and the communication service modules in the communication equipment may also be called differently, and the logs generated are also different. Therefore, according to the log identification information corresponding to the communication test model, the corresponding target log information can be queried, thereby filtering out irrelevant logs and reducing the amount of data processing.

[0032] The log identification information refers to the characteristic content in the log, which can be a specific statement, such as "start device information downlink", "end device information downlink", or a specific numerical code, such as "0Xaa0000169390", etc. It can be understood that the log identification information can be multiple log identifications, depending on the call flow of the functional module of the corresponding communication test model during the test process, that is, the log identification information corresponding to some communication test models may include multiple log identifications, and the log identification information corresponding to some communication test models may only include one log identification.

[0033] In some embodiments of the present invention, the target log information acquired by the communication device is queried according to the log identification information and the detection time period, which may specifically be an implementation method of querying the SelectDB log.

[0034] Assertion is used to verify whether the running status of the program meets expectations. By inserting assertion statements in the code, errors can be discovered and located. When the communication test model is running for communication testing, the log generated by the communication device can include assertion content during the process of calling the communication service module of the communication device.

[0035] refer to Figure 2 In some embodiments of a log routine test method of the present invention, the log identification information includes at least two log identifications; S300 includes: S310: sequentially selecting the log identifiers in the log identifier information as processing identifiers; S320: combining the processing identifier and the processing time period to form a query condition, wherein the initial value of the processing time period is equal to the detection time period; S330: delaying the processing time period by a preset time value to form a new processing time period, selecting the next log identifier in the log identifier information as the new processing identifier, until all the log identifiers are traversed; S340: According to each of the query conditions, query the communication device to obtain target log information.

[0036] When the log identification information includes at least two log identifications, a query condition is generated for each log identification to ensure the integrity of the query log. Since the communication test model needs to have a certain running time when calling the communication service module of the communication device to run, when there are multiple log identifications, it means that the process of calling the communication service module to run may be more complicated, and the corresponding running time will also be appropriately extended. Therefore, when generating query conditions for each log identification, as the order of the processing identification increases, the corresponding processing time period also corresponds to the delay preset time value, that is, the log identifications in the log identification information are used as processing identifications one by one, and the initial value of the processing time period is set according to the detection time period. A query condition is generated according to the processing identification and the initial time period, and then the next log identification is selected as the processing identification and the processing time period is extended by the preset time value to generate the next query condition, and the corresponding query conditions are generated in this way until all log identifications have generated corresponding query conditions. According to each query condition, the communication device is queried to obtain the target log information, so that the integrity of the query based on the log identification can be guaranteed, the target log information can be avoided from being missed, and the reliability can be improved.

[0037] In order to facilitate the understanding of the query condition generation process, an example is given for illustration. If the log identification information includes log identification A, log identification B, and log identification C, the detection time period is T, and the preset time value is T0, then the first query condition is generated according to A and T, the second query condition is generated according to B and T+T0, and the third query condition is generated according to C and T+2T0. The preset values ​​can be set according to the actual application situation, and are determined based on the complexity of the process of calling the communication service module to run the communication test model.

[0038] It can be understood that the log identifiers included in the log identifier information are arranged in the order of generation.

[0039] refer to Figure 3 In some embodiments of a log daily testing method of the present invention, the S340 includes: S341: query the communication device to obtain a log call chain identifier and a corresponding device identifier according to each of the query conditions, wherein the log call chain identifier represents a source of the log; S342: Collecting the log call chain identifiers of different communication devices and performing deduplication processing to remove duplicate log call chain identifiers to form a first call chain identifier set; S343: grouping the first call chain identifier set according to the device identifier to form a second call chain identifier set corresponding to the communication device; S344: According to the second call chain identifier set, query the corresponding communication device to obtain target log information.

[0040] In a communication system, since the operation process of a communication service may require calling communication service modules in multiple communication devices, that is, the operation process of the same communication service will generate logs in different communication devices, the logs generated by the same communication service call will include a call chain identifier to facilitate confirmation of the source of the log.

[0041] According to each query condition, the corresponding call chain identifier and the corresponding device identifier are queried respectively, and deduplication processing is performed based on the call chain identifier to clean up the duplicate content to form a first call chain identifier set, which is conducive to reducing the performance consumption of subsequent queries. Then, the first call chain identifier set is grouped based on the device identifier corresponding to the call chain identifier to form a second call chain identifier set corresponding to the communication device, and then the second call chain identifier set is used to query the corresponding communication device to obtain the target log information in the communication device. After each second call chain identifier set queries the communication device respectively, all target log information is obtained in aggregate. In this way, by obtaining the call chain identifier and the device identifier for deduplication processing and grouping processing, there is no need to obtain the complete log for processing, which is conducive to reducing the amount of data processed. At the same time, the second call chain identifier set formed by the grouping is queried to the corresponding communication device, which can avoid using the same query condition group for all communication devices, and prevent the same query condition group from querying the communication device. There may be invalid query conditions, resulting in invalid queries, which is conducive to improving the efficiency of the query.

[0042] In some embodiments of the present invention, the call chain identifier may be TraceID or the like.

[0043] refer to Figure 4In some embodiments of a log routine test method of the present invention, the log identification information includes at least two log identifications; after S300, it also includes: S600: generating at least one group of log identification combinations according to the log identification information, wherein the identification combination is formed by sorting the two log identifications; S610: Determine whether the target log information contains the log identification combination, and if the log identification combination exists, determine the time intervals corresponding to the two log identifications; S620: When the time interval is greater than a preset time threshold, determine that an abnormality exists, and generate second abnormality information corresponding to the corresponding log identifier combination.

[0044] In the case where the log identification information includes at least two log identifications, the time interval generated based on the log identification can indirectly reflect the execution process of calling the communication service module. By generating a log identification combination, and judging whether the time interval corresponding to the log identification combination is greater than the preset time threshold, when the time interval is greater than the preset time threshold, it means that during the execution process of calling the communication service module, after generating the first log identification in the log identification combination, communication failures, communication delays, communication disconnections and other anomalies may be encountered, resulting in the generation time interval of the second log identification being too long, and it can be determined that there is an anomaly, and the corresponding second anomaly information is generated based on the log identification combination. In this way, it is determined whether there is an anomaly based on the time interval of the log identification, and the judgment process is concise and can accurately find the anomaly in the calling execution process, and combined with the judgment of the assertion content to form a dual anomaly detection, which is conducive to further improving the reliability of the anomaly test.

[0045] It should be noted that the numbers SXXX and so on are only for the convenience of distinction. In addition to the clear description of the steps, such as S600, S610, and S620 are included after S300, and the obvious logical order, the order of the steps is not limited. For example, S600 is after S300, and S400 is also after S300, but it can actually be executed before S400.

[0046] refer to Figure 5 In some embodiments of a log daily test method of the present invention, the S600 includes: S601: Generate a log identification sequence according to the log identification information; S602: According to the log identifier sequence, each two adjacent log identifiers generate a group of log identifier combinations.

[0047] The log identifiers contained in the log identifier information have an order of existence, and a log identifier sequence is generated based on this, and then a corresponding set of log identifier combinations is generated based on each two adjacent log identifiers. In this way, the log identifier combination is formed according to the order in which the log identifiers are generated, so as to avoid combining two log identifiers with a large time interval span, reduce the difference in normal time intervals corresponding to different log identifier combinations, and facilitate setting the preset time threshold.

[0048] refer to Figure 6 and Fig. 9 In some embodiments of a log daily testing method of the present invention, the S100 includes: S111: Obtaining scheduled task information; S112: Determine task feature information and a first time period according to the scheduled task information; S113: Determine a communication test model identifier according to the task feature information to obtain communication test model information, and determine a detection time period according to the first time period.

[0049] As a test embodiment, it can be carried out by establishing a scheduled task. When the scheduled task is triggered, the pre-entered task feature information and the first time period are obtained according to the scheduled task information, and then the communication test model information is determined according to the task feature information, and the detection time period is determined according to the first time period. In this way, through the scheduled task method, log anomaly tests can be performed regularly to detect anomalies in a timely manner, so as to achieve the effect of continuously monitoring a certain communication service module.

[0050] In some embodiments of the present invention, the task characteristic information may include information such as device type, protocol, firmware version number, login identification, business version identification, etc., to determine the corresponding communication test model information. The first time period may be a relative time period, and the detection time period is determined according to the actual execution date and time of the scheduled task. For example, the first time period is 00:00 to 12:00, and the detection time period determined accordingly is: 00:00 to 12:00 on x month y day.

[0051] refer to Figure 7 and Fig.10 In some embodiments of a log daily testing method of the present invention, the S100 includes: S121: Obtaining the input device number and the second time period; S122: Acquire device feature information according to the device number, and determine a detection time period according to the second time period; S123: According to the device characteristic information, query the communication test model identifier to obtain communication test model information.

[0052] As another test embodiment, by obtaining the input device number and the second time period, the corresponding device feature information is obtained according to the device number, and then the communication test model is determined according to the device feature information, and the detection time period is determined according to the second time period. In this way, the log anomaly test is performed by actively inputting the query to meet the anomaly detection requirements.

[0053] refer to Figure 8 In some embodiments of a log daily test method of the present invention, before S100, it also includes: S010: Obtain a communication test model; S020: running the communication test model to call a communication service module of a communication device, so that the communication module generates log information; The communication test model corresponds to the communication test model information.

[0054] By acquiring and running the communication test model, the communication test model calls the communication service module of the communication device to execute the specified communication service, and in this process, the corresponding log information is generated in the communication device. Subsequently, the communication test model information corresponding to the communication test model is acquired to query the communication device to obtain the corresponding target log information, and then the abnormality is determined by the combination of log identifiers and the identification of assertion content, so as to achieve the effect of abnormality detection of the communication system.

[0055] The log information includes communication business model information, call chain identification information, device identification information, and record content information.

[0056] Fig.11 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.11 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the above-mentioned log anomaly test method.

[0057] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0058] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute a log anomaly testing method provided by the above methods.

[0059] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0060] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0061] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0062] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0063] All actions to obtain signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.

[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A log anomaly testing method, characterized in that: include: Acquire communication test model information and a detection time period, wherein the communication test model information represents model information used to test a communication process; Determining log identification information according to the communication test model information; According to the log identification information and the detection time period, query the communication device to obtain target log information; According to the target log information, identify and obtain assertion content, where the assertion content indicates whether the test result is the same as expected; When the assertion content is that the test result is different from the expectation, it is determined that an exception exists and corresponding first exception information is generated.

2. A log anomaly testing method according to claim 1, characterized in that: The log identification information includes at least two log identifications; querying the communication device to obtain target log information according to the log identification information and the detection time period includes: Selecting the log identifiers in the log identifier information in sequence as processing identifiers; The processing identifier and the processing time period are combined to form a query condition, wherein an initial value of the processing time period is equal to the detection time period; Delaying the processing time period by a preset time value to form a new processing time period, selecting the next log identifier in the log identifier information as the new processing identifier, until all the log identifiers are traversed; According to each of the query conditions, the communication device is queried to obtain target log information.

3. A log anomaly testing method according to claim 2, characterized in that: The querying of the communication device to obtain target log information according to each of the query conditions includes: According to each of the query conditions, query the communication device to obtain a log call chain identifier and a corresponding device identifier, wherein the log call chain identifier represents a generation source of the log; Aggregating the log call chain identifiers of different communication devices and performing deduplication processing to remove duplicate log call chain identifiers to form a first call chain identifier set; According to the device identifier, the first call chain identifier set is grouped to form a second call chain identifier set corresponding to the communication device; According to the second call chain identifier set, query the corresponding communication device to obtain target log information.

4. A log anomaly testing method according to claim 1, characterized in that: The log identification information includes at least two log identifications; After querying the communication device to obtain target log information according to the log identification information and the detection time period, the method further includes: Generate at least one set of log identification combinations according to the log identification information, wherein the identification combination is formed by sorting the two log identifications; Determine whether the target log information contains the log identification combination, and if the log identification combination exists, determine the time intervals corresponding to the two log identifications; When the time interval is greater than a preset time threshold, it is determined that an abnormality exists, and second abnormality information corresponding to the corresponding log identifier combination is generated.

5. A log anomaly testing method according to claim 4, characterized in that: The step of generating at least one set of log identification combinations according to the log identification information includes: Generate a log identification sequence according to the log identification information; According to the log identifier sequence, every two adjacent log identifiers generate a group of log identifier combinations.

6. A log anomaly testing method according to claim 1, characterized in that: The obtaining of the communication test model information and the detection time period includes: Get scheduled task information; Determine task feature information and a first time period according to the scheduled task information; According to the task characteristic information, a communication test model identifier is determined to acquire communication test model information, and according to the first time period, a detection time period is determined.

7. A log anomaly testing method according to claim 1, characterized in that: The obtaining of the communication test model information and the detection time period includes: Get the input device number and the second time period; Acquire device characteristic information according to the device number, and determine a detection time period according to the second time period; According to the device characteristic information, a communication test model identifier is queried to obtain communication test model information.

8. A log anomaly testing method according to claim 1, characterized in that: Before acquiring the communication test model information and the detection time period, the method further includes: Get the communication test model; Running the communication test model to call a communication service module of a communication device, so that the communication module generates log information; The communication test model corresponds to the communication test model information.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, a log anomaly testing method as described in any one of claims 1 to 8 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a log anomaly testing method as described in any one of claims 1 to 8 is implemented.