WO2018127012A1 - 一种传输节点集群的检测方法和装置 - Google Patents

一种传输节点集群的检测方法和装置 Download PDF

Info

Publication number
WO2018127012A1
WO2018127012A1 PCT/CN2017/120142 CN2017120142W WO2018127012A1 WO 2018127012 A1 WO2018127012 A1 WO 2018127012A1 CN 2017120142 W CN2017120142 W CN 2017120142W WO 2018127012 A1 WO2018127012 A1 WO 2018127012A1
Authority
WO
WIPO (PCT)
Prior art keywords
detection
node
function
transmission
task
Prior art date
Application number
PCT/CN2017/120142
Other languages
English (en)
French (fr)
Inventor
郑中山
Original Assignee
北京奇虎科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京奇虎科技有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2018127012A1 publication Critical patent/WO2018127012A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method for detecting a cluster of transmission nodes and a device for detecting a cluster of transmission nodes.
  • PHP Hypertext Preprocessor
  • the language's grammar absorbs the features of C, Java, and Perl, and is easy to learn and use, mainly for Web development.
  • PHP can be used to edit multiple Linux commands and detect multiple detection operations performed by the client. Multiple detection operations are edited using the same function.
  • the detecting client sends multiple Linux commands in sequence, and after sending a Linux command and receiving the detection result of the server feedback for the Linux command, the next Linux command is sent.
  • the present invention has been made in order to provide a detection method of a transmission node cluster and a corresponding transmission node cluster detection apparatus that overcome the above problems or at least partially solve or alleviate the above problems.
  • a method for detecting a cluster of transmission nodes including the steps of:
  • each detection instruction carrying a file pointer indicating a storage location in the preset array, so that the transmission node adds the detection result to the preset array according to the file pointer.
  • calling a third function extracts the updated detection result from the preset array
  • the transfer node is called according to the detection result of all the transfer nodes.
  • a detection apparatus for a cluster of transmission nodes including:
  • the detection instruction sending module is configured to call the first function to simultaneously send the detection instruction to each transmission node of the transmission node cluster, and each detection instruction carries a file pointer indicating that the detection result is stored in the preset array, so that the transmission node follows the file pointer The detection result is added to the preset array;
  • a data update detection module configured to call a second function to detect a data update of the preset array
  • a detection result extraction module configured to, when detecting that there is an updated detection result, call a third function to extract the updated detection result from the preset array
  • the transmission node invoking module is configured to perform a call of the transmission node according to the detection result of all the transmission nodes.
  • a computer program comprising computer readable code that, when executed on a computing device, causes the computing device to perform a cluster of transport nodes as described above Detection method.
  • a computer readable medium wherein the computer program described above is stored.
  • the first function is called to send a detection instruction
  • the second function is called to detect the data update
  • the third function is called to extract the updated detection result. Since different functions are called to perform different operations, there is no order association between the multiple operations, so
  • multiple detection instructions can be simultaneously sent to each transmission node, and multiple detection instructions can be executed by different transmission nodes in a short time, thereby shortening the transmission time of multiple detection instructions and the reception time of multiple detection results. Improve the execution efficiency of the detection operation.
  • the number of bearers of the detection result by the second interface is also detected, and the number of remaining bearers of the detection result by the second interface is calculated, because the detection command is sent according to the remaining number of bearers.
  • Each transmission node avoids the occurrence of a large number of detection results staying in the second interface, and ensures the feedback time of the detection result.
  • FIG. 1 is a schematic flow chart showing the steps of a method for detecting a cluster of transmission nodes according to a first embodiment of the present invention
  • FIG. 2 is a schematic flow chart showing the steps of a method for detecting a cluster of transmission nodes according to Embodiment 2 of the present invention
  • FIG. 3 is a block diagram showing the structure of a detecting apparatus for a cluster of transmission nodes according to Embodiment 3 of the present invention.
  • FIG. 4 is a block diagram showing the structure of a detecting apparatus for a cluster of transmission nodes according to Embodiment 4 of the present invention.
  • Figure 5 is a schematic block diagram showing a computing device for performing the method according to the present invention.
  • Fig. 6 schematically shows a storage unit for holding or carrying program code implementing the method according to the invention.
  • FIG. 1 is a schematic flowchart of the steps of a method for detecting a cluster of a transmission node according to the first embodiment of the present invention, which may include the following steps:
  • Step 101 Calling the first function to simultaneously send a detection instruction to each transmission node of the transmission node cluster, each detection instruction carrying a file pointer indicating that the detection result is stored in the preset array, so that the detection node adds the detection result according to the file pointer to the transmission node. Preset array.
  • the detection method of the transmission node cluster is used to detect whether each transmission node in the transmission node cluster works normally.
  • the method includes multiple operations such as detecting instruction transmission, data update detection, and detection result extraction, and the foregoing multiple operations are performed. Calling multiple functions is done.
  • the transmission node is a server having functions of data transmission, data processing, etc., and the transmission node cluster includes a plurality of transmission nodes.
  • a client that sends a detection instruction to each transmission node of the transmission node cluster is referred to as a detection client. Since the plurality of operations corresponding to the detection method are completed by calling a plurality of functions, there is no order association between the detection instruction transmission operation and the detection result extraction operation, so the detection client can call the first function to each transmission node of the transmission node cluster at the same time.
  • the first function called can be multiple, such as the proc_open() function.
  • the multiple detection instructions sent may belong to the same detection task, or may belong to multiple detection tasks.
  • the detection command can be in various forms, such as a numerical calculation instruction, an operation parameter detection instruction, and the like.
  • a preset array is set in the detection client in advance, and the preset array is used to store the detection result fed back by each transmission node, and the detection result of the detection parameters of different transmission nodes in the preset array is preset.
  • each detection instruction carries information indicating that the detection result is stored in the preset array, that is, the file pointer.
  • the transit node may extract the file pointer from the received detection instruction and add the detection result to the specified storage location of the preset array according to the file pointer.
  • the transit node may be a node in a Content Delivery Network (CDN)
  • the transport node cluster may include multiple transport nodes in the content distribution network, such as may be located in a certain geographic location. Multiple transport nodes within a zone are referred to as transport node clusters.
  • the plurality of transport nodes in the transport node cluster may be managed by using a scheduling node in the content distribution network, and the scheduling node may call the first function to simultaneously send detection instructions to each transport node of the transport node cluster to detect the working conditions of each transport node. .
  • Step 102 Call a second function to detect data update of the preset array.
  • the storage location for different transport nodes in the preset array may have a history detection result, or may be vacant.
  • the transmission node feeds back a new detection result the data of the storage location corresponding to the transmission node in the preset array may occur. Change and update to the latest test results.
  • the embodiment of the present invention calls the second function to detect the preset array, specifically calls the second function to detect the data of each storage location in the preset array, and detects whether there is an updated detection result in the preset array.
  • the second function called can be multiple, such as the stream_select() function.
  • Step 103 When detecting that there is an updated detection result, calling a third function to extract the updated detection result from the preset array.
  • the embodiment of the present invention calls the third function to extract the updated detection result from the preset array. Since the detection instruction can be in various forms, the detection result can also be in various forms, such as a numerical calculation result, an operation state parameter detection result, and the like.
  • the third function called can be multiple, such as the stream_get_contents() function.
  • a plurality of storage locations are disposed in the preset array, and the second function detects data at the plurality of storage locations. Specifically, the second function may sequentially sort the plurality of storage locations according to the order of the plurality of storage locations in the preset array. The data at the site is tested. When there is an updated detection result in each storage location in the preset array, the second function detects all the updated detection results, and then the second function completes the detection of all the detection results corresponding to the detection task, and can proceed to the next The detection of the detection result corresponding to the detection task.
  • Step 104 Perform a call of the transmission node according to the detection result of all the transmission nodes.
  • the client may select an appropriate target transport node to use by the requesting end according to the detection result of each transport node in the transport node cluster, and the detection result provides a basis for the node allocation.
  • the selection condition of the target transmission node may be multiple. For example, when the detection result is a numerical calculation result, the transmission node may be judged to be working normally by the identification value. After determining that the transmission node is working normally, the working connection may be selected and the distance from the requesting end is normal. The closer transmission node is used as the target transmission node; when the detection result is the operation state parameter of the transmission node, such as CPU utilization, content occupancy rate, etc., the transmission node with light load and close proximity to the requesting end can be selected as the target transmission. Nodes, thus ensuring load balancing of each transit node in the cluster.
  • the scheduling node in the content distribution network may perform supervision and allocation on multiple transmission nodes in the transmission node cluster by executing the method, when the scheduling node is based on the detection result.
  • a node exception notification may be sent to enable the transmission node to be repaired as soon as possible.
  • the scheduling node can re-allocate the appropriate target transmission node for the node requesting end based on the detection result.
  • the embodiment of the present invention invokes different functions to perform different operations, there is no sequential association between multiple operations, so multiple detection instructions can be simultaneously transmitted, and detection results fed back by multiple transmission nodes are received in a short time, compared to the background art.
  • the method according to the embodiment of the present invention can greatly shorten the time of the detection operation and shorten the waiting time of the detection result. Improve inspection execution efficiency.
  • the method before the calling of the transmitting node is performed according to the detection result of all the transmitting nodes, the method further includes: receiving a call request of the first client to the transmitting node;
  • the detection result includes at least one operating state parameter of the transmitting node
  • the calling of the transmitting node according to the detection result of all the transmitting nodes includes: selecting a target transmitting node whose operating state parameter meets the set condition, and feeding back to the first a client.
  • the detection client is responsible for detecting multiple transmission nodes in the transmission node cluster, and is also responsible for the assignment of multiple transmission nodes. After receiving the node call request sent by the first client, the detecting client may determine the running status of each transmitting node according to the detection result of each transmitting node, thereby allocating a suitable target transmitting node to the first client, such as a shorter allocation distance. And a lightly loaded transmission node.
  • the detection result may include multiple contents.
  • the detection result includes at least one operating state parameter of the transmission node, such as CPU utilization, memory occupancy, etc.
  • the detecting client may select a target transmission node whose operating state parameter satisfies the set condition, And the selected target transmission node is fed back to the first client.
  • the setting condition may be that the CPU utilization is less than a%, where a is a positive number; when the running state parameter is a memory occupation At the rate, the set condition can be that the memory usage is less than b%, where b is a positive number.
  • the detecting client may be a scheduling node
  • the first client may be a streaming data client
  • the scheduling is performed to the scheduling.
  • the node sends a call request to the transport node, and accordingly, the dispatch node receives the call request from the stream data client to the transport node.
  • the scheduling node may select a transmission node whose running state parameter satisfies the set condition as the target transmission node, and feed it back to the streaming data client for use.
  • the target transmission node is allocated according to the running state parameter of the transmission node, so that the target transmission nodes allocated to the first client are all working normally, and the load balancing of multiple transmission nodes in the transmission node cluster can be ensured to avoid The transmission node is overloaded.
  • the first function is called to send a detection instruction
  • the second function is called to detect the data update
  • the third function is called to extract the updated detection result. Since different functions are called to perform different operations, there is no order association between the multiple operations, so
  • multiple detection instructions can be simultaneously sent to each transmission node, and multiple detection instructions can be executed by different transmission nodes in a short time, thereby shortening the transmission time of multiple detection instructions and the reception time of multiple detection results. Improve the execution efficiency of the detection operation.
  • FIG. 2 is a schematic flowchart of the steps of a method for detecting a cluster of a transmission node according to the second embodiment of the present invention, which may specifically include the following steps:
  • Step 201 Calling the first function to simultaneously send a detection instruction to each transmission node of the transmission node cluster, where each detection instruction carries a file pointer indicating that the detection result is stored in the preset array, so that the detection node adds the detection result according to the file pointer to the transmission node. Preset array.
  • the detection method includes detecting a plurality of operations such as instruction transmission, data update detection, detection result extraction, and the like, and performing the plurality of operations by calling a plurality of functions.
  • a client that sends a detection instruction to each transmission node of the transmission node cluster is referred to as a detection client.
  • the first function may be invoked to sequentially send the detection instructions corresponding to the plurality of detection tasks to the respective transmission nodes of the transmission node cluster. Since each of the transmitting nodes has different carrying capabilities for the detection result, the detecting instructions corresponding to the multiple detecting tasks may be sent to the transmitting nodes in different manners. When the carrying capacity of the transmitting node is weak, the detecting instruction corresponding to the multiple detecting tasks may be sent by: calling the first function to perform a detecting task, and extracting the detection result of the detecting task by all the transmitting nodes. After that, the first function is called to perform the next detection task.
  • 100 detection instructions corresponding to the detection task 2 are sent, and corresponding to the plurality of detection tasks are completed according to the above method.
  • the detection command is sent.
  • the sending manner of the detecting instruction corresponding to the multiple detecting tasks may be: calling the first function to send a detection instruction corresponding to the detecting task to each transmitting node of the transmitting node cluster, and directly calling the pointing device
  • the first function sends a plurality of detection instructions corresponding to the next detection task. For example, after transmitting 100 detection commands corresponding to the detection task 1, 100 detection instructions corresponding to the detection task 2 are directly transmitted, and detection commands corresponding to the plurality of detection tasks are transmitted according to the above method.
  • the detecting operation of the next detecting task can be performed only after the execution of the current detecting task ends, and the detection corresponding to the two adjacent detecting tasks There is a processing time interval for the transmission time of the instruction.
  • the sending time of the detecting command corresponding to the multiple detecting tasks is controlled.
  • the first detecting task is searched for the next detecting task to be executed.
  • the history processing time sets a processing time interval between the one detection task and the next detection task according to the historical processing time of the next detection task found. Then, after starting the execution of the one detection task, the first function is called to execute the next detection task according to the set processing time interval.
  • the historical processing time of the first detecting task is A seconds
  • the processing time of the second detecting task is B seconds.
  • the first detecting task is executed first
  • the second detecting task is executed, and the time A seconds is used as the first detecting task and the first detecting task.
  • the processing time interval between the two detection tasks starts to execute the first detection task, that is, after the first function is called to send the detection instruction to each transmission node of the transmission node cluster, after A seconds, the second detection task is started, and the second detection task is started.
  • a function sends a detection instruction to each of the transmission nodes of the cluster of transmission nodes.
  • the processing time interval of the two detection tasks is set according to the historical processing time of the detection task.
  • the history processing of the detection task is recorded. Time to extract from local records when using historical usage time.
  • the transmission time of each detection instruction and the reception time of the detection result corresponding to the detection instruction may be recorded, and the difference between the reception time of the detection result and the transmission time of the detection instruction is calculated, and the maximum time difference is used as the history processing time of the detection task.
  • the detection client sends the detection instruction corresponding to the multiple detection tasks, after the detection instruction corresponding to the current detection task is sent to each transmission node, the current detection is determined according to the correspondence between the locally recorded detection task and the historical processing time.
  • the historical processing time of the task is sent after the current processing time of the current detection task is sent, and the detection instruction corresponding to the next detection task is sent.
  • the embodiment of the present invention may perform the history processing time of the other detection tasks for the detection task that does not find the historical processing time.
  • the mean is the historical processing time. For example, if the historical processing time of detecting the local record detection task 1 of the client is 0.10 s, the historical processing time of the detection task 2 is 0.12 s, and the historical processing time of the detection task 3 is 0.4 s, the historical processing time calculated by the new detection task is 0.12s.
  • the detection interface and the detection result may be sent by using the same interface, and the detection instruction and the detection result may be sent by using different interfaces.
  • the first function may be used to send multiple detection instructions to each transmission node of the transmission node cluster through the first interface, and the transmission node may send the detection result to the preset array through the second interface, where the first interface and the second interface may The same can also be different.
  • the second interface is different from the first interface, the number of the second interfaces may be one or more, and the number of the second interfaces may be set according to actual conditions.
  • the embodiment of the present invention may call the first function to the cluster of the transmission node through the first interface.
  • the transmitting node Before the transmitting node sends the detection command at the same time, detecting the current number of bearers of the detection result by the second interface, and calculating the remaining number of bearers of the detection result by the second interface, and then calling the first function to each transport node of the transport node cluster through the first interface At the same time, a detection instruction of the remaining number of bearers is transmitted.
  • Step 202 Call a second function to detect data update of the preset array.
  • Step 203 When it is detected that there is an updated detection result, calling a third function to extract the updated detection result from the preset array.
  • Step 204 Identify, according to the detection result, whether the transmission node operates normally.
  • the detection result may include a plurality of contents, which may indicate the operation of the transmission node. After the detection client receives the detection result, the detection client may identify whether the transmission node operates normally according to the detection result.
  • the detection result can include a variety of contents, there are various ways to identify whether the transmission node is operating normally. For example, when the detection result is a numerical calculation result, that is, a numerical value, the client performing the node detection can judge whether the transmission node operates normally according to the value, for example, the detection instruction is “calculation 1+1”, and if the detection result received is “2”, Then, it is determined that the transmission node works normally, otherwise, it is determined that the transmission node works abnormally.
  • the detection result is a numerical calculation result, that is, a numerical value
  • the client performing the node detection can judge whether the transmission node operates normally according to the value, for example, the detection instruction is “calculation 1+1”, and if the detection result received is “2”, Then, it is determined that the transmission node works normally, otherwise, it is determined that the transmission node works abnormally.
  • the detecting client can determine whether the running state parameter of the transmitting node satisfies the setting condition, and if yes, determine that the transmitting node works normally, otherwise , to determine that the transfer node is working abnormally.
  • Step 205 If it is identified that a certain transmission node is not operating normally, reassign the transmission node for the second client that uses the transmission node.
  • the new transmission node may be allocated to the second client in the multiple transmission nodes of the transmission node cluster according to the detection result, thereby ensuring that the second client is normal to the transmission node. use.
  • the detecting client may be a scheduling node
  • the second client may be a streaming data client
  • the streaming data client uses the transmitting node to push the streaming data to the network or pull the streaming data from the network.
  • the scheduling node detects that an abnormality occurs in the transit node used by the streaming data client
  • the dispatching node may re-allocate the transport node for use by the streaming data client according to the detection result of the other transit node.
  • the first function is called to send a detection instruction
  • the second function is called to detect the data update
  • the third function is called to extract the updated detection result. Since different functions are called to perform different operations, there is no order association between the multiple operations, so
  • multiple detection instructions can be simultaneously sent to each transmission node, and multiple detection instructions can be executed by different transmission nodes in a short time, thereby shortening the transmission time of multiple detection instructions and the reception time of multiple detection results. Improve the execution efficiency of the detection operation.
  • the number of bearers of the detection result by the second interface is also detected, and the number of remaining bearers of the detection result by the second interface is calculated, because the detection command is sent according to the remaining number of bearers.
  • Each transmission node thus avoids the occurrence of a large number of detection results staying in the second interface.
  • FIG. 3 is a structural block diagram of a detecting apparatus for a cluster of transmission nodes according to a third embodiment of the present invention.
  • the detecting device of the transmission node cluster in FIG. 3 includes:
  • the detection instruction sending module 301 is configured to call the first function to simultaneously send a detection instruction to each transmission node of the transmission node cluster, and each detection instruction carries a file pointer indicating that the detection result is stored in the preset array, so that the transmission node follows the file pointer. Add the test results to the preset array.
  • the data update detecting module 302 is configured to call the second function to detect the data update of the preset array.
  • the detection result extraction module 303 is configured to, when detecting the presence of the updated detection result, invoke the third function to extract the updated detection result from the preset array.
  • the transmitting node invoking module 304 is configured to perform a call of the transmitting node according to the detection result of all the transmitting nodes.
  • the device further includes:
  • a call request receiving module configured to receive a call request of the first client to the transit node before the calling of the transport node according to the detection result of all the transit nodes
  • the transmitting node invoking the module 304 is specifically configured to select a target transit node whose operating state parameter meets the set condition, and feed back to the first client, where the detection result includes at least one running state parameter of the transit node.
  • the first function is called to send a detection instruction
  • the second function is called to detect the data update
  • the third function is called to extract the updated detection result. Since different functions are called to perform different operations, there is no order association between the multiple operations, so
  • multiple detection instructions can be simultaneously sent to each transmission node, and multiple detection instructions can be executed by different transmission nodes in a short time, thereby shortening the transmission time of multiple detection instructions and the reception time of multiple detection results. Improve the execution efficiency of the detection operation.
  • FIG. 4 is a block diagram showing the structure of a detecting apparatus for a cluster of transmission nodes according to Embodiment 4 of the present invention.
  • the detecting device of the transmission node cluster in FIG. 4 includes:
  • the detection instruction sending module 401 is configured to call the first function to sequentially send the detection instructions corresponding to the plurality of detection tasks to the respective transmission nodes of the transmission node cluster.
  • the data update detection module 402 is configured to call the second function to detect the data update of the preset array.
  • the detection result extraction module 403 is configured to, when detecting the presence of the updated detection result, invoke the third function to extract the updated detection result from the preset array.
  • the transmitting node invoking module 404 is configured to perform a call of the transmitting node according to the detection result of all the transmitting nodes.
  • the transit node calling module 404 includes:
  • the operation state identification sub-module 4041 is configured to identify, according to the detection result, whether the transmission node operates normally;
  • the node re-allocation sub-module 4042 is configured to re-allocate the transit node for the second client using the transit node if it is identified that a certain transport node is not operating normally.
  • the detection instruction sending module 401 is specifically configured to: send a detection instruction to each transmission node of the transmission node cluster by using the first function by using the first interface, where the transmission node sends the second The preset array sends a detection result, and the first interface is the same as or different from the second interface.
  • the device further includes:
  • a bearer number detecting module configured to detect a current number of bearers of the second interface pair detection result before the sending, by the first interface, the first function to the transmitting node of the transmitting node cluster
  • a remaining bearer number calculation module configured to calculate a number of remaining bearers of the second interface pair detection result
  • the detection instruction sending module 401 is specifically configured to, by using the first interface, invoke the first function to simultaneously send a detection instruction corresponding to the remaining number of bearers to each transmission node of the transmission node cluster.
  • the detection instruction sending module 401 is specifically configured to invoke the first function to sequentially send the detection instructions corresponding to the plurality of detection tasks to the respective transmission nodes of the transmission node cluster.
  • the detection instruction sending module 401 includes:
  • a first detection instruction sending submodule configured to invoke the first function to send a detection instruction corresponding to the detection task to each transmission node of the transmission node cluster;
  • the second detection instruction sending submodule is configured to directly send a plurality of detection instructions corresponding to the next detection task to the first function after transmitting a detection instruction corresponding to the detection task.
  • the detection instruction sending module 401 includes:
  • a first detection task execution submodule configured to invoke the first function to perform a detection task
  • the second detection task execution sub-module is configured to invoke the first function to perform the next detection task after extracting the detection results of the detection tasks by all the transmission nodes.
  • the device further includes:
  • a history processing time searching module configured to search for a historical processing time of the record for the next detection task to be executed before the calling the first function executes the next detection task
  • a processing time interval setting module configured to set a processing time interval between the one detection task and the next detection task according to the historical processing time of the next detection task that is searched;
  • the second detecting task execution sub-module is specifically configured to invoke the first function to execute the next detecting task according to the set processing time interval after starting to execute the one detecting task.
  • the device further includes:
  • the historical processing time determining module is configured to: for the next detecting task that does not find the historical processing time, the average processing time of the other detecting tasks is the historical processing time.
  • the device further includes:
  • the historical processing time recording module is configured to record the historical processing time of the detection task after receiving the detection result of all the transmission nodes corresponding to one detection task.
  • the first function is called to send a detection instruction
  • the second function is called to detect the data update
  • the third function is called to extract the updated detection result. Since different functions are called to perform different operations, there is no order association between the multiple operations, so
  • multiple detection instructions can be simultaneously sent to each transmission node, and multiple detection instructions can be executed by different transmission nodes in a short time, thereby shortening the transmission time of multiple detection instructions and the reception time of multiple detection results. Improve the execution efficiency of the detection operation.
  • the number of bearers of the detection result by the second interface is also detected, and the number of remaining bearers of the detection result by the second interface is calculated, because the detection command is sent according to the remaining number of bearers.
  • Each transmission node thus avoids the occurrence of a large number of detection results staying in the second interface.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the transmission node cluster in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 5 illustrates a detection computing device, such as an application server, that can implement a cluster of transport nodes in accordance with the present invention.
  • the computing device conventionally includes a processor 510 and a computer program product or computer readable medium in the form of a memory 520.
  • the memory 520 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 520 has a memory space 530 for program code 531 for performing any of the method steps described above.
  • storage space 530 for program code may include various program code 531 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such computer program products are typically portable or fixed storage units as described with reference to FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 520 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 531 ', ie, code readable by a processor, such as 510, that when executed by a computing device causes the computing device to perform each of the methods described above step.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种传输节点集群的检测方法和装置。所述方法包括:调用第一函数向传输节点集群的各个传输节点同时发送检测指令,各检测指令携带指示检测结果在预置数组中存储位置的文件指针,以由传输节点按照文件指针将检测结果添加至预置数组;调用第二函数检测预置数组的数据更新;当检测到存在更新的检测结果时,调用第三函数从所述预置数组中提取更新的检测结果;根据所有传输节点的检测结果进行传输节点的调用。由于调用不同函数执行不同操作,多个操作之间无顺序关联,因此可以同时发送多个检测指令至各传输节点,多个检测指令可以在短时间内被不同传输节点执行,从而缩短了检测操作的时间,提高了检测操作的执行效率。

Description

一种传输节点集群的检测方法和装置 技术领域
本发明涉及通信技术领域,尤其涉及一种传输节点集群的检测方法以及一种传输节点集群的检测装置。
背景技术
PHP(Hypertext Preprocessor,超文本预处理器)是一种通用开源脚本语言。该语言的语法吸收了C语言、Java和Perl的特点,利于学习和使用,主要适用于Web开发领域。
目前为实现针对多台服务器的工作情况的检测,可以利用PHP编辑多个Linux命令以及检测客户端执行的多个检测操作,多个检测操作使用同一函数编辑。具体执行时,检测客户端按顺序发送多个Linux命令,在发送一个Linux命令并且接收到服务器针对该Linux命令反馈的检测结果后,发送下一个Linux命令。
虽然上述方法实现了多个Linux命令的发送,但是由于多个Linux命令是串行发送的,只有在发送当前Linux命令并且接收到所有服务器针对当前Linux命令反馈的检测结果后,才可以发送下一个Linux命令,因此完成多个检测指令的发送以及多个检测结果的接收需要耗费较长时间,检测操作的执行效率较低。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决或减缓上述问题的传输节点集群的检测方法和相应的传输节点集群的检测装置。
根据本发明的一个方面,提供了一种传输节点集群的检测方法,包括步骤:
调用第一函数向传输节点集群的各个传输节点同时发送检测指令,各检测指令携带指示检测结果在预置数组中存储位置的文件指针,以由传输节点按照文件指针将检测结果添加至预置数组;
调用第二函数检测预置数组的数据更新;
当检测到存在更新的检测结果时,调用第三函数从所述预置数组中提取更新的检测结果;
根据所有传输节点的检测结果进行传输节点的调用。
根据本发明的另一方面,提供了一种传输节点集群的检测装置,包括:
检测指令发送模块,用于调用第一函数向传输节点集群的各个传输节点同时发送检测指令,各检测指令携带指示检测结果在预置数组中存储位置的文件指针,以由传输节点按照文件指针将检测结果添加至预置数组;
数据更新检测模块,用于调用第二函数检测预置数组的数据更新;
检测结果提取模块,用于当检测到存在更新的检测结果时,调用第三函数从所述预置数组中提取更新的检测结果;
传输节点调用模块,用于根据所有传输节点的检测结果进行传输节点的调用。
根据本发明的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行如上文所述的传输节点集群的检测方法。
根据本发明的再一个方面,提供了一种计算机可读介质,其中存储了上述的计算机程序。
本发明的有益效果为:
依据本发明实施例,调用第一函数发送检测指令,调用第二函数检测数据更新,调用第三函数提取更新的检测结果,由于调用不同函数执行不同操作,多个操作之间无顺序关联,因此本发明实施例可以同时发送多个检测指令至各传输节点,多个检测指令可以在短时间内被不同传输节点执行,从而缩短了多个检测指令的发送时间以及多个检测结果的接收时间,提高了检测操作的执行效率。
本发明实施例在通过第一接口发送检测指令之前,还检测了第二接口对检测结果的承载数目,并且计算了第二接口对检测结果的剩余承载数目,由于按照剩余承载数目发送检测指令至各传输节点,因此避免了第二接口出现大量检测结果滞留的情况的发生,保证了检测结果的反馈时间。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的, 而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示意性地示出了根据本发明实施例一的一种传输节点集群的检测方法的步骤流程示意图;
图2示意性地示出了根据本发明实施例二的一种传输节点集群的检测方法的步骤流程示意图;
图3示意性地示出了根据本发明实施例三的一种传输节点集群的检测装置的结构框图;
图4示意性地示出了根据本发明实施例四的一种传输节点集群的检测装置的结构框图;
图5示意性地示出了用于执行根据本发明的方法的计算设备的框图;以及;
图6示意性地示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。
具体实施例
下面结合附图和具体的实施方式对本发明作进一步的描述。
参照图1,示出了根据本发明实施例一的一种传输节点集群的检测方法的步骤流程示意图,具体可以包括如下步骤:
步骤101、调用第一函数向传输节点集群的各个传输节点同时发送检测指令,各检测指令携带指示检测结果在预置数组中存储位置的文件指针,以由传输节点按照文件指针将检测结果添加至预置数组。
本发明实施例提供的传输节点集群的检测方法用于检测传输节点集群中各传输节点是否正常工作,该方法包括检测指令发送、数据更新检测、检测结果提取等多个操作,上述多个操作通过调用多个函数完成。其中,传输节点为具有数据传输、数据处理等功能的服务器,传输节点集群包括多个传输节点。
本发明实施例将向传输节点集群的各个传输节点发送检测指令的客户端称为检测客户端。由于检测方法对应的多个操作是通过调用多个函数完成的,检测指令发送操作和检测结果提取操作之间无顺序关联,因此检测客户端可以调用第一函数向传输节点集群的各个传输节点同时发送多个检测指令。调用的第一函数可以为多种,如proc_open()函数。发送的多个检测指令可以属于同一个检测任务,也可以属于多个检测任务。检测指令可以为多种形式,如数值计算指令、运行参数检测指令等。
预先在检测客户端内设置预设数组,预设数组用于存储各传输节点反馈的检测结果,不同传输节点的检测结果在预设数组中存储位置是预先设定的。为将不同传输节点反馈的检测结果添加至预置数组中指定存储位置,可以在向各传输节点发送检测指令时,让各检测指令携带指示检测结果在预置数组中存储位置的信息即文件指针,传输节点可以从接收的检测指令中提取文件指针,并按照文件指针将检测结果添加至预置数组的指定存储位置。
本发明实施例所述方法可以应用于不同场景,例如可以应用于普通数据传输的场景、流数据传输的场景。当应用于流数据传输的场景时,传输节点可以为内容分发网络(Content Delivery Network,CDN)中的节点,传输节点集群可以包括内容分发网络中的多个传输节点,如可以将位于某一地理区域内的多个传输节点称为传输节点集群。可以使用内容分发网络中的调度节点对传输节点集群中的多个传输节点进行管理,调度节点可以调用第一函数向传输节点集群的各个传输节点同时发送检测指令,以检测各传输节点的工作情况。
步骤102、调用第二函数检测预置数组的数据更新。
预置数组中针对不同传输节点的存储位置可能存在历史记录的检测结果,也可能是空缺的,当传输节点反馈新的检测结果后,预置数组中与传输节点对应的存储位置的数据会发生变化,更新为最新的检测结果。
本发明实施例调用第二函数对预置数组进行检测,具体地调用第二函数对预置数组中各存储位置的数据进行检测,检测预置数组中是否存在更新的检测结果。调用的第二函数可以为多种,如stream_select()函数。
步骤103、当检测到存在更新的检测结果时,调用第三函数从所述预置数组中提取更新的检测结果。
当第二函数检测到预置数组中存在更新的检测结果后,本发明实施例调用第三函数从预置数组中提取更新的检测结果。由于检测指令可以为多种形式,相应地检测结果也可以为多种形式,例如数值计算结果、运行状态参数检测结果等。调用的第三函数可以为多种,如stream_get_contents()函数。
预置数组中设有多个存储位置,第二函数对多个存储位置处的数据进行检测,具体地第二函数可以按照多个存储位置在预设数组中的排序,依次对多个存储位置处的数据进行检测。当预设数组中各存储位置均存在更新的检测结果时,第二函数会检测到所有更新的检测结果,这时第二函数完成对该检测任务对应的所有检测结果的检测,可以进行下一检测任务对应的检测结果的检测。
步骤104、根据所有传输节点的检测结果进行传输节点的调用。
当检测客户端接收到节点调用请求后,可以根据传输节点集群中各传输节点的检测结果,选取合适的目标传输节点给请求端使用,检测结果为节点分配提供了依据。
目标传输节点的选取条件可以为多种,例如,当检测结果为数值计算结果时,可以通过识别数值判断传输节点是否正常工作,在判定传输节点工作正常后,可以选择工作正常且与请求端距离较近的传输节点作为目标传输节点;当检测结果为传输节点的运行状态参数时,如CPU利用率、内容占用率等,可以选择负载较轻且与请求端距离较近的传输节点作为目标传输节点,从而保证了集群中各传输节点的负载均衡。
当本发明实施例所述方法应用于流数据传输的场景时,内容分发网络中的调度节点可以通过执行本方法对传输节点集群内的多个传输节点进行监管和分配,当调度节点根据检测结果确定某一传输节点工作异常时,可以发送节点异常通知,以使传输节点尽快被修复。同时调度节点可以以检测结果为依据为节点请求端重新分配合适的目标传输节点。
由于本发明实施例调用不同函数执行不同操作,多个操作之间无顺序关联,因此可以同时发送多个检测指令,并且在短时间内接收多个传输节点反馈的检测结果,相比于背景技术中的发送一个检测指令、接收对应的检测结果、发送下一个检测指令、接收对应的检测结果的执行过程,本发明实施例所述方法可以大幅度缩短检测操作的时间,缩短检测结果的等待时间,提高检测执行效率。
本发明实施例中,优选地,在所述根据所有传输节点的检测结果进行传输节点的调用之前,所述方法还包括:接收第一客户端对传输节点的调用请求;
所述检测结果包括传输节点的至少一种运行状态参数,所述根据所有传输节点的检测结果进行传输节点的调用包括:选取运行状态参数满足设定条件的目标传输节点,并反馈至所述第一客户端。
检测客户端负责对传输节点集群中多个传输节点的检测外,还可以负责多个传输节点的分配工作。检测客户端接收到第一客户端发送的节点调用请求后,可以根据各传输节点的检测结果确定各传输节点的运行情况,从而为第一客户端分配合适的目标传输节点,如分配距离较近且负载较轻的传输节点。
检测结果可以包括多种内容,当检测结果包括传输节点的至少一种运行状态参数时,如CPU利用率、内存占用率等,检测客户端可以选取运行状态参数满足设定条件的目标传输节点,并将选取的目标传输节点反馈至第一 客户端。
针对不同的运行状态参数可以对应不同的设定条件,例如当运行状态参数为CPU利用率时,设定条件可以为CPU利用率小于a%,其中a为正数;当运行状态参数为内存占用率时,设定条件可以为内存占用率小于b%,其中b为正数。
在流数据传输的场景中,检测客户端可以为调度节点,第一客户端可以为流数据客户端,流数据客户端推送流数据至网络中或从网络中拉取流数据时,会向调度节点发送对传输节点的调用请求,相应地检调度节点会接收到流数据客户端对传输节点的调用请求。调度节点可以选取运行状态参数满足设定条件的传输节点作为目标传输节点,并将其反馈至流数据客户端供其使用。
本发明实施例根据传输节点的运行状态参数分配目标传输节点,可以保证为第一客户端分配的目标传输节点均是工作正常的,还可以保证传输节点集群中多个传输节点的负载均衡,避免了传输节点负载过重现象的发生。
依据本发明实施例,调用第一函数发送检测指令,调用第二函数检测数据更新,调用第三函数提取更新的检测结果,由于调用不同函数执行不同操作,多个操作之间无顺序关联,因此本发明实施例可以同时发送多个检测指令至各传输节点,多个检测指令可以在短时间内被不同传输节点执行,从而缩短了多个检测指令的发送时间以及多个检测结果的接收时间,提高了检测操作的执行效率。
参照图2,示出了根据本发明实施例二的一种传输节点集群的检测方法的步骤流程示意图,具体可以包括如下步骤:
步骤201、调用第一函数向传输节点集群的各个传输节点同时发送检测指令,各检测指令携带指示检测结果在预置数组中存储位置的文件指针,以由传输节点按照文件指针将检测结果添加至预置数组。
本发明实施例所述的检测方法包括检测指令发送、数据更新检测、检测结果提取等多个操作,通过调用多个函数执行上述多个操作。本发明实施例将向传输节点集群的各个传输节点发送检测指令的客户端称为检测客户端。
为提高检测的准确性,可以使用多个检测任务对各传输节点进行检测。具体可以调用第一函数向传输节点集群的各个传输节点顺序发送多个检测任务对应的检测指令。由于各传输节点对检测结果的承载能力不同,因此可以按照不同方式向各传输节点发送多个检测任务对应的检测指令。当传输节点的承载能力较弱时,多个检测任务对应的检测指令的发送方式可以为:调 用所述第一函数执行一个检测任务,并在提取到所有传输节点对所述检测任务的检测结果后,调用所述第一函数执行下一个检测任务。例如,发送检测任务1对应的100条检测指令并且提取到100个传输节点反馈的100个检测结果后,再发送检测任务2对应的100条检测指令,按照上述方法完成对多个检测任务对应的检测指令的发送。
当传输节点的承载能力较强时,多个检测任务对应的检测指令的发送方式可以为:调用第一函数向传输节点集群的各个传输节点发送一个检测任务对应的检测指令后,直接调用向所述第一函数发送下一个检测任务对应的多个检测指令。例如,发送检测任务1对应的100条检测指令后,直接发送检测任务2对应的100条检测指令,按照上述方法对多个检测任务对应的检测指令进行发送。
对于传输节点的承载能力较弱时多个检测任务对应的检测指令的发送方式,只有在当前检测任务的执行结束后才可以执行下一检测任务的检测操作,相邻两个检测任务对应的检测指令的发送时间存在处理时间间隔。
执行上述发送方式时为控制多个检测任务对应的检测指令的发送时间,本发明实施例可以在调用所述第一函数执行下一个检测任务之前,针对待执行的下一个检测任务,查找记录的历史处理时间,根据查找的下一个检测任务的历史处理时间,设置所述一个检测任务和所述下一个检测任务之间的处理时间间隔。之后可以在开始执行所述一个检测任务后,按照设置的处理时间间隔,调用第一函数执行下一个检测任务。
例如,第一检测任务的历史处理时间为A秒,第二检测任务的处理时间为B秒,第一检测任务先执行,第二检测任务后执行,将时间A秒作为第一检测任务和第二检测任务之间的处理时间间隔,在开始执行第一检测任务,即调用第一函数向传输节点集群的各传输节点发送检测指令后,在A秒后,开始执行第二检测任务,调用第一函数向传输节点集群的各传输节点发送检测指令。
为执行上述步骤,依据检测任务的历史处理时间设置两个检测任务的处理时间间隔,本发明实施例可以在接收到一个检测任务对应的所有传输节点的检测结果后,记录该检测任务的历史处理时间,以便使用历史使用时间时从本地记录中提取。可以记录各检测指令的发送时间以及与检测指令对应的检测结果的接收时间,并且计算检测结果的接收时间与检测指令的发送时间差值,将最大时间差值作为检测任务的历史处理时间。
检测客户端发送多个检测任务对应的检测指令时,可以在向各传输节点发送当前检测任务对应的检测指令后,依据本地记录的检测任务与历史处理 时间的对应关系,确定当前执行的当前检测任务的历史处理时间,在发送当前检测任务历史处理时间后,发送下一检测任务对应的检测指令。
若当前执行的检测任务是新任务,检测客户端本地未记录该任务的历史处理时间,则本发明实施例针对未查找到历史处理时间的检测任务,可以以其他各个检测任务的历史处理时间的均值为历史处理时间。例如,检测客户端本地记录检测任务1的历史处理时间为0.10s、检测任务2的历史处理时间为0.12s以及检测任务3的历史处理时间为0.4s,则新检测任务计算的历史处理时间为0.12s。
本发明实施例可以使用同一接口发送检测指令和接收检测结果,也可以使用不同接口发送检测指令和接收检测结果。本步骤可以通过第一接口调用第一函数向传输节点集群的各个传输节点同时发送多个检测指令,传输节点可以通过第二接口向预置数组发送检测结果,其中第一接口与第二接口可以相同也可以不同。当第二接口不同于第一接口时,第二接口的数目可以为一个或多个,第二接口的数目可以根据实际进行设置。
当接口在某一时段内接收的检测结果过多时,接口处会出现检测结果滞留的现象,滞留现象会延长检测结果通过接口的时间,降低检测结果反馈至检测客户端的速度。为防止传送至第二接口的检测结果的数目超过接口的承载数目,保证各检测结果短时间内通过第二接口,本发明实施例可以在通过第一接口调用第一函数向传输节点集群的各个传输节点同时发送检测指令之前,检测第二接口对检测结果的当前承载数目,并且计算第二接口对检测结果的剩余承载数目,之后通过第一接口调用第一函数向传输节点集群的各个传输节点同时发送剩余承载数目的检测指令。
步骤202、调用第二函数检测预置数组的数据更新。
步骤203、当检测到存在更新的检测结果时,调用第三函数从所述预置数组中提取更新的检测结果。
步骤204、根据所述检测结果识别传输节点是否正常运行。
检测结果可以包括多种内容,可以指示传输节点的运行情况。检测客户端接收到检测结果后,可以根据所述检测结果识别传输节点是否正常运行。
由于检测结果可以包括多种内容,因此存在多种识别传输节点是否正常运行的方式。例如,当检测结果为数值计算结果即数值时,执行节点检测的客户端可以根据数值判断传输节点是否正常运行,如检测指令为“计算1+1”,如果接收的检测结果为“2”,则判定传输节点工作正常,否则,判断传输节点工作异常。当检测结果为传输节点的运行状态参数时,如CPU利用率、内存占用率等,检测客户端可以判断传输节点的运行状态参数是否满足设定 条件,如果符合,则判定传输节点工作正常,否则,判定传输节点工作异常。
步骤205、若识别到某个传输节点未正常运行,则为使用该传输节点的第二客户端重新分配传输节点。
如果根据检测结果识别到传输节点运行异常,则可以根据检测结果,在传输节点集群的多个传输节点中分配新的传输节点给第二客户端使用,从而保证第二客户端对传输节点的正常使用。
在流数据传输的场景中,检测客户端可以为调度节点,第二客户端可以为流数据客户端,流数据客户端使用传输节点推送流数据至网络中或从网络中拉取流数据,当调度节点检测到流数据客户端使用的传输节点发生异常时,可以根据其他传输节点的检测结果,为流数据客户端重新分配传输节点供其使用。
依据本发明实施例,调用第一函数发送检测指令,调用第二函数检测数据更新,调用第三函数提取更新的检测结果,由于调用不同函数执行不同操作,多个操作之间无顺序关联,因此本发明实施例可以同时发送多个检测指令至各传输节点,多个检测指令可以在短时间内被不同传输节点执行,从而缩短了多个检测指令的发送时间以及多个检测结果的接收时间,提高了检测操作的执行效率。
本发明实施例在通过第一接口发送检测指令之前,还检测了第二接口对检测结果的承载数目,并且计算了第二接口对检测结果的剩余承载数目,由于按照剩余承载数目发送检测指令至各传输节点,因此避免了第二接口出现大量检测结果滞留的情况的发生。
图3示出了根据本发明实施例三的一种传输节点集群的检测装置的结构框图。图3中的传输节点集群的检测装置包括:
检测指令发送模块301,用于调用第一函数向传输节点集群的各个传输节点同时发送检测指令,各检测指令携带指示检测结果在预置数组中存储位置的文件指针,以由传输节点按照文件指针将检测结果添加至预置数组。
数据更新检测模块302,用于调用第二函数检测预置数组的数据更新。
检测结果提取模块303,用于当检测到存在更新的检测结果时,调用第三函数从所述预置数组中提取更新的检测结果。
传输节点调用模块304,用于根据所有传输节点的检测结果进行传输节点的调用。
本发明实施例中,优选地,所述装置还包括:
调用请求接收模块,用于在所述根据所有传输节点的检测结果进行传输 节点的调用之前,接收第一客户端对传输节点的调用请求;
所述传输节点调用模块304,具体用于选取运行状态参数满足设定条件的目标传输节点,并反馈至所述第一客户端,所述检测结果包括传输节点的至少一种运行状态参数。
依据本发明实施例,调用第一函数发送检测指令,调用第二函数检测数据更新,调用第三函数提取更新的检测结果,由于调用不同函数执行不同操作,多个操作之间无顺序关联,因此本发明实施例可以同时发送多个检测指令至各传输节点,多个检测指令可以在短时间内被不同传输节点执行,从而缩短了多个检测指令的发送时间以及多个检测结果的接收时间,提高了检测操作的执行效率。
图4示出了根据本发明实施例四的一种传输节点集群的检测装置的结构框图。图4中的传输节点集群的检测装置包括:
检测指令发送模块401,用于调用第一函数向传输节点集群的各个传输节点顺序发送多个检测任务对应的检测指令。
数据更新检测模块402,用于调用第二函数检测预置数组的数据更新。
检测结果提取模块403,用于当检测到存在更新的检测结果时,调用第三函数从所述预置数组中提取更新的检测结果。
传输节点调用模块404,用于根据所有传输节点的检测结果进行传输节点的调用。
所述传输节点调用模块404包括:
运行状态识别子模块4041,用于根据所述检测结果识别传输节点是否正常运行;
节点重新分配子模块4042,用于若识别到某个传输节点未正常运行,则为使用该传输节点的第二客户端重新分配传输节点。
本发明实施例中,优选地,所述检测指令发送模块401,具体用于通过第一接口调用第一函数向传输节点集群的各个传输节点同时发送检测指令,所述传输节点通过第二接口向预置数组发送检测结果,所述第一接口与第二接口相同或不同。
本发明实施例中,优选地,所述装置还包括:
承载数目检测模块,用于在所述通过第一接口调用第一函数向传输节点集群的各个传输节点同时发送检测指令之前,检测所述第二接口对检测结果的当前承载数目;
剩余承载数目计算模块,用于计算所述第二接口对检测结果的剩余承载 数目;
所述检测指令发送模块401,具体用于通过所述第一接口调用所述第一函数向传输节点集群的各个传输节点同时发送所述剩余承载数目对应的检测指令。
本发明实施例中,优选地,所述检测指令发送模块401,具体用于调用第一函数向传输节点集群的各个传输节点顺序发送多个检测任务对应的检测指令。
本发明实施例中,优选地,所述检测指令发送模块401包括:
第一检测指令发送子模块,用于调用所述第一函数向传输节点集群的各个传输节点发送一个检测任务对应的检测指令;
第二检测指令发送子模块,用于在发送一个检测任务对应的检测指令后,直接调用向所述第一函数发送下一个检测任务对应的多个检测指令。
本发明实施例中,优选地,所述检测指令发送模块401包括:
第一检测任务执行子模块,用于调用所述第一函数执行一个检测任务;
第二检测任务执行子模块,用于在提取到所有传输节点对所述检测任务的检测结果后,调用所述第一函数执行下一个检测任务。
本发明实施例中,优选地,所述装置还包括:
历史处理时间查找模块,用于在所述调用所述第一函数执行下一个检测任务之前,针对待执行的下一个检测任务,查找记录的历史处理时间;
处理时间间隔设置模块,用于根据查找的所述下一个检测任务的历史处理时间,设置所述一个检测任务和所述下一个检测任务之间的处理时间间隔;
所述第二检测任务执行子模块,具体用于开始执行所述一个检测任务后,按照设置的处理时间间隔,调用所述第一函数执行所述下一个检测任务。
本发明实施例中,优选地,所述装置还包括:
历史处理时间确定模块,用于针对未查找到历史处理时间的所述下一检测任务,以其他各个检测任务的历史处理时间的均值为历史处理时间。
本发明实施例中,优选地,所述装置还包括:
历史处理时间记录模块,用于在接收到一个检测任务对应的所有传输节点的检测结果后,记录所述检测任务的历史处理时间。
依据本发明实施例,调用第一函数发送检测指令,调用第二函数检测数据更新,调用第三函数提取更新的检测结果,由于调用不同函数执行不同操作,多个操作之间无顺序关联,因此本发明实施例可以同时发送多个检测指令至各传输节点,多个检测指令可以在短时间内被不同传输节点执行,从而缩短了多个检测指令的发送时间以及多个检测结果的接收时间,提高了检测 操作的执行效率。
本发明实施例在通过第一接口发送检测指令之前,还检测了第二接口对检测结果的承载数目,并且计算了第二接口对检测结果的剩余承载数目,由于按照剩余承载数目发送检测指令至各传输节点,因此避免了第二接口出现大量检测结果滞留的情况的发生。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的传输节点集群的检测设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图5示出了可以实现根据本发明的传输节点集群的检测计算设备,例如应用服务器。该计算设备传统上包括处理器510和以存储器520形式的计算机程序产品或者计算机可读介质。存储器520可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器520具有用于执行上述方法中的任何方法步骤的程序代码531的存储空间530。例如,用于程序代码的存储空间530可以包括分别用于实现上面的方法中的各种步骤的各个程序代码531。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图6所述的便携式或者固定存储单元。该存储单元可以具有与图5的计算设备中的存储器520类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码531’,即可以由例如诸如510之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全 指同一个实施例。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。

Claims (24)

  1. 一种传输节点集群的检测方法,包括:
    调用第一函数向传输节点集群的各个传输节点同时发送检测指令,各检测指令携带指示检测结果在预置数组中存储位置的文件指针,以由传输节点按照文件指针将检测结果添加至预置数组;
    调用第二函数检测预置数组的数据更新;
    当检测到存在更新的检测结果时,调用第三函数从所述预置数组中提取更新的检测结果;
    根据所有传输节点的检测结果进行传输节点的调用。
  2. 根据权利要求1所述的方法,其中,所述调用第一函数向传输节点集群的各个传输节点同时发送检测指令包括:
    通过第一接口调用第一函数向传输节点集群的各个传输节点同时发送检测指令,所述传输节点通过第二接口向预置数组发送检测结果,所述第一接口与第二接口相同或不同。
  3. 根据权利要求2所述的方法,其中,在所述通过第一接口调用第一函数向传输节点集群的各个传输节点同时发送检测指令之前,所述方法还包括:
    检测所述第二接口对检测结果的当前承载数目;
    计算所述第二接口对检测结果的剩余承载数目;
    所述通过第一接口调用第一函数向传输节点集群的各个传输节点同时发送检测指令包括:
    通过所述第一接口调用所述第一函数向传输节点集群的各个传输节点同时发送所述剩余承载数目对应的检测指令。
  4. 根据权利要求1所述的方法,其中,所述调用第一函数向传输节点集群的各个传输节点同时发送检测指令包括:
    调用第一函数向传输节点集群的各个传输节点顺序发送多个检测任务对应的检测指令。
  5. 根据权利要求4所述的方法,其中,所述调用第一函数向传输节点集群的各个传输节点顺序发送多个检测任务对应的检测指令包括:
    调用所述第一函数向传输节点集群的各个传输节点发送一个检测任务对应的检测指令后,直接调用向所述第一函数发送下一个检测任务对应的多个检测指令。
  6. 根据权利要求4所述的方法,其中,所述调用第一函数向传输节点集群的各个传输节点顺序发送多个检测任务对应的检测指令包括:
    调用所述第一函数执行一个检测任务,并在提取到所有传输节点对所述检测任务的检测结果后,调用所述第一函数执行下一个检测任务。
  7. 根据权利要求6所述的方法,其中,在所述调用所述第一函数执行下一个检测任务之前,所述方法还包括:
    针对待执行的下一个检测任务,查找记录的历史处理时间;
    根据查找的所述下一个检测任务的历史处理时间,设置所述一个检测任务和所述下一个检测任务之间的处理时间间隔;
    所述调用所述第一函数执行下一个检测任务包括:
    开始执行所述一个检测任务后,按照设置的处理时间间隔,调用所述第一函数执行所述下一个检测任务。
  8. 根据权利要求7所述的方法,其中,所述方法还包括:
    针对未查找到历史处理时间的所述下一检测任务,以其他各个检测任务的历史处理时间的均值为历史处理时间。
  9. 根据权利要求7所述的方法,其中,所述方法还包括:
    在接收到一个检测任务对应的所有传输节点的检测结果后,记录所述检测任务的历史处理时间。
  10. 根据权利要求1所述的方法,其中,在所述根据所有传输节点的检测结果进行传输节点的调用之前,所述方法还包括:
    接收第一客户端对传输节点的调用请求;
    所述检测结果包括传输节点的至少一种运行状态参数,所述根据所有传输节点的检测结果进行传输节点的调用包括:
    选取运行状态参数满足设定条件的目标传输节点,并反馈至所述第一客户端。
  11. 根据权利要求1所述的方法,其中,所述根据所有传输节点的检测结果进行传输节点的调用包括:
    根据所述检测结果识别传输节点是否正常运行;
    若识别到某个传输节点未正常运行,则为使用该传输节点的第二客户端重新分配传输节点。
  12. 一种传输节点集群的检测装置,包括:
    检测指令发送模块,用于调用第一函数向传输节点集群的各个传输节点同时发送检测指令,各检测指令携带指示检测结果在预置数组中存储位置的文件指针,以由传输节点按照文件指针将检测结果添加至预置数组;
    数据更新检测模块,用于调用第二函数检测预置数组的数据更新;
    检测结果提取模块,用于当检测到存在更新的检测结果时,调用第三函数从所述预置数组中提取更新的检测结果;
    传输节点调用模块,用于根据所有传输节点的检测结果进行传输节点的调用。
  13. 根据权利要求12所述的装置,其中:
    所述检测指令发送模块,具体用于通过第一接口调用第一函数向传输节点集群的各个传输节点同时发送检测指令,所述传输节点通过第二接口向预置数组发送检测结果,所述第一接口与第二接口相同或不同。
  14. 根据权利要求13所述的装置,其中,所述装置还包括:
    承载数目检测模块,用于在所述通过第一接口调用第一函数向传输节点集群的各个传输节点同时发送检测指令之前,检测所述第二接口对检测结果的当前承载数目;
    剩余承载数目计算模块,用于计算所述第二接口对检测结果的剩余承载数目;
    所述检测指令发送模块,具体用于通过所述第一接口调用所述第一函数向传输节点集群的各个传输节点同时发送所述剩余承载数目对应的检测指令。
  15. 根据权利要求12所述的装置,其中:
    所述检测指令发送模块,具体用于调用第一函数向传输节点集群的各个传输节点顺序发送多个检测任务对应的检测指令。
  16. 根据权利要求15所述的装置,其中,所述检测指令发送模块包括:
    第一检测指令发送子模块,用于调用所述第一函数向传输节点集群的各个传输节点发送一个检测任务对应的检测指令;
    第二检测指令发送子模块,用于在发送一个检测任务对应的检测指令后,直接调用向所述第一函数发送下一个检测任务对应的多个检测指令。
  17. 根据权利要求15所述的装置,其中,所述检测指令发送模块包括:
    第一检测任务执行子模块,用于调用所述第一函数执行一个检测任务;
    第二检测任务执行子模块,用于在提取到所有传输节点对所述检测任务的检测结果后,调用所述第一函数执行下一个检测任务。
  18. 根据权利要求17所述的装置,其中,所述装置还包括:
    历史处理时间查找模块,用于在所述调用所述第一函数执行下一个检测任务之前,针对待执行的下一个检测任务,查找记录的历史处理时间;
    处理时间间隔设置模块,用于根据查找的所述下一个检测任务的历史处理时间,设置所述一个检测任务和所述下一个检测任务之间的处理时间间隔;
    所述第二检测任务执行子模块,具体用于开始执行所述一个检测任务后,按照设置的处理时间间隔,调用所述第一函数执行所述下一个检测任务。
  19. 根据权利要求18所述的装置,其中,所述装置还包括:
    历史处理时间确定模块,用于针对未查找到历史处理时间的所述下一检测任务,以其他各个检测任务的历史处理时间的均值为历史处理时间。
  20. 根据权利要求18所述的装置,其中,所述装置还包括:
    历史处理时间记录模块,用于在接收到一个检测任务对应的所有传输节点的检测结果后,记录所述检测任务的历史处理时间。
  21. 根据权利要求12所述的装置,其中,所述装置还包括:
    调用请求接收模块,用于在所述根据所有传输节点的检测结果进行传输节点的调用之前,接收第一客户端对传输节点的调用请求;
    所述传输节点调用模块,具体用于选取运行状态参数满足设定条件的目标传输节点,并反馈至所述第一客户端,所述检测结果包括传输节点的至少一种运行状态参数。
  22. 根据权利要求12所述的装置,其中,所述传输节点调用模块包括:
    运行状态识别子模块,用于根据所述检测结果识别传输节点是否正常运行;
    节点重新分配子模块,用于若识别到某个传输节点未正常运行,则为使用该传输节点的第二客户端重新分配传输节点。
  23. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-11中的任一个所述的传输节点集群的检测方法。
  24. 一种计算机可读介质,其中存储了如权利要求24所述的计算机程序。
