CN113918499A - Open interface generation method, network device and computer readable storage medium - Google Patents

Open interface generation method, network device and computer readable storage medium Download PDF

Info

Publication number
CN113918499A
CN113918499A CN202111537092.3A CN202111537092A CN113918499A CN 113918499 A CN113918499 A CN 113918499A CN 202111537092 A CN202111537092 A CN 202111537092A CN 113918499 A CN113918499 A CN 113918499A
Authority
CN
China
Prior art keywords
interface
implementation class
open interface
program system
target
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.)
Granted
Application number
CN202111537092.3A
Other languages
Chinese (zh)
Other versions
CN113918499B (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.)
Shenzhen Mingyuan Cloud Technology Co Ltd
Original Assignee
Shenzhen Mingyuan Cloud 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 Shenzhen Mingyuan Cloud Technology Co Ltd filed Critical Shenzhen Mingyuan Cloud Technology Co Ltd
Priority to CN202111537092.3A priority Critical patent/CN113918499B/en
Publication of CN113918499A publication Critical patent/CN113918499A/en
Application granted granted Critical
Publication of CN113918499B publication Critical patent/CN113918499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an open interface generation method, network equipment and a computer readable storage medium, wherein the open interface generation method comprises the following steps: acquiring an implementation class of a scanned program system by scanning a program set of a closed program system, screening the acquired implementation class by a filter to obtain a target implementation class, and if the target implementation class has a default interface, reconstructing request parameters of the interface, description of the request parameters and interface return parameters based on the default interface to generate an externally-open interface; if the target implementation class does not have a default interface, an external open interface is generated based on request parameters, description of the request parameters and interface return parameters of a realization function logic and a target implementation class construction interface reconstruction interface written by developers, external exposure of internal data or functions of the closed system is realized through the generated external open interface, the closed system can realize interaction with the outside or other closed systems based on the external open interface, and a so-called 'information isolated island' is broken.

Description

