CN117857381A - Method and device for automatic dial testing of distributed service - Google Patents

Method and device for automatic dial testing of distributed service Download PDF

Info

Publication number
CN117857381A
CN117857381A CN202311702658.2A CN202311702658A CN117857381A CN 117857381 A CN117857381 A CN 117857381A CN 202311702658 A CN202311702658 A CN 202311702658A CN 117857381 A CN117857381 A CN 117857381A
Authority
CN
China
Prior art keywords
dial testing
task
result
dial
testing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311702658.2A
Other languages
Chinese (zh)
Inventor
王小乾
潘晓东
吴晓清
周济
李伟泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202311702658.2A priority Critical patent/CN117857381A/en
Publication of CN117857381A publication Critical patent/CN117857381A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to I T and software development technical field, and discloses a method and a device for automatic dial testing of distributed service, wherein the method comprises the following steps: the monitoring and management of the network or the application program are realized by configuring the dial testing information and executing the dial testing task, acquiring the dial testing return content and the analysis result and verifying according to the consistency of the analysis result and the expected result. If the analysis result is consistent with the expected result, storing the analysis result; otherwise, the analysis result is stored and consistency verification is carried out again according to the alarm strategy configuration condition. And if the analysis result is inconsistent with the expected result and the consistency verification reaches the preset times, sending out a dial testing alarm notification. The technical scheme improves the automation degree, flexibility and reliability of the system, ensures the stability and safety of the system, and provides effective support for monitoring and management of a network or an application program.

Description

Method and device for automatic dial testing of distributed service
Technical Field
The invention relates to the technical field of IT and software development, in particular to a method and a device for automatic dial testing of distributed services.
Background
The space wing cloud self-research console provides the capability of self-service opening and cloud resource management for users, the number of the butted distributed service systems is very large, SSO of the butted space wing cloud is very large, single sign-on of the users is realized, BSS (space wing cloud service system) is butted, order charging is realized, PAAS (space wing cloud service) platform is butted to provide rich and various PAAS products, the more the butted systems are, the more interfaces are involved, the interface dial testing of each system is completed, the availability of the interfaces is ensured, the user experience is improved, the problem of how to solve the problem is solved in front of the user is solved urgently, meanwhile, the dial testing also needs to consider how to verify the correctness of the content returned by the interfaces, the expected return result can be obtained, and the network complexity is increased due to different networks before different systems.
Patent CN114760235a discloses a method and a device for executing a dial testing task, a storage medium and an electronic device, and relates to the technical field of smart home, and the method for executing the dial testing task comprises the following steps: acquiring a dial testing task to be executed, which is transmitted by a first device, wherein the dial testing task comprises a first device identifier and task information of the first device; searching a second equipment identifier of a second equipment corresponding to the first equipment identifier from a preset database based on the first equipment identifier; searching configuration information of the second equipment from a preset database according to the second equipment identification and the task information; generating a dial testing instruction according to the configuration information of the second equipment; and sending a dial testing instruction to the second device based on the second device identifier so as to instruct the second device to execute the dial testing task. The patent focuses on identifying a task through a first device, and executing the task through a second device, so that the problem that the correctness of the content returned by a verification interface can not be solved.
The patent CN114584760A discloses a media asset dial testing method and related equipment, and the invention provides the media asset dial testing method and related equipment, which are applied to a computer terminal, wherein the method comprises the following steps: obtaining a dial testing task, wherein the dial testing task is provided with dial testing parameters corresponding to target media assets, the dial testing parameters comprise dial testing platform information, and the dial testing platform information is used for indicating dial testing of the target media assets on at least one target dial testing platform; establishing connection with each target dial-up measuring platform according to the dial-up measuring platform information; and performing dial testing on the target media assets on each target dial testing platform according to the dial testing parameters to obtain dial testing results corresponding to the target dial testing platforms. The patent focuses on the dial-up test of the media resource system, simulates page jump, and cannot solve the problem that the verification interface returns the correctness of the content at present.
In summary, in the context of interfacing multiple distributed system service interfaces of a complex network, how to timely discover the service abnormality of the interfacing system, not only realize user perception through fusing and other mechanisms, but also need to discover alarm notification through a dial testing means, especially related to the scenario that the interface access is normal, and the return result is inferior to the expected scenario and the complex network environment.
Disclosure of Invention
The purpose of the invention is that: the method and the device for automatically dialing and measuring the distributed service are used for solving the problems that in the background technology, under the condition of the multi-distributed system service interface docking of the complex network environment, the service abnormality of the docking system cannot be found in time, and particularly, the problems that the interface access is normal, the return result is not as good as an expected scene, and the service quality is poor under the condition of the multi-system interface docking of the complex network environment are solved.
In one aspect, an embodiment of the present invention provides a method for automatic dial testing of distributed services, including:
configuring dial testing information, and executing dial testing tasks according to the configured dial testing information;
acquiring a dial testing return content in the execution of a dial testing task, and analyzing an analysis result of the dial testing return content according to the dial testing return content;
performing consistency verification between the analysis result of the dial-test returned content and the expected result of the dial-test returned content according to the dial-test returned content, wherein the consistency verification is performed on the analysis result of the dial-test returned content;
if the analysis result of the dial testing return content is consistent with the expected result of the dial testing return content, storing the analysis result of the dial testing return content;
if the analysis result of the dial testing return content is inconsistent with the expected result of the dial testing return content, storing the analysis result of the dial testing return content, and carrying out consistency verification again between the analysis result of the dial testing return content and the expected result of the dial testing return content according to the alarm strategy configuration condition, wherein,
And if the analysis result of the dial testing returned content is inconsistent with the expected result of the dial testing returned content and the consistency verification reaches the preset times, sending a dial testing alarm notice.
Optionally, in the above embodiment, the collected measurement result may be input into a machine learning model prediction, and the measurement frequency may be increased during a period when a measurement alarm may occur, so as to improve the measurement alarm accuracy, or the measurement frequency may be reduced during a period when no alarm occurs, so as to reduce resource consumption.
Further, when configuring dial testing information, the method includes:
configuring the type of the dial testing, the authentication mode of the dial testing, the rule of the dial testing and the task of the dial testing;
and configuring an analysis engine, a comparison mode of the dialing test result and a task executor.
Optionally, the type of the dial test is a dial test supporting HTTP/HTTPs request, which can be extended to DNS, FTP, and other services.
Optionally, the dial-up authentication mode includes: the user name/password authentication and ak/sk authentication are supported, and the extensible adaptation supports more authentication modes.
Optionally, the rule of dial testing includes: dial test address, dial test service name, network segment, rule validation, timeout time, creator, request header, request type, authentication mode, request content, expected return code, expected return result, retry number, alarm group, dial test frequency, remark, etc.
Optionally, the task of dial testing includes: task number, task name, task state, dial testing rule corresponding to task, task start time, task end time, dial testing return state code, dial testing return content, retry times, and maximum retry times.
Optionally, the parsing engine refers to a script or code segment for parsing the returned result, and may return the field content required for content parsing from HTML, XML, JSON, plain text, etc., where the parsed result may be used to match the expected result.
Optionally, if the result comparison mode of the dial test is not configured, setting a default dial test task comparison mode, wherein the default mode is that the state is equal to the expected state code, the return result is equal to the expected return result, and if the expected return result is set to be empty, the state code is equal to the dial test result and is consistent with the expected result; the complex dial testing result comparison can be analyzed and compared in a script mode, returned contents can be analyzed, an expected result field or contents can be obtained through an analysis engine, and the expected result is set for comparison.
Optionally, the task executor is configured with task executors in different network environments, at least 3 executors are configured in each network environment, and the executors need to access the dial testing center, send a heartbeat request, acquire a dial testing task and return a dial testing result.
Further, when executing the dial testing task according to the configured dial testing information, the method includes:
acquiring the task type of an online task executor and the measured task information;
extracting the type of the dial testing task in the dial testing task information;
acquiring an execution strategy of the configured dial-up test task, and matching the dial-up test task with the online task executor based on the type of the dial-up test task according to the execution strategy of the dial-up test task;
scheduling the measured task to the online task executor successfully matched with the measured task according to a matching result, and controlling the task executor to perform the measured task;
and acquiring a dial testing result of the task executor, and returning the dial testing result to a dial testing platform.
Further, when obtaining a dial testing return content in the execution of the dial testing task and analyzing the analysis result of the dial testing return content according to the dial testing return content, the method comprises the following steps:
establishing a dial testing result character string hash for the dial testing result returned to the dial testing platform;
and constructing the string hash of the expected result and the actual result, and obtaining a consistency verification result between the established string hash of the dial test result and the string hash of the expected result and the actual result according to an equivalent formula.
Further, when establishing a dial testing result character string hash for the dial testing result returned to the dial testing platform, the method includes:
giving a return dial test result: s, the type is a string, S consists of characters s=s1s2s3..sn, one letter for each si, given idx (si) =ascii (si) +1, where ASCII (si) represents the ASCII code value of the letter si;
the characteristic that the length of the dial testing result is limited and the change is small is obtained, and a natural overflow method is adopted to construct the dial testing result character string hash, wherein the dial testing result character string hash function is as follows: h [ i ] = (H [ i-1 ]. Times.base+idx (si))% MOD, where H represents a hash function and H [ i ] represents a hash value of a [0-i ] string.
Further, when constructing the hash of the character string of the expected result and the actual result, the method includes:
obtaining a string Hash value of s=s1s2s3..sn of the returned dial test result, wherein the Hash [ i ], i epsilon [0, n ] is a substring, the actual result is set as s=sls2s3..sr, wherein l is a starting position, r is an ending position, and MOD is to be taken for the Hash value;
calculating the hash value of the actual returned result according to subH= ((Hr-Hl-r) Baser-l+1)% MOD+MOD+1)% MOD;
and acquiring expected return result configuration in the dialing test rule, and acquiring a hash value of an expected result string according to the expected return result configuration in the dialing test rule.
On the other hand, the invention provides a device for implementing the method for automatic dial testing of distributed service based on the above embodiments, which comprises:
the configuration management module is used for configuring the dialing test related configuration and the dialing test task management;
the task scheduling module is electrically connected with the configuration management module, and the task scheduling device is used for scheduling the dial testing task;
the task execution module is electrically connected with the task scheduling module and is used for executing tasks according to the dial testing tasks scheduled by the task scheduling module;
the storage module is respectively and electrically connected with the configuration management module and the task scheduling module and is used for storing configuration information, tasks, notifications, results and other information;
and the notification module is used for sending notification information under the condition that the dialing test result triggers an alarm.
Furthermore, the task scheduling module is further configured to select an appropriate dial testing task execution module to execute the dial testing task according to the dial testing rule.
Further, the task execution module is further configured to receive a task scheduled by the task scheduling device, and perform task measurement in a complex network environment, and the task execution module is further configured to execute a measurement task and return a measurement result.
Further, the configuration management module includes:
a rule management unit, configured to manage configuration of the dial testing rule;
a type management unit, configured to manage the configuration of the dial testing type;
the authentication management unit is used for managing the authentication mode of the dial testing design;
the task management unit is used for managing the configuration of the dial-up testing task;
the result comparison mode unit is used for managing the configuration of an analysis engine for returning the result of the dial-up test task;
a notification management unit for managing the configuration of the alarm information notification;
the alarm contact person/group management unit is used for managing the contact person and group responsible for managing and receiving alarm information;
and the analysis engine management unit is used for managing an analysis engine for analyzing the measured returned content.
Compared with the prior art, the method and the device for automatic dial testing of the distributed service have the beneficial effects that: by configuring dial testing information, the dial testing information can be executed aiming at specific dial testing tasks, so that flexibility and customization during dial testing are enhanced. And meanwhile, in the execution process of the dial testing task, the contents returned by the dial testing are acquired, and the analysis result is analyzed according to the contents. And further, a large amount of dial testing data can be effectively understood and processed in the dial testing process, so that the data processing capacity is improved. Secondly, not only the returned contents of the dial test are obtained and analyzed, but also the analysis results of the contents are subjected to consistency verification with the expected results. The design ensures that data anomalies can be found in time, thereby improving the stability and reliability of the system. And then, in the consistency verification of the dial testing result, when the verification result is inconsistent with the expected result, setting a real-time alarm according to an alarm rule, wherein the verification efficiency is higher than that of the traditional analysis method. And a return result is constructed by adopting a character string hash method, so that the complexity of the matching working time of the character strings is reduced, the time complexity is reduced from a linear order to a constant order, the alarm timeliness of an abnormal result is improved, and the interface abnormal situation is found in time. Finally, compared with the traditional dial testing method, the machine learning training prediction is supported on the dial testing result, the intelligent variable interval dial testing strategy is generated according to the prediction result, the system pressure is reduced, and the dial testing alarm efficiency is further effectively improved.
Drawings
FIG. 1 is a flow chart of a method for automatic dial testing of distributed services according to an embodiment of the present invention.
Fig. 2 is a block diagram of a device for implementing a method based on distributed service automatic dial testing according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a connection relationship of an implementation device of a method for automatic dial testing based on distributed service according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other. The invention will be described in detail below with reference to the drawings in connection with embodiments.
As shown in fig. 1, a method for automatic dial testing of distributed service according to an embodiment of the present invention includes:
and step S100, configuring dial testing information, and executing a dial testing task according to the configured dial testing information.
And step 200, acquiring dial testing return content in the execution of the dial testing task, and analyzing an analysis result of the dial testing return content according to the dial testing return content.
Step S300, carrying out consistency verification between an analysis result of the dial testing returned content and an expected result of the dial testing returned content, wherein: and if the analysis result of the dial testing return content is consistent with the expected result of the dial testing return content, storing the analysis result of the dial testing return content.
Step S400, if the analysis result of the dial testing return content is inconsistent with the expected result of the dial testing return content, storing the analysis result of the dial testing return content, and carrying out consistency verification again between the analysis result of the dial testing return content and the expected result of the dial testing return content according to the alarm policy configuration condition, wherein: and if the analysis result of the dial testing returned content is inconsistent with the expected result of the dial testing returned content and the consistency verification reaches the preset times, sending a dial testing alarm notice.
It can be seen that, through step S100, a dial testing task is performed according to dial testing information configured by a user. Therefore, the dial testing task can be flexibly customized according to the requirements of users. Next, in step S200, the returned contents during execution of the dial testing task are obtained, and the analysis result is analyzed according to the contents. The design utilizes the powerful data processing capability of the computer, and can rapidly and effectively process a large amount of dial testing data. Then, in step S300, consistency verification is performed according to the analysis result and the expected result. If the analysis result is consistent with the expected result, support is provided for subsequent data analysis and reporting by storing the analysis result. This design ensures that the system can discover and record normal data results in a timely manner. If the analysis result does not coincide with the expected result, the consistency check is performed again in step S400. The system can perform self-detection and repair when an abnormal situation occurs. If the consistency verification reaches the preset times, a dial testing alarm notification is sent. The design enables a user to timely know and process abnormal conditions, and stability and reliability are improved.
It can be appreciated that, through step S100, the dial testing task can be performed according to the dial testing information configured by the user, which enhances flexibility and customizable of the system, and the user can set the dial testing task according to actual requirements. Next, in step S200, the returned contents during execution of the dial testing task are obtained, and the analysis result is analyzed according to the contents. The design enables the system to effectively understand and process a large amount of dial testing data, and improves the data processing capacity. Then, in steps S300 and S400, consistency verification is performed according to the analysis result and the expected result. If the analysis result is consistent with the expected result, storing the analysis result; if the analysis result is inconsistent with the expected result, the analysis result is stored, and consistency verification is performed again according to the alarm strategy configuration condition. This design ensures that self-detection and repair can be performed in the event of an abnormal situation, thereby improving self-repair capability. Finally, if the consistency verification reaches the preset times, the system sends out a dial testing alarm notification. The design ensures that the user can be timely notified when the abnormal condition continuously occurs, thereby improving the effectiveness and the practicability of the system. The user can find and solve the problem in time according to the alarm notice, thereby ensuring the stability and reliability of the dial testing system.
Specifically, in some embodiments of the present invention, the collected measurement result may be input into a machine learning model prediction, and the measurement frequency may be increased during a period when a measurement alarm may occur, so as to improve the measurement alarm accuracy, or the measurement frequency may be reduced during a period when no alarm occurs, so as to reduce resource consumption.
It can be seen that the collected dial testing result is input into the machine learning model for prediction, so that the accuracy of dial testing alarm is further improved. In particular, the dial test frequency may be increased during the period in which a dial test alarm may occur in order to more accurately detect abnormal conditions and to issue an alarm in time. In the alarm-free period, the dial testing frequency can be reduced so as to reduce the resource consumption. By utilizing the prediction capability of machine learning and an intelligent scheduling algorithm, a more efficient and accurate dial testing monitoring and alarming system is further realized.
It can be understood that by means of the prediction capability of the machine learning model, abnormal conditions can be detected more accurately and an alarm can be sent out timely, so that the accuracy of the alarm is improved. And further, according to the prediction result and the actual situation, the dial testing frequency is dynamically adjusted, so that the alarm accuracy can be ensured, meanwhile, the unnecessary resource consumption is reduced, and the intelligent scheduling and optimization are realized. And secondly, through an intelligent scheduling algorithm, the dial testing frequency can be reduced in the alarm-free period, so that the resource consumption is reduced, and the reasonable utilization of the resources is realized. Finally, through the prediction capability of the machine learning model and the intelligent scheduling algorithm, a more efficient and accurate dial testing monitoring and alarming system can be realized, and the performance and response capability of the whole system are improved.
Specifically, in configuring dial testing information in some embodiments of the present invention, it includes: the type of the dial testing, the authentication mode of the dial testing, the rule of the dial testing and the task of the dial testing are configured. And configuring an analysis engine, a dial testing result comparison mode and a task executor.
Specifically, in some embodiments of the present invention, the type of dial-up test is a dial-up test supporting HTTP/HTTPs request, which can be extended to DNS, FTP, and other services.
Specifically, in some embodiments of the present invention, the authentication manner of dial testing includes: the user name/password authentication and ak/sk authentication are supported, and the extensible adaptation supports more authentication modes.
Specifically, the rules for dial testing in some embodiments of the present invention include: dial test address, dial test service name, network segment, rule validation, timeout time, creator, request header, request type, authentication mode, request content, expected return code, expected return result, retry number, alarm group, dial test frequency, remark, etc.
Specifically, the tasks of dial testing in some embodiments of the invention include: task number, task name, task state, dial testing rule corresponding to task, task start time, task end time, dial testing return state code, dial testing return content, retry times, and maximum retry times.
Specifically, in some embodiments of the present invention, the parsing engine refers to a script or code segment that parses the returned result, and may parse the required field content from HTML, XML, JSON, plain text, etc., and the parsed result may be used to match the expected result.
Specifically, in some embodiments of the present invention, if the result comparison mode of dial testing is not configured, the default dial testing task comparison mode is set, the default mode is that the state is equal to the expected state code, the returned result is equal to the expected returned result, and if the expected returned result is set to be empty, the state code is equal, that is, the dial testing result is identical to the expected result. The complex dial testing result comparison can be analyzed and compared in a script mode, returned contents can be analyzed, an expected result field or contents can be obtained through an analysis engine, and the expected result is set for comparison.
Specifically, in some embodiments of the present invention, the task executor is configured in different network environments, where at least 3 executors are configured in each network environment, and the executor needs to access the dial testing center, send a heartbeat request, obtain a dial testing task, and return a dial testing result.
It can be seen that by providing a user interface, the user is allowed to configure relevant information of the dial testing task, including dial testing type, authentication mode, dial testing rule, task and the like. Through the configuration interface, the user can specify the information such as the type, authentication mode, rules, tasks and the like of the dial testing task, and flexible customization and management are realized. The method can be extended to the dial testing of services such as DNS, FTP and the like by supporting HTTP/HTTPS request modes. Through configuration of the dial testing type, a user can select corresponding dial testing service to meet requirements in different scenes. Second, by supporting username/password authentication and ak/sk authentication, the extensible adaptation supports more ways of authentication. Through configuration authentication mode, user can select corresponding authentication mode to guarantee safety and reliability of dial testing. Meanwhile, by providing configuration functions of the dial testing rule, including dial testing address, service name, network segment to which the rule belongs, whether the rule is effective, timeout time, request head, request type, authentication mode, request content, expected return code, expected return result and the like. By configuring the dial testing rules, a user can define dial testing behaviors and expected results which meet actual requirements. Subsequently, by providing configuration functionality for the task executor, the executor is allowed to be configured in a different network environment. At least 3 actuators are configured in each network environment, and the actuators need to access the dial testing center, send heartbeat requests, acquire dial testing tasks and return dial testing results. By configuring the task executor, distributed and high-concurrency dial testing task execution can be realized. Finally, by providing the configuration functions of the parsing engine and the result comparison mode. The parsing engine is used for parsing the dial test return result, and can return field contents required by content parsing from HTML, XML, JSON, plain text and the like. The result comparison mode can be matched and analyzed by a default mode or a script mode to determine whether the dial test result is consistent with the expected result. By comparing the analysis engine with the result, the system can accurately detect the abnormal condition and timely send out an alarm.
It can be understood that by configuring the dial testing information, a user can flexibly customize and manage dial testing tasks according to actual requirements, including dial testing types, authentication modes, rules, tasks and the like, so that the requirements under different scenes are met. Secondly, by supporting HTTP/HTTPS request mode, the method can be extended to the dial testing of DNS, FTP and other services, and the applicability of the system is improved. The security and reliability of dial testing are ensured by supporting the modes of user name/password authentication, ak/sk authentication and the like and supporting more authentication modes by extensible adaptation. In addition, by defining the dial testing rules, a user can clearly determine the detailed requirements and expected results of each dial testing task, so that the task execution is clearer and more accurate. The task executor is configured in different network environments, and at least 3 executors are configured in each network environment, so that the dial testing task can be executed in a distributed and high-concurrency mode, and the processing capacity and the efficiency of the system are improved. Finally, various types of returned results can be analyzed through the analysis engine and can be used for comparing with expected results, so that abnormal conditions can be accurately detected, an alarm can be timely sent out, the intelligent level of the system is improved, a default dial testing task comparison mode is provided, complex result comparison through a script mode is supported, and the result comparison is more flexible and accurate.
Specifically, in some embodiments of the present invention, when performing a dial testing task according to configured dial testing information, the method includes: and acquiring the task type and the dial-measured task information of the online task executor. And extracting the type of the dial testing task from the dial testing task information. And acquiring an execution strategy of the configured dial-up test task, and matching the dial-up test task with an online task executor based on the type of the dial-up test task according to the execution strategy of the dial-up test task. And dispatching the measured task to an online task executor successfully matched with the measured task according to the matching result, and controlling the task executor to perform the measured task. And acquiring a dial testing result of the task executor, and returning the dial testing result to the dial testing platform.
It can be seen that, obtain the task type of the online task executor and dial-up task information, extract the task type in the dial-up task information, obtain the execution strategy of the dial-up task after configuration, match and dispatch tasks according to the execution strategy, control the task executor to dial-up task, obtain the dial-up result and return to the dial-up platform, etc. Therefore, flexible dial testing task execution and management are realized, and the dial testing task and a proper online task executor can be matched and scheduled according to different task types and execution strategies, so that the distributed and efficient execution of the task is realized. Meanwhile, by acquiring and returning the dial testing result, the user or other parts of the system can conveniently analyze and process the result, and the problems in the network or the application program can be found and solved in time. The technical scheme has higher flexibility and expansibility, and can be customized and expanded according to actual requirements.
It can be understood that tasks can be flexibly matched and scheduled according to actual requirements by acquiring task types and measured task information of the online task executor, so as to meet measured requirements in different scenes. Secondly, by scheduling the dial testing task to an online task executor successfully matched with the task, the distributed execution of the task can be realized, the processing capacity and the efficiency of the system are improved, and meanwhile, the overload of a single executor is avoided. Then, by acquiring the execution strategy of the configured dial testing task, only the task conforming to the execution strategy can be scheduled and executed, and the safety and reliability of the system are ensured. Meanwhile, by controlling the on-line task executor to perform the dial testing task and acquiring the dial testing result of the task executor, a more accurate and reliable dial testing result can be obtained, and the user or other parts of the system can conveniently perform result analysis and processing. And can be customized and expanded according to actual requirements, such as adding new task types, execution strategies, task executors and the like.
Specifically, in some embodiments of the present invention, when obtaining a dial testing return content in execution of a dial testing task and resolving a resolved result of the dial testing return content according to the dial testing return content, the method includes: and establishing a dial testing result character string hash for the dial testing result returned to the dial testing platform. And constructing the string hash of the expected result and the actual result, and obtaining a consistency verification result between the string hash of the established dial test result and the string hash of the expected result and the string hash of the actual result according to an equivalent formula.
It will be appreciated that by using the words Fu Chuanha, the dial test result can be quickly compared to the expected result, thereby improving the efficiency of the test. Second, since the string hash is a digest algorithm, complex strings can be converted into a short hash value of a fixed length, and thus the amount of computation can be significantly reduced. Meanwhile, the hash values are compared through an equivalent formula, so that whether the dial test result is consistent with the expected result or not can be determined more accurately, and the detection accuracy is improved. Finally, the hash value is fixed in length, so that the hash value can be conveniently stored and tracked, and the execution process of the dial testing task is conveniently monitored and managed.
Specifically, in some embodiments of the present invention, when establishing a dial testing result string hash for a dial testing result returned to a dial testing platform, the method includes: giving a return dial test result: s, the type is a string, S consists of characters s=s1s2s3..sn, one letter for each si, given idx (si) =ascii (si) +1, where ASCII (si) represents the ASCII code value of the letter si. The method comprises the steps of obtaining the characteristic of limited length and small change of a dial testing result, and constructing a dial testing result character string hash by adopting a natural overflow method, wherein the dial testing result character string hash function is as follows: h [ i ] = (H [ i-1 ]. Times.base+idx (si))% MOD, where H represents a hash function and H [ i ] represents a hash value of a [0-i ] string.
Specifically, in constructing a string hash of an expected result and an actual result in some embodiments of the invention, it includes: and (3) acquiring a string Hash value of S=s1s2s3..sn, which returns a dial test result, wherein the Hash [ i ], i epsilon [0, n ] is a substring, the actual result is set as S=sls2s3..sr, wherein l is a starting position, r is an ending position, and MOD is to be taken for the Hash value. The hash value of the actual returned result is calculated from subh= ((hr-hr)% manager-l+1)% mod+mod+1)% MOD. And acquiring expected return result configuration in the dialing test rule, and acquiring a hash value of the expected result string according to the expected return result configuration in the dialing test rule.
In summary, the embodiment of the invention provides a method for automatic dial testing of distributed service, which can be executed aiming at specific dial testing tasks by configuring dial testing information, thereby enhancing flexibility and customizability during dial testing. And meanwhile, in the execution process of the dial testing task, the contents returned by the dial testing are acquired, and the analysis result is analyzed according to the contents. And further, a large amount of dial testing data can be effectively understood and processed in the dial testing process, so that the data processing capacity is improved. Secondly, not only the returned contents of the dial test are obtained and analyzed, but also the analysis results of the contents are subjected to consistency verification with the expected results. The design ensures that data anomalies can be found in time, thereby improving the stability and reliability of the system. And then, in the consistency verification of the dial testing result, when the verification result is inconsistent with the expected result, setting a real-time alarm according to an alarm rule, wherein the verification efficiency is higher than that of the traditional analysis method. And a return result is constructed by adopting a character string hash method, so that the complexity of the matching working time of the character strings is reduced, the time complexity is reduced from a linear order to a constant order, the alarm timeliness of an abnormal result is improved, and the interface abnormal situation is found in time. Finally, compared with the traditional dial testing method, the machine learning training prediction is supported on the dial testing result, the intelligent variable interval dial testing strategy is generated according to the prediction result, the system pressure is reduced, and the dial testing alarm efficiency is further effectively improved.
As shown in fig. 2 and fig. 3, in some embodiments of the present invention, there is further provided an implementation apparatus of a method based on a distributed service automatic dial testing, including: the system comprises 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 for configuring the dial testing related configuration and the dial testing task management. The task scheduling module is electrically connected with the configuration management module, and the task scheduling device is used for scheduling the dial testing task. The task execution module is electrically connected with the task scheduling module and is used for executing tasks according to the dial testing tasks scheduled by the task scheduling module. The storage module is respectively and electrically connected with the configuration management module and the task scheduling module and is used for storing configuration information, tasks, notifications, results and other information. The notification module is used for sending notification information under the condition that the dialing test result triggers an alarm.
It can be understood that the configuration management module can conveniently configure the dial testing related configuration and dial testing task management, so that the device can flexibly adapt to different testing requirements. And secondly, the task scheduling module can schedule the dial testing task according to the configuration of the configuration management module, so that the device can process the testing task efficiently. Meanwhile, the task execution module can execute tasks according to the dial testing tasks scheduled by the task scheduling module, so that the device can accurately execute testing tasks. In addition, the storage module can store configuration information, tasks, notices, results and other information, so that the device can conveniently trace and inquire the test process and the results. And finally, the notification module can send notification information under the condition that the dialing test result triggers an alarm, so that the device can timely send out the alarm information, and a tester can timely find and process the problem.
Specifically, in some embodiments of the present invention, the task scheduling module is further configured to select an appropriate measurement task execution module to execute the measurement task according to the measurement rule.
It can be understood that the task scheduling module can flexibly select a proper dial testing task execution module according to dial testing rules, and different dial testing task execution modules can be optimized and realized according to different dial testing types, authentication modes and the like, so that the dial testing task execution under different scenes and requirements is satisfied. Meanwhile, the dial testing task is distributed to the proper dial testing task execution module, so that overload of a single actuator can be avoided, and the processing capacity and efficiency of the system are improved. Meanwhile, different execution modules can be executed in parallel, so that the concurrent processing capacity of the system is further improved. And secondly, by carrying out modularized design on the dial testing task execution modules, each module is realized and optimized for a specific dial testing task, so that the system structure is clearer and is easy to maintain. Meanwhile, the design is convenient for expanding and adding new functions, and the coupling property of the system is reduced. Finally, by selecting a proper dial testing task execution module according to the dial testing rules, the system can execute the dial testing task more efficiently. Each execution module is optimized for specific dial testing types, authentication modes and the like, task execution can be completed more quickly, and the execution efficiency of the system is improved.
Specifically, in some embodiments of the present invention, the task execution module is further configured to receive a task scheduled by the task scheduling device, and dial-up the task in a complex network environment, where the task execution module is further configured to execute the dial-up task and return a dial-up result.
It can be understood that the task execution module can automatically receive the task scheduled by the task scheduling device and automatically execute the dial testing task without manual intervention, so that the automation degree and the efficiency of the system are improved. Secondly, the task execution module is adapted to different network environments and complex network conditions by executing the dial testing task under the complex network environment and returning the dial testing result, so that the system can better meet the actual requirements. In addition, the task scheduled by the task scheduling device is received and executed in real time, and a dial testing result is returned in real time, so that the system can quickly respond and solve the problems in a network or an application program, and the instantaneity and the response speed of the system are improved. Finally, through the automatic execution of the task execution module and the real-time return of the result, human operation errors and mistakes can be reduced, and the reliability and stability of the system are improved. Meanwhile, the system can automatically analyze and process the dial testing result, and more accurate and reliable monitoring and management data are provided.
Specifically, in some embodiments of the invention the configuration management module comprises: the system comprises a rule management unit, a type management unit, an authentication management unit, a task management unit, a result comparison mode unit, a notification management unit, an alarm contact/group management unit and a resolution engine management unit. The rule management unit is used for managing the configuration of the measured rule. The type management unit is used for managing the configuration of the type of the dial testing. The authentication management unit is used for managing the authentication mode of the dial testing design. The task management unit is used for managing the configuration of the dial testing task. The result comparison mode unit is used for managing the configuration of the analysis engine for returning the result of the dial testing task. The notification management unit is used for managing the configuration of the alarm information notification. The alarm contact person/group management unit is used for managing the contact person and group responsible for managing and receiving alarm information. And the analysis engine management unit is used for managing an analysis engine for analyzing the measured returned content.
It can be appreciated that the requirements and the use scenarios of different users can be more flexibly met through configuration management of each unit. The rule management unit, the type management unit, the authentication management unit, the task management unit and the like are respectively managed for different configuration items, so that a user can customize and configure according to own requirements. Second, by dividing the configuration management module into a plurality of units, the user can more conveniently manage and operate. Each unit has specific functions and responsibilities, and a user can quickly find and configure the corresponding unit according to the needs, so that the management efficiency is improved. In addition, the design of multiple units and multiple modules enables the configuration management module to have good expansibility. If new configuration items or functions need to be added, only new units or modules need to be added correspondingly, and the whole system does not need to be modified and upgraded in a large scale, so that the coupling and complexity of the system are reduced. Finally, the authentication mode of the dial testing design is managed by the authentication management unit, so that the dial testing task configuration and management can be ensured only by authorized users or groups, and the safety and reliability of the system are improved.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flowchart and/or block of the flowchart illustrations and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical aspects of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those of ordinary skill in the art that: modifications and equivalents may be made to the specific embodiments of the invention without departing from the spirit and scope of the invention, which is intended to be covered by the claims.

