WO2020259515A1 - 一种tcp应用的调用链获取方法及装置 - Google Patents

一种tcp应用的调用链获取方法及装置 Download PDF

Info

Publication number
WO2020259515A1
WO2020259515A1 PCT/CN2020/097819 CN2020097819W WO2020259515A1 WO 2020259515 A1 WO2020259515 A1 WO 2020259515A1 CN 2020097819 W CN2020097819 W CN 2020097819W WO 2020259515 A1 WO2020259515 A1 WO 2020259515A1
Authority
WO
WIPO (PCT)
Prior art keywords
tcp
application
preset
call chain
port
Prior art date
Application number
PCT/CN2020/097819
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 WO2020259515A1 publication Critical patent/WO2020259515A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • H04L43/045Processing captured monitoring data, e.g. for logfile generation for graphical visualisation of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports
    • H04L43/062Generation of reports related to network traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/16Implementing security features at a particular protocol layer
    • H04L63/168Implementing security features at a particular protocol layer above the transport layer
    • 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 invention relates to the field of financial technology (Fintech) and the field of architecture management, in particular to a method and device for obtaining a call chain of a TCP application.
  • TCP transmission control protocol
  • TCP application A TCP application A
  • TCP application B TCP application B
  • TCP application A TCP application A
  • TCP application C TCP application C
  • the combination of TCP application A and other TCP applications and the called relationship are collectively referred to as the call chain of TCP application A.
  • the call chain of TCP applications needs to be collected.
  • the embodiments of the present application provide a method and device for obtaining a call chain of a TCP application, which solves the problem of inefficiency in the prior art that manually checking records to obtain a call chain of a TCP application is undoubtedly inefficient.
  • an embodiment of the present application provides a method for obtaining a call chain of a TCP application: obtaining the process number of the application process of the preset TCP application that calls the TCP service port according to the TCP service port of the preset TCP application;
  • the TCP service port is used for data transmission when the preset TCP application serves as a TCP application server; according to the process number, the port information of the TCP connection established by the preset TCP application is acquired; the established TCP application
  • a TCP connection is a TCP connection established when the preset TCP application serves as a TCP application server or as a TCP application caller; according to the matching result of the TCP service port and the port information of the established TCP connection, the Preset the first call chain of the TCP application.
  • the TCP service port of the preset TCP application is used to obtain the process number of the application process of the preset TCP application, and the port information of the TCP connection established by the preset TCP application is obtained accordingly. Since the TCP service port is used for all The preset TCP application performs data transmission when acting as a TCP application server. Therefore, according to the matching result of the TCP service port and the port information of the established TCP connection, the first call chain of the preset TCP application can be automatically obtained without passing through Manual analysis improves the efficiency of obtaining the first application chain.
  • the port information of the established TCP connection includes the TCP connection port of the local host and the TCP connection port of the external host;
  • the local host is the host running the application process of the preset TCP application
  • the external host is a host that has the established TCP connection with the local host; the preset is obtained according to the matching result of the TCP service port and the port information of the established TCP connection
  • the first invocation chain of the TCP application includes: if the TCP service port matches the TCP connection port of the local host, determining that the TCP application corresponding to the TCP connection port of the external host is the second of the preset TCP application A TCP application caller in the call chain; or, if the TCP service port does not match the TCP connection port of the local host, determine that the TCP application corresponding to the TCP connection port of the external host is the preset TCP
  • the TCP connection port of the local host is TCP Service port, so according to whether the TCP service port matches the TCP connection port of the local host, it can be determined that the TCP application corresponding to the TCP connection port of the external host is in the first call chain of the preset TCP application.
  • the TCP application caller is also the TCP application server, so that the first call chain of the preset TCP application is automatically obtained.
  • the method before the obtaining the process number of the application process of the preset TCP application that calls the TCP service port, the method further includes: establishing a secure shell protocol SSH remote connection with the local host; According to the TCP service port of the preset TCP application, obtaining the process number of the application process of the preset TCP application that calls the TCP service port includes: remotely connecting through the SSH, and monitoring the TCP service on the local host Port to obtain the process number.
  • the TCP service port can be monitored on the local host after SSH remote connection with the local host, so that the process number can be obtained conveniently and quickly without manual operation on the local host.
  • the method further includes: if the second call chain of the preset TCP application already exists in the preset memory database, and the If the first call chain is inconsistent with the second call chain, the second call chain in the preset memory database is updated to the first call chain.
  • the corresponding TCP application caller when the preset TCP application in the first call chain serves as the TCP application server is displayed, and/or the caller in the first call chain When the preset TCP application serves as the TCP application caller, the corresponding TCP application server.
  • the first call chain can be displayed according to the preset format, so that technical personnel according to the preset format can intuitively learn the TCP application caller or TCP application server of the preset TCP application in the first call chain.
  • this application provides a device for obtaining a call chain of a TCP application, including: an obtaining module and a processing module;
  • the processing module is configured to obtain the process number of the application process of the preset TCP application that calls the TCP service port through the obtaining module according to the TCP service port of the preset TCP application; the TCP service port is used for the The preset TCP application performs data transmission when serving as the TCP application server; the processing module is configured to obtain the port information of the TCP connection established by the preset TCP application through the acquisition module according to the process number;
  • the established TCP connection is a TCP connection established when the preset TCP application serves as a TCP application server or as a TCP application caller; according to the matching result of the TCP service port and the port information of the established TCP connection, Obtain the first call chain of the preset TCP application.
  • the port information of the established TCP connection includes the TCP connection port of the local host and the TCP connection port of the external host;
  • the local host is the host running the application process of the preset TCP application
  • the external host is a host that has the established TCP connection with the local host;
  • the processing module is specifically configured to: determine if the TCP service port matches the TCP connection port of the local host
  • the TCP application corresponding to the TCP connection port of the external host is the TCP application caller in the first call chain of the preset TCP application; or, if the TCP service port does not match the TCP connection port of the local host, Then it is determined that the TCP application corresponding to the TCP connection port of the external host is the TCP application server in the first call chain of the preset TCP application.
  • the processing module is further configured to: establish a secure shell protocol SSH remote connection with the local host; use the SSH remote connection, monitor the TCP service port on the local host, and pass all The obtaining module obtains the process number.
  • the processing module is further configured to: if the second call chain of the preset TCP application already exists in the preset memory database, and the first call chain and the second call chain If they are not consistent, the second call chain in the preset memory database is updated to the first call chain.
  • the processing module is further configured to: according to a preset format, display the corresponding TCP application caller when the preset TCP application in the first call chain serves as the TCP application server, and/ Or the corresponding TCP application server when the preset TCP application in the first call chain is used as the TCP application caller.
  • an embodiment of the present application provides a computer device including a program or instruction, and when the program or instruction is executed, it is used to execute the methods of the first aspect and the embodiments of the first aspect.
  • an embodiment of the present application provides a storage medium including a program or instruction, and when the program or instruction is executed, it is used to execute the method of the foregoing first aspect and each embodiment of the first aspect.
  • FIG. 1 is a schematic diagram of a TCP connection provided by an embodiment of the application.
  • FIG. 2 is a schematic diagram of a call chain of TCP application A provided by an embodiment of the application
  • FIG. 3 is a flowchart of steps of a method for obtaining a call chain of a TCP application provided by an embodiment of the application;
  • FIG. 4 is a schematic diagram of obtaining process number and port information of an established TCP connection in an embodiment of the application
  • FIG. 5 is a schematic diagram of a display interface of a call chain of a TCP application provided by an embodiment of the application;
  • FIG. 6 is a flowchart of specific steps of a method for obtaining a call chain of a TCP application provided by an embodiment of the application;
  • FIG. 7 is a schematic structural diagram of a device for obtaining a call chain of a TCP application according to an embodiment of the application
  • Fig. 8 is a schematic structural diagram of an apparatus for obtaining a call chain of a TCP application provided by an embodiment of the application.
  • CMDB Configuration Management Database
  • IP Internet Protocol
  • TCP protocol is the transmission control protocol, which provides full-duplex and reliable services in the network.
  • TCP applications can refer to software or application systems that perform data transmission and interaction based on the TCP protocol.
  • services that require reliable transmission services such as financial services
  • TCP is usually used to develop application systems, and TCP applications are widely used in enterprise business systems.
  • TCP connection port the network port used for data transmission and interaction when a TCP connection is established between the host and the host.
  • TCP service port The application system based on the TCP protocol for data transmission and interaction needs to start a network port on the server (usually a server host). When the client calls, it will call the corresponding server port to request some of the TCP applications provided kind of service. Obviously, the TCP service port is the TCP connection port when the host is the server host.
  • TCP application server The TCP application that receives the connection initiated by the TCP application caller can be regarded as the server of the TCP application caller.
  • TCP application caller A TCP application that uses a TCP connection to initiate a connection to the TCP application server can be regarded as the client of the TCP application server.
  • TCP connection In order to achieve reliable data transmission, the TCP application server and the TCP application caller must establish a transmission connection between the application processes. This connection has multiple connection states. In this application, only three TCP connection states are distinguished:
  • (a) LISTEN state This indicates that the TCP application of the TCP application server has been started and can be called by the TCP application caller through the TCP connection.
  • (b) ESTABLISHED state indicates that the connection between the TCP application server and the TCP application caller has been established, and data transmission is possible.
  • a schematic diagram of a TCP connection provided by an embodiment of this application.
  • the TCP connection can obtain connection information through commands on the application host.
  • This application will analyze the connection status to obtain the call chain of the TCP application based on the collected TCP connection information.
  • SSH Secure Shell
  • TCP application caller A calls the TCP application server B through the TCP connection
  • A may also be used as the TCP application server by the TCP application caller C through the TCP connection.
  • Figure 2 shows A, B, C This relationship is like a link, which represents the link relationship of which TCP application caller calls a TCP application system and which application server is called at the same time.
  • Figure 2 is the TCP application A provided by the embodiment of this application. Schematic diagram of the call chain. This application will automatically obtain and manage these call chains.
  • TCP transmission control protocols
  • TCP application A will call TCP application B
  • TCP application A will also call TCP application C
  • TCP application A and other TCP applications
  • the combination of the called relationship is collectively called the calling chain of TCP application A.
  • the call chain of TCP applications needs to be collected.
  • FIG. 3 it is a flowchart of steps of a method for obtaining a call chain of a TCP application provided by an embodiment of this application.
  • Step 301 According to the TCP service port of the preset TCP application, obtain the process number of the application process of the preset TCP application that calls the TCP service port.
  • the TCP service port is used for data transmission when the preset TCP application serves as a TCP application server.
  • Step 302 Obtain port information of the TCP connection established by the preset TCP application according to the process number.
  • the established TCP connection is a TCP connection established when the preset TCP application serves as a TCP application server or as a TCP application caller.
  • Step 303 Acquire the first call chain of the preset TCP application according to the matching result of the TCP service port and the port information of the established TCP connection.
  • the TCP service port of the preset TCP application is used to obtain the process number of the application process of the preset TCP application, and the port information of the TCP connection established by the preset TCP application is obtained accordingly. Since the TCP service port is used for all The preset TCP application performs data transmission when acting as a TCP application server. Therefore, according to the matching result of the TCP service port and the port information of the established TCP connection, the first call chain of the preset TCP application can be automatically obtained without passing through Manual analysis improves the efficiency of obtaining the first application chain.
  • an optional implementation is as follows: a user who needs to query the TCP application call chain enters a TCP application code that needs to query the call chain, and the TCP application code is used to identify the TCP application. This application queries whether the in-memory database used has the call chain information of the application system. If yes, follow the display to the user, if not, proceed to step 301.
  • another optional implementation manner may be: establishing a secure shell protocol SSH remote connection with the local host; on the basis of establishing the SSH remote connection, in step 101, obtaining the said TCP service port
  • the implementation manner of presetting the process number of the application process of the TCP application may be: through the SSH remote connection, monitoring the TCP service port on the local host, and obtaining the process number.
  • FIG. 4 it is a schematic diagram of obtaining the process number and port information of an established TCP connection in an embodiment of this application.
  • block 1 is the process of monitoring the TCP service port on the local host and obtaining the process number
  • 8080 is the TCP service port
  • the process number is 24289
  • LISTEN represents monitoring on the TCP service port 8080.
  • step 302 as shown in box 2 in Figure 4, it is a schematic diagram of the port information of the TCP connection established in step 302.
  • the fourth column represents the address and port of the local host of the TCP connection
  • the fifth column represents the external The address and port of the host.
  • the TCP service port can be monitored on the local host after SSH remote connection with the local host, so that the process number can be obtained conveniently and quickly without manual operation on the local host.
  • step 303 The following describes in detail the port information of the established TCP connection in conjunction with an optional implementation manner of step 303.
  • SSH remotely connects to the local host queried in step 303, and matches the TCP connection relationship of the TCP application through the local host TCP connection analysis command combined with the TCP service port. If the match fails, it will return the match failure. If the match is successful, the following optional methods will be implemented:
  • the port information of the established TCP connection includes the TCP connection port of the local host and the TCP connection port of the external host;
  • the local host is an application running the preset TCP application The host of the process;
  • the external host is a host that has the established TCP connection with the local host.
  • the obtaining the first call chain of the preset TCP application according to the matching result of the TCP service port and the port information of the established TCP connection may be as follows:
  • the TCP service port matches the TCP connection port of the local host, determining that the TCP application corresponding to the TCP connection port of the external host is the TCP application caller in the first call chain of the preset TCP application; Or, if the TCP service port does not match the TCP connection port of the local host, it is determined that the TCP application corresponding to the TCP connection port of the external host is the TCP application in the first call chain of the preset TCP application Service party.
  • the specific method for determining that the TCP application corresponding to the TCP connection port of the external host is the TCP application caller in the first call chain of the preset TCP application may be: calling the CMDB with the corresponding IP address and port in the fifth column Query to find out its corresponding TCP application.
  • the TCP connection port of the local host is TCP Service port, so according to whether the TCP service port matches the TCP connection port of the local host, it can be determined that the TCP application corresponding to the TCP connection port of the external host is in the first call chain of the preset TCP application.
  • the TCP application caller is also the TCP application server, so that the first call chain of the preset TCP application is automatically obtained.
  • step 303 in an optional implementation manner, if the second call chain of the preset TCP application already exists in the preset memory database, and the first call chain is inconsistent with the second call chain, then The second call chain in the preset memory database is updated to the first call chain.
  • the preset format may be the format in Table 1 (such as the json format), which is cached in the memory database.
  • the corresponding TCP application caller when the preset TCP application in the first call chain serves as the TCP application server, and/or the When the preset TCP application in the first call chain serves as the TCP application caller, the corresponding TCP application server.
  • the first call chain can be displayed according to the preset format, so that technical personnel according to the preset format can intuitively learn the TCP application caller or TCP application server of the preset TCP application in the first call chain.
  • FIG. 5 a schematic diagram of a display interface of a call chain of a TCP application provided by this application.
  • the TCP application server and the TCP application caller of the preset TCP application can be distinguished by different colors.
  • FIG. 6 is a flowchart of specific steps of a method for obtaining a call chain of a TCP application provided by an embodiment of the application.
  • Step 601 Input a TCP application A to query the call chain.
  • Step 602 Query whether there is a second call chain of TCP application A in the memory database.
  • step 608 If the query is yes, go to step 608; if the query is not, go to step 603.
  • Step 603 Query the CMDB to obtain information such as the application host and TCP service port of TCP application A.
  • Step 604 SSH remotely connect to the TCP application A application host, obtain the process number according to the TCP service port, and obtain the established TCP connection according to the process number.
  • Step 605 According to the port information of the established TCP connection and the TCP service port, combined with the CMDB, analyze the first call chain of the TCP application A.
  • Step 606 Write the analyzed first call chain into the memory database according to the preset format.
  • step 606 After step 606 is executed, step 607 is executed, and at the same time, step 603 can be returned, and step 603 to step 606 are repeated.
  • Step 607 Display the first call chain of TCP application A in a chart form.
  • Step 608 If the user clicks on the TCP application displayed in the chart, query the call chain of the clicked system.
  • this application provides a schematic structural diagram of an apparatus for obtaining a call chain of a TCP application.
  • the apparatus for obtaining a call chain of a TCP application includes an obtaining module 701.
  • the obtaining module 701 may include The receiving unit, the device may also include a sending unit.
  • the processing module 702 is used to control and manage the actions of the device.
  • the acquiring module 701 and the sending unit are used to support communication between the device and other network entities.
  • the processing module 702 may be a processor or a control device, for example, a general-purpose central processing unit (central processing unit, CPU), a general-purpose processor, a digital signal processing (digital signal processing, DSP), and an application specific integrated circuit (application specific integrated circuit).
  • the processor may also be a combination for realizing computing functions, for example, including a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
  • the acquisition module 701 is an interface circuit of the device, and is used to receive signals from other devices. For example, when the device is implemented as a chip, the acquisition module 701 is an interface circuit used by the chip to receive signals from other chips or devices, and the sending unit is an interface circuit used by the chip to send signals to other chips or devices.
  • the device may be the device that needs to obtain the first call chain of the preset TCP application in the above-mentioned embodiment, for example, it may be an analysis and management device of the call chain of the TCP application.
  • the processing module 702 may be, for example, a processor
  • the acquiring module 701 may be, for example, a transceiver.
  • the transceiver may include a radio frequency circuit
  • the storage unit may be, for example, a memory.
  • the processing module 702 may be, for example, a processor
  • the acquiring module 701 or the sending unit may be, for example, an input/output interface, a pin, or a circuit.
  • the processing module 702 can execute computer-executable instructions stored in a storage unit.
  • the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit located in the chip in the first forwarding server.
  • External storage units such as read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), etc.
  • the processing module 702 is configured to obtain the process number of the application process of the preset TCP application that calls the TCP service port through the obtaining module 701 according to the TCP service port of the preset TCP application;
  • the TCP service port is used for data transmission when the preset TCP application is used as a TCP application server;
  • the processing module 702 is configured to obtain the established TCP connection of the preset TCP application through the obtaining module 701 according to the process number
  • the established TCP connection is the TCP connection established when the preset TCP application serves as the TCP application server or as the TCP application caller; according to the TCP service port and the established TCP connection According to the matching result of the port information, the first call chain of the preset TCP application is obtained.
  • the port information of the established TCP connection includes the TCP connection port of the local host and the TCP connection port of the external host;
  • the local host is the host running the application process of the preset TCP application
  • the external host is a host that has the established TCP connection with the local host;
  • the processing module 702 is specifically configured to: determine if the TCP service port matches the TCP connection port of the local host
  • the TCP application corresponding to the TCP connection port of the external host is the TCP application caller in the first call chain of the preset TCP application; or, if the TCP service port does not match the TCP connection port of the local host , It is determined that the TCP application corresponding to the TCP connection port of the external host is the TCP application server in the first call chain of the preset TCP application.
  • the processing module 702 is further configured to: establish a secure shell protocol SSH remote connection with the local host; use the SSH remote connection, monitor the TCP service port on the local host, and pass The obtaining module 701 obtains the process number.
  • the processing module 702 is further configured to: if the second call chain of the preset TCP application already exists in the preset memory database, and the first call chain and the second call If the chains are inconsistent, the second call chain in the preset memory database is updated to the first call chain.
  • the processing module 702 is further configured to: according to a preset format, display the corresponding TCP application caller when the preset TCP application in the first call chain serves as the TCP application server, and /Or the corresponding TCP application server when the preset TCP application in the first call chain serves as the TCP application caller.
  • an embodiment of the present application further provides a computing device, and the computing device 800 may be the operating diagnostic device in the above-mentioned embodiment.
  • the computing device 800 includes a processor 802 and a communication interface 803.
  • the computing device 800 may also include a memory 801.
  • the computing device 800 may further include a communication line 804.
  • the communication interface 803, the processor 802, and the memory 801 may be connected to each other through a communication line 804;
  • the communication line 804 may be a peripheral component interconnection standard (peripheral component interconnect, PCI for short) bus or an extended industry standard architecture (extended industry standard architecture) , Referred to as EISA) bus and so on.
  • the communication line 804 can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one thick line is used in FIG. 8 to represent, but it does not mean that there is only one bus or one type of bus.
  • the processor 802 may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the program of the present application.
  • the processor 802 may be configured to: obtain the port information of the TCP connection established by the preset TCP application according to the process number; the established TCP connection is the preset A TCP connection established when a TCP application serves as a TCP application server or as a TCP application caller; according to the matching result of the TCP service port and the port information of the established TCP connection, obtain the first preset TCP application Call chain.
  • the communication interface 803 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), Wired access network, etc.
  • RAN radio access network
  • WLAN wireless local area networks
  • Wired access network etc.
  • One possible implementation is the communication interface 803, which is used to obtain the process number of the application process of the preset TCP application that calls the TCP service port according to the TCP service port of the preset TCP application; the TCP service port is used Data transmission is performed when the preset TCP application serves as the TCP application server.
  • the memory 801 may be ROM or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, or may be an electrically erasable programmable read-only memory (electrically erasable programmable read-only memory).
  • read-only memory EEPROM
  • compact disc read-only memory, CD-ROM
  • optical disc storage including compact discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.
  • magnetic disks A storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
  • the memory can exist independently and is connected to the processor through a communication line 804. The memory can also be integrated with the processor.
  • the memory 801 is used to store computer-executed instructions for executing the solutions of the present application, and the processor 802 controls the execution.
  • the processor 802 is configured to execute computer-executable instructions stored in the memory 801, so as to implement the method provided in the foregoing embodiment of the present application.
  • the embodiment of the present application provides a storage medium including a program or instruction.
  • the program or instruction When the program or instruction is executed, it is used to execute a method for obtaining a call chain of a TCP application and any optional method provided by the embodiment of the present application.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本发明公开了一种TCP应用的调用链获取方法及装置,其中方法为:根据预设TCP应用的TCP服务端口,获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号;根据所述进程号,获取所述预设TCP应用已建立的TCP连接的端口信息;根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链。上述方法应用于金融科技(Fintech)时,由于TCP服务端口用于所述预设TCP应用作为应用服务方时进行数据传输,根据TCP服务端口与已建立的TCP连接的端口信息的匹配结果,即可自动获取预设TCP应用的第一调用链,不需要通过人工分析,提高了第一应用链的获取效率。

Description

一种TCP应用的调用链获取方法及装置
相关申请的交叉引用
本申请要求在2019年06月28日提交中国专利局、申请号为201910579333.7、申请名称为“一种TCP应用的调用链获取方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及金融科技(Fintech)领域和架构管理领域,尤其涉及一种TCP应用的调用链获取方法及装置。
背景技术
随着计算机技术的发展,越来越多的技术(大数据、分布式、区块链(Blockchain)、人工智能等)应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变。目前,金融科技领域中,由于对可靠性传输要求较高,很多金融交易都会通过传输控制协议(transmission control protocol,TCP)来进行,基于TCP的TCP应用之间会存在调用关系,如TCP应用A会调用TCP应用B,同时TCP应用A也会调用TCP应用C,TCP应用A与其他TCP应用的调用以及被调用关系的组合统称为TCP应用A的调用链。在一些业务场景下,需要对TCP应用的调用链进行收集。
然而,目前获取一个TCP应用的调用链的方式为人工获取,具体由TCP应用的相关负责人手工绘制出来,以图表或者文档的形式保留并存,显然,当TCP应用的调用关系较复杂时,通过人工方式排查记录无疑是低效的。
发明内容
本申请实施例提供一种TCP应用的调用链获取方法及装置,解决了现有技术中人工方式排查记录获取TCP应用的调用链无疑是低效的问题。
第一方面,本申请实施例提供一种TCP应用的调用链获取方法:根据预设TCP应用的TCP服务端口,获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号;所述TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输;根据所述进程号,获取所述预设TCP应用已建立的TCP连接的端口信息;所述已建立的TCP连接为所述预设TCP应用作为TCP应用服务方或作为TCP应用调用方时建立的TCP连接;根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链。
上述方法中,通过预设TCP应用的TCP服务端口,获取预设TCP应用的应用进程的进程号,并据此获取预设TCP应用已建立的TCP连接的端口信息,由于TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输,因此根据TCP服务端口与已建立的TCP连接的端口信息的匹配结果,即可自动获取预设TCP应用的第一调用链,不需要通过人工分析,从而提高了第一应用链的获取效率。
一种可选实施方式中,所述已建立的TCP连接的端口信息包括本地主机的TCP连接端口和外部主机的TCP连接端口;所述本地主机为运行所述预设TCP应用的应用进程的主机;所述外部主机为与所述本地主机存在所述已建立的TCP连接的主机;所述根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链,包括:若所述TCP服务端口与所述本地主机的TCP连接端口匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用调用方;或者,若所述TCP服务端口与所述本地主机的TCP连接端口不匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用服务方。
上述方法中,由于TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输,那么当本地主机运行的预设TCP应用作为服务方时,本地主机的TCP连接端口即为TCP服务端口,从而根据所述TCP服务端口 与所述本地主机的TCP连接端口是否匹配,即可确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用调用方还是TCP应用服务方,从而自动获取预设TCP应用的第一调用链。
一种可选实施方式中,所述获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号之前,还包括:与所述本地主机建立安全外壳协议SSH远程连接;所述根据预设TCP应用的TCP服务端口,获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号,包括:通过所述SSH远程连接,在所述本地主机监听所述TCP服务端口,获取所述进程号。
上述方法中,可通过与本地主机进行SSH远程连接后,在本地主机监听TCP服务端口,从而不需要人工在本地主机上操作,便能方便快捷地获取进程号。
一种可选实施方式中,所述获取所述预设TCP应用的第一调用链之后,还包括:若预设内存数据库中已存在所述预设TCP应用的第二调用链,且所述第一调用链与所述第二调用链不一致,则将所述预设内存数据库中的所述第二调用链更新为所述第一调用链。
上述方式下,确定预设内存数据库中是否已存在第二调用链,若不存在,则将第一调用链补充进预设内存数据库,若存在,且第一调用链和第二调用链不一致,则将第二调用链更新为第一调用链,从而保证内存数据库中的调用链为实时最新的调用链。
一种可选实施方式中,按照预设格式,展示所述第一调用链中所述预设TCP应用作为TCP应用服务方时对应的TCP应用调用方,和/或所述第一调用链中所述预设TCP应用作为TCP应用调用方时对应的TCP应用服务方。
上述方式下,可根据预设格式展示出第一调用链,从而方便技术按照预设格式人员直观地获悉第一调用链中所述预设TCP应用的TCP应用调用方或TCP应用服务方。
第二方面,本申请提供一种TCP应用的调用链获取装置,包括:获取模块和处理模块;
所述处理模块,用于根据预设TCP应用的TCP服务端口,通过获取模块获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号;所述TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输;所述处理模块,用于根据所述进程号,通过所述获取模块获取所述预设TCP应用已建立的TCP连接的端口信息;所述已建立的TCP连接为所述预设TCP应用作为TCP应用服务方或作为TCP应用调用方时建立的TCP连接;根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链。
一种可选实施方式中,所述已建立的TCP连接的端口信息包括本地主机的TCP连接端口和外部主机的TCP连接端口;所述本地主机为运行所述预设TCP应用的应用进程的主机;所述外部主机为与所述本地主机存在所述已建立的TCP连接的主机;所述处理模块具体用于:若所述TCP服务端口与所述本地主机的TCP连接端口匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用调用方;或者,若所述TCP服务端口与所述本地主机的TCP连接端口不匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用服务方。
一种可选实施方式中,所述处理模块还用于:与所述本地主机建立安全外壳协议SSH远程连接;通过所述SSH远程连接,在所述本地主机监听所述TCP服务端口,通过所述获取模块获取所述进程号。
一种可选实施方式中,所述处理模块还用于:若预设内存数据库中已存在所述预设TCP应用的第二调用链,且所述第一调用链与所述第二调用链不一致,则将所述预设内存数据库中的所述第二调用链更新为所述第一调用链。
一种可选实施方式中,所述处理模块还用于:按照预设格式,展示所述第一调用链中所述预设TCP应用作为TCP应用服务方时对应的TCP应用调用方,和/或所述第一调用链中所述预设TCP应用作为TCP应用调用方时对应的TCP应用服务方。
上述第二方面及第二方面各个实施例的有益效果,可以参考上述第一方面及第一方面各个实施例的有益效果,这里不再赘述。
第三方面,本申请实施例提供一种计算机设备,包括程序或指令,当所述程序或指令被执行时,用以执行上述第一方面及第一方面各个实施例的方法。
第四方面,本申请实施例提供一种存储介质,包括程序或指令,当所述程序或指令被执行时,用以执行上述第一方面及第一方面各个实施例的方法。
附图说明
图1为本申请实施例提供的TCP连接的示意图;
图2为本申请实施例提供的TCP应用A的调用链的示意图;
图3为本申请实施例提供的一种TCP应用的调用链获取方法的步骤流程图;
图4为本申请实施例中获取进程号以及已建立的TCP连接的端口信息的示意图;
图5为本申请实施例提供的一种TCP应用的调用链的展示界面的示意图;
图6为本申请实施例提供的一种TCP应用的调用链获取方法的具体步骤流程图;
图7为本申请实施例提供的一种TCP应用的调用链获取装置的结构示意图;
图8为本申请实施例提供的一种TCP应用的调用链获取装置的结构示意图。
具体实施方式
为了更好的理解上述技术方案,下面将结合说明书附图及具体的实施方式对上述技术方案进行详细的说明,应当理解本申请实施例以及实施例中的具体特征是对本申请技术方案的详细的说明,而不是对本申请技术方案的限 定,在不冲突的情况下,本申请实施例以及实施例中的技术特征可以相互结合。
为方便叙述,下面首先列举本申请实施例中出现的名词和缩略语。
配置管理数据库(Configuration Management Database,CMDB):CMDB存储与管理企业IT架构中设备的各种配置信息,它与所有服务支持和服务交付流程都紧密相联,支持这些流程的运转、发挥配置信息的价值,同时依赖于相关流程保证数据的准确性。CMDB会记录企业的机器、应用系统、互联网协议(Internet Protocol,IP)地址等信息以及他们的关联关系。本申请利用了CMDB的查询接口来查询CMDB存储的一些配置信息。
TCP应用:TCP协议即是传输控制协议,在网络中提供全双工的和可靠的服务。TCP应用可以是指基于TCP协议进行数据传输和交互的软件或应用系统等。通常在要求传输服务可靠的业务(例如金融业务)中,通常采用TCP来开发应用系统,TCP应用在企业的业务系统中都是广泛使用的。
TCP连接端口:主机与主机之间建立TCP连接时用于进行数据传输和交互的网络端口。
TCP服务端口:基于TCP协议进行数据传输和交互的应用系统需要在服务端(通常是一个服务器主机)上启动一个网络端口,当客户端调用时会调用对应服务端的端口来请求TCP应用提供的某种服务。显然,TCP服务端口为主机为服务器主机时的TCP连接端口。
TCP应用服务方:接收TCP应用调用方发起的连接的TCP应用,可以视为TCP应用调用方的服务端。
TCP应用调用方:使用TCP连接发起对TCP应用服务方的连接的TCP应用,可以视为TCP应用服务方的客户端。
TCP连接:为实现数据的可靠传输,TCP应用服务方和TCP应用调用方要在应用进程间建立传输连接,这种连接有多种连接状态,本申请中只区分三种TCP连接状态:
(a)监听(LISTEN)状态:这个表示TCP应用服务方的TCP应用已经启动, 可以被TCP应用调用方通过TCP连接调用。
(b)已建立(ESTABLISHED)状态:表示TCP应用服务方和TCP应用调用方连接已经建立,可以进行数据传输。
(c)其他状态:不是a和b所表示的状态。
如图1所示,为本申请实施例提供的TCP连接的示意图。TCP连接可以通过应用主机上的命令获取到连接信息,本申请将根据采集到的TCP连接信息,分析连接状态得到TCP应用的调用链。
安全外壳协议(Secure Shell,SSH)远程连接:SSH即是,通过SSH协议可以使用密码或者免密(配置SSH证书)的形式从一个主机远程连接到应用主机,本申请需要部署到可以远程(密码或者免密)到其他应用主机的一个服务器主机上,并进行TCP连接信息的采集。
调用链:当TCP应用调用方A通过TCP连接调用TCP应用服务方B的时候,同时A也可能作为TCP应用服务方被TCP应用调用方C通过TCP连接调用,图2表示了A、B、C的调用关系,这种关系像链路一样,表示了一个TCP应用系统被哪些TCP应用调用方调用,同时调用了哪些应用服务方的链路关系,图2为本申请实施例提供的TCP应用A的调用链的示意图。本申请将自动获取这些调用链并进行管理。
在金融机构(银行机构、保险机构或证券机构)在进行业务(如银行的贷款业务、存款业务等)运转过程中,由于对可靠性传输要求较高,很多金融交易都会通过传输控制协议(transmission control protocol,TCP)来进行,基于TCP的TCP应用之间会存在调用关系,如TCP应用A会调用TCP应用B,同时TCP应用A也会调用TCP应用C,TCP应用A与其他TCP应用的调用以及被调用关系的组合统称为TCP应用A的调用链。在一些业务场景下,需要对TCP应用的调用链进行收集。然而,目前获取一个TCP应用的调用链的方式为人工获取,具体由TCP应用的相关负责人手工绘制出来,以图表或者文档的形式保留并存,显然,当TCP应用的调用关系较复杂时,通过人工方式排查记录无疑是低效的。这种情况不符合银行等金融机构的需求,无法 保证金融机构各项业务的高效运转。
TCP应用的调用链的分析和管理在架构管理领域具有非常重要的意义,很多公司都将应用系统的调用链以图表或者文档的方式留存起来,便于分析整个业务系统的架构,出现业务事故时候进行问题定位和优化。如图3所示,为本申请实施例提供的一种TCP应用的调用链获取方法的步骤流程图。
步骤301:根据预设TCP应用的TCP服务端口,获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号。
所述TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输。
步骤302:根据所述进程号,获取所述预设TCP应用已建立的TCP连接的端口信息。
所述已建立的TCP连接为所述预设TCP应用作为TCP应用服务方或作为TCP应用调用方时建立的TCP连接。
步骤303:根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链。
上述方法中,通过预设TCP应用的TCP服务端口,获取预设TCP应用的应用进程的进程号,并据此获取预设TCP应用已建立的TCP连接的端口信息,由于TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输,因此根据TCP服务端口与已建立的TCP连接的端口信息的匹配结果,即可自动获取预设TCP应用的第一调用链,不需要通过人工分析,从而提高了第一应用链的获取效率。
步骤301之前,一种可选实施方式如下:需要查询TCP应用调用链的使用者输入一个需要查询调用链的TCP应用代号,TCP应用代号用于标识TCP应用。本申请查询所使用的内存数据库是否有该应用系统的调用链信息。如果有则按照展示给使用者,如果没有进行步骤301。
根据给出的应用系统代号查询CMDB接口找出该应用系统所部署的应用主机。
步骤301之前,另一种可选实施方式可以为:与所述本地主机建立安全外壳协议SSH远程连接;在建立了SSH远程连接的基础上,步骤101中获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号的实施方式可以为:通过所述SSH远程连接,在所述本地主机监听所述TCP服务端口,获取所述进程号。下面结合图4详细说明。如图4所示,为本申请实施例中获取进程号以及已建立的TCP连接的端口信息的示意图。其中,方框1为在所述本地主机监听所述TCP服务端口,获取所述进程号的过程,8080为TCP服务端口,进程号为24289,LISTEN代表对8080这个TCP服务端口进行了监听。
步骤302中,如图4中方框2所示,为步骤302中已建立的TCP连接的端口信息的示意图,第4列代表了该TCP连接的本地主机的地址和端口,第5列表示了外部主机的地址和端口。
上述方法中,可通过与本地主机进行SSH远程连接后,在本地主机监听TCP服务端口,从而不需要人工在本地主机上操作,便能方便快捷地获取进程号。
下面结合步骤303的一种可选实施方式,详细说明已建立的TCP连接的端口信息。SSH远程连接到步骤303中查询到的本地主机,通过本地主机TCP连接分析命令结合TCP服务端口,匹配到该TCP应用的TCP连接关系。如果匹配失败则返回匹配失败,如果匹配成功则根据实施以下可选方式:
步骤303的一种可选实施方式中,所述已建立的TCP连接的端口信息包括本地主机的TCP连接端口和外部主机的TCP连接端口;所述本地主机为运行所述预设TCP应用的应用进程的主机;所述外部主机为与所述本地主机存在所述已建立的TCP连接的主机。在该可选实施方式的条件下,所述根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链,可以如下:
若所述TCP服务端口与所述本地主机的TCP连接端口匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用 链中的TCP应用调用方;或者,若所述TCP服务端口与所述本地主机的TCP连接端口不匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用服务方。
确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用调用方的具体方法可以为:将对应的第五列的IP地址和端口调用CMDB查询,找出其对应的TCP应用。
上述方法中,由于TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输,那么当本地主机运行的预设TCP应用作为服务方时,本地主机的TCP连接端口即为TCP服务端口,从而根据所述TCP服务端口与所述本地主机的TCP连接端口是否匹配,即可确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用调用方还是TCP应用服务方,从而自动获取预设TCP应用的第一调用链。
步骤303之后,一种可选实施方式中,若预设内存数据库中已存在所述预设TCP应用的第二调用链,且所述第一调用链与所述第二调用链不一致,则将所述预设内存数据库中的所述第二调用链更新为所述第一调用链。
上一段所述的可选实施方式中,举例来说,预设格式可以为表1中的格式(如json格式),缓存到内存数据库中。
Figure PCTCN2020097819-appb-000001
表1
上述方式下,确定预设内存数据库中是否已存在第二调用链,若不存在,则将第一调用链补充进预设内存数据库,若存在,且第一调用链和第二调用链不一致,则将第二调用链更新为第一调用链,从而保证内存数据库中的调 用链为实时最新的调用链。
步骤303之后,另外一种可选实施方式中,按照预设格式,展示所述第一调用链中所述预设TCP应用作为TCP应用服务方时对应的TCP应用调用方,和/或所述第一调用链中所述预设TCP应用作为TCP应用调用方时对应的TCP应用服务方。
上述方式下,可根据预设格式展示出第一调用链,从而方便技术按照预设格式人员直观地获悉第一调用链中所述预设TCP应用的TCP应用调用方或TCP应用服务方。
如图5所示,为本申请提供的一种TCP应用的调用链的展示界面的示意图。
图5中,调用链的展示界面中可以通过不同颜色区分出预设TCP应用的TCP应用服务方和TCP应用调用方。
图6为本申请实施例提供的一种TCP应用的调用链获取方法的具体步骤流程图。
步骤601:输入一个要查询调用链的TCP应用A。
步骤602:查询内存数据库是否已经有TCP应用A的第二调用链。
若查询有,则执行步骤608;若查询无,则执行步骤603。
步骤603:查询CMDB获取TCP应用A的应用主机、TCP服务端口等信息。
步骤604:SSH远程连接到TCP应用A应用主机,按照TCP服务端口,获取进程号,并根据进程号获取已建立的TCP连接。
步骤605:根据已建立的TCP连接的端口信息和TCP服务端口,结合CMDB,分析TCP应用A的第一调用链。
步骤606:将分析得到的第一调用链按照预设格式写入内存数据库。
步骤606执行完毕后执行步骤607,同时可返回步骤603,重复执行步骤603~步骤606。
步骤607:将TCP应用A的第一调用链以图表形式展示出来。
步骤608:如果使用者点击图表中展示出来的TCP应用,查询被点击系统的调用链。
如图7所示,为本申请提供一种TCP应用的调用链获取装置的结构示意图,所述TCP应用的调用链获取装置包括:获取模块701,作为一种实现方式,该获取模块701可以包括接收单元,该装置还可以包括发送单元。处理模块702用于对装置的动作进行控制管理。获取模块701和发送单元用于支持装置与其他网络实体的通信。其中,处理模块702可以是处理器或控制设备,例如可以是通用中央处理器(central processing unit,CPU),通用处理器,数字信号处理(digital signal processing,DSP),专用集成电路(application specific integrated circuits,ASIC),现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。获取模块701是一种该装置的接口电路,用于从其它装置接收信号。例如,当该装置以芯片的方式实现时,该获取模块701是该芯片用于从其它芯片或装置接收信号的接口电路,发送单元是该芯片用于向其它芯片或装置发送信号的接口电路。
该装置可以为上述实施例中的需要获取预设TCP应用的第一调用链的装置,例如,可以为TCP应用的调用链的分析和管理装置。一种可能的实现方式中,该处理模块702例如可以是处理器,该获取模块701例如可以是收发器。可选的,该收发器可以包括射频电路,该存储单元例如可以是存储器。例如,当装置为用于第一节点的芯片时,该处理模块702例如可以是处理器,该获取模块701或发送单元例如可以是输入/输出接口、管脚或电路等。该处理模块702可执行存储单元存储的计算机执行指令,可选地,该存储单元为该芯片内的存储单元,如寄存器、缓存等,该存储单元还可以是第一转发服务器内的位于该芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器 (random access memory,RAM)等。
一种可能的实现方式中,处理模块702,用于根据预设TCP应用的TCP服务端口,通过获取模块701获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号;所述TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输;处理模块702,用于根据所述进程号,通过获取模块701获取所述预设TCP应用已建立的TCP连接的端口信息;所述已建立的TCP连接为所述预设TCP应用作为TCP应用服务方或作为TCP应用调用方时建立的TCP连接;根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链。
一种可选实施方式中,所述已建立的TCP连接的端口信息包括本地主机的TCP连接端口和外部主机的TCP连接端口;所述本地主机为运行所述预设TCP应用的应用进程的主机;所述外部主机为与所述本地主机存在所述已建立的TCP连接的主机;所述处理模块702具体用于:若所述TCP服务端口与所述本地主机的TCP连接端口匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用调用方;或者,若所述TCP服务端口与所述本地主机的TCP连接端口不匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用服务方。
一种可选实施方式中,所述处理模块702还用于:与所述本地主机建立安全外壳协议SSH远程连接;通过所述SSH远程连接,在所述本地主机监听所述TCP服务端口,通过获取模块701获取所述进程号。
一种可选实施方式中,所述处理模块702还用于:若预设内存数据库中已存在所述预设TCP应用的第二调用链,且所述第一调用链与所述第二调用链不一致,则将所述预设内存数据库中的所述第二调用链更新为所述第一调用链。
一种可选实施方式中,所述处理模块702还用于:按照预设格式,展示所述第一调用链中所述预设TCP应用作为TCP应用服务方时对应的TCP应 用调用方,和/或所述第一调用链中所述预设TCP应用作为TCP应用调用方时对应的TCP应用服务方。
基于同一构思,如图8所示,本申请实施例还提供了一种计算设备,该计算设备800可以是上述实施例中的运行诊断器。计算设备800包括:处理器802和通信接口803,可选的,计算设备800还可以包括存储器801。可选的,计算设备800还可以包括通信线路804。其中,通信接口803、处理器802以及存储器801可以通过通信线路804相互连接;通信线路804可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。通信线路804可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
处理器802可以是一个CPU,微处理器,ASIC,或一个或多个用于控制本申请方案程序执行的集成电路。
一种可能的实施例中,处理器802,可以用于:根据所述进程号,获取所述预设TCP应用已建立的TCP连接的端口信息;所述已建立的TCP连接为所述预设TCP应用作为TCP应用服务方或作为TCP应用调用方时建立的TCP连接;根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链。
通信接口803,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local area networks,WLAN),有线接入网等。
一种可能的实现方式,通信接口803,用于根据预设TCP应用的TCP服务端口,获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号;所述TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输。
存储器801可以是ROM或可存储静态信息和指令的其他类型的静态存储设备,RAM或者可存储信息和指令的其他类型的动态存储设备,也可以是电 可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路804与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器801用于存储执行本申请方案的计算机执行指令,并由处理器802来控制执行。处理器802用于执行存储器801中存储的计算机执行指令,从而实现本申请上述实施例提供的方法。
本申请实施例提供一种存储介质,包括程序或指令,当所述程序或指令被执行时,用以执行本申请实施例提供的一种TCP应用的调用链获取方法及任一可选方法。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器 中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (12)

  1. 一种传输控制协议TCP应用的调用链获取方法,其特征在于,包括:
    根据预设TCP应用的TCP服务端口,获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号;所述TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输;
    根据所述进程号,获取所述预设TCP应用已建立的TCP连接的端口信息;所述已建立的TCP连接为所述预设TCP应用作为TCP应用服务方或作为TCP应用调用方时建立的TCP连接;
    根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链。
  2. 如权利要求1所述的方法,其特征在于,所述已建立的TCP连接的端口信息包括本地主机的TCP连接端口和外部主机的TCP连接端口;所述本地主机为运行所述预设TCP应用的应用进程的主机;所述外部主机为与所述本地主机存在所述已建立的TCP连接的主机;所述根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链,包括:
    若所述TCP服务端口与所述本地主机的TCP连接端口匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用调用方;
    或者,若所述TCP服务端口与所述本地主机的TCP连接端口不匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用服务方。
  3. 如权利要求2所述的方法,其特征在于,所述获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号之前,还包括:
    与所述本地主机建立安全外壳协议SSH远程连接;
    所述根据预设TCP应用的TCP服务端口,获取调用所述TCP服务端口 的所述预设TCP应用的应用进程的进程号,包括:
    通过所述SSH远程连接,在所述本地主机监听所述TCP服务端口,获取所述进程号。
  4. 如权利要求1-3任一项所述的方法,其特征在于,所述获取所述预设TCP应用的第一调用链之后,还包括:
    若预设内存数据库中已存在所述预设TCP应用的第二调用链,且所述第一调用链与所述第二调用链不一致,则将所述预设内存数据库中的所述第二调用链更新为所述第一调用链。
  5. 如权利要求1-3任一项所述的方法,其特征在于,所述获取所述预设TCP应用的第一调用链之后,还包括:
    按照预设格式,展示所述第一调用链中所述预设TCP应用作为TCP应用服务方时对应的TCP应用调用方,和/或所述第一调用链中所述预设TCP应用作为TCP应用调用方时对应的TCP应用服务方。
  6. 一种传输控制协议TCP应用的调用链获取装置,其特征在于,包括:获取模块和处理模块;
    所述处理模块,用于根据预设TCP应用的TCP服务端口,通过获取模块获取调用所述TCP服务端口的所述预设TCP应用的应用进程的进程号;所述TCP服务端口用于所述预设TCP应用作为TCP应用服务方时进行数据传输;
    所述处理模块,用于根据所述进程号,通过所述获取模块获取所述预设TCP应用已建立的TCP连接的端口信息;所述已建立的TCP连接为所述预设TCP应用作为TCP应用服务方或作为TCP应用调用方时建立的TCP连接;根据所述TCP服务端口与所述已建立的TCP连接的端口信息的匹配结果,获取所述预设TCP应用的第一调用链。
  7. 如权利要求6所述的装置,其特征在于,所述已建立的TCP连接的端口信息包括本地主机的TCP连接端口和外部主机的TCP连接端口;所述本地主机为运行所述预设TCP应用的应用进程的主机;所述外部主机为与所述本地主机存在所述已建立的TCP连接的主机;所述处理模块具体用于:
    若所述TCP服务端口与所述本地主机的TCP连接端口匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用调用方;
    或者,若所述TCP服务端口与所述本地主机的TCP连接端口不匹配,则确定所述外部主机的TCP连接端口对应的TCP应用为所述预设TCP应用的第一调用链中的TCP应用服务方。
  8. 如权利要求6所述的装置,其特征在于,所述处理模块还用于:
    与所述本地主机建立安全外壳协议SSH远程连接;
    通过所述SSH远程连接,在所述本地主机监听所述TCP服务端口,通过所述获取模块获取所述进程号。
  9. 如权利要求6-8任一所述的装置,其特征在于,所述处理模块还用于:
    若预设内存数据库中已存在所述预设TCP应用的第二调用链,且所述第一调用链与所述第二调用链不一致,则将所述预设内存数据库中的所述第二调用链更新为所述第一调用链。
  10. 如权利要求6-8任一所述的装置,其特征在于,所述处理模块还用于:
    按照预设格式,展示所述第一调用链中所述预设TCP应用作为TCP应用服务方时对应的TCP应用调用方,和/或所述第一调用链中所述预设TCP应用作为TCP应用调用方时对应的TCP应用服务方。
  11. 一种计算机设备,其特征在于,包括程序或指令,当所述程序或指令被执行时,如权利要求1至5中任意一项所述的方法被执行。
  12. 一种存储介质,其特征在于,包括程序或指令,当所述程序或指令被执行时,如权利要求1至5中任意一项所述的方法被执行。
PCT/CN2020/097819 2019-06-28 2020-06-23 一种tcp应用的调用链获取方法及装置 WO2020259515A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910579333.7 2019-06-28
CN201910579333.7A CN110224899B (zh) 2019-06-28 2019-06-28 一种tcp应用的调用链获取方法及装置

Publications (1)

Publication Number Publication Date
WO2020259515A1 true WO2020259515A1 (zh) 2020-12-30

Family

ID=67815304

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/097819 WO2020259515A1 (zh) 2019-06-28 2020-06-23 一种tcp应用的调用链获取方法及装置

Country Status (2)

Country Link
CN (1) CN110224899B (zh)
WO (1) WO2020259515A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338441A (zh) * 2021-12-28 2022-04-12 腾云悦智科技(深圳)有限责任公司 一种基于业务流量智能识别业务链路的分析方法
CN115865729A (zh) * 2022-11-24 2023-03-28 杭州米络星科技(集团)有限公司 程序服务健康性判断方法和装置、存储介质和终端

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110224899B (zh) * 2019-06-28 2023-04-18 深圳前海微众银行股份有限公司 一种tcp应用的调用链获取方法及装置
CN112165530B (zh) * 2020-10-12 2022-10-21 北京贝斯平云科技有限公司 一种服务调用关系分析方法及装置
CN113791964A (zh) * 2021-09-27 2021-12-14 首约科技(北京)有限公司 一种基于传输控制协议四层的服务监控方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957555A (zh) * 2011-08-29 2013-03-06 中国移动通信集团上海有限公司 业务支撑系统进程间关联关系的识别方法、系统及服务器
CN104852823A (zh) * 2014-02-18 2015-08-19 腾讯科技(深圳)有限公司 进程的监测方法、装置和系统
US20180321796A1 (en) * 2017-05-05 2018-11-08 Servicenow, Inc. Software Application Portfolio Discovery and Management
CN109510729A (zh) * 2018-12-25 2019-03-22 上海新炬网络技术有限公司 一种基于CMDB和Netstat发现应用拓扑关系的实现方法
CN109840533A (zh) * 2017-11-28 2019-06-04 中国移动通信集团浙江有限公司 一种应用拓扑图识别方法及装置
CN110224899A (zh) * 2019-06-28 2019-09-10 深圳前海微众银行股份有限公司 一种tcp应用的调用链获取方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107135156A (zh) * 2017-06-07 2017-09-05 努比亚技术有限公司 调用链数据采集方法、移动终端及计算机可读存储介质
CN107404420B (zh) * 2017-09-11 2021-10-15 北京奇艺世纪科技有限公司 一种调用链路性能监控方法及装置
CN109165141A (zh) * 2018-08-10 2019-01-08 武汉优品楚鼎科技有限公司 一种计算机系统运维可视化监控方法、系统及装置
CN109684104B (zh) * 2018-12-17 2021-03-26 广州方硅信息技术有限公司 一种服务间调用链的展示实现方法及设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957555A (zh) * 2011-08-29 2013-03-06 中国移动通信集团上海有限公司 业务支撑系统进程间关联关系的识别方法、系统及服务器
CN104852823A (zh) * 2014-02-18 2015-08-19 腾讯科技(深圳)有限公司 进程的监测方法、装置和系统
US20180321796A1 (en) * 2017-05-05 2018-11-08 Servicenow, Inc. Software Application Portfolio Discovery and Management
CN109840533A (zh) * 2017-11-28 2019-06-04 中国移动通信集团浙江有限公司 一种应用拓扑图识别方法及装置
CN109510729A (zh) * 2018-12-25 2019-03-22 上海新炬网络技术有限公司 一种基于CMDB和Netstat发现应用拓扑关系的实现方法
CN110224899A (zh) * 2019-06-28 2019-09-10 深圳前海微众银行股份有限公司 一种tcp应用的调用链获取方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338441A (zh) * 2021-12-28 2022-04-12 腾云悦智科技(深圳)有限责任公司 一种基于业务流量智能识别业务链路的分析方法
CN115865729A (zh) * 2022-11-24 2023-03-28 杭州米络星科技(集团)有限公司 程序服务健康性判断方法和装置、存储介质和终端