Open interface generation method, network device and computer readable storage medium
Technical Field
The present invention relates to the field of program interface generation, and in particular, to an open interface generation method, a network device, and a computer-readable storage medium.
Background
With the gradual deepening of the enterprise informatization process, the development of the internet technology and the increasingly wide application of distributed systems directly result in the existence of a large number of heterogeneous systems, the systems are often independent and operate in a closed manner, and data interaction does not exist or rarely exists between the systems.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide an open interface generation method, aiming at solving the problems of difficult information transmission and resource utilization between closed systems.
In order to achieve the above object, the present invention provides an open interface generating method, where the open interface generating method includes:
scanning a program set of a program system, and acquiring an implementation class of the program system;
acquiring a target implementation class from the implementation class of the program system according to a custom screening condition;
generating a network path for accessing the program system based on the dynamic routing;
and constructing an open interface of the program system according to the target implementation class and a network path accessed to the program system.
Further, the step of obtaining the target implementation class from the implementation class of the program system according to the customized filtering condition includes:
and screening the obtained implementation classes of the program system by using an implementation class screener according to user-defined screening conditions, and removing the implementation classes which do not accord with the preset screening conditions to obtain the target implementation classes of the program system.
Further, before the step of scanning the assembly of program systems, comprising:
generating a custom screening condition of the implementation class of the program system based on user operation;
and inputting the custom screening condition into the implementation class screener.
Further, the step of constructing an open interface of the program system according to the target implementation class and the network path accessing the program system includes:
judging whether a default interface exists in the target implementation class;
and if the target implementation class has a default interface, constructing an open interface of the program system according to the target implementation class, the default interface of the target implementation class and the network path of the program system.
Further, the step of establishing an open interface of the program system according to the target implementation class, the default interface of the target implementation class, and the network path structure of the program system includes:
according to the service function of the target implementation class, reconstructing request parameters of an interface, reconstructing parameter description of the request parameters and reconstructing interface return parameters on the basis of a default interface of the target implementation class to obtain an externally-open interface, and taking the network path as a network address of the externally-open interface.
Further, after the step of determining whether the target implementation class has a default interface, the method includes:
if the target implementation class does not have a default interface, generating implementation logic of the target implementation class based on user operation;
and constructing a request parameter of the open interface, constructing a description of the request parameter of the open interface and constructing a return parameter of the open interface based on the implementation logic and the service function of the target implementation class to obtain an external open interface, and taking the network path as a network address of the external open interface.
Further, the step of constructing a description of the open interface request parameter includes:
and generating the description of the request parameter based on user operation and the open interface request parameter.
Further, the step of constructing the return parameter of the open interface includes:
and taking the data returned after the target implementation class receives the request parameter as a return parameter of the open interface.
In addition, to achieve the above object, the present invention further provides a network device, where the network device includes a memory, a processor, and an open interface generating program stored in the memory and executable on the processor, and the open interface generating program implements the steps of the open interface generating method when executed by the processor.
In addition, to achieve the above object, the present invention further provides a readable storage medium, which stores an open interface generating program, and the open interface generating program implements the steps of the open interface generating method when being executed by a processor.
The method for generating the open interface provided by the embodiment of the invention comprises the steps of scanning a program set of a closed program system to obtain an implementation class of the scanned program system, screening the obtained implementation class by a filter to obtain a target implementation class, and reconstructing a request parameter, a description of the request parameter and an interface return parameter of an interface based on a default interface and then combining a network path generated by a dynamic route if the target implementation class has the default interface, so as to generate an external open interface of the closed program system; if the target implementation class does not have a default interface, an external open interface of the closed system is also generated based on implementation function logic written by developers, request parameters of the target implementation class construction interface, description of the request parameters and interface return parameters, and then a network path is combined, external exposure of internal data or functions of the closed system is realized through the generated external open interface, the closed system can realize interaction with the outside or other closed systems based on the external open interface, and a so-called 'information isolated island' is broken.
Drawings
FIG. 1 is a schematic diagram of a network device architecture of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first embodiment of the open interface generation method according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: acquiring an implementation class of a scanned program system by scanning a program set of a closed program system, screening the acquired implementation class by a filter to obtain a target implementation class, and if the target implementation class has a default interface, reconstructing request parameters of the interface, description of the request parameters and interface return parameters based on the default interface to generate an externally-open interface; and if the target implementation class does not have the default interface, generating an externally-opened interface based on the request parameter, the description of the request parameter and the interface return parameter of the implementation function logic and the target implementation class construction interface reconstruction interface written by the developer.
Because the development of internet technology and the increasingly wide application of distributed systems are directly caused by the gradual deepening of the information process of enterprises at present, a large number of heterogeneous systems exist, the systems are usually independent and operate in a closed mode, and data interaction does not exist or rarely exists between the systems.
The invention provides a solution, which enables a closed system to generate an externally open interface, realizes the external exposure of internal data or functions of the closed system, and the closed system can realize the interaction with the outside or other closed systems based on the externally open interface, thereby breaking the so-called 'information isolated island'.
As shown in fig. 1, fig. 1 is a schematic diagram of a network device structure of a hardware operating environment according to an embodiment of the present invention.
The network device in the embodiment of the invention can be a server, and can also be an electronic device such as a PC, a portable computer and the like with the functions of scanning, data acquisition, data reception, data processing, data transmission and the like.
As shown in fig. 1, the network device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the network device may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an open interface generating program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the open interface generation program stored in the memory 1005 and perform the following operations:
scanning a program set of a program system, and acquiring an implementation class of the program system;
acquiring a target implementation class from the implementation class of the program system according to a custom screening condition;
generating a network path for accessing the program system based on the dynamic routing;
and constructing an open interface of the program system according to the target implementation class and a network path accessed to the program system.
Further, the processor 1001 may call the open interface generation program stored in the memory 1005, and also perform the following operations:
the step of obtaining the target implementation class from the implementation class of the program system according to the custom screening condition comprises the following steps:
and screening the obtained implementation classes of the program system by using an implementation class screener according to user-defined screening conditions, and removing the implementation classes which do not accord with the preset screening conditions to obtain the target implementation classes of the program system.
Further, the processor 1001 may call the open interface generation program stored in the memory 1005, and also perform the following operations:
prior to the step of scanning the assembly of program systems, comprising:
generating a custom screening condition of the implementation class of the program system based on user operation;
and inputting the custom screening condition into the implementation class screener.
Further, the processor 1001 may call the open interface generation program stored in the memory 1005, and also perform the following operations:
the step of constructing an open interface of the program system according to the target implementation class and a network path accessing the program system includes:
judging whether a default interface exists in the target implementation class;
and if the target implementation class has a default interface, constructing an open interface of the program system according to the target implementation class, the default interface of the target implementation class and the network path of the program system.
Further, the processor 1001 may call the open interface generation program stored in the memory 1005, and also perform the following operations:
the step of constructing the open interface of the program system according to the target implementation class, the default interface of the target implementation class and the network path of the program system includes:
according to the service function of the target implementation class, reconstructing request parameters of an interface, reconstructing parameter description of the request parameters and reconstructing interface return parameters on the basis of a default interface of the target implementation class to obtain an externally-open interface, and taking the network path as a network address of the externally-open interface.
Further, the processor 1001 may call the open interface generation program stored in the memory 1005, and also perform the following operations:
after the step of judging whether the target implementation class has the default interface, the method includes:
if the target implementation class does not have a default interface, generating implementation logic of the target implementation class based on user operation;
and constructing a request parameter of the open interface, constructing a description of the request parameter of the open interface and constructing a return parameter of the open interface based on the implementation logic and the service function of the target implementation class to obtain an external open interface, and taking the network path as a network address of the external open interface.
Further, the processor 1001 may call the open interface generation program stored in the memory 1005, and also perform the following operations:
the step of constructing the description of the open interface request parameter comprises:
and generating the description of the request parameter based on user operation and the open interface request parameter.
Further, the processor 1001 may call the open interface generation program stored in the memory 1005, and also perform the following operations:
the step of constructing the return parameters of the open interface comprises the following steps:
and taking the data returned after the target implementation class receives the request parameter as a return parameter of the open interface.
Referring to fig. 2, a first embodiment of the open interface generation method according to the present invention includes:
step S10, scanning a program set of a program system, and acquiring an implementation class of the program system;
it is understood that the scanned program system may be a program system without external Interface (API) or with fewer external interfaces, scan a program set traversing the program system (the program set is compiled by a compiler and is an intermediate product for further compilation and execution by a CLR (Common Language Runtime), and in WINDOWS, it is generally expressed in a format of dll or exe), and obtain an implementation class associated with the program system from the program set, where the implementation class associated with the program system may include: the resource files stored in the program system include data of pictures, texts, videos, and link types such as jpeg (Joint Photographic Experts Group), gif (Graphics Interchange Format), html (HyperText Markup Language), and the like, and also include executable application programs and the like for implementing a certain function, and the implementation classes in the closed system can be obtained by scanning.
Step S20, obtaining a target implementation class from the implementation class of the program system according to the user-defined screening condition;
and selecting an implementation class which is related to the actual service requirement or meets the service requirement from the obtained implementation class, namely a target implementation class.
Further, the implementation classes of the obtained program system are screened according to user-defined screening conditions by using an implementation class filter, and the implementation classes which do not accord with the preset screening conditions are removed to obtain the target implementation classes of the program system.
Specifically, when an external open interface of the closed system is generated, all resources or applications of the closed system cannot be exposed to the outside in a certain situation. Therefore, when all the implementation classes in the closed system are acquired, all the implementation classes are screened by using the implementation class screener, some sensitive or unauthorized resource files and application programs are removed from the implementation classes of the externally open interface, and important resource exposure is avoided.
Further, before the step of scanning the program set of the program system, generating a custom screening condition of the implementation class of the program system based on user operation; and inputting the custom screening condition into the implementation class screener. Specifically, in this embodiment, a filter manner provided by the Net Core Swagger-based third-party component is subjected to custom filtering, before scanning, a user sets a filtering condition in a custom manner, for example, a sensitive database is filtered out, the implementation class used when the open interface is generated does not include the filtered sensitive database, and in addition, when the filtering condition is set, it can also be set to filter out a certain implementation class as a target implementation class, that is, the implementation class used when the open interface is generated is the filtered target implementation class.
It can be understood that the data information exposed by the externally open interface is controlled by specifically screening the implementation classes in the closed system, so that the leakage of sensitive data is avoided.
Step S30, generating a network path for accessing the program system based on the dynamic routing;
in this implementation, specifically, a network path accessing the closed system is dynamically routed and generated based on an Enterprise Resource Planning (ERP) system in a real estate domain, and the network path is used for generating a subsequent external open interface.
Step S40, constructing an open interface of the program system according to the target implementation class and the network path accessing the program system.
In this embodiment, the generated external open interface is a Restful (Representational State Transfer) style API, which is a more common style interface.
Further, before generating an external open interface, judging whether a default interface exists in the target implementation class; and if the target implementation class has a default interface, constructing an open interface of the program system according to the target implementation class, the default interface of the target implementation class and the network path of the program system.
Specifically, it can be understood that the implementation classes obtained by scanning the program set may be divided into two types, one is a standard implementation class, and the other is an implementation class that needs to be customized, where the standard implementation class may implement a service function, and the customized implementation class needs to further encode on the basis of the existing resources to implement a corresponding service function, such as: the function of the external open interface is a user information query function, if the realization type of the interface butt joint is a standard realization type, the realization type has a database of user information and has a query function of the user information, on this basis, the scanning system can automatically generate an interface of the user information database query function, namely a default interface is generated, and in addition, if the realization type of the interface butt joint is a custom realization type, only a database for storing the user information (even the database for storing the user information does not exist) may exist at the moment, but the default interface cannot be automatically generated if the realization type of the interface butt joint does not have the user information query function. Similarly, the target implementation class screened by the condition filter includes the above two cases, so that before generating an interface, it is determined whether the target implementation class has a default interface, and if the target implementation class has the default interface, an interface that is open to the outside is generated according to the default interface, the target implementation class, and a network path generated by the dynamic route.
Further, according to the service function of the target implementation class, reconstructing a request parameter of an interface, reconstructing a parameter description of the request parameter, and reconstructing an interface return parameter on the basis of a default interface of the target implementation class to obtain an externally-open interface, and using the network path as a network address of the externally-open interface. Specifically, the default interface generated by the system often does not meet the actual service requirement, and therefore the request parameters, the description of the request parameters, and the interface return parameters of the interface need to be reconstructed. Based on the above interface as an example of the user information query function, the target implementation class interfaced with the interface is a database with a data query function, and the service function of the target implementation class is a user information query service. The request parameters required by the default generated interface of the system often do not meet the actual requirements, for example, the default interface requires only the user name for the request parameters input by the user, but in this embodiment, the original closed program system is exposed to the third party, and in order to avoid information being queried at will, the request parameters need to be reconstructed, and a user ID (Identity document) or a user telephone number and the like are added on the basis of inputting the user name. Meanwhile, when the request parameters of the interface are reconstructed, the description of the interface request parameters also needs to be reconstructed, based on the interface for realizing the user information query, the description of the request parameters is reconstructed, user ID (identity) or telephone number is added, when the user uses the interface, the description of the request parameters is output to the user, and the user inputs the request parameters according to the description of the request parameters. Similarly, regarding the return parameter of the reconfiguration interface, the data returned by the default interface generated by the system based on the request parameter may not completely satisfy the user requirement, so that the return parameter of the interface needs to be reconfigured, and also based on the above example, if the queried user information is incomplete and the data in the user information base is relatively lacked, the type and the data amount of the interface return data are reset or a new database is added, so as to satisfy the actual requirement of the user, and in addition, the network path generated based on the dynamic routing of the ERP system will be used as the network address of the externally open interface. It can be understood that for a target implementation class with a default interface, a developer is not required to further encode in a standard MVC (Model View Controller, Model, View, Controller) manner to implement a service logic function, and only needs to reconstruct based on the default interface.
Optionally, after the step of determining whether the target implementation class has the default interface is performed, if the target implementation class does not have the default interface, generating an implementation logic of the target implementation class based on a user operation; and constructing a request parameter of the open interface, constructing a description of the request parameter of the open interface and constructing a return parameter of the open interface based on the implementation logic and the service function of the target implementation class to obtain an external open interface, and taking the network path as a network address of the external open interface.
Specifically, when the obtained target implementation class is a custom type, that is, the target implementation class does not have a default interface, the target implementation class does not have a logic for completely implementing a service function, and if the function of the externally open interface is a user information query function, only a database for storing user information may exist (or a database for storing user information does not exist), but the database does not have the user information query function. Therefore, the developer completes the logic code (building or re-docking the database) for realizing the user information query function again, that is, the operation based on the user is performed, at this time, the user is a user who is not using the interface for the developer, and simultaneously, the request parameters required to be input by the user information query are built, for example, the request parameters required to be input when the user name, the user ID or the telephone number and the like are set for query, and the interface sends the input request parameters of the user using the interface to the database with the information query function. Further, the description of the request parameter is generated based on user operation and in combination with the open interface request parameter. Specifically, the generated request parameter description is used for prompting a user using the interface to input what request parameter, the specific request parameter description is understood by the developer based on the meaning of the request parameter, meanwhile, a special label is marked on the interface and the corresponding request parameter description, when the user uses the interface, the interface acquires the corresponding request parameter description according to the special label, and the acquired request parameter description is output to the user. Further, the data returned after the target implementation class receives the request parameter is used as a return parameter of the open interface. Specifically, the return parameters for constructing the interface are as follows: the interface sends the request parameters input by the user to the query logic part, the query logic part searches from the corresponding information database based on the input parameters, and the user data obtained by searching is used as the return parameters of the interface. The content of the specific interface return parameter is determined by the result of the query logic, and a developer can change the query logic so as to change the content of the interface return parameter. It can be understood that, in the present embodiment, the specific service function of the target implementation class is described by taking query information as an example, but in practical applications, the service function of the target implementation class is far more than querying information, and for example, the method may further include processing data, storing data, or deleting data.
In this embodiment, a program set of a closed program system is scanned to obtain an implementation class of the scanned program system, the obtained implementation class is screened by a filter to obtain a target implementation class, and if the target implementation class has a default interface, a request parameter of the interface, a description of the request parameter, and an interface return parameter are reconstructed based on the default interface, and a network path generated by combining a dynamic route is further reconstructed, so that an external open interface of the closed program system is generated; if the target implementation class does not have a default interface, an external open interface of the closed system is also generated based on implementation function logic written by developers, request parameters of the target implementation class construction interface, description of the request parameters and interface return parameters, and then a network path is combined, external exposure of internal data or functions of the closed system is realized through the generated external open interface, the closed system can realize interaction with the outside or other closed systems based on the external open interface, and a so-called 'information isolated island' is broken.
In addition, the present embodiment also provides a network device, where the network device includes a memory, a processor, and an open interface generating program that is stored in the memory and is executable on the processor, and when the open interface generating program is executed by the processor, the steps of the open interface generating method are implemented.
In addition, the present embodiment also provides a readable storage medium, where the readable storage medium stores an open interface generation program, and the open interface generation program, when executed by a processor, implements the steps of the open interface generation method as described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An open interface generation method, characterized in that the open interface generation method comprises:
scanning a program set of a program system, and acquiring an implementation class of the program system;
acquiring a target implementation class from the implementation class of the program system according to a custom screening condition;
generating a network path for accessing the program system based on the dynamic routing;
and constructing an open interface of the program system according to the target implementation class and a network path accessed to the program system.
2. The method of claim 1, wherein the step of obtaining a target implementation class from the implementation classes of the program system according to a custom filter condition comprises:
and screening the obtained implementation classes of the program system by using an implementation class screener according to user-defined screening conditions, and removing the implementation classes which do not accord with the preset screening conditions to obtain the target implementation classes of the program system.
3. The open interface generating method of claim 2, prior to the step of scanning the assembly of the program system, comprising:
generating a custom screening condition of the implementation class of the program system based on user operation;
and inputting the custom screening condition into the implementation class screener.
4. The method of claim 3, wherein the step of constructing the open interface of the program system according to the target implementation class and a network path to access the program system comprises:
judging whether a default interface exists in the target implementation class;
and if the target implementation class has a default interface, constructing an open interface of the program system according to the target implementation class, the default interface of the target implementation class and the network path of the program system.
5. The open interface generating method of claim 4, wherein the step of constructing the open interface of the program system according to the object implementation class, the default interface of the object implementation class, and the network path of the program system comprises:
according to the service function of the target implementation class, reconstructing request parameters of an interface, reconstructing parameter description of the request parameters and reconstructing interface return parameters on the basis of a default interface of the target implementation class to obtain an externally-open interface, and taking the network path as a network address of the externally-open interface.
6. The method of claim 4, wherein after the step of determining whether the target implementation class has a default interface, the method comprises:
if the target implementation class does not have a default interface, generating implementation logic of the target implementation class based on user operation;
and constructing a request parameter of the open interface, constructing a description of the request parameter of the open interface and constructing a return parameter of the open interface based on the implementation logic and the service function of the target implementation class to obtain an external open interface, and taking the network path as a network address of the external open interface.
7. The open interface generation method of claim 6, wherein the step of constructing the description of the open interface request parameter includes:
and generating the description of the request parameter based on user operation and the open interface request parameter.
8. The open interface generation method of claim 7, wherein the step of constructing the return parameter of the open interface comprises:
and taking the data returned after the target implementation class receives the request parameter as a return parameter of the open interface.
9. A network device comprising a memory, a processor, and an open interface generation program stored on the memory and executable on the processor, the open interface generation program when executed by the processor implementing the steps of the open interface generation method according to any one of claims 1 to 8.
10. A readable storage medium, having an open interface generation program stored thereon, which when executed by a processor implements the steps of the open interface generation method according to any one of claims 1 to 8.
CN202111537092.3A 2021-12-16 2021-12-16 Open interface generation method, network device and computer readable storage medium Active CN113918499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111537092.3A CN113918499B (en) 2021-12-16 2021-12-16 Open interface generation method, network device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111537092.3A CN113918499B (en) 2021-12-16 2021-12-16 Open interface generation method, network device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113918499A true CN113918499A (en) 2022-01-11
CN113918499B CN113918499B (en) 2022-04-08