Claims (10)

1. A method for automatic dial testing of distributed services, comprising:
configuring dial testing information, and executing dial testing tasks according to the configured dial testing information;
acquiring a dial testing return content in the execution of a dial testing task, and analyzing an analysis result of the dial testing return content according to the dial testing return content;
performing consistency verification between the analysis result of the dial-test returned content and the expected result of the dial-test returned content according to the dial-test returned content, wherein the consistency verification is performed on the analysis result of the dial-test returned content;
if the analysis result of the dial testing return content is consistent with the expected result of the dial testing return content, storing the analysis result of the dial testing return content;
if the analysis result of the dial testing return content is inconsistent with the expected result of the dial testing return content, storing the analysis result of the dial testing return content, and carrying out consistency verification again between the analysis result of the dial testing return content and the expected result of the dial testing return content according to the alarm strategy configuration condition, wherein,
and if the analysis result of the dial testing returned content is inconsistent with the expected result of the dial testing returned content and the consistency verification reaches the preset times, sending a dial testing alarm notice.
2. The method for automatic dial testing of distributed service according to claim 1, wherein when configuring dial testing information, comprising:
configuring the type of the dial testing, the authentication mode of the dial testing, the rule of the dial testing and the task of the dial testing;
and configuring an analysis engine, a comparison mode of the dialing test result and a task executor.
3. The method for automatic dial testing of distributed service according to claim 2, wherein when performing dial testing task according to the configured dial testing information, the method comprises:
acquiring the task type of an online task executor and the measured task information;
extracting the type of the dial testing task in the dial testing task information;
acquiring an execution strategy of the configured dial-up test task, and matching the dial-up test task with the online task executor based on the type of the dial-up test task according to the execution strategy of the dial-up test task;
scheduling the measured task to the online task executor successfully matched with the measured task according to a matching result, and controlling the task executor to perform the measured task;
and acquiring a dial testing result of the task executor, and returning the dial testing result to a dial testing platform.
4. The method for automatic dial testing of distributed service according to claim 3, wherein when obtaining dial testing return content in execution of dial testing task and analyzing the analysis result of the dial testing return content according to the dial testing return content, the method comprises:
establishing a dial testing result character string hash for the dial testing result returned to the dial testing platform;
and constructing the string hash of the expected result and the actual result, and obtaining a consistency verification result between the established string hash of the dial test result and the string hash of the expected result and the actual result according to an equivalent formula.
5. The method for automatic dial testing of distributed service according to claim 4, wherein when establishing a dial testing result string hash for the dial testing result returned to the dial testing platform, comprising:
giving a return dial test result: s, the type is a string, S consists of characters s=s1s2s3..sn, one letter for each si, given idx (si) =ascii (si) +1, where ASCII (si) represents the ASCII code value of the letter si;
the characteristic that the length of the dial testing result is limited and the change is small is obtained, and a natural overflow method is adopted to construct the dial testing result character string hash, wherein the dial testing result character string hash function is as follows: h [ i ] = (H [ i-1 ]. Times.base+idx (si))% MOD, where H represents a hash function and H [ i ] represents a hash value of a [0-i ] string.
6. The method for automatic dial testing of distributed services according to claim 5, wherein when constructing a hash of the expected result and the actual result, comprising:
obtaining a string Hash value of s=s1s2s3..sn of the returned dial test result, wherein the Hash [ i ], i epsilon [0, n ] is a substring, the actual result is set as s=sls2s3..sr, wherein l is a starting position, r is an ending position, and MOD is to be taken for the Hash value;
calculating the hash value of the actual returned result according to subH= ((Hr-Hl-r) Baser-l+1)% MOD+MOD+1)% MOD;
and acquiring expected return result configuration in the dialing test rule, and acquiring a hash value of an expected result string according to the expected return result configuration in the dialing test rule.
7. An implementation apparatus based on the method for automatic dial testing of distributed services according to any of claims 1-6, comprising:
the configuration management module is used for configuring the dialing test related configuration and the dialing test task management;
the task scheduling module is electrically connected with the configuration management module, and the task scheduling device is used for scheduling the dial testing task;
the task execution module is electrically connected with the task scheduling module and is used for executing tasks according to the dial testing tasks scheduled by the task scheduling module;
The storage module is respectively and electrically connected with the configuration management module and the task scheduling module and is used for storing configuration information, tasks, notifications, results and other information;
and the notification module is used for sending notification information under the condition that the dialing test result triggers an alarm.
8. The apparatus for implementing the distributed service automatic measurement method according to claim 7, wherein the task scheduling module is further configured to select an appropriate measurement task execution module to execute the measurement task according to a measurement rule.
9. The apparatus for implementing the distributed service automatic measurement method according to claim 8, wherein the task execution module is further configured to receive a task scheduled by the task scheduling device and perform task measurement in a complex network environment, and the task execution module is further configured to execute a measurement task and return a measurement result.
10. The apparatus for implementing the method for automatic dial testing of distributed service according to claim 7, wherein the configuration management module comprises:
a rule management unit, configured to manage configuration of the dial testing rule;
a type management unit, configured to manage the configuration of the dial testing type;
The authentication management unit is used for managing the authentication mode of the dial testing design;
the task management unit is used for managing the configuration of the dial-up testing task;
the result comparison mode unit is used for managing the configuration of an analysis engine for returning the result of the dial-up test task;
a notification management unit for managing the configuration of the alarm information notification;
the alarm contact person/group management unit is used for managing the contact person and group responsible for managing and receiving alarm information;
and the analysis engine management unit is used for managing an analysis engine for analyzing the measured returned content.
CN202311702658.2A 2023-12-12 2023-12-12 Method and device for automatic dial testing of distributed service Pending CN117857381A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311702658.2A CN117857381A (en) 2023-12-12 2023-12-12 Method and device for automatic dial testing of distributed service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311702658.2A CN117857381A (en) 2023-12-12 2023-12-12 Method and device for automatic dial testing of distributed service

