CN111741118B - Interface calling method, device, computer equipment and computer readable storage medium - Google Patents
Interface calling method, device, computer equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN111741118B CN111741118B CN202010600047.7A CN202010600047A CN111741118B CN 111741118 B CN111741118 B CN 111741118B CN 202010600047 A CN202010600047 A CN 202010600047A CN 111741118 B CN111741118 B CN 111741118B
- Authority
- CN
- China
- Prior art keywords
- interface
- target
- information
- server
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/08—Protocols specially adapted for terminal emulation, e.g. Telnet
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/133—Protocols for remote procedure calls [RPC]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides an interface calling method, an interface calling device, computer equipment and a computer readable storage medium. The interface calling method receives a plurality of groups of server information input by a user, wherein each group of server information comprises an IP address, a port number, an encoding method and a decoding method of a server; receiving selection information of the user on the multiple groups of server information, and sending a connection request to a target server through a telnet protocol according to the selection information; when the target server is successfully connected, an interface information request is sent to the target server through a telnet protocol according to a communication identification code returned by the target server; receiving interface information returned by the target server, and receiving a target interface selected by the user from the interface information; requesting the target server to execute the target interface through telnet protocol. The invention improves the efficiency of interface calling.
Description
Technical Field
The present invention relates to the field of interface technologies, and in particular, to an interface calling method, an interface calling device, a computer device, and a computer readable storage medium.
Background
DUBBO is a distributed service framework, which is a high-performance and transparent RPC remote service invocation scheme.
As DUBBO becomes an Apache foundation hatching program, the heat of DUBBO is increasing. But how to promote the efficiency of calling DUBBO interfaces is a problem to be solved.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an interface calling method, apparatus, computer device, and computer-readable storage medium that can call a DUBBO interface.
A first aspect of the present application provides an interface calling method, including:
receiving a plurality of groups of server information input by a user, wherein each server information comprises an IP address, a port number, an encoding method and a decoding method of a server;
receiving selection information of the user on the multiple groups of server information, and sending a connection request to a target server through a telnet protocol according to the selection information;
when the target server is successfully connected, an interface information request is sent to the target server through a telnet protocol according to a communication identification code returned by the target server;
receiving interface information returned by the target server, and receiving a target interface selected by the user from the interface information;
requesting the target server to execute the target interface through telnet protocol.
In another possible implementation manner, the sending, according to the selection information, the connection request to the target server through telnet protocol includes:
inquiring the information of the service end selected by the user from a local micro database according to the selection information;
and sending a connection request to a target server through a telnet protocol according to the server information selected by the user.
In another possible implementation manner, after the sending, according to the communication identifier returned by the target server, an interface information request to the target server through telnet protocol, the interface calling method further includes:
judging whether the interface information is received within a preset time;
if the interface information is received within the preset time, receiving a target interface selected by the user from the interface information;
and if the interface information is not received within the preset time, sending reminding information of failed request to the user.
In another possible implementation manner, the receiving the target interface selected by the user from the interface information includes:
decoding the interface information according to the decoding method of the target server to obtain an interface list;
displaying the interface list to the user;
acquiring a search condition input by a user, and searching an intermediate target interface from the interface list based on a fuzzy search method according to the search condition;
and receiving a target interface selected by the user from the intermediate target interfaces.
In another possible implementation manner, the requesting, by the telnet protocol, the target server to execute the target interface includes:
receiving interface calling parameters input by the user;
adopting the coding method of the target server to code the interface calling parameters and the interface identification codes of the target interfaces;
and sending the encoded interface calling parameters and the interface identification codes to the target server through a telnet protocol, so that the target server executes the target interface.
In another possible implementation manner, the interface calling method further includes:
when the target server side is requested to successfully execute the target interface through a telnet protocol, displaying an execution result to the user in a json format;
and storing the interface calling parameters and the interface identification codes of the target interfaces into a blockchain. In another possible implementation manner, the interface calling method further includes:
and requesting the target server to execute a plurality of interfaces through multithreading according to a telnet protocol so as to perform pressure measurement on the target server.
A second aspect of the present application provides an interface calling device, including:
the first receiving module is used for receiving a plurality of groups of server information input by a user, and each group of server information comprises an IP address, a port number, an encoding method and a decoding method of a server;
the first sending module is used for receiving the selection information of the plurality of groups of server information from the user and sending a connection request to a target server through a telnet protocol according to the selection information;
the second sending module is used for sending an interface information request to the target server through a telnet protocol according to the communication identification code returned by the target server when the target server is successfully connected;
the second receiving module is used for receiving the interface information returned by the target server and receiving a target interface selected by the user from the interface information;
and the request module is used for requesting the target server to execute the target interface through a telnet protocol.
A third aspect of the present application provides a computer device comprising a processor for implementing the interface calling method when executing a computer program stored in a memory.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the interface invocation method.
According to the method, interface information requests are sent to a target server through telnet protocol according to multiple groups of server information; receiving interface information returned by the target server, and receiving a target interface selected by the user from the interface information; and requesting the target server to execute the target interface through a telnet protocol, and calling the target interface of the target server only according to the server information. Complex interface calling according to an interface document of a target interface is avoided, and the efficiency of interface calling is improved, so that the efficiency of testing the DUBBO interface is improved.
Drawings
Fig. 1 is a flowchart of an interface calling method provided by an embodiment of the present invention.
Fig. 2 is a block diagram of an interface calling device according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will be more clearly understood, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It should be noted that, in the case of no conflict, the embodiments of the present application and the features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, and the described embodiments are merely some, rather than all, embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Preferably, the interface invoking method of the present invention is applied in one or more computer devices. The computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device, and the like.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
Example 1
Fig. 1 is a flowchart of an interface calling method according to an embodiment of the present invention. The interface calling method is applied to the computer equipment and used for calling the DUBBO interface.
As shown in fig. 1, the interface calling method includes:
and 101, receiving a plurality of groups of server information input by a user, wherein each server information comprises an IP address, a port number, an encoding method and a decoding method of a server.
The user can input schemes of different DUBBO server information to manage and call interfaces of different DUBBO servers.
For example, two DUBBO server side information input by a user are received, "scheme one: 127.0.0.1 20880, GBK encoding method, GBK decoding method "," scheme two: 127.0.0.2 20881, GBK encoding method, GBK decoding method). Scheme one can be after-sales server information, 127.0.0.1 is the IP address of the after-sales server, 20880 is the port number; scheme two may be order service side information, 127.0.0.2 is an IP address of the order service side, 20881 is a port number. The user can input different DUBBO server information to manage and call the interfaces of the different DUBBO servers.
102, receiving selection information of the user on the multiple groups of server information, and sending a connection request to a target server through a telnet protocol according to the selection information.
In a specific embodiment, the sending, according to the selection information, the connection request to the target server through telnet protocol includes:
inquiring the information of the service end selected by the user from a local micro database sqlite according to the selection information;
and sending a connection request to a target server through a telnet protocol according to the server information selected by the user.
For example, the user selects order service side information from multiple sets of service side information (scheme two), the selection information is identification information of the order service side information, the order service side information can be queried from a local micro database sqlite through the identification information, and the order service side information is stored in the local micro database sqlite in the process of user input, or can be imported into the local micro database sqlite in batches in advance; and sending a connection request to an order server (target server) through a telnet protocol according to the order server information.
The Telnet protocol is a member of the TCP/IP protocol family, and is the standard protocol and the main way of Internet Telnet services. The Telnet protocol provides the ability to complete remote host work on a local computer.
103, when the connection of the target server is successful, sending an interface information request to the target server through a telnet protocol according to the communication identification code returned by the target server.
In a specific embodiment, after sending an interface information request to the target server through telnet protocol according to the communication identifier returned by the target server, the interface calling method further includes:
judging whether the interface information is received within a preset time;
if the interface information is received within the preset time, receiving a target interface selected by the user from the interface information;
and if the interface information is not received within the preset time, sending reminding information of failed request to the user.
For example, the preset time is 2s, and whether interface information returned by the order server (target server) is received within 2s is judged; if interface information returned by the order service end is received within 2 seconds, receiving a target interface selected by the user from the interface information; if the interface information returned by the order server is not received within 2s, sending reminding information of failed request to the user, and attempting to send the interface information request to the target server again through telnet protocol according to the communication identification code returned by the target server.
104, receiving interface information returned by the target server, and receiving a target interface selected by the user from the interface information.
In a specific embodiment, the receiving the target interface selected by the user from the interface information includes:
decoding the interface information according to the decoding method of the target server to obtain an interface list;
displaying the interface list to the user;
acquiring a search condition input by a user, and searching an intermediate target interface from the interface list based on a fuzzy search method according to the search condition;
and receiving a target interface selected by the user from the intermediate target interfaces.
For example, decoding interface information according to GBK decoding method; displaying an interface list obtained by decoding the interface information to a user; acquiring a search condition (such as an interface name of Order interface) input by a user, and searching an intermediate target interface (such as Order interface1 and Order interface 2) from an interface list according to the search condition based on a fuzzy search method; and receiving a target interface Order interface1 selected by a user from the intermediate target interfaces.
And 105, requesting the target server to execute the target interface through a telnet protocol.
In a specific embodiment, the requesting, by the telnet protocol, the target server to execute the target interface includes:
receiving interface calling parameters input by the user;
adopting the coding method of the target server to code the interface calling parameters and the interface identification codes of the target interfaces;
and sending the encoded interface calling parameters and the interface identification codes to the target server through a telnet protocol, so that the target server executes the target interface.
In a specific embodiment, the interface calling method further includes:
when the target server side is requested to successfully execute the target interface through a telnet protocol, displaying an execution result to the user in a json format;
and storing the interface calling parameters and the interface identification codes of the target interfaces to a local micro database sqlite.
In another embodiment, the interface calling method further includes:
when the user selects the target interface again, reading the interface calling parameters and the interface identification codes of the target interface from a local micro database sqlite;
adopting the coding method of the target server to code the interface calling parameters and the interface identification codes of the target interfaces;
and sending the encoded interface calling parameters and the interface identification codes to the target server through a telnet protocol, so that the target server executes the target interface.
And storing the interface calling parameters and the interface identification codes of the target interfaces into a blockchain. It is emphasized that, to further ensure the privacy and security of the interface call parameters and the interface identification code of the target interface, the interface call parameters and the interface identification code of the target interface may also be stored in a node of a blockchain.
In another embodiment, the interface calling method may further include:
and storing the multiple sets of server information to a local mini database sqlite.
In another embodiment, the interface calling method further includes: the local mini-database sqlite maintains a variety of DUBBO interface call schemes. Specifically, after the DUBBO interface is successfully invoked for the first time, the interface parameters are stored in the local mini database sqlite. The DUBBO interface is selected again, and the parameters of the DUBBO interface are acquired and displayed from a local mini database sqlite. The user can reduce the inquiry interface documents and input interface parameters, and the interface calling efficiency is improved.
According to the first embodiment, an interface information request is sent to a target server through a telnet protocol according to a plurality of groups of server information; receiving interface information returned by the target server, and receiving a target interface selected by the user from the interface information; and requesting the target server to execute the target interface through a telnet protocol, and calling the target interface of the target server only according to the server information. Complex interface calling according to an interface document of a target interface is avoided, and the efficiency of interface calling is improved, so that the efficiency of testing the DUBBO interface is improved.
In another embodiment, the interface calling method further includes:
and checking the format and the data type of the interface calling parameters input by the user. To prevent interface calling error and improve interface calling efficiency.
In another embodiment, the interface calling method further includes:
and monitoring the execution time of the target interface to track the efficiency of executing the target interface. And when the execution time of the target interface is monitored to be smaller than the preset time, sending a call fault reminder for the target interface to a user.
In another embodiment, the interface calling method may further include:
and receiving an execution result of executing the target interface returned by the target server.
The interface calling method may further include:
and requesting the target server to execute a plurality of interfaces through multithreading according to a telnet protocol so as to perform pressure measurement on the target server.
Example two
Fig. 2 is a block diagram of an interface calling device according to a second embodiment of the present invention. The interface calling device 20 is applied to a computer device. The interface calling means 20 are for calling the DUBBO interface.
As shown in fig. 2, the interface calling device 20 may include a first receiving module 201, a first sending module 202, a second sending module 203, a second receiving module 204, and a requesting module 205.
The first receiving module 201 is configured to receive multiple sets of server information input by a user, where each server information includes an IP address, a port number, an encoding method, and a decoding method of a server.
The user can input schemes of different DUBBO server information to manage and call interfaces of different DUBBO servers.
For example, two DUBBO server side information input by a user are received, "scheme one: 127.0.0.1 20880, GBK encoding method, GBK decoding method "," scheme two: 127.0.0.2 20881, GBK encoding method, GBK decoding method). Scheme one can be after-sales server information, 127.0.0.1 is the IP address of the after-sales server, 20880 is the port number; scheme two may be order service side information, 127.0.0.2 is an IP address of the order service side, 20881 is a port number. The user can input different DUBBO server information to manage and call the DUBBO interfaces of the different DUBBO servers.
The first sending module 202 is configured to receive selection information of the user on the multiple sets of server information, and send a connection request to a target server according to the selection information through telnet protocol.
In a specific embodiment, the sending, according to the selection information, the connection request to the target server through telnet protocol includes:
inquiring the information of the service end selected by the user from a local micro database sqlite according to the selection information;
and sending a connection request to a target server through a telnet protocol according to the server information selected by the user.
For example, the user selects order service side information from multiple sets of service side information (scheme two), the selection information is identification information of the order service side information, the order service side information can be queried from a local micro database sqlite through the identification information, and the order service side information is stored in the local micro database sqlite in the process of user input, or can be imported into the local micro database sqlite in batches in advance; and sending a connection request to an order server (target server) through a telnet protocol according to the order server information.
The Telnet protocol is a member of the TCP/IP protocol family, and is the standard protocol and the main way of Internet Telnet services. The Telnet protocol provides the ability to complete remote host work on a local computer.
And the second sending module 203 is configured to send an interface information request to the target server through telnet protocol according to the communication identifier returned by the target server when the target server is successfully connected.
In a specific embodiment, the interface calling device 20 further includes a judging module, configured to judge whether the interface information is received within a preset time after sending an interface information request to the target server through telnet protocol according to the communication identifier returned by the target server; if the interface information is received within the preset time, receiving a target interface selected by the user from the interface information; and if the interface information is not received within the preset time, sending reminding information of failed request to the user.
For example, the preset time is 2s, and whether interface information returned by the order server (target server) is received within 2s is judged; if interface information returned by the order service end is received within 2 seconds, receiving a target interface selected by the user from the interface information; if the interface information returned by the order server is not received within 2s, sending reminding information of failed request to the user, and attempting to send the interface information request to the target server again through telnet protocol according to the communication identification code returned by the target server.
And the second receiving module 204 is configured to receive interface information returned by the target server, and receive a target interface selected by the user from the interface information.
In a specific embodiment, the receiving the target interface selected by the user from the interface information includes:
decoding the interface information according to the decoding method of the target server to obtain an interface list;
displaying the interface list to the user;
acquiring a search condition input by a user, and searching an intermediate target interface from the interface list based on a fuzzy search method according to the search condition;
and receiving a target interface selected by the user from the intermediate target interfaces.
For example, decoding interface information according to GBK decoding method; displaying an interface list obtained by decoding the interface information to a user; acquiring a search condition (such as an interface name of Order interface) input by a user, and searching an intermediate target interface (such as Order interface1 and Order interface 2) from an interface list according to the search condition based on a fuzzy search method; and receiving a target interface Order interface1 selected by a user from the intermediate target interfaces.
And the request module 205 is configured to request, through telnet protocol, the target server to execute the target interface.
In a specific embodiment, the requesting, by the telnet protocol, the target server to execute the target interface includes:
receiving interface calling parameters input by the user;
adopting the coding method of the target server to code the interface calling parameters and the interface identification codes of the target interfaces;
and sending the encoded interface calling parameters and the interface identification codes to the target server through a telnet protocol, so that the target server executes the target interface.
In a specific embodiment, the interface calling device 20 further includes a storage module, configured to display an execution result to the user in json format when the target server requests that the target interface be executed successfully through telnet protocol;
and storing the interface calling parameters and the interface identification codes of the target interfaces to a local micro database sqlite.
In another embodiment, the second sending module is further configured to read the interface calling parameter and the interface identifier of the target interface from a local mini database sqlite when the user selects the target interface again;
adopting the coding method of the target server to code the interface calling parameters and the interface identification codes of the target interfaces;
and sending the encoded interface calling parameters and the interface identification codes to the target server through a telnet protocol, so that the target server executes the target interface.
And storing the interface calling parameters and the interface identification codes of the target interfaces into a blockchain. It is emphasized that, to further ensure the privacy and security of the interface call parameters and the interface identification code of the target interface, the interface call parameters and the interface identification code of the target interface may also be stored in a node of a blockchain.
In another embodiment, the storage module is further configured to store the plurality of sets of server information to a local mini database sqlite.
In another embodiment, the interface calling device 20 further includes a maintenance module, configured to maintain a plurality of DUBBO interface calling schemes on the local mini-database sqlite. Specifically, after the DUBBO interface is successfully invoked for the first time, the interface parameters are stored in the local mini database sqlite. The DUBBO interface is selected again, and the parameters of the DUBBO interface are acquired and displayed from a local mini database sqlite. The user can reduce the inquiry interface documents and input interface parameters, and the interface calling efficiency is improved.
The interface calling device 20 of the second embodiment sends an interface information request to the target server through telnet protocol according to the multiple sets of server information; receiving interface information returned by the target server, and receiving a target interface selected by the user from the interface information; and requesting the target server to execute the target interface through a telnet protocol, and calling the target interface of the target server only according to the server information. Complex interface calling according to an interface document of a target interface is avoided, and the efficiency of interface calling is improved, so that the efficiency of testing the DUBBO interface is improved.
In another embodiment, the interface calling device 20 further includes a verification module, configured to perform format and data type verification on the interface calling parameters input by the user. To prevent interface calling error and improve interface calling efficiency.
In another embodiment, the interface calling device 20 further includes a monitoring module, configured to monitor the execution time of the target interface, so as to track the efficiency of executing the target interface. And when the execution time of the target interface is monitored to be smaller than the preset time, sending a call fault reminder for the target interface to a user.
In another embodiment, the second receiving module is further configured to receive an execution result returned by the target server side for executing the target interface.
In another embodiment, the request module is further configured to request, through multithreading according to telnet protocol, the target server to execute multiple interfaces, so as to perform pressure measurement on the target server.
Example III
The present embodiment provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the above-described interface calling method embodiment, such as steps 101-105 shown in fig. 1:
101, receiving a plurality of groups of server information input by a user, wherein each server information comprises an IP address, a port number, an encoding method and a decoding method of a server;
102, receiving selection information of the user on the multiple groups of server information, and sending a connection request to a target server through a telnet protocol according to the selection information;
103, when the target server is successfully connected, sending an interface information request to the target server through a telnet protocol according to a communication identification code returned by the target server;
104, receiving interface information returned by the target server, and receiving a target interface selected by the user from the interface information;
and 105, requesting the target server to execute the target interface through a telnet protocol.
Alternatively, the computer program, when executed by a processor, performs the functions of the modules in the above apparatus embodiments, for example, the modules 201-205 in fig. 2:
a first receiving module 201, configured to receive multiple sets of server information input by a user, where each server information includes an IP address, a port number, an encoding method, and a decoding method of a server;
a first sending module 202, configured to receive selection information of the user on the multiple sets of server information, and send a connection request to a target server according to the selection information through telnet protocol;
the second sending module 203 is configured to send, when the connection to the target server is successful, an interface information request to the target server through a telnet protocol according to a communication identifier returned by the target server;
a second receiving module 204, configured to receive interface information returned by the target server, and receive a target interface selected by the user from the interface information;
and the request module 205 is configured to request, through telnet protocol, the target server to execute the target interface.
Example IV
Fig. 3 is a schematic diagram of a computer device according to a third embodiment of the present invention. The computer device 30 comprises a memory 301, a processor 302 and a computer program 303, such as an interface calling program, stored in the memory 301 and executable on the processor 302. The processor 302, when executing the computer program 303, implements the steps of the interface calling method embodiments described above, such as 101-105 shown in fig. 1:
101, receiving a plurality of groups of server information input by a user, wherein each server information comprises an IP address, a port number, an encoding method and a decoding method of a server;
102, receiving selection information of the user on the multiple groups of server information, and sending a connection request to a target server through a telnet protocol according to the selection information;
103, when the target server is successfully connected, sending an interface information request to the target server through a telnet protocol according to a communication identification code returned by the target server;
104, receiving interface information returned by the target server, and receiving a target interface selected by the user from the interface information;
and 105, requesting the target server to execute the target interface through a telnet protocol.
Alternatively, the computer program, when executed by a processor, performs the functions of the modules in the above apparatus embodiments, for example, the modules 201-205 in fig. 2:
a first receiving module 201, configured to receive multiple sets of server information input by a user, where each server information includes an IP address, a port number, an encoding method, and a decoding method of a server;
a first sending module 202, configured to receive selection information of the user on the multiple sets of server information, and send a connection request to a target server according to the selection information through telnet protocol;
the second sending module 203 is configured to send, when the connection to the target server is successful, an interface information request to the target server through a telnet protocol according to a communication identifier returned by the target server;
a second receiving module 204, configured to receive interface information returned by the target server, and receive a target interface selected by the user from the interface information;
and the request module 205 is configured to request, through telnet protocol, the target server to execute the target interface.
Illustratively, the computer program 303 may be partitioned into one or more modules, which are stored in the memory 301 and executed by the processor 302 to perform the method. The one or more modules may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments describe the execution of the computer program 303 in the computer device 30. For example, the computer program 303 may be divided into a first receiving module 201, a first sending module 202, a second sending module 203, a second receiving module 204, and a requesting module 205 in fig. 2, where each module has a specific function, see embodiment two.
Those skilled in the art will appreciate that the schematic diagram 3 is merely an example of the computer device 30 and is not meant to be limiting of the computer device 30, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the computer device 30 may also include input and output devices, network access devices, buses, etc.
The processor 302 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor 302 may be any conventional processor or the like, the processor 302 being the control center of the computer device 30, with various interfaces and lines connecting the various parts of the overall computer device 30.
The memory 301 may be used to store the computer program 303, and the processor 302 may implement various functions of the computer device 30 by running or executing the computer program or module stored in the memory 301 and invoking data stored in the memory 301. The memory 301 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device 30, or the like. In addition, the memory 301 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), at least one disk storage device, a Flash memory device, or other non-volatile solid state storage device.
The modules integrated by the computer device 30 may be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in hardware plus software functional modules.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional module is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute some of the steps of the interface calling method according to the embodiments of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other modules or steps, and that the singular does not exclude a plurality. A plurality of modules or means recited in the system claims can also be implemented by means of one module or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.
Claims (10)
1. An interface calling method, characterized in that the interface calling method comprises:
receiving a plurality of groups of server information input by a user, wherein each server information comprises an IP address, a port number, an encoding method and a decoding method of a server;
receiving selection information of the user on the multiple groups of server information, and sending a connection request to a target server through a telnet protocol according to the selection information;
when the target server is successfully connected, an interface information request is sent to the target server through a telnet protocol according to a communication identification code returned by the target server;
receiving interface information returned by the target server, and receiving a target interface selected by the user from the interface information;
requesting the target server to execute the target interface through telnet protocol.
2. The interface calling method of claim 1, wherein the sending the connection request to the target server through telnet protocol according to the selection information includes:
inquiring the information of the service end selected by the user from a local micro database according to the selection information;
and sending a connection request to a target server through a telnet protocol according to the server information selected by the user.
3. The interface calling method according to claim 1, wherein after the interface information request is sent to the target server through telnet protocol according to the communication identification code returned by the target server, the interface calling method further comprises:
judging whether the interface information is received within a preset time;
if the interface information is received within the preset time, receiving a target interface selected by the user from the interface information;
and if the interface information is not received within the preset time, sending reminding information of failed request to the user.
4. The interface invocation method of claim 1, wherein the receiving the user selected target interface from the interface information comprises:
decoding the interface information according to the decoding method of the target server to obtain an interface list;
displaying the interface list to the user;
acquiring a search condition input by a user, and searching an intermediate target interface from the interface list based on a fuzzy search method according to the search condition;
and receiving a target interface selected by the user from the intermediate target interfaces.
5. The interface calling method of claim 1, wherein the requesting, by the telnet protocol, the target server to execute the target interface includes:
receiving interface calling parameters input by the user;
adopting the coding method of the target server to code the interface calling parameters and the interface identification codes of the target interfaces;
and sending the encoded interface calling parameters and the interface identification codes to the target server through a telnet protocol, so that the target server executes the target interface.
6. The interface call method of any one of claims 1-5, wherein the interface call method further comprises:
when the target server side is requested to successfully execute the target interface through a telnet protocol, an execution result is displayed to the user;
and storing the interface calling parameters and the interface identification codes of the target interfaces into a blockchain.
7. The interface call method of any one of claims 1-5, wherein the interface call method further comprises:
and requesting the target server to execute a plurality of interfaces through multithreading according to a telnet protocol so as to perform pressure measurement on the target server.
8. An interface calling device, characterized in that the interface calling device comprises:
the first receiving module is used for receiving a plurality of groups of server information input by a user, and each group of server information comprises an IP address, a port number, an encoding method and a decoding method of a server;
the first sending module is used for receiving the selection information of the plurality of groups of server information from the user and sending a connection request to a target server through a telnet protocol according to the selection information;
the second sending module is used for sending an interface information request to the target server through a telnet protocol according to the communication identification code returned by the target server when the target server is successfully connected;
the second receiving module is used for receiving the interface information returned by the target server and receiving a target interface selected by the user from the interface information;
and the request module is used for requesting the target server to execute the target interface through a telnet protocol.
9. A computer device comprising a processor for executing a computer program stored in a memory to implement the interface invoking method according to any of claims 1-7.
10. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the interface invocation method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010600047.7A CN111741118B (en) | 2020-06-28 | 2020-06-28 | Interface calling method, device, computer equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010600047.7A CN111741118B (en) | 2020-06-28 | 2020-06-28 | Interface calling method, device, computer equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111741118A CN111741118A (en) | 2020-10-02 |
CN111741118B true CN111741118B (en) | 2023-06-02 |
Family
ID=72651440
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010600047.7A Active CN111741118B (en) | 2020-06-28 | 2020-06-28 | Interface calling method, device, computer equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111741118B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019104973A1 (en) * | 2017-11-30 | 2019-06-06 | 平安科技(深圳)有限公司 | Cross-language invoking method, server, and storage medium |
CN109902017A (en) * | 2019-03-06 | 2019-06-18 | 厦门商集网络科技有限责任公司 | A kind of method and terminal based on RobotFramework test Dubbo interface |
CN110535971A (en) * | 2019-09-16 | 2019-12-03 | 腾讯科技(深圳)有限公司 | Interface configuration processing method, device, equipment and storage medium based on block chain |
-
2020
- 2020-06-28 CN CN202010600047.7A patent/CN111741118B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019104973A1 (en) * | 2017-11-30 | 2019-06-06 | 平安科技(深圳)有限公司 | Cross-language invoking method, server, and storage medium |
CN109902017A (en) * | 2019-03-06 | 2019-06-18 | 厦门商集网络科技有限责任公司 | A kind of method and terminal based on RobotFramework test Dubbo interface |
CN110535971A (en) * | 2019-09-16 | 2019-12-03 | 腾讯科技(深圳)有限公司 | Interface configuration processing method, device, equipment and storage medium based on block chain |
Non-Patent Citations (1)
Title |
---|
基于AutoCAD的网络化CAD实现;王恪典,徐海波;工程图学学报(02);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111741118A (en) | 2020-10-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190108140A1 (en) | Smart contract creation and monitoring for event identification in a blockchain | |
CN111694841B (en) | Order identification generation method, device, server and storage medium | |
US9934310B2 (en) | Determining repeat website users via browser uniqueness tracking | |
US11741254B2 (en) | Privacy centric data security in a cloud environment | |
CN110582987A (en) | establishing pairing groups and exchanging protected data using blockchains | |
CN114154987B (en) | Meta-universe safety system based on NFR and inter-link network and operation method | |
US20210104326A1 (en) | Detecting prescription drug abuse using a distributed ledger and machine learning | |
CN113268336A (en) | Service acquisition method, device, equipment and readable medium | |
CN111814045B (en) | Data query method, device, electronic equipment and storage medium | |
CN114281707A (en) | Number making method, service application testing method and related equipment thereof | |
CN117894437A (en) | Integrated sharing method, device, equipment and storage medium for digital pathology data | |
CN111741118B (en) | Interface calling method, device, computer equipment and computer readable storage medium | |
CN113132400A (en) | Business processing method, device, computer system and storage medium | |
US20210165907A1 (en) | Systems and methods for intelligent and quick masking | |
CN115242608B (en) | Alarm information generation method, device, equipment and storage medium | |
CN111897728B (en) | Interface debugging method and related equipment | |
EP4365808A1 (en) | Data verification method and apparatus | |
CN114666408A (en) | Market condition factor data transparent transmission method, device, equipment and medium based on Internet | |
CN114066451A (en) | Method and system for managing fund transaction and electronic equipment | |
CN112182598A (en) | Public sample ID identification method, device, server and readable storage medium | |
CN112286703A (en) | User classification method and device, client device and readable storage medium | |
CN112667659B (en) | Feature processing method and related equipment | |
JP7449509B2 (en) | Information processing device and program | |
CN113657910B (en) | Real name authentication method, device, electronic equipment and readable storage medium | |
CN114490260B (en) | System index generation method, device, proxy server and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |