CN115333712B - API interface management system, method and storage medium for duplex communication - Google Patents

API interface management system, method and storage medium for duplex communication Download PDF

Info

Publication number
CN115333712B
CN115333712B CN202210950022.9A CN202210950022A CN115333712B CN 115333712 B CN115333712 B CN 115333712B CN 202210950022 A CN202210950022 A CN 202210950022A CN 115333712 B CN115333712 B CN 115333712B
Authority
CN
China
Prior art keywords
interface
data
management module
task execution
access
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
Application number
CN202210950022.9A
Other languages
Chinese (zh)
Other versions
CN115333712A (en
Inventor
胡大林
张文达
郝运泽
王铁锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Saimu Technology Co ltd
Original Assignee
Beijing Saimu Technology Co ltd
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 Beijing Saimu Technology Co ltd filed Critical Beijing Saimu Technology Co ltd
Priority to CN202210950022.9A priority Critical patent/CN115333712B/en
Publication of CN115333712A publication Critical patent/CN115333712A/en
Application granted granted Critical
Publication of CN115333712B publication Critical patent/CN115333712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/14Two-way operation using the same type of signal, i.e. duplex
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • 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
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides an API interface management system, method and storage medium for duplex communication, wherein the system comprises a communication interface management module, a data management module and a client, wherein the communication interface management module is used for acquiring an access request of at least one client, modifying a connection protocol corresponding to a first network handshake of the client according to interface requirement information of an access interface corresponding to the access request, generating a target access interface, sending a task execution instruction corresponding to the access request to the data management module through the target access interface, and sending task execution data to the client; and the data management module is used for sending a task execution instruction corresponding to the access request through the target access interface, calling the task execution data corresponding to the access request from the data storage pool and sending the task execution data to the communication interface management module. And the management of the API interface of duplex communication is completed through the communication interface management module and the data management module.

Description

API interface management system, method and storage medium for duplex communication
Technical Field
The present disclosure relates to the field of interface management technologies, and in particular, to an API interface management system and method for duplex communication, and a storage medium.
Background
The current mainstream API interface management tool is yapi interface management, the user base and the technical ecology are considerable, the method mainly comprises mock data management, visualization and authority configuration, data format importing of classical interface management tools such as swagger, postman interface test tools and the like is supported, data format outputting of lightweight markup language (markdown), json and the like is supported, an interface wiki can be automatically generated, automatic testing is carried out, and the advantages of application container engine dock deployment, intranet deployment and the like are supported, but yapi cannot realize the management of duplex communication API interfaces.
At present, as the number of APIs for duplex communication increases, yapi has no longer demonstrated its advantages. Lengthy documentation is difficult to maintain and requires modifications in many places with minor changes. Interfaces for duplex communication types cannot be debugged directly as easily as ordinary interfaces. For example, in the development of a real-time communication app, for the technical aspect, a front-end engineer and a back-end engineer joint debugging interface, yapi for implementing duplex communication cannot implement front-end and back-end data joint debugging through mock data and the like, and it is necessary to wait for the back-end code development to be completed and then call an API interface for developing duplex communication. Therefore, management of an API interface for realizing duplex communication becomes a non-trivial technical problem.
Disclosure of Invention
In view of this, an object of the present application is to provide an API interface management system, method and storage medium for duplex communication, where management of an API interface for duplex communication is completed through a communication interface management module and a data management module, so as to implement modification of a connection protocol corresponding to a first network handshake directly according to interface requirement information, and under the condition that a framework is not modified, custom content in the framework is modified to be quickly configured into a target access interface for duplex communication.
The embodiment of the application provides an API interface management system for duplex communication, which comprises a communication interface management module and a data management module, wherein:
the communication interface management module is used for acquiring an access request of at least one client, modifying a connection protocol corresponding to a first network handshake sent by the client according to interface requirement information of an access interface corresponding to the access request, generating a target access interface corresponding to the interface requirement information, sending a task execution instruction corresponding to the access request to the data management module through the target access interface, receiving task execution data sent by the data management module, and sending the task execution data to the client;
The data management module is configured to send a task execution instruction corresponding to the access request through the target access interface, call out task execution data corresponding to the access request from a data storage pool, set a storage location state of the task execution data in the data storage pool to an occupied state, and send the task execution data to the communication interface management module.
In one possible implementation, the data management module is further configured to:
each storage location in the data storage pool corresponds to a modification minor value, the modification minor value characterizes whether the storage data at the corresponding storage location is changed and the number of times of the change, when the storage location is repeatedly occupied, the repeatedly occupied storage location is disabled by utilizing a method handle associated with the storage data of the storage location, and the state of the repeatedly occupied storage location is changed into an idle state.
In one possible implementation manner, the communication interface management module is further configured to:
and receiving the access requests of the clients in batches, carrying out the same packaging processing on the same access requests of the clients, and sending the same packaging processing to a data management module so that the data management module returns task execution data corresponding to the access requests of the clients according to a packaging sequence.
In one possible implementation manner, the communication interface management module includes a canonical format checking unit, where the canonical format checking unit is configured to:
detecting whether a source code modified according to an access interface requirement relative to the access request and a connection protocol corresponding to a first network handshake sent by the client meets a preset standard format requirement;
if not, modifying the source code according to the preset standard format requirement so as to generate a target access interface corresponding to the access interface requirement.
In one possible implementation, the management system further includes a time monitoring module for:
after the communication interface management module sends the task execution instruction corresponding to the access request through the target access interface to the data management module, starting timing, judging whether the communication interface management module sends the task execution instruction corresponding to the access request through the target access interface to the data management module within preset time, and if so, closing timing; and if not, the communication interface management module executes the task overtime, and feeds back overtime information to the communication interface management module.
In one possible implementation, the data management module is further configured to:
detecting whether the acquired task execution data is stored in the data storage pool;
if yes, setting the storage position state of the task execution data in the data storage pool to be an occupied state;
if not, setting the storage position state of the task execution data in the data storage pool to be an idle state.
The embodiment of the application also provides an API interface management method for duplex communication, which comprises the following steps:
acquiring an access request of at least one client;
modifying a connection protocol corresponding to the first network handshake sent by the client according to the interface requirement information of the access interface corresponding to the access request, and generating a target access interface corresponding to the interface requirement information;
and sending a task execution instruction corresponding to the access request based on the target access interface, calling task execution data corresponding to the access request from a data storage pool, and setting the storage position state of the task execution data in the data storage pool as an occupied state.
In one possible implementation manner, after the modification of the connection protocol corresponding to the first network handshake sent by the client according to the interface requirement information of the access interface corresponding to the access request, the API interface management method further includes:
detecting whether a source code modified according to an access interface requirement relative to the access request and a connection protocol corresponding to the first network handshake of the client meets a preset specification format requirement;
if not, modifying the source code according to the preset standard format requirement so as to generate a target access interface corresponding to the access interface requirement.
The embodiment of the application also provides electronic equipment, which comprises: the system comprises a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, the processor and the memory communicate through the bus when the electronic device is running, and the machine-readable instructions are executed by the processor to perform the steps of the API interface management method for duplex communication as described above.
Embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of an API interface management method for duplex communication as described above.
The embodiment of the application provides an API interface management system, an API interface management method and a storage medium for duplex communication, wherein the API interface management system comprises a communication interface management module and a data management module, and the API interface management system comprises the following components: the communication interface management module is used for acquiring an access request of at least one client, modifying a connection protocol corresponding to a first network handshake of the client according to interface requirement information of an access interface corresponding to the access request, generating a target access interface corresponding to the interface requirement information, sending a task execution instruction corresponding to the access request to the data management module through the target access interface, receiving task execution data sent by the data management module, and sending the task execution data to the client; the data management module is configured to send a task execution instruction corresponding to the access request through the target access interface, call out task execution data corresponding to the access request from a data storage pool, set a storage location state of the task execution data in the data storage pool to an occupied state, and send the task execution data to the communication interface management module. The management of the API interface of duplex communication is completed through the communication interface management module and the data management module, so that the connection protocol corresponding to the first network handshake is directly modified according to the interface requirement information, and the customized content in the framework is changed to be quickly configured into the target access interface for duplex communication under the condition that the framework is not modified.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of an API interface management system for duplex communication according to an embodiment of the present application;
FIG. 2 is a second schematic structural diagram of an API interface management system for duplex communication according to an embodiment of the present application;
fig. 3 is a flowchart of an API interface management method for duplex communication according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Icon: an API interface management system for 100-duplex communication; 110-a communication interface management module; 111-a canonical format check unit; 120-a data management module; 130-a time monitoring module; 400-an electronic device; 410-a processor; 420-memory; 430-bus.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the accompanying drawings in the present application are only for the purpose of illustration and description, and are not intended to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this application, illustrates operations implemented according to some embodiments of the present application. It should be appreciated that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to the flow diagrams and one or more operations may be removed from the flow diagrams as directed by those skilled in the art.
In addition, the described embodiments are only some, but not all, of the embodiments of the present application. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
In order to enable those skilled in the art to use the present application, in connection with the specific application scenario "management of API interfaces for duplex communication", the following embodiments are presented, and the general principles defined herein may be applied to other embodiments and application scenarios by those skilled in the art without departing from the spirit and scope of the present application.
The method, apparatus, electronic device or computer readable storage medium described below in the embodiments of the present application may be applied to any scenario where management of an API interface for duplex communication is required, and the embodiments of the present application do not limit specific application scenarios, and any scheme using an API interface management system, method and storage medium for duplex communication provided in the embodiments of the present application is within the scope of protection of the present application.
First, application scenarios applicable to the present application will be described. The method and the device can be applied to the technical field of interface management.
It has been found that, at this stage, yapi has not yet demonstrated its advantages as the number of APIs for duplex communication increases. Lengthy documentation is difficult to maintain and requires modifications in many places with minor changes. Interfaces for duplex communication types cannot be debugged directly as easily as ordinary interfaces. For example, in the development of a real-time communication app, for the technical aspect, a front-end engineer and a back-end engineer joint debugging interface, yapi for implementing duplex communication cannot implement front-end and back-end data joint debugging through mock data and the like, and it is necessary to wait for the back-end code development to be completed and then call an API interface for developing duplex communication. Therefore, management of an API interface for realizing duplex communication becomes a non-trivial technical problem.
Based on this, the embodiment of the application provides an API interface management system for duplex communication, where management of an API interface for duplex communication is completed through a communication interface management module and a data management module, so as to implement modification of a connection protocol corresponding to a first network handshake directly according to interface requirement information, and under the condition that a framework is not modified, a target access interface for duplex communication is quickly configured by modifying user-defined content in the framework.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an API interface management system for duplex communication according to an embodiment of the present application. As shown in fig. 1, an API interface management system 100 for duplex communication provided in an embodiment of the present application includes: the communication interface management module 110 and the data management module 120, wherein the communication interface management module 110 and the data management module 120 are in communication connection.
Specifically, the communication interface management module 110 is configured to obtain an access request of at least one client, modify a connection protocol corresponding to a first network handshake sent by the client according to interface requirement information of an access interface corresponding to the access request, generate a target access interface corresponding to the interface requirement information, send a task execution instruction corresponding to the access request to the data management module 120 through the target access interface, receive task execution data sent by the data management module 120, and send the task execution data to the client; the data management module 120 is configured to send a task execution instruction corresponding to the access request through the target access interface, call out task execution data corresponding to the access request from a data storage pool, set a storage location state of the task execution data in the data storage pool to an occupied state, and send the task execution data to the communication interface management module 110.
Here, the communication interface management module is used for completing management of the communication interface and the communication time, and the triggering condition of the event and the calling relation between the interfaces are configured. The triggering condition of the configuration event is an access request instruction of the configuration event, and the calling relation between the interfaces is the interface corresponding to the access request instruction.
The interface requirement information is some parameter requirement information for the access interface, and the content included in the interface requirement information is not limited herein.
Here, the API interface is an application program interface, and mutual communication between computer software is realized through the API interface. One of the main functions of the API is to provide a generic set of functions. The programmer can lighten the programming task by calling the API function to develop the application program. The API is also a middleware for providing data sharing for various platforms.
The connection protocol corresponding to the first network handshake of the client is a connection protocol corresponding to the first network handshake performed by the client and the communication interface management module 110, where the first network handshake adopts an http technology, and is used to set a network request header to be a connection: keep-alive, upgrade, upgrade; websocket, setting the response head as a connection; upscale; the WebSocket performs request matching according to the hash code of the Sec-WebSocket-Accept, establishes a connection protocol of the WebSocket, and aims to realize the target access interface corresponding to interface requirement information according to the WebSocket bottom layer principle, namely, following a TCP protocol, expanding original data in a packet on the basis of the TCP protocol, reconstructing content, namely, changing the customized content in the frame without modifying the frame.
Here, the data management module 120 is configured to send a task execution instruction corresponding to an access request by using a target access interface, call task execution data corresponding to the access request from a data storage pool, set a storage location state of the task execution data in the data storage pool to an occupied state, and send the task execution data to the communication interface management module 110.
The API interface for duplex communication may here be a websocket type API interface.
The WebSocket protocol is a new network protocol based on TCP. It implements browser-to-server full-duplex (full-duplex) communication allowing the server to actively send information to the client, the WebSocket protocol was specified by IETF as standard RFC 6455 in 2011 and is complemented by RFC 7936.
In a specific embodiment, the communication interface management module 110 obtains a request for accessing all student names of six grades sent by a client, modifies a connection protocol corresponding to a first network handshake of the client and the communication interface management module 110 according to interface requirement information of an access interface corresponding to the access request, generates a target access interface corresponding to the interface requirement information, sends a task execution instruction corresponding to the access request to the data management module 120 by using the target access interface, the data management module 120 sends a task execution instruction corresponding to the access request according to the target access interface, invokes task execution data corresponding to the access request in a data storage pool, sets a storage position state of the task execution data in the data storage pool as an occupied state, and sends the task execution data to the communication interface management module 110, and the communication interface module sends the task execution data to the client.
In one possible implementation, the data management module 120 is further configured to: each storage location in the data storage pool corresponds to a modification minor value, the modification minor value characterizes whether the storage data at the corresponding storage location is changed and the number of times of the change, when the storage location is repeatedly occupied, the repeatedly occupied storage location is disabled by utilizing a method handle associated with the storage data of the storage location, and the state of the repeatedly occupied storage location is changed into an idle state.
Here, each storage location in the data storage pool corresponds to a modification secondary value, the modification secondary value characterizes whether the storage data at the corresponding storage location is changed and the number of times of the change, when one storage location in the data storage pool is repeatedly occupied by a plurality of storage data, a method handle associated with the storage data of the storage location is utilized to disable the repeatedly occupied storage location, and the state of the repeatedly occupied storage location is changed into an idle state, so that the problem that the data management module 120 has a data calling error in the process of performing data calling is avoided.
The method handle is used for accessing the data, and comprises the data of each storage position in the data storage pool and the modification sub-value, the data is stored in the data storage pool, the algebraic of the method handle is equivalent to that of the data, the method handle is in an effective state until the data is released, the storage position becomes idle, all the method handles pointing to the data are invalid, the data access is very fast, a scene node can store the method of other nodes, when the data is needed, the method handle can be taken away and the data position is kept to be occupied, the taken away is the package of the index of the data, the method handle is used for storing the data in the data storage pool, the algebraic of the method handle is equivalent to that of the data until the data is released, all the method handles pointing to the data are invalid, the data storage pool can be cached by a CPU, and the scene node can store the method of other nodes, when the data is needed, the data position can be taken away and kept to be occupied, the method handle is taken away is the package of the index of the data, the data is used for storing the data, and if the data is not needed, the data is not needed to be taken away, and the abnormal state is not needed, and the data is not needed to be taken away.
In one possible implementation, the communication interface management module 110 is further configured to: and receiving the access requests of the clients in batches, performing the same packaging processing on the same access requests of the clients, and sending the same packaging processing to the data management module 120, so that the data management module 120 returns task execution data corresponding to the access requests of the clients according to a packaging sequence.
Here, the communication interface management module 110 receives the access requests of the clients in batches, and sends the access requests of the same clients to the data management module 120 through unified packaging, so that the data management module 120 sequentially returns task execution data corresponding to the access requests of the clients according to the packaging sequence, thereby realizing batch requests, batch responses, and cross-proceeding of request responses.
Further, referring to fig. 2, fig. 2 is a second schematic structural diagram of an API interface management system 100 for duplex communication according to an embodiment of the present application. As shown in fig. 2, the communication interface management module 110 includes a canonical format check unit 111, and the management system further includes a time monitoring module 130.
Specifically, the canonical format checking unit 111 is configured to: detecting whether a source code modified according to an access interface requirement relative to the access request and a connection protocol corresponding to a first network handshake sent by the client meets a preset standard format requirement; if not, modifying the source code according to the preset standard format requirement so as to generate a target access interface corresponding to the access interface requirement.
Here, the canonical format checking unit 111 detects whether the source code after modifying the connection protocol corresponding to the first network handshake of the client according to the access interface requirement relative to the access request meets the preset canonical format requirement; if not, modifying the source code according to the requirement of the preset standard format so as to generate a target access interface corresponding to the access interface requirement.
Here, the preset specification format requires a preset code specification for modifying the connection protocol, for example: the interval symbol is \r\n under Linux and is \n under Windows; the Simple Strings begin with a "+" plus sign; error, beginning with "-" minus; integer type Integer, beginning with a "; large string type Bulk Strings, beginning with "$" dollar sign, length constraint 512M; array type Arrays, beginning with an "asterisk" and the like.
Specifically, the time monitoring module 130 is configured to: after the communication interface management module 110 sends the task execution instruction corresponding to the access request to the data management module 120 through the target access interface, starting timing, judging whether the communication interface management module 110 sends the task execution instruction corresponding to the access request to the data management module 120 through the target access interface within a preset time, if so, closing timing; if not, the communication interface management module 110 executes the task overtime, and feeds back overtime information to the communication interface management module 110.
Here, the time monitoring module 130 starts timing by using a timer after the communication interface management module 110 sends the task execution instruction corresponding to the access request to the data management module 120 through the target access interface, determines whether the communication interface management module 110 sends the task execution instruction corresponding to the access request to the data management module 120 through the target access interface within a preset time, and if yes, closes the timing; if not, the communication interface management module 110 is considered to execute task timeout, and timeout information is fed back to the communication interface management module 110.
Here, the time monitoring module 130 is communicatively connected to the communication interface management module 110 and the data management module 120.
Wherein the preset time may be 1 minute.
Specifically, the data management module 120 is further configured to: detecting whether the acquired task execution data is stored in the data storage pool; if yes, setting the storage position state of the task execution data in the data storage pool to be an occupied state; if not, setting the storage position state of the task execution data in the data storage pool to be an idle state.
Here, the data management module 120 detects whether the acquired task execution data is also stored in the data storage pool; if yes, setting the storage position state of the task execution data in the data storage pool as an occupied state; if not, the storage position state of the task execution data is set to be an idle state in the data storage pool.
In a specific embodiment, the communication interface management module 110 obtains a request for accessing all student names in six grades sent by a client, modifies a connection protocol corresponding to a first network handshake of the client and the communication interface management module 110 according to interface requirement information of an access interface corresponding to the access request, and the standard format checking unit 111 detects whether a source code after modifying the connection protocol corresponding to the first network handshake of the client according to the access interface requirement corresponding to the access request meets a preset standard format requirement; if not, modifying the source code according to the requirement of the preset standard format so as to generate a target access interface corresponding to the access interface requirement. The task execution instruction corresponding to the access request is sent to the data management module 120 by using the target access interface, the time monitoring module 130 starts timing by using a timer after the communication interface management module 110 sends the task execution instruction corresponding to the access request to the data management module 120 by using the target access interface, judges whether the communication interface management module 110 sends the task execution instruction corresponding to the access request to the data management module 120 by using the target access interface within a preset time, and if so, closes the timing; if not, the communication interface management module 110 is considered to execute task timeout, and timeout information is fed back to the communication interface management module 110. The data management module 120 sends a task execution instruction corresponding to the access request according to the target access interface, invokes task execution data corresponding to the access request in a data storage pool, sets a storage position state of the task execution data in the data storage pool to be an occupied state, and sends the task execution data to the communication interface management module 110, and the communication interface module sends the task execution data to the client.
The application provides an API interface management system for duplex communication, which comprises a communication interface management module and a data management module, wherein: the communication interface management module is used for acquiring an access request of at least one client, modifying a connection protocol corresponding to a first network handshake sent by the client according to interface requirement information of an access interface corresponding to the access request, generating a target access interface corresponding to the interface requirement information, sending a task execution instruction corresponding to the access request to the data management module through the target access interface, receiving task execution data sent by the data management module, and sending the task execution data to the client; the data management module is configured to send a task execution instruction corresponding to the access request through the target access interface, call out task execution data corresponding to the access request from a data storage pool, set a storage location state of the task execution data in the data storage pool to an occupied state, and send the task execution data to the communication interface management module. The management of the API interface of duplex communication is completed through the communication interface management module and the data management module, so that the connection protocol corresponding to the first network handshake is directly modified according to the interface requirement information, and the customized content in the framework is changed to be quickly configured into the target access interface for duplex communication under the condition that the framework is not modified.
Referring to fig. 3, fig. 3 is a flowchart of an API interface management method for duplex communication according to an embodiment of the present application. As shown in fig. 3, the API interface management method provided in the embodiment of the present application includes:
s301: an access request of at least one client is obtained.
In this step, an access request of at least one client is obtained.
S302: and modifying a connection protocol corresponding to the first network handshake sent by the client according to the interface requirement information of the access interface corresponding to the access request, and generating a target access interface corresponding to the interface requirement information.
In the step, a connection protocol corresponding to a first network handshake of a client is modified according to interface requirement information of an access interface corresponding to an access request, and a target access interface corresponding to the interface requirement information is generated.
S303: and sending a task execution instruction corresponding to the access request based on the target access interface, calling task execution data corresponding to the access request from a data storage pool, and setting the storage position state of the task execution data in the data storage pool as an occupied state.
In the step, a task execution instruction corresponding to the access request is sent by using the target access interface, task execution data corresponding to the access request is called from the data storage pool, and the storage position state of the task execution data in the data storage pool is set to be an occupied state.
In a specific embodiment, the communication interface management module obtains a request of accessing all student names of six grades sent by a client, modifies a connection protocol corresponding to a first network handshake of the client and the communication interface management module according to interface requirement information of an access interface corresponding to the access request, generates a target access interface corresponding to the interface requirement information, sends a task execution instruction corresponding to the access request to the data management module by using the target access interface, sends the task execution instruction corresponding to the access request to the data management module according to the target access interface, invokes the task execution data corresponding to the access request in a data storage pool, sets a storage position state of the task execution data in the data storage pool as an occupied state, sends the task execution data to the communication interface management module, and sends the task execution data to the client.
In one possible implementation manner, the API interface management method includes:
and controlling the data management module to correspond to a modification sub-value in each storage position in the data storage pool, wherein the modification sub-value represents whether the storage data in the corresponding storage position is changed and the number of times of the change, and when the storage position is repeatedly occupied, invalidating the repeatedly occupied storage position by utilizing a method handle related to the storage data of the storage position and changing the state of the repeatedly occupied storage position into an idle state.
In one possible implementation manner, the API interface management method includes:
and the control communication interface management module receives the access requests of the clients in batches, and sends the same packaging processing to the data management module by the same access requests of the clients so that the data management module returns task execution data corresponding to the access requests of the clients according to the packaging sequence.
In one possible implementation manner, after the modification of the connection protocol corresponding to the first network handshake of the client according to the interface requirement information of the access interface corresponding to the access request, the API interface management method further includes:
detecting whether a source code modified according to an access interface requirement relative to the access request and a connection protocol corresponding to a first network handshake sent by the client meets a preset standard format requirement;
if not, modifying the source code according to the preset standard format requirement so as to generate a target access interface corresponding to the access interface requirement.
In one possible implementation manner, the API interface management method includes:
after the communication interface management module sends a task execution instruction corresponding to the access request through the target access interface to the data management module, starting timing, judging whether the communication interface management module sends the task execution instruction corresponding to the access request through the target access interface to the data management module within preset time or not, and if so, closing timing; and if not, the communication interface management module executes the task overtime, and feeds back overtime information to the communication interface management module.
In one possible implementation manner, the API interface management method includes:
the control data management module detects whether the acquired task execution data is stored in the data storage pool or not; if yes, setting the storage position state of the task execution data in the data storage pool to be an occupied state; if not, setting the storage position state of the task execution data in the data storage pool to be an idle state.
The embodiment of the application provides an API interface management method for duplex communication, which comprises the following steps: acquiring an access request of at least one client; modifying a connection protocol corresponding to the first network handshake sent by the client according to the interface requirement information of the access interface corresponding to the access request, and generating a target access interface corresponding to the interface requirement information; and sending a task execution instruction corresponding to the access request based on the target access interface, calling task execution data corresponding to the access request from a data storage pool, and setting the storage position state of the task execution data in the data storage pool as an occupied state. The management of the API interface of duplex communication is completed through the communication interface management module and the data management module, so that the connection protocol corresponding to the first network handshake is directly modified according to the interface requirement information, and the customized content in the framework is changed to be quickly configured into the target access interface for duplex communication under the condition that the framework is not modified.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.
The memory 420 stores machine-readable instructions executable by the processor 410, when the electronic device 400 is running, the processor 410 communicates with the memory 420 through the bus 430, and when the machine-readable instructions are executed by the processor 410, the steps of the API interface management method for duplex communication in the method embodiment shown in fig. 3 can be executed, and the specific implementation manner can be referred to the method embodiment and will not be described herein.
The embodiment of the present application further provides a computer readable storage medium, where a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the API interface management method for duplex communication in the method embodiment shown in the foregoing fig. 3 may be executed, and a specific implementation manner may refer to the method embodiment and will not be described herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present application, and are not intended to limit the scope of the present application, but the present application is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, the present application is not limited thereto. Any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or make equivalent substitutions for some of the technical features within the technical scope of the disclosure of the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An API interface management system for duplex communication, wherein the API interface management system includes a communication interface management module and a data management module, and wherein:
the communication interface management module is used for acquiring an access request of at least one client, modifying a connection protocol corresponding to a first network handshake sent by the client according to interface requirement information of an access interface corresponding to the access request, generating a target access interface corresponding to the interface requirement information, sending a task execution instruction corresponding to the access request to the data management module through the target access interface, receiving task execution data sent by the data management module, and sending the task execution data to the client;
the data management module is configured to send a task execution instruction corresponding to the access request through the target access interface, call out task execution data corresponding to the access request from a data storage pool, set a storage location state of the task execution data in the data storage pool to an occupied state, and send the task execution data to the communication interface management module.
2. The API interface management system of claim 1, wherein said data management module is further configured to:
each storage location in the data storage pool corresponds to a modification minor value, the modification minor value characterizes whether the storage data at the corresponding storage location is changed and the number of times of the change, when the storage location is repeatedly occupied, the repeatedly occupied storage location is disabled by utilizing a method handle associated with the storage data of the storage location, and the state of the repeatedly occupied storage location is changed into an idle state.
3. The API interface management system of claim 1, wherein said communication interface management module is further configured to:
and receiving the access requests of the clients in batches, carrying out the same packaging processing on the same access requests of the clients, and sending the same packaging processing to a data management module so that the data management module returns task execution data corresponding to the access requests of the clients according to a packaging sequence.
4. The API interface management system of claim 1, wherein said communication interface management module includes a canonical format check unit for:
Detecting whether a source code modified according to an access interface requirement relative to the access request and a connection protocol corresponding to a first network handshake sent by the client meets a preset standard format requirement;
if not, modifying the source code according to the preset standard format requirement so as to generate a target access interface corresponding to the access interface requirement.
5. The API interface management system of claim 1, further comprising a time monitoring module for:
after the communication interface management module sends the task execution instruction corresponding to the access request through the target access interface to the data management module, starting timing, judging whether the communication interface management module sends the task execution instruction corresponding to the access request through the target access interface to the data management module within preset time, and if so, closing timing; and if not, the communication interface management module executes the task overtime, and feeds back overtime information to the communication interface management module.
6. The API interface management system of claim 1, wherein said data management module is further configured to:
Detecting whether the acquired task execution data is stored in the data storage pool;
if yes, setting the storage position state of the task execution data in the data storage pool to be an occupied state;
if not, setting the storage position state of the task execution data in the data storage pool to be an idle state.
7. An API interface managing method of duplex communication, characterized in that the API interface managing method is applied to an API interface managing system of duplex communication according to any one of claims 1-6, the API interface managing method comprising:
acquiring an access request of at least one client;
modifying a connection protocol corresponding to the first network handshake sent by the client according to the interface requirement information of the access interface corresponding to the access request, and generating a target access interface corresponding to the interface requirement information;
and sending a task execution instruction corresponding to the access request based on the target access interface, calling task execution data corresponding to the access request from a data storage pool, and setting the storage position state of the task execution data in the data storage pool as an occupied state.
8. The API interface management method as recited in claim 7, further comprising, after said modifying a connection protocol corresponding to said client first network handshake according to interface requirement information of an access interface corresponding to said access request:
detecting whether a source code modified according to an access interface requirement relative to the access request and a connection protocol corresponding to a first network handshake sent by the client meets a preset standard format requirement;
if not, modifying the source code according to the preset standard format requirement so as to generate a target access interface corresponding to the access interface requirement.
9. An electronic device, comprising: a processor, a memory and a bus, said memory storing machine readable instructions executable by said processor, said processor and said memory communicating via said bus when the electronic device is running, said machine readable instructions being executed by said processor to perform the steps of the duplex communication API interface management method according to claim 7 or 8.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the API interface management method of duplex communication according to claim 7 or 8.
CN202210950022.9A 2022-08-09 2022-08-09 API interface management system, method and storage medium for duplex communication Active CN115333712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210950022.9A CN115333712B (en) 2022-08-09 2022-08-09 API interface management system, method and storage medium for duplex communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210950022.9A CN115333712B (en) 2022-08-09 2022-08-09 API interface management system, method and storage medium for duplex communication

Publications (2)

Publication Number Publication Date
CN115333712A CN115333712A (en) 2022-11-11
CN115333712B true CN115333712B (en) 2023-08-04

Family

ID=83920917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210950022.9A Active CN115333712B (en) 2022-08-09 2022-08-09 API interface management system, method and storage medium for duplex communication

Country Status (1)

Country Link
CN (1) CN115333712B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795147A (en) * 2018-08-01 2020-02-14 北京京东尚科信息技术有限公司 Interface protocol file management method and device
CN112131021A (en) * 2020-09-21 2020-12-25 上海博泰悦臻电子设备制造有限公司 Access request processing method and device
CN112163026A (en) * 2020-09-25 2021-01-01 内蒙古聚达发电有限责任公司 Multi-source heterogeneous interface management and control method for integrating multi-class technical application data
CN112769794A (en) * 2020-12-30 2021-05-07 神州绿盟成都科技有限公司 Data conversion method and device
CN114172978A (en) * 2021-12-30 2022-03-11 中国电信股份有限公司 Multi-protocol equipment access method and related device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11757853B2 (en) * 2018-08-30 2023-09-12 Telefonaktiebolaget Lm Ericsson (Publ) Method for restricting access to a management interface using standard management protocols and software
US11895716B2 (en) * 2020-12-02 2024-02-06 Oracle International Corporation Methods, systems, and computer readable media for providing a unified interface configured to support infrequent data communications via a network exposure function

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795147A (en) * 2018-08-01 2020-02-14 北京京东尚科信息技术有限公司 Interface protocol file management method and device
CN112131021A (en) * 2020-09-21 2020-12-25 上海博泰悦臻电子设备制造有限公司 Access request processing method and device
CN112163026A (en) * 2020-09-25 2021-01-01 内蒙古聚达发电有限责任公司 Multi-source heterogeneous interface management and control method for integrating multi-class technical application data
CN112769794A (en) * 2020-12-30 2021-05-07 神州绿盟成都科技有限公司 Data conversion method and device
CN114172978A (en) * 2021-12-30 2022-03-11 中国电信股份有限公司 Multi-protocol equipment access method and related device

Also Published As

Publication number Publication date
CN115333712A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
EP3324601B1 (en) Development of internet of things (iot) applications
CN108965203B (en) Resource access method and server
US7996493B2 (en) Framework for managing client application data in offline and online environments
US9201647B2 (en) Configuration management center
JP2004510219A (en) Distributed simulation
CN108427616B (en) Background program monitoring method and monitoring device
CN106648741A (en) Method and device for deploying application system
WO2005065261B1 (en) Dynamic timeout in a client-server system
JP6125119B2 (en) System design support apparatus, system design support method, and system design support program
US20170126789A1 (en) Automatic Software Controller Configuration based on Application and Network Data
EP3782061A1 (en) System and method to securely execute datacenter management operations remotely
CN104243230A (en) Method and device for obtaining monitoring data of Linux server
CN115333712B (en) API interface management system, method and storage medium for duplex communication
CN106708717B (en) A kind of exploitation adjustment method and device
US8245182B2 (en) Class selectable design sharing
CN112333229A (en) Method, device, equipment and storage medium for expanding kubernets nodes
US20040068575A1 (en) Method and apparatus for achieving a high transfer rate with TCP protocols by using parallel transfers
US9733994B2 (en) Method and system for communicating information between a mobile device and an enterprise system
JP4696744B2 (en) Program test apparatus, method, and program
CN112187869A (en) Remote debugging system and method of IOT device, electronic device and storage medium
CN110650101A (en) Method, device and medium for optimizing CIFS (common information File System) network bandwidth
JP2008134684A (en) Apparatus and program for verifying information communication device
JP2015072531A (en) Test support method, test support device, and program
JPWO2019021898A1 (en) Development support equipment
US20170123760A1 (en) Code Correction During a User Session in a Distributed Business Transaction

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
CB02 Change of applicant information

Address after: 401, Floor 4, No. 66, Zizhuyuan Road, Haidian District, Beijing, 100089

Applicant after: Beijing Saimu Technology Co.,Ltd.

Address before: 100082 1501 ZhongGuanCun international innovation building, Haidian District, Beijing

Applicant before: Beijing saimu Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant