Network connectivity detection method and device, server and storage medium

By conducting network connectivity detection before the service release process, the defect of the existing technology that cannot detect server-side connectivity problems in time is solved, the failure rate is significantly reduced, and the user experience and enterprise benefits are improved.

CN118764408APending Publication Date: 2024-10-11NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410781864.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing network monitoring solutions cannot detect server connectivity problems in a timely and effective manner, resulting in frequent server failures, affecting user experience and business losses.

Method used

Send pre-detection commands to the test equipment through the process orchestration device, obtain the attribute information of the tasks to be run, determine the detection target, and perform network connectivity detection. Based on the detection results, decide whether to start the service release process and ensure that the service release process is detected before starting. Network connectivity.

Benefits of technology

Timely detection of network connectivity problems significantly reduces the probability of failure after the service release process, improving user experience and enterprise benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764408A_ABST
    Figure CN118764408A_ABST
Patent Text Reader

Abstract

The invention provides a network connectivity detection method and device, a server and a storage medium, and relates to the technical field of network detection. The method comprises the following steps: receiving a pre-detection command which is sent by process arrangement equipment and aims at a service release process; in response to the pre-detection command, acquiring attribute information of the to-be-run task; determining a detection target according to the attribute information of the to-be-operated task, and operating the to-be-operated task to perform network connectivity detection on the detection target to obtain a network connectivity detection result of the detection target; and sending the network connectivity detection result to the process arrangement equipment, so that the process arrangement equipment determines whether to control the detection target to start the service release process or not according to the network connectivity detection result. According to the technical scheme of the invention, the network connectivity of the detection target is detected in advance through the prepositive detection command before the service release process is started, so that the problem of the network connectivity can be timely and effectively found, and the probability of fault occurrence is greatly reduced after the service release process is started.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network detection technology, and in particular to a network connectivity detection method, device, server and storage medium. Background Art

[0002] In recent years, server-side connectivity failures have occurred frequently. Such failures are usually caused by abnormal communication on the product server, such as the inability to connect the game process, game access billing failure, game access database failure, etc. Frequent server-side connectivity failures will affect user experience and cause losses to the company.

[0003] In the related art, after the server is turned on, a network monitoring solution is used to perform network connectivity detection. However, the network monitoring solution is a post-event solution and cannot promptly and effectively discover problems with network connectivity. Summary of the invention

[0004] The purpose of this application is to provide a network connectivity detection method, device, server and storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the above-mentioned technical problems existing in the related art.

[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a network connectivity detection method, which is applied to a test device, and the method includes:

[0007] Receive a pre-detection command for a service publishing process sent by a process orchestration device;

[0008] In response to the pre-detection command, obtaining attribute information of the task to be run;

[0009] Determine a detection target according to the attribute information of the task to be run, and run the task to be run to perform a network connectivity test on the detection target to obtain a network connectivity test result of the detection target;

[0010] The network connectivity detection result is sent to the process orchestration device, so that the process orchestration device determines whether to control the detection target to start the service publishing process according to the network connectivity detection result.

[0011] In a second aspect, an embodiment of the present application further provides a network connectivity detection method, which is applied to a process orchestration device, and the method includes:

[0012] Sending a pre-detection command for a service publishing process to a test device, so that the test device responds to the pre-detection command, obtains attribute information of a task to be run, determines a detection target according to the attribute information of the task to be run, and runs the task to be run to perform a network connectivity detection on the detection target, thereby obtaining a network connectivity detection result of the detection target;

[0013] Receiving the network connectivity detection result sent by the test device;

[0014] If the network connectivity detection result indicates that the network of the detection target is connected, controlling the detection target to start the service publishing process;

[0015] If the network connectivity detection result indicates that the network of the detection target is not connected, the detection target is controlled to stop starting the service publishing process.

[0016] In a third aspect, an embodiment of the present application further provides a server, comprising: a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the network connectivity detection method described in any one of the first aspects above is implemented.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is read and executed, the network connectivity detection method described in any one of the first aspects above is implemented.

[0018] The beneficial effect of the present application is that the embodiment of the present application provides a network connectivity detection method, which includes: receiving a pre-detection command for a service release process sent by a process orchestration device; responding to the pre-detection command, obtaining the attribute information of the task to be run; determining the detection target according to the attribute information of the task to be run, and running the task to be run to perform a network connectivity detection on the detection target, and obtaining the network connectivity detection result of the detection target; sending the network connectivity detection result to the process orchestration device, so that the process orchestration device determines whether to control the detection target to start the service release process according to the network connectivity detection result. The process orchestration device first sends a pre-detection command to the test device, and obtains the network connectivity detection result for the service release process, and then determines whether to control the detection target to start the service release process according to the network connectivity detection result; that is, before starting the service release process, the network connectivity of the detection target is detected in advance through the pre-detection command, so that the problems existing in the network connectivity can be discovered in a timely and effective manner, and after starting the service release process, the probability of failure is also greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 1 ;

[0021] Figure 2 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 2 ;

[0022] Figure 3 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 3 ;

[0023] Figure 4 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 4 ;

[0024] Figure 5 A schematic diagram of module connections for a network connectivity detection method provided in an embodiment of the present application;

[0025] Figure 6 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 5 ;

[0026] Figure 7 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 6 ;

[0027] Figure 8 A grouping diagram provided in the embodiment of the present application Figure 1 ;

[0028] Fig. 9 A grouping diagram provided in the embodiment of the present application Figure 2 ;

[0029] Fig.10 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 7 ;

[0030] Fig.11 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 8 ;

[0031] Fig.12 A schematic diagram of a network connectivity detection device provided in an embodiment of the present application Figure 1 ;

[0032] Fig.13 A schematic diagram of a network connectivity detection device provided in an embodiment of the present application Figure 2 ;

[0033] Fig.14 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0035] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0036] In the description of the present application, it should be noted that if the terms "upper", "lower", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or is the orientation or position relationship in which the product of the application is usually placed when used. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply 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 on the present application.

[0037] In addition, the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.

[0039] In recent years, server-side connectivity failures have occurred frequently. Such failures are usually caused by abnormal communication on the product server, such as the inability to connect the game process, game access billing failure, game access database failure, etc. Frequent server-side connectivity failures will affect user experience and cause losses to the company.

[0040] Reasons for the high incidence of failures: On the one hand, due to the diverse topology of the game server, game processes, games to peripheral systems, and games to DB SaaS (a hosted database service) all need to be interconnected. On the other hand, due to the complex enterprise network environment, problems may arise with vpc peering (a technology used to establish connections between proprietary networks), routing configuration, dx configuration of overseas networks, and improper configuration of the four- and seven-layer whitelists. Based on this background, statistics were collected on all network problems and failures, and it was found that most connectivity failures could be avoided before the service was launched. The network monitoring solutions in the existing technology are all post-discovery solutions, and cannot promptly and effectively discover problems with network connectivity.

[0041] In response to the above-mentioned technical problems existing in the related technologies, an embodiment of the present application provides a network connectivity detection method, in which a process orchestration device first sends a pre-detection command to a test device, and obtains the network connectivity detection result for the service release process fed back by the test device, and then determines whether to control the detection target to start the service release process according to the network connectivity detection result; that is, before starting the service release process, the network connectivity of the detection target is detected in advance through a pre-detection command, so that problems with network connectivity can be discovered in a timely and effective manner, and after starting the service release process, the probability of failure is greatly reduced.

[0042] The following is an explanation of the terms involved in the embodiments of the present application.

[0043] CMDB: Configuration management database refers to a database that stores relevant information about all information technology systems within an organization (including computer systems, network equipment, servers, etc.) and the configuration relationships and dependencies of these systems.

[0044] SSH: Refers to a network protocol that allows secure encrypted communications between a network service provider and a client over an insecure network.

[0045] ssh: In the embodiments of the present application, it generally refers to tools that implement the SSH protocol specification, which provide a user-friendly interface to enable users to establish SSH connections with remote systems, execute remote commands, and other operations.

[0046] Process orchestration system: is a type of release process orchestration tools or platforms that can automate and manage all stages of software development and deployment, from code submission, building, testing to deployment and subsequent monitoring and feedback. These systems usually support custom workflows.

[0047] connex: in the embodiment of the present application, specifically refers to a network detection tool, which serves as the execution end of a specific detection task.

[0048] User task: A user-oriented detection task configuration model that defines a multi-host collaborative detection method.

[0049] A network connectivity detection method provided in an embodiment of the present application is applied to a test device. The following is an explanation of a network connectivity detection method provided in an embodiment of the present application.

[0050] Figure 1 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 1 ,like Figure 1 As shown, the method may include:

[0051] S101: Receive a pre-detection command for a service publishing process sent by a process orchestration device.

[0052] The service release process is a new service deployment process or update process to be released. The pre-detection command is essentially a detection command before starting the service release process.

[0053] In some implementations, the process orchestration device determines a test device associated with a service release process from a plurality of preset test devices, and then sends a pre-detection command for the service release process to the test device, and the test device can receive the pre-detection command for the service release process.

[0054] S102: Respond to the pre-detection command and obtain attribute information of the task to be executed.

[0055] A network detection tool may be run on the test device, for example, the network detection tool may be connex.

[0056] In an embodiment of the present application, the test device responds to a pre-detection command, and the test device uses a network detection tool to obtain a list of tasks to be run; obtains attribute information of the tasks to be run from the list of tasks to be run, and the list of tasks to be run may include: attribute information of at least one task to be run.

[0057] S103: determining a detection target according to the attribute information of the task to be run, and running the task to be run to perform a network connectivity test on the detection target to obtain a network connectivity test result of the detection target.

[0058] In some embodiments, a source detection target and a destination detection target are determined based on attribute information of the task to be run, and a test device runs the task to be run based on the attribute information of the task to be run, and sends a network connectivity detection command to the source detection target and the destination detection target to detect the network connectivity between the source detection target and the destination detection target, thereby obtaining a network connectivity detection result of the detection target.

[0059] It should be noted that the test equipment is associated with the service release process, and the detection target determined in the test equipment according to the attribute information of the task to be run is also related to the service release process. In fact, the service release process is ultimately required to be started by the detection target. Therefore, before the service release process is started, the network connectivity of the detection target is tested in advance.

[0060] S104: Send the network connectivity detection result to the process orchestration device, so that the process orchestration device determines whether to control the detection target to start the service publishing process according to the network connectivity detection result.

[0061] The testing device sends the network connectivity detection result for the service publishing process to the process orchestration device, and the process orchestration device can receive the network connectivity detection result for the service publishing process.

[0062] In the embodiment of the present application, the process orchestration device determines whether to control the detection target to start the service release process according to the network connectivity detection result. If the network connectivity detection result indicates that the network of the detection target is connected, the process orchestration device sends a start instruction to the detection target, and the detection target can receive the start instruction and start the service release process according to the start instruction. In addition, if the network connectivity detection result indicates that the network of the detection target is not connected, the start instruction is not sent to the detection target, and the process orchestration device can trigger the problem solving mechanism.

[0063] It is worth noting that the above-mentioned pre-detection method and network connectivity detection result feedback mechanism can ensure that the network environment meets the deployment requirements before starting the service release process, and can detect potential network connectivity problems in advance, greatly reducing the probability of various network connectivity failures after the service release process.

[0064] In summary, the embodiment of the present application provides a network connectivity detection method, which includes: receiving a pre-detection command for a service release process sent by a process orchestration device; responding to the pre-detection command, obtaining attribute information of a task to be run; determining a detection target according to the attribute information of the task to be run, and running the task to be run to perform a network connectivity detection on the detection target, and obtaining a network connectivity detection result of the detection target; sending the network connectivity detection result to the process orchestration device, so that the process orchestration device determines whether to control the detection target to start the service release process according to the network connectivity detection result. The process orchestration device first sends a pre-detection command to the test device, and obtains the network connectivity detection result for the service release process, and then determines whether to control the detection target to start the service release process according to the network connectivity detection result; that is, before starting the service release process, the network connectivity of the detection target is detected in advance through the pre-detection command, so that problems with network connectivity can be discovered in a timely and effective manner, and after starting the service release process, the probability of failure is greatly reduced.

[0065] Moreover, the above method is run as a sub-process before the service opening process, which can timely discover various network connectivity problems.

[0066] In an embodiment of the present application, a network detection tool may be run on the test device, and the test device may use a pre-deployed network detection tool to send the network connectivity detection result to the process orchestration device. Moreover, the test device may use a pre-deployed network detection tool to report the network connectivity detection result and the logs during the detection process to the back-end database for subsequent storage, query and audit.

[0067] Optionally, Figure 2 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 2 ,like Figure 2 As shown, the process of responding to the pre-detection command in S102 to obtain the attribute information of the task to be executed may include:

[0068] S201. Respond to a pre-detection command and obtain identification information of a task to be run according to address information of a test device.

[0069] The address information of the test device may be an IP (Internet Protocol) address of the test device. A network detection tool may be run on the test device, and the address information of the test device may be an IP address of a device where the network detection tool is located.

[0070] In some implementations, the test device uses a network detection tool to transmit the address information of the test device to an API server (Application Programming Interface server), and the API server obtains identification information of the task to be run based on the address information of the test device.

[0071] In addition, the network detection tool and API server can be deployed on the same device or on different devices, and the embodiments of the present application do not impose specific restrictions on this.

[0072] S202: Acquire attribute information of the task to be run according to the identification information of the task to be run.

[0073] In an embodiment of the present application, an API server is used to obtain attribute information of the task to be run according to the identification information of the task to be run.

[0074] Optionally, Figure 3 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 3 ,like Figure 3 As shown, the process of acquiring the identification information of the task to be run according to the address information of the test device in the above S201 may include:

[0075] S301. Obtain identification information of a task to be run from a cache middleware according to address information of a test device.

[0076] The cache middleware includes: the correspondence between the address information of multiple preset detection targets, the identification information of preset tasks, and the attribute information of preset tasks. The attribute information of preset tasks can also be called the pinglist content of preset tasks and the running task model; the identification information of the task to be run can be called the ID (Identity document) of the task to be run.

[0077] Among them, the terminal device receives the operation and maintenance operation instructions from the user, in which the machine set to be operated is specified, and the terminal device sends the operation and maintenance operation instructions to the process orchestration device; the process orchestration device can obtain the operation and maintenance operation instructions, and according to the operation and maintenance operation instructions, connect to the IP address of the test device where the remote network detection tool is located through the SSH protocol (Secure Shell).

[0078] In some implementations, the test device uses a network detection tool to transmit the address information of the test device to the API server, and the API server uses the address information of the test device and the current issue number to obtain a task ID set from the cache middleware, wherein the task ID set includes: the ID of each task to be run. The task ID set refers to a list of tasks to be run.

[0079] In addition, the network detection tool, API server and cache middleware can be deployed on the same device or on different devices, and the embodiments of the present application do not impose specific restrictions on this.

[0080] The process of acquiring the attribute information of the task to be executed according to the identification information of the task to be executed in S202 may include:

[0081] S302: Acquire attribute information of the task to be run from the cache middleware according to the identification information of the task to be run.

[0082] The API server is used to obtain the attribute information of the task to be run from the cache middleware according to the ID of the task to be run.

[0083] It should be noted that the cache middleware is used to cache the above correspondence. For example, the cache middleware may be redis (a storage system). The data structure stored in the cache middleware is shown in Table 1.

[0084] Table 1

[0085]

[0086]

[0087] Among them, the current issue number {{project}}:cur_round provides the current issue number information, through which the address information of multiple preset detection targets, the identification information of preset tasks, and the attribute information of preset tasks are associated. The set of preset task IDs (identification information of preset tasks) uses the current issue number ({{round}}) and the address information of the preset detection target (the IP address of the preset detection target) ({{main_ip}}) to store the IDs of multiple preset tasks. The ID of each preset task in the set of preset task IDs can be used to associate with the attribute information of a specific preset task, so that the above correspondence is stored in the cache middleware.

[0088] In some implementations, the current issue number can be obtained from {{project}}:cur_round of the cache middleware; a task ID set is obtained from {{project}}:{{round}}:tasks:{{main_ip}} according to the IP address of the test device and the current issue number, where the task ID set includes: IDs of multiple tasks to be run, and based on the IDs of the multiple tasks to be run, attribute information of each task to be run is obtained from {{project}}:{{round}}:plist:{{main_ip}}:{{task_id}}.

[0089] Optionally, Figure 4 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 4 ,like Figure 4 As shown, before the process of responding to the pre-detection command in the above S102 and obtaining the identification information of the task to be run according to the address information of the test device, the method may further include:

[0090] S401: Obtain preset task configuration information.

[0091] In some implementations, the terminal device may provide a user interface or request an open interface, and the user may input a configuration operation through the user interface or request an open interface, and the terminal device acquires preset task configuration information in response to the configuration operation input by the user.

[0092] The task configuration information can also be called user task model data. The user task model is a user protocol designed for users to describe and manage network detection tasks.

[0093] In addition, users configure various types of network detection tasks in the user task model to monitor the health of network services. The model provides a variety of operating modes, detection methods, detection protocols, grouping and layering strategies, point selection strategies, and detection frequency setting options, allowing users to output task configuration information according to their needs and flexibly customize tasks.

[0094] S402: According to the configuration management database, the task configuration information is parsed to obtain a corresponding relationship.

[0095] Among them, the configuration management database can also be called CMDB.

[0096] In some implementations, the test device uses an API server to obtain preset task configuration information passed by the user through the HTTP protocol POST method, and then persists the preset task configuration information to the database. After the persistence is completed, the preset task configuration information is synchronized to the configuration generation module, and the configuration generation module is used to parse the task configuration information according to the CMDB to obtain the corresponding relationship.

[0097] In actual applications, the API server and the configuration generation module can be deployed on the test device, and of course can also be deployed on different devices. The embodiments of the present application do not impose specific restrictions on this.

[0098] S403: Store the corresponding relationship in the cache middleware.

[0099] Wherein, a configuration generation module is used to store the correspondence between address information of a plurality of preset detection targets, identification information of preset tasks and attribute information of preset tasks in the cache middleware.

[0100] In the embodiment of the present application, the corresponding relationship is stored in the cache middleware according to the kv structure (a data structure in which data is stored in the form of key-value pairs) shown in Table 1 above.

[0101] In some implementations, the configuration generation module generates a result based on the corresponding relationship, and feeds the result back to the API server, and the API server is used to feed back the result to the terminal device corresponding to the user.

[0102] In summary, a variety of execution modes, detection methods, detection protocols, grouping and layering strategies, point selection strategies, and detection frequency setting options are provided, allowing users to flexibly customize tasks according to their needs; combined with the use of CMDB, users can configure detection tasks quickly and at low cost, and can implement detection tools that can be run without specifying parameters, making them ready to use out of the box.

[0103] Figure 5 A schematic diagram of module connection for a network connectivity detection method provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, it includes: the above-mentioned network detection tool, API server, cache middleware, configuration generation module, and CMDB. Among them, the network detection tool and API server are connected in communication, the API server and configuration generation module are connected in communication with the cache middleware, the API server and configuration generation module are connected in communication, and the configuration generation module and CMDB are connected in communication.

[0104] In addition, the network detection tool communicates with the process orchestration equipment. Figure 5 Not shown in FIG.

[0105] It should be noted that the network detection tool, API server, cache middleware, configuration generation module, and CMDB are all software-implemented modules. The network detection tool can be deployed on a test device, and the API server, cache middleware, configuration generation module, and CMDB can be deployed on a test device or on other devices. The embodiments of the present application do not impose specific restrictions on this.

[0106] Optional, Figure 6 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 5 ,like Figure 6 As shown, the process of parsing the task configuration information according to the configuration management database to obtain the corresponding relationship in S402 may include:

[0107] S501. Acquire initial equipment information from a configuration management database according to point selection parameters in task configuration information.

[0108] In some implementations, the configuration generation module is used to receive the synchronized task configuration information in the API server in real time and perform real-time parsing, and is also responsible for periodically retrieving all task configuration information and parsing it. The parsing process is to obtain the initial device information from the CMDB according to the point selection parameters in the task configuration information.

[0109] In the embodiment of the present application, the initial device information mainly includes: the IP of the detection target, the host name of the detection target, the group of the detection target, the service, the computer room code, the room code, the rack code, etc.

[0110] S502: Determine address information of a plurality of preset detection targets and identification information of preset tasks according to the task configuration information and the initial device information.

[0111] Wherein, a preset rule or a preset algorithm is adopted to determine the address information of a plurality of preset detection targets and the identification information of the preset tasks according to the task configuration information and the initial device information.

[0112] S503: Generate attribute information of the preset task according to the execution information, detection information, source information and target information in the task configuration information.

[0113] In an embodiment of the present application, attribute information of the preset task, i.e., the running task model, is generated based on the preset task identifier (Task ID), preset task name (Task Name), project identifier (Project), protocol type (Protocol), execution information, detection information, source information (Src) and target information (Targets) in the task configuration information.

[0114] It should be noted that the preset task ID is a unique identifier assigned to each preset task, which is used to track and manage task execution. The preset task name is used to identify the name of the preset task; the project ID refers to the project ID to which the preset task belongs, which is used to distinguish preset tasks under different projects.

[0115] The execution information includes: execution mode and execution round (Round). The execution round indicates the round number of the preset task execution, which is used to record the historical information of the preset task execution; the execution mode includes long-term continuous execution, on-demand manual execution, and scheduled periodic execution. The detection information may include: detection interval (PingInterval) and detection method. The detection interval defines the interval time of the preset task execution in seconds. The detection method includes: full mesh detection and one-way detection.

[0116] In addition, the protocol type is used to specify the type of network protocol used by the detection task, such as TCP (Transmission Control Protocol). The source information includes the IP, host name, and project ID of the source detection target; the target information includes: the IP, host name, and project ID of the destination detection target.