PCT/CN2017/120142 2017-01-03 2017-12-29 一种传输节点集群的检测方法和装置 WO2018127012A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710003214.8 2017-01-03
CN201710003214.8A CN106656675B (zh) 2017-01-03 2017-01-03 一种传输节点集群的检测方法和装置

Publications (1)

Publication Number Publication Date
WO2018127012A1 true WO2018127012A1 (zh) 2018-07-12

Family

ID=58842509

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/120142 WO2018127012A1 (zh) 2017-01-03 2017-12-29 一种传输节点集群的检测方法和装置

Country Status (2)

Country Link
CN (1) CN106656675B (zh)
WO (1) WO2018127012A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114584490B (zh) * 2022-03-25 2024-04-09 阿里巴巴(中国)有限公司 数据传输检测方法以及装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656675B (zh) * 2017-01-03 2020-01-21 北京奇虎科技有限公司 一种传输节点集群的检测方法和装置
CN108768792B (zh) * 2018-07-06 2021-02-12 网宿科技股份有限公司 网络探测系统
CN110474821B (zh) * 2019-07-26 2021-08-31 济南浪潮数据技术有限公司 节点故障检测方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009125155A1 (fr) * 2008-04-01 2009-10-15 France Telecom Gestion de la distribution de contenus
CN104993953A (zh) * 2015-06-19 2015-10-21 北京奇虎科技有限公司 检测网络服务状态的方法和装置
CN105553724A (zh) * 2015-12-17 2016-05-04 北京奇虎科技有限公司 处理数据请求及获取服务器信息的方法及装置
CN105607951A (zh) * 2015-12-17 2016-05-25 北京奇虎科技有限公司 处理数据请求及获取服务器信息的方法及装置
CN106656675A (zh) * 2017-01-03 2017-05-10 北京奇虎科技有限公司 一种传输节点集群的检测方法和装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101373447A (zh) * 2008-08-20 2009-02-25 上海超级计算中心 计算机集群的健康度检测系统和方法
CN103812618B (zh) * 2013-12-20 2017-02-01 杭州承联通信技术有限公司 一种用于无线集群通信系统的分组数据传输方法
US9514010B2 (en) * 2014-09-19 2016-12-06 Netapp, Inc Cluster-wide service agents
CN105701209A (zh) * 2016-01-13 2016-06-22 广西师范大学 一种提高大数据上并行连接性能的负载平衡方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009125155A1 (fr) * 2008-04-01 2009-10-15 France Telecom Gestion de la distribution de contenus
CN104993953A (zh) * 2015-06-19 2015-10-21 北京奇虎科技有限公司 检测网络服务状态的方法和装置
CN105553724A (zh) * 2015-12-17 2016-05-04 北京奇虎科技有限公司 处理数据请求及获取服务器信息的方法及装置
CN105607951A (zh) * 2015-12-17 2016-05-25 北京奇虎科技有限公司 处理数据请求及获取服务器信息的方法及装置
CN106656675A (zh) * 2017-01-03 2017-05-10 北京奇虎科技有限公司 一种传输节点集群的检测方法和装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114584490B (zh) * 2022-03-25 2024-04-09 阿里巴巴(中国)有限公司 数据传输检测方法以及装置

Also Published As

Publication number Publication date
CN106656675B (zh) 2020-01-21
CN106656675A (zh) 2017-05-10

Similar Documents

Publication Publication Date Title
WO2018127012A1 (zh) 一种传输节点集群的检测方法和装置
CN108595157B (zh) 区块链数据的处理方法、装置、设备和存储介质
US9418005B2 (en) Managing garbage collection in a data processing system
CN112346829B (zh) 一种用于任务调度的方法及设备
US8141087B2 (en) Resolving computing resource deadlocks based on priority and dependent processes
US11144330B2 (en) Algorithm program loading method and related apparatus
WO2019153973A1 (zh) 事件驱动方法及装置
CN109033814B (zh) 智能合约触发方法、装置、设备及存储介质
CN111563014A (zh) 接口服务性能测试方法、装置、设备和存储介质
CN110515808B (zh) 数据库监控方法、装置、计算机设备及存储介质
EP3885849A1 (en) Prioritizing execution of multiple groups of analytic models
US9870314B1 (en) Update testing by build introspection
CN111381970A (zh) 集群任务的资源分配方法及装置、计算机装置及存储介质
CN106020984B (zh) 电子设备中进程的创建方法及装置
CN106980572B (zh) 分布式系统的在线调试方法和系统
CN114398179B (zh) 一种跟踪标识的获取方法、装置、服务器及存储介质
WO2019117767A1 (en) Method, function manager and arrangement for handling function calls
US20200394904A1 (en) Metering data management system and computer readable recording medium
US9778969B2 (en) Automatic memory leak detection
CN116303320A (zh) 基于日志文件的实时任务管理方法、装置、设备及介质
CN116594734A (zh) 容器迁移方法、装置、存储介质及电子设备
CN115499493A (zh) 异步事务处理方法、装置、存储介质及计算机设备
CN109062642B (zh) 一种控件消息通知方法及装置
CN112905602B (zh) 数据比对方法、计算设备及计算机存储介质
CN111309475A (zh) 一种检测任务执行方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17889791

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17889791

Country of ref document: EP

Kind code of ref document: A1