CN114035864A - Interface processing method, interface processing device, electronic device, and storage medium - Google Patents

Interface processing method, interface processing device, electronic device, and storage medium Download PDF

Info

Publication number
CN114035864A
CN114035864A CN202111335850.3A CN202111335850A CN114035864A CN 114035864 A CN114035864 A CN 114035864A CN 202111335850 A CN202111335850 A CN 202111335850A CN 114035864 A CN114035864 A CN 114035864A
Authority
CN
China
Prior art keywords
interface
file
server
present disclosure
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.)
Pending
Application number
CN202111335850.3A
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111335850.3A priority Critical patent/CN114035864A/en
Publication of CN114035864A publication Critical patent/CN114035864A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides an interface processing method, which can be used in the technical field of computers, the financial field or other fields. The method comprises the following steps: responding to a docking request of client equipment, and acquiring interface description information carried in the docking request; writing the interface description information into a preset interface template to obtain an interface configuration file; generating a target interface file based on the interface configuration file; and sending an interface deployment instruction to the server-side equipment so that the server-side equipment loads the target interface file by using the class loader. In addition, the present disclosure also provides an interface processing apparatus, an electronic device, a readable storage medium and a computer program product.

Description

Interface processing method, interface processing device, electronic device, and storage medium
Technical Field
The present disclosure relates to the field of computer technology and the field of finance, and more particularly, to an interface processing method, an interface processing apparatus, an electronic device, a readable storage medium, and a computer program product.
Background
With the rapid development of information technology, more and more enterprises realize the digital storage and management of business data. As the service functions to be realized become more and more complex, the service data stored in a single system often cannot meet the service requirements, and therefore, a plurality of systems are inevitably required to interface with each other.
In the process of implementing the disclosed concept, the inventors found that there are at least technical problems in the related art, such as high interface development cost and poor flexibility of interface management and invocation.
Disclosure of Invention
In view of the above, the present disclosure provides an interface processing method, an interface processing apparatus, an electronic device, a readable storage medium, and a computer program product.
One aspect of the present disclosure provides an interface processing method, including: responding to a docking request of client equipment, and acquiring interface description information carried in the docking request; writing the interface description information into a preset interface template to obtain an interface configuration file; generating a target interface file based on the interface configuration file; and sending an interface deployment instruction to the server-side equipment so that the server-side equipment loads the target interface file by using the class loader.
According to an embodiment of the present disclosure, the generating a target interface file based on the interface configuration file includes: creating an initial template class; creating an interface field in the initial template class based on the interface configuration file; processing the interface field by using a preset method; and compiling the initial template class containing the processed interface fields into the target interface file.
According to an embodiment of the present disclosure, the preset method at least includes a method of adding an element in the interface field.
According to an embodiment of the present disclosure, the method further includes: respectively storing the target interface files into a memory database and a relational database; the sending an interface deployment instruction to the server device to enable the server device to load the target interface file by using a class loader includes: sending the interface deployment instruction to the server device, so that the server device loads the target interface file stored in the memory database by using the class loader; under the condition of receiving feedback information which is sent by the server-side equipment and fails to acquire the target interface file, retrieving the target interface file from the relational database; storing the target interface file into a memory database when the target interface file is successfully retrieved from the relational database; and sending the interface deployment instruction to the server-side equipment again.
According to an embodiment of the present disclosure, the method further includes: and sending feedback information of interface configuration failure to the client device when the target interface file is not successfully retrieved from the relational database.
According to an embodiment of the present disclosure, the preset interface template has a preset interface address; the method further comprises the following steps: and sending feedback information containing the preset interface address to the client device so that the client device is in butt joint with the server device through the preset interface address.
According to an embodiment of the present disclosure, the interface description information at least includes interface parameters and types of the interface parameters.
According to an embodiment of the present disclosure, the server device includes a plurality of electronic devices in a distributed system.
Another aspect of the present disclosure provides an interface processing apparatus including: the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for responding to a docking request of client equipment and acquiring interface description information carried in the docking request; the first processing module is used for writing the interface description information into a preset interface template to obtain an interface configuration file; the second processing module is used for generating a target interface file based on the interface configuration file; and the deployment module is used for sending an interface deployment instruction to the server-side equipment so as to enable the server-side equipment to load the target interface file by using the class loader.
Another aspect of the present disclosure provides an electronic device including: one or more processors; memory to store one or more instructions, wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement a method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program product comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, under the condition that a docking request of client equipment is received, a target interface file can be generated in a mode that interface description information in the docking request is written into a preset interface template, and the target interface file is autonomously loaded by the server equipment through information interaction, so that the deployment of an interface is realized. By the technical means, automatic generation and loading of the interface are realized, the technical problems of high interface development cost and poor interface management and calling flexibility in the related technology are at least partially solved, the development cost and the management cost of the interface are effectively reduced, and resource waste caused when the server loads the interface is reduced.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically shows an exemplary system architecture to which an interface processing method may be applied according to an embodiment of the present disclosure.
Fig. 2 schematically shows a flow chart of an interface processing method according to an embodiment of the present disclosure.
FIG. 3 schematically shows a flow chart of a target interface file generation method according to an embodiment of the present disclosure.
Fig. 4 schematically shows a schematic diagram of an interface deployment flow according to an embodiment of the present disclosure.
Fig. 5 schematically shows a block diagram of an interface processing device according to an embodiment of the present disclosure.
Fig. 6 schematically shows a block diagram of an electronic device adapted to implement an interface processing method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, necessary security measures are taken, and the customs of the public order is not violated.
The interface between software systems is a bridge for realizing information interaction between one system and another system, and the software interface can be generally divided into a webservice interface and an http interface. The http interface is a data interaction interface between mainstream b/s-structured application programs, and based on an http protocol, xml or json is used as a data interaction format to realize data interaction between two or more independent systems, and usually one http interface corresponds to a section of processing logic, namely a section of code.
In many application scenarios, the system may involve interfacing of multiple interfaces. For example, the wind control system may call a credit investigation interface, when the wind control system performs model operation on an individual or an enterprise, a large amount of data is required, the data is returned by calling the credit investigation interface, and the credit investigation interface is various in types and is frequently modified. Therefore, a large number of interfaces need to be managed, and interface information can be modified in real time under the condition that the system is operated.
In order to solve the problems that a large number of interfaces need to be managed and frequently modified in related application scenarios, many solutions are proposed in the related art. For example, multiple interfaces are combined into one interface and a type enumeration code is used to distinguish between different requests. For another example, an interface for loading byte code files is developed to load the specified byte code files according to file names; when the interface needs to take effect, the byte code file is uploaded to a server where the application is located, and then the interface is called to load a newly developed interface code file.
However, as services are developed and changed, the interfaces are usually required to be optimized and adjusted or newly added, and solutions in the related art usually require the interfaces to be adjusted in a hard coding manner, which requires high learning cost and labor cost.
On the other hand, when an interface is deployed in a distributed system, file omission easily occurs in a byte code file loading mode, and each loading needs to be realized by hard coding; although the method of issuing the bytecode file through the message queue can ensure the accuracy of issuing the file, the issuing process is complicated, and the file needs to be uploaded to each distributed server, which increases the risk of interface deployment.
In view of this, embodiments of the present disclosure provide an interface processing method, an interface processing apparatus, an electronic device, a readable storage medium, and a computer program product. The method comprises the steps of responding to a docking request of client equipment, and acquiring interface description information carried in the docking request; writing the interface description information into a preset interface template to obtain an interface configuration file; generating a target interface file based on the interface configuration file; and sending an interface deployment instruction to the server-side equipment so that the server-side equipment loads the target interface file by using the class loader. Fig. 1 schematically shows an exemplary system architecture to which an interface processing method may be applied according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include a business system 110 and a server 120.
Business system 110 may include client device 101, server devices 102, 103, and network 104.
Client device 101 and server devices 102, 103 may be any electronic device having a memory and a processor, including but not limited to a smartphone, tablet, laptop, desktop, server, and the like.
The client device 101 may further have a display device for displaying the business processing result of the business system 110.
The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired and/or wireless communication links, and so forth.
Network 104 may be characterized specifically as a communication interface between client device 101 and server devices 102, 103.
The server 120 may be a server providing various services, for example, a background management server configuring a communication interface between the client device 101 and the server devices 102 and 103.
It should be noted that the interface processing method provided by the embodiment of the present disclosure may be generally executed by the server 120. Accordingly, the interface processing apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 120. The interface processing method provided by the embodiment of the present disclosure may also be executed by the client device 101 in the business system 110. Accordingly, the interface processing apparatus provided by the embodiment of the present disclosure may also be disposed in the client device 101 in the business system 110. Alternatively, the interface processing method provided by the embodiment of the present disclosure may also be performed by other servers or server clusters capable of establishing communication connection with the service system 110 or the server 120. Accordingly, the interface processing device provided by the embodiment of the present disclosure may also be disposed in other servers or server clusters capable of establishing communication connection with the service system 110 or the server 120.
For example, when a user initiates a docking request using the client device 101, the client device 101 may locally perform the interface processing method provided by the embodiments of the present disclosure to determine an interface with the server devices 102, 103. Alternatively, the client device 101 may send the docking request to the server 120 or another server or a server group different from the server 120, and the server or the server group receiving the docking request executes the interface processing method provided by the embodiment of the present disclosure.
It should be understood that the number of business systems, client devices, server devices, networks, and servers in FIG. 1 are merely illustrative. There may be any number of business systems, client devices, server devices, networks, and servers, as desired for an implementation.
Fig. 2 schematically shows a flow chart of an interface processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S204.
In operation S201, in response to a docking request of a client device, interface description information carried in the docking request is acquired.
In operation S202, the interface description information is written into a preset interface template to obtain an interface configuration file.
In operation S203, a target interface file is generated based on the interface configuration file.
In operation S204, an interface deployment instruction is sent to the server device, so that the server device loads the target interface file using the class loader.
According to embodiments of the present disclosure, the client device and the server device may be any electronic device having a memory and a processor, including but not limited to a computer, a server, and the like.
According to the embodiment of the disclosure, the docking request may be sent by a service system on the client device, and the docking request may include input and output information of an interface required when the client device is docked with the target server device.
According to the embodiment of the disclosure, the input and output fields of the interface, the types of the fields and the corresponding field mappings can be configured in the preset interface template, the field mapping table can be as shown in table 1, and the new addition of the interface can be realized accurately and conveniently through the field mapping table.
TABLE 1
Input device Output of Type of input Type of output
Input1 Output1 String String
Input2 Output2 String Integer
According to the embodiment of the disclosure, a management end can be configured in the preset interface template, and the management end can provide an operation page for template editing for developers.
According to an embodiment of the present disclosure, the target interface file may be a bytecode file.
According to the embodiment of the present disclosure, in generating the target interface file according to the interface configuration file, the interface information contained in the interface configuration file may be read, the corresponding bytecode file name may be generated according to the name of the template, and the bytecode file described by the interface and the bytecode file operated by the interface may be generated by reflection according to the description information of the interface field.
According to the embodiment of the present disclosure, the method for generating the target interface file according to the interface configuration file is not limited, and for example, Javaassist may be used to generate the interface file.
According to the embodiment of the disclosure, the byte code file is dynamically generated by using the preset interface template and the interface description information, and the required interface function can be realized without development and code compiling.
According to an embodiment of the present disclosure, the interface deployment instruction may include an instruction instructing the server device to load the target interface file. By the mode of sending the instruction to enable the server-side equipment to be loaded independently, the target interface file does not need to be uploaded to each server-side equipment, and the occurrence of file omission is reduced.
According to an embodiment of the present disclosure, the class loader may be a classloader. By using the class loader, the server-side device can load the byte code file in the system operation process, so that the newly added interface takes effect.
According to the embodiment of the disclosure, under the condition that a docking request of client equipment is received, a target interface file can be generated in a mode that interface description information in the docking request is written into a preset interface template, and the target interface file is autonomously loaded by the server equipment through information interaction, so that the deployment of an interface is realized. By the technical means, automatic generation and loading of the interface are realized, the technical problems of high interface development cost and poor interface management and calling flexibility in the related technology are at least partially solved, the development cost and the management cost of the interface are effectively reduced, and resource waste caused when the server loads the interface is reduced.
The method shown in fig. 2 is further described with reference to fig. 3-4 in conjunction with specific embodiments.
According to the embodiment of the disclosure, generation of the target interface file can be realized by using Javaassist.
FIG. 3 schematically shows a flow chart of a target interface file generation method according to an embodiment of the present disclosure.
As shown in FIG. 3, the target interface file generation method includes operations S301 to S304.
In operation S301, an initial template class is created.
In operation S302, interface fields are created in an initial template class based on an interface configuration file.
In operation S303, the interface field is processed using a preset method.
In operation S304, the initial template class including the processed interface fields is compiled into a target interface file.
According to embodiments of the present disclosure, the initial template class may be an empty class.
According to the embodiment of the disclosure, the interface configuration file can be configured with interface parameters and types of the interface parameters, and the newly-established interface fields can be in one-to-one correspondence with the interface parameters contained in the interface configuration file.
According to the embodiment of the disclosure, the access level of the newly created interface field can be set, and the set access level includes public, private and the like.
According to an embodiment of the present disclosure, the preset method may include a method of adding an element in an interface field, such as getter and setter, and is not limited herein.
According to an embodiment of the present disclosure, after processing an interface field using a preset method, a constructor may be supplemented in an initial template class. In some embodiments, the constructor may also include a constructor that is set by default when creating the initial template class.
According to an embodiment of the present disclosure, the target interface file may be a class file.
Fig. 4 schematically shows a schematic diagram of an interface deployment flow according to an embodiment of the present disclosure.
As shown in fig. 4, the interface deployment flow includes operations S401 to S411. Wherein, operations S401 to S402 and operations S408 to S411 are performed by the interface processing system, and operations S403 to S407 are performed by the server device.
In operation S401, the target interface file is stored in the in-memory database and the relational database, respectively.
In operation S402, an interface deployment instruction is sent to the server device.
In operation S403, a target interface file is obtained from the in-memory database.
In operation S404, it is determined whether the acquisition is successful. In case of successfully acquiring the target interface file, performing operation S405; in case of failing to successfully acquire the target interface file, operation S407 is performed.
In operation S405, the object interface file is loaded using the class loader.
In operation S406, feedback information that the interface loading is successful is transmitted to the client device.
In operation S407, feedback information of the failure to acquire the interface file is transmitted to the interface processing system.
In operation S408, a target interface file is retrieved from the relational database.
In operation S409, it is determined whether the retrieval is successful. In case that the target interface file is successfully retrieved, performing operation S410; in case the target interface file is not successfully retrieved, operation S411 is performed.
In operation S410, the target interface file is stored in the in-memory database. After completing operation S410, it returns to perform operation S402 again.
In operation S411, feedback information of the interface configuration failure is transmitted to the client device.
According to an embodiment of the present disclosure, the interface processing system may be a system implementing the methods of operations S201 to S204 and operations S301 to S304.
According to the embodiment of the disclosure, the memory database can be selected according to a specific application scenario, and the selectable memory databases can include key value pair memory databases such as Redis, Memcached and Aerospike, relational memory databases such as orbe TimesTen, ASP HANA, MenSQL and SQLite, or graph memory databases such as RedisGraph.
According to the embodiment of the disclosure, the memory database is used for storing the target interface file, so that the loading speed of the interface can be effectively guaranteed, and the deployment of the interface in a distributed system is supported.
According to an embodiment of the present disclosure, the relational database may be any relational database such as Oracle, MySQL, and the like.
According to the embodiment of the disclosure, the server device may include all electronic devices that need to be docked when implementing the business function, for example, multiple electronic devices in a distributed system may be used.
According to the embodiment of the disclosure, the target interface file does not need to be downloaded to the server side equipment in a mode of loading the target interface file from the memory database, so that the risk of interface exposure is reduced.
According to an embodiment of the present disclosure, the class loader may be a classloader.
According to the embodiment of the disclosure, the file names of all the target interface files generated by the preset interface template are the same as the template names of the preset interface template, and the hard coding workload in the process of loading the interface files can be reduced by the method.
In some embodiments, the preset interface template is further provided with a preset interface address, all the interfaces generated by the preset interface template have the same preset interface address, and the client can realize the docking with the server device through the preset interface address.
According to the embodiment of the disclosure, after the generation of the target interface file is completed, feedback information including the preset interface address can be sent to the client device, so that the client device can be conveniently connected with the server device through the preset interface address.
According to the embodiment of the disclosure, the specific implementation of the interface is decoupled from the address of the interface, so that the flexibility of the interface is effectively improved, and the original code is not required to be changed or recompiled, so that a new interface can be incrementally issued, or the specific implementation of the original interface can be modified.
According to an embodiment of the present disclosure, after the execution of operation S411 is completed, the methods of operations S201 to S203 and the method of operation S401 may also be performed to regenerate and store the target interface file.
Fig. 5 schematically shows a block diagram of an interface processing device according to an embodiment of the present disclosure.
As shown in fig. 5, the interface processing apparatus 500 includes an acquisition module 510, a first processing module 520, a second processing module 530, and a deployment module 540.
The obtaining module 510 is configured to, in response to a docking request of a client device, obtain interface description information carried in the docking request.
The first processing module 520 is configured to write the interface description information into a preset interface template to obtain an interface configuration file.
A second processing module 530, configured to generate a target interface file based on the interface configuration file.
The deployment module 540 is configured to send an interface deployment instruction to the server device, so that the server device loads the target interface file using the class loader.
According to the embodiment of the disclosure, under the condition that a docking request of client equipment is received, a target interface file can be generated in a mode that interface description information in the docking request is written into a preset interface template, and the target interface file is autonomously loaded by the server equipment through information interaction, so that the deployment of an interface is realized. By the technical means, automatic generation and loading of the interface are realized, the technical problems of high interface development cost and poor interface management and calling flexibility in the related technology are at least partially solved, the development cost and the management cost of the interface are effectively reduced, and resource waste caused when the server loads the interface is reduced.
The second processing module 530 includes a first processing unit, a second processing unit, a third processing unit, and a fourth processing unit according to an embodiment of the present disclosure.
A first processing unit for creating an initial template class.
And the second processing unit is used for creating the interface field in the initial template class based on the interface configuration file.
And the third processing unit is used for processing the interface field by using a preset method.
And the fourth processing unit is used for compiling the initial template class containing the processed interface fields into a target interface file.
According to an embodiment of the present disclosure, the preset method includes at least a method of adding an element in an interface field.
According to an embodiment of the present disclosure, the apparatus 500 further comprises a storage module.
And the storage module is used for respectively storing the target interface file into the memory database and the relational database.
According to an embodiment of the present disclosure, the deployment module 540 includes a first deployment unit, a second deployment unit, a third deployment unit, and a fourth deployment unit.
The first deployment unit is used for sending an interface deployment instruction to the server-side equipment so that the server-side equipment loads the target interface file stored in the memory database by using the class loader.
And the second deployment unit is used for retrieving the target interface file from the relational database under the condition of receiving feedback information which is sent by the server-side equipment and fails to acquire the target interface file.
And the third deployment unit is used for storing the target interface file into the memory database under the condition that the target interface file is successfully retrieved from the relational database.
And the fourth deployment unit is used for sending the interface deployment instruction to the server-side equipment again.
According to an embodiment of the present disclosure, the deployment module 540 further includes a fifth deployment unit.
And the fifth deployment unit is used for sending feedback information of interface configuration failure to the client device under the condition that the target interface file is not successfully retrieved from the relational database.
According to an embodiment of the present disclosure, the preset interface template has a preset interface address.
The apparatus 500 also includes a transmitting module.
And the sending module is used for sending feedback information containing the preset interface address to the client equipment so that the client equipment is in butt joint with the server equipment through the preset interface address.
According to an embodiment of the present disclosure, the interface description information includes at least an interface parameter and a type of the interface parameter.
According to an embodiment of the present disclosure, a server device includes a plurality of electronic devices in a distributed system.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any number of the obtaining module 510, the first processing module 520, the second processing module 530, and the deploying module 540 may be combined and implemented in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the obtaining module 510, the first processing module 520, the second processing module 530, and the deploying module 540 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or may be implemented in any one of three implementations of software, hardware, and firmware, or in a suitable combination of any of them. Alternatively, at least one of the acquisition module 510, the first processing module 520, the second processing module 530 and the deployment module 540 may be at least partially implemented as a computer program module, which when executed may perform a corresponding function.
It should be noted that the interface processing device portion in the embodiment of the present disclosure corresponds to the interface processing method portion in the embodiment of the present disclosure, and the description of the interface processing device portion specifically refers to the interface processing method portion, which is not described herein again.
Fig. 6 schematically shows a block diagram of an electronic device adapted to implement an interface processing method according to an embodiment of the present disclosure. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, a computer electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. Processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 601 may also include onboard memory for caching purposes. Processor 601 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM602, and the RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM602 and/or RAM 603. It is to be noted that the programs may also be stored in one or more memories other than the ROM602 and RAM 603. The processor 601 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 600 may also include input/output (I/O) interface 605, input/output (I/O) interface 605 also connected to bus 604, according to an embodiment of the disclosure. The electronic device 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM602 and/or RAM 603 described above and/or one or more memories other than the ROM602 and RAM 603.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method provided by the embodiments of the present disclosure, when the computer program product is run on an electronic device, the program code being configured to cause the electronic device to implement the interface processing method provided by the embodiments of the present disclosure.
The computer program, when executed by the processor 601, performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, downloaded and installed through the communication section 609, and/or installed from the removable medium 611. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (12)

1. An interface processing method, comprising:
responding to a docking request of client equipment, and acquiring interface description information carried in the docking request;
writing the interface description information into a preset interface template to obtain an interface configuration file;
generating a target interface file based on the interface configuration file; and
and sending an interface deployment instruction to the server-side equipment so that the server-side equipment loads the target interface file by using the class loader.
2. The method of claim 1, wherein the generating a target interface file based on the interface profile comprises:
creating an initial template class;
creating an interface field in the initial template class based on the interface configuration file;
processing the interface field by using a preset method; and
compiling the initial template class containing the processed interface fields into the target interface file.
3. The method of claim 2, wherein the preset method comprises at least a method of adding an element in the interface field.
4. The method of claim 1, further comprising:
respectively storing the target interface file into a memory database and a relational database;
wherein the sending an interface deployment instruction to the server device to enable the server device to load the target interface file using a class loader includes:
sending the interface deployment instruction to the server-side equipment so that the server-side equipment loads the target interface file stored in the memory database by using the class loader;
under the condition that feedback information which is sent by the server-side equipment and fails to acquire the target interface file is received, the target interface file is retrieved from the relational database;
storing the target interface file into a memory database under the condition that the target interface file is successfully retrieved from the relational database; and
and sending the interface deployment instruction to the server-side equipment again.
5. The method of claim 4, further comprising:
in the event that the target interface file is not successfully retrieved from the relational database, sending feedback information of interface configuration failure to the client device.
6. The method of claim 1, wherein the preset interface template has a preset interface address;
the method further comprises the following steps:
and sending feedback information containing the preset interface address to the client device so that the client device is in butt joint with the server device through the preset interface address.
7. The method according to any one of claims 1 to 6, wherein the interface description information comprises at least interface parameters and a type of interface parameters.
8. The method of any one of claims 1-6, wherein the server device comprises a plurality of electronic devices in a distributed system.
9. An interface processing apparatus comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for responding to a docking request of client equipment and acquiring interface description information carried in the docking request;
the first processing module is used for writing the interface description information into a preset interface template to obtain an interface configuration file;
the second processing module is used for generating a target interface file based on the interface configuration file; and
and the deployment module is used for sending an interface deployment instruction to the server-side equipment so as to enable the server-side equipment to load the target interface file by using the class loader.
10. An electronic device, comprising:
one or more processors;
a memory to store one or more instructions that,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 8.
12. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 8 when executed.
CN202111335850.3A 2021-11-11 2021-11-11 Interface processing method, interface processing device, electronic device, and storage medium Pending CN114035864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111335850.3A CN114035864A (en) 2021-11-11 2021-11-11 Interface processing method, interface processing device, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111335850.3A CN114035864A (en) 2021-11-11 2021-11-11 Interface processing method, interface processing device, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
CN114035864A true CN114035864A (en) 2022-02-11

Family

ID=80144155

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111335850.3A Pending CN114035864A (en) 2021-11-11 2021-11-11 Interface processing method, interface processing device, electronic device, and storage medium

Country Status (1)

Country Link
CN (1) CN114035864A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115378996A (en) * 2022-08-25 2022-11-22 北京分贝通科技有限公司 Method, device, equipment and storage medium for intersystem data transmission

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115378996A (en) * 2022-08-25 2022-11-22 北京分贝通科技有限公司 Method, device, equipment and storage medium for intersystem data transmission
CN115378996B (en) * 2022-08-25 2023-12-15 北京分贝通科技有限公司 Method, device, equipment and storage medium for data transmission between systems

Similar Documents

Publication Publication Date Title
US11861375B2 (en) Configuration for application using microservices
US9678740B2 (en) Migration mechanism
US9262237B2 (en) Automating software availability management based on API versioning
US11552955B2 (en) Data security across data residency restriction boundaries
CN114035864A (en) Interface processing method, interface processing device, electronic device, and storage medium
CN111930629A (en) Page testing method and device, electronic equipment and storage medium
CN115248680A (en) Software construction method, system, device, medium, and program product
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN113986679A (en) Performance analysis method and device based on configuration information hot loading
CN114791885A (en) Interface test method, device, equipment and medium
CN114253599A (en) Version deployment method, version deployment device, electronic device and storage medium
CN114116509A (en) Program analysis method, program analysis device, electronic device, and storage medium
CN113805877A (en) Project engineering construction method and device based on IDEA plug-in
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN112988604A (en) Object testing method, testing system, electronic device and readable storage medium
CN113515271A (en) Service code generation method and device, electronic equipment and readable storage medium
CN113176907A (en) Interface data calling method and device, computer system and readable storage medium
US11947500B2 (en) Cloud migration for legacy on-premises process code
US10977210B2 (en) Methods for implementing an administration and testing tool
CN114817073A (en) Automated testing method, apparatus, device, medium, and program product
CN113760467A (en) Transaction processing method, device, computer system and storage medium
CN114253852A (en) Automatic testing method, device, equipment and medium
CN113886271A (en) Application testing method and device, electronic equipment and storage medium
CN113568838A (en) Test data generation method, device, equipment, storage medium and program product
CN113342401A (en) Method, device, equipment and medium for generating application program installation package

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