Family

ID=79248960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111537092.3A Active CN113918499B (en) 2021-12-16 2021-12-16 Open interface generation method, network device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113918499B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120180022A1 (en) * 2011-01-07 2012-07-12 Matthew Edward Hopkins Method and system for generating an api request message
WO2012169775A2 (en) * 2011-06-09 2012-12-13 주식회사 피씨엔 System and method for providing an open api-based content service interface
US20140372970A1 (en) * 2013-06-13 2014-12-18 International Business Machines Corporation Method to auto generate jax-rs rest service implementation classes from existing interfaces
CN106484421A (en) * 2016-10-11 2017-03-08 武汉斗鱼网络科技有限公司 A kind of method and system quickly generating api interface
CN107908485A (en) * 2017-10-26 2018-04-13 中国平安人寿保险股份有限公司 Interface parameters transmission method, device, equipment and computer-readable recording medium
CN112835571A (en) * 2021-01-29 2021-05-25 宝宝巴士股份有限公司 Automatic RESTful API code generation method based on Laravel framework

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120180022A1 (en) * 2011-01-07 2012-07-12 Matthew Edward Hopkins Method and system for generating an api request message
WO2012169775A2 (en) * 2011-06-09 2012-12-13 주식회사 피씨엔 System and method for providing an open api-based content service interface
US20140372970A1 (en) * 2013-06-13 2014-12-18 International Business Machines Corporation Method to auto generate jax-rs rest service implementation classes from existing interfaces
CN106484421A (en) * 2016-10-11 2017-03-08 武汉斗鱼网络科技有限公司 A kind of method and system quickly generating api interface
CN107908485A (en) * 2017-10-26 2018-04-13 中国平安人寿保险股份有限公司 Interface parameters transmission method, device, equipment and computer-readable recording medium
CN112835571A (en) * 2021-01-29 2021-05-25 宝宝巴士股份有限公司 Automatic RESTful API code generation method based on Laravel framework

Also Published As

Publication number Publication date
CN113918499B (en) 2022-04-08

Similar Documents

Publication Publication Date Title
US9832076B2 (en) Resource change management in machine to machine network
EP3605324A1 (en) Application development method and tool, device, and storage medium thereof
US10643023B2 (en) Programmatic native rendering of structured content
US8583619B2 (en) Methods and systems for open source collaboration in an application service provider environment
US8443346B2 (en) Server evaluation of client-side script
Malandrino et al. MIMOSA: context-aware adaptation for ubiquitous web access
US9934007B2 (en) Method for operating tool in working environment and machine using such method
US20230308504A9 (en) Method and system of application development for multiple device client platforms
US10558653B2 (en) Dynamic, variable-data attribute data service
JP2004506977A (en) Systems and methods for building applications that conform to multiple device and protocol standards
US20110078593A1 (en) Web browser transmission server and method of controlling operation of same
CN109240697B (en) Call processing method and device and storage medium
CN108023918A (en) A kind of information on services acquisition methods, apparatus and system
CN106569856A (en) Method and device of loading application view resource file
CN105373548B (en) Mobile device and method for customizing event by browser thereof
CN111124544A (en) Interface display method and device, electronic equipment and storage medium
Brodt et al. The TELAR mobile mashup platform for Nokia internet tablets
CN112749351B (en) Link address determination method, device, computer readable storage medium and equipment
CN113918499B (en) Open interface generation method, network device and computer readable storage medium
CN111666074B (en) Web application customization method, related device and system
CN111158777A (en) Component calling method and device and computer readable storage medium
CN110874278A (en) Embedding method of external system, workflow system, device and storage medium
CN110348226A (en) A kind of scan method of project file, device, electronic equipment and storage medium
US20130332568A1 (en) Method of data processing by a navigation module
RU2634221C2 (en) Method and device for drawing presentation of electronic document on screen

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