Also Published As

Publication number Publication date
CN110224899A (zh) 2019-09-10
CN110224899B (zh) 2023-04-18

Similar Documents

Publication Publication Date Title
WO2020259515A1 (zh) 一种tcp应用的调用链获取方法及装置
AU2015267387B2 (en) Method and apparatus for automating the building of threat models for the public cloud
WO2021000494A1 (zh) 基于区块链的操作日志记录方法、装置、设备及存储介质
WO2018184535A1 (zh) 保险业务处理方法、装置、服务器和存储介质
WO2020000720A1 (zh) 服务器、报文处理方法、程序和计算机可读存储介质
US10963888B2 (en) Payment complaint method, device, server and readable storage medium
US9594853B2 (en) Combined deterministic and probabilistic matching for data management
WO2017161956A1 (zh) 一种数据库扩展系统、设备和用于扩展数据库的方法
US20210042311A1 (en) Dynamic prioritization of attributes to determine search space size of each term, then index on those sizes as attributes
US11256536B2 (en) Method and system for processing transactions using a transaction coordinator
WO2020224100A1 (zh) 区块链配置文件的处理装置、系统、方法及存储介质
WO2019127773A1 (zh) 保险产品的销售处理方法、装置、存储介质及终端
WO2022188614A1 (zh) 图像形成装置监控装置、方法、系统和存储介质
WO2023155437A1 (zh) 基于在线问诊的数据处理方法、装置和计算机设备
CN112860805A (zh) 一种区块链数据交互方法及系统
WO2019185066A1 (zh) 一种区块链背书方法及装置
CN112542244B (zh) 辅助信息的生成方法、相关装置及计算机程序产品
US20140067602A1 (en) Sanctions Screening
CN112787910A (zh) 一种消息处理方法、装置、电子设备和存储介质
US10296882B2 (en) Multicomputer processing of client device request data using centralized event orchestrator and link discovery engine
US11979795B2 (en) Tracking velocity information
US20240005182A1 (en) Streaming Media Processing Method, Device and Electronic Equipment Based on Inference Service
US20240089339A1 (en) Caching across multiple cloud environments
CN115037803B (zh) 一种服务调用方法、电子设备及存储介质
WO2024051273A1 (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: 20830646

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 22.04.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20830646

Country of ref document: EP

Kind code of ref document: A1