[0117] The following is an example of an operation task model provided in an embodiment of the present application:

[0118] {"taskID":1,

[0119] "taskName":"Associate SaaS Detection",

[0120] "project":"hms",

[0121] "round":202403150206,

[0122] "pingInterval": 15,

[0123] "protocol":"tcp",

[0124] "src":{

[0125] "ip":"10.1.2.2",

[0126] "hostname":"hms-bg01-268",

[0127] "project":"hms"},

[0128] "targets":[

[0129] {

[0130] "target":"10.1.1.1:2379",

[0131] } ]

[0133] }

[0134] S504: Determine a corresponding relationship according to address information of a plurality of preset detection targets, identification information of preset tasks, and attribute information of preset tasks.

[0135] In the embodiment of the present application, the attribute information of the preset task, namely the running task model, as the task protocol between the API server and the network detection tool, provides a general way to describe the network detection tool needs to detect what purposes and detection parameters. Among them, the running task model is evolved from the user task model.

[0136] Optional, Figure 7 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 6 ,like Figure 7 As shown, the process of determining the address information of multiple preset detection targets and the identification information of the preset tasks according to the task configuration information and the initial device information in the above S502 may include:

[0137] S601: Group initial device information according to grouping and layering parameters in task configuration information to obtain grouped device information.

[0138] The grouping and layering parameters determine the aggregation latitude and display latitude. For example, different areas can be divided into different groups, and the same project can also be divided into different groups. The embodiment of the present application does not specifically limit this. Grouping can group source detection targets, and layering can group destination detection targets.

[0139] When the detection mode is full mesh detection, devices corresponding to device information in the same group detect each other, and devices corresponding to device information in different groups cannot detect each other.

[0140] Figure 8 A grouping diagram provided in the embodiment of the present application Figure 1 ,like Figure 8As shown, region A and region B are grouped. Region A includes: IDC (internet data center) a.1, IDCa.2, IDC a.1 has corresponding computer room 1, computer room 2, IDCa.2 has corresponding computer room 3; region B includes: IDCb.1, IDCb.2, IDCb.1 has corresponding computer room 4, IDCb.2 has corresponding computer room 5. Region A and region B are two groups.

[0141] If the detection mode is full mesh detection, computer room 1 and computer room 2 can detect each other, computer room 3 and computer room 2 can detect each other, and computer room 1 and computer room 3 can detect each other. Computer room 4 and computer room 5 can also detect each other. The detection between area A and area B is not connected.

[0142] It should be noted that the hierarchical detection determines the aggregation dimension of each group, such as Figure 8 As shown, the data in each group is aggregated according to the computer room, and detection is performed within the group according to the detection method.

[0143] Fig. 9 A grouping diagram provided in the embodiment of the present application Figure 2 ,like Fig. 9 As shown, project A includes group A and group B. Group A and group B are two groups. Group A is used to detect service 1 and service 2 respectively, and group B is used to detect service 1 and service 2 respectively. Service 1 and service 2 belong to project B. The detection sources are grouped, and the detection method is one-way detection. Group A and group B are used to detect service 1 and service 2 respectively.

[0144] It should be noted that hierarchical detection determines the splitting of the detection target, such as Figure 8 As shown, each target is detected by service, that is, divided into service 1 and service 2, and finally aggregated in a group + level manner, that is, data is aggregated in the form of group detection to service.

[0145] S602: Select points in the grouped device information according to the point selection strategy in the task configuration information to obtain address information of multiple preset detection targets.

[0146] The task configuration information may include an initial source detection target and an initial destination detection target configured by the user. The initial source detection target and the initial destination detection target configured by the user and the point selection strategy may determine the address information of multiple preset detection targets.

[0147] In the embodiment of the present application, the point selection strategy includes: randomly selecting multiple machines to participate in the detection within each initial source detection target and the initial destination detection target, and these multiple machines will change the source detection target and the destination detection target at a regular interval. The initial source detection target and the initial destination detection target are configured by the user, and the address information of the multiple preset detection targets finally obtained is the final detection target determined after the initial source detection target and the initial destination detection target are selected.

[0148] Fixed uniform point selection means selecting multiple machines to participate in the detection at the initial source detection target and the initial destination detection target. We will try to ensure that the multiple machines are evenly distributed at the cabinet and other grouping levels. The address information of the selected multiple machines is the address information of multiple preset detection targets.

[0149] Fixed full point selection, fixed selection of all machines of the initial source detection target and the initial destination detection target to participate in the detection, suitable for detection requirements that require full link protection. The addresses of all machines participating in the detection are the address information of multiple preset detection targets.

[0150] In an embodiment of the present application, the task configuration information may also include a point selection range, which defines the range of the source detection target and the destination detection target, and provides multiple latitudes for selecting machine ranges: from large to small in terms of business latitude, they are project, group, service, and machine; from large to small in terms of physical location, they are computer room, room, rack, province, and city; and supports multiple data sources: CMDB and custom data sources.

[0151] In addition, point selection is divided into two aspects: source detection target and destination detection target. The source detection target, as the detection initiator, must be equipped with a network detection tool, but there is no requirement for the destination detection target.

[0152] S603: Generate preset tasks for multiple preset detection targets respectively, and assign identification information to the preset tasks to obtain the identification information of the preset tasks.

[0153] Among them, different preset tasks correspond to different preset task identification information.

[0154] Optionally, Fig.10 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 7 ,like Fig.10 As shown, the process of determining the detection target according to the attribute information of the task to be run in the above S103, and running the task to be run to perform network connectivity detection on the detection target, may include:

[0155] S701: Determine a source detection target and a destination detection target according to source information and target information in attribute information of a task to be executed.

[0156] The source information is used to represent the identification information of the source detection target, and the target information is used to represent the identification information of the destination detection target. The source information includes the IP, host name, and project identification of the source detection target; the target information includes: the IP, host name, and project identification of the destination detection target.

[0157] S702: Run the task to be run to detect the network connectivity between the source detection target and the destination detection target according to the basic task information in the task to be run.

[0158] In the embodiment of the present application, the basic task information of the task to be run includes: the ID (TaskID) of the task to be run, the name (TaskName) of the task to be run, the project identifier (Porject), the running round (Round), the running mode, the detection interval, the protocol type, etc. The protocol type specifies the type of network protocol used by the task to be run.

[0159] Optionally, the process of running the task to be run to detect the network connectivity between the source detection target and the destination detection target according to the basic task information in the task to be run in S702 may include:

[0160] According to the running information and detection information in the basic information of the task, the task to be run is run to detect the network connectivity between the source detection target and the destination detection target.

[0161] The operation information includes: operation mode and operation round; the detection information includes: detection frequency and detection mode. The operation round indicates the round number of the task to be run, which is used to record the historical information of the task to be run. The detection frequency is used to indicate that a round of detection coverage is completed every X (X≥1) seconds.

[0162] Optionally, the operation modes include: long-term continuous operation, manual operation on demand, or scheduled periodic operation; long-term continuous operation is used to continuously run the task to be run until the task to be run is deleted or the operation mode is adjusted; manual operation on demand is used to indicate the operation of the task to be run in response to the input operation trigger operation; scheduled periodic operation is used to indicate the operation of the task to be run within a preset time interval.

[0163] Among them, for on-demand manual operation, after the user selects on-demand manual execution, he needs to enter the number of executions when triggered. After saving, the task will not start execution directly, but will wait until the user manually clicks the button in the list to trigger execution, and then execute the input number of times. For example, executing 3 times means executing three detection rounds.

[0164] In addition, for scheduled and periodic execution, during the configuration stage, after selecting scheduled and periodic execution, you need to enter the time interval, accurate to seconds. After saving, the task to be run will automatically be executed within the specified time interval.

[0165] In the embodiment of the present application, the operation mode may also include: full operation and task sharing operation; in full operation, all machines of the source detection targets are detected for all the target detection targets. In task sharing, the source detection target machine may only detect a part of the target detection target machines to reduce the detection pressure.

[0166] Optionally, the detection mode includes: full mesh detection or unidirectional detection; full mesh detection is used to indicate mutual detection between a source detection target and a destination detection target; unidirectional detection is used to indicate detection from a source detection target to a destination detection target.

[0167] It should be noted that the full mesh detection method can refer to Figure 8 The detection method in the one-way detection method can refer to Fig. 9 The detection method in .

[0168] In the embodiment of the present application, the pre-detection command can be a custom process built using a shell (a programming language) script, which is added to the service publishing process and can be run as a pre-process. The script can finally be integrated into the network detection tool. For example, the script can be:

[0169] connect_check.sh

[0170] #! / bin / bash

[0171] function exec_all(){

[0172] user=$1

[0173] ip=$2

[0174] msg = 'startexecconnex...'

[0175] echo$msg

[0176] cmd="ssh$user@$ip / usr / bin / connex"

[0177] output = $(eval$cmd)

[0178] code=$?

[0179] echo'execdone,result:'$code

[0180] echo'execdone,resultcode:'$code',output:'$output

[0181] if[$code-eq0]

[0182] then

[0183] echo "The detection success rate is 100%"

[0184] return$code

[0185] elif[-n"$output"]

[0186] then

[0187] result = $(echo $output | jq -r.)

[0188] ifecho$result|jq'has("total_succ")'> / dev / null

[0189] then

[0190] total_succ=$(echo$result|jq-r'.total_succ')

[0191] echo "The detection success rate is: "$total_succ", see the log file for more details"

[0192] return1

[0193] fi

[0194] ifecho$result|jq'has("error_code")'> / dev / null

[0195] then

[0196] err_code=$(echo$result|jq-r'.error_code')

[0197] err_msg=$(echo$result|jq-r'.error_msg')

[0198] if[$err_code-eq1100]

[0199] then

[0200] echo "Failed to get task"

[0201] else

[0202] echo "errorcode is "$err_code", errormsg is "$err_msg"

[0203] fi

[0204] return$err_code

[0205] fi

[0206] else

[0207] echo"An unknown error occurred during the connex execution process, and the script execution return code is "$code;

[0208] return2

[0209] fi

[0210] }

[0211] exec_all1$2

[0212] It should be noted that the above script is mainly used to connect to the remote server via SSH and execute the ` / usr / bin / connex` command. This script receives two parameters, namely `user` and `ip`, which represent the username and IP address of the SSH connection respectively. The `exec_all` function in the script is the main execution part. This function first prints a message, then constructs the SSH command and executes it. The result of the execution will be stored in the `output` variable, and the return code of the execution will be stored in the `code` variable. Then, the function will perform different processing according to the value of `code`. If `code` is 0, it means that the command is executed successfully, and the function will print a success message and return 0. If `code` is not 0, the function will further check the content of `output`. The content of `output` is parsed into JSON format and checked whether it contains the `total_succ` or `error_code` fields. If the `total_succ` field is included, the function will print the success rate and return 1. If the `error_code` field is included, the function will print the error code and error message and return the error code. If neither the `total_succ` field nor the `error_code` field is included, the function prints an unknown error message and returns 2.

[0213] Finally, the script calls the `exec_all` function and passes the command line parameters `$1` and `$2` to it. This means that you can run the script in the command line using the following format, where `username` is the parameter passed by the process publishing system, and `ipaddress` is the IP of the machine selected by the user in the process publishing system front-end interface: "`shellscript. / connect_check.sh username ipaddress".

[0214] An embodiment of the present application also provides a network connectivity detection method, which is applied to a process orchestration device. The following is an explanation of a network connectivity detection method provided in an embodiment of the present application.

[0215] Optionally, Fig.11 A schematic diagram of a network connectivity detection method provided in an embodiment of the present application Figure 8 ,like Fig.11 As shown, the method includes:

[0216] S801. Send a pre-detection command for the service publishing process to the test device, so that the test device responds to the pre-detection command, obtains the attribute information of the task to be run, determines the detection target according to the attribute information of the task to be run, and runs the task to be run to perform network connectivity detection on the detection target, and obtains the network connectivity detection result of the detection target.

[0217] The service release process is a new service deployment process or update process to be released. The pre-detection command is essentially a detection command before starting the service release process.

[0218] S802: Receive a network connectivity test result sent by a test device.

[0219] S803: If the network connectivity detection result indicates that the network of the detection target is connected, the detection target is controlled to start a service publishing process.

[0220] S804: If the network connectivity detection result indicates that the network of the detection target is not connected, the detection target is controlled to stop starting the service publishing process.

[0221] Among them, the process orchestration device determines whether to control the detection target to start the service release process according to the network connectivity detection result. If the network connectivity detection result indicates that the network of the detection target is connected, the process orchestration device sends a start instruction to the detection target, and the detection target can receive the start instruction and start the service release process according to the start instruction. In addition, if the network connectivity detection result indicates that the network of the detection target is not connected, the start instruction is not sent to the detection target, and the process orchestration device can trigger the problem solving explanation.

[0222] It should be noted that the backend of the process orchestration device will judge all network connectivity test results. If any network connectivity test result is abnormal, that is, any detection link has packet loss timeout or the return result does not meet expectations, the service publishing process corresponding to the network connectivity test result will be stopped and started, and further investigation will be required based on the log.

[0223] In an embodiment of the present application, the network connectivity test results provided by the test device can be represented by JSON (JavaScript Object Notation, a lightweight data exchange format) format data, and the network connectivity test results have a corresponding result model, which not only provides a standardized result recording method, but also facilitates interaction with other systems (such as process orchestration equipment) through structured data support.

[0224] The resulting model can include the following:

[0225] Total successful connections ("total_succ"): This field records the number of connections successfully established during the detection task execution. In the given example, "total_succ": 0 means there were no successful connections, which may indicate a network problem or configuration error during the detection.

[0226] Detection report list ("reports"): This is an array, each element represents the result of a separate detection task. A project may contain multiple detection tasks, so a list is needed to store the output of each task.

[0227] For each detection task, the output is:

[0228] Project name ("project"): Identifies the project that performed the detection task. This helps to distinguish detection results from different projects, especially in a multi-project environment.

[0229] Task identification number ("task_id"): Each inspection task is assigned a unique identifier to facilitate tracking and management of the inspection process.

[0230] Specific content of the test report ("report"): Records the detailed results of the source information and target connection test. Each report contains:

[0231] Source information ("src"): describes the source information that initiated the connection test, including IP address, host name, and project. This helps identify and locate possible network problems.

[0232] Target information ("targets"): is an array that represents the information of one or more targets to be measured. Each target specifically contains:

[0233] Connection status ("connected"): Boolean value indicating whether the connection to the target is successful. This is a key performance indicator that directly reflects the network connectivity status.