Publications (1)

Publication Number Publication Date
CN117857381A true CN117857381A (en) 2024-04-09

Family

ID=90533492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311702658.2A Pending CN117857381A (en) 2023-12-12 2023-12-12 Method and device for automatic dial testing of distributed service

Country Status (1)

Country Link
CN (1) CN117857381A (en)

Similar Documents

Publication Publication Date Title
CN109446071A (en) Interface test method, interface test device, electronic equipment and storage medium
CN110908909B (en) Automatic test method, device, storage medium and equipment
CN108628748B (en) Automatic test management method and automatic test management system
CN109165170B (en) Method and system for automatic request test
EP4176602A1 (en) Method and apparatus for updating gateway resource, and iot control platform
CN111240973B (en) Equipment testing method and system based on simulation and readable storage medium
CN113419747B (en) Middleware deployment method, device, equipment and storage medium
US20180357143A1 (en) Testing computing devices
CN110833693B (en) Game running method and device, storage medium and electronic device
CN111782635B (en) Data processing method and device, storage medium and electronic device
KR20070080313A (en) Method and system for analyzing performance of providing services to client terminal
US20130031532A1 (en) Method, computer, and device for validating execution of tasks in adaptable computer systems
CN107203464B (en) Method and device for positioning service problem
CN112540924A (en) Interface automation test method, device, equipment and storage medium
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN113778879A (en) Fuzzy test method and device for interface
CN110267215A (en) A kind of data detection method, equipment and storage medium
CN112559343B (en) Test path generation method and related equipment
CN112202647A (en) Test method, device and test equipment in block chain network
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN109274533B (en) Web service fault positioning device and method based on rule engine
CN117857381A (en) Method and device for automatic dial testing of distributed service
CN116955148A (en) Service system testing method, device, equipment, storage medium and product
CN115952098A (en) Performance test tuning scheme recommendation method and system
CN114416596A (en) Application testing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination