Distributed automatic service dial testing method and apparatus
By configuring dialing information and performing dialing tasks, analyzing and performing consistency verification with expected results, the problem of failure to detect abnormalities in a timely manner in the docking scenario of multi-distributed system service interfaces in complex network environments is solved, and efficient abnormal detection and alarms are achieved, which improves the stability and service quality of the system.
Patent Information
- Application Number
- PCT/CN2024/138149
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-12
- Filing Date
- 2024-12-10
- Publication Date
- 2025-06-19
AI Technical Summary
In complex network environments, in the docking scenario of multi-distributed system service interface, it is impossible to detect abnormal service of the docking system in a timely manner, especially when the interface access is normal but the return result is not as expected, resulting in poor service quality.
It provides a distributed service automatic dialing method, which performs dialing tasks by configuring dialing information, obtains and parses the dialing return content, conducts consistency with the expected results, and issues dialing alarm notifications based on the alarm strategy.
It realizes timely discovering interface abnormalities in complex network environments, improves system stability and reliability, promptly detects and handles abnormal situations, and improves service quality.
Smart Images

Figure CN2024138149_19062025_PF_FP_ABST
Abstract
Description
A method and device for automatic dialing test of distributed services
[0001] This application claims priority to Chinese patent application number CN202311702658.2, filed on December 12, 2023, entitled “A method and device for automatic dialing of distributed services,” the entire text of which is hereby incorporated by reference. Technical Field
[0002] The present invention relates to the technical field of IT and software development, and in particular to a method and device for automatic dialing of distributed services. Background Art
[0003] Tianyi Cloud's self-developed console provides users with the ability to activate and manage cloud resources through self-service. It connects to many distributed service systems, such as Tianyi Cloud's SSO to achieve single sign-on for users, Tianyi Cloud's BSS system to implement order billing, and PAAS platform to provide a rich variety of PAAS products. The more systems are connected, the more interfaces will be involved. How to complete the interface dialing test of each system, ensure the interface availability, and improve the user experience is an urgent problem before us. At the same time, the dialing test also needs to consider how to verify the correctness of the content returned by the interface to obtain the expected return results. Since the networks between different systems are not the same, the network complexity increases the difficulty of interface dialing.
[0004] Patent CN114760235A discloses a method and apparatus, storage medium, and electronic device for executing a dialing test task, relating to the field of smart home technology. The method comprises: obtaining a dialing test task to be executed, transmitted by a first device, wherein the dialing test task includes a first device identifier and task information of the first device; searching a preset database for a second device identifier corresponding to the first device identifier based on the first device identifier; searching a preset database for configuration information of the second device based on the second device identifier and task information; generating a dialing test instruction based on the second device configuration information; and sending a dialing test instruction to the second device based on the second device identifier, instructing the second device to execute the dialing test task. This patent focuses on the second device executing the task through the first device identifying the task, but does not address the current issue of verifying the correctness of the content returned by the verification interface.
[0005] Patent CN114584760A discloses a media asset dialing test method and related equipment. The present invention provides a media asset dialing test method and related equipment, applied to a computer. The method comprises: obtaining a dialing test task, wherein the dialing test task is configured with dialing test parameters corresponding to a target media asset, the dialing test parameters including dialing test platform information, the dialing test platform information being used to indicate dialing the target media asset on at least one target dialing test platform; establishing a connection with each target dialing test platform based on the dialing test platform information; and performing a dialing test on the target media asset on each target dialing test platform according to the dialing test parameters, obtaining a dialing test result corresponding to the target dialing test platform. This patent focuses on media asset system dialing and simulates page jumps, and does not address the current issue of verifying the correctness of content returned by the interface.
[0006] To summarize, in the scenario of interconnecting service interfaces of multiple distributed systems in a complex network, timely detection of system service anomalies requires not only user awareness through mechanisms such as circuit breakers, but also alarm notifications through dial testing. This is especially true in scenarios where interface access is normal but the return results are lower than expected, as well as in complex network environments. Summary of the Invention
[0007] The purpose of the present invention is to provide a method and device for automatic dialing of distributed services to solve the problem existing in the above-mentioned background technology, that is, in a scenario where multiple distributed system service interfaces are connected in a complex network environment, it is impossible to timely detect abnormalities in the docking system services, especially in a scenario where the interface access is normal but the returned results are not as expected, resulting in poor service quality in the scenario where multiple system interfaces are connected in a complex network environment.
[0008] On the one hand, an embodiment of the present invention provides a method for automatic dialing of a distributed service, comprising:
[0009] Configure the dial test information and perform the dial test task according to the configured dial test information;
[0010] Obtaining the dial test return content during the execution of the dial test task, and parsing the dial test return content to obtain a parsing result of the dial test return content according to the dial test return content;
[0011] Performing consistency verification between the parsing result of the content returned by the dial test and the expected result of the content returned by the dial test, wherein:
[0012] If the parsing result of the content returned by the dial test is consistent with the expected result of the content returned by the dial test, the parsing result of the content returned by the dial test is stored;
[0013] If the parsing result of the content returned by the dial test is inconsistent with the expected result of the content returned by the dial test, the parsing result of the content returned by the dial test is stored, and the parsing result of the content returned by the dial test is re-verified for consistency with the expected result of the content returned by the dial test according to the alarm policy configuration conditions, wherein:
[0014] If the parsing result of the content returned by the dial test is inconsistent with the expected result of the content returned by the dial test, and the consistency verification reaches a preset number of times, a dial test alarm notification is issued.
[0015] Optionally, in the above embodiment, the collected dial test results can be input into the machine learning model for model prediction, and the dial test frequency can be increased during the period when the dial test alarm may occur to improve the accuracy of the dial test alarm, or the dial test frequency can be reduced during the period without alarms to reduce resource consumption.
[0016] Furthermore, when configuring the dial test information, include:
[0017] Configuring the type of dial test, the authentication method of the dial test, the rules of the dial test, and the tasks of the dial test;
[0018] The parsing engine, the dial test result comparison method and the task executor are configured.
[0019] Optionally, the dial test type supports HTTP / HTTPS request mode, which can be extended to dial tests of services such as DNS and FTP.
[0020] Optionally, the authentication method of the dial test includes: supporting username / password authentication and ak / sk authentication, and can be expanded and adapted to support more authentication methods.
[0021] Optionally, the dialing rules include: dialing address, dialing service name, network segment, whether the rule is effective, timeout period, creator, request header, request type, authentication method, request content, expected return code, expected return result, number of retries, alarm group, dialing frequency, remarks, etc.
[0022] Optionally, the dial test task includes: task number, task name, task status, dial test rule corresponding to the task, task start time, task end time, dial test return status code, dial test return content, number of retries, and maximum number of retries.
[0023] Optionally, a parsing engine refers to a script or code snippet that parses the returned results. The required field content can be parsed from the returned content such as HTML, XML, JSON, or plain text. The parsing results can be used to match the expected results.
[0024] Optionally, if the dial test result comparison method is not configured, it is set to the default dial test task comparison method. The default method is that the status is equal to the expected status code, and the return result is equal to the expected return result. If the expected return result is set to empty, the status code is equal, which means that the dial test result is consistent with the expectation; complex dial test result comparison can be parsed and compared through scripts, and the return content can be parsed, and the expected result field or content can be obtained through the parsing engine, and compared with the set expected result.
[0025] Optionally, the task executor is configured in different network environments, with at least three executors configured in each network environment. The executor needs to be able to access the dialing center, send heartbeat requests, obtain dialing tasks, and return dialing results.
[0026] Furthermore, when executing the dial test task according to the configured dial test information, the process includes:
[0027] Obtain the task type of the online task executor and the task information of the dial test;
[0028] Extracting the type of the dial test task from the task information of the dial test;
[0029] Acquire the configured execution strategy of the dial test task, and match the dial test task with the online task executor based on the type of the dial test task according to the execution strategy of the dial test task;
[0030] Dispatching the dial test task to the online task executor that successfully matches the dial test task according to the matching result, and controlling the task executor to perform the dial test task;
[0031] Obtain the dialing test result of the task executor and return the dialing test result to the dialing test platform.
[0032] Furthermore, when obtaining the dial test return content during the execution of the dial test task and parsing the dial test return content to obtain a parsing result of the dial test return content according to the dial test return content, the method includes:
[0033] Creating a hash of the dialing test result string for the dialing test result returned to the dialing test platform;
[0034] Construct a string hash of the expected result and the actual result, and perform a consistency verification between the established string hash of the dialing result and the constructed string hash of the expected result and the actual result according to an equivalent formula to obtain a result.
[0035] Furthermore, when creating a hash of the dial test result string for the dial test result returned to the dial test platform, the method includes:
[0036] Given a returned dial test result: S, the type is a string, S consists of characters S = s1s2s3...sn, for each si is a letter, given idx(si) = ascii(si) + 1, where ascii(si) represents the ASCII code value of the letter si;
[0037] The characteristics of the dialing test result being limited in length and small in variation are obtained, and a natural overflow method is used to construct a hash of the dialing test result string, wherein the hash function of the dialing test result string is: H[i]=(H[i-1]*Base+idx(si))%MOD, where H represents the hash function and H[i] represents the hash value of the [0-i] string.
[0038] Furthermore, when constructing the string hash of the expected result and the actual result, include:
[0039] Get the string hash value of the returned dial test result S=s1s2s3...sn, hash[i], i∈[0,n], the actual result is its substring, set to S=sls2s3...sr, where l is the starting position and r is the ending position. For the hash value, MOD is required;
[0040] Calculate the hash value of the actual return result according to subH=((H[r]-H[lr]*Baser-l+1)%MOD+MOD+1)%MOD;
[0041] The expected return result configuration in the dialing test rule is obtained, and the hash value of the expected result string is obtained according to the expected return result configuration in the dialing test rule.
[0042] On the other hand, the present invention provides an implementation device of the method for automatic dialing of distributed services based on the above embodiments, comprising:
[0043] Configuration management module, used to configure dial test related configurations and dial test task management;
[0044] A task scheduling module, electrically connected to the configuration management module, wherein the task scheduling device is used to schedule the dialing and testing tasks;
[0045] A task execution module, electrically connected to the task scheduling module, and configured to execute tasks according to the dialing and testing tasks scheduled by the task scheduling module;
[0046] A storage module, electrically connected to the configuration management module and the task scheduling module, respectively, and configured to store configuration information and information such as tasks, notifications, and results;
[0047] The notification module is used to send notification information when the dial test result triggers an alarm.
[0048] Furthermore, the task scheduling module is further configured to select a suitable dialing test task execution module to execute the dialing test task according to the dialing test rule.
[0049] Furthermore, the task execution module is further configured to receive tasks scheduled by the task scheduling device and perform task dialing tests in a complex network environment. The task execution module is further configured to execute the dialing test tasks and return dialing test results.
[0050] Furthermore, the configuration management module includes:
[0051] A rule management unit, configured to manage the configuration of the dial test rules;
[0052] A type management unit, configured to manage the configuration of the dial test type;
[0053] An authentication management unit, configured to manage the authentication method of the dial test design;
[0054] A task management unit, configured to manage the configuration of the dial test task;
[0055] A result comparison mode unit is used to manage the configuration of the parsing engine of the dial test task return result;
[0056] Notification management unit, used to manage the configuration of alarm information notification;
[0057] Alarm contact / group management unit, used to manage the contacts and groups responsible for receiving alarm information;
[0058] The parsing engine management unit is used to manage the parsing engine that parses the return content of the dial test.
[0059] Compared to existing technologies, the method and apparatus for automatic dial testing of distributed services in the embodiments of the present invention offer the following advantages: by configuring dial testing information, specific dial testing tasks can be executed, enhancing the flexibility and customizability of the dial testing process. Furthermore, during the execution of the dial testing task, the returned content of the dial testing is acquired and parsed based on this content to generate the parsed results. This enables the efficient understanding and processing of large amounts of dial testing data during the dial testing process, thereby improving data processing capabilities. Furthermore, not only is the returned content acquired and parsed, but the parsed results are also verified for consistency with the expected results. This design ensures timely detection of data anomalies, thereby improving system stability and reliability. Subsequently, during the consistency verification of the dial testing results, if the verification results are inconsistent with the expected results, real-time alarms are set according to the alarm rules, resulting in higher verification efficiency than traditional parsing methods. The return results are constructed using a string hashing method, reducing the time complexity of string matching from linear to constant order, improving the timeliness of alarms for abnormal results and enabling timely detection of interface anomalies. Finally, compared with traditional dialing testing methods, it supports machine learning training and prediction of dialing testing results, generates intelligent variable interval dialing testing strategies based on the prediction results, reduces system pressure, and further effectively improves the efficiency of dialing testing alarms. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] FIG1 is a flowchart of a method for automatic dialing of a distributed service according to an embodiment of the present invention.
[0061] FIG2 is a structural block diagram of an implementation device of a method for automatic dialing based on distributed services according to an embodiment of the present invention.
[0062] FIG3 is a schematic diagram showing the connection relationship of an implementation device of a method for automatic dialing based on distributed services according to an embodiment of the present invention. DETAILED DESCRIPTION
[0063] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, unless there is a conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0064] As shown in FIG1 , a method for automatically dialing a distributed service according to an embodiment of the present invention includes:
[0065] Step S100: Configure dialing test information, and execute a dialing test task according to the configured dialing test information.
[0066] Step S200: Acquire the dial test return content during the execution of the dial test task, and parse the dial test return content to obtain a parsing result of the dial test return content.
[0067] Step S300: performing consistency verification between the parsing result of the content returned by the dial test and the expected result of the content returned by the dial test, wherein: if the parsing result of the content returned by the dial test is consistent with the expected result of the content returned by the dial test, the parsing result of the content returned by the dial test is stored.
[0068] Step S400: If the parsing result of the content returned by the dial test is inconsistent with the expected result of the content returned by the dial test, the parsing result of the content returned by the dial test is stored, and the parsing result of the content returned by the dial test is again verified for consistency with the expected result of the content returned by the dial test according to the alarm policy configuration conditions, wherein: if the parsing result of the content returned by the dial test is inconsistent with the expected result of the content returned by the dial test, and the consistency verification reaches a preset number of times, a dial test alarm notification is issued.
[0069] As can be seen, in step S100, the dial test task is executed according to the user-configured dial test information. This allows for flexible customization of dial test tasks based on user needs. Next, in step S200, the return content from the dial test task is obtained and parsed to generate the parsing results. This design leverages the powerful data processing capabilities of computers, enabling rapid and efficient processing of large amounts of dial test data. Then, in step S300, the parsed results are verified for consistency with the expected results. If the parsed results are consistent with the expected results, they are stored to support subsequent data analysis and reporting. This design ensures that the system can promptly detect and record normal data results. If the parsed results are inconsistent with the expected results, a further consistency check is performed in step S400. In the event of anomalies, the system can perform self-detection and repair. If the consistency check fails after a preset number of times, a dial test alarm notification is issued. This design allows users to promptly identify and address anomalies, thereby improving stability and reliability.
[0070] As can be appreciated, step S100 allows the dial test task to be executed based on the user-configured dial test information, enhancing the system's flexibility and customizability, allowing users to configure dial test tasks based on their actual needs. Secondly, in step S200, the return content from the dial test task is obtained and parsed to generate the parsing results. This design enables the system to effectively understand and process large amounts of dial test data, improving data processing capabilities. Then, in steps S300 and S400, the parsed results are verified for consistency with the expected results. If the parsed results are consistent with the expected results, they are stored. If they are inconsistent, they are also stored and re-verified for consistency based on the configured alarm policy conditions. This design ensures self-detection and repair when anomalies occur, thereby enhancing the system's self-healing capabilities. Finally, if the consistency check reaches a preset number of times, the system will issue a dial test alarm notification. This design ensures timely notification to the user when anomalies occur repeatedly, thereby improving the system's effectiveness and practicality. Users can discover and solve problems in a timely manner based on alarm notifications, thus ensuring the stability and reliability of the dial testing system.
[0071] Specifically, in some embodiments of the present invention, the collected dial test results can be input into the machine learning model for prediction, and the dial test frequency can be increased during the period when the dial test alarm may occur to improve the accuracy of the dial test alarm, or the dial test frequency can be reduced during the period without alarm to reduce resource consumption.
[0072] As can be seen, by feeding collected dial test results into a machine learning model for prediction, the accuracy of dial test alerts can be further improved. Specifically, the dial test frequency can be increased during periods when dial test alerts are likely to occur, allowing for more accurate detection of anomalies and timely alerts. During periods when alerts are not expected, the dial test frequency can be reduced to minimize resource consumption. By leveraging the predictive capabilities of machine learning and intelligent scheduling algorithms, a more efficient and accurate dial test monitoring and alerting system is achieved.
[0073] It's understandable that the predictive capabilities of machine learning models can more accurately detect anomalies and issue timely alerts, thereby improving alert accuracy. Dynamically adjusting the dialing frequency based on the predictions and actual conditions ensures alert accuracy while reducing unnecessary resource consumption and achieving intelligent scheduling and optimization. Secondly, intelligent scheduling algorithms can reduce the dialing frequency during periods without alerts, thereby reducing resource consumption and ensuring optimal resource utilization. Finally, the predictive capabilities of machine learning models and intelligent scheduling algorithms enable a more efficient and accurate dialing monitoring and alerting system, improving the performance and responsiveness of the entire system.
[0074] Specifically, in some embodiments of the present invention, configuring dial test information includes configuring the dial test type, dial test authentication method, dial test rules, and dial test tasks, as well as configuring the parsing engine, dial test result comparison method, and task executor.
[0075] Specifically, in some embodiments of the present invention, the type of dial test supports HTTP / HTTPS request mode, which can be extended to dial tests of services such as DNS and FTP.
[0076] Specifically, in some embodiments of the present invention, the authentication methods for dialing include: supporting username / password authentication and ak / sk authentication, and can be expanded and adapted to support more authentication methods.
[0077] Specifically, in some embodiments of the present invention, the dialing rules include: dialing address, dialing service name, network segment, whether the rule is effective, timeout period, creator, request header, request type, authentication method, request content, expected return code, expected return result, number of retries, alarm group, dialing frequency, remarks, etc.
[0078] Specifically, in some embodiments of the present invention, the dialing test task includes: task number, task name, task status, dialing test rules corresponding to the task, task start time, task end time, dialing test return status code, dialing test return content, number of retries, and maximum number of retries.
[0079] Specifically, in some embodiments of the present invention, the parsing engine refers to a script or code snippet that parses the returned results, and can parse the required field content from the returned content such as HTML, XML, JSON, plain text, etc. The parsing results can be used to match the expected results.
[0080] Specifically, in some embodiments of the present invention, if the dial test result comparison method is not configured, the default dial test task comparison method is set. The default method is that the status is equal to the expected status code, and the return result is equal to the expected return result. If the expected return result is set to empty, then the status code is equal, indicating that the dial test result is consistent with the expectation. Complex dial test result comparison can be performed through scripting, which can parse the return content and obtain the expected result field or content through the parsing engine, and compare it with the set expected result.
[0081] Specifically, in some embodiments of the present invention, the task executor is configured in different network environments, with at least three executors configured in each network environment. The executor needs to be able to access the dialing center, send heartbeat requests, obtain dialing tasks, and return dialing results.
[0082] As can be seen, the user interface allows users to configure dialing task information, including the dialing type, authentication method, dialing rules, and tasks. Through the configuration interface, users can specify the dialing task type, authentication method, rules, and tasks, enabling flexible customization and management. Support for HTTP / HTTPS request methods allows for expansion to services such as DNS and FTP. By configuring the dialing type, users can select the appropriate dialing service to meet the needs of different scenarios. Furthermore, by supporting username / password authentication and ak / sk authentication, it can be expanded and adapted to support more authentication methods. By configuring the authentication method, users can select the appropriate authentication method to ensure the security and reliability of the dialing. Furthermore, by providing dialing rule configuration capabilities, including dialing address, service name, network segment, rule validity, timeout period, request headers, request type, authentication method, request content, expected return code, and expected return result, users can define dialing behavior and expected results that meet their actual needs. Finally, by providing task executor configuration capabilities, executors can be configured in different network environments. At least three executors must be configured in each network environment. These executors must be able to access the dial test center, send heartbeat requests, obtain dial test tasks, and return dial test results. By configuring task executors, distributed and highly concurrent dial test task execution can be achieved. Finally, configuration of the parsing engine and result comparison method is provided. The parsing engine parses the dial test return results, parsing the required fields from HTML, XML, JSON, plain text, and other returned content. The result comparison method allows for matching and parsing using the default method or a script to determine whether the dial test results are consistent with expectations. This parsing engine and result comparison method enable the system to accurately detect anomalies and issue timely alerts.
[0083] As you can see, by configuring dial test information, users can flexibly customize and manage dial test tasks based on their actual needs, including dial test type, authentication method, rules, and tasks, meeting the requirements of various scenarios. Secondly, by supporting HTTP / HTTPS request methods and being extensible to dial tests for services such as DNS and FTP, the system's applicability is enhanced. By supporting username / password authentication and ak / sk authentication, with the ability to expand and adapt to additional authentication methods, the system ensures the security and reliability of dial test tasks. Furthermore, by defining dial test rules, users can clearly define the detailed requirements and expected results for each dial test task, making task execution clearer and more accurate. By configuring task executors in different network environments, with at least three executors configured in each network environment, dial test tasks can be executed in a distributed and highly concurrent manner, improving system processing capacity and efficiency. Finally, the parsing engine parses various return results and compares them with expected results, helping to accurately detect anomalies and issue timely alerts. This enhances the system's intelligence. A default dial test task comparison method is provided, as well as support for complex result comparisons via scripts, making result comparisons more flexible and accurate.
[0084] Specifically, in some embodiments of the present invention, executing a dial test task based on configured dial test information includes: obtaining the task type and dial test task information of an online task executor; extracting the type of the dial test task from the dial test task information; obtaining the configured execution policy for the dial test task; and matching the dial test task with an online task executor based on the dial test task type according to the execution policy for the dial test task. Based on the matching result, the dial test task is dispatched to an online task executor that successfully matches the dial test task, and the task executor is controlled to perform the dial test task. The task executor's dial test results are obtained and returned to the dial test platform.
[0085] As can be seen, the process involves obtaining the task type and dial test task information from the online task executor, extracting the task type from the dial test task information, obtaining the configured execution policy for the dial test task, matching and scheduling tasks based on the execution policy, controlling the task executor to perform the dial test task, obtaining the dial test results, and returning them to the dial test platform. This enables flexible dial test task execution and management. Based on different task types and execution policies, dial test tasks can be matched and scheduled with appropriate online task executors, enabling distributed and efficient task execution. Furthermore, obtaining and returning dial test results facilitates result analysis and processing by users or other system components, enabling timely identification and resolution of network or application issues. This technical solution offers high flexibility and scalability, allowing for customization and expansion based on actual needs.
[0086] It is understandable that by obtaining the task type and dial test task information of the online task executor, tasks can be flexibly matched and scheduled according to actual needs to meet the dial test requirements in different scenarios. Secondly, by scheduling the dial test task to the online task executor that successfully matches the task, distributed execution of tasks can be achieved, improving the system's processing power and efficiency while avoiding overloading of a single executor. Subsequently, by obtaining the execution policy of the configured dial test task, it can be ensured that only tasks that meet the execution policy are scheduled and executed, ensuring the security and reliability of the system. At the same time, by controlling the online task executor to perform the dial test task and obtaining the dial test results of the task executor, more accurate and reliable dial test results can be obtained, making it easier for users or other parts of the system to analyze and process the results. It can then be customized and expanded according to actual needs, such as adding new task types, execution policies, and task executors.
[0087] Specifically, in some embodiments of the present invention, obtaining the dial test return content during the execution of a dial test task and parsing the dial test return content to obtain a parsed result of the dial test return content includes: creating a dial test result string hash for the dial test result returned to the dial test platform; constructing a string hash of the expected result and the actual result; and performing a consistency verification between the created dial test result string hash and the constructed string hash of the expected result and the actual result according to an equivalence formula to obtain a consistency result.
[0088] It's understandable that using string hashing allows for rapid comparison of test results with expected results, thereby improving detection efficiency. Secondly, because string hashing is a digest algorithm that converts complex strings into shorter, fixed-length hash values, it significantly reduces computational complexity. Furthermore, comparing hash values using an equivalent formula allows for more precise determination of whether test results are consistent with expected results, thereby improving detection accuracy. Finally, because hash values are fixed-length, they can be easily stored and tracked, facilitating monitoring and management of test execution.
[0089] Specifically, in some embodiments of the present invention, creating a hash of the dialing test result string for the dialing test result returned to the dialing test platform includes: given a returned dialing test result: S, of type string, consisting of characters S = s1s2s3...sn, where each si is a letter, and idx(si) = ascii(si) + 1, where ascii(si) represents the ASCII code value of the letter si. The dialing test result has the characteristics of limited length and small variation, and a natural overflow method is used to construct a hash of the dialing test result string, wherein the hash function of the dialing test result string is: H[i] = (H[i-1]*Base+idx(si))%MOD, where H represents the hash function and H[i] represents the hash value of the [0-i] string.
[0090] Specifically, in some embodiments of the present invention, when constructing the string hash of the expected result and the actual result, the method includes: obtaining the string hash value of S=s1s2s3...sn of the returned dialing result, hash[i], i∈[0,n], and the actual result is its substring, set to S=sls2s3...sr, where l is the starting position and r is the ending position, and MOD is required for the hash value. The hash value of the actual return result is calculated according to subH=((H[r]-H[lr]*Baser-l+1)%MOD+MOD+1)%MOD. The expected return result configuration in the dialing rule is obtained, and the hash value of the expected result string is obtained according to the expected return result configuration in the dialing rule.
[0091] In summary, embodiments of the present invention provide a method for automatic dial testing of distributed services. By configuring dial testing information, it can be executed for specific dial testing tasks, enhancing the flexibility and customizability of the dial testing process. Furthermore, during the execution of the dial testing task, the returned content of the dial testing is acquired and parsed based on this content to generate the parsed results. This enables the efficient understanding and processing of large amounts of dial testing data during the dial testing process, thereby improving data processing capabilities. Furthermore, not only is the returned content acquired and parsed, but the parsed results are also verified for consistency with the expected results. This design ensures timely detection of data anomalies, thereby improving system stability and reliability. Subsequently, during the consistency verification of the dial testing results, if the verification results are inconsistent with the expected results, real-time alarms are set according to the alarm rules, resulting in higher verification efficiency than traditional parsing methods. The return results are constructed using a string hashing method, reducing the time complexity of the string matching process from linear to constant order, improving the timeliness of alarms for abnormal results and enabling timely detection of interface anomalies. Finally, compared with traditional dialing testing methods, it supports machine learning training and prediction of dialing testing results, generates intelligent variable interval dialing testing strategies based on the prediction results, reduces system pressure, and further effectively improves the efficiency of dialing testing alarms.
[0092] As shown in Figures 2 and 3, some embodiments of the present invention also provide an implementation device for a method of automatic dialing test based on a distributed service, including: a configuration management module, a task scheduling module, a task execution module, a storage module, and a notification module. The configuration management module is used to configure dialing test related configurations and dialing test task management. The task scheduling module is electrically connected to the configuration management module, and the task scheduling device is used to schedule dialing test tasks. The task execution module is electrically connected to the task scheduling module, and the task execution module is used to execute tasks according to the dialing test tasks scheduled by the task scheduling module. The storage module is electrically connected to the configuration management module and the task scheduling module respectively, and the storage module is used to store configuration information and information such as tasks, notifications, and results. The notification module is used to send notification information when the dialing test results trigger an alarm.
[0093] It is understandable that the configuration management module can conveniently configure the dial test related configuration and dial test task management, so that the device can flexibly adapt to different test requirements. Secondly, the task scheduling module can schedule the dial test tasks according to the configuration of the configuration management module, so that the device can efficiently process the test tasks. At the same time, the task execution module can execute tasks according to the dial test tasks scheduled by the task scheduling module, so that the device can accurately execute the test tasks. In addition, the storage module can store configuration information and information such as tasks, notifications, and results, so that the device can easily trace and query the test process and results. Finally, the notification module can send notification information when the dial test results trigger an alarm, so that the device can issue alarm information in a timely manner, which is convenient for testers to discover and handle problems in a timely manner.
[0094] Specifically, in some embodiments of the present invention, the task scheduling module is further configured to select an appropriate dialing test task execution module to execute the dialing test task according to the dialing test rule.
[0095] It is understood that the task scheduling module can flexibly select the appropriate dial test task execution module based on the dial test rules. Different dial test task execution modules can be optimized and implemented for different dial test types, authentication methods, and other factors, thereby meeting the needs of different scenarios and requirements. Furthermore, by assigning dial test tasks to appropriate dial test task execution modules, overloading individual executors can be avoided, improving the system's processing power and efficiency. Furthermore, different execution modules can be executed in parallel, further enhancing the system's concurrent processing capabilities. Secondly, by modularizing the dial test task execution modules, with each module implemented and optimized for a specific dial test task, the system architecture is clearer and easier to maintain. This design also facilitates the expansion and addition of new features and reduces system coupling. Finally, by selecting the appropriate dial test task execution module based on the dial test rules, the system can execute dial test tasks more efficiently. Each execution module is optimized for a specific dial test type and authentication method, enabling faster task execution and improving system efficiency.
[0096] Specifically, in some embodiments of the present invention, the task execution module is further configured to receive tasks scheduled by the task scheduling device and perform task dialing tests in a complex network environment. The task execution module is further configured to execute the dialing test tasks and return the dialing test results.
[0097] It is understood that the task execution module can automatically receive tasks scheduled by the task scheduling device and automatically execute dialing tasks without human intervention, thereby improving the system's automation and efficiency. Secondly, by executing dialing tasks in complex network environments and returning dialing results, the task execution module adapts to different network environments and complex network conditions, enabling the system to better meet actual needs. Furthermore, by receiving and executing tasks scheduled by the task scheduling device in real time and returning dialing results in real time, the system can quickly respond to and resolve network or application issues, improving the system's real-time performance and response speed. Finally, the automated execution and real-time result return of the task execution module can reduce human operational errors and mistakes, improving the system's reliability and stability. At the same time, the system can automatically analyze and process the dialing results, providing more accurate and reliable monitoring and management data.
[0098] Specifically, in some embodiments of the present invention, the configuration management module includes: a rule management unit, a type management unit, an authentication management unit, a task management unit, a result comparison method unit, a notification management unit, an alarm contact / group management unit, and a parsing engine management unit. The rule management unit is used to manage the configuration of dial test rules. The type management unit is used to manage the configuration of dial test types. The authentication management unit is used to manage the authentication method designed for dial test. The task management unit is used to manage the configuration of dial test tasks. The result comparison method unit is used to manage the configuration of the parsing engine for the results returned by the dial test tasks. The notification management unit is used to manage the configuration of alarm information notifications. The alarm contact / group management unit is used to manage the contacts and groups responsible for receiving alarm information. The parsing engine management unit is used to manage the parsing engine that parses the returned content of the dial test.
[0099] As you can see, through the configuration management of each unit, different user needs and usage scenarios can be more flexibly met. The rule management unit, type management unit, authentication management unit, and task management unit manage different configuration items, allowing users to customize and configure the system according to their needs. Secondly, by dividing the configuration management module into multiple units, users can more conveniently manage and operate it. Each unit has specific functions and responsibilities, allowing users to quickly find and configure the corresponding unit as needed, improving management efficiency. Furthermore, this multi-unit, multi-module design makes the configuration management module highly scalable. Adding new configuration items or features requires only adding new units or modules, eliminating the need for large-scale modifications and upgrades to the entire system, reducing system coupling and complexity. Finally, the authentication management unit manages the authentication methods for the dial test design, ensuring that only authorized users or groups can configure and manage dial test tasks, improving system security and reliability.
[0100] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0101] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0102] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A method for automatic dialing of distributed services, characterized in that: include: Configure the dialing test information, and perform the dialing test task according to the configured dialing test information; Acquire the dial test return content during the execution of the dial test task, and parse the dial test return content to obtain the parsing result of the dial test return content according to the dial test return content; Performing consistency verification between the parsing result of the content returned by the dial test and the expected result of the content returned by the dial test, wherein: If the parsing result of the content returned by the dial test is consistent with the expected result of the content returned by the dial test, storing the parsing result of the content returned by the dial test; If the parsing result of the content returned by the dial test is inconsistent with the expected result of the content returned by the dial test, the parsing result of the content returned by the dial test is stored, and the parsing result of the content returned by the dial test is verified again for consistency with the expected result of the content returned by the dial test according to the alarm policy configuration conditions, wherein: If the parsing result of the content returned by the dial test is inconsistent with the expected result of the content returned by the dial test, and the consistency verification reaches a preset number of times, a dial test alarm notification is issued.
2. The method for automatic dialing of distributed services as claimed in claim 1, characterized in that: When configuring the dial test information, include: Configuring the type of the dial test, the authentication method of the dial test, the rules of the dial test, and the tasks of the dial test; The parsing engine, the dial test result comparison method and the task executor are configured.
3. The method for automatic dialing of distributed services as claimed in claim 2, characterized in that: When the dial test task is executed according to the configured dial test information, it includes: Obtain the task type of the online task executor and the task information of the dial test; Extracting the type of the dial test task from the task information of the dial test; Acquire the configured execution strategy of the dial-test task, and match the dial-test task with the online task executor based on the type of the dial-test task according to the execution strategy of the dial-test task; According to the matching result, the dial test task is dispatched to the online task executor that successfully matches the dial test task, and the task executor is controlled to perform the dial test task; The dialing test result of the task executor is obtained, and the dialing test result is returned to the dialing test platform.
4. The method for automatic dialing of distributed services as claimed in claim 3, characterized in that: Acquiring the dial test return content during the execution of the dial test task, and parsing the dial test return content to obtain the parsing result of the dial test return content according to the dial test return content, including: Creating a dialing test result character string hash for the dialing test result returned to the dialing test platform; A string hash of the expected result and the actual result is constructed, and a consistency verification result is obtained between the established string hash of the dialing result and the constructed string hash of the expected result and the actual result according to an equivalent formula.
5. The method for automatic dialing of distributed services as claimed in claim 4, characterized in that: When creating a hash of the dial test result string for the dial test result returned to the dial test platform, it includes: Given the returned dial test result: S, the type is a string, S is composed of characters S = s1s2s3...sn, for each si is a letter, given idx(si) = ascii(si) + 1, where ascii(si) represents the ASCII code value of the letter si; The characteristics of the dialing test result being limited in length and small in variation are obtained, and a natural overflow method is used to construct a hash of the dialing test result string, wherein the hash function of the dialing test result string is: H[i]=(H[i-1]*Base+idx(si))%MOD, where H represents a hash function, and H[i] represents a hash value of the [0-i] string.
6. The method for automatic dialing of distributed services as claimed in claim 5, characterized in that: When constructing a string hash of expected and actual results, include: Obtain the string hash value of the returned dial test result S=s1s2s3...sn, hash[i], i∈[0,n], the actual result is its substring, set to S=sls2s3...sr, where l is the starting position and r is the ending position, and MOD is required for the hash value; Calculate the hash value of the actual return result according to subH=((H[r]-H[lr]*Baser-l+1)%MOD+MOD+1)%MOD; The expected return result configuration in the dialing test rule is obtained, and the hash value of the expected result string is obtained according to the expected return result configuration in the dialing test rule.
7. A device for implementing the method for automatic dialing of distributed services according to any one of claims 1 to 6, characterized in that: include: Configuration management module, used to configure dial test related configurations and dial test task management; A task scheduling module, electrically connected to the configuration management module, wherein the task scheduling device is used to schedule the dialing task; A task execution module, electrically connected to the task scheduling module, and configured to execute tasks according to the dialing task scheduled by the task scheduling module; A storage module, electrically connected to the configuration management module and the task scheduling module, respectively, and used to store configuration information and information such as tasks, notifications, and results; The notification module is used to send notification information when the dial test result triggers an alarm.
8. The device for implementing the method for automatic dialing of distributed services as claimed in claim 7, characterized in that: The task scheduling module is also used to select a suitable dialing test task execution module to execute the dialing test task according to the dialing test rule.
9. The device for implementing the method for automatic dialing of distributed services as claimed in claim 8, characterized in that: The task execution module is also used to receive tasks scheduled by the task scheduling device and perform task dialing tests in a complex network environment. The task execution module is also used to execute the dialing test tasks and return the dialing test results.
10. The device for implementing the method for automatic dialing of distributed services as claimed in claim 7, characterized in that: The configuration management module includes: A rule management unit, used to manage the configuration of the dial test rules; A type management unit, used to manage the configuration of the type of the dial test; An authentication management unit, used to manage the authentication method of the dial test design; A task management unit, used to manage the configuration of the dial test task; A result comparison mode unit, used to manage the configuration of the parsing engine of the task return result of the dial test; A notification management unit, used to manage the configuration of alarm information notifications; Alarm contact / group management unit, used to manage the contacts and groups responsible for receiving alarm information; The parsing engine management unit is used to manage the parsing engine that parses the return content of the dial test.
Citation Information
Patent Citations
Automatic testing method, testing terminal and communication system
CN101729681A
Filtering network quality alarm method, apparatus and device and medium
CN108206769A
Dial testing control method, electronic equipment and dial testing system
CN114448850A
Service dial testing method and system and related equipment
CN116980332A
Distributed service automatic dial testing method and device
CN117857381A
Cited By
Dial testing method and device and electronic equipment
CN121217611A