Business dial testing method and device, equipment, storage medium and program product
Through automated dialing method, multiple dialing tasks are generated and performed in parallel, and thread resources are allocated using preset scheduling strategies, which solves the problem of low dialing efficiency in the existing technology, and achieves the effect of timely detection of alarms and improving network service reliability. .
Patent Information
- Application Number
- CN202411116079.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-08-14
AI Technical Summary
The existing test method relies on operation and maintenance personnel to implement it, and it is inefficient and difficult to detect alarm problems in a timely manner.
By determining the function to be called, multiple tasks to be called are generated, and thread resources are allocated for each task to be called based on the preset scheduling strategy. The parallel execution method is used to obtain the results of the dialing, and the tasks are processed automatically to improve the dialing efficiency.
There is no need for manual dialing, which significantly improves the dialing efficiency, promptly detects alarm problems, and improves the reliability and user experience of network services.
Smart Images

Figure CN119109836A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network operation and maintenance technology, and in particular to a service dialing method, device, equipment, storage medium and program product. Background Art
[0002] Dial test is a professional term in communication engineering, which refers to the call test inside the communication network to evaluate network performance and availability. Dial test assists operation and maintenance personnel in monitoring network services, discovering and solving potential problems in the network in a timely manner, and improving users' network experience by initiating requests and collecting network response data.
[0003] In different services such as pre-coverage construction of communication networks for homes and enterprises, network adjustment and optimization, etc., users have different demands on the functions (i.e., capabilities) of communication networks or communication systems. For example, in home broadband services and enterprise broadband services, users have different demands on service response functions, signal coverage functions, and wireless network bearer functions.
[0004] In order to ensure the normal operation of communication services, it is necessary to test each function involved in the communication network or communication system in the business to evaluate the availability of each function and determine whether each function meets the user's expectations. If the function cannot meet the user's expectations, an alarm needs to be issued.
[0005] However, the existing dial-up testing method still relies on operation and maintenance personnel to perform the test, which has low efficiency and makes it difficult to detect alarm problems in a timely manner. Summary of the invention
[0006] The present invention provides a service dialing method, device, equipment, storage medium and program product, which are used to solve the defects of the prior art that the dialing method still relies on operation and maintenance personnel to perform, the dialing efficiency is low, and it is difficult to find alarm problems in time.
[0007] The present invention provides a service dialing test method, comprising: determining a function to be dialed; the function to be dialed is determined based on the service to be dialed; generating at least two tasks to be dialed based on the function to be dialed; allocating required thread resources to each task to be dialed based on a preset scheduling strategy to obtain a plurality of tasks to be executed; the tasks to be executed are tasks to be dialed to which required thread resources have been allocated; and executing the tasks to be executed in parallel to obtain a dialing test result of the function to be dialed.
[0008] According to a service dialing method provided by the present invention, based on a preset scheduling strategy, required thread resources are allocated to each task to be dialed and tested, and multiple tasks to be executed are obtained, including: determining the priority of each task to be dialed and tested; based on the priority of each task to be dialed and tested, determining the execution order of each task to be dialed and tested; according to each execution order, the required thread resources are allocated to each task to be dialed and tested in turn, and multiple tasks to be executed are obtained.
[0009] According to a service dialing method provided by the present invention, tasks to be dialed are stored in a task queue; based on a preset scheduling strategy, required thread resources are allocated to each task to be dialed, and multiple tasks to be executed are obtained, including: determining load information of the task queue; based on the load information, determining the task scheduling frequency; based on the task scheduling frequency, determining the execution order of each task to be dialed; according to each execution order, the required thread resources are allocated to each task to be dialed in turn, and multiple tasks to be executed are obtained.
[0010] According to a service dialing test method provided by the present invention, the dialing test result includes a network connection time, a response time and a status code; after executing the tasks to be executed in parallel and obtaining the dialing test result of the function to be dialed, it includes: judging whether the network connection time is less than or equal to a first preset threshold, and whether the response time is less than or equal to a second preset threshold, and whether the status code is consistent with the preset status code; if the network connection time is less than or equal to the first preset threshold, and the response time is less than or equal to the second preset threshold, and the status code is consistent with the preset status code, it is determined that the function to be dialed passes the test.
[0011] According to a service dialing test method provided by the present invention, the dialing test result includes a network connection time, a response time and a status code; after executing the tasks to be executed in parallel and obtaining the dialing test result of the function to be dialed, it includes: judging whether the network connection time is less than or equal to a first preset threshold, and whether the response time is less than or equal to a second preset threshold, and whether the status code is consistent with the preset status code; if the network connection time is greater than the first preset threshold, or the response time is greater than the second preset threshold, or the status code is inconsistent with the preset status code, it is determined that the function to be dialed has not passed the test, and an alarm message is generated.
[0012] According to a service dialing test method provided by the present invention, determining a function to be dialed includes: determining a service scenario of the service to be dialed and at least one service function of the service to be dialed; and arranging each service function based on the service scenario to obtain the function to be dialed.
[0013] The present invention also provides a service dialing test device, comprising: a determination module, used to determine a function to be dialed; the function to be dialed is determined based on the service to be dialed; a generation module, used to generate at least two tasks to be dialed based on the function to be dialed; a scheduling module, used to allocate required thread resources to each task to be dialed based on a preset scheduling strategy, and obtain multiple tasks to be executed; the task to be executed is a task to be dialed to which the required thread resources have been allocated; and a dialing test module, used to execute the tasks to be executed in parallel to obtain the dialing test results of the function to be dialed.
[0014] The present invention also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any one of the above-mentioned service dialing methods is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the service dialing method described in any one of the above is implemented.
[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the service dialing method described above is implemented.
[0017] The service dialing test method, device, equipment, storage medium and program product provided by the present invention determine the function to be dialed; the function to be dialed is determined based on the service to be dialed; based on the function to be dialed, at least two tasks to be dialed are generated; based on the preset scheduling strategy, the required thread resources are allocated to each task to be dialed, and multiple tasks to be executed are obtained; the tasks to be executed are tasks to be dialed that have been allocated the required thread resources; the tasks to be executed are executed in parallel to obtain the dialing test results of the function to be dialed. Through the above method, at least two tasks to be dialed are generated based on the function to be dialed, and then the required thread resources are allocated to each task to be dialed based on the preset scheduling strategy to obtain multiple tasks to be executed. The dialing test results of the function to be dialed can be obtained by automatically executing the tasks to be executed in parallel, without the need for operation and maintenance personnel to perform manual dialing tests, which can effectively improve the dialing test efficiency and timely discover alarm problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a flow chart of the service dialing method provided by the present invention.
[0020] Figure 2 It is a structural schematic diagram of the service dialing and testing device provided by the present invention.
[0021] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] It should be noted that in the description of the present invention, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. The orientation or position relationship indicated by the terms "upper", "lower" and the like is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0024] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0025] See also Figure 1 , Figure 1 1 is a flow chart of the service dialing method provided by the present invention. In this embodiment, the service dialing method is applied to an automated dialing tool and automatically executed by the automated dialing tool. The service dialing method includes steps S110 to S140, and each step is as follows: S110: Determine the function to be tested.
[0026] The function to be tested is determined based on the service to be tested.
[0027] Specifically, a service scenario of the service to be tested and at least one service function of the service to be tested are determined.
[0028] Optionally, for each business scenario or each business function, a corresponding operation and maintenance personnel (ie, scenario stakeholders) is pre-designated as a dialing test unit, and each business function involved in each dialing test unit must be dialed.
[0029] Furthermore, based on the business scenario, each business function is arranged to obtain the function to be dialed and tested.
[0030] Specifically, the automated dialing test tool can provide capability (i.e., function) management functions, orchestrate each business function based on the business scenario, and determine the functions to be dialed.
[0031] The automated dialing tool can make business scenarios specific by arranging and combining capabilities. It can also support the implementation of business scenarios of different levels, such as general, important, and very important, by adjusting the priority and affinity of capability scheduling.
[0032] S120: Generate at least two tasks to be tested based on the test function to be tested.
[0033] In this embodiment, for each function to be tested, the request parameters of the function to be tested are first set and adjusted.
[0034] For example, the query function for home broadband coverage requires a nine-level address as a service request parameter. The automated dialing tool can support the setting and adjustment of the nine-level address for this function.
[0035] It can be understood that the number and type of request parameters required to be set for each function to be tested may be different.
[0036] After the request parameters of the function to be tested are set, at least two tasks to be tested may be generated for each function to be tested.
[0037] For example, there are multiple service request parameters set for a function to be tested. Different service request parameters are used to test different performances of the function to be tested (such as network reachability, response time, failure rate, etc.). Based on the performance differences required to be tested, multiple tasks to be tested can be generated for business simulation testing.
[0038] S130: Allocate required thread resources to each task to be tested based on a preset scheduling strategy, and obtain a plurality of tasks to be executed.
[0039] The tasks to be executed are tasks to be dialed and tested that have been allocated the required thread resources.
[0040] In this embodiment, the service dialing test method is applied to an automated dialing test tool, and the automated dialing test tool includes a scheduler and an executor.
[0041] Among them, the scheduler is implemented based on scheduling strategy and queue technology, and the executor is implemented based on thread pool technology and WebFlux non-blocking technology.
[0042] Specifically, the scheduler is used to implement the scheduling of tasks to be dialed and tested, so a variety of preset scheduling strategies are set in the scheduler.
[0043] Optionally, the preset scheduling policy includes a priority-based scheduling policy and / or a queue load-based scheduling policy.
[0044] Among them, the priority-based scheduling strategy refers to determining the execution order of each task to be dialed based on the priority of each task to be dialed; the priority of the task to be dialed is dynamically determined based on the importance or urgency of the task, and the purpose of adjusting the execution order of the task to be dialed is achieved by dynamically adjusting the priority of the task to be dialed.
[0045] The scheduling strategy based on queue load refers to dynamically adjusting the scheduling frequency of the tasks to be tested according to the load information of the task queue. For example, the execution order of each task to be tested is determined with the goal of minimizing the overall scheduling frequency, and dynamic scheduling is performed according to the load of the task queue.
[0046] In this embodiment, the storage of tasks to be dialed and tested is achieved through queue technology.
[0047] Specifically, the scheduler uses ConcurrentLinkedQueue as a task queue to store tasks to be dialed. Through queue technology, the scheduler can queue and schedule tasks to be dialed, ensure the sequential execution or asynchronous processing of tasks to be dialed, and provide a thread-safe operation interface to ensure data consistency and reliability in a multi-threaded environment.
[0048] Executors are used to execute tasks and generate result feedback.
[0049] There are multiple tasks to be tested. To improve the testing efficiency, the ThreadPoolExecutor thread pool technology can be used in the executor: the executor can manage the thread resources required for the execution of each task to be tested through the ThreadPoolExecutor thread pool, realize thread reuse and life cycle management, and thus improve the overall performance and resource utilization of the system. The executor can obtain threads from the thread pool and execute tasks according to the characteristics and requirements of the tasks to be tested.
[0050] In addition, the executor uses WebFlux non-blocking technology as an asynchronous execution mechanism for processing tasks. Using the Spring WebFlux framework to implement non-blocking task processing can handle a large number of concurrent requests, improve the system's throughput and response speed, and is suitable for processing high-concurrency dial-up tasks.
[0051] Specifically, the scheduler may determine the execution order of each task to be tested based on a preset scheduling strategy; the executor allocates required thread resources to each task to be tested according to the execution order of each task to be tested, thereby obtaining multiple tasks to be executed.
[0052] The tasks to be executed are tasks to be dialed and tested that have been allocated required thread resources.
[0053] The automated dialing tool can achieve efficient scheduling and execution of tasks through the mutual cooperation between the scheduler and the executor, combined with various technical means such as scheduling strategies, queue technology, thread pool technology, and WebFlux non-blocking technology, to ensure the efficiency, accuracy, and reliability of the dialing process.
[0054] S140: Execute the tasks to be executed in parallel to obtain the dialing test result of the function to be dialed.
[0055] Optionally, the dial test result includes various data, such as network connection time, response time, status code, packet loss rate and latency.
[0056] Optionally, the automated dialing test tool supports setting of generated dialing test results.
[0057] For example, for the function of acquiring customer transmission equipment, the automated dialing tool supports the setting of the data format and content of the dialing results. The dialing results are set to use a unified JSON data format, and the attribute that the dialing results must include the device name can be set. By designing simulation parameters, the flexibility and precision of the dialing process can be improved.
[0058] The service dialing test method provided in this embodiment determines the function to be dialed; the function to be dialed is determined based on the service to be dialed; based on the function to be dialed, at least two tasks to be dialed are generated; based on the preset scheduling strategy, the required thread resources are allocated to each task to be dialed, and multiple tasks to be executed are obtained; the tasks to be executed are tasks to be dialed that have been allocated the required thread resources; the tasks to be executed are executed in parallel to obtain the dialing test results of the function to be dialed. Through the above method, at least two tasks to be dialed are generated based on the function to be dialed, and then the required thread resources are allocated to each task to be dialed based on the preset scheduling strategy to obtain multiple tasks to be executed. The dialing test results of the function to be dialed can be obtained by automatically executing the tasks to be executed in parallel, without the need for operation and maintenance personnel to perform manual dialing tests, which can effectively improve the dialing test efficiency and timely discover alarm problems.
[0059] In some embodiments, based on a preset scheduling strategy, required thread resources are allocated to each task to be dialed and tested, and multiple tasks to be executed are obtained, including: determining the priority of each task to be dialed and tested; based on the priority of each task to be dialed and tested, determining the execution order of each task to be dialed and tested; according to each execution order, the required thread resources are allocated to each task to be dialed and tested in turn, and multiple tasks to be executed.
[0060] Specifically, the tasks to be dialed and tested are stored in the ConcurrentLinkedQueue task queue.
[0061] Generally, in the ConcurrentLinkedQueue task queue, each task to be tested can be arranged in order of task generation time. The executor can simultaneously extract multiple tasks to be tested according to the order of task generation time, and allocate the required thread resources to each task to be tested, obtain multiple tasks to be executed, and execute multiple tasks to be executed in parallel.
[0062] However, in actual scenarios, different tasks to be tested have different importance or urgency. Therefore, it is unreasonable to obtain the tasks to be tested only based on the generation time of the tasks.
[0063] Based on this, this embodiment introduces a priority-based scheduling strategy to ensure that urgent tasks can be executed first.
[0064] Specifically, after obtaining a plurality of tasks to be dialed and tested, firstly, the priority of each task to be dialed and tested is determined according to the importance or urgency of each task to be dialed and tested.
[0065] Furthermore, based on the priority of each task to be tested, the execution order of each task to be tested is determined.
[0066] Specifically, the higher the priority, the more important or urgent the task is, and it needs to be executed first, and the execution order is higher; the lower the priority, the less important or urgent the task is, and it can be delayed, and the execution order is later.
[0067] Furthermore, the executor may sequentially obtain each task to be tested according to the execution order of each task to be tested, and allocate required thread resources to each task to be tested, thereby generating a plurality of tasks to be executed.
[0068] Furthermore, a plurality of tasks to be executed that have been allocated required thread resources are executed in parallel.
[0069] In some embodiments, the tasks to be dialed are stored in a task queue.
[0070] Based on a preset scheduling strategy, required thread resources are allocated to each task to be dialed and tested, and multiple tasks to be executed are obtained, including: determining the load information of the task queue; determining the task scheduling frequency based on the load information; determining the execution order of each task to be dialed and tested based on the task scheduling frequency; and allocating required thread resources to each task to be dialed and tested in turn according to each execution order, and multiple tasks to be executed are obtained.
[0071] In actual scenarios, the generation speed of tasks to be tested is not completely consistent with the execution speed of tasks to be executed. Therefore, the ConcurrentLinkedQueue task queue can be used to temporarily store tasks to be tested that have not been allocated the required thread resources, waiting for the executor to execute.
[0072] However, if the generation speed of the tasks to be dialed is too fast, it may cause the task queue to be overloaded, affecting the scheduling efficiency.
[0073] Based on this, this embodiment introduces a scheduling strategy based on queue load to ensure that the queue load is controllable and avoid affecting the operating efficiency of the automated dialing tool.
[0074] Specifically, the load information of the task queue is determined.
[0075] Optionally, the load information includes free storage space and used storage space of the task queue, etc.
[0076] Furthermore, based on the load information, the task scheduling frequency is determined; based on the task scheduling frequency, the execution order of each task to be dialed and tested is determined.
[0077] For example, with the goal of minimizing the overall scheduling frequency, determine the execution order of each task to be dialed.
[0078] Furthermore, according to each execution order, required thread resources are allocated to each task to be tested in turn, so as to obtain a plurality of tasks to be executed.
[0079] In some embodiments, the dial test result includes network connection time, response time and status code.
[0080] After executing the tasks to be executed in parallel and obtaining the dialing test results of the function to be tested, it includes: judging whether the network connection time is less than or equal to a first preset threshold, whether the response time is less than or equal to a second preset threshold, and whether the status code is consistent with the preset status code; if the network connection time is less than or equal to the first preset threshold, and the response time is less than or equal to the second preset threshold, and the status code is consistent with the preset status code, it is determined that the function to be tested has passed the test.
[0081] Specifically, the dial test result includes multiple network dial test indicators; the network dial test indicators include but are not limited to network connection time, response time and status code.
[0082] After obtaining the dial test results, the value of each network dial test indicator can be used to determine whether the function to be tested has passed the test, that is, whether it meets user expectations.
[0083] Specifically, it is determined whether the network connection duration is less than or equal to a first preset threshold, whether the response duration is less than or equal to a second preset threshold, and whether the status code is consistent with a preset status code.
[0084] If the network connection duration is less than or equal to the first preset threshold, and the response duration is less than or equal to the second preset threshold, and the status code is consistent with the preset status code, it is determined that the function to be dialed passes the test.
[0085] Please refer to Table 1, which shows three network dialing indicators and related preset threshold settings.
[0086] Table 1
[0087] Optionally, according to different business functions, the network dialing test indicators and the corresponding preset thresholds in Table 1 can be adjusted to suit the characteristics of the business functions.
[0088] It is understandable that different businesses may require the same function (ie, capability). However, for the same function, different businesses may have different requirements for the function.
[0089] Please refer to Table 2, which shows the requirements of different businesses for the same function, where different business field names are used to identify different businesses.
[0090] Table 2
[0091] In some embodiments, the dial test result includes network connection time, response time and status code.
[0092] After executing the tasks to be executed in parallel and obtaining the dialing test results of the function to be tested, it includes: judging whether the network connection time is less than or equal to the first preset threshold, and whether the response time is less than or equal to the second preset threshold, and whether the status code is consistent with the preset status code; if the network connection time is greater than the first preset threshold, or the response time is greater than the second preset threshold, or the status code is inconsistent with the preset status code, it is determined that the function to be tested has not passed the test, and an alarm message is generated.
[0093] After receiving the alarm information, relevant operation and maintenance personnel need to be notified to carry out subsequent maintenance.
[0094] In some embodiments, determining the function to be tested includes: determining a service scenario of the service to be tested and at least one service function of the service to be tested; and arranging each service function based on the service scenario to obtain the function to be tested.
[0095] The present invention also provides a service dialing method. Figure 2 , Figure 2 In this embodiment, the service dialing device comprises a determination module 210 , a generation module 220 , a scheduling module 230 and a dialing module 240 .
[0096] The determination module 210 is used to determine the function to be tested.
[0097] The function to be tested is determined based on the service to be tested.
[0098] The generating module 220 is used to generate at least two tasks to be tested based on the function to be tested.
[0099] The scheduling module 230 is used to allocate required thread resources to each task to be dialed and tested based on a preset scheduling strategy to obtain multiple tasks to be executed.
[0100] The tasks to be executed are tasks to be dialed and tested that have been allocated the required thread resources.
[0101] The dialing test module 240 is used to execute the tasks to be executed in parallel and obtain the dialing test results of the functions to be tested.
[0102] In some embodiments, the scheduling module 230 is used to determine the priority of each task to be tested; determine the execution order of each task to be tested based on the priority of each task to be tested; and allocate required thread resources to each task to be tested in turn according to each execution order to obtain multiple tasks to be executed.
[0103] In some embodiments, the tasks to be dialed are stored in a task queue.
[0104] The scheduling module 230 is used to determine the load information of the task queue; determine the task scheduling frequency based on the load information; determine the execution order of each task to be dialed based on the task scheduling frequency; and allocate the required thread resources to each task to be dialed in turn according to each execution order to obtain multiple tasks to be executed.
[0105] In some embodiments, the dial test result includes network connection time, response time and status code.
[0106] The service dialing test device also includes a judgment and analysis module. The judgment and analysis module is used to execute the tasks to be executed in parallel, and after obtaining the dialing test result of the function to be dialed, it includes: judging whether the network connection time is less than or equal to the first preset threshold, and whether the response time is less than or equal to the second preset threshold, and whether the status code is consistent with the preset status code; if the network connection time is less than or equal to the first preset threshold, and the response time is less than or equal to the second preset threshold, and the status code is consistent with the preset status code, it is determined that the function to be dialed passes the test.
[0107] In some embodiments, the dial test result includes network connection time, response time and status code.
[0108] The judgment and analysis module is used to judge whether the network connection duration is less than or equal to a first preset threshold, whether the response duration is less than or equal to a second preset threshold, and whether the status code is consistent with the preset status code; if the network connection duration is greater than the first preset threshold, or the response duration is greater than the second preset threshold, or the status code is inconsistent with the preset status code, it is determined that the function to be dialed has not passed the test, and an alarm message is generated.
[0109] In some embodiments, the determination module 210 is used to determine a service scenario of the service to be tested and at least one service function of the service to be tested; based on the service scenario, each service function is arranged to obtain the function to be tested.
[0110] The present invention also provides an electronic device, Figure 3 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communications interface 320 and the memory 330 communicate with each other via the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the service dialing method.
[0111] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0112] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the service dialing method provided by the above methods is implemented.
[0113] The present invention also provides a computer program product, which includes a computer program. The computer program can be stored in a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the service dialing method provided by the above methods.
[0114] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A service dialing method, It is characterized in that include: Determine the function to be tested; the function to be tested is determined based on the service to be tested; Based on the pending test function, generating at least two pending test tasks; Based on a preset scheduling strategy, the required thread resources are allocated to each of the tasks to be dialed and tested, so as to obtain a plurality of tasks to be executed; the tasks to be executed are the tasks to be dialed and tested that have been allocated the required thread resources; The tasks to be executed are executed in parallel to obtain the dialing test results of the functions to be tested.
2. The service dialing method according to claim 1, It is characterized in that The method of allocating required thread resources to each of the tasks to be tested based on the preset scheduling strategy to obtain multiple tasks to be executed includes: Determining the priority of each of the tasks to be dialed and tested; Determining the execution order of each of the tasks to be dialed and tested based on the priority of each of the tasks to be dialed and tested; According to each execution order, required thread resources are allocated to each of the tasks to be dialed and tested in turn, so as to obtain a plurality of tasks to be executed.
3. The service dialing method according to claim 1, It is characterized in that The tasks to be dialed and tested are stored in a task queue; The method of allocating required thread resources to each of the tasks to be tested based on the preset scheduling strategy to obtain multiple tasks to be executed includes: Determining load information of the task queue; Based on the load information, determining a task scheduling frequency; Based on the task scheduling frequency, determining the execution order of each of the tasks to be dialed and tested; According to each execution order, required thread resources are allocated to each of the tasks to be dialed and tested in turn, so as to obtain a plurality of tasks to be executed.
4. The service dialing method according to claim 1, It is characterized in that The dial test results include network connection duration, response duration and status code; After executing the tasks to be executed in parallel and obtaining the dialing test result of the function to be dialed, the method includes: Determine whether the network connection duration is less than or equal to a first preset threshold, whether the response duration is less than or equal to a second preset threshold, and whether the status code is consistent with a preset status code; If the network connection duration is less than or equal to a first preset threshold, and the response duration is less than or equal to a second preset threshold, and the status code is consistent with a preset status code, it is determined that the function to be tested passes the test.
5. The service dialing method according to claim 1, It is characterized in that The dial test results include network connection duration, response duration and status code; After executing the tasks to be executed in parallel and obtaining the dialing test result of the function to be dialed, the method includes: Determine whether the network connection duration is less than or equal to a first preset threshold, whether the response duration is less than or equal to a second preset threshold, and whether the status code is consistent with a preset status code; If the network connection duration is greater than a first preset threshold, or the response duration is greater than a second preset threshold, or the status code is inconsistent with a preset status code, it is determined that the function to be tested has failed the test, and an alarm message is generated.
6. The service dialing method according to claim 1, It is characterized in that The step of determining the function to be dialed and tested includes: Determine a service scenario of the service to be tested and at least one service function of the service to be tested; Based on the business scenario, each of the business functions is arranged to obtain the function to be dialed and tested.
7. A service dialing device, It is characterized in that include: A determination module, used to determine a function to be tested; the function to be tested is determined based on the service to be tested; A generating module, used for generating at least two tasks to be tested based on the function to be tested; A scheduling module, used to allocate required thread resources to each of the tasks to be dialed and tested based on a preset scheduling strategy, and obtain multiple tasks to be executed; the tasks to be executed are tasks to be dialed and tested that have been allocated required thread resources; The dialing test module is used to execute the tasks to be executed in parallel and obtain the dialing test results of the functions to be tested.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the service dialing method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the service dialing method according to any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the service dialing method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Thread group address space scheduling and thread switching method under multi-core environment
CN101923491A
Visualized automatic dial testing method and system
CN105183648A
Service dial testing method, device and system and storage medium
CN111221714A
Object testing method and device, electronic equipment and storage medium
CN116955146A
Information processing apparatus and storage medium storing execution control program
US20200310869A1