[0234] Detection count ("count"): Indicates the number of attempts to connect to the target.

[0235] Target host information ("target"): records the detection target, which can be IP, domain name, IP+port HTTP(S) interface, to provide specific positioning for the test results.

[0236] The following is an example of the network connectivity test result provided by the test device:

[0237] {

[0238] "total_succ":0,

[0239] "reports":[

[0240] {

[0241] "project":"hms",

[0242] "task_id":1471,

[0243] "report":{

[0244] "src":{

[0245] "ip":"10.1.1.1",

[0246] "hostname":"hms-bg01-268",

[0247] "project":"hms"

[0248] },

[0249] "targets":[{"connected":false,

[0250] "count":1,"target":"8.8.8.8"} ]

[0252] }

[0253] } ]

[0255] }

[0256] In summary, the embodiment of the present application provides a network connectivity detection method, in which the process orchestration device first sends a pre-detection command to the test device, and obtains the network connectivity detection result for the service release process, and then determines whether to control the detection target to start the service release process according to the network connectivity detection result; that is, before starting the service release process, the network connectivity of the detection target is detected in advance through the pre-detection command, so that problems with network connectivity can be discovered in a timely and effective manner, and after starting the service release process, the probability of failure is greatly reduced.

[0257] The following describes the network connectivity detection device, server, storage medium, etc. used to execute the network connectivity detection method provided by the present application. The specific implementation process and technical effects can be found in the relevant content of the above-mentioned network connectivity detection method, which will not be repeated below.

[0258] Fig.12 A schematic diagram of a network connectivity detection device provided in an embodiment of the present application Figure 1 ,like Fig.12 As shown, the device comprises:

[0259] The receiving module 101 is used to receive a pre-detection command for a service publishing process sent by a process orchestration device;

[0260] The acquisition module 102 is used to respond to the pre-detection command and acquire the attribute information of the task to be executed;

[0261] The detection module 103 is used to determine the detection target according to the attribute information of the task to be run, and to run the task to be run to perform network connectivity detection on the detection target to obtain the network connectivity detection result of the detection target;

[0262] The sending module 104 is used to send the network connectivity detection result to the process orchestration device, so that the process orchestration device determines whether to control the detection target to start the service publishing process according to the network connectivity detection result.

[0263] Optionally, the acquisition module 102 is specifically configured to respond to the pre-detection command, and acquire identification information of the task to be run according to address information of the test device; and acquire attribute information of the task to be run according to the identification information of the task to be run.

[0264] Optionally, the acquisition module 102 is specifically used to obtain the identification information of the task to be run from the cache middleware according to the address information of the test device, wherein the cache middleware includes: the address information of multiple preset detection targets, the identification information of the preset tasks and the correspondence between the attribute information of the preset tasks; according to the identification information of the task to be run, obtain the attribute information of the task to be run from the cache middleware.

[0265] Optionally, the device further comprises:

[0266] A first acquisition module is used to acquire preset task configuration information;

[0267] A parsing module, used to parse the task configuration information according to the configuration management database to obtain the corresponding relationship;

[0268] A storage module is used to store the corresponding relationship in the cache middleware.

[0269] Optionally, the parsing module is specifically used to obtain initial equipment information from the configuration management database according to the point selection parameters in the task configuration information; determine the address information of the multiple preset detection targets and the identification information of the preset task according to the task configuration information and the initial equipment information; generate the attribute information of the preset task according to the execution information, detection information, source information and target information in the task configuration information; determine the corresponding relationship according to the address information of the multiple preset detection targets, the identification information of the preset task and the attribute information of the preset task.

[0270] Optionally, the parsing module is specifically used to group the initial device information according to the grouping hierarchical parameters in the task configuration information to obtain grouped device information; select points in the grouped device information according to the point selection strategy in the task configuration information to obtain address information of the multiple preset detection targets; generate the preset tasks for the multiple preset detection targets respectively, and assign identification information to the preset tasks to obtain identification information of the preset tasks.

[0271] Optionally, the detection module 103 is specifically used to determine the source detection target and the destination detection target according to the source information and the target information in the attribute information of the task to be run; wherein the source information is used to characterize the identification information of the source detection target, and the target information is used to characterize the identification information of the destination detection target; according to the basic task information in the task to be run, the task to be run is run to detect the network connectivity between the source detection target and the destination detection target.

[0272] Optionally, the detection module 103 is specifically used to run the task to be run to detect the network connectivity between the source detection target and the destination detection target based on the operation information and detection information in the basic information of the task; wherein the operation information includes: operation mode, operation round; the detection information includes: detection frequency, detection mode.

[0273] Optionally, the operation mode includes: long-term continuous operation, on-demand manual operation or scheduled periodic operation; the long-term continuous operation is used to continuously run the task to be run until the task to be run is deleted or the operation mode is adjusted; the on-demand manual operation is used to indicate the operation of the task to be run in response to an input operation trigger operation; the scheduled periodic operation is used to indicate the operation of the task to be run within a preset time interval.

[0274] Optionally, the detection method includes: full mesh detection or unidirectional detection;

[0275] The full-mesh detection is used to indicate mutual detection between the source detection target and the destination detection target; the unidirectional detection is used to indicate detection from the source detection target to the destination detection target.

[0276] Fig.13 A schematic diagram of a network connectivity detection device provided in an embodiment of the present application Figure 2 ,like Fig.13 As shown, the device comprises:

[0277] The sending module 201 is used to send a pre-detection command for a service publishing process to a test device, so that the test device responds to the pre-detection command, obtains the attribute information of the task to be run, determines the detection target according to the attribute information of the task to be run, and runs the task to be run to perform a network connectivity detection on the detection target, and obtains the network connectivity detection result of the detection target;

[0278] The receiving module 202 is used to receive the network connectivity detection result sent by the test device;

[0279] The control module 203 is used to control the detection target to start the service publishing process if the network connectivity detection result indicates that the network of the detection target is connected; if the network connectivity detection result indicates that the network of the detection target is not connected, control the detection target to stop starting the service publishing process.

[0280] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0281] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0282] Fig.14 A schematic diagram of the structure of a server provided in an embodiment of the present application, such as Fig.13 As shown, the server includes: a processor 301 and a memory 302 .

[0283] The memory 302 is used to store programs, and the processor 301 calls the programs stored in the memory 302 to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0284] The method may include:

[0285] Receive a pre-detection command for a service publishing process sent by a process orchestration device;

[0286] In response to the pre-detection command, obtaining attribute information of the task to be run;

[0287] Determine a detection target according to the attribute information of the task to be run, and run the task to be run to perform a network connectivity test on the detection target to obtain a network connectivity test result of the detection target;

[0288] The network connectivity detection result is sent to the process orchestration device, so that the process orchestration device determines whether to control the detection target to start the service publishing process according to the network connectivity detection result.

[0289] Optionally, the responding to the pre-detection command to obtain attribute information of the task to be executed includes:

[0290] In response to the pre-detection command, obtaining identification information of the task to be run according to the address information of the test device;

[0291] According to the identification information of the task to be executed, the attribute information of the task to be executed is acquired.

[0292] Optionally, acquiring identification information of the task to be run according to the address information of the test device includes:

[0293] According to the address information of the test device, the identification information of the task to be run is obtained from the cache middleware, wherein the cache middleware includes: the correspondence between the address information of multiple preset detection targets, the identification information of the preset tasks and the attribute information of the preset tasks;

[0294] The acquiring, according to the identification information of the task to be run, the attribute information of the task to be run includes:

[0295] According to the identification information of the task to be run, the attribute information of the task to be run is obtained from the cache middleware.

[0296] Optionally, before responding to the pre-detection command and acquiring identification information of the task to be run according to the address information of the test device, the method further includes:

[0297] Get the preset task configuration information;

[0298] According to the configuration management database, the task configuration information is parsed to obtain the corresponding relationship;

[0299] The corresponding relationship is stored in the cache middleware.

[0300] Optionally, parsing the task configuration information according to a configuration management database to obtain the corresponding relationship includes:

[0301] Acquire initial equipment information from the configuration management database according to the point selection parameters in the task configuration information;

[0302] Determining address information of the plurality of preset detection targets and identification information of the preset tasks according to the task configuration information and the initial device information;

[0303] Generate attribute information of the preset task according to the execution information, detection information, source information and target information in the task configuration information;

[0304] The corresponding relationship is determined according to the address information of the plurality of preset detection targets, the identification information of the preset task and the attribute information of the preset task.

[0305] Optionally, determining the address information of the plurality of preset detection targets and the identification information of the preset task according to the task configuration information and the initial device information includes:

[0306] Grouping the initial device information according to the grouping and layering parameters in the task configuration information to obtain grouped device information;

[0307] Selecting points in the grouped device information according to the point selection strategy in the task configuration information to obtain address information of the plurality of preset detection targets;

[0308] The preset tasks are generated for the multiple preset detection targets respectively, and identification information is allocated to the preset tasks to obtain the identification information of the preset tasks.

[0309] Optionally, determining a detection target according to the attribute information of the task to be run, and running the task to be run to perform network connectivity detection on the detection target includes:

[0310] Determine a source detection target and a destination detection target according to source information and target information in the attribute information of the task to be run; wherein the source information is used to characterize identification information of the source detection target, and the target information is used to characterize identification information of the destination detection target;

[0311] According to the basic task information in the task to be run, the task to be run is run to detect the network connectivity between the source detection target and the destination detection target.

[0312] Optionally, the running the task to be run to detect the network connectivity between the source detection target and the destination detection target according to the task basic information in the task to be run includes:

[0313] According to the operation information and detection information in the basic information of the task, the task to be run is run to detect the network connectivity between the source detection target and the destination detection target; wherein the operation information includes: operation mode, operation round; the detection information includes: detection frequency, detection mode.

[0314] Optionally, the operation mode includes: long-term continuous operation, on-demand manual operation, or scheduled periodic operation;

[0315] The long-term continuous operation is used to continuously run the task to be run until the task to be run is deleted or the operation mode is adjusted;

[0316] The on-demand manual operation is used to indicate a run trigger operation in response to an input, and to run the task to be run;

[0317] The scheduled periodic operation is used to indicate that the task to be executed is executed within a preset time interval.

[0318] Optionally, the detection method includes: full mesh detection or unidirectional detection;

[0319] The full-mesh detection is used to indicate mutual detection between the source detection target and the destination detection target; the unidirectional detection is used to indicate detection from the source detection target to the destination detection target.

[0320] To summarize, the process orchestration device first sends a pre-detection command to the test device, and obtains the network connectivity detection result for the service release process, and then determines whether to control the detection target to start the service release process based on the network connectivity detection result; that is, before starting the service release process, the network connectivity of the detection target is detected in advance through the pre-detection command, so that problems with network connectivity can be discovered in a timely and effective manner, and after starting the service release process, the probability of failure is greatly reduced.

[0321] Optionally, the present application also provides a program product, such as a computer-readable storage medium, including a program, which is used to execute the above method embodiment when executed by a processor.

[0322] The method may include:

[0323] Receive a pre-detection command for a service publishing process sent by a process orchestration device;

[0324] In response to the pre-detection command, obtaining attribute information of the task to be run;

[0325] Determine a detection target according to the attribute information of the task to be run, and run the task to be run to perform a network connectivity test on the detection target to obtain a network connectivity test result of the detection target;

[0326] The network connectivity detection result is sent to the process orchestration device, so that the process orchestration device determines whether to control the detection target to start the service publishing process according to the network connectivity detection result.

[0327] Optionally, the responding to the pre-detection command to obtain attribute information of the task to be executed includes:

[0328] In response to the pre-detection command, obtaining identification information of the task to be run according to the address information of the test device;

[0329] According to the identification information of the task to be executed, the attribute information of the task to be executed is acquired.

[0330] Optionally, acquiring identification information of the task to be run according to the address information of the test device includes:

[0331] According to the address information of the test device, the identification information of the task to be run is obtained from the cache middleware, wherein the cache middleware includes: the correspondence between the address information of multiple preset detection targets, the identification information of the preset tasks and the attribute information of the preset tasks;

[0332] The acquiring, according to the identification information of the task to be run, the attribute information of the task to be run includes:

[0333] According to the identification information of the task to be run, the attribute information of the task to be run is obtained from the cache middleware.

[0334] Optionally, before responding to the pre-detection command and acquiring identification information of the task to be run according to the address information of the test device, the method further includes:

[0335] Get the preset task configuration information;

[0336] According to the configuration management database, the task configuration information is parsed to obtain the corresponding relationship;

[0337] The corresponding relationship is stored in the cache middleware.

[0338] Optionally, parsing the task configuration information according to a configuration management database to obtain the corresponding relationship includes:

[0339] Acquire initial equipment information from the configuration management database according to the point selection parameters in the task configuration information;

[0340] Determining address information of the plurality of preset detection targets and identification information of the preset tasks according to the task configuration information and the initial device information;

[0341] Generate attribute information of the preset task according to the execution information, detection information, source information and target information in the task configuration information;

[0342] The corresponding relationship is determined according to the address information of the plurality of preset detection targets, the identification information of the preset task and the attribute information of the preset task.

[0343] Optionally, determining the address information of the plurality of preset detection targets and the identification information of the preset task according to the task configuration information and the initial device information includes:

[0344] Grouping the initial device information according to the grouping and layering parameters in the task configuration information to obtain grouped device information;

[0345] Selecting points in the grouped device information according to the point selection strategy in the task configuration information to obtain address information of the multiple preset detection targets;

[0346] The preset tasks are generated for the multiple preset detection targets respectively, and identification information is allocated to the preset tasks to obtain the identification information of the preset tasks.

[0347] Optionally, determining a detection target according to the attribute information of the task to be run, and running the task to be run to perform network connectivity detection on the detection target includes:

[0348] Determine a source detection target and a destination detection target according to source information and target information in the attribute information of the task to be run; wherein the source information is used to characterize identification information of the source detection target, and the target information is used to characterize identification information of the destination detection target;

[0349] According to the basic task information in the task to be run, the task to be run is run to detect the network connectivity between the source detection target and the destination detection target.

[0350] Optionally, the running the task to be run to detect the network connectivity between the source detection target and the destination detection target according to the task basic information in the task to be run includes:

[0351] According to the operation information and detection information in the basic information of the task, the task to be run is run to detect the network connectivity between the source detection target and the destination detection target; wherein the operation information includes: operation mode, operation round; the detection information includes: detection frequency, detection mode.

[0352] Optionally, the operation mode includes: long-term continuous operation, on-demand manual operation, or scheduled periodic operation;

[0353] The long-term continuous operation is used to continuously run the task to be run until the task to be run is deleted or the operation mode is adjusted;

[0354] The on-demand manual operation is used to indicate a run trigger operation in response to an input, and to run the task to be run;

[0355] The scheduled periodic operation is used to indicate that the task to be executed is executed within a preset time interval.

[0356] Optionally, the detection method includes: full mesh detection or unidirectional detection;

[0357] The full-mesh detection is used to indicate mutual detection between the source detection target and the destination detection target; the unidirectional detection is used to indicate detection from the source detection target to the destination detection target.

[0358] To summarize, the process orchestration device first sends a pre-detection command to the test device, and obtains the network connectivity detection result for the service release process, and then determines whether to control the detection target to start the service release process based on the network connectivity detection result; that is, before starting the service release process, the network connectivity of the detection target is detected in advance through the pre-detection command, so that problems with network connectivity can be discovered in a timely and effective manner, and after starting the service release process, the probability of failure is greatly reduced.

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

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

[0361] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0362] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit 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.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0363] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A network connectivity detection method, characterized in that: Applied to testing equipment, the method comprises: Receive a pre-detection command for a service publishing process sent by a process orchestration device; In response to the pre-detection command, obtaining attribute information of the task to be run; Determine a detection target according to the attribute information of the task to be run, and run the task to be run to perform a network connectivity test on the detection target to obtain a network connectivity test result of the detection target; The network connectivity detection result is sent to the process orchestration device, so that the process orchestration device determines whether to control the detection target to start the service publishing process according to the network connectivity detection result.

2. The method according to claim 1, characterized in that The step of responding to the pre-detection command and obtaining attribute information of the task to be run includes: In response to the pre-detection command, obtaining identification information of the task to be run according to the address information of the test device; According to the identification information of the task to be executed, the attribute information of the task to be executed is acquired.

3. The method according to claim 2, characterized in that The acquiring identification information of the task to be run according to the address information of the test device includes: According to the address information of the test device, the identification information of the task to be run is obtained from the cache middleware, wherein the cache middleware includes: the correspondence between the address information of multiple preset detection targets, the identification information of the preset tasks and the attribute information of the preset tasks; The acquiring, according to the identification information of the task to be run, the attribute information of the task to be run includes: According to the identification information of the task to be run, the attribute information of the task to be run is obtained from the cache middleware.

4. The method according to claim 3, characterized in that Before responding to the pre-detection command and acquiring identification information of the task to be run according to the address information of the test device, the method further includes: Get the preset task configuration information; According to the configuration management database, the task configuration information is parsed to obtain the corresponding relationship; The corresponding relationship is stored in the cache middleware.

5. The method according to claim 4, characterized in that The step of parsing the task configuration information according to the configuration management database to obtain the corresponding relationship includes: Acquire initial equipment information from the configuration management database according to the point selection parameters in the task configuration information; Determining address information of the plurality of preset detection targets and identification information of the preset tasks according to the task configuration information and the initial device information; Generate attribute information of the preset task according to the execution information, detection information, source information and target information in the task configuration information; The corresponding relationship is determined according to the address information of the plurality of preset detection targets, the identification information of the preset task and the attribute information of the preset task.

6. The method according to claim 5, characterized in that The step of determining the address information of the plurality of preset detection targets and the identification information of the preset tasks according to the task configuration information and the initial device information includes: Grouping the initial device information according to the grouping and layering parameters in the task configuration information to obtain grouped device information; Selecting points in the grouped device information according to the point selection strategy in the task configuration information to obtain address information of the multiple preset detection targets; The preset tasks are generated for the multiple preset detection targets respectively, and identification information is allocated to the preset tasks to obtain the identification information of the preset tasks.

7. The method according to claim 1, characterized in that The step of determining a detection target according to the attribute information of the task to be run, and running the task to be run to perform network connectivity detection on the detection target includes: Determine a source detection target and a destination detection target according to source information and target information in the attribute information of the task to be run; wherein the source information is used to characterize identification information of the source detection target, and the target information is used to characterize identification information of the destination detection target; According to the basic task information in the task to be run, the task to be run is run to detect the network connectivity between the source detection target and the destination detection target.

8. The method according to claim 7, characterized in that The step of running the task to be run to detect the network connectivity between the source detection target and the destination detection target according to the basic task information in the task to be run includes: According to the operation information and detection information in the basic information of the task, the task to be run is run to detect the network connectivity between the source detection target and the destination detection target; wherein the operation information includes: operation mode, operation round; the detection information includes: detection frequency, detection mode.

9. The method according to claim 7, characterized in that: The operation modes include: long-term continuous operation, manual operation on demand, or scheduled operation; The long-term continuous operation is used to continuously run the task to be run until the task to be run is deleted or the operation mode is adjusted; The on-demand manual operation is used to indicate a run trigger operation in response to an input, and to run the task to be run; The scheduled periodic operation is used to indicate that the task to be executed is executed within a preset time interval.

10. The method according to claim 8, characterized in that The detection methods include: full mesh detection or one-way detection; The full-mesh detection is used to indicate mutual detection between the source detection target and the destination detection target; the unidirectional detection is used to indicate detection from the source detection target to the destination detection target.

11. A network connectivity detection method, characterized in that: Applied to a process scheduling device, the method includes: Sending a pre-detection command for a service publishing process to a test device, so that the test device responds to the pre-detection command, obtains attribute information of a task to be run, determines a detection target according to the attribute information of the task to be run, and runs the task to be run to perform a network connectivity detection on the detection target, thereby obtaining a network connectivity detection result of the detection target; Receiving the network connectivity detection result sent by the test device; If the network connectivity detection result indicates that the network of the detection target is connected, controlling the detection target to start the service publishing process; If the network connectivity detection result indicates that the network of the detection target is not connected, the detection target is controlled to stop starting the service publishing process.

12. A network connectivity detection device, characterized in that: Applied to testing equipment, the device comprises: A receiving module, used to receive a pre-detection command for a service publishing process sent by a process orchestration device; An acquisition module, used to respond to the pre-detection command and acquire attribute information of the task to be run; A detection module, used to determine a detection target according to the attribute information of the task to be run, and to run the task to be run to perform a network connectivity detection on the detection target, so as to obtain a network connectivity detection result of the detection target; The sending module is used to send the network connectivity detection result to the process orchestration device, so that the process orchestration device determines whether to control the detection target to start the service publishing process according to the network connectivity detection result.

13. A network connectivity detection device, characterized in that: Applied to a process scheduling device, the device comprises: A sending module, used for sending a pre-detection command for a service publishing process to a test device, so that the test device responds to the pre-detection command, obtains attribute information of the task to be run, determines a detection target according to the attribute information of the task to be run, and runs the task to be run to perform a network connectivity detection on the detection target, and obtains a network connectivity detection result of the detection target; A receiving module, used for receiving the network connectivity detection result sent by the test device; A control module is used to control the detection target to start the service publishing process if the network connectivity detection result indicates that the network of the detection target is connected; if the network connectivity detection result indicates that the network of the detection target is not connected, control the detection target to stop starting the service publishing process.

14. A server, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor implements the network connectivity detection method described in any one of claims 1 to 11 when executing the computer program.

15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is read and executed, the network connectivity detection method described in any one of claims 1 to 11 is implemented.

Citation Information

Cited By

  • P2P-based device automatic test method, electronic device and storage medium

    CN119341943A